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
Move "inverse of Bz at origin in GeV" from PixelRecoUtilities to MagneticField #35081
Move "inverse of Bz at origin in GeV" from PixelRecoUtilities to MagneticField #35081
Conversation
… nominal values in the constructor. This is a preparatory step to migrate PixelRecoUtilities to esConsumes
…nGeV() In order to migrate the code to esConsumes()
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35081/24962
|
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages:
@civanch, @lveldere, @sbein, @ssekmen, @mdhildreth, @cmsbuild, @slava77, @jpata can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4104ab/18152/summary.html CMS StaticAnalyzer warnings: There are 19 EventSetupRecord::get warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4104ab/18152/llvm-analysis/esrget-sa.txt for details. Comparison SummarySummary:
|
this doesn't quite agree with #35081 (comment) :
|
@namapane |
Right. I've been investigating those differences. They look like (at most) handful of tracks moving between iterations or having slightly different parameters (i.e. numerical differences), that then cause tiny knock-on effects downstream. I've almost tracked down (in 140.56) which exact change(s) is causing the havoc. |
I have no major comment apart maybe for the naming of the new method (I find "nominal" to be confusing; "nominalValue()" is named this way because it is intended to be used as a label, while this one is intended to be used for physics, for a very specific use case). Also, using Bz at (0,0,0) instead of the actual value is an approximation that should not be taken as obvious and for this reason I don't particularly like exposing it in the interface... but this is my taste maybe. Anyhow, |
@makortel |
@namapane |
How about something along |
another option is |
for (int i = 0; i < 4; ++i) { | ||
const GlobalPoint& point = gps[i]; | ||
const GlobalError& error = ges[i]; | ||
bc_r[i] = sqrt(sqr(point.x() - region.origin().x()) + sqr(point.y() - region.origin().y())); | ||
bc_r[i] += pixelrecoutilities::LongitudinalBendingCorrection(pt, es)(bc_r[i]); | ||
bc_r[i] += pixelrecoutilities::LongitudinalBendingCorrection(pt, *theField)(bc_r[i]); |
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.
Please clarify if the investigation was completed.
Not quite (I lost yesterday because of CERN's LDAP issues). I have found (in 140.56) that this specific call (in CAHitTripletGenerator
as well) somehow makes the difference. That happens even if in PixelRecoUtilities::FieldAt0::FieldAt0()
I set the FieldAt0::fieldInInvGev
from the MagneticField::inverseNominalValueInGeV()
instead of calculating it in the FieldAt0
constructor.
Or |
@cmsbuild, please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4104ab/18361/summary.html CMS StaticAnalyzer warnings: There are 19 EventSetupRecord::get warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4104ab/18361/llvm-analysis/esrget-sa.txt for details. Comparison SummarySummary:
|
+reconstruction
|
@cms-sw/fastsim-l2 Could you review and sign, please? |
ping @cms-sw/fastsim-l2 |
+1 |
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 (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR is part of #31061 and attempts to resolve #30560 following the suggestion in #30560 (comment). The "inverse of Bz at origin in GeV" is moved from
PixelRecoUtilities
as part ofMagneticField
directly, and the caching of "nominal value in kGauss" is replaced with setting the nominal values in the constructor of the concreteMagneticField
class.Despite of being part of #31061 this PR adds bunch of calls to the deprecated
EventSetupRecord::get()
function withoutesConsumes()
. This was done to avoid this PR growing too big, because many of the calling classes need to be reworked as well foresConsumes()
, and it would be good to get feedback on the approach of this PR early. Those will be addressed in a subsequent PR.Resolves #30560, resolves cms-sw/framework-team#250
PR validation:
Limited matrix runs.
The floating point math should be equivalent to the earlier implementation, and therefore no changes are expected.A tiny regression is observed (numerical changes affecting order of few tracks in 10 events in the PR tests). Further testing showed that 7ca3586 would be enough to restore the previous results.