]>
Commit | Line | Data |
---|---|---|
73042f01 | 1 | #ifndef ALITPC_H |
2 | #define ALITPC_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$ */ | |
7 | ||
fe4da5cc | 8 | //////////////////////////////////////////////// |
9 | // Manager class for TPC // | |
10 | //////////////////////////////////////////////// | |
fe4da5cc | 11 | #include "AliDetector.h" |
12 | #include "AliHit.h" | |
13 | #include "AliDigit.h" | |
9bdd974b | 14 | //#include "TLorentzVector.h" |
da33556f | 15 | |
9bdd974b | 16 | //#include "AliTPCLoader.h" |
fe4da5cc | 17 | |
73042f01 | 18 | |
2b06d5c3 | 19 | class TMatrix; |
de61d5d5 | 20 | class AliTPCFastMatrix; //MI change |
21 | class AliTPCFastVector; //MI change | |
22 | ||
2b06d5c3 | 23 | class TTree; |
cc80f89e | 24 | |
2b06d5c3 | 25 | class TFile; |
26 | class AliTPCParam; | |
cc80f89e | 27 | class AliTPCDigitsArray; |
28 | class AliTPCClustersArray; | |
792bb11c | 29 | class AliTPCTrackHitsV2; // M.I. |
30 | class AliTPCTrackHits; // M.I. -MI4 old hits - to be removed later | |
9bdd974b | 31 | //class TLorentzVector; |
32 | class AliTPCLoader; | |
792bb11c | 33 | |
fe4da5cc | 34 | |
35 | class AliTPC : public AliDetector { | |
1283eee5 | 36 | |
fe4da5cc | 37 | public: |
9bdd974b | 38 | AliTPC(); |
fe4da5cc | 39 | AliTPC(const char *name, const char *title); |
9bdd974b | 40 | AliTPC(const AliTPC& t); |
88cb7938 | 41 | |
42 | virtual AliLoader* MakeLoader(const char* topfoldername); | |
43 | ||
fe4da5cc | 44 | virtual ~AliTPC(); |
73042f01 | 45 | virtual void AddHit(Int_t a1, Int_t *a2, Float_t *a3); |
9bdd974b | 46 | Int_t DistancetoPrimitive(Int_t px, Int_t py) const; |
fe4da5cc | 47 | virtual void BuildGeometry(); |
48 | virtual void CreateGeometry() {} | |
49 | virtual void CreateMaterials(); | |
c630aafd | 50 | virtual void Hits2Clusters(Int_t eventn=0); |
cc80f89e | 51 | virtual void Hits2ExactClustersSector(Int_t isec); // MI change calculate "exact" cluster position |
0a61bf9d | 52 | |
9bdd974b | 53 | virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; |
0a61bf9d | 54 | virtual void SDigits2Digits(){;} //MI change -cycling to production |
55 | virtual void SDigits2Digits2(Int_t eventnumber=0); | |
56 | ||
57 | virtual void Hits2SDigits(); // MI - cycling around | |
58 | virtual void Hits2SDigits2(Int_t eventnumber=0); | |
59 | ||
a62d28a2 | 60 | virtual void Digits2Reco(Int_t firstevent=0,Int_t lastevent=0); |
85a5290f | 61 | virtual void Hits2Digits(); |
62 | virtual void Hits2Digits(Int_t eventnumber); //MI change | |
2ab0c725 | 63 | virtual void Hits2DigitsSector(Int_t isec); //MI change |
fe4da5cc | 64 | virtual void Init(); |
65 | virtual Int_t IsVersion() const =0; | |
9bdd974b | 66 | virtual void Digits2Clusters(Int_t eventnumber=0) const; |
67 | virtual void Clusters2Tracks() const; | |
cc80f89e | 68 | |
0421c3d1 | 69 | virtual void Digits2Raw(); |
70 | ||
9bdd974b | 71 | Int_t GetNsectors() const {return fNsectors;} |
88cb7938 | 72 | virtual void MakeBranch(Option_t *opt=" "); |
fe4da5cc | 73 | virtual void ResetDigits(); |
74 | virtual void SetSecAL(Int_t sec); | |
75 | virtual void SetSecAU(Int_t sec); | |
76 | virtual void SetSecLows(Int_t s1,Int_t s2,Int_t s3,Int_t s4,Int_t s5, Int_t s6); | |
77 | virtual void SetSecUps (Int_t s1,Int_t s2,Int_t s3,Int_t s4,Int_t s5, Int_t s6, | |
88cb7938 | 78 | Int_t s7,Int_t s8,Int_t s9,Int_t s10, Int_t s11, Int_t s12); |
fe4da5cc | 79 | virtual void SetSens(Int_t sens); |
cc80f89e | 80 | |
4b0fdcad | 81 | |
82 | virtual void SetSide(Float_t side); | |
1283eee5 | 83 | virtual void SetGasMixt(Int_t nc,Int_t c1,Int_t c2,Int_t c3,Float_t p1, |
84 | Float_t p2,Float_t p3); | |
85 | ||
fe4da5cc | 86 | virtual void StepManager()=0; |
8c555625 | 87 | virtual void DrawDetector() {} |
cc80f89e | 88 | AliTPCDigitsArray* GetDigitsArray() {return fDigitsArray;} //MI change |
89 | AliTPCClustersArray* GetClustersArray(){return fClustersArray;} //MI change | |
90 | AliTPCParam *GetParam(){return fTPCParam;} // M.K, M.I changes | |
91 | void SetParam(AliTPCParam *param){fTPCParam=param;} // M.K, M.I changes | |
92 | void SetDigitsArray(AliTPCDigitsArray* param) {fDigitsArray=param;} //MI change | |
93 | void SetClustersArray(AliTPCClustersArray *clusters) {fClustersArray = clusters;} //MI change | |
39c8eb58 | 94 | |
95 | // additional function neccesary for the new hits | |
9e1a0ddb | 96 | virtual void MakeBranch2(Option_t *opt=" ", const char *file=0); // |
39c8eb58 | 97 | virtual void SetTreeAddress(); |
98 | virtual void SetTreeAddress2(); | |
99 | virtual void AddHit2(Int_t a1, Int_t *a2, Float_t *a3); // | |
100 | virtual void ResetHits(); | |
101 | virtual void ResetHits2(); | |
102 | virtual AliHit* FirstHit(Int_t track); | |
103 | virtual AliHit* NextHit(); | |
104 | virtual AliHit* FirstHit2(Int_t track); | |
105 | virtual AliHit* NextHit2(); | |
39c8eb58 | 106 | virtual void LoadPoints(Int_t dummy); |
107 | virtual void LoadPoints2(Int_t dummy); | |
108 | virtual void LoadPoints3(Int_t dumy); | |
109 | virtual void FinishPrimary(); | |
110 | virtual void RemapTrackHitIDs(Int_t *map); | |
111 | virtual void FindTrackHitsIntersection(TClonesArray * arr); | |
112 | //fill clones array with intersection of current point with the | |
113 | //middle of the row | |
114 | void SetHitType(Int_t type){fHitType =type;} //set type of hit container | |
f8cf550c | 115 | void SetDigitsSwitch(Int_t sw){fDigitsSwitch = sw;} |
afc42102 | 116 | void SetDefSwitch(Int_t def){fDefaults = def;} |
407ff276 | 117 | Float_t GetNoise(); //get Current noise |
118 | void GenerNoise(Int_t tablasize); // make noise table | |
9bdd974b | 119 | Bool_t IsSectorActive(Int_t sec) const; // check if the sector is active |
792bb11c | 120 | void SetActiveSectors(Int_t * sectors, Int_t n); //set active sectors |
9bdd974b | 121 | Int_t GetHitType() const {return fHitType;} |
12d8d654 | 122 | void SetActiveSectors(Int_t flag=0); //loop over al hits and set active only hitted sectors |
42157e55 | 123 | |
124 | // static functions | |
9bdd974b | 125 | static AliTPCParam* LoadTPCParam(TFile *file); |
126 | protected: | |
127 | Int_t fDefaults; // defaults switch | |
128 | Int_t fSens; // ISENS | |
129 | Int_t fSecAL; // Upper sector selector | |
130 | Int_t fSecAU; // Lower sector selector | |
131 | Int_t fSecLows[6]; // List of lower sectors selected | |
132 | Int_t fSecUps[12]; // List of upper sectors selected | |
133 | Int_t fNsectors; // Number of sectors in TPC | |
134 | //MI changes | |
135 | AliTPCDigitsArray * fDigitsArray; //!detector digit object | |
136 | AliTPCClustersArray * fClustersArray; //!detector cluster object | |
137 | AliTPCParam *fTPCParam; // pointer to TPC parameters | |
138 | AliTPCTrackHitsV2 *fTrackHits; //!hits for given track M.I. | |
139 | AliTPCTrackHits *fTrackHitsOld; //!hits for given track M.I. MIold - | |
140 | ||
141 | Int_t fHitType; // if fNewHit = 1 old data structure if 2 new hits if 4 old MI stucture | |
142 | // 3 both types | |
143 | Int_t fDigitsSwitch; // digits type, 0->normal, 1->summable | |
144 | ||
145 | //MK changes | |
146 | ||
147 | Float_t fSide; // selects left(-1), right(+1), or both(0) sides of the TPC | |
148 | Int_t fNoComp; // number of a drift gas components | |
149 | Int_t fMixtComp[3]; // drift gas components | |
150 | Float_t fMixtProp[3]; // mixture proportions | |
42157e55 | 151 | |
152 | private: | |
fe4da5cc | 153 | // |
792bb11c | 154 | Bool_t TrackInVolume(Int_t id,Int_t track); //return true if current track is in volume |
afc42102 | 155 | void SetDefaults(); |
8c555625 | 156 | void DigitizeRow(Int_t irow,Int_t isec,TObjArray **rowTriplet); |
de61d5d5 | 157 | Float_t GetSignal(TObjArray *p1, Int_t ntr, AliTPCFastMatrix *m1, |
158 | AliTPCFastMatrix *m2,Int_t *IndexRange); | |
159 | void GetList (Float_t label,Int_t np,AliTPCFastMatrix *m,Int_t *IndexRange, | |
8c555625 | 160 | Float_t **pList); |
161 | void MakeSector(Int_t isec,Int_t nrows,TTree *TH,Stat_t ntracks,TObjArray **row); | |
cc80f89e | 162 | void TransportElectron(Float_t *xyz, Int_t *index); |
163 | Int_t fCurrentIndex[4];// index[0] indicates coordinate system, | |
164 | // index[1] sector number, | |
165 | // index[2] pad row number | |
166 | // index[3] pad row number for which signal is calculated | |
407ff276 | 167 | Int_t fNoiseDepth; //!noise table |
168 | Float_t * fNoiseTable; //![fNoiseDepth] table with noise | |
169 | Int_t fCurrentNoise; //!index of the noise in the noise table | |
792bb11c | 170 | Bool_t* fActiveSectors; //!bool indicating which sectors are active |
407ff276 | 171 | |
88cb7938 | 172 | ClassDef(AliTPC,10) // Time Projection Chamber class |
fe4da5cc | 173 | }; |
174 | ||
fe4da5cc | 175 | |
176 | //_____________________________________________________________________________ | |
177 | ||
178 | class AliTPCdigit : public AliDigit { | |
179 | public: | |
180 | Int_t fSector; //array of volumes | |
181 | Int_t fPadRow; //Row number | |
182 | Int_t fPad ; //Pad number | |
183 | Int_t fTime; //Time bucket | |
184 | Int_t fSignal; //Signal amplitude | |
185 | ||
186 | public: | |
187 | AliTPCdigit() {} | |
188 | AliTPCdigit(Int_t *tracks, Int_t *digits); | |
189 | virtual ~AliTPCdigit() {} | |
190 | ||
191 | ClassDef(AliTPCdigit,1) // Time Projection Chamber digits | |
192 | }; | |
193 | ||
194 | ||
195 | //_____________________________________________________________________________ | |
196 | ||
197 | class AliTPChit : public AliHit { | |
198 | public: | |
199 | Int_t fSector; //sector number | |
200 | Int_t fPadRow; //Pad Row number | |
201 | Float_t fQ ; //charge | |
202 | ||
203 | public: | |
204 | AliTPChit() {} | |
205 | AliTPChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits); | |
206 | virtual ~AliTPChit() {} | |
39c8eb58 | 207 | void SetX(Float_t x){fX = x;} |
208 | void SetY(Float_t y){fY = y;} | |
209 | void SetZ(Float_t z){fZ = z;} | |
fe4da5cc | 210 | |
211 | ClassDef(AliTPChit,1) // Time Projection Chamber hits | |
212 | }; | |
3c0f9266 | 213 | |
73042f01 | 214 | #endif |
fe4da5cc | 215 | |
fe4da5cc | 216 | |
3c0f9266 | 217 | |
fe4da5cc | 218 | |
fe4da5cc | 219 | |
fe4da5cc | 220 | |
fe4da5cc | 221 | |
fe4da5cc | 222 | |
fe4da5cc | 223 |