10 #include "CLHEP/Random/RandFlat.h"
17 : theParameterMap(parameterMap),
18 theAmplifier(amplifier),
19 theCoderFactory(coderFactory),
21 theStartingCapIdIsRandom(
true),
22 PreMixDigis(PreMixing) {}
41 CLHEP::HepRandomEngine* engine) {
49 CLHEP::HepRandomEngine* engine) {
56 for (
int isample = 0; isample !=
frame.size(); ++isample) {
57 uint16_t theADC = round(preMixFactor *
frame[isample]);
58 unsigned capId =
result[isample].capid();
60 if (theADC > preMixBits) {
61 uint16_t keepADC =
result[isample].adc();
73 unsigned preMixBits) {
74 for (
int isample = 0; isample !=
frame.size(); ++isample) {
75 uint16_t theADC = round(preMixFactor *
frame[isample]);
76 unsigned capId =
result[isample].capid();
79 if (theADC > preMixBits) {
80 theADC =
result[isample].adc();
85 isample, theADC,
result[isample].le_tdc(),
result[isample].te_tdc(), capId,
result[isample].soi(),
ok);
93 unsigned preMixBits) {
94 for (
int isample = 0; isample !=
frame.size(); ++isample) {
95 uint16_t theADC = round(preMixFactor *
frame[isample]);
98 if (theADC > preMixBits) {
99 theADC =
result[isample].adc();
103 result.setSample(isample, theADC, tdcErrorBit,
result[isample].soi());
107 template <
class Digi>
109 CLHEP::HepRandomEngine* engine,
CaloSamples& lf,
Digi&
result,
double preMixFactor,
unsigned preMixBits) {
110 convert<Digi>(lf,
result, engine);