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