3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
15 class AliITShit : public AliHit {
16 ////////////////////////////////////////////////////////////////////////
18 // Written by Rene Brun, Federico Carminati, and Roberto Barbera
21 // Modified and documented by Bjorn S. Nilsen
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
32 // See AliHit for a full description. The track number of the track
33 // that made this hit.
36 // See AliHit for a full description. The global x position of the
37 // hit (in the standard units of the Monte Carlo).
40 // See AliHit for a full description. The global y position of the
41 // hit (in the standard units of the Monte Carlo).
44 // See AliHit for a full description. The global z position of the
45 // hit (in the standard units of the Monte Carlo).
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.
57 // The layer number of the detector that contains this hit. See
58 // AliITSgeom and AliITSv? for a description of the geometry.
61 // The ladder number of the detector that contains this hit. See
62 // AliITSgeom and AliITSv? for a description of the geometry.
65 // The detector number of the detector that contains this hit. See
66 // AliITSgeom and AliITSv? for a description of the geometry.
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.
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.
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.
84 // The energy lost by the particle during the step ending in this
85 // hit. The units are those determined by the Monte Carlo.
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.
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
102 AliITShit() {}// Default consrtructor
103 AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
104 virtual ~AliITShit() {}
105 // Get Hit information functions.
106 // virtual int GetTrack() const {return fTrack;} // define in AliHit
107 // virtual void SetTrack(int track) const {fTrack=track;) // AliHit
108 virtual Int_t GetTrackStatus() const {//returns the status code
110 virtual Int_t GetLayer() const {// returns the layer number
112 virtual Int_t GetLadder() const {// returns the ladder number
114 virtual Int_t GetDetector() const {// returns the detector number
116 virtual void GetDetectorID(Int_t &layer,Int_t &ladder,Int_t &det)const {
117 // returns the detector ID
118 layer=fLayer;ladder=fLadder;det=fDet;return;};
119 virtual Int_t GetModule();
120 virtual Float_t GetIonization() const {// returns the Destep
123 virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z)const {
124 // returns the position in the Global frame
125 x=fX;y=fY;z=fZ;return;};
126 virtual void GetPositionG(Double_t &x,Double_t &y,Double_t &z)const {
127 // returns the position in the Global frame
128 x=fX;y=fY;z=fZ;return;};
129 virtual Float_t GetTOF() const {// returns the time of flight
131 // Returns particle 3 position at this hit in global coordinates.
132 virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z,Float_t &tof)
133 const {// returns the position in the Global frame and the time of
135 x=fX;y=fY;z=fZ,tof=fTof;return;};
136 virtual void GetPositionG(Double_t &x,Double_t &y,Double_t &z,Double_t &t)
137 const {// Returns particle 3 position and the time of flight at this
138 // hit in global coordinates.
139 x=fX;y=fY;z=fZ,t=fTof;return;};
140 virtual Float_t GetXG()const {// Returns particle X position at this hit
141 // in global coordinates.
143 virtual Float_t GetYG()const {// Returns particle X position at this hit
144 // in global coordinates.
146 virtual Float_t GetZG()const {// Returns particle Z position at this hit
147 // in global coordinates.
149 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z);
150 // Returns particle 3 position at this hit in local coordinates.
151 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof);
152 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z){
153 // Returns particle 3 position at this hit in local coordinates.
154 Float_t xf,yf,zf;GetPositionL(xf,yf,zf);x=xf,y=yf;z=zf;}
155 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z,Double_t &t){
156 // Returns particle 3 position and the time of flight at this hit
157 // in local coordinates.
158 Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;t=tf;}
159 virtual Float_t GetXL();
160 // Returns particle X position at this hit in local coordinates.
161 virtual Float_t GetYL();
162 // Returns particle Y position at this hit in local coordinates.
163 virtual Float_t GetZL();
164 // Returns particle Z position at this hit in local coordinates.
165 // Get Monti Carlo information about hit.
166 virtual void GetMomentumG(Float_t &px,Float_t &py,Float_t &pz)const {
167 // returns the particle momentum in the Global frame
168 px=fPx;py=fPy;pz=fPz;return;};
169 virtual void GetMomentumG(Double_t &px,Double_t &py,Double_t &pz)const {
170 // returns the particle momentum in the Global frame
171 px=fPx;py=fPy;pz=fPz;return;};
172 virtual Float_t GetPXG()const {// Returns particle X momentum at this hit
173 // in global coordinates.
175 virtual Float_t GetPYG()const {// Returns particle Y momentum at
176 // this hit in global coordinates.
178 virtual Float_t GetPZG()const {// Returns particle Z momentum at
179 // this hit in global coordinates.
181 virtual void GetMomentumL(Float_t &px,Float_t &py,Float_t &pz);
182 virtual void GetMomentumL(Double_t &px,Double_t &py,Double_t &pz){
183 // Returns particle 3 momentum at this hit in local coordinates.
184 Float_t x,y,z;GetMomentumL(x,y,z);px=x,py=y,pz=z;}
186 virtual Float_t GetPXL();
187 // Returns particle X momentum at this hit in local coordinates.
188 virtual Float_t GetPYL();
189 // Returns particle Y momentum at this hit in local coordinates.
190 virtual Float_t GetPZL();
191 // Returns particle Z momentum at this hit in local coordinates.
192 virtual TParticle * GetParticle(); // Returns pointer to this particle.
193 Bool_t StatusInside() {// checks if the particle is "inside"
194 if((fStatus&0x0001)==0) return kFALSE;else return kTRUE;}
195 Bool_t StatusEntering() {// checks if the particle is "entering"
196 if((fStatus&0x0002)==0) return kFALSE;else return kTRUE;}
197 Bool_t StatusExiting() {// checks if the particle is "exiting"
198 if((fStatus&0x0004)==0) return kFALSE;else return kTRUE;}
199 Bool_t StatusOut() {// checks if the particle is "out"
200 if((fStatus&0x0008)==0) return kFALSE;else return kTRUE;}
201 Bool_t StatusDisappeared() {// checks if the particle is "disappeared"
202 if((fStatus&0x00010)==0) return kFALSE;else return kTRUE;}
203 Bool_t StatusStop() {// checks if the particle is "stopped"
204 if((fStatus&0x00020)==0) return kFALSE;else return kTRUE;}
205 Bool_t StatusAlive() {// checks if the particle is "alive"
206 if((fStatus&0x00030)==0) return kFALSE;else return kTRUE;}
207 // Prints out the content of this class in ASCII format.
208 void Print(ostream *os);
209 // Reads in the content of this class in the format of Print
210 void Read(istream *is);
213 Int_t fStatus; // Track Status
214 Int_t fLayer; // Layer number
215 Int_t fLadder; // Ladder number
216 Int_t fDet; // Detector number
217 Float_t fPx; // PX of particle at the point of the hit
218 Float_t fPy; // PY of particle at the point of the hit
219 Float_t fPz; // PZ of particle at the point of the hit
220 Float_t fDestep; // Energy deposited in the current step
221 Float_t fTof; // Time of flight at the point of the hit
223 ClassDef(AliITShit,1) //Hits object for set:ITS
226 // Input and output function for standard C++ input/output.
227 ostream &operator<<(ostream &os,AliITShit &source);
228 istream &operator>>(istream &os,AliITShit &source);