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

HLT DQM Cleaning #38470

Merged
merged 14 commits into from Jul 12, 2022
Merged

HLT DQM Cleaning #38470

merged 14 commits into from Jul 12, 2022

Conversation

andrea21z
Copy link
Contributor

PR description:

This PR is created to remove unnecessary histograms for DQM HLT Muon validation and adding other interesting. Summary:
- This is an update of the PR #37117.
- Keeping only the most representative HLT folders.
- Removing histograms that are not used in the validation and adding the number of primary vertex distribution, interesting for Run 3.

PR validation:

- I check the output of the new branch running runTheMatrix and everything looks as expected.
- I execute the basic test suggested in the CMSSW PR instructions.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38470/30683

  • This PR adds an extra 36KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38470/30684

  • This PR adds an extra 36KB to repository

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • DQMOffline/Trigger (dqm)
  • HLTriggerOffline/Muon (dqm)
  • Validation/RecoMuon (dqm)

@emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @micsucmed, @rvenditti can you please review it and eventually sign? Thanks.
@HuguesBrun, @missirol, @mtosi, @abbiendi, @Fedespring, @calderona, @sscruz, @jhgoh, @CeliaFernandez, @trocino, @cericeci, @rociovilar this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@qliphy
Copy link
Contributor

qliphy commented Jun 23, 2022

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ced8c1/25712/summary.html
COMMIT: f930e87
CMSSW: CMSSW_12_5_X_2022-06-22-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/38470/25712/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 7 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3654015
  • DQMHistoTests: Total failures: 14
  • DQMHistoTests: Total nulls: 300
  • DQMHistoTests: Total successes: 3653679
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -13607.533999999996 KiB( 49 files compared)
  • DQMHistoSizes: changed ( 1000.0 ): 5.828 KiB HLT/Muon
  • DQMHistoSizes: changed ( 11634.0,... ): -2272.711 KiB HLT/Muon
  • DQMHistoSizes: changed ( 4.22 ): 22.904 KiB HLT/Muon
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

Comment on lines 292 to 294
if (targetMuons.at(0).isTrackerMuon())
track0 = &*targetMuons.at(0).innerTrack();
else if (targetMuons.at(0).isTrackerMuon())
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like the same condition twice. ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, done!

delete[] edgesX;
if (edgesY)
delete[] edgesY;
fillEdges(nBinsY, edgesY, binParams_[binningTypeY], bookhist);
Copy link
Contributor

Choose a reason for hiding this comment

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

Now this bookhist overwrites the one computed at L462
My suggestion would be to transform fillEdges into a method that returns a bool. This could be implemented following the other suggestions of mine in this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have implemented all your comments, thank you


} // End analyze() method.

// Method to fill binning parameters from a vector of doubles.
void HLTMuonMatchAndPlot::fillEdges(size_t& nBins, float*& edges, const vector<double>& binning) {
void HLTMuonMatchAndPlot::fillEdges(size_t& nBins, float*& edges, const vector<double>& binning, bool& bookhist) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
void HLTMuonMatchAndPlot::fillEdges(size_t& nBins, float*& edges, const vector<double>& binning, bool& bookhist) {
bool HLTMuonMatchAndPlot::fillEdges(size_t& nBins, float*& edges, const vector<double>& binning) {

if (binning.size() < 3) {
LogWarning("HLTMuonVal") << "Invalid binning parameters!";
return;
bookhist = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bookhist = false;
return false;

@@ -297,6 +295,7 @@ void HLTMuonMatchAndPlot::fillEdges(size_t& nBins, float*& edges, const vector<d
const double binwidth = (binning[2] - binning[1]) / nBins;
for (size_t i = 0; i <= nBins; i++)
edges[i] = min + (binwidth * i);
bookhist = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bookhist = true;

@@ -305,6 +304,7 @@ void HLTMuonMatchAndPlot::fillEdges(size_t& nBins, float*& edges, const vector<d
edges = new float[nBins + 1];
for (size_t i = 0; i <= nBins; i++)
edges[i] = binning[i];
bookhist = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bookhist = true;

@@ -454,20 +457,22 @@ void HLTMuonMatchAndPlot::book2D(DQMStore::IBooker& iBooker,
* case. */

size_t nBinsX;
bool bookhist;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bool bookhist;

float* edgesX = nullptr;
fillEdges(nBinsX, edgesX, binParams_[binningTypeX]);
fillEdges(nBinsX, edgesX, binParams_[binningTypeX], bookhist);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fillEdges(nBinsX, edgesX, binParams_[binningTypeX], bookhist);
bool bookhist = fillEdges(nBinsX, edgesX, binParams_[binningTypeX]);

delete[] edgesX;
if (edgesY)
delete[] edgesY;
fillEdges(nBinsY, edgesY, binParams_[binningTypeY], bookhist);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fillEdges(nBinsY, edgesY, binParams_[binningTypeY], bookhist);
bookhist &= fillEdges(nBinsY, edgesY, binParams_[binningTypeY]);

if (hists_[name]->getTH2F()->GetSumw2N())
hists_[name]->enableSumw2();

if (edgesX)
Copy link
Contributor

Choose a reason for hiding this comment

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

move outside of the if block

@@ -73,7 +73,7 @@ class HLTMuonMatchAndPlot {
void endRun(const edm::Run &, const edm::EventSetup &);

// Helper Methods
void fillEdges(size_t &nBins, float *&edges, const std::vector<double> &binning);
void fillEdges(size_t &nBins, float *&edges, const std::vector<double> &binning, bool &bookhist);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
void fillEdges(size_t &nBins, float *&edges, const std::vector<double> &binning, bool &bookhist);
bool fillEdges(size_t &nBins, float *&edges, const std::vector<double> &binning);

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38470/30987

  • This PR adds an extra 88KB to repository

@cmsbuild
Copy link
Contributor

Pull request #38470 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @micsucmed, @rvenditti can you please check and sign again.

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ced8c1/26142/summary.html
COMMIT: b5f0585
CMSSW: CMSSW_12_5_X_2022-07-11-1100/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/38470/26142/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3650678
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 96
  • DQMHistoTests: Total successes: 3650558
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -13700.321999999996 KiB( 49 files compared)
  • DQMHistoSizes: changed ( 1000.0 ): 5.844 KiB HLT/Muon
  • DQMHistoSizes: changed ( 11634.0,... ): -2288.191 KiB HLT/Muon
  • DQMHistoSizes: changed ( 4.22 ): 22.980 KiB HLT/Muon
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@emanueleusai
Copy link
Member

+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. @perrotta, @dpiparo, @qliphy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 9fba3c6 into cms-sw:master Jul 12, 2022
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