CMS 3D CMS Logo

HcalCalibrations.h
Go to the documentation of this file.
1 #ifndef HCAL_CALIBRATIONS_H
2 #define HCAL_CALIBRATIONS_H
3 
10 public:
11  constexpr HcalCalibrations()
12  : mRespCorrGain{0, 0, 0, 0},
13  mPedestal{0, 0, 0, 0},
14  mEffectivePedestal{0, 0, 0, 0},
15  mRespCorr(0),
16  mTimeCorr(0),
17  mLUTCorr(0) {}
18  constexpr HcalCalibrations(const float fGain[4],
19  const float fPedestal[4],
20  const float fEffectivePedestal[4],
21  const float fRespCorr,
22  const float fTimeCorr,
23  const float fLUTCorr)
24  : mRespCorrGain{0, 0, 0, 0},
25  mPedestal{0, 0, 0, 0},
26  mEffectivePedestal{0, 0, 0, 0},
27  mRespCorr(0),
28  mTimeCorr(0),
29  mLUTCorr(0) {
30  for (auto iCap = 0; iCap < 4; ++iCap) {
31  mRespCorrGain[iCap] = fGain[iCap] * fRespCorr;
32  mPedestal[iCap] = fPedestal[iCap];
33  mEffectivePedestal[iCap] = fEffectivePedestal[iCap];
34  }
35  mRespCorr = fRespCorr;
36  mTimeCorr = fTimeCorr;
37  mLUTCorr = fLUTCorr;
38  }
40  constexpr double LUTrespcorrgain(int fCapId) const { return (mLUTCorr * mRespCorrGain[fCapId]); }
42  constexpr double respcorrgain(int fCapId) const { return mRespCorrGain[fCapId]; }
44  constexpr double rawgain(int fCapId) const { return mRespCorrGain[fCapId] / mRespCorr; }
46  constexpr double pedestal(int fCapId) const { return mPedestal[fCapId]; }
48  constexpr double effpedestal(int fCapId) const { return mEffectivePedestal[fCapId]; }
50  constexpr double respcorr() const { return mRespCorr; }
52  constexpr double timecorr() const { return mTimeCorr; }
53 
54 private:
55  double mRespCorrGain[4];
56  double mPedestal[4];
57  double mEffectivePedestal[4];
58  double mRespCorr;
59  double mTimeCorr;
60  double mLUTCorr;
61 };
62 
63 #endif
HcalCalibrations::respcorr
constexpr double respcorr() const
get response correction factor
Definition: HcalCalibrations.h:50
HcalCalibrations::rawgain
constexpr double rawgain(int fCapId) const
get raw gain for capid=0..3
Definition: HcalCalibrations.h:44
HcalCalibrations::HcalCalibrations
constexpr HcalCalibrations()
Definition: HcalCalibrations.h:11
HcalCalibrations::mRespCorr
double mRespCorr
Definition: HcalCalibrations.h:58
HcalCalibrations
Definition: HcalCalibrations.h:9
HcalCalibrations::respcorrgain
constexpr double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
Definition: HcalCalibrations.h:42
HcalCalibrations::timecorr
constexpr double timecorr() const
get time correction factor
Definition: HcalCalibrations.h:52
HcalCalibrations::effpedestal
constexpr double effpedestal(int fCapId) const
get effective pedestal for capid=0..3
Definition: HcalCalibrations.h:48
HcalCalibrations::mRespCorrGain
double mRespCorrGain[4]
Definition: HcalCalibrations.h:55
HcalCalibrations::mPedestal
double mPedestal[4]
Definition: HcalCalibrations.h:56
HcalCalibrations::HcalCalibrations
constexpr HcalCalibrations(const float fGain[4], const float fPedestal[4], const float fEffectivePedestal[4], const float fRespCorr, const float fTimeCorr, const float fLUTCorr)
Definition: HcalCalibrations.h:18
HcalCalibrations::mTimeCorr
double mTimeCorr
Definition: HcalCalibrations.h:59
HcalCalibrations::mLUTCorr
double mLUTCorr
Definition: HcalCalibrations.h:60
HcalCalibrations::LUTrespcorrgain
constexpr double LUTrespcorrgain(int fCapId) const
get LUT corrected and response corrected gain for capid=0..3
Definition: HcalCalibrations.h:40
HcalCalibrations::pedestal
constexpr double pedestal(int fCapId) const
get pedestal for capid=0..3
Definition: HcalCalibrations.h:46
HcalCalibrations::mEffectivePedestal
double mEffectivePedestal[4]
Definition: HcalCalibrations.h:57