17 for (
int i=0;
i<df.size();
i++) {
25 for (
int i=0;
i<df.samples();
i++) {
27 if(df[
i].soi()) clf.setPresamples(
i);
33 for (
int i=0;
i<df.samples();
i++) {
35 if(df[
i].soi()) clf.setPresamples(
i);
41 df.setSize (clf.
size ());
43 for (
int i=0;
i<clf.
size();
i++) {
44 int capId = (fCapIdOffset +
i) % 4;
50 int presample = clf.presamples ();
51 for (
int i=0;
i<clf.size();
i++) {
52 int capId = (fCapIdOffset +
i) % 4;
53 bool soi = (
i==presample);
59 int presample = clf.presamples ();
60 df.setCapid0(fCapIdOffset%4);
61 for (
int i=0;
i<clf.size();
i++) {
62 int capId = (fCapIdOffset +
i) % 4;
63 bool soi = (
i==presample);
int adc(sample_type sample)
get the ADC sample (12 bits)
void adc2fC_(const Digi &df, CaloSamples &clf) const
int presamples() const
access presample information
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
virtual void fC2adc(const CaloSamples &clf, HBHEDataFrame &df, int fCapIdOffset) const
HcalCoderDb(const HcalQIECoder &fCoder, const HcalQIEShape &fShape)
void fC2adc_(const CaloSamples &clf, Digi &df, int fCapIdOffset) const
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
void setPresamples(int pre)
set presample information
const HcalQIEShape * mShape
int size() const
get the size
unsigned adc(const HcalQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -> ADC conversion
DetId id() const
get the (generic) id
const HcalQIECoder * mCoder
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.