1 #include "../interface/TrigPrimClient.h" 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);
99 std::vector<float> nWithTTF4(
nDCC, 0.);
100 int nWithTTF4_EE = 0;
101 int nWithTTF4_EB = 0;
105 unsigned iDCC(
dccId(ttid)-1 );
106 bool isMasked( sTTMaskMapAll.getBinContent(ttid) > 0. );
107 bool hasTTF4( sTTFlags4.getBinContent(ttid) > 0. );
115 meTTF4vMask.setBinContent( ttid,12 );
117 meTTF4vMask.setBinContent( ttid,11 );
120 meTTF4vMask.setBinContent( ttid,13 );
130 std::vector<float> nTTs(
nDCC,0.);
131 std::vector<float> nTTFMismath(
nDCC,0.);
135 unsigned iDCC(
dccId(ttid)-1 );
136 if ( sTTFMismatch.getBinContent(ttid) > 0. )
143 unsigned iDCC(
dccId(ttid)-1 );
145 meEmulQualitySummary.setBinContent( ttid, meEmulQualitySummary.maskMatches(ttid, mask,
statusManager_) ?
kMBad :
kBad );
151 float meanFEDEB(0.), meanFEDEE(0.), rmsFEDEB(0.), rmsFEDEE(0.);
152 unsigned int nFEDEB(0), nFEDEE(0);
153 for (
unsigned iDCC(0); iDCC <
nDCC; iDCC++ ) {
155 meanFEDEB += Nentries[iDCC];
156 rmsFEDEB += Nentries[iDCC]*Nentries[iDCC];
160 meanFEDEE += Nentries[iDCC];
161 rmsFEDEE += Nentries[iDCC]*Nentries[iDCC];
165 meanFEDEB /=
float( nFEDEB ); rmsFEDEB /=
float( nFEDEB );
166 meanFEDEE /=
float( nFEDEE ); rmsFEDEE /=
float( nFEDEE );
167 rmsFEDEB =
sqrt(
std::abs(rmsFEDEB - meanFEDEB*meanFEDEB) );
168 rmsFEDEE =
sqrt(
std::abs(rmsFEDEE - meanFEDEE*meanFEDEE) );
170 float meanFED(0.), rmsFED(0.), nRMS(5.);
173 unsigned iDCC(
dccId(ttid)-1 );
183 if ( (meanFED > 100. && Nentries[iDCC] < threshold) && statsCheckEnabled )
184 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 &)