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