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}, mPedestal{0,0,0,0}, mEffectivePedestal{0,0,0,0},
13  mRespCorr(0), mTimeCorr(0), mLUTCorr(0)
14  {}
15  constexpr HcalCalibrations (const float fGain [4], const float fPedestal [4],
16  const float fEffectivePedestal[4], const float fRespCorr,
17  const float fTimeCorr, const float fLUTCorr)
18  : mRespCorrGain{0,0,0,0}, mPedestal{0,0,0,0}, mEffectivePedestal{0,0,0,0},
19  mRespCorr(0), mTimeCorr(0), mLUTCorr(0) {
20  for (auto iCap = 0; iCap < 4; ++iCap) {
21  mRespCorrGain [iCap] = fGain [iCap] * fRespCorr;
22  mPedestal [iCap] = fPedestal [iCap];
23  mEffectivePedestal [iCap] = fEffectivePedestal [iCap];
24  }
25  mRespCorr = fRespCorr;
26  mTimeCorr = fTimeCorr;
27  mLUTCorr = fLUTCorr;
28  }
30  constexpr double LUTrespcorrgain (int fCapId) const {return (mLUTCorr * mRespCorrGain [fCapId]);}
32  constexpr double respcorrgain (int fCapId) const {return mRespCorrGain [fCapId];}
34  constexpr double rawgain (int fCapId) const {return mRespCorrGain [fCapId] / mRespCorr;}
36  constexpr double pedestal (int fCapId) const {return mPedestal [fCapId];}
38  constexpr double effpedestal (int fCapId) const {return mEffectivePedestal [fCapId];}
40  constexpr double respcorr () const {return mRespCorr;}
42  constexpr double timecorr () const {return mTimeCorr;}
43  private:
44  double mRespCorrGain [4];
45  double mPedestal [4];
46  double mEffectivePedestal [4];
47  double mRespCorr;
48  double mTimeCorr;
49  double mLUTCorr;
50 };
51 
52 #endif
constexpr double rawgain(int fCapId) const
get raw gain for capid=0..3
#define constexpr
constexpr HcalCalibrations(const float fGain[4], const float fPedestal[4], const float fEffectivePedestal[4], const float fRespCorr, const float fTimeCorr, const float fLUTCorr)
constexpr double effpedestal(int fCapId) const
get effective pedestal for capid=0..3
double mEffectivePedestal[4]
constexpr HcalCalibrations()
constexpr double pedestal(int fCapId) const
get 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
double mRespCorrGain[4]
constexpr double respcorr() const
get response correction factor
constexpr double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3