14 unsigned index(
unsigned fRange,
unsigned fCapId) {
return fCapId * 4 + fRange; }
28 if (qieCharge <= qieChargeMax) {
35 }
else if (
range == 3) {
47 if (fCapId < 4
U && fRange < 4
U) {
50 std::cerr <<
"CastorQIECoder::setOffset-> Wrong parameters capid/range: " << fCapId <<
'/' << fRange << std::endl;
55 if (fCapId < 4
U && fRange < 4
U) {
58 std::cerr <<
"CastorQIECoder::setSlope-> Wrong parameters capid/range: " << fCapId <<
'/' << fRange << std::endl;
float charge(const CastorQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
float center(unsigned fAdc) const
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
unsigned range(unsigned fAdc) const
float highEdge(unsigned fAdc) const
unsigned adc(const CastorQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -> ADC conversion
float slope(unsigned fCapId, unsigned fRange) const
float offset(unsigned fCapId, unsigned fRange) const
void setOffset(unsigned fCapId, unsigned fRange, float fValue)