Introducing new DP CavernAtmosPressure2.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALCalibTimeDep.h
CommitLineData
a42992b7 1#ifndef ALIEMCALCALIBTIMEDEP_H
2#define ALIEMCALCALIBTIMEDEP_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id: AliEMCALCalibTimeDep.h $ */
8
9/////////////////////////////////////////////////
10// class for EMCAL time-dependence calibration //
11/////////////////////////////////////////////////
12
13#include "TObject.h"
14
15class AliEMCALSensorTempArray;
d81e6423 16class AliCaloCalibSignal;
17class AliEMCALBiasAPD;
18class AliEMCALCalibMapAPD;
82d90a2f 19class AliEMCALCalibReference;
d81e6423 20class AliEMCALCalibTimeDepCorrection;
a42992b7 21
22class AliEMCALCalibTimeDep : public TObject {
23
24 public:
25 AliEMCALCalibTimeDep(); //! ctor
26 AliEMCALCalibTimeDep(const AliEMCALCalibTimeDep &calibt); //! copy ctor
27 AliEMCALCalibTimeDep& operator= (const AliEMCALCalibTimeDep &calibt); //!
28 virtual ~AliEMCALCalibTimeDep(); //! dtor
621ff010 29 virtual void PrintInfo() const;
a42992b7 30
31 void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);//!
32
d81e6423 33 // simple getters
34 Int_t GetRunNumber() const { return fRun; } //
35 Int_t GetStartTime() const { return fStartTime; } //
36 Int_t GetEndTime() const { return fEndTime; } //
37 Double_t GetLengthOfRunInHours() const; //
38 Double_t GetLengthOfRunInBins() const; //
39
40 // Temperature Section
a42992b7 41 // access pointer to the basic temperature object: AliEMCALSensorTempArray
42 AliEMCALSensorTempArray * GetTempArray() const { return fTempArray; } //
43
a42992b7 44 // range of temperature readings/values during the run
d81e6423 45 Int_t ScanTemperatureInfo(); // go through the temperature info
46 Double_t GetMinTemp() const { return fMinTemp; } //
47 Double_t GetMaxTemp() const { return fMaxTemp; } //
48 UInt_t GetMinTime() const { return fMinTime; } //
49 UInt_t GetMaxTime() const { return fMaxTime; } //
50 Double_t GetRangeOfTempMeasureInHours() const; //
51 Double_t GetRangeOfTempMeasureInDegrees() const; //
a42992b7 52
53 // basic calibration info
d81e6423 54 Double_t GetTemperature(UInt_t timeStamp) const; // for all sensors, all SuperModules
55 Double_t GetTemperatureSM(int imod, UInt_t timeStamp) const; // for all sensors, in a SuperModule
56 Double_t GetTemperatureSMSensor(int imod, int isens, UInt_t timeStamp) const; // for a sensor, in a SuperModule
57 // End of Temperature Section
58
59 // control parameters
60 void SetTemperatureResolution(Double_t d) { fTemperatureResolution = d; } // value for checking at which level we care about temperature differences
61 void SetTimeBinsPerHour(Int_t i) { fTimeBinsPerHour = i; } // size of the time-bins we use for corrections
62 Double_t GetTemperatureResolution() const { return fTemperatureResolution; } // value for checking at which level we care about temperature differences
63 Int_t GetTimeBinsPerHour() const { return fTimeBinsPerHour; } // size of the time-bins we use foc corrections
64
82d90a2f 65 void SetHighLowGainFactor(Double_t value) {fHighLowGainFactor = value;}
66 Double_t GetHighLowGainFactor() const {return fHighLowGainFactor;}
67
d81e6423 68 // access to other pointers
69 AliCaloCalibSignal * GetCalibSignal() const { return fCalibSignal; } //
70 AliEMCALBiasAPD * GetBiasAPD() const { return fBiasAPD; } //
71 AliEMCALCalibMapAPD * GetCalibMapAPD() const { return fCalibMapAPD; } //
82d90a2f 72 AliEMCALCalibReference * GetCalibReference() const { return fCalibReference; } //
d81e6423 73 AliEMCALCalibTimeDepCorrection * GetCalibTimeDepCorrection() const { return fCalibTimeDepCorrection; } //
74
75 // storage and access of the correction info
76 Int_t CalcCorrection(); //
77 AliEMCALCalibTimeDepCorrection * GetTimeDepCorrection()
78 const { return fCalibTimeDepCorrection; } //
79
80 Double_t GetTempCoeff(Double_t IDark, Double_t M) const; //
a42992b7 81
82 private:
83
d81e6423 84 void Reset(); //
85
a42992b7 86 void GetTemperatureInfo(); // pick up Preprocessor output
d81e6423 87 void GetCalibSignalInfo(); // pick up Preprocessor output
88 void GetBiasAPDInfo(); // pick up OCDB info
89 void GetCalibMapAPDInfo(); // pick up OCDB info
82d90a2f 90 void GetCalibReferenceInfo(); // pick up OCDB info
d81e6423 91
92 Int_t CalcLEDCorrection(Int_t nSM, Int_t nBins); // based on LED signals, and reference photodiodes
93 Int_t CalcLEDCorrectionStripBasis(Int_t nSM, Int_t nBins); // based on LED signals, and reference photodiodes
94 Int_t CalcTemperatureCorrection(Int_t nSM, Int_t nBins); // based on temperetare info
95
a42992b7 96 //
d81e6423 97 Int_t fRun;
98 UInt_t fStartTime;
99 UInt_t fEndTime;
100 // temperature stuff
101 Double_t fMinTemp;
102 Double_t fMaxTemp;
103 UInt_t fMinTime;
104 UInt_t fMaxTime;
a42992b7 105 //
d81e6423 106 Double_t fTemperatureResolution; // value for checking at which level we care about temperature differences
107 Int_t fTimeBinsPerHour; // size of the time-bins we use for corrections
108
82d90a2f 109 Double_t fHighLowGainFactor; //gain factor to convert between high and low gain
110
d81e6423 111 // pointers to the different used classes
a42992b7 112 AliEMCALSensorTempArray *fTempArray; // CDB class for temperature sensors
d81e6423 113 AliCaloCalibSignal *fCalibSignal; //
114 AliEMCALBiasAPD *fBiasAPD; //
115 AliEMCALCalibMapAPD *fCalibMapAPD; //
82d90a2f 116 AliEMCALCalibReference *fCalibReference;
d81e6423 117 AliEMCALCalibTimeDepCorrection *fCalibTimeDepCorrection; //
118
a42992b7 119 //
82d90a2f 120 ClassDef(AliEMCALCalibTimeDep,3) // EMCAL time-dep Calibration data
a42992b7 121};
122
123#endif