]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITShit.h
Update for coding convensions
[u/mrichter/AliRoot.git] / ITS / AliITShit.h
1 #ifndef ALIITSHIT_H
2 #define ALIITSHIT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 #include "AliDetector.h"
9 #include "TParticle.h"
10 #include "AliHit.h" 
11 #include "AliDigit.h"
12 #include "AliITSgeom.h"
13
14
15 class AliITShit : public AliHit {
16 ////////////////////////////////////////////////////////////////////////
17 // Version: 0
18 // Written by Rene Brun, Federico Carminati, and Roberto Barbera
19 //
20 // Version: 1
21 // Modified and documented by Bjorn S. Nilsen
22 // July 11 1999
23 //
24 // AliITShit is the hit class for the ITS. Hits are the information
25 // that comes from a Monte Carlo at each step as a particle mass through
26 // sensitive detector elements as particles are transported through a
27 // detector.
28 //
29 // Data members:
30 //
31 // Int_t fTrack
32 //     See AliHit for a full description. The track number of the track
33 // that made this hit.
34 //
35 // Float_t fX
36 //     See AliHit for a full description. The global x position of the
37 // hit (in the standard units of the Monte Carlo).
38 //
39 // Float_t fY
40 //     See AliHit for a full description. The global y position of the
41 // hit (in the standard units of the Monte Carlo).
42 //
43 // Float_t fZ
44 //     See AliHit for a full description. The global z position of the
45 // hit (in the standard units of the Monte Carlo).
46 //
47 // Int_t fStatus
48 //     The track status flag. This flag indicates the track status
49 // at the time of creating this hit. It is made up of the following 8
50 // status bits from highest order to lowest order bits
51 // 0           :  IsTrackAlive():    IsTrackStop():IsTrackDisappeared():
52 // IsTrackOut():IsTrackExiting():IsTrackEntering():IsTrackInside()     .
53 // See AliMC for a description of these functions. If the function is
54 // true then the bit is set to one, otherwise it is zero.
55 //
56 // Int_t fLayer
57 //     The layer number of the detector that contains this hit. See
58 // AliITSgeom and AliITSv? for a description of the geometry.
59 //
60 // Int_t fLadder
61 //     The ladder number of the detector that contains this hit. See
62 // AliITSgeom and AliITSv? for a description of the geometry.
63 //
64 // Int_t fDet
65 //     The detector number of the detector that contains this hit. See
66 // AliITSgeom and AliITSv? for a description of the geometry.
67 //
68 // Float_t fPx
69 //     The x momentum, in global coordinates, of the particle that
70 // "created" the hit at the time and position of the hit. The units
71 // are those determined by the Monte Carlo.
72 //
73 // Float_t fPy
74 //     The y momentum, in global coordinates, of the particle that
75 // "created" the hit at the time and position of the hit. The units
76 // are those determined by the Monte Carlo.
77 //
78 // Float_t fPz
79 //     The z momentum, in global coordinates, of the particle that
80 // "created" the hit at the time and position of the hit. The units
81 // are those determined by the Monte Carlo.
82 //
83 // Float_t fDestep
84 //     The energy lost by the particle during the step ending in this
85 // hit. The units are those determined by the Monte Carlo.
86 //
87 // Float_t fTof
88 //     The time of flight associated with the particle ending in this
89 // hit. The time is typically measured from the point of creation of the
90 // original particle (if this particle is a daughter).  The units
91 // are those determined by the Monte Carlo.
92 //
93 //
94 ////////////////////////////////////////////////////////////////////////
95     // public;       // defined in AliHit
96     // Int_t fTrack  // defined in AliHit
97     // Float_t fX;   // defined in AliHit
98     // Float_t fY;   // defined in AliHit
99     // Float_t fZ;   // defined in AliHit
100
101
102  public:
103     AliITShit() {
104                       // Default consrtructor
105                                          }
106     AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
107     virtual ~AliITShit() {}
108     // Get Hit information functions.
109     // virtual int GetTrack() const {return fTrack;} // define in AliHit
110     // virtual void SetTrack(int track) const {fTrack=track;) // AliHit
111     virtual Int_t GetTrackStatus() const {
112                                                //returns the status code
113                                                                                                                 return fStatus;
114                                                                                                           }
115     virtual Int_t GetLayer() const {
116                                          // returns the layer number
117                                                                                                 return fLayer;
118                                                                                           }
119     virtual Int_t GetLadder() const {
120                                           // returns the ladder number 
121                                                                                                  return fLadder;
122                                                                                                 }
123     virtual Int_t GetDetector() const {
124                                             // returns the detector number 
125                                             return fDet;
126                                                                                                   }
127     virtual void  GetDetectorID(Int_t &layer,Int_t &ladder,
128                                        Int_t &detector)
129                      const {
130                                                                // returns the detector ID
131                                                                          layer=fLayer;ladder=fLadder;detector=fDet;return;
132                                                                          };
133     virtual Int_t GetModule();
134     virtual Float_t GetIonization() const {
135                                                 // returns the Destep
136                                                 return fDestep;
137                                                                                                                  }
138     //
139     virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z)
140                                     const {
141                                                                                                        // returns the position in the Global
142                                                                                                                  //frame
143                                                                                                        x=fX;y=fY;z=fZ;return;
144                                                                                                       };
145     virtual void GetPositionG(Double_t &x,Double_t &y,Double_t &z)
146                                     const {
147                                                                                                        // returns the position in the Global
148                                                                                                                  //frame
149                                                                                                        x=fX;y=fY;z=fZ;return;
150                                                                                                                 };
151     virtual Float_t GetTOF() const {
152                                          // returns the time of flight
153                                          return fTof;
154                                                                                           }
155     // Returns particle 3 position at this hit in global coordinates.
156     virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z,
157                                     Float_t &tof)
158                                     const {
159                                                                                                        // returns the position in the Global
160                                                                                                                  //frame and the time of flight
161                                                                                                        x=fX;y=fY;z=fZ,tof=fTof;return;
162                                                                                                                 };
163     virtual void GetPositionG(Double_t &x,Double_t &y,Double_t &z,
164                                     Double_t &tof)
165                                     const {
166                                                                                                        // Returns particle 3 position and 
167                                                                                                                  //the time of flight at this hit
168                                            // in global coordinates.
169                                                                                                        x=fX;y=fY;z=fZ,tof=fTof;return;
170                                                                                                                 };
171     
172     virtual Float_t GetXG()const {
173                                        // Returns particle X position at this hit 
174                                                                                          // in global coordinates.
175                                        return fX;
176                                       }
177     
178     virtual Float_t GetYG()const {
179                                        // Returns particle X position at this hit 
180                                                                                          // in global coordinates.
181                                        return fY;
182                                                                                         }
183     
184     virtual Float_t GetZG()const {
185                                        // Returns particle Z position at this hit 
186                                                                                          // in global coordinates.
187                                        return fZ;
188                                                                                         }
189     
190     virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z);
191     // Returns particle 3 position at this hit in local coordinates.
192     virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z,
193                                      Float_t &tof);
194     virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z){
195          // Returns particle 3 position at this hit in local coordinates.
196          Float_t xf,yf,zf;GetPositionL(xf,yf,zf);x=xf,y=yf;z=zf;}
197     
198     virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z,
199                                      Double_t &tof){
200     // Returns particle 3 position and the time of flight at this hit
201     // in local coordinates.
202          Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;tof=tf;}
203     
204     virtual Float_t GetXL();
205     // Returns particle X position at this hit in local coordinates.
206     virtual Float_t GetYL();
207     // Returns particle Y position at this hit in local coordinates.
208     virtual Float_t GetZL();
209     // Returns particle Z position at this hit in local coordinates.
210     // Get Monti Carlo information about hit.
211     virtual void GetMomentumG(Float_t &px,Float_t &py,Float_t &pz)
212                                     const {
213                                                                                                 // returns the particle momentum in the
214                                                                                                 // Global frame
215                                                                                                 px=fPx;py=fPy;pz=fPz;return;
216                                                                                                 };
217     virtual void GetMomentumG(Double_t &px,Double_t &py,Double_t &pz)
218                                     const {
219                                     // returns the particle momentum in the
220                                                                                                 // Global frame                                                                                         
221                                                                                                 px=fPx;py=fPy;pz=fPz;return;
222                                                                                                 };
223     
224     virtual Float_t GetPXG()const {
225                                         // Returns particle X momentum at 
226                                                                                           // this hit in global coordinates.
227                                                                                           return fPx;
228                                                                                          }
229     
230     virtual Float_t GetPYG()const {
231                                    // Returns particle Y momentum at 
232                                                                                           // this hit in global coordinates.     
233                                         return fPy;
234                                                                                          }
235
236     virtual Float_t GetPZG()const {
237                                    // Returns particle Z momentum at 
238                                                                                           // this hit in global coordinates.     
239                                         return fPz;
240                                                                                          }
241     
242     virtual void GetMomentumL(Float_t &px,Float_t &py,Float_t &pz);
243     virtual void GetMomentumL(Double_t &px,Double_t &py,Double_t &pz){
244        // Returns particle 3 momentum at this hit in local coordinates.  
245             Float_t x,y,z;GetMomentumL(x,y,z);px=x,py=y,pz=z;}
246
247     
248     virtual Float_t GetPXL();
249     // Returns particle X momentum at this hit in local coordinates.
250
251     virtual Float_t GetPYL();
252     // Returns particle Y momentum at this hit in local coordinates.
253
254     virtual Float_t GetPZL();
255     // Returns particle Z momentum at this hit in local coordinates.
256
257     virtual TParticle * GetParticle(); // Returns pointer to this particle.
258
259     Bool_t StatusInside() {
260                                 // checks if the particle is "inside"
261                                 if((fStatus&0x0001)==0) return kFALSE;
262                            else return kTRUE;
263                                                                   }
264     Bool_t StatusEntering() {
265                                   // checks if the particle is "entering"
266                                   if((fStatus&0x0002)==0) return kFALSE;
267                              else return kTRUE;
268                                                                          }
269     Bool_t StatusExiting() {
270                                  // checks if the particle is "exiting"
271                                  if((fStatus&0x0004)==0) return kFALSE;
272                             else return kTRUE;
273                                                                         }
274     Bool_t StatusOut() {
275                              // checks if the particle is "out"
276                              if((fStatus&0x0008)==0) return kFALSE;
277                         else return kTRUE;
278                                                           }
279     Bool_t StatusDisappeared() {
280                                      // checks if the particle is "disappeared"
281                                      if((fStatus&0x00010)==0) return kFALSE;
282                                 else return kTRUE;
283                                                                                  }
284     Bool_t StatusStop() {
285                               // checks if the particle is "stopped"
286                               if((fStatus&0x00020)==0) return kFALSE;
287                          else return kTRUE;
288                                                                 }
289     Bool_t StatusAlive() {
290                                // checks if the particle is "alive"
291                                if((fStatus&0x00030)==0) return kFALSE;
292                           else return kTRUE;
293                                                                  }
294
295  protected:
296     Int_t     fStatus; // Track Status
297     Int_t     fLayer;  // Layer number
298     Int_t     fLadder; // Ladder number
299     Int_t     fDet;    // Detector number  
300     Float_t   fPx;     // PX of particle at the point of the hit
301     Float_t   fPy;     // PY of particle at the point of the hit
302     Float_t   fPz;     // PZ of particle at the point of the hit
303     Float_t   fDestep; // Energy deposited in the current step
304     Float_t   fTof;    // Time of flight at the point of the hit
305
306     ClassDef(AliITShit,1)  //Hits object for set:ITS
307          
308 };
309
310 #endif