19 unsigned int LGMode) :
20 m_msgFunc_p(msgFunc_p),
21 m_nSample(nSample), m_deltaTSample(deltaTSample), m_preSampleIdx(preSampleIdx),
22 m_fitFunction(std::move(fitFunction)),
24 m_repassEnabled(false),
31 m_currentECalibCoeff ({{{{1, 1, 1, 1}}, {{1, 1, 1, 1}}}}),
32 m_currentT0OffsetsHG ({{{{0, 0, 0, 0}}, {{0, 0, 0, 0}}}}),
33 m_currentT0OffsetsLG ({{{{0, 0, 0, 0}}, {{0, 0, 0, 0}}}}),
36 m_moduleSum({{0, 0}}),
37 m_moduleSumErrSq({{0, 0}}),
38 m_moduleSumPreSample({{0, 0}}),
39 m_calibModuleSum({{0, 0}}),
40 m_calibModuleSumErrSq({{0, 0}}),
41 m_averageTime({{0, 0}}),
42 m_fail({{
false,
false}})
44 m_moduleDisabled[0] = {{
false,
false,
false,
false}};
45 m_moduleDisabled[1] = {{
false,
false,
false,
false}};
47 m_moduleAnalyzers[0] = {{0, 0, 0, 0}};
48 m_moduleAnalyzers[1] = {{0, 0, 0, 0}};
50 m_calibAmplitude[0] = {{0, 0, 0, 0}};
51 m_calibAmplitude[1] = {{0, 0, 0, 0}};
53 m_calibTime[0] = {{0, 0, 0, 0}};
54 m_calibTime[1] = {{0, 0, 0, 0}};
56 m_dataLoaded[0] = {{
false,
false,
false,
false}};
57 m_dataLoaded[1] = {{
false,
false,
false,
false}};
59 m_delayedOrder[0] = {0, 0, 0, 0};
60 m_delayedOrder[1] = {0, 0, 0, 0};
64 m_HGGains[0] = {{10, 10, 10, 10}};
65 m_HGGains[1] = {{10, 10, 10, 10}};
67 m_pedestals[0] = {{100, 100, 100, 100}};
68 m_pedestals[1] = {{100, 100, 100, 100}};
73 for (
size_t side : {0, 1}) {
74 for (
size_t module : {0, 1, 2, 3}) {
75 std::ostringstream moduleTag;
78 m_moduleAnalyzers[
side][
module].reset (
new ZDCPulseAnalyzer(m_msgFunc_p, moduleTag.str(), m_nSample, m_deltaTSample, m_preSampleIdx,
83 m_moduleAnalyzers[
side][
module]->setLGMode(m_LGMode);
111 int delayedOrder = deltaT < 0 ? -1 : 1;
112 for (
size_t side : {0, 1}) {
113 for (
size_t module : {0, 1, 2, 3}) {
122 for (
size_t side : {0, 1}) {
123 for (
size_t module : {0, 1, 2, 3}) {
137 for (
size_t side : {0, 1}) {
138 for (
size_t module : {0, 1, 2, 3}) {
146 for (
size_t side : {0, 1}) {
147 for (
size_t module : {0, 1, 2, 3}) {
155 for (
size_t side : {0, 1}) {
156 for (
size_t module : {0, 1, 2, 3}) {
164 for (
size_t side : {0, 1}) {
165 for (
size_t module : {0, 1, 2, 3}) {
175 for (
size_t side : {0, 1}) {
176 for (
size_t module : {0, 1, 2, 3}) {
184 for (
size_t side : {0, 1}) {
185 for (
size_t module : {0, 1, 2, 3}) {
193 for (
size_t side : {0, 1}) {
194 for (
size_t module : {0, 1, 2, 3}) {
202 for (
size_t side : {0, 1}) {
203 for (
size_t module : {0, 1, 2, 3}) {
210 for (
size_t side : {0, 1}) {
211 for (
size_t module : {0, 1, 2, 3}) {
219 for (
size_t side : {0, 1}) {
220 for (
size_t module : {0, 1, 2, 3}) {
236 for (
size_t side : {0, 1}) {
237 for (
size_t module : {0, 1, 2, 3}) {
246 for (
size_t side : {0, 1}) {
247 for (
size_t module : {0, 1, 2, 3}) {
254 for (
size_t side : {0, 1}) {
255 for (
size_t module : {0, 1, 2, 3}) {
264 for (
size_t side : {0, 1}) {
265 for (
size_t module : {0, 1, 2, 3}) {
275 for (
size_t side : {0, 1}) {
276 for (
size_t module : {0, 1, 2, 3}) {
285 for (
size_t side : {0, 1}) {
286 for (
size_t module : {0, 1, 2, 3}) {
296 for (
size_t side : {0, 1}) {
297 for (
size_t module : {0, 1, 2, 3}) {
309 for (
size_t side : {0, 1}) {
310 for (
size_t module : {0, 1, 2, 3}) {
322 for (
size_t side : {0, 1}) {
323 for (
size_t module : {0, 1, 2, 3}) {
335 for (
size_t side : {0, 1}) {
336 for (
size_t module : {0, 1, 2, 3}) {
360 for (
size_t side : {0, 1}) {
361 for (
size_t module : {0, 1, 2, 3}) {
381 for (
size_t side : {0, 1}) {
382 for (
size_t module : {0, 1, 2, 3}) {
405 for (
size_t side : {0, 1}) {
406 for (
size_t module : {0, 1, 2, 3}) {
447 if (pulseAna_p->
Failed()) {
457 const std::vector<float>& HGSamplesDelayed,
const std::vector<float>& LGSamplesDelayed)
476 pulseAna_p->
LoadAndAnalyzeData(HGSamples, LGSamples, HGSamplesDelayed, LGSamplesDelayed);
479 pulseAna_p->
LoadAndAnalyzeData(HGSamplesDelayed, LGSamplesDelayed, HGSamples, LGSamples);
483 if (pulseAna_p->
Failed()) {
496 unsigned int sideNPulsesMod[2] = {0, 0};
498 for (
size_t side : {0, 1}) {
499 for (
size_t module : {0, 1, 2, 3}) {
509 for (
size_t side : {0, 1}) {
510 if (sideNPulsesMod[
side] == 0)
continue;
512 for (
size_t module : {0, 1, 2, 3}) {
530 for (
size_t side : {0, 1}) {
531 float tempFraction = 1.0;
532 double sumAmpTimesBkgdFrac = 0.0;
533 double sumCalibAmpTimesBkgdFrac = 0.0;
535 for (
size_t module : {0, 1, 2, 3}) {
550 float timeCalib = pulseAna_p->
GetT0Corr();
558 sumAmpTimesBkgdFrac += amplitude*bkgdFraction;
566 sumCalibAmpTimesBkgdFrac += amplitude*bkgdFraction;