]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITShit.h
Added macro for visualization of the TOF ROOT geometry
[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"
43b17342 9#include <iostream.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;};
593d2ea1 160 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z);
b2340bbf 161 // Returns particle 3 position at this hit in local coordinates.
3dbb2c95 162 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof);
b2340bbf 163 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z){
fc743205 164 // Returns particle 3 position at this hit in local coordinates.
165 Float_t xf,yf,zf;GetPositionL(xf,yf,zf);x=xf,y=yf;z=zf;}
3dbb2c95 166 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z,Double_t &t){
b2340bbf 167 // Returns particle 3 position and the time of flight at this hit
168 // in local coordinates.
3dbb2c95 169 Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;t=tf;}
593d2ea1 170 virtual Float_t GetXL();
b2340bbf 171 // Returns particle X position at this hit in local coordinates.
593d2ea1 172 virtual Float_t GetYL();
b2340bbf 173 // Returns particle Y position at this hit in local coordinates.
593d2ea1 174 virtual Float_t GetZL();
b2340bbf 175 // Returns particle Z position at this hit in local coordinates.
58005f18 176 // Get Monti Carlo information about hit.
3dbb2c95 177 virtual void GetMomentumG(Float_t &px,Float_t &py,Float_t &pz)const {
178 // returns the particle momentum in the Global frame
179 px=fPx;py=fPy;pz=fPz;return;};
180 virtual void GetMomentumG(Double_t &px,Double_t &py,Double_t &pz)const {
181 // returns the particle momentum in the Global frame
182 px=fPx;py=fPy;pz=fPz;return;};
183 virtual Float_t GetPXG()const {// Returns particle X momentum at this hit
184 // in global coordinates.
185 return fPx;}
186 virtual Float_t GetPYG()const {// Returns particle Y momentum at
187 // this hit in global coordinates.
188 return fPy;}
189 virtual Float_t GetPZG()const {// Returns particle Z momentum at
190 // this hit in global coordinates.
191 return fPz;}
593d2ea1 192 virtual void GetMomentumL(Float_t &px,Float_t &py,Float_t &pz);
b2340bbf 193 virtual void GetMomentumL(Double_t &px,Double_t &py,Double_t &pz){
fc743205 194 // Returns particle 3 momentum at this hit in local coordinates.
195 Float_t x,y,z;GetMomentumL(x,y,z);px=x,py=y,pz=z;}
fc743205 196
b2340bbf 197 virtual Float_t GetPXL();
198 // Returns particle X momentum at this hit in local coordinates.
199 virtual Float_t GetPYL();
200 // Returns particle Y momentum at this hit in local coordinates.
201 virtual Float_t GetPZL();
202 // Returns particle Z momentum at this hit in local coordinates.
203 virtual TParticle * GetParticle(); // Returns pointer to this particle.
3dbb2c95 204 Bool_t StatusInside() {// checks if the particle is "inside"
205 if((fStatus&0x0001)==0) return kFALSE;else return kTRUE;}
206 Bool_t StatusEntering() {// checks if the particle is "entering"
207 if((fStatus&0x0002)==0) return kFALSE;else return kTRUE;}
208 Bool_t StatusExiting() {// checks if the particle is "exiting"
209 if((fStatus&0x0004)==0) return kFALSE;else return kTRUE;}
210 Bool_t StatusOut() {// checks if the particle is "out"
211 if((fStatus&0x0008)==0) return kFALSE;else return kTRUE;}
212 Bool_t StatusDisappeared() {// checks if the particle is "disappeared"
213 if((fStatus&0x00010)==0) return kFALSE;else return kTRUE;}
214 Bool_t StatusStop() {// checks if the particle is "stopped"
215 if((fStatus&0x00020)==0) return kFALSE;else return kTRUE;}
216 Bool_t StatusAlive() {// checks if the particle is "alive"
217 if((fStatus&0x00030)==0) return kFALSE;else return kTRUE;}
218 // Prints out the content of this class in ASCII format.
219 void Print(ostream *os);
220 // Reads in the content of this class in the format of Print
221 void Read(istream *is);
fc743205 222
223 protected:
224 Int_t fStatus; // Track Status
225 Int_t fLayer; // Layer number
226 Int_t fLadder; // Ladder number
227 Int_t fDet; // Detector number
228 Float_t fPx; // PX of particle at the point of the hit
229 Float_t fPy; // PY of particle at the point of the hit
230 Float_t fPz; // PZ of particle at the point of the hit
231 Float_t fDestep; // Energy deposited in the current step
232 Float_t fTof; // Time of flight at the point of the hit
7e3ded1b 233 Int_t fStatus0;// Track Status of Starting point
234 Float_t fx0; // Starting point of this step
235 Float_t fy0; // Starting point of this step
236 Float_t fz0; // Starting point of this step
237 Float_t ft0; // Starting point of this step
593d2ea1 238
7e3ded1b 239 ClassDef(AliITShit,2) //Hits object for set:ITS
fc743205 240
3dbb2c95 241};
242// Input and output function for standard C++ input/output.
e11d9a3a 243ostream& operator<<(ostream &os,AliITShit &source);
244istream& operator>>(istream &os,AliITShit &source);
58005f18 245
246#endif