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