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

Reduce non necessary sqrt computations in RecoTauTag/HLTProducers #41100

Merged
merged 4 commits into from Mar 21, 2023

Conversation

perrotta
Copy link
Contributor

PR description:

Triggered by the review in #41004 (review)

A few expensive calculations (involving square roots) were replaced by some lighter ones in RecoTauTag/HLTProducers

PR validation:

It builds
No changes expected whatsoever in output

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41100/34725

ERROR: Build errors found during clang-tidy run.

RecoTauTag/HLTProducers/src/L2TauJetsMerger.cc:62:11: error: use of undeclared identifier 'DR' [clang-diagnostic-error]
      if (DR > 0.1 * 0.1)
          ^
Suppressed 1149 warnings (1148 in non-user code, 1 with check filters).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@perrotta
Copy link
Contributor Author

code-checks

@perrotta
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41100/34726

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @perrotta (Andrea Perrotta) for master.

It involves the following packages:

  • RecoTauTag/HLTProducers (hlt)

@Martin-Grunewald, @missirol can you please review it and eventually sign? Thanks.
@silviodonato, @missirol, @azotz, @mbluj this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@@ -50,7 +51,7 @@ HLTPFDiJetCorrCheckerWithDiTau::HLTPFDiJetCorrCheckerWithDiTau(const edm::Parame
: tauSrc_(consumes(iConfig.getParameter<edm::InputTag>("tauSrc"))),
pfJetSrc_(consumes(iConfig.getParameter<edm::InputTag>("pfJetSrc"))),
extraTauPtCut_(iConfig.getParameter<double>("extraTauPtCut")),
mjjMin_(iConfig.getParameter<double>("mjjMin")),
m2jjMin_(iConfig.getParameter<double>("mjjMin") * iConfig.getParameter<double>("mjjMin")),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this needs to be improved.

A user might put mjjMin = -1 in the PSet (with the intention of switching off the cut), and the plugin will 'silently' require m2 > 1.

One way to improve this is

m2jjMin_(std::max(0, iConfig.getParameter<double>("mjjMin")) * std::max(0, iConfig.getParameter<double>("mjjMin"))),

The same argument probably applies to other plugins touched by this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are correct @missirol
The last commit should take care of it

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d65937/31411/summary.html
COMMIT: 396f34b
CMSSW: CMSSW_13_1_X_2023-03-19-0000/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/41100/31411/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 10 lines from the logs
  • Reco comparison results: 5 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3550882
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3550853
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 213 log files, 164 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@perrotta
Copy link
Contributor Author

hold
(Not yet...)

@cmsbuild cmsbuild added the hold label Mar 21, 2023
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41100/34751

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

Pull request has been put on hold by @perrotta
They need to issue an unhold command to remove the hold state or L1 can unhold it for all

@cmsbuild
Copy link
Contributor

Pull request #41100 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

@perrotta
Copy link
Contributor Author

unhold

@perrotta
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d65937/31475/summary.html
COMMIT: b8b0a9e
CMSSW: CMSSW_13_1_X_2023-03-21-0700/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/41100/31475/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3550931
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3550909
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 213 log files, 164 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@missirol
Copy link
Contributor

+hlt

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

@perrotta
Copy link
Contributor Author

+1

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

3 participants