]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITShit.h
readers updated (mini header -> data header)
[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
58005f18 8#include "AliHit.h"
4ae5bbc4 9#include <Riostream.h>
7e3ded1b 10#include <TLorentzVector.h>
4fc5ed2d 11
12class TParticle;
13
58005f18 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 public:
7e3ded1b 101 AliITShit();// Default consrtructor
102 // Old Standard Constructor
58005f18 103 AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
7e3ded1b 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
58005f18 108 virtual ~AliITShit() {}
109 // Get Hit information functions.
593d2ea1 110 // virtual int GetTrack() const {return fTrack;} // define in AliHit
111 // virtual void SetTrack(int track) const {fTrack=track;) // AliHit
3dbb2c95 112 virtual Int_t GetTrackStatus() const {//returns the status code
113 return fStatus;}
7e3ded1b 114 virtual Int_t GetTrackStatus0() const {//returns the status code
115 return fStatus0;}
3dbb2c95 116 virtual Int_t GetLayer() const {// returns the layer number
117 return fLayer;}
118 virtual Int_t GetLadder() const {// returns the ladder number
119 return fLadder;}
120 virtual Int_t GetDetector() const {// returns the detector number
121 return fDet;}
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;};
b2340bbf 125 virtual Int_t GetModule();
3dbb2c95 126 virtual Float_t GetIonization() const {// returns the Destep
127 return fDestep;}
58005f18 128 //
3dbb2c95 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
136 return fTof;}
b2340bbf 137 // Returns particle 3 position at this hit in global coordinates.
3dbb2c95 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
140 // flight
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.
148 return fX;}
149 virtual Float_t GetYG()const {// Returns particle X position at this hit
150 // in global coordinates.
151 return fY;}
152 virtual Float_t GetZG()const {// Returns particle Z position at this hit
153 // in global coordinates.
154 return fZ;}
7e3ded1b 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
158 // time of flight
159 x=fx0;y=fy0;z=fz0,tof=fTof;return;};
d2ace6e6 160 // Returns particle 3 position at this hit in global coordinates.
161 virtual void GetPositionG0(Double_t &x,Double_t &y,Double_t &z,
162 Double_t &tof)
163 const {// returns the initial position in the Global frame and the
164 // time of flight
165 x=fx0;y=fy0;z=fz0,tof=fTof;return;};
593d2ea1 166 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z);
b2340bbf 167 // Returns particle 3 position at this hit in local coordinates.
3dbb2c95 168 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof);
b2340bbf 169 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z){
fc743205 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;}
3dbb2c95 172 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z,Double_t &t){
b2340bbf 173 // Returns particle 3 position and the time of flight at this hit
174 // in local coordinates.
3dbb2c95 175 Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;t=tf;}
d2ace6e6 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);
593d2ea1 179 virtual Float_t GetXL();
b2340bbf 180 // Returns particle X position at this hit in local coordinates.
593d2ea1 181 virtual Float_t GetYL();
b2340bbf 182 // Returns particle Y position at this hit in local coordinates.
593d2ea1 183 virtual Float_t GetZL();
b2340bbf 184 // Returns particle Z position at this hit in local coordinates.
58005f18 185 // Get Monti Carlo information about hit.
3dbb2c95 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.
194 return fPx;}
195 virtual Float_t GetPYG()const {// Returns particle Y momentum at
196 // this hit in global coordinates.
197 return fPy;}
198 virtual Float_t GetPZG()const {// Returns particle Z momentum at
199 // this hit in global coordinates.
200 return fPz;}
593d2ea1 201 virtual void GetMomentumL(Float_t &px,Float_t &py,Float_t &pz);
b2340bbf 202 virtual void GetMomentumL(Double_t &px,Double_t &py,Double_t &pz){
fc743205 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;}
fc743205 205
b2340bbf 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.
3dbb2c95 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);
fc743205 231
232 protected:
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
7e3ded1b 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
593d2ea1 247
7e3ded1b 248 ClassDef(AliITShit,2) //Hits object for set:ITS
fc743205 249
3dbb2c95 250};
251// Input and output function for standard C++ input/output.
e11d9a3a 252ostream& operator<<(ostream &os,AliITShit &source);
253istream& operator>>(istream &os,AliITShit &source);
58005f18 254
255#endif