]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/AliT0Parameters.h
time delay calibration numbers
[u/mrichter/AliRoot.git] / T0 / AliT0Parameters.h
CommitLineData
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>
e0bba6cc 19# include <TMap.h>
dc7ca31d 20# include <TGraph.h>
21#include <TObjArray.h>
22class AliT0CalibData;
23class AliCDBEntry;
24
25class AliT0Parameters : public TNamed
26{
27public:
28 static AliT0Parameters* Instance();
29
30 void Init();
31 // Set various `Fixed' parameters
32 void SetPh2Mip(Int_t r=300) { fPh2Mip = r; }
33 void SetmV2Mip(Int_t r=50) { fmV2Mip = r; }
34 void SetChannelWidth(Int_t s=25) { fChannelWidth = s;}
35 void SetmV2channel(Int_t size=320) { fmV2Channel = size; }
36 void SetQTmin(Int_t qt=13) {fQTmin = qt;}
37 void SetQTmax(Int_t qt=125) {fQTmax = qt;}
38 void SetGain(Int_t size=1) { fFixedGain = size; }
39 void SetZposition( Float_t valueC=69.7, Float_t valueA=373) {
40 fT0zPosition[0]=valueC, fT0zPosition[1]=valueA;}
41 void SetPMTeff(Int_t ipmt);
42
43 void SetTimeDelayTVD(Float_t r=150) { fTimeDelayTVD = r; };
44 Float_t GetTimeDelayTVD() { return fTimeDelayTVD; }
45
46 // Set various variable parameter defaults
47 void SetTimeDelayCablesCFD(Int_t ipmt,Float_t r=150)
48 { fTimeDelayCablesCFD[ipmt] = r;}
49 void SetTimeDelayCablesLED(Int_t ipmt,Float_t r=150)
50 { fTimeDelayCablesLED[ipmt] = r;}
51 void SetTimeDelayPMT(Int_t ipmt,Float_t r=5)
52 { fTimeDelayPMT[ipmt] = r;}
53 void SetTimeDelayElectronicCFD(Int_t ipmt,Float_t r=8)
54 { fTimeDelayElectronicCFD[ipmt] = r;}
55 void SetTimeDelayElectronicLED(Int_t ipmt,Float_t r=10)
56 { fTimeDelayElectronicLED[ipmt] = r;}
57 void SetVariableDelayLine(Int_t ipmt, Int_t v=0)
58 { fVariableDelayLine[ipmt] = v;}
59 void SetSlewingLED(Int_t ipmt);
60 void SetSlewingRec(Int_t ipmt);
61
62
63 // Get `Fixed' various parameters
64 Int_t GetPh2Mip() const { return fPh2Mip; }
65 Int_t GetmV2Mip() const { return fmV2Mip; }
66 Int_t GetChannelWidth() const { return fChannelWidth; }
67 Int_t GetmV2channel() const { return fmV2Channel; }
68 Int_t GetQTmin() const {return fQTmin;}
69 Int_t GetQTmax() const {return fQTmax;}
70 Float_t GetGain(Int_t ipmt) const;
71 Float_t GetZposition(Int_t i) const {return fT0zPosition[i];}
72 TGraph * GetPMTeff(Int_t ipmt) const
73 {return (TGraph*)fPMTeff.At(ipmt);}
74 Float_t GetpmtEFF(Int_t ipmt, Float_t lambda) const
75 {return((TGraph*)fPMTeff.At(ipmt))->Eval(lambda);}
76
77 Float_t GetTimeDelayCablesCFD(Int_t ipmt) const
78 {return fTimeDelayCablesCFD[ipmt]; }
79 Float_t GetTimeDelayCablesLED(Int_t ipmt) const
80 {return fTimeDelayCablesLED[ipmt]; } ;
81
82 Float_t GetTimeDelayElectronicLED(Int_t ipmt) const
83 {return fTimeDelayElectronicLED[ipmt]; } ;
84 Float_t GetTimeDelayElectronicCFD(Int_t ipmt) const
85 {return fTimeDelayElectronicCFD[ipmt]; } ;
86 Int_t GetVariableDelayLine(Int_t ipmt) const
87 {return fVariableDelayLine[ipmt];}
88
89 Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const;
90 // {return((TGraph*)fSlewingLED.At(ipmt))->Eval(mv);}
91 TGraph * GetSlew(Int_t ipmt) const ;
92 // {return (TGraph*)fSlewingLED.At(ipmt);}
93 TGraph * GetSlewRec(Int_t ipmt) const;
94 // {return (TGraph*)fSlewingRec.At(ipmt);}
95 Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const;
96 // {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);}
97
98 Float_t GetTimeDelayCFD(Int_t ipmt);
99 Float_t GetTimeDelayLED(Int_t ipmt);
100
e0bba6cc 101 // TMap *LookupTable;
102
103 Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel);
104
dc7ca31d 105protected:
106 AliT0Parameters();
107 virtual ~AliT0Parameters() {}
108 static AliT0Parameters* fgInstance; // Static singleton instance
109
110 Bool_t fIsInit; // Whether we've been initialised
111 Float_t fT0zPosition[2] ; // z-position of the two T0s
112 Int_t fPh2Mip; // # photoelectrons per MIP in radiator
113 Int_t fmV2Mip; // # mV per MIP in radiator
114 Int_t fChannelWidth; // channel width in ns
115 Int_t fmV2Channel; // ADC mv 2 channel # (200000ps/(25*25).
116 Int_t fQTmin; //min time for QTC
117 Int_t fQTmax; //max time fro QTC
118 Int_t fFixedGain; //
119 Float_t fTimeDelayCablesCFD[24]; //! time delay in cables
120 Float_t fTimeDelayCablesLED[24]; //! time delay in cables
121 Float_t fTimeDelayElectronicCFD[24]; //! time delay in electronic
122 Float_t fTimeDelayElectronicLED[24]; //! time delay in electronic
123 Float_t fTimeDelayPMT[24]; //! time delay in PMT
124 Int_t fVariableDelayLine[24]; //time delay in VDL for trigger equvalizing
125 TObjArray fSlewingLED; //array of slewing correction for each PMT
126 TObjArray fSlewingRec; //array of slewing correction for Reconstruction
127 TObjArray fPMTeff; //array PMT registration efficiency
128
129 Float_t fTimeDelayLED; // sum time delay for LED channel
130 Float_t fTimeDelayCFD; // sum time delay for CFD channel
131 Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
132
e0bba6cc 133 TMap fLookUp; //lookup table
134
dc7ca31d 135 static AliT0CalibData * fgCalibData; // singleton for Calibration data
e0bba6cc 136 static AliT0CalibData * fgLookUp; // singleton for Calibration data
137
dc7ca31d 138 AliCDBEntry* fCalibentry ; // pointer to T0 calibration object
e0bba6cc 139 AliCDBEntry* fLookUpentry ; // pointer to T0 lokkup table
140
dc7ca31d 141 ClassDef(AliT0Parameters,2)
e0bba6cc 142 private:
dc7ca31d 143 AliT0Parameters(const AliT0Parameters&);
144 AliT0Parameters& operator=(const AliT0Parameters&);
145
146};
147
dc7ca31d 148#endif
149//____________________________________________________________________
150