18 bool alreadyOn =
false;
21 bool hasTDCValues=
true;
29 for (
int ibin = 0; ibin < lf.
size(); ++ibin) {
48 int preciseBegin = ibin * tdcBins;
49 int preciseEnd = preciseBegin + tdcBins;
52 for(
int i = preciseBegin;
i < preciseEnd; ++
i) {
56 if( (
i%3 == 0) && (lf.
preciseAt(
i) < TDC_Threshold) ) {
58 TDC_FallingEdge =
i-preciseBegin;
64 TDC_RisingEdge =
i-preciseBegin;
74 int packedTDC = TDC_RisingEdge + (tdcBins*2) * TDC_FallingEdge;
100 double const lsb(3.74);
double getThreshold(const HcalGenericDetId &detId) const
void setRandomEngine(CLHEP::HepRandomEngine &engine)
const HcalDbService * theDbService
double pedestal(int fCapId) const
get pedestal for capid=0..3
int preciseSize() const
get the size
float preciseAt(int i) const
const function to access precise samples
double pedestal(int fCapId) const
get pedestal width for capid=0..3
CLHEP::RandGaussQ * theRandGaussQ
int noTransitionCode() const
int alreadyTransitionCode() const
const HcalCalibrationWidths & getHcalCalibrationWidths(const HcalGenericDetId &fId) const
void timing(const CaloSamples &lf, HcalUpgradeDataFrame &digi) const
adds timing information to the digi
void setSample(int iSample, uint16_t adc, uint16_t tdc, bool dv)
int size() const
get the size
const HcalDetId & id() const
uint16_t adc(int iSample=0) const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
HcalTDC(unsigned int thresholdDAC=12)
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
HcalTDCParameters theTDCParameters