4 : linLSB_si_(conf.getParameter<double>(
"linLSB_si")),
5 adcsaturation_si_(conf.getParameter<double>(
"adcsaturation_si")),
6 tdcnBits_si_(conf.getParameter<uint32_t>(
"tdcnBits_si")),
7 tdcOnset_si_(conf.getParameter<double>(
"tdcOnset_si")),
8 adcnBits_si_(conf.getParameter<uint32_t>(
"adcnBits_si")),
9 tdcsaturation_si_(conf.getParameter<double>(
"tdcsaturation_si")),
10 linLSB_sc_(conf.getParameter<double>(
"linLSB_sc")),
11 adcsaturation_sc_(conf.getParameter<double>(
"adcsaturation_sc")),
12 tdcnBits_sc_(conf.getParameter<uint32_t>(
"tdcnBits_sc")),
13 tdcOnset_sc_(conf.getParameter<double>(
"tdcOnset_sc")),
14 adcnBits_sc_(conf.getParameter<uint32_t>(
"adcnBits_sc")),
15 tdcsaturation_sc_(conf.getParameter<double>(
"tdcsaturation_sc")),
16 linnBits_(conf.getParameter<uint32_t>(
"linnBits")),
17 oot_coefficients_(conf.getParameter<
std::vector<double>>(
"oot_coefficients")) {
18 constexpr
int kOot_order = 2;
20 throw cms::Exception(
"BadConfiguration") <<
"OOT subtraction needs " << kOot_order <<
" coefficients";
30 std::vector<std::pair<DetId, uint32_t>>& linearized_dataframes) {
31 constexpr
int kIntimeSample = 2;
32 constexpr
int kOuttime1Sample = 1;
33 constexpr
int kOuttime2Sample = 0;
35 for (
const auto&
frame : dataframes) {
37 uint32_t amplitude_int = 0;
38 unsigned det =
frame.id().det();
51 double data =
frame[kIntimeSample].data();
62 amplitude_int = uint32_t(floor(
amplitude / linLSB + 0.5));
75 amplitude_int = uint32_t(floor(
amplitude / linLSB + 0.5));
76 if (amplitude_int == 0)
81 linearized_dataframes.push_back(std::make_pair(
frame.id(), amplitude_int));