]>
Commit | Line | Data |
---|---|---|
dc7ca31d | 1 | #ifndef AliT0CalibData_H |
2 | #define AliT0CalibData_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //////////////////////////////////////////////// | |
8 | // class for T0 calibration // | |
9 | //////////////////////////////////////////////// | |
10 | ||
11 | #include "TNamed.h" | |
12 | #include "TF1.h" | |
13 | #include "AliT0CalibData.h" | |
14 | #include "TMap.h" | |
15 | #include "TGraph.h" | |
16 | #include "TString.h" | |
17 | #include "TObjArray.h" | |
18 | #include "AliT0.h" | |
e0bba6cc | 19 | #include "AliT0LookUpValue.h" |
dc7ca31d | 20 | |
21 | class AliT0CalibData: public TNamed { | |
22 | ||
23 | public: | |
24 | AliT0CalibData(); | |
25 | AliT0CalibData(const char* name); | |
26 | AliT0CalibData(const AliT0CalibData &calibda); | |
27 | AliT0CalibData& operator= (const AliT0CalibData &calibda); | |
28 | virtual ~AliT0CalibData(); | |
29 | void Reset(); | |
30 | ||
31 | virtual void Print(Option_t* option= "") const; | |
32 | Float_t GetTimeDelayCFD(Int_t channel) const {return fTimeDelayCFD[channel];} | |
33 | Float_t* GetTimeDelayCFD() const {return(float*) fTimeDelayCFD;} | |
34 | Float_t GetTimeDelayLED(Int_t channel) const {return fTimeDelayLED[channel];} | |
35 | Float_t* GetTimeDelayLED() const {return(float*) fTimeDelayLED;} | |
36 | ||
37 | Float_t GetGain(Int_t channel) const {return fGain[channel];} | |
38 | Float_t* GetGain() const {return (float*)fGain;} | |
39 | void SetGain(Float_t val, Int_t channel) {fGain[channel]=val;} | |
40 | void SetGain(Float_t* Gain); | |
41 | ||
42 | Float_t GetWalk(Int_t ipmt, Float_t mv ) const {return ((TF1*)fWalk.At(ipmt))->Eval(mv);} | |
43 | void SetWalk(Int_t ipmt, const Char_t *filename="calibr/re.root") ; | |
44 | ||
45 | TGraph * GetSlew(Int_t ipmt) const {return (TGraph*)fSlewingLED.At(ipmt);} | |
46 | Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const | |
47 | {return((TGraph*)fSlewingLED.At(ipmt))->Eval(mv);} | |
48 | TGraph * GetSlewRec(Int_t ipmt) const {return (TGraph*)fSlewingRec.At(ipmt);} | |
49 | Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const | |
50 | {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);} | |
51 | ||
52 | void SetSlewingLED(Int_t ipmt, const Char_t *filename) ; | |
53 | void SetSlewingRec(Int_t ipmt, const Char_t *filename) ; | |
54 | ||
55 | void SetTimeDelayCFD(Float_t val, Int_t channel) {fTimeDelayCFD[channel]=val;} | |
56 | void SetTimeDelayCFD(Float_t* TimeDelay); | |
57 | void SetTimeDelayLED(Float_t val, Int_t channel) {fTimeDelayLED[channel]=val;} | |
58 | void SetTimeDelayLED(Float_t* TimeDelay); | |
59 | ||
60 | void SetTimeDelayTVD(Int_t r=150) { fTimeDelayTVD = r; }; | |
61 | Float_t GetTimeDelayTVD() { return fTimeDelayTVD; } | |
62 | ||
e0bba6cc | 63 | void ReadAsciiLookup(const Char_t *filename); |
64 | Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel); | |
65 | void PrintLookup(Option_t* option= "", Int_t iTRM=0, Int_t iTDC=0, Int_t iChannel=0) const; | |
66 | TMap *GetMapLookup(void) {return &fLookup;} | |
67 | ||
68 | //Int_t GetA(void) {return fa;} | |
69 | //void SetA (Int_t a) {fa=a;} | |
70 | ||
dc7ca31d | 71 | protected: |
72 | ||
73 | Float_t fTimeDelayCFD[24]; // Coeff. for time delay (24 different cables & CFD ) | |
74 | Float_t fTimeDelayLED[24]; // Coeff. for time delay (24 different cables & CFD ) | |
75 | Float_t fGain[24]; // Coeff. for gain (24 different cables & CFD ) | |
76 | Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel) | |
77 | TObjArray fWalk; //time - amp. walk | |
78 | TObjArray fSlewingLED; //time - amp.LED slew | |
79 | TObjArray fSlewingRec; //time - amp. LED slew for reconstruction | |
e0bba6cc | 80 | TMap fLookup; //lookup table |
81 | //Int_t fa; | |
82 | ||
dc7ca31d | 83 | // |
e0bba6cc | 84 | ClassDef(AliT0CalibData,2) // T0 Sensor Calibration data |
dc7ca31d | 85 | }; |
86 | ||
87 | typedef AliT0CalibData AliSTARTCalibData; // for backward compatibility | |
88 | ||
89 | #endif | |
90 |