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