17 inline unsigned index(
unsigned fRange,
unsigned fCapId) {
return fCapId * 4 + fRange; }
29 unsigned nbin = fShape.
nbins();
31 unsigned maxBin = minBin + nbin - 1;
32 float qieChargeMax = fShape.
highEdge(maxBin);
33 if (qieCharge <= qieChargeMax) {
40 }
else if (range == 3) {
41 return (4 * nbin - 1);
52 if (fCapId < 4U && fRange < 4U) {
55 std::cerr <<
"HcalQIECoder::setOffset-> Wrong parameters capid/range: " << fCapId <<
'/' << fRange << std::endl;
60 if (fCapId < 4U && fRange < 4U) {
63 std::cerr <<
"HcalQIECoder::setSlope-> Wrong parameters capid/range: " << fCapId <<
'/' << fRange << std::endl;
float slope(unsigned fCapId, unsigned fRange) const
constexpr unsigned int maxBin
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
const uint16_t range(const Frame &aFrame)
float offset(unsigned fCapId, unsigned fRange) const
float center(unsigned fAdc) const
unsigned adc(const HcalQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -> ADC conversion
unsigned range(unsigned fAdc) const
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
float highEdge(unsigned fAdc) const
constexpr unsigned int minBin
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.