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