]>
Commit | Line | Data |
---|---|---|
022e76c3 | 1 | #ifndef ALITRDFEEPARAM_H |
2 | #define ALITRDFEEPARAM_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
bf397f30 | 6 | /* $Id$ */ |
022e76c3 | 7 | |
acc49af9 | 8 | //////////////////////////////////////////////////////////////////////////// |
9 | // // | |
10 | // TRD front end electronics parameters class // | |
11 | // Contains all FEE (MCM, TRAP, PASA) related // | |
12 | // parameters, constants, and mapping. // | |
13 | // // | |
14 | // Author: // | |
15 | // Ken Oyama (oyama@physi.uni-heidelberg.de) // | |
16 | // // | |
17 | //////////////////////////////////////////////////////////////////////////// | |
022e76c3 | 18 | |
19 | #include <TObject.h> | |
20 | ||
ba84a3e3 | 21 | class TRootIoCtor; |
22 | ||
022e76c3 | 23 | class AliTRDCommonParam; |
24 | class AliTRDpadPlane; | |
25 | class AliTRDgeometry; | |
26 | ||
27 | //_____________________________________________________________________________ | |
28 | class AliTRDfeeParam : public TObject | |
29 | { | |
30 | ||
31 | public: | |
32 | ||
ba84a3e3 | 33 | AliTRDfeeParam(TRootIoCtor *); |
022e76c3 | 34 | AliTRDfeeParam(const AliTRDfeeParam &p); |
35 | virtual ~AliTRDfeeParam(); | |
36 | AliTRDfeeParam &operator=(const AliTRDfeeParam &p); | |
37 | virtual void Copy(TObject &p) const; | |
38 | ||
39 | static AliTRDfeeParam *Instance(); // Singleton | |
40 | static void Terminate(); | |
41 | ||
42 | // Translation from MCM to Pad and vice versa | |
43 | virtual Int_t GetPadRowFromMCM(Int_t irob, Int_t imcm) const; | |
44 | virtual Int_t GetPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const; | |
45 | virtual Int_t GetMCMfromPad(Int_t irow, Int_t icol) const; | |
46 | virtual Int_t GetROBfromPad(Int_t irow, Int_t icol) const; | |
47 | virtual Int_t GetRobSide(Int_t irob) const; | |
48 | virtual Int_t GetColSide(Int_t icol) const; | |
49 | ||
50 | static Float_t GetSamplingFrequency() { return (Float_t)fgkLHCfrequency / 4000000.0; } | |
acc49af9 | 51 | static Int_t GetNmcmRob() { return fgkNmcmRob; } |
022e76c3 | 52 | static Int_t GetNmcmRobInRow() { return fgkNmcmRobInRow; } |
53 | static Int_t GetNmcmRobInCol() { return fgkNmcmRobInCol; } | |
acc49af9 | 54 | static Int_t GetNrobC0() { return fgkNrobC0; } |
55 | static Int_t GetNrobC1() { return fgkNrobC1; } | |
56 | static Int_t GetNadcMcm() { return fgkNadcMcm; } | |
57 | // static Int_t GetNtimebin() { return fgkNtimebin; } | |
58 | static Int_t GetNcol() { return fgkNcol; } | |
59 | static Int_t GetNcolMcm() { return fgkNcolMcm; } | |
60 | static Int_t GetNrowC0() { return fgkNrowC0; } | |
61 | static Int_t GetNrowC1() { return fgkNrowC1; } | |
62 | ||
63 | // static Int_t GetADCpedestal() { return fgkADCpedestal; } | |
64 | // static Int_t GetADCnoise() { return fgkADCnoise; } | |
65 | static Int_t GetADCDAC() { return fgkADCDAC; } | |
66 | ||
67 | static Bool_t IsPFon() { return fgkPFon; } | |
68 | static Bool_t IsGFon() { return fgkGFon; } | |
69 | static Bool_t IsTFon() { return fgkTFon; } | |
70 | ||
71 | static Int_t GetPFtimeConstant() { return fgkPFtimeConstant; } | |
72 | static Int_t GetPFeffectPedestal() { return fgkPFeffectPedestal; } | |
dfd03fc3 | 73 | |
1d93b218 | 74 | //new |
75 | static Int_t GetQacc0Start() { return fgkPREPqAcc0Start; } | |
76 | static Int_t GetQacc0End() { return fgkPREPqAcc0End; } | |
77 | static Int_t GetQacc1Start() { return fgkPREPqAcc1Start; } | |
78 | static Int_t GetQacc1End() { return fgkPREPqAcc1End; } | |
79 | Float_t GetMinClusterCharge() const { return fgkMinClusterCharge; } | |
80 | static Int_t GetLinearFitStart() { return fgkPREPLinearFitStart; } | |
81 | static Int_t GetLinearFitEnd() { return fgkPREPLinearFitEnd; } | |
82 | ||
ecf39416 | 83 | // Float_t GetClusThr() { return fClusThr; }; |
022e76c3 | 84 | // Float_t GetPadThr() const { return fPadThr; }; |
85 | // Int_t GetTailCancelation() const { return fTCOn; }; | |
86 | // Int_t GetNexponential() const { return fTCnexp; }; | |
87 | //virtual void GetFilterParam(Float_t &r1, Float_t &r2, Float_t &c1, Float_t &c2, Float_t &ped) const; | |
88 | // Int_t GetFilterType() const { return fFilterType; }; | |
89 | ||
acc49af9 | 90 | static Int_t GetTFtype() { return fgkTFtype; } |
f2979d08 | 91 | //static Int_t GetTFnExp() { return fgkTFnExp; } |
92 | Int_t GetTFnExp() { return fTFnExp; } | |
acc49af9 | 93 | Float_t GetTFr1() const { return fTFr1; } |
94 | Float_t GetTFr2() const { return fTFr2; } | |
95 | Float_t GetTFc1() const { return fTFc1; } | |
96 | Float_t GetTFc2() const { return fTFc2; } | |
dfd03fc3 | 97 | |
1d93b218 | 98 | // for tracklets |
99 | Bool_t GetTracklet() const { return fgkTracklet; } | |
100 | Int_t GetMaxNrOfTracklets() const { return fgkMaxNrOfTracklets; } | |
96e6312d | 101 | Bool_t GetMCTrackletOutput() const { return fgkMCTrackletOutput; } |
1d93b218 | 102 | |
acc49af9 | 103 | static Float_t GetTFattPar() { return ((Float_t) fgkTFattPar1) / ((Float_t) fgkTFattPar2); } |
104 | Float_t GetTFf0() const { return 1.0 + fgkTFon*(-1.0+GetTFattPar()); } // 1 if TC off | |
2ec0bacc | 105 | |
106 | void SetEBsglIndThr(Int_t val); | |
acc49af9 | 107 | Int_t GetEBsglIndThr() const { return fEBsglIndThr; } |
2ec0bacc | 108 | |
109 | void SetEBsumIndThr(Int_t val); | |
acc49af9 | 110 | Int_t GetEBsumIndThr() const { return fEBsumIndThr; } |
2ec0bacc | 111 | |
112 | void SetEBindLUT(Int_t val); | |
acc49af9 | 113 | Int_t GetEBindLUT() const { return fEBindLUT; } |
2ec0bacc | 114 | |
115 | void SetEBignoreNeighbour(Int_t val); | |
acc49af9 | 116 | Int_t GetEBignoreNeighbour() const { return fEBignoreNeighbour; } |
dfd03fc3 | 117 | |
ecf39416 | 118 | // Concerning raw data format |
acc49af9 | 119 | Int_t GetRAWversion() const { return fRAWversion; } |
ecf39416 | 120 | void SetRAWversion( Int_t rawver ); |
acc49af9 | 121 | Bool_t GetRAWstoreRaw() const { return fRAWstoreRaw; } |
122 | void SetRAWstoreRaw( Bool_t storeraw ) { fRAWstoreRaw = storeraw; } | |
022e76c3 | 123 | |
f2979d08 | 124 | void SetXenon(); |
125 | void SetArgon(); | |
126 | ||
022e76c3 | 127 | protected: |
128 | ||
acc49af9 | 129 | static AliTRDfeeParam *fgInstance; // Singleton instance |
130 | static Bool_t fgTerminated; // Defines if this class has already been terminated | |
022e76c3 | 131 | |
acc49af9 | 132 | AliTRDCommonParam *fCP; // TRD common parameters class |
022e76c3 | 133 | |
134 | // Remark: ISO C++ allows initialization of static const values only for integer. | |
135 | ||
136 | // Basic Geometrical numbers | |
137 | static const Int_t fgkLHCfrequency = 40079000 ; // [Hz] LHC clock (should be moved to STEER?) | |
138 | static const Int_t fgkNmcmRob = 16; // Number of MCMs per ROB (old fgkMCMmax) | |
139 | static const Int_t fgkNmcmRobInRow = 4; // Number of MCMs per ROB in row dir. (old fgkMCMrow) | |
140 | static const Int_t fgkNmcmRobInCol = 4; // Number of MCMs per ROB in col dir. (old fgkMCMrow) | |
141 | static const Int_t fgkNrobC0 = 6; // Number of ROBs per C0 chamber (old fgkROBmaxC0) | |
142 | static const Int_t fgkNrobC1 = 8; // Number of ROBs per C1 chamber (old fgkROBmaxC1) | |
143 | static const Int_t fgkNadcMcm = 21; // Number of ADC channels per MCM (old fgkADCmax) | |
ecf39416 | 144 | // static const Int_t fgkNtimebin = 24; // Number of Time bins should come from calibDB |
022e76c3 | 145 | static const Int_t fgkNcol = 144; // Number of pads per padplane row(old fgkColmax) |
146 | static const Int_t fgkNcolMcm = 18; // Number of pads per MCM (old fgkPadmax) | |
147 | static const Int_t fgkNrowC0 = 12; // Number of Rows per C0 chamber (old fgkRowmaxC0) | |
148 | static const Int_t fgkNrowC1 = 16; // Number of Rows per C1 chamber (old fgkRowmaxC1) | |
149 | ||
150 | // ADC intrinsic parameters | |
022e76c3 | 151 | static const Int_t fgkADCDAC = 0; // 5 bit ADC gain parameter |
152 | ||
153 | // TRAP filter global setup | |
154 | static const Bool_t fgkPFon = kTRUE; // Pedestal Filter enable/disable flag. | |
155 | static const Bool_t fgkGFon = kFALSE; // Gain correction Filter enable/disable flag | |
156 | static const Bool_t fgkTFon = kTRUE; // Tail cancelation Filter enable/disable flag (old name fTCOn) | |
157 | ||
158 | // PF setup | |
acc49af9 | 159 | static const Int_t fgkPFtimeConstant = 0; // 0 for fastest, 3 for slowest (no effect, probably) |
160 | static const Int_t fgkPFeffectPedestal = 10; // [in ADC units] the desired baseline (Additive) | |
022e76c3 | 161 | |
162 | // GF setup | |
acc49af9 | 163 | static const Int_t fgkGFnoise = 0; // Noise level increased by gain filter x 100 [in ADC] (to be measured) |
022e76c3 | 164 | |
165 | // TF setup | |
1d93b218 | 166 | static const Int_t fgkTFtype = 1; // TC type (0=analog, 1=digital, 2=MI, 3=close to electronics) (old name fFilterType) |
dfd03fc3 | 167 | |
168 | // OLD TF setup (calculated from above) (valid only for fgkTFsimType = 0 or 1) | |
f2979d08 | 169 | //static const Int_t fgkTFnExp = 1; // Number of exponential for simType 0 and 1 |
96e6312d | 170 | Int_t fTFnExp; // Number of exponential for simType 0 and 1 |
dfd03fc3 | 171 | |
1d93b218 | 172 | // Tracklet processing on/off |
173 | static const Bool_t fgkTracklet = kFALSE; // default should be kFALSE | |
174 | ||
175 | // max. nr of tracklet words for one mcm | |
176 | static const Int_t fgkMaxNrOfTracklets = 4; | |
177 | ||
96e6312d | 178 | // additional tracklet folder structure output, containing all necessary Monte Carlo information; maybe this should go somewhere else; |
179 | static const Bool_t fgkMCTrackletOutput = kTRUE; // default should be kTRUE | |
180 | ||
dfd03fc3 | 181 | // following need Instance because initialized in constructor |
acc49af9 | 182 | Float_t fTFr1; // Time constant [us] long (old name fR1) |
183 | Float_t fTFr2; // Time constant [us] short(old name fR2) | |
184 | Float_t fTFc1; // Weight long (old name fC1) | |
185 | Float_t fTFc2; // Weight short (old name fC2) | |
dfd03fc3 | 186 | |
187 | // here is for TRAP simulation (not yet used) | |
acc49af9 | 188 | static const Int_t fgkTFdecayWeightL = 270; // 0 to 1024 corresponds to 0 to 0.5 |
189 | static const Int_t fgkTFdecayParL = 348; // 0 to 511 corresponds to 0.75 to 1 | |
190 | static const Int_t fgkTFdecayParS = 449; // 0 to 511 correponds to 0.25 to 0.5 | |
191 | static const Int_t fgkTFattPar1 = 45; // attenuationParameter = fgkTFattenuationParameter1/fgkTFattenuationParameter2 | |
192 | static const Int_t fgkTFattPar2 = 14; // = -alphaL/ln(lambdaL)-(1-alphaL)/ln(lambdaS) | |
dfd03fc3 | 193 | |
194 | // ZS parameters | |
acc49af9 | 195 | Int_t fEBsglIndThr; // EBIS in ADC units |
196 | Int_t fEBsumIndThr; // EBIT in ADC units | |
197 | Int_t fEBindLUT; // EBIL lookup table | |
198 | Int_t fEBignoreNeighbour; // EBIN 0:include neighbor | |
022e76c3 | 199 | |
200 | // Charge accumulators | |
1d93b218 | 201 | static const Int_t fgkPREPqAcc0Start = 5; // Preprocessor Charge Accumulator 0 Start |
acc49af9 | 202 | static const Int_t fgkPREPqAcc0End = 10; // Preprocessor Charge Accumulator 0 End |
203 | static const Int_t fgkPREPqAcc1Start = 11; // Preprocessor Charge Accumulator 1 Start | |
204 | static const Int_t fgkPREPqAcc1End = 20; // Preprocessor Charge Accumulator 1 End | |
205 | static const Int_t fgkMinClusterCharge = 20; // Hit detection [in ADC units] | |
022e76c3 | 206 | |
1d93b218 | 207 | //new |
208 | //time constants for linear fit | |
209 | static const Int_t fgkPREPLinearFitStart = 5; | |
210 | static const Int_t fgkPREPLinearFitEnd = 20; | |
211 | ||
212 | ||
213 | ||
022e76c3 | 214 | // OLD TRAP processing parameters calculated from above |
acc49af9 | 215 | //static const Float_t fClusThr; // Cluster threshold |
216 | //static const Float_t fPadThr; // Pad threshold | |
022e76c3 | 217 | |
218 | // For raw production | |
acc49af9 | 219 | Int_t fRAWversion; // Raw data production version |
220 | static const Int_t fgkMaxRAWversion = 3; // Maximum raw version number supported | |
221 | Bool_t fRAWstoreRaw; // Store unfiltered data for raw data stream | |
022e76c3 | 222 | |
223 | private: | |
224 | ||
225 | AliTRDfeeParam(); | |
226 | ||
f2979d08 | 227 | ClassDef(AliTRDfeeParam,3) // The TRD front end electronics parameter |
022e76c3 | 228 | |
acc49af9 | 229 | }; |
022e76c3 | 230 | #endif |