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());