]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDfeeParam.h
bugfix: AliTPCCalibPulser.h dependency and protection corrected
[u/mrichter/AliRoot.git] / TRD / AliTRDfeeParam.h
CommitLineData
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
18class AliTRDCommonParam;
19class AliTRDpadPlane;
20class AliTRDgeometry;
21
22//_____________________________________________________________________________
23class AliTRDfeeParam : public TObject
24{
25
26 public:
27
28 AliTRDfeeParam(const AliTRDfeeParam &p);
29 virtual ~AliTRDfeeParam();
30 AliTRDfeeParam &operator=(const AliTRDfeeParam &p);
31 virtual void Copy(TObject &p) const;
32
33 static AliTRDfeeParam *Instance(); // Singleton
34 static void Terminate();
35
36 // Translation from MCM to Pad and vice versa
37 virtual Int_t GetPadRowFromMCM(Int_t irob, Int_t imcm) const;
38 virtual Int_t GetPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
39 virtual Int_t GetMCMfromPad(Int_t irow, Int_t icol) const;
40 virtual Int_t GetROBfromPad(Int_t irow, Int_t icol) const;
41 virtual Int_t GetRobSide(Int_t irob) const;
42 virtual Int_t GetColSide(Int_t icol) const;
43
44 static Float_t GetSamplingFrequency() { return (Float_t)fgkLHCfrequency / 4000000.0; }
45 static Int_t GetNmcmRob() { return fgkNmcmRob; }
46 static Int_t GetNmcmRobInRow() { return fgkNmcmRobInRow; }
47 static Int_t GetNmcmRobInCol() { return fgkNmcmRobInCol; }
48 static Int_t GetNrobC0() { return fgkNrobC0; }
49 static Int_t GetNrobC1() { return fgkNrobC1; }
50 static Int_t GetNadcMcm() { return fgkNadcMcm; }
51 static Int_t GetNtimebin() { return fgkNtimebin; }
52 static Int_t GetNcol() { return fgkNcol; }
53 static Int_t GetNcolMcm() { return fgkNcolMcm; }
54 static Int_t GetNrowC0() { return fgkNrowC0; }
55 static Int_t GetNrowC1() { return fgkNrowC1; }
56
57 // Float_t GetClusThr() { return fClusThr; };
58 // Float_t GetPadThr() const { return fPadThr; };
59 // Int_t GetTailCancelation() const { return fTCOn; };
60 // Int_t GetNexponential() const { return fTCnexp; };
61 //virtual void GetFilterParam(Float_t &r1, Float_t &r2, Float_t &c1, Float_t &c2, Float_t &ped) const;
62 // Int_t GetFilterType() const { return fFilterType; };
63
64 static Float_t GetTFattenuationParam() { return ((Float_t)fgkTFattenuationParameter1) / ((Float_t)fgkTFattenuationParameter2) ; }
65 static Float_t GetTFf0() { return 1 + fgkTFon*(-1+GetTFattenuationParam()); } // 1 if TC off
66
67 protected:
68
69 static AliTRDfeeParam *fgInstance;
70 static Bool_t fgTerminated; // Defines if this class has already been terminated
71
72 // AliTRDgeometry *fGeo; // TRD geometry class
73 AliTRDCommonParam *fCP; // TRD common parameters class
74
75 // Remark: ISO C++ allows initialization of static const values only for integer.
76
77 // Basic Geometrical numbers
78 static const Int_t fgkLHCfrequency = 40079000 ; // [Hz] LHC clock (should be moved to STEER?)
79 static const Int_t fgkNmcmRob = 16; // Number of MCMs per ROB (old fgkMCMmax)
80 static const Int_t fgkNmcmRobInRow = 4; // Number of MCMs per ROB in row dir. (old fgkMCMrow)
81 static const Int_t fgkNmcmRobInCol = 4; // Number of MCMs per ROB in col dir. (old fgkMCMrow)
82 static const Int_t fgkNrobC0 = 6; // Number of ROBs per C0 chamber (old fgkROBmaxC0)
83 static const Int_t fgkNrobC1 = 8; // Number of ROBs per C1 chamber (old fgkROBmaxC1)
84 static const Int_t fgkNadcMcm = 21; // Number of ADC channels per MCM (old fgkADCmax)
85 static const Int_t fgkNtimebin = 30; // Number of Time bins (old fgkTBmax)
86 static const Int_t fgkNcol = 144; // Number of pads per padplane row(old fgkColmax)
87 static const Int_t fgkNcolMcm = 18; // Number of pads per MCM (old fgkPadmax)
88 static const Int_t fgkNrowC0 = 12; // Number of Rows per C0 chamber (old fgkRowmaxC0)
89 static const Int_t fgkNrowC1 = 16; // Number of Rows per C1 chamber (old fgkRowmaxC1)
90
91 // ADC intrinsic parameters
92 static const Int_t fgkADCpedestal = 100000; // ADC baseline * 100 (old name fPedestal)
93 static const Int_t fgkADCnoise = 10; // ADC noise * 100 (not contained in the digitizer) [in ADC]
94 static const Int_t fgkADCDAC = 0; // 5 bit ADC gain parameter
95
96 // TRAP filter global setup
97 static const Bool_t fgkPFon = kTRUE; // Pedestal Filter enable/disable flag.
98 static const Bool_t fgkGFon = kFALSE; // Gain correction Filter enable/disable flag
99 static const Bool_t fgkTFon = kTRUE; // Tail cancelation Filter enable/disable flag (old name fTCOn)
100
101 // PF setup
102 static const Int_t fgkPFtimeConstant = 0; // 0 for fastest, 3 for slowest (no effect, probably)
103 static const Int_t fgkPFeffectPedestal = 10; // [in ADC units] the desired baseline (Additive)
104
105 // GF setup
106 static const Int_t fgkGFnoise = 0; // Noise level increased by gain filter x 100 [in ADC] (to be measured)
107
108 // TF setup
109 static const Int_t fgkTFtype = 2; // TC type (0=analog, 1=digital, 2=TRAPsim) (old name fFilterType)
110 static const Int_t fgkTFlongDecayWeight = 270; // 0 to 1024 corresponds to 0 to 0.5
111 static const Int_t fgkTFlongDecayParameter = 348; // 0 to 511 corresponds to 0.75 to 1
112 static const Int_t fgkTFshortDecayParameter = 449; // 0 to 511 correponds to 0.25 to 0.5
113 static const Int_t fgkTFattenuationParameter1= 45; // attenuationParameter = fgkTFattenuationParameter1/fgkTFattenuationParameter2
114 static const Int_t fgkTFattenuationParameter2= 14; // = -alphaL/ln(lambdaL)-(1-alphaL)/ln(lambdaS)
115
116 // OLD TF setup (calculated from above) (valid only for fgkTFtype = 0 or 1)
117 static const Int_t fgkTFaNExp = 1; // Number of exponential
118 Float_t fTFaR1; // Time constant [microseconds] long (old name fR1)
119 Float_t fTFaR2; // Time constant [microseconds] short(old name fR2)
120 Float_t fTFaC1; // Weight long (old name fC1)
121 Float_t fTFaC2; // Weight short (old name fC2)
122
123 // Zero suppression parameters
124 static const Int_t fgkEBsingleIndicatorThreshold = 3; // used in EBIS, in ADC units above the pedestal
125 static const Int_t fgkEBsumIndicatorThreshold = 4; // used in EBIT, in ADC units above the pedestal
126 static const Int_t fgkEBindicatorLookupTable = 0xF0; // see the TRAP user manual, used in EBIL
127 static const Int_t fgkEBmarkIgnoreNeighbour = 1; // used in EBIN
128
129 // Charge accumulators
130 static const Int_t fgkPREPqAcc0Start = 0; // Preprocessor Charge Accumulator 0 Start
131 static const Int_t fgkPREPqAcc0End = 10; // Preprocessor Charge Accumulator 0 End
132 static const Int_t fgkPREPqAcc1Start = 11; // Preprocessor Charge Accumulator 1 Start
133 static const Int_t fgkPREPqAcc1End = 20; // Preprocessor Charge Accumulator 1 End
134 static const Int_t fgkMinClusterCharge = 20; // Hit detection [in ADC units]
135
136 // OLD TRAP processing parameters calculated from above
137 //static const Float_t fClusThr; // Cluster threshold
138 //static const Float_t fPadThr; // Pad threshold
139
140 // For raw production
141 static const Int_t fgkRAWversion = 1; // Raw data production version
142 static const Bool_t fgkRAWstoreRaw = kTRUE; // Store unfiltered data for raw data stream
143
144 private:
145
146 AliTRDfeeParam();
147
148 ClassDef(AliTRDfeeParam,1) //
149};
150
151#endif