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