-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[14.0.X] fixup eta lookup in absEtaLowEdges_
in miscellaneous RecoEgamma/EgammaHLTProducers
plugins
#44768
[14.0.X] fixup eta lookup in absEtaLowEdges_
in miscellaneous RecoEgamma/EgammaHLTProducers
plugins
#44768
Conversation
…LTProducers plugins
type egamma, bug-fix |
A new Pull Request was created by @mmusich for CMSSW_14_0_X. It involves the following packages:
@mmusich, @cmsbuild, @Martin-Grunewald can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
cms-bot internal usage |
@cmsbuild, please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-eea3ea/38918/summary.html Comparison SummarySummary:
|
+hlt
|
This pull request is fully signed and it will be integrated in one of the next CMSSW_14_0_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_14_1_X is complete. This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @rappoccio, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2) |
@@ -229,12 +229,12 @@ void EgammaHLTHcalVarProducerFromRecHit::produce(edm::StreamID, | |||
int iEA = -1; | |||
auto scEta = std::abs(recoEcalCandRef->superCluster()->eta()); | |||
for (int bIt = absEtaLowEdges_.size() - 1; bIt > -1; bIt--) { | |||
if (scEta > absEtaLowEdges_.at(bIt)) { | |||
if (scEta >= absEtaLowEdges_[bIt]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most probably
int iEA = std::lower_bound(absEtaLowEdges_.begin(),absEtaLowEdges_.end(),scEta)
would do it better.
(why we need always to re-invent the way to find a bin in a Histogram?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered that, this is the minimal fix.
+1 |
…TProducers_14_0_X [14.0.X] fixup eta lookup in `absEtaLowEdges_` in miscellaneous `RecoEgamma/EgammaHLTProducers` plugins
backport of #44764
PR description:
Implements what's discussed in #44759 (comment) and #44759 (comment). Avoids bound check failures when having input candidate with
eta()
exactly equal to 0.PR validation:
Run the following script:
in this branch and verified that there are no failures.
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:
verbatim backport of #44764 to the 2024 data-taking release.