]>
Commit | Line | Data |
---|---|---|
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 | ||
15 | class AliEMCALSensorTempArray; | |
d81e6423 | 16 | class AliCaloCalibSignal; |
ed3db319 | 17 | class AliEMCALCalibTempCoeff; |
82d90a2f | 18 | class AliEMCALCalibReference; |
d81e6423 | 19 | class AliEMCALCalibTimeDepCorrection; |
a42992b7 | 20 | |
21 | class AliEMCALCalibTimeDep : public TObject { | |
22 | ||
23 | public: | |
24 | AliEMCALCalibTimeDep(); //! ctor | |
25 | AliEMCALCalibTimeDep(const AliEMCALCalibTimeDep &calibt); //! copy ctor | |
26 | AliEMCALCalibTimeDep& operator= (const AliEMCALCalibTimeDep &calibt); //! | |
27 | virtual ~AliEMCALCalibTimeDep(); //! dtor | |
621ff010 | 28 | virtual void PrintInfo() const; |
a42992b7 | 29 | |
30 | void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);//! | |
31 | ||
d81e6423 | 32 | // simple getters |
716fca62 | 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; // | |
d81e6423 | 38 | |
39 | // Temperature Section | |
a42992b7 | 40 | // access pointer to the basic temperature object: AliEMCALSensorTempArray |
0ce5c45d | 41 | AliEMCALSensorTempArray * GetTempArray() const { return fTempArray; } // temperature array |
a42992b7 | 42 | |
a42992b7 | 43 | // range of temperature readings/values during the run |
d81e6423 | 44 | Int_t ScanTemperatureInfo(); // go through the temperature info |
716fca62 | 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; } // | |
1740b16f | 49 | Double_t GetMinTempValid() const { return fMinTempValid; } // |
50 | Double_t GetMaxTempValid() const { return fMaxTempValid; } // | |
716fca62 | 51 | UInt_t GetMinTime() const { return fMinTime; } // |
52 | UInt_t GetMaxTime() const { return fMaxTime; } // | |
0ce5c45d | 53 | Double_t GetRangeOfTempMeasureInHours() const; //! |
54 | Double_t GetRangeOfTempMeasureInDegrees() const; //! | |
a42992b7 | 55 | |
56 | // basic calibration info | |
d81e6423 | 57 | Double_t GetTemperatureSM(int imod, UInt_t timeStamp) const; // for all sensors, in a SuperModule |
d81e6423 | 58 | // End of Temperature Section |
59 | ||
60 | // control parameters | |
61 | void SetTemperatureResolution(Double_t d) { fTemperatureResolution = d; } // value for checking at which level we care about temperature differences | |
ed3db319 | 62 | void SetMaxTemperatureDiff(Double_t d) { fMaxTemperatureDiff = d; } |
d81e6423 | 63 | void SetTimeBinsPerHour(Int_t i) { fTimeBinsPerHour = i; } // size of the time-bins we use for corrections |
64 | Double_t GetTemperatureResolution() const { return fTemperatureResolution; } // value for checking at which level we care about temperature differences | |
ed3db319 | 65 | Double_t GetMaxTemperatureDiff() const { return fMaxTemperatureDiff; } |
d81e6423 | 66 | Int_t GetTimeBinsPerHour() const { return fTimeBinsPerHour; } // size of the time-bins we use foc corrections |
67 | ||
82d90a2f | 68 | void SetHighLowGainFactor(Double_t value) {fHighLowGainFactor = value;} |
69 | Double_t GetHighLowGainFactor() const {return fHighLowGainFactor;} | |
70 | ||
d81e6423 | 71 | // access to other pointers |
72 | AliCaloCalibSignal * GetCalibSignal() const { return fCalibSignal; } // | |
ed3db319 | 73 | AliEMCALCalibTempCoeff * GetCalibTempCoeff() const { return fCalibTempCoeff; } // |
82d90a2f | 74 | AliEMCALCalibReference * GetCalibReference() const { return fCalibReference; } // |
d81e6423 | 75 | |
76 | // storage and access of the correction info | |
77 | Int_t CalcCorrection(); // | |
716fca62 | 78 | AliEMCALCalibTimeDepCorrection * GetCalibTimeDepCorrection() |
d81e6423 | 79 | const { return fCalibTimeDepCorrection; } // |
80 | ||
81 | Double_t GetTempCoeff(Double_t IDark, Double_t M) const; // | |
a42992b7 | 82 | |
716fca62 | 83 | // for local debugging: setters of the main input pointers that are normally from OCDB |
84 | void SetTempArray(AliEMCALSensorTempArray *arr) { fTempArray = arr; } // | |
85 | void SetCalibSignal(AliCaloCalibSignal *obj) { fCalibSignal = obj; } // | |
ed3db319 | 86 | void SetCalibTempCoeff(AliEMCALCalibTempCoeff *obj) { fCalibTempCoeff = obj; } // |
716fca62 | 87 | void SetCalibReference(AliEMCALCalibReference *obj) { fCalibReference = obj; } // |
88 | // basic setters, also for local debugging | |
89 | void SetRunNumber(Int_t i) { fRun= i; } // | |
90 | void SetStartTime(UInt_t ui) { fStartTime = ui; } // | |
91 | void SetEndTime(UInt_t ui) { fEndTime = ui; } // | |
92 | ||
1740b16f | 93 | void SetMinTempValid(Double_t d) { fMinTempValid = d; } // |
94 | void SetMaxTempValid(Double_t d) { fMaxTempValid = d; } // | |
95 | ||
716fca62 | 96 | Int_t GetVerbosity() const { return fVerbosity; } // debug flag |
97 | void SetVerbosity(Int_t i) { fVerbosity= i; } // debug flag | |
98 | ||
a42992b7 | 99 | private: |
100 | ||
d81e6423 | 101 | void Reset(); // |
102 | ||
a42992b7 | 103 | void GetTemperatureInfo(); // pick up Preprocessor output |
d81e6423 | 104 | void GetCalibSignalInfo(); // pick up Preprocessor output |
ed3db319 | 105 | void GetCalibTempCoeffInfo(); // pick up OCDB info |
82d90a2f | 106 | void GetCalibReferenceInfo(); // pick up OCDB info |
d81e6423 | 107 | |
108 | Int_t CalcLEDCorrection(Int_t nSM, Int_t nBins); // based on LED signals, and reference photodiodes | |
109 | Int_t CalcLEDCorrectionStripBasis(Int_t nSM, Int_t nBins); // based on LED signals, and reference photodiodes | |
716fca62 | 110 | Int_t CalcTemperatureCorrection(Int_t nSM, Int_t nBins, Int_t binSize); // based on temperature info |
d81e6423 | 111 | |
a42992b7 | 112 | // |
0ce5c45d | 113 | Int_t fRun; // run number |
114 | UInt_t fStartTime; // start timestamp | |
115 | UInt_t fEndTime; // end timestamp | |
d81e6423 | 116 | // temperature stuff |
0ce5c45d | 117 | Double_t fMinTemp; // min temp |
118 | Double_t fMaxTemp; // max temp | |
716fca62 | 119 | Double_t fMinTempVariation; // min temp variation, within a sensor |
120 | Double_t fMaxTempVariation; // max temp variation, within a sensor | |
1740b16f | 121 | Double_t fMinTempValid; // min limit for when temp. readings appear valid |
122 | Double_t fMaxTempValid; // max limit for when temp. readings appear valid | |
0ce5c45d | 123 | UInt_t fMinTime; // min time |
124 | UInt_t fMaxTime; // max time | |
a42992b7 | 125 | // |
d81e6423 | 126 | Double_t fTemperatureResolution; // value for checking at which level we care about temperature differences |
ed3db319 | 127 | Double_t fMaxTemperatureDiff; // value for checking that temperature sensor info seems reasonable |
d81e6423 | 128 | Int_t fTimeBinsPerHour; // size of the time-bins we use for corrections |
129 | ||
82d90a2f | 130 | Double_t fHighLowGainFactor; //gain factor to convert between high and low gain |
131 | ||
d81e6423 | 132 | // pointers to the different used classes |
a42992b7 | 133 | AliEMCALSensorTempArray *fTempArray; // CDB class for temperature sensors |
0ce5c45d | 134 | AliCaloCalibSignal *fCalibSignal; // LED signal info |
ed3db319 | 135 | AliEMCALCalibTempCoeff *fCalibTempCoeff; // Temperature Coefficient info |
0ce5c45d | 136 | AliEMCALCalibReference *fCalibReference; // reference info |
137 | AliEMCALCalibTimeDepCorrection *fCalibTimeDepCorrection; // correction values | |
d81e6423 | 138 | |
716fca62 | 139 | Int_t fVerbosity; // debug flag |
140 | ||
a42992b7 | 141 | // |
1740b16f | 142 | ClassDef(AliEMCALCalibTimeDep,5) // EMCAL time-dep Calibration data |
a42992b7 | 143 | }; |
144 | ||
145 | #endif |