]>
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(); | |
f8bea420 | 31 | void InitIfOnline(); |
32 | ||
dc7ca31d | 33 | // Set various `Fixed' parameters |
34 | void SetPh2Mip(Int_t r=300) { fPh2Mip = r; } | |
35 | void SetmV2Mip(Int_t r=50) { fmV2Mip = r; } | |
36 | void SetChannelWidth(Int_t s=25) { fChannelWidth = s;} | |
37 | void SetmV2channel(Int_t size=320) { fmV2Channel = size; } | |
38 | void SetQTmin(Int_t qt=13) {fQTmin = qt;} | |
39 | void SetQTmax(Int_t qt=125) {fQTmax = qt;} | |
dc7ca31d | 40 | void SetZposition( Float_t valueC=69.7, Float_t valueA=373) { |
41 | fT0zPosition[0]=valueC, fT0zPosition[1]=valueA;} | |
42 | void SetPMTeff(Int_t ipmt); | |
43 | ||
44 | void SetTimeDelayTVD(Float_t r=150) { fTimeDelayTVD = r; }; | |
45 | Float_t GetTimeDelayTVD() { return fTimeDelayTVD; } | |
46 | ||
dc7ca31d | 47 | |
dc7ca31d | 48 | // Get `Fixed' various parameters |
49 | Int_t GetPh2Mip() const { return fPh2Mip; } | |
50 | Int_t GetmV2Mip() const { return fmV2Mip; } | |
51 | Int_t GetChannelWidth() const { return fChannelWidth; } | |
52 | Int_t GetmV2channel() const { return fmV2Channel; } | |
53 | Int_t GetQTmin() const {return fQTmin;} | |
54 | Int_t GetQTmax() const {return fQTmax;} | |
5325480c | 55 | Double_t GetZposition(Int_t i) const {return fT0zPosition[i];} |
56 | Double_t GetZPosition(const char* symname) ; | |
29d3e0eb | 57 | Double_t GetZPositionShift(const char* symname); |
58 | ||
59 | ||
74adb36a | 60 | TGraph * GetPMTeff(Int_t ipmt) const |
dc7ca31d | 61 | {return (TGraph*)fPMTeff.At(ipmt);} |
62 | Float_t GetpmtEFF(Int_t ipmt, Float_t lambda) const | |
63 | {return((TGraph*)fPMTeff.At(ipmt))->Eval(lambda);} | |
64 | ||
dc7ca31d | 65 | |
74adb36a | 66 | TGraph * GetAmpLEDRec(Int_t ipmt) const; |
29d3e0eb | 67 | |
74adb36a | 68 | TGraph *GetWalk(Int_t ipmt ) const; |
69 | Float_t GetWalkVal(Int_t ipmt, Float_t mv ) const ; | |
c41ceaac | 70 | |
dc7ca31d | 71 | Float_t GetTimeDelayCFD(Int_t ipmt); |
94c27e4f | 72 | Float_t GetTimeDelayDA(Int_t ipmt); |
73 | ||
74adb36a | 74 | // void SetMeanT0(Int_t mean=500) { fMeanT0 = mean; }; |
94c27e4f | 75 | Int_t GetMeanT0 (); //{return fMeanT0;}; |
dc7ca31d | 76 | |
256d4943 | 77 | TMap * GetMapLookup(); |
e0bba6cc | 78 | Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel); |
5325480c | 79 | Int_t GetNumberOfTRMs(); |
80 | void SetNumberOfTRMs(Int_t ntrms=2) {fNumberOfTRMs = ntrms;} | |
e0bba6cc | 81 | |
74adb36a | 82 | protected: |
dc7ca31d | 83 | AliT0Parameters(); |
84 | virtual ~AliT0Parameters() {} | |
85 | static AliT0Parameters* fgInstance; // Static singleton instance | |
86 | ||
29d3e0eb | 87 | Bool_t fIsInit; // Whether we've been initialised |
88 | Float_t fT0zPosition[2] ; // z-position of the two T0s | |
89 | Int_t fPh2Mip; // # photoelectrons per MIP in radiator | |
90 | Int_t fmV2Mip; // # mV per MIP in radiator | |
91 | Int_t fChannelWidth; // channel width in ns | |
92 | Int_t fmV2Channel; // ADC mv 2 channel # (200000ps/(25*25). | |
93 | Int_t fQTmin; //min time for QTC | |
94 | Int_t fQTmax; //max time fro QTC | |
95 | TObjArray fAmpLEDRec; // array of amlitude vs LED-CFD (simulation & reconstruction) | |
dc7ca31d | 96 | TObjArray fPMTeff; //array PMT registration efficiency |
29d3e0eb | 97 | TObjArray fWalk; //array time-amplitude walk |
dc7ca31d | 98 | |
29d3e0eb | 99 | Float_t fTimeDelayDA; // sum time delay for LED channel |
100 | Float_t fTimeDelayCFD; // sum time delay for CFD channel | |
101 | Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel) | |
102 | Int_t fMeanT0; //mean of T0distribution with vertex=0; | |
74adb36a | 103 | |
29d3e0eb | 104 | TMap fLookUp; //lookup table |
105 | Int_t fNumberOfTRMs; // number of TRMs in setup | |
f8bea420 | 106 | |
5325480c | 107 | |
dc7ca31d | 108 | static AliT0CalibData * fgCalibData; // singleton for Calibration data |
e0bba6cc | 109 | static AliT0CalibData * fgLookUp; // singleton for Calibration data |
c41ceaac | 110 | static AliT0CalibData * fgSlewCorr; // singleton for Calibration data |
e0bba6cc | 111 | |
dc7ca31d | 112 | AliCDBEntry* fCalibentry ; // pointer to T0 calibration object |
e0bba6cc | 113 | AliCDBEntry* fLookUpentry ; // pointer to T0 lokkup table |
c41ceaac | 114 | AliCDBEntry* fSlewCorr ; // pointer to slewing correction |
e0bba6cc | 115 | |
29d3e0eb | 116 | ClassDef(AliT0Parameters,4) |
e0bba6cc | 117 | private: |
dc7ca31d | 118 | AliT0Parameters(const AliT0Parameters&); |
119 | AliT0Parameters& operator=(const AliT0Parameters&); | |
120 | ||
121 | }; | |
122 | ||
dc7ca31d | 123 | #endif |
124 | //____________________________________________________________________ | |
125 |