18 minChannelEntries_(0),
19 expectedAmplitude_(0),
20 toleranceAmplitudeLo_(0.),
21 toleranceAmplitudeHi_(0.),
22 toleranceAmpRMSRatio_(0.),
26 expectedPNAmplitude_(0),
28 tolerancePNRMSRatio_(0.),
52 for (
unsigned iWL(0); iWL != nWL; ++iWL) {
54 if (wl <= 0 || wl >= 5)
55 throw cms::Exception(
"InvalidConfiguration") <<
"Laser Wavelength";
56 repl[
"wl"] = std::to_string(
wl);
64 std::vector<double> inExpectedAmplitude(
_params.getUntrackedParameter<std::vector<double> >(
"expectedAmplitude"));
65 std::vector<double> inExpectedTiming(
_params.getUntrackedParameter<std::vector<double> >(
"expectedTiming"));
66 std::vector<double> inExpectedPNAmplitude(
67 _params.getUntrackedParameter<std::vector<double> >(
"expectedPNAmplitude"));
69 for (std::map<int, unsigned>::iterator wlItr(
wlToME_.begin()); wlItr !=
wlToME_.end(); ++wlItr) {
70 unsigned iME(wlItr->second);
71 int iWL(wlItr->first - 1);
86 MESetMulti& meQuality(static_cast<MESetMulti&>(
MEs_.at(
"Quality")));
87 MESetMulti& meQualitySummary(static_cast<MESetMulti&>(
MEs_.at(
"QualitySummary")));
88 MESetMulti& meAmplitudeMean(static_cast<MESetMulti&>(
MEs_.at(
"AmplitudeMean")));
89 MESetMulti& meAmplitudeRMS(static_cast<MESetMulti&>(
MEs_.at(
"AmplitudeRMS")));
90 MESetMulti& meTimingMean(static_cast<MESetMulti&>(
MEs_.at(
"TimingMean")));
91 MESetMulti& meTimingRMSMap(static_cast<MESetMulti&>(
MEs_.at(
"TimingRMSMap")));
92 MESetMulti& meTimingRMS(static_cast<MESetMulti&>(
MEs_.at(
"TimingRMS")));
93 MESetMulti& mePNQualitySummary(static_cast<MESetMulti&>(
MEs_.at(
"PNQualitySummary")));
95 MESetMulti const& sAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"Amplitude")));
97 MESetMulti const& sPNAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"PNAmplitude")));
98 MESet const& sCalibStatus(static_cast<MESet const&>(
sources_.at(
"CalibStatus")));
100 for (std::map<int, unsigned>::iterator wlItr(
wlToME_.begin()); wlItr !=
wlToME_.end(); ++wlItr) {
101 meQuality.
use(wlItr->second);
102 meQualitySummary.
use(wlItr->second);
103 meAmplitudeMean.
use(wlItr->second);
104 meAmplitudeRMS.
use(wlItr->second);
105 meTimingMean.
use(wlItr->second);
106 meTimingRMSMap.
use(wlItr->second);
107 meTimingRMS.
use(wlItr->second);
108 mePNQualitySummary.
use(wlItr->second);
110 sAmplitude.
use(wlItr->second);
111 sTiming.
use(wlItr->second);
112 sPNAmplitude.
use(wlItr->second);
119 int wl(wlItr->first - 1);
128 float aEntries(aItr->getBinEntries());
135 float aMean(aItr->getBinContent());
136 float aRms(aItr->getBinError() *
sqrt(aEntries));
138 meAmplitudeMean.
fill(
id, aMean);
143 float tEntries(tItr->getBinEntries());
148 float tMean(tItr->getBinContent());
149 float tRms(tItr->getBinError() *
sqrt(tEntries));
151 meTimingMean.
fill(
id, tMean);
152 meTimingRMS.
fill(
id, tRms);
162 qItr->setBinContent(doMask ?
kMBad :
kBad);
169 for (
unsigned iDCC(0); iDCC <
nDCC; ++iDCC) {
178 for (
unsigned iPN(0); iPN < 10; ++iPN) {