Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to ECAL TTF4 DQM plots (for CMSSW master) #23087

Merged
merged 4 commits into from
May 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DQM/EcalMonitorClient/interface/TrigPrimClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace ecaldqm

int minEntries_;
float errorFractionThreshold_;
float TTF4MaskingAlarmThreshold_;
};

}
Expand Down
13 changes: 11 additions & 2 deletions DQM/EcalMonitorClient/python/TrigPrimClient_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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'),
Expand All @@ -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.<br/>GRAY: Masked, no TTF4,<br/>BLACK: Masked, with TTF4,<br/>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.')
)
)
)
29 changes: 23 additions & 6 deletions DQM/EcalMonitorClient/src/TrigPrimClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ namespace ecaldqm
TrigPrimClient::TrigPrimClient() :
DQWorkerClient(),
minEntries_(0),
errorFractionThreshold_(0.)
errorFractionThreshold_(0.),
TTF4MaskingAlarmThreshold_(0.)
{
qualitySummaries_.insert("EmulQualitySummary");
}
Expand All @@ -24,6 +25,7 @@ namespace ecaldqm
{
minEntries_ = _params.getUntrackedParameter<int>("minEntries");
errorFractionThreshold_ = _params.getUntrackedParameter<double>("errorFractionThreshold");
TTF4MaskingAlarmThreshold_ = _params.getUntrackedParameter<double>("TTF4MaskingAlarmThreshold");
}

void
Expand All @@ -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"));
Expand Down Expand Up @@ -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<float> 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
Expand All @@ -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<float> nTTs(nDCC,0.);
std::vector<float> nTTFMismath(nDCC,0.);
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions DQM/EcalMonitorTasks/src/TrigPrimTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down