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

use reco::deltaR2 in HLTrigger/*/ packages #43643

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

missirol
Copy link
Contributor

@missirol missirol commented Jan 2, 2024

PR description:

This PR replaces calls to reco::deltaR (or similar methods) with the faster reco::deltaR2 (or, where appropriate, delta-R^2 calculated explicitly as deta*deta + dphi*dphi) in the HLTrigger/*/ packages. Some notes below.

  • Not all the plugins touched by this PR are used in the current Run-3 HLT menu (many plugins in HLTrigger/*/ are old and unused).
  • The changes in this PR are meant to preserve the current behaviour of all involved plugins.
  • In plugins where an upper/lower bound on a Delta-R distance is taken from the PSet, the value is converted to Delta-R^2 times the sign of the input value (using deltaR x |deltaR|). This preserves the current behaviour of these plugins when a negative deltaR value is specified in the PSet.
  • The change in throughput for the current Run-3 HLT menu was not quantified. It is assumed to be small (and in the right direction, i.e. faster).
  • Minor technical improvements are also applied to some of the plugins touched by this PR.

Merely technical. No changes expected.

PR validation:

addOnTests.py passed (I did not verify that the trigger results remain exactly the same).

If this PR is a backport, please specify the original PR and why you need to backport that PR. If this PR will be backported, please specify to which release cycle the backport is meant for:

N/A

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 2, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 2, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43643/38303

  • This PR adds an extra 64KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 2, 2024

A new Pull Request was created by @missirol (Marino Missiroli) for master.

It involves the following packages:

  • HLTrigger/Egamma (hlt)
  • HLTrigger/HLTfilters (hlt)
  • HLTrigger/JetMET (hlt)
  • HLTrigger/Muon (hlt)
  • HLTrigger/btau (hlt)
  • HLTrigger/special (hlt)

@mmusich, @cmsbuild, @Martin-Grunewald can you please review it and eventually sign? Thanks.
@andrea21z, @jhgoh, @andrzejnovak, @wang0jin, @trocino, @CeliaFernandez, @abbiendi, @ReyerBand, @cericeci, @Martin-Grunewald, @argiro, @Fedespring, @silviodonato, @AlexDeMoor, @HuguesBrun, @demuller, @AnnikaStein, @emilbols, @Ming-Yan, @JyothsnaKomaragiri, @rchatter, @thomreis, @Senphy this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

Copy link
Contributor

@mmusich mmusich left a comment

Choose a reason for hiding this comment

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

In plugins where an upper/lower bound on a Delta-R distance is taken from the PSet, the value is converted to Delta-R^2 times the sign of the input value (using deltaR x |deltaR|). This preserves the current behaviour of these plugins when a negative deltaR value is specified in the PSet.

I am confused by this. Isn't putting a negative value to a defined positive quantity a tell-tale sign of a misconfiguration?
Admittedly I didn't check all of the modules, but at least the couple I checked, I don't see where the sign is used.

@missirol
Copy link
Contributor Author

missirol commented Jan 2, 2024

I am confused by this. Isn't putting a negative value to a defined positive quantity a tell-tale sign of a misconfiguration?

Often yes, but i think it can depend on the plugin. In some cases, one could specify a negative value with the intention of skipping the delta-R cut, or (conversely) not letting anything pass the cut (maybe not realistic, but possible). I initially had an exception thrown in various places for negative values (missirol@3f6b091), but then opted to have a PR that is purely technical in the sense that the current behaviour does not change in any way (no matter the input parameters), but happy to improve.

@mmusich
Copy link
Contributor

mmusich commented Jan 2, 2024

but then opted to have a PR that is purely technical in the sense that the current behaviour does not change in any way

OK, fine by me. Let's follow-up in another PR.

@mmusich
Copy link
Contributor

mmusich commented Jan 2, 2024

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 2, 2024

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a3ed47/36691/summary.html
COMMIT: b4d5d7a
CMSSW: CMSSW_14_0_X_2024-01-02-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43643/36691/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 16 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3247277
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3247246
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 200 log files, 161 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@mmusich
Copy link
Contributor

mmusich commented Jan 4, 2024

type performance-improvements

@mmusich
Copy link
Contributor

mmusich commented Jan 4, 2024

+hlt

  • PR according to description: technical changes to core HLT plugins in order to speed up computation of deltaR;
  • The changes in this PR are meant to preserve the current behaviour of all involved plugins. Further changes altering the current behavior along the lines of use reco::deltaR2 in HLTrigger/*/ packages #43643 (review) can be followed at a later time.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 4, 2024

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

@rappoccio
Copy link
Contributor

+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.

4 participants