Skip to content

Commit

Permalink
Merge pull request #23952 from tanmaymudholkar/TTF4ByLS_10_2_X
Browse files Browse the repository at this point in the history
Adding two by-lumisection plots to ECAL DQM, backport to CMSSW 10_2_X
  • Loading branch information
cmsbuild committed Aug 17, 2018
2 parents 35817ee + 279b72b commit ee2bc3d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
8 changes: 8 additions & 0 deletions DQM/EcalMonitorClient/python/TrigPrimClient_cfi.py
Expand Up @@ -17,6 +17,7 @@
EtEmulError = ecalTrigPrimTask.MEs.EtEmulError,
MatchedIndex = ecalTrigPrimTask.MEs.MatchedIndex,
TTFlags4 = ecalTrigPrimTask.MEs.TTFlags4,
TTFlags4ByLumi = ecalTrigPrimTask.MEs.TTFlags4ByLumi,
TTMaskMapAll = ecalTrigPrimTask.MEs.TTMaskMapAll,
TTFMismatch = ecalTrigPrimTask.MEs.TTFMismatch,
LHCStatusByLumi = ecalTrigPrimTask.MEs.LHCStatusByLumi,
Expand Down Expand Up @@ -57,6 +58,13 @@
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.')
),
TTF4vMaskByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sTriggerTowerTask/%(prefix)sTTT TTF4 vs Masking Status%(suffix)s by lumi'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('TriggerTower'),
description = cms.untracked.string('Summarizes whether a TT was masked in this lumisection 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'),
Expand Down
23 changes: 17 additions & 6 deletions DQM/EcalMonitorClient/src/TrigPrimClient.cc
Expand Up @@ -93,7 +93,9 @@ namespace ecaldqm
// NOT an occupancy plot: only tells you if non-zero TTF4 occupancy was seen
// without giving info about how many were seen
MESet& meTTF4vMask(MEs_.at("TTF4vMask"));
MESet& meTTF4vMaskByLumi(MEs_.at("TTF4vMaskByLumi"));
MESet const& sTTFlags4(sources_.at("TTFlags4"));
MESet const& sTTFlags4ByLumi(sources_.at("TTFlags4ByLumi"));
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
Expand All @@ -105,20 +107,29 @@ namespace ecaldqm
unsigned iDCC( dccId(ttid)-1 );
bool isMasked( sTTMaskMapAll.getBinContent(ttid) > 0. );
bool hasTTF4( sTTFlags4.getBinContent(ttid) > 0. );
if (hasTTF4) {
bool hasTTF4InThisLumiSection( sTTFlags4ByLumi.getBinContent(ttid) > 0. );
if (hasTTF4InThisLumiSection) {
nWithTTF4[iDCC]++;
if (ttid.subDet() == EcalBarrel) nWithTTF4_EB++;
else if (ttid.subDet() == EcalEndcap) nWithTTF4_EE++;
}
if ( isMasked ) {
if ( hasTTF4 )
if ( hasTTF4 ) {
meTTF4vMask.setBinContent( ttid,12 ); // Masked, has TTF4
else
}
else {
meTTF4vMask.setBinContent( ttid,11 ); // Masked, no TTF4
}
if ( hasTTF4InThisLumiSection ) {
meTTF4vMaskByLumi.setBinContent( ttid,12 ); // Masked, has TTF4
}
else {
meTTF4vMaskByLumi.setBinContent( ttid,11 ); // Masked, no TTF4
}
} else {
if ( hasTTF4 )
meTTF4vMask.setBinContent( ttid,13 ); // not Masked, has TTF4
}
if ( hasTTF4 ) meTTF4vMask.setBinContent( ttid,13 ); // not Masked, has TTF4
if ( hasTTF4InThisLumiSection ) meTTF4vMaskByLumi.setBinContent( ttid,13 ); // not Masked, has TTF4
}
} // TT loop

// Fill trend plots for number of TTs with TTF4 flag set
Expand Down
7 changes: 7 additions & 0 deletions DQM/EcalMonitorTasks/python/TrigPrimTask_cfi.py
Expand Up @@ -177,6 +177,13 @@
btype = cms.untracked.string('TriggerTower'),
description = cms.untracked.string('Occupancy for TP digis with TTF=4.')
),
TTFlags4ByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sTriggerTowerTask/%(prefix)sTTT TTF4 Occupancy%(suffix)s by lumi'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('TriggerTower'),
description = cms.untracked.string('Occupancy for TP digis with TTF=4, by lumisection.')
),
TTMaskMap = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sTriggerTowerTask/TTStatus/%(prefix)sTTT TT Masking Status%(sm)s'),
kind = cms.untracked.string('TProfile2D'),
Expand Down
7 changes: 5 additions & 2 deletions DQM/EcalMonitorTasks/src/TrigPrimTask.cc
Expand Up @@ -65,6 +65,7 @@ namespace ecaldqm
{
// Reset by LS plots at beginning of every LS
MEs_.at("EtSummaryByLumi").reset();
MEs_.at("TTFlags4ByLumi").reset();
MEs_.at("LHCStatusByLumi").reset(-1);

// Reset lhcStatusSet_ to false at the beginning of each LS; when LHC status is set in some event this variable will be set to true
Expand Down Expand Up @@ -215,6 +216,7 @@ namespace ecaldqm
MESet& meTTFlags(MEs_.at("TTFlags"));
MESet& meTTFlagsVsEt(MEs_.at("TTFlagsVsEt"));
MESet& meTTFlags4( MEs_.at("TTFlags4") );
MESet& meTTFlags4ByLumi( MEs_.at("TTFlags4ByLumi") );
MESet& meTTFMismatch(MEs_.at("TTFMismatch"));
MESet& meOccVsBx(MEs_.at("OccVsBx"));

Expand Down Expand Up @@ -263,9 +265,10 @@ namespace ecaldqm
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 );

meTTFlags4ByLumi.fill( ttid );
}
if((ttF == 1 || ttF == 3) && towerReadouts_[ttid.rawId()] != getTrigTowerMap()->constituentsOf(ttid).size())
meTTFMismatch.fill(ttid);
}
Expand Down

0 comments on commit ee2bc3d

Please sign in to comment.