diff --git a/DQM/EcalMonitorClient/interface/TrigPrimClient.h b/DQM/EcalMonitorClient/interface/TrigPrimClient.h
index 320cb0869f986..f3b186203a980 100644
--- a/DQM/EcalMonitorClient/interface/TrigPrimClient.h
+++ b/DQM/EcalMonitorClient/interface/TrigPrimClient.h
@@ -17,6 +17,7 @@ namespace ecaldqm
int minEntries_;
float errorFractionThreshold_;
+ float TTF4MaskingAlarmThreshold_;
};
}
diff --git a/DQM/EcalMonitorClient/python/TrigPrimClient_cfi.py b/DQM/EcalMonitorClient/python/TrigPrimClient_cfi.py
index de2a49e0480e5..31f4cf5c18e21 100644
--- a/DQM/EcalMonitorClient/python/TrigPrimClient_cfi.py
+++ b/DQM/EcalMonitorClient/python/TrigPrimClient_cfi.py
@@ -5,11 +5,13 @@
minEntries = 3
errorFractionThreshold = 0.1
+TTF4MaskingAlarmThreshold = 0.1
ecalTrigPrimClient = cms.untracked.PSet(
params = cms.untracked.PSet(
minEntries = cms.untracked.int32(minEntries),
- errorFractionThreshold = cms.untracked.double(errorFractionThreshold)
+ errorFractionThreshold = cms.untracked.double(errorFractionThreshold),
+ TTF4MaskingAlarmThreshold = cms.untracked.double(TTF4MaskingAlarmThreshold)
),
sources = cms.untracked.PSet(
EtEmulError = ecalTrigPrimTask.MEs.EtEmulError,
@@ -36,7 +38,7 @@
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('TriggerTower'),
- description = cms.untracked.string('Summary of emulator matching quality. A tower is red if the number of events with Et emulation error is greater than ' + str(errorFractionThreshold) + ' of total events. Towers with entries less than ' + str(minEntries) + ' are not considered.')
+ description = cms.untracked.string('Summary of emulator matching quality. A tower is red if the number of events with Et emulation error is greater than ' + str(errorFractionThreshold) + ' of total events. Towers with entries less than ' + str(minEntries) + ' are not considered. Also, an entire SuperModule can show red if its (data) Trigger Primitive digi occupancy is less than 5sigma of the overall SuperModule mean, or if more than 80% of its Trigger Towers are showing any number of TT Flag-Readout Mismatch errors. Finally, if the fraction of towers in a SuperModule that are permanently masked or have TTF4 flag set is greater than ' + str(TTF4MaskingAlarmThreshold) + ', then the entire supermodule shows red.')
),
TimingSummary = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sSummaryClient/%(prefix)sTTT%(suffix)s Trigger Primitives Timing summary'),
@@ -54,6 +56,13 @@
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('TriggerTower'),
description = cms.untracked.string('Summarizes whether a TT was masked in the TPGRecords, or had an instance of TT Flag=4.
GRAY: Masked, no TTF4,
BLACK: Masked, with TTF4,
BLUE: Not Masked, with TTF4.')
+ ),
+ TrendTTF4Flags = cms.untracked.PSet(
+ path = cms.untracked.string('Ecal/Trends/TrigPrimClient %(prefix)s number of TTs with TTF4 set'),
+ kind = cms.untracked.string('TProfile'),
+ otype = cms.untracked.string('Ecal2P'),
+ btype = cms.untracked.string('Trend'),
+ description = cms.untracked.string('Trend of the total number of TTs in this partition with TTF4 flag set.')
)
)
)
diff --git a/DQM/EcalMonitorClient/src/TrigPrimClient.cc b/DQM/EcalMonitorClient/src/TrigPrimClient.cc
index 3076ef50fe5fb..4d77f56e136c8 100644
--- a/DQM/EcalMonitorClient/src/TrigPrimClient.cc
+++ b/DQM/EcalMonitorClient/src/TrigPrimClient.cc
@@ -14,7 +14,8 @@ namespace ecaldqm
TrigPrimClient::TrigPrimClient() :
DQWorkerClient(),
minEntries_(0),
- errorFractionThreshold_(0.)
+ errorFractionThreshold_(0.),
+ TTF4MaskingAlarmThreshold_(0.)
{
qualitySummaries_.insert("EmulQualitySummary");
}
@@ -24,6 +25,7 @@ namespace ecaldqm
{
minEntries_ = _params.getUntrackedParameter("minEntries");
errorFractionThreshold_ = _params.getUntrackedParameter("errorFractionThreshold");
+ TTF4MaskingAlarmThreshold_ = _params.getUntrackedParameter("TTF4MaskingAlarmThreshold");
}
void
@@ -32,6 +34,7 @@ namespace ecaldqm
MESet& meTimingSummary(MEs_.at("TimingSummary"));
MESet& meNonSingleSummary(MEs_.at("NonSingleSummary"));
MESet& meEmulQualitySummary(MEs_.at("EmulQualitySummary"));
+ MESet& meTrendTTF4Flags(MEs_.at("TrendTTF4Flags"));
MESet const& sEtEmulError(sources_.at("EtEmulError"));
MESet const& sMatchedIndex(sources_.at("MatchedIndex"));
@@ -92,12 +95,21 @@ namespace ecaldqm
MESet& meTTF4vMask(MEs_.at("TTF4vMask"));
MESet const& sTTFlags4(sources_.at("TTFlags4"));
MESet const& sTTMaskMapAll(sources_.at("TTMaskMapAll"));
-
+
+ std::vector nWithTTF4(nDCC, 0.); // counters to keep track of number of towers in a DCC that have TTF4 flag set
+ int nWithTTF4_EE = 0; // total number of towers in EE with TTF4
+ int nWithTTF4_EB = 0; // total number of towers in EB with TTF4
// Loop over all TTs
for(unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; iTT++) {
EcalTrigTowerDetId ttid(EcalTrigTowerDetId::detIdFromDenseIndex(iTT));
+ unsigned iDCC( dccId(ttid)-1 );
bool isMasked( sTTMaskMapAll.getBinContent(ttid) > 0. );
bool hasTTF4( sTTFlags4.getBinContent(ttid) > 0. );
+ if (hasTTF4) {
+ nWithTTF4[iDCC]++;
+ if (ttid.subDet() == EcalBarrel) nWithTTF4_EB++;
+ else if (ttid.subDet() == EcalEndcap) nWithTTF4_EE++;
+ }
if ( isMasked ) {
if ( hasTTF4 )
meTTF4vMask.setBinContent( ttid,12 ); // Masked, has TTF4
@@ -107,9 +119,13 @@ namespace ecaldqm
if ( hasTTF4 )
meTTF4vMask.setBinContent( ttid,13 ); // not Masked, has TTF4
}
- } // TT loop
+ } // TT loop
- // Quality check: set an entire FED to BAD if an "entire" FED shows any DCC-SRP flag mismatch errors
+ // Fill trend plots for number of TTs with TTF4 flag set
+ meTrendTTF4Flags.fill(EcalBarrel, double(timestamp_.iLumi), nWithTTF4_EB);
+ meTrendTTF4Flags.fill(EcalEndcap, double(timestamp_.iLumi), nWithTTF4_EE);
+
+ // Quality check: set an entire FED to BAD if a more than 80% of the TTs in that FED show any DCC-SRP flag mismatch errors
// Fill flag mismatch statistics
std::vector nTTs(nDCC,0.);
std::vector nTTFMismath(nDCC,0.);
@@ -121,12 +137,13 @@ namespace ecaldqm
nTTFMismath[iDCC]++;
nTTs[iDCC]++;
}
- // Analyze flag mismatch statistics
+ // Analyze flag mismatch statistics and TTF4 fraction statistics
for ( unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; iTT++ ) {
EcalTrigTowerDetId ttid(EcalTrigTowerDetId::detIdFromDenseIndex(iTT));
unsigned iDCC( dccId(ttid)-1 );
- if ( nTTFMismath[iDCC] > 0.8*nTTs[iDCC] ) // "entire" => 80%
+ if ( nTTFMismath[iDCC] > 0.8*nTTs[iDCC] || nWithTTF4[iDCC] > TTF4MaskingAlarmThreshold_*nTTs[iDCC]) {
meEmulQualitySummary.setBinContent( ttid, meEmulQualitySummary.maskMatches(ttid, mask, statusManager_) ? kMBad : kBad );
+ }
}
// Quality check: set entire FED to BAD if its occupancy begins to vanish
diff --git a/DQM/EcalMonitorTasks/src/TrigPrimTask.cc b/DQM/EcalMonitorTasks/src/TrigPrimTask.cc
index 2c6ab6d1f6896..7be0fb3e8de6f 100644
--- a/DQM/EcalMonitorTasks/src/TrigPrimTask.cc
+++ b/DQM/EcalMonitorTasks/src/TrigPrimTask.cc
@@ -258,15 +258,15 @@ namespace ecaldqm
}
// Fill TT Flag MEs
- float ttF( tpItr->ttFlag() );
- meTTFlags.fill( ttid, ttF );
- meTTFlagsVsEt.fill(ttid, et, ttF);
+ int ttF( tpItr->ttFlag() );
+ meTTFlags.fill( ttid, 1.0*ttF );
+ meTTFlagsVsEt.fill(ttid, et, 1.0*ttF);
// Monitor occupancy of TTF=4
// which contains info about TT auto-masking
- if ( ttF == 4. )
+ if ( ttF >= 4 )
meTTFlags4.fill( ttid );
- if((interest == 1 || interest == 3) && towerReadouts_[ttid.rawId()] != getTrigTowerMap()->constituentsOf(ttid).size())
+ if((ttF == 1 || ttF == 3) && towerReadouts_[ttid.rawId()] != getTrigTowerMap()->constituentsOf(ttid).size())
meTTFMismatch.fill(ttid);
}
@@ -345,8 +345,8 @@ namespace ecaldqm
if(realEt > 0){
- int interest(realItr->ttFlag() & 0x3);
- if((interest == 1 || interest == 3) && towerReadouts_[ttid.rawId()] == getTrigTowerMap()->constituentsOf(ttid).size()){
+ int ttF(realItr->ttFlag());
+ if((ttF == 1 || ttF == 3) && towerReadouts_[ttid.rawId()] == getTrigTowerMap()->constituentsOf(ttid).size()){
if(et != realEt) match = false;
if(tpItr->fineGrain() != realItr->fineGrain()) matchFG = false;