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