]>
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 | //////////////////////////////////////////////// | |
de61d5d5 | 11 | |
243c2276 | 12 | class TFile; |
2b06d5c3 | 13 | class TTree; |
9edefa04 | 14 | #include <Htypes.h> |
243c2276 | 15 | #include <TMatrixFfwd.h> |
16 | #include <TVector.h> | |
cc80f89e | 17 | |
18 | class AliTPCDigitsArray; | |
9bdd974b | 19 | class AliTPCLoader; |
243c2276 | 20 | class AliTPCParam; |
243c2276 | 21 | class AliTPCTrackHitsV2; // M.I. |
bc807150 | 22 | class AliRawReader; |
ffe71a14 | 23 | class TTreeSRedirector; |
24 | ||
243c2276 | 25 | #include "AliDetector.h" |
26 | #include "AliDigit.h" | |
27 | #include "AliHit.h" | |
792bb11c | 28 | |
fe4da5cc | 29 | |
30 | class AliTPC : public AliDetector { | |
1283eee5 | 31 | |
fe4da5cc | 32 | public: |
9bdd974b | 33 | AliTPC(); |
fe4da5cc | 34 | AliTPC(const char *name, const char *title); |
88cb7938 | 35 | |
36 | virtual AliLoader* MakeLoader(const char* topfoldername); | |
0f2ff24c | 37 | void CreateDebugStremer(); |
fe4da5cc | 38 | virtual ~AliTPC(); |
73042f01 | 39 | virtual void AddHit(Int_t a1, Int_t *a2, Float_t *a3); |
fe4da5cc | 40 | virtual void CreateGeometry() {} |
41 | virtual void CreateMaterials(); | |
65293f49 | 42 | virtual void AddAlignableVolumes() const {} |
0a61bf9d | 43 | |
9bdd974b | 44 | virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; |
0a61bf9d | 45 | virtual void SDigits2Digits(){;} //MI change -cycling to production |
46 | virtual void SDigits2Digits2(Int_t eventnumber=0); | |
47 | ||
48 | virtual void Hits2SDigits(); // MI - cycling around | |
49 | virtual void Hits2SDigits2(Int_t eventnumber=0); | |
50 | ||
85a5290f | 51 | virtual void Hits2Digits(); |
52 | virtual void Hits2Digits(Int_t eventnumber); //MI change | |
2ab0c725 | 53 | virtual void Hits2DigitsSector(Int_t isec); //MI change |
fe4da5cc | 54 | virtual void Init(); |
55 | virtual Int_t IsVersion() const =0; | |
0421c3d1 | 56 | virtual void Digits2Raw(); |
bc807150 | 57 | virtual Bool_t Raw2SDigits(AliRawReader* rawReader); |
9bdd974b | 58 | Int_t GetNsectors() const {return fNsectors;} |
fe4da5cc | 59 | virtual void ResetDigits(); |
fe4da5cc | 60 | virtual void SetSens(Int_t sens); |
4b0fdcad | 61 | virtual void SetSide(Float_t side); |
c1637e41 | 62 | |
1283eee5 | 63 | |
fe4da5cc | 64 | virtual void StepManager()=0; |
99dcb142 | 65 | virtual void DrawDetector() const {} |
cc80f89e | 66 | AliTPCDigitsArray* GetDigitsArray() {return fDigitsArray;} //MI change |
cc80f89e | 67 | AliTPCParam *GetParam(){return fTPCParam;} // M.K, M.I changes |
68 | void SetParam(AliTPCParam *param){fTPCParam=param;} // M.K, M.I changes | |
69 | void SetDigitsArray(AliTPCDigitsArray* param) {fDigitsArray=param;} //MI change | |
39c8eb58 | 70 | |
71 | // additional function neccesary for the new hits | |
a6005888 | 72 | virtual void MakeBranch(Option_t *opt=" "); // |
39c8eb58 | 73 | virtual void SetTreeAddress(); |
74 | virtual void SetTreeAddress2(); | |
75 | virtual void AddHit2(Int_t a1, Int_t *a2, Float_t *a3); // | |
76 | virtual void ResetHits(); | |
77 | virtual void ResetHits2(); | |
78 | virtual AliHit* FirstHit(Int_t track); | |
79 | virtual AliHit* NextHit(); | |
80 | virtual AliHit* FirstHit2(Int_t track); | |
81 | virtual AliHit* NextHit2(); | |
39c8eb58 | 82 | virtual void FinishPrimary(); |
83 | virtual void RemapTrackHitIDs(Int_t *map); | |
39c8eb58 | 84 | void SetHitType(Int_t type){fHitType =type;} //set type of hit container |
f8cf550c | 85 | void SetDigitsSwitch(Int_t sw){fDigitsSwitch = sw;} |
afc42102 | 86 | void SetDefSwitch(Int_t def){fDefaults = def;} |
407ff276 | 87 | Float_t GetNoise(); //get Current noise |
88 | void GenerNoise(Int_t tablasize); // make noise table | |
9bdd974b | 89 | Bool_t IsSectorActive(Int_t sec) const; // check if the sector is active |
792bb11c | 90 | void SetActiveSectors(Int_t * sectors, Int_t n); //set active sectors |
9bdd974b | 91 | Int_t GetHitType() const {return fHitType;} |
0739509a | 92 | void SetActiveSectors(Int_t flag=1); //loop over al hits and set active only hitted sectors |
6d75e4b6 | 93 | Bool_t TrackInVolume(Int_t id,Int_t track); //return true if current track is in volume |
b97617a6 | 94 | void SetPrimaryIonisation(Bool_t flag = kTRUE) {fPrimaryIonisation = flag;} |
8261c673 | 95 | void SetGainFactor(Float_t gain){fGainFactor=gain;} //gas gain scaling factor |
96 | Float_t GetGainFactor()const {return fGainFactor;}//gas gain scaling factor | |
f546a4b4 | 97 | // LHC clock phase switch 0 - no phase, 1 - random, 2 - from the OCDB |
98 | void SetLHCclockPhase(Int_t sw){fLHCclockPhaseSw = sw;} | |
42157e55 | 99 | // static functions |
9bdd974b | 100 | static AliTPCParam* LoadTPCParam(TFile *file); |
101 | protected: | |
102 | Int_t fDefaults; // defaults switch | |
103 | Int_t fSens; // ISENS | |
9bdd974b | 104 | Int_t fNsectors; // Number of sectors in TPC |
105 | //MI changes | |
9ff4af81 | 106 | AliTPCDigitsArray * fDigitsArray; //! detector digit object |
9bdd974b | 107 | AliTPCParam *fTPCParam; // pointer to TPC parameters |
9ff4af81 | 108 | AliTPCTrackHitsV2 *fTrackHits; //! hits for given track M.I. |
109 | // AliTPCTrackHits *fTrackHitsOld; //! hits for given track M.I. MIold - | |
9bdd974b | 110 | |
111 | Int_t fHitType; // if fNewHit = 1 old data structure if 2 new hits if 4 old MI stucture | |
112 | // 3 both types | |
113 | Int_t fDigitsSwitch; // digits type, 0->normal, 1->summable | |
114 | ||
115 | //MK changes | |
116 | ||
117 | Float_t fSide; // selects left(-1), right(+1), or both(0) sides of the TPC | |
b97617a6 | 118 | Bool_t fPrimaryIonisation; //switch between Fluka(true) and geant3(false) |
0f2ff24c | 119 | protected: |
e939a978 | 120 | AliTPC(const AliTPC& t); |
121 | AliTPC &operator = (const AliTPC & param); | |
fe4da5cc | 122 | // |
afc42102 | 123 | void SetDefaults(); |
8c555625 | 124 | void DigitizeRow(Int_t irow,Int_t isec,TObjArray **rowTriplet); |
e8d02863 | 125 | Float_t GetSignal(TObjArray *p1, Int_t ntr, TMatrixF *m1, |
126 | TMatrixF *m2,Int_t *IndexRange); | |
127 | void GetList (Float_t label,Int_t np,TMatrixF *m,Int_t *IndexRange, | |
8c555625 | 128 | Float_t **pList); |
129 | void MakeSector(Int_t isec,Int_t nrows,TTree *TH,Stat_t ntracks,TObjArray **row); | |
cc80f89e | 130 | void TransportElectron(Float_t *xyz, Int_t *index); |
131 | Int_t fCurrentIndex[4];// index[0] indicates coordinate system, | |
132 | // index[1] sector number, | |
133 | // index[2] pad row number | |
134 | // index[3] pad row number for which signal is calculated | |
9ff4af81 | 135 | Int_t fNoiseDepth; //! noise table |
136 | Float_t * fNoiseTable; //! table with noise | |
137 | Int_t fCurrentNoise; //! index of the noise in the noise table | |
138 | Bool_t* fActiveSectors; //! bool indicating which sectors are active | |
8261c673 | 139 | Float_t fGainFactor; // scaling factor |
ffe71a14 | 140 | TTreeSRedirector *fDebugStreamer; //!debug streamer |
f546a4b4 | 141 | Int_t fLHCclockPhaseSw; //! lhc clock phase switch |
142 | ClassDef(AliTPC,14) // Time Projection Chamber class | |
fe4da5cc | 143 | }; |
144 | ||
fe4da5cc | 145 | |
fe4da5cc | 146 | //_____________________________________________________________________________ |
147 | ||
148 | class AliTPChit : public AliHit { | |
149 | public: | |
150 | Int_t fSector; //sector number | |
151 | Int_t fPadRow; //Pad Row number | |
152 | Float_t fQ ; //charge | |
e61fd20d | 153 | Float_t fTime; //hit time |
fe4da5cc | 154 | |
155 | public: | |
179c6296 | 156 | AliTPChit(); |
fe4da5cc | 157 | AliTPChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits); |
158 | virtual ~AliTPChit() {} | |
39c8eb58 | 159 | void SetX(Float_t x){fX = x;} |
160 | void SetY(Float_t y){fY = y;} | |
161 | void SetZ(Float_t z){fZ = z;} | |
e61fd20d | 162 | |
163 | Float_t Time() const {return fTime;} | |
fe4da5cc | 164 | |
b97617a6 | 165 | ClassDef(AliTPChit,3) // Time Projection Chamber hits |
fe4da5cc | 166 | }; |
3c0f9266 | 167 | |
6d75e4b6 | 168 | |
73042f01 | 169 | #endif |
fe4da5cc | 170 | |
fe4da5cc | 171 | |
3c0f9266 | 172 | |
fe4da5cc | 173 | |
fe4da5cc | 174 | |
fe4da5cc | 175 | |
fe4da5cc | 176 | |
fe4da5cc | 177 | |
fe4da5cc | 178 |