]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDHit.h
coverity + some patch for pp
[u/mrichter/AliRoot.git] / FMD / AliFMDHit.h
1 #ifndef AliFMDhit_H
2 #define AliFMDhit_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * See cxx source for full Copyright notice                               
7  */
8 // Hits are the information that comes from a Monte Carlo at each
9 // step as a particle mass through sensitive detector elements as
10 // particles are transported through a detector. 
11 /** @file    AliFMDHit.h
12     @author  Christian Holm Christensen <cholm@nbi.dk>
13     @date    Mon Mar 27 12:41:58 2006
14     @brief   Hit in the FMD
15     @ingroup FMD_sim
16 */
17 //___________________________________________________________________
18 //
19 #ifndef ALIHIT_H
20 # include <AliHit.h>
21 #endif
22
23 //___________________________________________________________________
24 /** @brief AliFMDhit is the hit class for the FMD. 
25     Hits are the information that comes from a Monte Carlo at each
26     step as a particle mass through sensitive detector elements as
27     particles are transported through a detector. 
28     @ingroup FMD_sim
29 */
30 class AliFMDHit : public AliHit 
31 {
32 public:
33   /** Default CTOR */
34   AliFMDHit();
35   /** Normal FMD hit ctor
36       @param shunt     ???
37       @param track     Track #
38       @param detector  Detector # (1, 2, or 3)                      
39       @param ring      Ring ID ('I' or 'O')
40       @param sector    Sector # (For inner/outer rings: 0-19/0-39)
41       @param strip     Strip # (For inner/outer rings: 0-511/0-255)
42       @param x         Track's X-coordinate at hit
43       @param y         Track's Y-coordinate at hit
44       @param z         Track's Z-coordinate at hit
45       @param px        X-component of track's momentum 
46       @param py        Y-component of track's momentum
47       @param pz        Z-component of track's momentum
48       @param edep      Energy deposited by track
49       @param pdg       Track's particle Id #
50       @param t         Time when the track hit 
51       @param l         Track lenght through medium 
52       @param stop      Whether track is stopped in medium */
53   AliFMDHit(Int_t    shunt, 
54             Int_t    track, 
55             UShort_t detector, 
56             Char_t   ring, 
57             UShort_t sector, 
58             UShort_t strip, 
59             Float_t  x=0, 
60             Float_t  y=0, 
61             Float_t  z=0,
62             Float_t  px=0, 
63             Float_t  py=0, 
64             Float_t  pz=0,
65             Float_t  edep=0,
66             Int_t    pdg=0,
67             Float_t  t=0, 
68             Float_t  l=0, 
69             Bool_t   stop=kFALSE);
70   /** DTOR  */
71   virtual ~AliFMDHit() {}
72   
73   /** @return Detector # */
74   UShort_t Detector()   const { return fDetector; }
75   /** @return Ring ID */
76   Char_t   Ring()       const { return fRing;     }
77   /** @return Sector # */
78   UShort_t Sector()     const { return fSector;   }
79   /** @return Strip # */
80   UShort_t Strip()      const { return fStrip;    }
81   /** @return Energy deposited (MeV) */
82   Float_t  Edep()       const { return fEdep;     }
83   /** @return Track @f$ p_x@f$ - momentum in @f$ x@f$ (GeV) */
84   Float_t  Px()         const { return fPx;       }
85   /** @return Track @f$ p_y@f$ - momentum in @f$ y@f$ (GeV) */
86   Float_t  Py()         const { return fPy;       }
87   /** @return Track @f$ p_z@f$ - momentum in @f$ z@f$ (GeV) */
88   Float_t  Pz()         const { return fPz;       } 
89   /** @return Track @f$ |p|@f$ - momentum (GeV) */
90   Float_t  P()          const;
91   /** @return Track @f$ m@f$ - mass (GeV) */
92   Float_t  M()          const;
93   /** @return Track @f$ q@f$ - charge (1/3) */
94   Float_t  Q()          const;
95   /** @return Track PDG id number */
96   Int_t    Pdg()        const { return fPdg;      }
97   /** @return Time of hit in seconds */
98   Float_t  Time()       const { return fTime;     }
99   /** @return Path length through silicon */
100   Float_t  Length()     const { return fLength;   }
101   /** @return Whether track was stopped in silicon */
102   Bool_t   IsStop()     const { return fStop;     }
103
104   /** Print info 
105       @param opt Not used */
106   void        Print(Option_t* opt="") const;
107   /** @return Get Name */
108   const char* GetName()               const;
109   /** @return Get title */
110   const char* GetTitle()              const;
111
112   /** Set enenrgy deposited
113       @param edep Energy deposited */
114   void     SetEdep(Float_t edep) { fEdep = edep; }
115 protected:
116   UShort_t fDetector;  // (Sub) Detector # (1,2, or 3)
117   Char_t   fRing;      // Ring ID ('I' or 'O')
118   UShort_t fSector;    // Sector # (phi division)
119   UShort_t fStrip;     // Strip # (radial division)
120   Float_t  fPx;        // Particle's X momentum X
121   Float_t  fPy;        // Particle's Y momentum Y
122   Float_t  fPz;        // Particle's Z momentum Z
123   Int_t    fPdg;       // Particles PDG code 
124   Float_t  fEdep;      // Energy deposition
125   Float_t  fTime;      // Particle's time of flight
126   Float_t  fLength;    // Track length through material. 
127   Bool_t   fStop;      // Whether track was stopped. 
128   
129   ClassDef(AliFMDHit,2)  //Hits for detector FMD
130 };
131 #endif
132 //____________________________________________________________________
133 //
134 // Local Variables:
135 //   mode: C++
136 // End:
137 //
138 // EOF
139 //