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

L1TObjects Ratio Timing Plots - L1T & Online DQM - CMSSW - 102X #22524

Merged
merged 17 commits into from Apr 24, 2018
Merged

L1TObjects Ratio Timing Plots - L1T & Online DQM - CMSSW - 102X #22524

merged 17 commits into from Apr 24, 2018

Conversation

ghost
Copy link

@ghost ghost commented Mar 8, 2018

My task in JIRA is : Timing Plot Improvements

The whole work is to produce ratio timing plots for any L1T Objects for each BX for first,isolated and last bunch. After I added numerators and denominators to L1TObjectsTiming module, I made a new module for inserting ratio plots in the DQM/L1TMonitorClient directory L1TObjectsTimingClient_cff and I modified the L1TStage2MonitorClient_cff module in order to produce ratio plots.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2018

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2018

A new Pull Request was created by @dtsitson for master.

It involves the following packages:

DQM/L1TMonitor
DQM/L1TMonitorClient

@vazzolini, @kmaeshima, @dmitrijus, @cmsbuild, @jfernan2, @vanbesien can you please review it and eventually sign? Thanks.
@kreczko, @thomreis this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@@ -103,6 +103,11 @@ class L1TObjectsTiming : public DQMEDAnalyzer {
std::vector<MonitorElement*> etsum_eta_phi_METHF_lastbunch;
std::vector<MonitorElement*> etsum_eta_phi_MHT_lastbunch;
std::vector<MonitorElement*> etsum_eta_phi_MHTHF_lastbunch;

MonitorElement* denominator;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These denominators are only used for the muons. There are denominators missing for jets, egamma, taus, and etsums.

@@ -134,6 +140,9 @@ void L1TObjectsTiming::bookHistograms(DQMStore::IBooker& ibooker, const edm::Run
}

if(algoBitFirstBxInTrain_ > -1 && algoBitLastBxInTrain_ > -1) {
ibooker.setCurrentFolder(monitorDir_);
denominator_isolated = ibooker.book2D("denominator_isolated","Denominator for Isolated Bunch for L1TObjects",25, -2.5, 2.5, 25, -3.2, 3.2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe align the histogram titles with the numerator histograms.

for (int itBX = MuonBxCollection->getFirstBX(); itBX <= MuonBxCollection->getLastBX(); ++itBX) {
for (l1t::MuonBxCollection::const_iterator Muon = MuonBxCollection->begin(itBX); Muon != MuonBxCollection->end(
itBX); ++Muon) {
denominator->Fill(Muon->eta(), Muon->phi());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be moved just before line 318 to get rid of the two for loops.

# sequences
l1tObjectsTimingClient = cms.Sequence(
l1tObjectsRatioPlots
+ l1tMuonFirstBunchRatioPlots
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try to group the four groups per object into one? They are in different subdirectories but it may be possible to give a histogram title like e.g.
"Isolated_bunch/Ratio_L1TTau_BX_LastBunch_0 'Ratio for L1TTau last bunch for BX=0' Isolated_bunch/tau_eta_phi_bx_lastbunch_0 Isolated_bunch/den_tau_eta_phi_bx_lastbunch_0"
It works for sure for the input histograms. For the histogram that is created I am not sure.

l1tMuonFirstBunchRatioPlots = DQMEDHarvester("DQMGenericClient",
subDirs = cms.untracked.vstring(l1tobjectstimingDqmDir+'L1TMuon/timing/First_bunch/'),
efficiency = cms.vstring(
"Ratio_L1TMuons_BX_FirstBunch_minus2 'Ratio for L1TMuons first bunch for BX=-2' muons_eta_phi_bx_firstbunch_minus2 den_muons_eta_phi_bx_firstbunch_minus2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The denominator plot does not exist.

"Ratio_L1TMuons_BX_0 'Ratio for L1TMuons for BX=0' L1TMuon/timing/muons_eta_phi_bx_0 denominator",
"Ratio_L1TMuons_BX_plus1 'Ratio for L1TMuons for BX=+1' L1TMuon/timing/muons_eta_phi_bx_plus1 denominator",
"Ratio_L1TMuons_BX_plus2 'Ratio for L1TMuons for BX=+2' L1TMuon/timing/muons_eta_phi_bx_plus2 denominator",
"Ratio_L1TJet_BX_minus2 'Ratio for L1TJet for BX=-2' L1TJet/timing/jet_eta_phi_bx_minus2 denominator",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still need separate denominators for the muons, jet, taus, egamma, and etsums.

# L1 event info DQM client
from DQM.L1TMonitorClient.L1TStage2EventInfoClient_cfi import *

# CaloLayer2 client
from DQM.L1TMonitorClient.L1TStage2CaloLayer2Client_cff import *

# BMTF client
from DQM.L1TMonitorClient.L1TStage2BMTFClient_cff import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert these changes since they have nothing to do with the timing.

# uGMT client
from DQM.L1TMonitorClient.L1TStage2uGMTClient_cff import *

# uGT client
from DQM.L1TMonitorClient.L1TStage2uGTClient_cff import *

# L1 event info DQM client EMTF
from DQM.L1TMonitorClient.L1TStage2EMTFEventInfoClient_cfi import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert these changes since they have nothing to do with the timing.

# define sequences
#

# L1T monitor client sequence (system clients and quality tests)
l1TStage2Clients = cms.Sequence(
l1tStage2EventInfoClient
+ l1tStage2uGTCaloLayer2CompClient
+ l1tStage2BmtfClient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert these changes since they have nothing to do with the timing.

+ l1tStage2uGMTClient
+ l1tStage2uGTClient
+ l1tStage2EMTFEventInfoClient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the removal of this module.

Dimitrios Tsitsonis added 2 commits March 13, 2018 17:30
…m-CMSSW_10_1_0_pre2

I also fixed the second part of the algorithm trigger timing plots dividing two different histograms for unprescaled and prescaled trigger bits .
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #22524 was updated. @vazzolini, @kmaeshima, @dmitrijus, @cmsbuild, @jfernan2, @vanbesien can you please check and sign again.

Copy link
Contributor

@thomreis thomreis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider also these comments.

@@ -75,9 +75,16 @@ class L1TStage2uGT: public DQMEDAnalyzer {
int algoBitLastBxInTrain_;
const std::string algoNameFirstBxInTrain_;
const std::string algoNameLastBxInTrain_;


int algoBitUnpre_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two variables do not need to be class members.

int algoBitUnpre_;
int algoBitDis_;
std::vector<std::string> unprescaledAlgoShortList_ ;
std::vector<std::string> disabledAlgoShortList_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better call the variables prescaledAlgo*** instead of disabledAlgo*** since not all algos in the list will be disabled.

@@ -1,10 +1,11 @@
import FWCore.ParameterSet.Config as cms

from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
l1tStage2uGT = DQMEDAnalyzer('L1TStage2uGT',
l1tStage2uGT = cms.EDAnalyzer("L1TStage2uGT",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the changes in these two lines.

@@ -20,7 +20,12 @@ L1TStage2uGT::L1TStage2uGT(const edm::ParameterSet& params):
algoBitFirstBxInTrain_(-1),
algoBitLastBxInTrain_(-1),
algoNameFirstBxInTrain_(params.getUntrackedParameter<std::string>("firstBXInTrainAlgo","")),
algoNameLastBxInTrain_(params.getUntrackedParameter<std::string>("lastBXInTrainAlgo",""))
algoNameLastBxInTrain_(params.getUntrackedParameter<std::string>("lastBXInTrainAlgo","")),
algoBitUnpre_(-1),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to make these two variables class members. They are only needed in the constructor and can be declared locally there.

// Prescaled and Unprescaled Algo Trigger Bits
prescaled_first_collision_run_ = ibooker.book2D("prescaled_first_collision_run_", "uGT: Prescaled Algorithm Trigger Bits (First bunch) vs. BX Number In Event", 5, -2.5, 2.5, numAlgs, -0.5, numAlgs_d-0.5);
prescaled_first_collision_run_->setAxisTitle("Bunch Crossing Number In Event", 1);
prescaled_first_collision_run_->setAxisTitle("Algorithm Trigger Bits (First bunch in train)", 2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please label the y axis bins with the algo name + the algo bit.
E.g.: L1_SingleMu25 (23)
Think about what happens if an algo name given in the configuration does not exist. Does the algorithm still work in such a case? Only existing algos should end up in the histogram.

for(unsigned int algo=0; algo<disabledAlgoBit_.size(); algo++) {
if(disabledAlgoBit_.at(algo) != -1 && itr2->getAlgoDecisionInitial(disabledAlgoBit_.at(algo))) {
prescaled_first_collision_run_->Fill(ibx, disabledAlgoBit_.at(algo));
prescaled_first_collision_run_->setBinLabel(disabledAlgoBit_.at(algo),disabledAlgoShortList_.at(algo),2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do this already when you book the histogram. No need to do it every time you fill.

@@ -284,6 +354,82 @@ void L1TStage2uGT::analyze(const edm::Event& evt, const edm::EventSetup& evtSetu
} // selecting LastCollisionInTrain
} // end of uGTAlgs = 1


for(auto itr = uGtAlgs->begin(0); itr != uGtAlgs->end(0); ++itr) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be integrated in the existing for loops? At least the first two loops are common as far as I can see.

for(int ibx = uGtAlgs->getFirstBX(); ibx <= uGtAlgs->getLastBX(); ++ibx) {
for(auto itr2 = uGtAlgs->begin(ibx); itr2 != uGtAlgs->end(ibx); ++itr2) {
for(unsigned int algo=0; algo<disabledAlgoBit_.size(); algo++) {
if(disabledAlgoBit_.at(algo) != -1 && itr2->getAlgoDecisionInitial(disabledAlgoBit_.at(algo))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort out the algo bits with -1 already in the dqmBeginRun. You can make a new vector of algo bits containing only the existing ones and use that one from that time onwards. That way the setting of bin labels should be easily done as well when booking the histograms.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22524/4014

Code check has found code style and quality issues which could be resolved by applying a patch in https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22524/4014/git-diff.patch
e.g. curl https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22524/4014/git-diff.patch | patch -p1

You can run scram build code-checks to apply code checks directly

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #22524 was updated. @vazzolini, @kmaeshima, @dmitrijus, @cmsbuild, @jfernan2, @vanbesien can you please check and sign again.

@thomreis
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 19, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/27567/console Started: 2018/04/19 14:20

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-22524/27567/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 29
  • DQMHistoTests: Total histograms compared: 2492830
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2492653
  • DQMHistoTests: Total skipped: 176
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 480.58 KiB( 23 files compared)
  • Checked 119 log files, 9 edm output root files, 29 DQM output files

@fabiocos
Copy link
Contributor

unhold

@thomreis please let us know when you are satisfied

@cmsbuild cmsbuild removed the hold label Apr 23, 2018
@thomreis
Copy link
Contributor

Thanks @fabiocos
From the L1 side we are satisfied. DQM needs to sign still, though. The 101x PR is already running at P5.

@dmitrijus
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 23f819b into cms-sw:master Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants