1 #ifndef ALIEMCALCALIBTIMEDEP_H
2 #define ALIEMCALCALIBTIMEDEP_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 /* $Id: AliEMCALCalibTimeDep.h $ */
9 /////////////////////////////////////////////////
10 // class for EMCAL time-dependence calibration //
11 /////////////////////////////////////////////////
15 class AliEMCALSensorTempArray;
16 class AliCaloCalibSignal;
17 class AliEMCALCalibTempCoeff;
18 class AliEMCALCalibReference;
19 class AliEMCALCalibTimeDepCorrection;
21 class AliEMCALCalibTimeDep : public TObject {
24 AliEMCALCalibTimeDep(); //! ctor
25 AliEMCALCalibTimeDep(const AliEMCALCalibTimeDep &calibt); //! copy ctor
26 AliEMCALCalibTimeDep& operator= (const AliEMCALCalibTimeDep &calibt); //!
27 virtual ~AliEMCALCalibTimeDep(); //! dtor
28 virtual void PrintInfo() const;
30 void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);//!
33 Int_t GetRunNumber() const { return fRun; } //
34 UInt_t GetStartTime() const { return fStartTime; } //
35 UInt_t GetEndTime() const { return fEndTime; } //
36 Double_t GetLengthOfRunInHours() const; //
37 Double_t GetLengthOfRunInBins() const; //
39 // Temperature Section
40 // access pointer to the basic temperature object: AliEMCALSensorTempArray
41 AliEMCALSensorTempArray * GetTempArray() const { return fTempArray; } // temperature array
43 // range of temperature readings/values during the run
44 Int_t ScanTemperatureInfo(); // go through the temperature info
45 Double_t GetMinTemp() const { return fMinTemp; } //
46 Double_t GetMaxTemp() const { return fMaxTemp; } //
47 Double_t GetMinTempVariation() const { return fMinTempVariation; } //
48 Double_t GetMaxTempVariation() const { return fMaxTempVariation; } //
49 UInt_t GetMinTime() const { return fMinTime; } //
50 UInt_t GetMaxTime() const { return fMaxTime; } //
51 Double_t GetRangeOfTempMeasureInHours() const; //!
52 Double_t GetRangeOfTempMeasureInDegrees() const; //!
54 // basic calibration info
55 Double_t GetTemperatureSM(int imod, UInt_t timeStamp) const; // for all sensors, in a SuperModule
56 // End of Temperature Section
59 void SetTemperatureResolution(Double_t d) { fTemperatureResolution = d; } // value for checking at which level we care about temperature differences
60 void SetMaxTemperatureDiff(Double_t d) { fMaxTemperatureDiff = d; }
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 Double_t GetMaxTemperatureDiff() const { return fMaxTemperatureDiff; }
64 Int_t GetTimeBinsPerHour() const { return fTimeBinsPerHour; } // size of the time-bins we use foc corrections
66 void SetHighLowGainFactor(Double_t value) {fHighLowGainFactor = value;}
67 Double_t GetHighLowGainFactor() const {return fHighLowGainFactor;}
69 // access to other pointers
70 AliCaloCalibSignal * GetCalibSignal() const { return fCalibSignal; } //
71 AliEMCALCalibTempCoeff * GetCalibTempCoeff() const { return fCalibTempCoeff; } //
72 AliEMCALCalibReference * GetCalibReference() const { return fCalibReference; } //
74 // storage and access of the correction info
75 Int_t CalcCorrection(); //
76 AliEMCALCalibTimeDepCorrection * GetCalibTimeDepCorrection()
77 const { return fCalibTimeDepCorrection; } //
79 Double_t GetTempCoeff(Double_t IDark, Double_t M) const; //
81 // for local debugging: setters of the main input pointers that are normally from OCDB
82 void SetTempArray(AliEMCALSensorTempArray *arr) { fTempArray = arr; } //
83 void SetCalibSignal(AliCaloCalibSignal *obj) { fCalibSignal = obj; } //
84 void SetCalibTempCoeff(AliEMCALCalibTempCoeff *obj) { fCalibTempCoeff = obj; } //
85 void SetCalibReference(AliEMCALCalibReference *obj) { fCalibReference = obj; } //
86 // basic setters, also for local debugging
87 void SetRunNumber(Int_t i) { fRun= i; } //
88 void SetStartTime(UInt_t ui) { fStartTime = ui; } //
89 void SetEndTime(UInt_t ui) { fEndTime = ui; } //
91 Int_t GetVerbosity() const { return fVerbosity; } // debug flag
92 void SetVerbosity(Int_t i) { fVerbosity= i; } // debug flag
98 void GetTemperatureInfo(); // pick up Preprocessor output
99 void GetCalibSignalInfo(); // pick up Preprocessor output
100 void GetCalibTempCoeffInfo(); // pick up OCDB info
101 void GetCalibReferenceInfo(); // pick up OCDB info
103 Int_t CalcLEDCorrection(Int_t nSM, Int_t nBins); // based on LED signals, and reference photodiodes
104 Int_t CalcLEDCorrectionStripBasis(Int_t nSM, Int_t nBins); // based on LED signals, and reference photodiodes
105 Int_t CalcTemperatureCorrection(Int_t nSM, Int_t nBins, Int_t binSize); // based on temperature info
108 Int_t fRun; // run number
109 UInt_t fStartTime; // start timestamp
110 UInt_t fEndTime; // end timestamp
112 Double_t fMinTemp; // min temp
113 Double_t fMaxTemp; // max temp
114 Double_t fMinTempVariation; // min temp variation, within a sensor
115 Double_t fMaxTempVariation; // max temp variation, within a sensor
116 UInt_t fMinTime; // min time
117 UInt_t fMaxTime; // max time
119 Double_t fTemperatureResolution; // value for checking at which level we care about temperature differences
120 Double_t fMaxTemperatureDiff; // value for checking that temperature sensor info seems reasonable
121 Int_t fTimeBinsPerHour; // size of the time-bins we use for corrections
123 Double_t fHighLowGainFactor; //gain factor to convert between high and low gain
125 // pointers to the different used classes
126 AliEMCALSensorTempArray *fTempArray; // CDB class for temperature sensors
127 AliCaloCalibSignal *fCalibSignal; // LED signal info
128 AliEMCALCalibTempCoeff *fCalibTempCoeff; // Temperature Coefficient info
129 AliEMCALCalibReference *fCalibReference; // reference info
130 AliEMCALCalibTimeDepCorrection *fCalibTimeDepCorrection; // correction values
132 Int_t fVerbosity; // debug flag
135 ClassDef(AliEMCALCalibTimeDep,4) // EMCAL time-dep Calibration data