-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Fixed sign in pat::Muon::dB() to match one obtained from the best track definition #28753
Conversation
…track instead of using the b tagging-like direction definition
…e primary vertex position
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28753/13387
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28753/13389
|
A new Pull Request was created by @cericeci (Carlos Erice) for master. It involves the following packages: PhysicsTools/PatAlgos @perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@@ -1101,6 +1101,8 @@ void PATMuonProducer::embedHighLevel(pat::Muon& aMuon, | |||
IPTools::signedTransverseImpactParameter(tt, GlobalVector(track->px(), track->py(), track->pz()), primaryVertex); | |||
double d0_corr = result.second.value(); | |||
double d0_err = primaryVertexIsValid ? result.second.error() : -1.0; | |||
// Now correct the sign using information from the track | |||
d0_corr = (track->dxy(primaryVertex.position()) > 0 ? 1 : -1) * fabs(d0_corr); |
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.
this can be
d0_corr = (track->dxy(primaryVertex.position()) > 0 ? 1 : -1) * fabs(d0_corr); | |
d0_corr = std::copysign(d0_corr, track->dxy(primaryVertex.position())); |
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.
actually, I'd modify on L1102 instead. There is no significant need to assign one value and then to apply this correction.
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28753/13392
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+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 be automatically merged. |
…_10_6_X_fixPatMuondXY_10_6_X Backport of #28753 (fix the sign of pat::Muon dxy to take the one from the track)
PR description:
The the transverse impact parameter for pat::Muon was being computed using the IPTools package. It takes the sign from the scalar product of the tangent vector to the best track at the point of closest approach to the PCA to PV vector. While this makes sense for complex objects like jets, for muon tracks it should be ~0 by definition. Thus, while the absolute dxy value makes sense the sign did not. This fixes it by switching to use the same IP sign as the dxy obtained from the best track.
This has been noted and later corrected from the nanoAOD side in
cms-nanoAOD#475
An open JIRA ticket was opened discussing the problem in the muon group
https://its.cern.ch/jira/browse/CMSMUONS-311
Expected changes
The sign obtained from pat::Muon.dB(pat::Muon::PV2D) and pat::Muon.dB(pat::Muon::BS2D) should now match what could be obtained from the track collection as pat::Muon.bestTrack()->dxy(PV or BS). Expect no changes in the absolute value itself.
PR validation
Tested locally in a couple of Z->mumu RelVal AOD samples obtaining the desired results.
No additional changes from code checks.
Minimal integration checks from runTheMatrix.py -l limited -i all passed.