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++) {
108 meCalibStatus.fill(
double(iWL + 3), LedStatus[iWL] ? 1 : 0);
120 nReadouts[
index] = 0;
121 for (
int i(0);
i < 10;
i++)
126 const DetId&
id(digiItr->id());
128 unsigned iDCC(
dccId(
id) - 1);
138 meOccupancy.fill(
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);
199 else if (ledOnExpected)
205 const DetId&
id(digiItr->id());
207 unsigned iDCC(
dccId(
id) - 1);
219 static_cast<MESetMulti&>(meShape).use(iME);
225 for (
int iSample(0); iSample < 10; iSample++)
226 meShape.fill(
id, iSample + 0.5,
float(dataFrame.
sample(iSample).
adc()));
243 if (digiItr->sample(0).gainId() != 0 && digiItr->sample(0).gainId() != 1)
248 std::map<uint32_t, float>::iterator ampItr(
pnAmp_.find(
id.rawId()));
249 if (ampItr ==
pnAmp_.end())
252 unsigned iDCC(
dccId(
id) - 1);
258 for (
int iSample(0); iSample < 4; iSample++)
259 pedestal += digiItr->sample(iSample).adc();
263 for (
int iSample(0); iSample < 50; iSample++) {
264 float amp(digiItr->sample(iSample).adc() -
pedestal);
271 static_cast<MESetMulti&>(mePNAmplitude).use(iME);
274 mePNAmplitude.fill(
id,
max);
276 ampItr->second =
max;
284 MESet& meAmplitudeSummary(
MEs_.
at(
"AmplitudeSummary"));
293 unsigned iDCC(
dccId(
id) - 1);
305 static_cast<MESetMulti&>(meAmplitude).use(iME);
306 static_cast<MESetMulti&>(meAmplitudeSummary).use(iME);
307 static_cast<MESetMulti&>(meTiming).use(iME);
308 static_cast<MESetMulti&>(meAOverP).use(iME);
311 float amp(
max((
double)uhitItr->amplitude(), 0.));
312 float jitter(
max((
double)uhitItr->jitter() + 5.0, 0.));
314 meAmplitude.fill(
id, amp);
315 meAmplitudeSummary.fill(
id, amp);
316 meTiming.fill(
id, jitter);
324 else if (ampItrB ==
pnAmp_.end())
325 aop = amp / ampItrA->second;
326 else if (ampItrA ==
pnAmp_.end())
327 aop = amp / ampItrB->second;
329 aop = amp / (ampItrA->second + ampItrB->second) * 2.;
331 meAOverP.fill(
id, aop);