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