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 "FtfHit.h"
13 
14 #include "FtfGeneral.h"
15 
16 #include "rtsLog.h"
17 
18 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
19 //
20 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21 void FtfHit::printLinks ( ) { print (11) ; } ;
22 void FtfHit::printLinks ( int point_level )
23 {
24 //--
25 //-- print hit info
26 //
27 
28  if ( point_level > 9 )
29  LOG(NOTE, "hit ir iphi ieta phi eta x y z\n" ) ;
30 
31  if ( fmod((double)point_level,10) > 0 )
32  LOG(NOTE, "%3d %3d %3d %3d %6.2f %5.2f %6.2f %6.2f %6.2f \n",
33  (int)id, (int)row, (int)phiIndex, (int)etaIndex,
34  phi*toDeg, eta, x, y, z ) ;
35  int vhit ;
36  if ( nextVolumeHit != 0 ) vhit = ((FtfHit *)nextVolumeHit)->id ;
37  else vhit = -1 ;
38  int rhit ;
39  if ( nextRowHit != 0 ) rhit = ((FtfHit *)nextRowHit)->id ;
40  else rhit = -1 ;
41  int thit ;
42  if ( nextTrackHit != 0 ) thit = ((FtfBaseHit *)nextTrackHit)->id ;
43  else thit = -1 ;
44  int mhit ;
45  if ( nextMcTrackHit != 0 ) mhit = ((FtfBaseHit *)nextMcTrackHit)->id ;
46  else mhit = -1 ;
47 
48  if ( fmod((double)point_level,10) > 1 )
49  LOG(NOTE, "pointers:vol,row,tr,mtr,mirror (%4d,%4d,%4d,%4d)\n ",
50  vhit, rhit, thit, mhit ) ;
51  int tid = 0;
52 // if ( track != 0 ) tid = track->id ;
53 // else tid = -1 ;
54  if ( fmod((double)point_level,10) > 2 )
55  LOG(NOTE, "\n Tracks :reco (%4d) ", tid ) ;
56 
57 /* if ( fmod((double)point_level,10) l3Log ( "\n " ) ; */
58 }
59 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60 // This function assigns this hit and all its
61 // mirror hits to a given track
62 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
63 void FtfHit::setStatus ( FtfTrack* this_track ) {
64 //
65 // Set the flag for this hit
66 //
67  track = (FtfBaseTrack *)this_track ;
68 /*
69  if ( !para->ghost_flag ) return ;
70 //
71 // Set the flag for mirror hits
72 //
73  const int nmax = 100 ;
74  int n = 0 ;
75  for ( FtfHit* this_hit=nxghit ;
76  this_hit != NULL && this_hit!=this && n<nmax ;
77  this_hit=this_hit->nxghit ){
78  this_hit->track = this_track ;
79  n++ ;
80  }
81  if ( n >= nmax ) l3Log ( " \n Set_Status: Going into an infinite loop " ) ;
82  */
83 }
84 /*
85 void FtfHit::Show ( int color ) {
86  l3Log ( " \n You better include the graphic package gft " ) ;
87 }
88 */
Definition: FtfHit.h:16