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