]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALCalibTimeDep.h
EMCAL_FIRSTYEARV1 - geometry for December 2009 to December 2010 run period;
[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
716fca62 34 Int_t GetRunNumber() const { return fRun; } //
35 UInt_t GetStartTime() const { return fStartTime; } //
36 UInt_t GetEndTime() const { return fEndTime; } //
37 Double_t GetLengthOfRunInHours() const; //
38 Double_t GetLengthOfRunInBins() const; //
d81e6423 39
40 // Temperature Section
a42992b7 41 // access pointer to the basic temperature object: AliEMCALSensorTempArray
0ce5c45d 42 AliEMCALSensorTempArray * GetTempArray() const { return fTempArray; } // temperature array
a42992b7 43
a42992b7 44 // range of temperature readings/values during the run
d81e6423 45 Int_t ScanTemperatureInfo(); // go through the temperature info
716fca62 46 Double_t GetMinTemp() const { return fMinTemp; } //
47 Double_t GetMaxTemp() const { return fMaxTemp; } //
48 Double_t GetMinTempVariation() const { return fMinTempVariation; } //
49 Double_t GetMaxTempVariation() const { return fMaxTempVariation; } //
50 UInt_t GetMinTime() const { return fMinTime; } //
51 UInt_t GetMaxTime() const { return fMaxTime; } //
0ce5c45d 52 Double_t GetRangeOfTempMeasureInHours() const; //!
53 Double_t GetRangeOfTempMeasureInDegrees() const; //!
a42992b7 54
55 // basic calibration info
d81e6423 56 Double_t GetTemperature(UInt_t timeStamp) const; // for all sensors, all SuperModules
57 Double_t GetTemperatureSM(int imod, UInt_t timeStamp) const; // for all sensors, in a SuperModule
58 Double_t GetTemperatureSMSensor(int imod, int isens, UInt_t timeStamp) const; // for a sensor, in a SuperModule
59 // End of Temperature Section
60
61 // control parameters
62 void SetTemperatureResolution(Double_t d) { fTemperatureResolution = d; } // value for checking at which level we care about temperature differences
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
65 Int_t GetTimeBinsPerHour() const { return fTimeBinsPerHour; } // size of the time-bins we use foc corrections
66
82d90a2f 67 void SetHighLowGainFactor(Double_t value) {fHighLowGainFactor = value;}
68 Double_t GetHighLowGainFactor() const {return fHighLowGainFactor;}
69
d81e6423 70 // access to other pointers
71 AliCaloCalibSignal * GetCalibSignal() const { return fCalibSignal; } //
72 AliEMCALBiasAPD * GetBiasAPD() const { return fBiasAPD; } //
73 AliEMCALCalibMapAPD * GetCalibMapAPD() const { return fCalibMapAPD; } //
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; } //
86 void SetBiasAPD(AliEMCALBiasAPD *obj) { fBiasAPD = obj; } //
87 void SetCalibMapAPD(AliEMCALCalibMapAPD *obj) { fCalibMapAPD = obj; } //
88 void SetCalibReference(AliEMCALCalibReference *obj) { fCalibReference = obj; } //
89 // basic setters, also for local debugging
90 void SetRunNumber(Int_t i) { fRun= i; } //
91 void SetStartTime(UInt_t ui) { fStartTime = ui; } //
92 void SetEndTime(UInt_t ui) { fEndTime = ui; } //
93
94 Int_t GetVerbosity() const { return fVerbosity; } // debug flag
95 void SetVerbosity(Int_t i) { fVerbosity= i; } // debug flag
96
a42992b7 97 private:
98
d81e6423 99 void Reset(); //
100
a42992b7 101 void GetTemperatureInfo(); // pick up Preprocessor output
d81e6423 102 void GetCalibSignalInfo(); // pick up Preprocessor output
103 void GetBiasAPDInfo(); // pick up OCDB info
104 void GetCalibMapAPDInfo(); // pick up OCDB info
82d90a2f 105 void GetCalibReferenceInfo(); // pick up OCDB info
d81e6423 106
107 Int_t CalcLEDCorrection(Int_t nSM, Int_t nBins); // based on LED signals, and reference photodiodes
108 Int_t CalcLEDCorrectionStripBasis(Int_t nSM, Int_t nBins); // based on LED signals, and reference photodiodes
716fca62 109 Int_t CalcTemperatureCorrection(Int_t nSM, Int_t nBins, Int_t binSize); // based on temperature info
d81e6423 110
a42992b7 111 //
0ce5c45d 112 Int_t fRun; // run number
113 UInt_t fStartTime; // start timestamp
114 UInt_t fEndTime; // end timestamp
d81e6423 115 // temperature stuff
0ce5c45d 116 Double_t fMinTemp; // min temp
117 Double_t fMaxTemp; // max temp
716fca62 118 Double_t fMinTempVariation; // min temp variation, within a sensor
119 Double_t fMaxTempVariation; // max temp variation, within a sensor
0ce5c45d 120 UInt_t fMinTime; // min time
121 UInt_t fMaxTime; // max time
a42992b7 122 //
d81e6423 123 Double_t fTemperatureResolution; // value for checking at which level we care about temperature differences
124 Int_t fTimeBinsPerHour; // size of the time-bins we use for corrections
125
82d90a2f 126 Double_t fHighLowGainFactor; //gain factor to convert between high and low gain
127
d81e6423 128 // pointers to the different used classes
a42992b7 129 AliEMCALSensorTempArray *fTempArray; // CDB class for temperature sensors
0ce5c45d 130 AliCaloCalibSignal *fCalibSignal; // LED signal info
131 AliEMCALBiasAPD *fBiasAPD; // bias APD info
132 AliEMCALCalibMapAPD *fCalibMapAPD; // calib & map APD info
133 AliEMCALCalibReference *fCalibReference; // reference info
134 AliEMCALCalibTimeDepCorrection *fCalibTimeDepCorrection; // correction values
d81e6423 135
716fca62 136 Int_t fVerbosity; // debug flag
137
a42992b7 138 //
82d90a2f 139 ClassDef(AliEMCALCalibTimeDep,3) // EMCAL time-dep Calibration data
a42992b7 140};
141
142#endif