14 unsigned index (
unsigned fRange,
unsigned fCapId) {
return fCapId * 4 + fRange;}
18 unsigned range = fShape.
range (fAdc);
24 for (
unsigned range = 0; range < 4; range++) {
25 float qieCharge = fCharge *
slope (fCapId, range) +
offset (fCapId, range);
26 unsigned minBin = 32*range;
27 float qieChargeMax = fShape.
highEdge (minBin + 31);
28 if (qieCharge <= qieChargeMax) {
29 for (
unsigned bin = minBin;
bin <= minBin + 31;
bin++) {
36 else if (range == 3) {
52 if (fCapId < 4
U && fRange < 4
U) {
56 std::cerr <<
"CastorQIECoder::setOffset-> Wrong parameters capid/range: " << fCapId <<
'/' << fRange << std::endl;
61 if (fCapId < 4
U && fRange < 4
U) {
65 std::cerr <<
"CastorQIECoder::setSlope-> Wrong parameters capid/range: " << fCapId <<
'/' << fRange << std::endl;
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
unsigned range(unsigned fAdc) const
float highEdge(unsigned fAdc) const
float charge(const CastorQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
bin
set the eta bin as selection string.
float center(unsigned fAdc) const
float offset(unsigned fCapId, unsigned fRange) const
unsigned adc(const CastorQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -> ADC conversion
float slope(unsigned fCapId, unsigned fRange) const