1 #ifndef AliT0CalibData_H
2 #define AliT0CalibData_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////
8 // class for T0 calibration //
9 ////////////////////////////////////////////////
13 #include "AliT0CalibData.h"
17 #include "TObjArray.h"
19 #include "AliT0LookUpValue.h"
21 class AliT0CalibData: public TNamed {
25 AliT0CalibData(const char* name);
26 AliT0CalibData(const AliT0CalibData &calibda);
27 AliT0CalibData& operator= (const AliT0CalibData &calibda);
28 virtual ~AliT0CalibData();
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;}
38 TGraph *GetWalk(Int_t ipmt ) const {return ((TGraph*)fWalk.At(ipmt));}
39 Float_t GetWalkVal(Int_t ipmt, Float_t mv ) const {return ((TGraph*)fWalk.At(ipmt))->Eval(mv);}
40 void SetWalk(Int_t ipmt) ;
42 TGraph * GetSlew(Int_t ipmt) const {return (TGraph*)fSlewingLED.At(ipmt);}
43 Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const
44 {return((TGraph*)fSlewingLED.At(ipmt))->Eval(mv);}
45 TGraph * GetSlewRec(Int_t ipmt) const {return (TGraph*)fSlewingRec.At(ipmt);}
46 Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const
47 {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);}
49 void SetSlewingLED(Int_t ipmt) ;
50 void SetSlewingRec(Int_t ipmt) ;
52 void SetTimeDelayCFD(Float_t val, Int_t channel) {fTimeDelayCFD[channel]=val;}
53 void SetTimeDelayCFD(Float_t* TimeDelay);
54 void SetTimeDelayLED(Float_t val, Int_t channel) {fTimeDelayLED[channel]=val;}
55 void SetTimeDelayLED(Float_t* TimeDelay);
57 void SetTimeDelayTVD(Int_t r=150) { fTimeDelayTVD = r; };
58 Float_t GetTimeDelayTVD() { return fTimeDelayTVD; }
60 void ReadAsciiLookup(const Char_t *filename);
61 Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel);
62 void PrintLookup(Option_t* option= "", Int_t iTRM=0, Int_t iTDC=0, Int_t iChannel=0) const;
63 TMap *GetMapLookup(void) {return &fLookup;}
64 Int_t GetNumberOfTRMs() const {return fNumberOfTRMs;}
65 void SetNumberOfTRMs(Int_t ntrms=2) {fNumberOfTRMs = ntrms;}
69 Float_t fTimeDelayCFD[24]; // Coeff. for time delay (24 different cables & CFD )
70 Float_t fTimeDelayLED[24]; // Coeff. for time delay (24 different cables & CFD )
71 Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
72 TObjArray fWalk; //time - amp. walk
73 TObjArray fSlewingLED; //time - amp.LED slew
74 TObjArray fSlewingRec; //time - amp. LED slew for reconstruction
75 TMap fLookup; //lookup table
76 Int_t fNumberOfTRMs; // number of TRMs in setup
79 ClassDef(AliT0CalibData,4) // T0 Sensor Calibration data
82 typedef AliT0CalibData AliSTARTCalibData; // for backward compatibility