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