1st draft for pass0
[u/mrichter/AliRoot.git] / T0 / AliT0CalibTimeEq.h
CommitLineData
a2ad8166 1#ifndef AliT0CalibTimeEq_H
2#define AliT0CalibTimeEq_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"
1e7108ce 12#include "TH1F.h"
a2ad8166 13
14class AliT0CalibTimeEq: public TNamed {
15
16 public:
17 AliT0CalibTimeEq();
18 AliT0CalibTimeEq(const char* name);
19 AliT0CalibTimeEq(const AliT0CalibTimeEq &calibda);
20 AliT0CalibTimeEq& operator= (const AliT0CalibTimeEq &calibda);
21 virtual ~AliT0CalibTimeEq();
22 void Reset();
23
24 virtual void Print(Option_t* option= "") const;
a2ad8166 25
02888358 26 Bool_t ComputeOnlineParams(const char* filePhys);
1e7108ce 27 Bool_t ComputeOfflineParams(const char* filePhys);
28
a2ad8166 29 Float_t GetCFDvalue(Int_t channel,Int_t number) const {return fCFDvalue[channel][number];}
30 Float_t* GetCFDvalue() const {return (float*)fCFDvalue;}
31 Float_t GetTimeEq(Int_t channel) const {return fTimeEq[channel];}
32 Float_t* GetTimeEq() const {return (float*)fTimeEq;}
eef60a6a 33
34 Float_t GetTimeEqRms(Int_t channel) const {return fTimeEqRms[channel];}
35
548f30b4 36 Float_t GetMeanT0() const {return 1.;} // WARNING: USED IN AliT0Parameters!!!!
a2ad8166 37 void SetCFDvalue(Int_t channel, Int_t number, Float_t val) {fCFDvalue[channel][number]=val;}
38 void SetTimeEq(Int_t channel, Float_t val) {fTimeEq[channel]=val;}
eef60a6a 39 void SetTimeEqRms(Int_t channel, Float_t rms) { fTimeEqRms[channel]=rms;}
8bfd9a3e 40
b95e8d87 41 void SetMeanVertex(Float_t mean=0) { fMeanVertex = mean; };
42 Float_t GetMeanVertex () {return fMeanVertex;};
43
eef60a6a 44 void SetRmsVertex(Float_t rms=0) { fRmsVertex = rms; };
45 Float_t GetRmsVertex () {return fRmsVertex;};
a2ad8166 46
1e7108ce 47
a2ad8166 48 protected:
49
1e7108ce 50 void GetMeanAndSigma(TH1F* hist, Float_t &mean, Float_t &sigma);
a2ad8166 51 Float_t fCFDvalue[24][5]; // CFD values
52 Float_t fTimeEq[24]; // Time Equalized for OCDB
eef60a6a 53 Float_t fTimeEqRms[24]; // RMS of Time Equalized for OCDB
54 Float_t fMeanVertex; // mean of vertex distribution
55 Float_t fRmsVertex; // RMS of vertex distribution
a2ad8166 56 //
eef60a6a 57 ClassDef(AliT0CalibTimeEq,4) // T0 Sensor Calibration data
a2ad8166 58};
59
60typedef AliT0CalibTimeEq AliSTARTCalibTimeEq; // for backward compatibility
61
62#endif
63