17 errorFractionThreshold_(0.),
18 TTF4MaskingAlarmThreshold_(0.)
34 MESet& meTimingSummary(
MEs_.at(
"TimingSummary"));
35 MESet& meNonSingleSummary(
MEs_.at(
"NonSingleSummary"));
36 MESet& meEmulQualitySummary(
MEs_.at(
"EmulQualitySummary"));
37 MESet& meTrendTTF4Flags(
MEs_.at(
"TrendTTF4Flags"));
47 std::vector<float> Nentries(
nDCC,0.);
49 double currentLHCStatus = sLHCStatusByLumi.getFloatValue();
50 bool statsCheckEnabled = ((currentLHCStatus > 10.5 && currentLHCStatus < 11.5) || currentLHCStatus < 0);
55 bool doMask(meEmulQualitySummary.maskMatches(ttid, mask,
statusManager_));
57 float towerEntries(0.);
60 for(
int iBin(0); iBin < 6; iBin++){
61 float entries(sMatchedIndex.getBinContent(ttid, iBin + 1));
62 towerEntries += entries;
66 tMax = iBin == 0 ? -0.5 : iBin + 0.5;
70 meTimingSummary.setBinContent(ttid, tMax);
77 float nonsingleFraction(1. - nMax / towerEntries);
79 if(nonsingleFraction > 0.)
80 meNonSingleSummary.setBinContent(ttid, nonsingleFraction);
83 meEmulQualitySummary.setBinContent(ttid, doMask ?
kMBad :
kBad);
85 meEmulQualitySummary.setBinContent(ttid, doMask ?
kMGood :
kGood);
88 unsigned iDCC(
dccId(ttid)-1 );
89 Nentries[iDCC] += sTPDigiThrAll.getBinContent(ttid);
96 MESet& meTTF4vMaskByLumi(
MEs_.at(
"TTF4vMaskByLumi"));
101 std::vector<float> nWithTTF4(
nDCC, 0.);
102 int nWithTTF4_EE = 0;
103 int nWithTTF4_EB = 0;
107 unsigned iDCC(
dccId(ttid)-1 );
108 bool isMasked( sTTMaskMapAll.getBinContent(ttid) > 0. );
109 bool hasTTF4( sTTFlags4.getBinContent(ttid) > 0. );
110 bool hasTTF4InThisLumiSection( sTTFlags4ByLumi.getBinContent(ttid) > 0. );
111 if (hasTTF4InThisLumiSection) {
118 meTTF4vMask.setBinContent( ttid,12 );
121 meTTF4vMask.setBinContent( ttid,11 );
123 if ( hasTTF4InThisLumiSection ) {
124 meTTF4vMaskByLumi.setBinContent( ttid,12 );
127 meTTF4vMaskByLumi.setBinContent( ttid,11 );
130 if ( hasTTF4 ) meTTF4vMask.setBinContent( ttid,13 );
131 if ( hasTTF4InThisLumiSection ) meTTF4vMaskByLumi.setBinContent( ttid,13 );
141 std::vector<float> nTTs(
nDCC,0.);
142 std::vector<float> nTTFMismath(
nDCC,0.);
146 unsigned iDCC(
dccId(ttid)-1 );
147 if ( sTTFMismatch.getBinContent(ttid) > 0. )
154 unsigned iDCC(
dccId(ttid)-1 );
156 meEmulQualitySummary.setBinContent( ttid, meEmulQualitySummary.maskMatches(ttid, mask,
statusManager_) ?
kMBad :
kBad );
162 float meanFEDEB(0.), meanFEDEE(0.), rmsFEDEB(0.), rmsFEDEE(0.);
163 unsigned int nFEDEB(0), nFEDEE(0);
164 for (
unsigned iDCC(0); iDCC <
nDCC; iDCC++ ) {
166 meanFEDEB += Nentries[iDCC];
167 rmsFEDEB += Nentries[iDCC]*Nentries[iDCC];
171 meanFEDEE += Nentries[iDCC];
172 rmsFEDEE += Nentries[iDCC]*Nentries[iDCC];
176 meanFEDEB /=
float( nFEDEB ); rmsFEDEB /=
float( nFEDEB );
177 meanFEDEE /=
float( nFEDEE ); rmsFEDEE /=
float( nFEDEE );
178 rmsFEDEB =
sqrt(
std::abs(rmsFEDEB - meanFEDEB*meanFEDEB) );
179 rmsFEDEE =
sqrt(
std::abs(rmsFEDEE - meanFEDEE*meanFEDEE) );
181 float meanFED(0.), rmsFED(0.), nRMS(5.);
184 unsigned iDCC(
dccId(ttid)-1 );
194 if ( (meanFED > 100. && Nentries[iDCC] < threshold) && statsCheckEnabled )
195 meEmulQualitySummary.setBinContent( ttid, meEmulQualitySummary.maskMatches(ttid, mask,
statusManager_) ?
kMBad :
kBad );
T getUntrackedParameter(std::string const &, T const &) const
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
#define DEFINE_ECALDQM_WORKER(TYPE)
edm::LuminosityBlockNumber_t iLumi
static const int PHYSICS_BAD_CHANNEL_WARNING
float errorFractionThreshold_
void producePlots(ProcessType) override
void setParams(edm::ParameterSet const &) override
std::set< std::string > qualitySummaries_
StatusManager const * statusManager_
Abs< T >::type abs(const T &t)
float TTF4MaskingAlarmThreshold_
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
unsigned dccId(DetId const &)