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:
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
constexpr double effpedestal(int fCapId) const
get effective pedestal for capid=0..3
constexpr double LUTrespcorrgain(int fCapId) const
get LUT corrected and response corrected gain for capid=0..3
constexpr double timecorr() const
get time correction factor
constexpr double pedestal(int fCapId) const
get pedestal for capid=0..3
constexpr double rawgain(int fCapId) const
get raw gain for capid=0..3
constexpr HcalCalibrations(const float fGain[4], const float fPedestal[4], const float fEffectivePedestal[4], const float fRespCorr, const float fTimeCorr, const float fLUTCorr)
double mEffectivePedestal[4]
constexpr HcalCalibrations()
constexpr double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
constexpr double respcorr() const
get response correction factor
double mRespCorrGain[4]