5 #include "CLHEP/Random/RandGaussQ.h"
8 : theTDCParameters(), theDbService(nullptr), threshold_currentTDC_(threshold_currentTDC), lsb(3.74) {}
16 for (
int ibin = 0; ibin < lf.
size(); ++ibin) {
17 digi.
setSample(ibin, digi[ibin].
adc(), packedTDCs[ibin], digi[ibin].soi());
25 for (
int ibin = 0; ibin < lf.
size(); ++ibin) {
37 bool risingReady(
true);
39 bool hasTDCValues =
true;
43 for (
int ibin = 0; ibin < lf.
size(); ++ibin) {
58 int preciseBegin = ibin * tdcBins;
59 int preciseEnd = preciseBegin + tdcBins;
62 for (
int i = preciseBegin;
i < preciseEnd; ++
i) {
63 if ((!risingReady) && (
i == preciseBegin) && (
i != 0)) {
73 TDC_RisingEdge =
i - preciseBegin;
75 }
else if (
i == (preciseEnd - 1)) {
80 if ((!risingReady) && (
i == (preciseEnd - 1))) {
90 int packedTDC = TDC_RisingEdge;
92 result.push_back(packedTDC);
constexpr int capid() const
constexpr void setSample(edm::DataFrame::size_type isample, int adc, int le_tdc, int te_tdc, int capid, bool soi=false, bool ok=true)
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
std::vector< int > leadingEdgeTDC(const CaloSamples &lf) const
double getThreshold() const
int noTransitionCode() const
constexpr bool soi() const
int alreadyTransitionCode() const
constexpr void setSample(edm::DataFrame::size_type isample, int adc, int tdc, bool soi=false)
set the sample contents
constexpr int adc() const
HcalTDC(double threshold_currentTDC=0.)
int size() const
get the size
constexpr bool ok() const
uint16_t *__restrict__ uint16_t const *__restrict__ adc
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
HcalTDCParameters theTDCParameters