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