]>
Commit | Line | Data |
---|---|---|
dc7ca31d | 1 | #ifndef ALIT0PARAMETERS_H |
2 | #define ALIT0PARAMETERS_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights | |
4 | * reserved. | |
5 | * | |
6 | * Latest changes by Christian Holm Christensen <cholm@nbi.dk> | |
7 | * | |
8 | * See cxx source for full Copyright notice | |
9 | */ | |
10 | ||
11 | //____________________________________________________________________ | |
12 | // | |
13 | // Singleton class to handle various parameters of the | |
14 | // T0 - T0 | |
15 | // Should get data fromm Conditions DB. | |
16 | // | |
17 | # include <TNamed.h> | |
18 | # include <TF1.h> | |
19 | # include <TGraph.h> | |
20 | #include <TObjArray.h> | |
21 | class AliT0CalibData; | |
22 | class AliCDBEntry; | |
23 | ||
24 | class AliT0Parameters : public TNamed | |
25 | { | |
26 | public: | |
27 | static AliT0Parameters* Instance(); | |
28 | ||
29 | void Init(); | |
30 | // Set various `Fixed' parameters | |
31 | void SetPh2Mip(Int_t r=300) { fPh2Mip = r; } | |
32 | void SetmV2Mip(Int_t r=50) { fmV2Mip = r; } | |
33 | void SetChannelWidth(Int_t s=25) { fChannelWidth = s;} | |
34 | void SetmV2channel(Int_t size=320) { fmV2Channel = size; } | |
35 | void SetQTmin(Int_t qt=13) {fQTmin = qt;} | |
36 | void SetQTmax(Int_t qt=125) {fQTmax = qt;} | |
37 | void SetGain(Int_t size=1) { fFixedGain = size; } | |
38 | void SetZposition( Float_t valueC=69.7, Float_t valueA=373) { | |
39 | fT0zPosition[0]=valueC, fT0zPosition[1]=valueA;} | |
40 | void SetPMTeff(Int_t ipmt); | |
41 | ||
42 | void SetTimeDelayTVD(Float_t r=150) { fTimeDelayTVD = r; }; | |
43 | Float_t GetTimeDelayTVD() { return fTimeDelayTVD; } | |
44 | ||
45 | // Set various variable parameter defaults | |
46 | void SetTimeDelayCablesCFD(Int_t ipmt,Float_t r=150) | |
47 | { fTimeDelayCablesCFD[ipmt] = r;} | |
48 | void SetTimeDelayCablesLED(Int_t ipmt,Float_t r=150) | |
49 | { fTimeDelayCablesLED[ipmt] = r;} | |
50 | void SetTimeDelayPMT(Int_t ipmt,Float_t r=5) | |
51 | { fTimeDelayPMT[ipmt] = r;} | |
52 | void SetTimeDelayElectronicCFD(Int_t ipmt,Float_t r=8) | |
53 | { fTimeDelayElectronicCFD[ipmt] = r;} | |
54 | void SetTimeDelayElectronicLED(Int_t ipmt,Float_t r=10) | |
55 | { fTimeDelayElectronicLED[ipmt] = r;} | |
56 | void SetVariableDelayLine(Int_t ipmt, Int_t v=0) | |
57 | { fVariableDelayLine[ipmt] = v;} | |
58 | void SetSlewingLED(Int_t ipmt); | |
59 | void SetSlewingRec(Int_t ipmt); | |
60 | ||
61 | ||
62 | // Get `Fixed' various parameters | |
63 | Int_t GetPh2Mip() const { return fPh2Mip; } | |
64 | Int_t GetmV2Mip() const { return fmV2Mip; } | |
65 | Int_t GetChannelWidth() const { return fChannelWidth; } | |
66 | Int_t GetmV2channel() const { return fmV2Channel; } | |
67 | Int_t GetQTmin() const {return fQTmin;} | |
68 | Int_t GetQTmax() const {return fQTmax;} | |
69 | Float_t GetGain(Int_t ipmt) const; | |
70 | Float_t GetZposition(Int_t i) const {return fT0zPosition[i];} | |
71 | TGraph * GetPMTeff(Int_t ipmt) const | |
72 | {return (TGraph*)fPMTeff.At(ipmt);} | |
73 | Float_t GetpmtEFF(Int_t ipmt, Float_t lambda) const | |
74 | {return((TGraph*)fPMTeff.At(ipmt))->Eval(lambda);} | |
75 | ||
76 | Float_t GetTimeDelayCablesCFD(Int_t ipmt) const | |
77 | {return fTimeDelayCablesCFD[ipmt]; } | |
78 | Float_t GetTimeDelayCablesLED(Int_t ipmt) const | |
79 | {return fTimeDelayCablesLED[ipmt]; } ; | |
80 | ||
81 | Float_t GetTimeDelayElectronicLED(Int_t ipmt) const | |
82 | {return fTimeDelayElectronicLED[ipmt]; } ; | |
83 | Float_t GetTimeDelayElectronicCFD(Int_t ipmt) const | |
84 | {return fTimeDelayElectronicCFD[ipmt]; } ; | |
85 | Int_t GetVariableDelayLine(Int_t ipmt) const | |
86 | {return fVariableDelayLine[ipmt];} | |
87 | ||
88 | Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const; | |
89 | // {return((TGraph*)fSlewingLED.At(ipmt))->Eval(mv);} | |
90 | TGraph * GetSlew(Int_t ipmt) const ; | |
91 | // {return (TGraph*)fSlewingLED.At(ipmt);} | |
92 | TGraph * GetSlewRec(Int_t ipmt) const; | |
93 | // {return (TGraph*)fSlewingRec.At(ipmt);} | |
94 | Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const; | |
95 | // {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);} | |
96 | ||
97 | Float_t GetTimeDelayCFD(Int_t ipmt); | |
98 | Float_t GetTimeDelayLED(Int_t ipmt); | |
99 | ||
100 | protected: | |
101 | AliT0Parameters(); | |
102 | virtual ~AliT0Parameters() {} | |
103 | static AliT0Parameters* fgInstance; // Static singleton instance | |
104 | ||
105 | Bool_t fIsInit; // Whether we've been initialised | |
106 | Float_t fT0zPosition[2] ; // z-position of the two T0s | |
107 | Int_t fPh2Mip; // # photoelectrons per MIP in radiator | |
108 | Int_t fmV2Mip; // # mV per MIP in radiator | |
109 | Int_t fChannelWidth; // channel width in ns | |
110 | Int_t fmV2Channel; // ADC mv 2 channel # (200000ps/(25*25). | |
111 | Int_t fQTmin; //min time for QTC | |
112 | Int_t fQTmax; //max time fro QTC | |
113 | Int_t fFixedGain; // | |
114 | Float_t fTimeDelayCablesCFD[24]; //! time delay in cables | |
115 | Float_t fTimeDelayCablesLED[24]; //! time delay in cables | |
116 | Float_t fTimeDelayElectronicCFD[24]; //! time delay in electronic | |
117 | Float_t fTimeDelayElectronicLED[24]; //! time delay in electronic | |
118 | Float_t fTimeDelayPMT[24]; //! time delay in PMT | |
119 | Int_t fVariableDelayLine[24]; //time delay in VDL for trigger equvalizing | |
120 | TObjArray fSlewingLED; //array of slewing correction for each PMT | |
121 | TObjArray fSlewingRec; //array of slewing correction for Reconstruction | |
122 | TObjArray fPMTeff; //array PMT registration efficiency | |
123 | ||
124 | Float_t fTimeDelayLED; // sum time delay for LED channel | |
125 | Float_t fTimeDelayCFD; // sum time delay for CFD channel | |
126 | Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel) | |
127 | ||
128 | static AliT0CalibData * fgCalibData; // singleton for Calibration data | |
129 | ||
130 | AliCDBEntry* fCalibentry ; // pointer to T0 calibration object | |
131 | ||
132 | ClassDef(AliT0Parameters,2) | |
133 | private: | |
134 | AliT0Parameters(const AliT0Parameters&); | |
135 | AliT0Parameters& operator=(const AliT0Parameters&); | |
136 | ||
137 | }; | |
138 | ||
139 | typedef AliT0Parameters AliSTARTParameters; // for backward compatibility | |
140 | ||
141 | #endif | |
142 | //____________________________________________________________________ | |
143 |