1 #include "../interface/TrigPrimClient.h"
16 errorFractionThreshold_(0.)
31 MESet& meTimingSummary(
MEs_.at(
"TimingSummary"));
32 MESet& meNonSingleSummary(
MEs_.at(
"NonSingleSummary"));
33 MESet& meEmulQualitySummary(
MEs_.at(
"EmulQualitySummary"));
42 std::vector<float> Nentries(
nDCC,0.);
47 bool doMask(meEmulQualitySummary.maskMatches(ttid, mask,
statusManager_));
49 float towerEntries(0.);
52 for(
int iBin(0); iBin < 6; iBin++){
53 float entries(sMatchedIndex.getBinContent(ttid, iBin + 1));
54 towerEntries += entries;
58 tMax = iBin == 0 ? -0.5 : iBin + 0.5;
62 meTimingSummary.setBinContent(ttid, tMax);
69 float nonsingleFraction(1. - nMax / towerEntries);
71 if(nonsingleFraction > 0.)
72 meNonSingleSummary.setBinContent(ttid, nonsingleFraction);
75 meEmulQualitySummary.setBinContent(ttid, doMask ?
kMBad :
kBad);
77 meEmulQualitySummary.setBinContent(ttid, doMask ?
kMGood :
kGood);
80 unsigned iDCC(
dccId(ttid)-1 );
81 Nentries[iDCC] += sTPDigiThrAll.getBinContent(ttid);
94 bool isMasked( sTTMaskMapAll.getBinContent(ttid) > 0. );
95 bool hasTTF4( sTTFlags4.getBinContent(ttid) > 0. );
98 meTTF4vMask.setBinContent( ttid,12 );
100 meTTF4vMask.setBinContent( ttid,11 );
103 meTTF4vMask.setBinContent( ttid,13 );
109 std::vector<float> nTTs(
nDCC,0.);
110 std::vector<float> nTTFMismath(
nDCC,0.);
114 unsigned iDCC(
dccId(ttid)-1 );
115 if ( sTTFMismatch.getBinContent(ttid) > 0. )
122 unsigned iDCC(
dccId(ttid)-1 );
123 if ( nTTFMismath[iDCC] > 0.8*nTTs[iDCC] )
124 meEmulQualitySummary.setBinContent( ttid, meEmulQualitySummary.maskMatches(ttid, mask,
statusManager_) ?
kMBad :
kBad );
129 float meanFEDEB(0.), meanFEDEE(0.), rmsFEDEB(0.), rmsFEDEE(0.);
130 unsigned int nFEDEB(0), nFEDEE(0);
131 for (
unsigned iDCC(0); iDCC <
nDCC; iDCC++ ) {
133 meanFEDEB += Nentries[iDCC];
134 rmsFEDEB += Nentries[iDCC]*Nentries[iDCC];
138 meanFEDEE += Nentries[iDCC];
139 rmsFEDEE += Nentries[iDCC]*Nentries[iDCC];
143 meanFEDEB /= float( nFEDEB ); rmsFEDEB /= float( nFEDEB );
144 meanFEDEE /= float( nFEDEE ); rmsFEDEE /= float( nFEDEE );
145 rmsFEDEB =
sqrt(
abs(rmsFEDEB - meanFEDEB*meanFEDEB) );
146 rmsFEDEE =
sqrt(
abs(rmsFEDEE - meanFEDEE*meanFEDEE) );
148 float meanFED(0.), rmsFED(0.), nRMS(5.);
151 unsigned iDCC(
dccId(ttid)-1 );
161 if ( meanFED > 100. && Nentries[iDCC] < threshold )
162 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)
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)
unsigned dccId(DetId const &)