]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITShit.h
Added functions needed for SDD new SDigits/Digits (Add and fSigmaAfterElect).
[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>
4fc5ed2d 10
11class TParticle;
12
58005f18 13class AliITShit : public AliHit {
14////////////////////////////////////////////////////////////////////////
15// Version: 0
16// Written by Rene Brun, Federico Carminati, and Roberto Barbera
17//
18// Version: 1
19// Modified and documented by Bjorn S. Nilsen
20// July 11 1999
21//
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
25// detector.
26//
27// Data members:
28//
29// Int_t fTrack
30// See AliHit for a full description. The track number of the track
31// that made this hit.
32//
33// Float_t fX
34// See AliHit for a full description. The global x position of the
35// hit (in the standard units of the Monte Carlo).
36//
37// Float_t fY
38// See AliHit for a full description. The global y position of the
39// hit (in the standard units of the Monte Carlo).
40//
41// Float_t fZ
42// See AliHit for a full description. The global z position of the
43// hit (in the standard units of the Monte Carlo).
44//
45// Int_t fStatus
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.
53//
54// Int_t fLayer
55// The layer number of the detector that contains this hit. See
56// AliITSgeom and AliITSv? for a description of the geometry.
57//
58// Int_t fLadder
59// The ladder number of the detector that contains this hit. See
60// AliITSgeom and AliITSv? for a description of the geometry.
61//
62// Int_t fDet
63// The detector number of the detector that contains this hit. See
64// AliITSgeom and AliITSv? for a description of the geometry.
65//
66// Float_t fPx
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.
70//
71// Float_t fPy
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.
75//
76// Float_t fPz
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.
80//
81// Float_t fDestep
82// The energy lost by the particle during the step ending in this
83// hit. The units are those determined by the Monte Carlo.
84//
85// Float_t fTof
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.
90//
91//
58005f18 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
98
58005f18 99 public:
3dbb2c95 100 AliITShit() {}// Default consrtructor
58005f18 101 AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
102 virtual ~AliITShit() {}
103 // Get Hit information functions.
593d2ea1 104 // virtual int GetTrack() const {return fTrack;} // define in AliHit
105 // virtual void SetTrack(int track) const {fTrack=track;) // AliHit
3dbb2c95 106 virtual Int_t GetTrackStatus() const {//returns the status code
107 return fStatus;}
108 virtual Int_t GetLayer() const {// returns the layer number
109 return fLayer;}
110 virtual Int_t GetLadder() const {// returns the ladder number
111 return fLadder;}
112 virtual Int_t GetDetector() const {// returns the detector number
113 return fDet;}
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;};
b2340bbf 117 virtual Int_t GetModule();
3dbb2c95 118 virtual Float_t GetIonization() const {// returns the Destep
119 return fDestep;}
58005f18 120 //
3dbb2c95 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
128 return fTof;}
b2340bbf 129 // Returns particle 3 position at this hit in global coordinates.
3dbb2c95 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
132 // flight
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.
140 return fX;}
141 virtual Float_t GetYG()const {// Returns particle X position at this hit
142 // in global coordinates.
143 return fY;}
144 virtual Float_t GetZG()const {// Returns particle Z position at this hit
145 // in global coordinates.
146 return fZ;}
593d2ea1 147 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z);
b2340bbf 148 // Returns particle 3 position at this hit in local coordinates.
3dbb2c95 149 virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof);
b2340bbf 150 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z){
fc743205 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;}
3dbb2c95 153 virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z,Double_t &t){
b2340bbf 154 // Returns particle 3 position and the time of flight at this hit
155 // in local coordinates.
3dbb2c95 156 Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;t=tf;}
593d2ea1 157 virtual Float_t GetXL();
b2340bbf 158 // Returns particle X position at this hit in local coordinates.
593d2ea1 159 virtual Float_t GetYL();
b2340bbf 160 // Returns particle Y position at this hit in local coordinates.
593d2ea1 161 virtual Float_t GetZL();
b2340bbf 162 // Returns particle Z position at this hit in local coordinates.
58005f18 163 // Get Monti Carlo information about hit.
3dbb2c95 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.
172 return fPx;}
173 virtual Float_t GetPYG()const {// Returns particle Y momentum at
174 // this hit in global coordinates.
175 return fPy;}
176 virtual Float_t GetPZG()const {// Returns particle Z momentum at
177 // this hit in global coordinates.
178 return fPz;}
593d2ea1 179 virtual void GetMomentumL(Float_t &px,Float_t &py,Float_t &pz);
b2340bbf 180 virtual void GetMomentumL(Double_t &px,Double_t &py,Double_t &pz){
fc743205 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;}
fc743205 183
b2340bbf 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.
3dbb2c95 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);
fc743205 209
210 protected:
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
593d2ea1 220
58005f18 221 ClassDef(AliITShit,1) //Hits object for set:ITS
fc743205 222
3dbb2c95 223};
224// Input and output function for standard C++ input/output.
e11d9a3a 225ostream& operator<<(ostream &os,AliITShit &source);
226istream& operator>>(istream &os,AliITShit &source);
58005f18 227
228#endif