3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
13 class AliITShit : public AliHit {
14 ////////////////////////////////////////////////////////////////////////
16 // Written by Rene Brun, Federico Carminati, and Roberto Barbera
19 // Modified and documented by Bjorn S. Nilsen
22 // AliITShit is the hit class for the ITS. Hits are the information
23 // that comes from a Monte Carlo at each step as a particle mass through
24 // sensitive detector elements as particles are transported through a
30 // See AliHit for a full description. The track number of the track
31 // that made this hit.
34 // See AliHit for a full description. The global x position of the
35 // hit (in the standard units of the Monte Carlo).
38 // See AliHit for a full description. The global y position of the
39 // hit (in the standard units of the Monte Carlo).
42 // See AliHit for a full description. The global z position of the
43 // hit (in the standard units of the Monte Carlo).
46 // The track status flag. This flag indicates the track status
47 // at the time of creating this hit. It is made up of the following 8
48 // status bits from highest order to lowest order bits
49 // 0 : IsTrackAlive(): IsTrackStop():IsTrackDisappeared():
50 // IsTrackOut():IsTrackExiting():IsTrackEntering():IsTrackInside() .
51 // See AliMC for a description of these functions. If the function is
52 // true then the bit is set to one, otherwise it is zero.
55 // The layer number of the detector that contains this hit. See
56 // AliITSgeom and AliITSv? for a description of the geometry.
59 // The ladder number of the detector that contains this hit. See
60 // AliITSgeom and AliITSv? for a description of the geometry.
63 // The detector number of the detector that contains this hit. See
64 // AliITSgeom and AliITSv? for a description of the geometry.
67 // The x momentum, in global coordinates, of the particle that
68 // "created" the hit at the time and position of the hit. The units
69 // are those determined by the Monte Carlo.
72 // The y momentum, in global coordinates, of the particle that
73 // "created" the hit at the time and position of the hit. The units
74 // are those determined by the Monte Carlo.
77 // The z momentum, in global coordinates, of the particle that
78 // "created" the hit at the time and position of the hit. The units
79 // are those determined by the Monte Carlo.
82 // The energy lost by the particle during the step ending in this
83 // hit. The units are those determined by the Monte Carlo.
86 // The time of flight associated with the particle ending in this
87 // hit. The time is typically measured from the point of creation of the
88 // original particle (if this particle is a daughter). The units
89 // are those determined by the Monte Carlo.
92 ////////////////////////////////////////////////////////////////////////
93 // public; // defined in AliHit
94 // Int_t fTrack // defined in AliHit
95 // Float_t fX; // defined in AliHit
96 // Float_t fY; // defined in AliHit
97 // Float_t fZ; // defined in AliHit
100 AliITShit() {}// Default consrtructor
101 AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
102 virtual ~AliITShit() {}
103 // Get Hit information functions.
104 // virtual int GetTrack() const {return fTrack;} // define in AliHit
105 // virtual void SetTrack(int track) const {fTrack=track;) // AliHit
106 virtual Int_t GetTrackStatus() const {//returns the status code
108 virtual Int_t GetLayer() const {// returns the layer number
110 virtual Int_t GetLadder() const {// returns the ladder number
112 virtual Int_t GetDetector() const {// returns the detector number
114 virtual void GetDetectorID(Int_t &layer,Int_t &ladder,Int_t &det)const {
115 // returns the detector ID
116 layer=fLayer;ladder=fLadder;det=fDet;return;};
117 virtual Int_t GetModule();
118 virtual Float_t GetIonization() const {// returns the Destep
121 virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z)const {
122 // returns the position in the Global frame
123 x=fX;y=fY;z=fZ;return;};
124 virtual void GetPositionG(Double_t &x,Double_t &y,Double_t &z)const {
125 // returns the position in the Global frame
126 x=fX;y=fY;z=fZ;return;};
127 virtual Float_t GetTOF() const {// returns the time of flight
129 // Returns particle 3 position at this hit in global coordinates.
130 virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z,Float_t &tof)
131 const {// returns the position in the Global frame and the time of
133 x=fX;y=fY;z=fZ,tof=fTof;return;};
134 virtual void GetPositionG(Double_t &x,Double_t &y,Double_t &z,Double_t &t)
135 const {// Returns particle 3 position and the time of flight at this
136 // hit in global coordinates.
137 x=fX;y=fY;z=fZ,t=fTof;return;};
138 virtual Float_t GetXG()const {// Returns particle X position at this hit
139 // in global coordinates.
141 virtual Float_t GetYG()const {// Returns particle X position at this hit
142 // in global coordinates.
144 virtual Float_t GetZG()const {// Returns particle Z position at this hit
145 // in global coordinates.
147 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z);
148 // Returns particle 3 position at this hit in local coordinates.
149 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof);
150 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z){
151 // Returns particle 3 position at this hit in local coordinates.
152 Float_t xf,yf,zf;GetPositionL(xf,yf,zf);x=xf,y=yf;z=zf;}
153 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z,Double_t &t){
154 // Returns particle 3 position and the time of flight at this hit
155 // in local coordinates.
156 Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;t=tf;}
157 virtual Float_t GetXL();
158 // Returns particle X position at this hit in local coordinates.
159 virtual Float_t GetYL();
160 // Returns particle Y position at this hit in local coordinates.
161 virtual Float_t GetZL();
162 // Returns particle Z position at this hit in local coordinates.
163 // Get Monti Carlo information about hit.
164 virtual void GetMomentumG(Float_t &px,Float_t &py,Float_t &pz)const {
165 // returns the particle momentum in the Global frame
166 px=fPx;py=fPy;pz=fPz;return;};
167 virtual void GetMomentumG(Double_t &px,Double_t &py,Double_t &pz)const {
168 // returns the particle momentum in the Global frame
169 px=fPx;py=fPy;pz=fPz;return;};
170 virtual Float_t GetPXG()const {// Returns particle X momentum at this hit
171 // in global coordinates.
173 virtual Float_t GetPYG()const {// Returns particle Y momentum at
174 // this hit in global coordinates.
176 virtual Float_t GetPZG()const {// Returns particle Z momentum at
177 // this hit in global coordinates.
179 virtual void GetMomentumL(Float_t &px,Float_t &py,Float_t &pz);
180 virtual void GetMomentumL(Double_t &px,Double_t &py,Double_t &pz){
181 // Returns particle 3 momentum at this hit in local coordinates.
182 Float_t x,y,z;GetMomentumL(x,y,z);px=x,py=y,pz=z;}
184 virtual Float_t GetPXL();
185 // Returns particle X momentum at this hit in local coordinates.
186 virtual Float_t GetPYL();
187 // Returns particle Y momentum at this hit in local coordinates.
188 virtual Float_t GetPZL();
189 // Returns particle Z momentum at this hit in local coordinates.
190 virtual TParticle * GetParticle(); // Returns pointer to this particle.
191 Bool_t StatusInside() {// checks if the particle is "inside"
192 if((fStatus&0x0001)==0) return kFALSE;else return kTRUE;}
193 Bool_t StatusEntering() {// checks if the particle is "entering"
194 if((fStatus&0x0002)==0) return kFALSE;else return kTRUE;}
195 Bool_t StatusExiting() {// checks if the particle is "exiting"
196 if((fStatus&0x0004)==0) return kFALSE;else return kTRUE;}
197 Bool_t StatusOut() {// checks if the particle is "out"
198 if((fStatus&0x0008)==0) return kFALSE;else return kTRUE;}
199 Bool_t StatusDisappeared() {// checks if the particle is "disappeared"
200 if((fStatus&0x00010)==0) return kFALSE;else return kTRUE;}
201 Bool_t StatusStop() {// checks if the particle is "stopped"
202 if((fStatus&0x00020)==0) return kFALSE;else return kTRUE;}
203 Bool_t StatusAlive() {// checks if the particle is "alive"
204 if((fStatus&0x00030)==0) return kFALSE;else return kTRUE;}
205 // Prints out the content of this class in ASCII format.
206 void Print(ostream *os);
207 // Reads in the content of this class in the format of Print
208 void Read(istream *is);
211 Int_t fStatus; // Track Status
212 Int_t fLayer; // Layer number
213 Int_t fLadder; // Ladder number
214 Int_t fDet; // Detector number
215 Float_t fPx; // PX of particle at the point of the hit
216 Float_t fPy; // PY of particle at the point of the hit
217 Float_t fPz; // PZ of particle at the point of the hit
218 Float_t fDestep; // Energy deposited in the current step
219 Float_t fTof; // Time of flight at the point of the hit
221 ClassDef(AliITShit,1) //Hits object for set:ITS
224 // Input and output function for standard C++ input/output.
225 ostream& operator<<(ostream &os,AliITShit &source);
226 istream& operator>>(istream &os,AliITShit &source);