14 :
DQWorkerClient(), minEntries_(0), errorFractionThreshold_(0.), TTF4MaskingAlarmThreshold_(0.) {
32 MESet* meNonSingleSummary =
nullptr;
33 MESet* meTimingSummary =
nullptr;
34 MESet* sEtEmulError =
nullptr;
35 MESet* sMatchedIndex =
nullptr;
37 MESet& meEmulQualitySummary(
MEs_.
at(
"EmulQualitySummary"));
46 std::vector<float> Nentries(
nDCC, 0.);
48 double currentLHCStatus = sLHCStatusByLumi.getFloatValue();
49 bool statsCheckEnabled =
50 ((currentLHCStatus > 10.5 && currentLHCStatus < 11.5) ||
51 currentLHCStatus < 0);
56 bool doMask(meEmulQualitySummary.maskMatches(ttid, mask,
statusManager_));
61 meNonSingleSummary = &
MEs_.
at(
"NonSingleSummary");
62 meTimingSummary = &
MEs_.
at(
"TimingSummary");
63 float towerEntries(0.);
66 for (
int iBin(0); iBin < 6; iBin++) {
68 towerEntries += entries;
72 tMax = iBin == 0 ? -0.5 : iBin + 0.5;
81 float nonsingleFraction(1. -
nMax / towerEntries);
83 if (nonsingleFraction > 0.) {
88 meEmulQualitySummary.setBinContent(ttid, doMask ?
kMBad :
kBad);
90 meEmulQualitySummary.setBinContent(ttid, doMask ?
kMGood :
kGood);
95 unsigned iDCC(
dccId(ttid) - 1);
96 Nentries[iDCC] += sTPDigiThrAll.getBinContent(ttid);
103 MESet& meTTF4vMaskByLumi(
MEs_.
at(
"TTF4vMaskByLumi"));
108 std::vector<float> nWithTTF4(
nDCC,
110 int nWithTTF4_EE = 0;
111 int nWithTTF4_EB = 0;
115 unsigned iDCC(
dccId(ttid) - 1);
116 bool isMasked(sTTMaskMapAll.getBinContent(ttid) > 0.);
117 bool hasTTF4(sTTFlags4.getBinContent(ttid) > 0.);
118 bool hasTTF4InThisLumiSection(sTTFlags4ByLumi.getBinContent(ttid) > 0.);
119 if (hasTTF4InThisLumiSection) {
128 meTTF4vMask.setBinContent(ttid, 12);
130 meTTF4vMask.setBinContent(ttid, 11);
132 if (hasTTF4InThisLumiSection) {
133 meTTF4vMaskByLumi.setBinContent(ttid, 12);
135 meTTF4vMaskByLumi.setBinContent(ttid, 11);
139 meTTF4vMask.setBinContent(ttid, 13);
140 if (hasTTF4InThisLumiSection)
141 meTTF4vMaskByLumi.setBinContent(ttid, 13);
151 std::vector<float> nTTs(
nDCC, 0.);
152 std::vector<float> nTTFMismath(
nDCC, 0.);
156 unsigned iDCC(
dccId(ttid) - 1);
157 if (sTTFMismatch.getBinContent(ttid) > 0.)
164 unsigned iDCC(
dccId(ttid) - 1);
166 meEmulQualitySummary.setBinContent(ttid,
173 float meanFEDEB(0.), meanFEDEE(0.), rmsFEDEB(0.), rmsFEDEE(0.);
174 unsigned int nFEDEB(0), nFEDEE(0);
175 for (
unsigned iDCC(0); iDCC <
nDCC; iDCC++) {
177 meanFEDEB += Nentries[iDCC];
178 rmsFEDEB += Nentries[iDCC] * Nentries[iDCC];
181 meanFEDEE += Nentries[iDCC];
182 rmsFEDEE += Nentries[iDCC] * Nentries[iDCC];
186 meanFEDEB /=
float(nFEDEB);
187 rmsFEDEB /=
float(nFEDEB);
188 meanFEDEE /=
float(nFEDEE);
189 rmsFEDEE /=
float(nFEDEE);
190 rmsFEDEB =
sqrt(
std::abs(rmsFEDEB - meanFEDEB * meanFEDEB));
191 rmsFEDEE =
sqrt(
std::abs(rmsFEDEE - meanFEDEE * meanFEDEE));
193 float meanFED(0.), rmsFED(0.), nRMS(5.);
196 unsigned iDCC(
dccId(ttid) - 1);
205 if ((meanFED > 100. && Nentries[iDCC] <
threshold) && statsCheckEnabled)
206 meEmulQualitySummary.setBinContent(ttid,