14 for (
int range = 0; range < 4; range++) {
15 for (
int capId = 0; capId < 4; capId++) {
17 mSlope [capId][range] = fSlope [
index (capId, range)];
23 int range = (fAdc >> 6) & 0x3;
34 for (
int range = 0; range < 4; range++) {
35 double qieCharge = (fCharge -
mOffset [fCapId][range]) *
mSlope [fCapId][range];
37 if (range == 3 && qieCharge > qieChargeMax) adc = 127;
38 if (qieCharge > qieChargeMax)
continue;
39 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)