24 for (
unsigned iWL(0); iWL != nWL; ++iWL) {
26 if (
wl != 1 &&
wl != 2)
28 repl[
"wl"] = std::to_string(
wl);
42 for (
unsigned iDCC(0); iDCC !=
nDCC; iDCC++) {
69 unsigned iDCC(rItr->id() - 1);
79 if (rItr->getEventSettings().wavelength == 0)
81 else if (rItr->getEventSettings().wavelength == 2)
92 for (
unsigned iW(0); iW < 2; iW++) {
93 LedStatus[iW] =
false;
107 for (
unsigned iWL(0); iWL < 2; iWL++) {
120 nReadouts[
index] = 0;
121 for (
int i(0);
i < 10;
i++)
126 const DetId&
id(digiItr->id());
147 for (
int i(0);
i < 10;
i++) {
156 if (iMax >= 0 &&
max -
min > 3)
157 maxpos[
index][iMax] += 1;
167 if (nReadouts[
index] == 0) {
176 for (
int i(0);
i < 10;
i++) {
186 static_cast<MESetMulti&>(meSignalRate).use(iME);
200 else if (ledOnExpected)
206 const DetId&
id(digiItr->id());
220 static_cast<MESetMulti&>(meShape).use(iME);
226 for (
int iSample(0); iSample < 10; iSample++)
244 if (digiItr->sample(0).gainId() != 0 && digiItr->sample(0).gainId() != 1)
249 std::map<uint32_t, float>::iterator ampItr(
pnAmp_.find(
id.rawId()));
250 if (ampItr ==
pnAmp_.end())
259 for (
int iSample(0); iSample < 4; iSample++)
260 pedestal += digiItr->sample(iSample).adc();
264 for (
int iSample(0); iSample < 50; iSample++) {
265 float amp(digiItr->sample(iSample).adc() -
pedestal);
272 static_cast<MESetMulti&>(mePNAmplitude).use(iME);
277 ampItr->second =
max;
285 MESet& meAmplitudeSummary(
MEs_.
at(
"AmplitudeSummary"));
306 static_cast<MESetMulti&>(meAmplitude).use(iME);
307 static_cast<MESetMulti&>(meAmplitudeSummary).use(iME);
308 static_cast<MESetMulti&>(meTiming).use(iME);
309 static_cast<MESetMulti&>(meAOverP).use(iME);
312 float amp(
max((
double)uhitItr->amplitude(), 0.));
313 float jitter(
max((
double)uhitItr->jitter() + 5.0, 0.));
325 else if (ampItrB ==
pnAmp_.end())
326 aop = amp / ampItrA->second;
328 aop = amp / ampItrB->second;
330 aop = amp / (ampItrA->second + ampItrB->second) * 2.;