This commit was generated by cvs2svn to compensate for changes in r15986,
[u/mrichter/AliRoot.git] / T0 / AliT0CalibData.h
CommitLineData
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"
19
20class AliT0CalibData: public TNamed {
21
22 public:
23 AliT0CalibData();
24 AliT0CalibData(const char* name);
25 AliT0CalibData(const AliT0CalibData &calibda);
26 AliT0CalibData& operator= (const AliT0CalibData &calibda);
27 virtual ~AliT0CalibData();
28 void Reset();
29
30 virtual void Print(Option_t* option= "") const;
31 Float_t GetTimeDelayCFD(Int_t channel) const {return fTimeDelayCFD[channel];}
32 Float_t* GetTimeDelayCFD() const {return(float*) fTimeDelayCFD;}
33 Float_t GetTimeDelayLED(Int_t channel) const {return fTimeDelayLED[channel];}
34 Float_t* GetTimeDelayLED() const {return(float*) fTimeDelayLED;}
35
36 Float_t GetGain(Int_t channel) const {return fGain[channel];}
37 Float_t* GetGain() const {return (float*)fGain;}
38 void SetGain(Float_t val, Int_t channel) {fGain[channel]=val;}
39 void SetGain(Float_t* Gain);
40
41 Float_t GetWalk(Int_t ipmt, Float_t mv ) const {return ((TF1*)fWalk.At(ipmt))->Eval(mv);}
42 void SetWalk(Int_t ipmt, const Char_t *filename="calibr/re.root") ;
43
44 TGraph * GetSlew(Int_t ipmt) const {return (TGraph*)fSlewingLED.At(ipmt);}
45 Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const
46 {return((TGraph*)fSlewingLED.At(ipmt))->Eval(mv);}
47 TGraph * GetSlewRec(Int_t ipmt) const {return (TGraph*)fSlewingRec.At(ipmt);}
48 Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const
49 {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);}
50
51 void SetSlewingLED(Int_t ipmt, const Char_t *filename) ;
52 void SetSlewingRec(Int_t ipmt, const Char_t *filename) ;
53
54 void SetTimeDelayCFD(Float_t val, Int_t channel) {fTimeDelayCFD[channel]=val;}
55 void SetTimeDelayCFD(Float_t* TimeDelay);
56 void SetTimeDelayLED(Float_t val, Int_t channel) {fTimeDelayLED[channel]=val;}
57 void SetTimeDelayLED(Float_t* TimeDelay);
58
59 void SetTimeDelayTVD(Int_t r=150) { fTimeDelayTVD = r; };
60 Float_t GetTimeDelayTVD() { return fTimeDelayTVD; }
61
62 protected:
63
64 Float_t fTimeDelayCFD[24]; // Coeff. for time delay (24 different cables & CFD )
65 Float_t fTimeDelayLED[24]; // Coeff. for time delay (24 different cables & CFD )
66 Float_t fGain[24]; // Coeff. for gain (24 different cables & CFD )
67 Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
68 TObjArray fWalk; //time - amp. walk
69 TObjArray fSlewingLED; //time - amp.LED slew
70 TObjArray fSlewingRec; //time - amp. LED slew for reconstruction
71 //
72 ClassDef(AliT0CalibData,1) // T0 Sensor Calibration data
73};
74
75typedef AliT0CalibData AliSTARTCalibData; // for backward compatibility
76
77#endif
78