StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FtfHit.cxx
1 //:>------------------------------------------------------------------
2 //: FILE: FtfHit.cxx
3 //: HISTORY:
4 //: 28oct1996 version 1.00
5 //: 23aug1999 ppy print format changed
6 //:<------------------------------------------------------------------
7 //:>------------------------------------------------------------------
8 //: CLASS: FtfHit
9 //: DESCRIPTION: Functions associated with this class
10 //: AUTHOR: ppy - Pablo Yepes, yepes@physics.rice.edu
11 //:>------------------------------------------------------------------
12 #include "Stl3Util/ftf/FtfHit.h"
13 
14 
15 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16 //
17 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
18 void FtfHit::printLinks ( ) { print (11) ; } ;
19 void FtfHit::printLinks ( int point_level )
20 {
21 //--
22 //-- print hit info
23 //
24 
25  if ( point_level > 9 )
26  printf ( "hit ir iphi ieta phi eta x y z\n" ) ;
27 
28  if ( fmod((double)point_level,10) > 0 )
29  printf ( "%3d %3d %3d %3d %6.2f %5.2f %6.2f %6.2f %6.2f \n",
30  (int)id, (int)row, (int)phiIndex, (int)etaIndex,
31  phi*toDeg, eta, x, y, z ) ;
32  int vhit ;
33  if ( nextVolumeHit != 0 ) vhit = ((FtfHit *)nextVolumeHit)->id ;
34  else vhit = -1 ;
35  int rhit ;
36  if ( nextRowHit != 0 ) rhit = ((FtfHit *)nextRowHit)->id ;
37  else rhit = -1 ;
38  int thit ;
39  if ( nextTrackHit != 0 ) thit = ((FtfBaseHit *)nextTrackHit)->id ;
40  else thit = -1 ;
41  int mhit ;
42  if ( nextMcTrackHit != 0 ) mhit = ((FtfBaseHit *)nextMcTrackHit)->id ;
43  else mhit = -1 ;
44 
45  if ( fmod((double)point_level,10) > 1 )
46  printf ( "pointers:vol,row,tr,mtr,mirror (%4d,%4d,%4d,%4d)\n ",
47  vhit, rhit, thit, mhit ) ;
48  int tid =0;
49 // if ( track != 0 ) tid = track->id ;
50 // else tid = -1 ;
51  if ( fmod((double)point_level,10) > 2 )
52  printf ( "\n Tracks :reco (%4d) ", tid ) ;
53 
54 /* if ( fmod((double)point_level,10) printf ( "\n " ) ; */
55 }
56 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
57 // This function assigns this hit and all its
58 // mirror hits to a given track
59 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60 void FtfHit::setStatus ( FtfTrack* this_track ) {
61 //
62 // Set the flag for this hit
63 //
64  track = (FtfBaseTrack *)this_track ;
65 /*
66  if ( !para->ghost_flag ) return ;
67 //
68 // Set the flag for mirror hits
69 //
70  const int nmax = 100 ;
71  int n = 0 ;
72  for ( FtfHit* this_hit=nxghit ;
73  this_hit != NULL && this_hit!=this && n<nmax ;
74  this_hit=this_hit->nxghit ){
75  this_hit->track = this_track ;
76  n++ ;
77  }
78  if ( n >= nmax ) printf ( " \n Set_Status: Going into an infinite loop " ) ;
79  */
80 }
81 /*
82 void FtfHit::Show ( int color ) {
83  printf ( " \n You better include the graphic package gft " ) ;
84 }
85 */
Definition: FtfHit.h:16