13 for (
int range = 0; range < 4; range++) {
14 for (
int capId = 0; capId < 4; capId++) {
16 mSlope [capId][range] = fSlope [
index (capId, range)];
22 int range = (fAdc >> 6) & 0x3;
33 for (
int range = 0; range < 4; range++) {
34 double qieCharge = (fCharge -
mOffset [fCapId][range]) *
mSlope [fCapId][range];
36 if (range == 3 && qieCharge > qieChargeMax) adc = 127;
37 if (qieCharge > qieChargeMax)
continue;
38 for (
int bin = 32*range;
bin < 32*(range+1);
bin++) {
double linearization(int fAdc) const
CastorChannelCoder(const float fOffset[16], const float fSlope[16])
int adc(const reco::castor::QieShape &fShape, double fCharge, int fCapId) const
fC + capid[0..3] -> ADC conversion
double charge(const reco::castor::QieShape &fShape, int fAdc, int fCapId) const
ADC[0..127]+capid[0..3]->fC conversion.
double binSize(int fAdc) const
int index(int fCapId, int Range)