5 #include "CLHEP/Random/RandGaussQ.h" 8 : theTDCParameters(), theDbService(
nullptr), threshold_currentTDC_(threshold_currentTDC), lsb(3.74) {}
15 bool risingReady(
true);
17 bool hasTDCValues =
true;
21 for (
int ibin = 0; ibin < lf.
size(); ++ibin) {
37 int preciseBegin = ibin * tdcBins;
38 int preciseEnd = preciseBegin + tdcBins;
41 for (
int i = preciseBegin;
i < preciseEnd; ++
i) {
43 if ((!risingReady) && (
i == preciseBegin) && (
i != 0)) {
54 TDC_RisingEdge =
i - preciseBegin;
57 TDC_RisingEdge =
i - preciseBegin;
58 }
else if (
i == (preciseEnd - 1))
62 if ((!risingReady) && (
i == (preciseEnd - 1)) && (
i != (lf.
size() * tdcBins - 1))) {
71 int packedTDC = TDC_RisingEdge;
72 digi.
setSample(ibin, digi[ibin].
adc(), packedTDC, digi[ibin].soi());
void setSample(edm::DataFrame::size_type isample, int adc, int tdc, bool soi=false)
set the sample contents
const HcalDbService * theDbService
int preciseSize() const
get the size
void timing(const CaloSamples &lf, QIE11DataFrame &digi) const
float preciseAt(int i) const
const function to access precise samples
double getThreshold() const
int noTransitionCode() const
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
int alreadyTransitionCode() const
HcalTDC(double threshold_currentTDC=0.)
int size() const
get the size
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
HcalTDCParameters theTDCParameters