]>
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> | |
e0bba6cc | 19 | # include <TMap.h> |
dc7ca31d | 20 | # include <TGraph.h> |
21 | #include <TObjArray.h> | |
22 | class AliT0CalibData; | |
23 | class AliCDBEntry; | |
24 | ||
25 | class AliT0Parameters : public TNamed | |
26 | { | |
27 | public: | |
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;} | |
dc7ca31d | 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 | |
dc7ca31d | 46 | void SetSlewingLED(Int_t ipmt); |
47 | void SetSlewingRec(Int_t ipmt); | |
48 | ||
49 | ||
50 | // Get `Fixed' various parameters | |
51 | Int_t GetPh2Mip() const { return fPh2Mip; } | |
52 | Int_t GetmV2Mip() const { return fmV2Mip; } | |
53 | Int_t GetChannelWidth() const { return fChannelWidth; } | |
54 | Int_t GetmV2channel() const { return fmV2Channel; } | |
55 | Int_t GetQTmin() const {return fQTmin;} | |
56 | Int_t GetQTmax() const {return fQTmax;} | |
5325480c | 57 | Double_t GetZposition(Int_t i) const {return fT0zPosition[i];} |
58 | Double_t GetZPosition(const char* symname) ; | |
59 | TGraph * GetPMTeff(Int_t ipmt) const | |
dc7ca31d | 60 | {return (TGraph*)fPMTeff.At(ipmt);} |
61 | Float_t GetpmtEFF(Int_t ipmt, Float_t lambda) const | |
62 | {return((TGraph*)fPMTeff.At(ipmt))->Eval(lambda);} | |
63 | ||
dc7ca31d | 64 | |
65 | Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const; | |
66 | // {return((TGraph*)fSlewingLED.At(ipmt))->Eval(mv);} | |
67 | TGraph * GetSlew(Int_t ipmt) const ; | |
68 | // {return (TGraph*)fSlewingLED.At(ipmt);} | |
69 | TGraph * GetSlewRec(Int_t ipmt) const; | |
70 | // {return (TGraph*)fSlewingRec.At(ipmt);} | |
71 | Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const; | |
72 | // {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);} | |
73 | ||
c41ceaac | 74 | TGraph *GetWalk(Int_t ipmt ) const;// {return ((TF1*)fWalk.At(ipmt));} |
75 | Float_t GetWalkVal(Int_t ipmt, Float_t mv ) const ;//{return ((TF1*)fWalk.At(ipmt))->Eval(mv);} | |
76 | void SetWalk(Int_t ipmt) ; | |
77 | ||
dc7ca31d | 78 | Float_t GetTimeDelayCFD(Int_t ipmt); |
94c27e4f | 79 | Float_t GetTimeDelayDA(Int_t ipmt); |
80 | ||
81 | void SetMeanT0(Int_t mean=500) { fMeanT0 = mean; }; | |
82 | Int_t GetMeanT0 (); //{return fMeanT0;}; | |
dc7ca31d | 83 | |
e0bba6cc | 84 | // TMap *LookupTable; |
85 | ||
86 | Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel); | |
5325480c | 87 | Int_t GetNumberOfTRMs(); |
88 | void SetNumberOfTRMs(Int_t ntrms=2) {fNumberOfTRMs = ntrms;} | |
e0bba6cc | 89 | |
dc7ca31d | 90 | protected: |
91 | AliT0Parameters(); | |
92 | virtual ~AliT0Parameters() {} | |
93 | static AliT0Parameters* fgInstance; // Static singleton instance | |
94 | ||
95 | Bool_t fIsInit; // Whether we've been initialised | |
96 | Float_t fT0zPosition[2] ; // z-position of the two T0s | |
97 | Int_t fPh2Mip; // # photoelectrons per MIP in radiator | |
98 | Int_t fmV2Mip; // # mV per MIP in radiator | |
99 | Int_t fChannelWidth; // channel width in ns | |
100 | Int_t fmV2Channel; // ADC mv 2 channel # (200000ps/(25*25). | |
101 | Int_t fQTmin; //min time for QTC | |
102 | Int_t fQTmax; //max time fro QTC | |
dc7ca31d | 103 | Int_t fVariableDelayLine[24]; //time delay in VDL for trigger equvalizing |
104 | TObjArray fSlewingLED; //array of slewing correction for each PMT | |
105 | TObjArray fSlewingRec; //array of slewing correction for Reconstruction | |
106 | TObjArray fPMTeff; //array PMT registration efficiency | |
c41ceaac | 107 | TObjArray fWalk; //array time-amplitude walk |
dc7ca31d | 108 | |
94c27e4f | 109 | Float_t fTimeDelayDA; // sum time delay for LED channel |
dc7ca31d | 110 | Float_t fTimeDelayCFD; // sum time delay for CFD channel |
111 | Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel) | |
94c27e4f | 112 | Int_t fMeanT0; //mean of T0distribution with vertex=0; |
113 | ||
e0bba6cc | 114 | TMap fLookUp; //lookup table |
5325480c | 115 | Int_t fNumberOfTRMs; // number of TRMs in setup |
116 | ||
dc7ca31d | 117 | static AliT0CalibData * fgCalibData; // singleton for Calibration data |
e0bba6cc | 118 | static AliT0CalibData * fgLookUp; // singleton for Calibration data |
c41ceaac | 119 | static AliT0CalibData * fgSlewCorr; // singleton for Calibration data |
e0bba6cc | 120 | |
dc7ca31d | 121 | AliCDBEntry* fCalibentry ; // pointer to T0 calibration object |
e0bba6cc | 122 | AliCDBEntry* fLookUpentry ; // pointer to T0 lokkup table |
c41ceaac | 123 | AliCDBEntry* fSlewCorr ; // pointer to slewing correction |
e0bba6cc | 124 | |
dc7ca31d | 125 | ClassDef(AliT0Parameters,2) |
e0bba6cc | 126 | private: |
dc7ca31d | 127 | AliT0Parameters(const AliT0Parameters&); |
128 | AliT0Parameters& operator=(const AliT0Parameters&); | |
129 | ||
130 | }; | |
131 | ||
dc7ca31d | 132 | #endif |
133 | //____________________________________________________________________ | |
134 |