18 for (
int i=0;
i<df.size();
i++) {
26 for (
int i=0;
i<df.samples();
i++) {
27 clf[
i]=mCoder->charge (*mShape, df[
i].
adc (), df[
i].capid ());
34 df.setSize (clf.
size ());
36 for (
int i=0;
i<clf.
size();
i++) {
37 int capId = (fCapIdOffset +
i) % 4;
45 for (
int i=0;
i<clf.
size(); ++
i) {
52 int presample = clf.presamples ();
53 for (
int i=0;
i<clf.size();
i++) {
54 int capId = (fCapIdOffset +
i) % 4;
55 bool soi = (
i==presample);
56 df.setSample(
i, mCoder->adc(*mShape, clf[
i], capId), 0, 0, capId, soi,
true);
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
void fCUpgrade2adc_(const CaloSamples &clf, Digi &df, int fCapIdOffset) const
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
void setSample(int iSample, uint16_t adc, uint16_t tdc, bool dv)
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.