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

Protect against null VertexRef in DeepBoostedJetTagInfoProducer.cc #45245

Closed
wants to merge 2 commits into from

Conversation

mandrenguyen
Copy link
Contributor

Avoids an invalid reference exception discussed here:
#45190

The issue only pops up on AMD for a reason that's not clear to me.
I have admittedly not investigated why the VertexRef is null.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 17, 2024

cms-bot internal usage

@mandrenguyen
Copy link
Contributor Author

Incidentally, is PR testing done on Intel or AMD?

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45245/40626

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @mandrenguyen for master.

It involves the following packages:

  • RecoBTag/FeatureTools (reconstruction)

@jfernan2, @cmsbuild, @mandrenguyen can you please review it and eventually sign? Thanks.
@castaned, @Ming-Yan, @hqucms, @demuller, @Senphy, @andrzejnovak, @missirol, @AlexDeMoor this is something you requested to watch as well.
@antoniovilela, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45245/40627

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

Pull request #45245 was updated. @cmsbuild, @mandrenguyen, @jfernan2 can you please check and sign again.

@mandrenguyen
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4afc5f/39945/summary.html
COMMIT: 18d6a7a
CMSSW: CMSSW_14_1_X_2024-06-18-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45245/39945/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@mandrenguyen
Copy link
Contributor Author

+1

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

@VinInn
Copy link
Contributor

VinInn commented Jun 20, 2024

Null vertex ref are normal (if pfCand has no track associated )
I suggest to change the protections as

diff --git a/RecoBTag/FeatureTools/src/deep_helpers.cc b/RecoBTag/FeatureTools/src/deep_helpers.cc
index 76b443542b3..faf1649d9b8 100644
--- a/RecoBTag/FeatureTools/src/deep_helpers.cc
+++ b/RecoBTag/FeatureTools/src/deep_helpers.cc
@@ -150,7 +150,7 @@ namespace btagbtvdeep {

   float vtx_ass_from_pfcand(const reco::PFCandidate &pfcand, int pv_ass_quality, const reco::VertexRef &pv) {
     float vtx_ass = pat::PackedCandidate::PVAssociationQuality(qualityMap[pv_ass_quality]);
-    if (pfcand.trackRef().isNonnull() && pv->trackWeight(pfcand.trackRef()) > 0.5 && pv_ass_quality == 7) {
+    if (pv.isNonnull() && pfcand.trackRef().isNonnull() && pv->trackWeight(pfcand.trackRef()) > 0.5 && pv_ass_quality == 7) {
       vtx_ass = pat::PackedCandidate::UsedInFitTight;
     }
     return vtx_ass;

the check pfcand.trackRef().isNonnull() is most probably not required and my guess is that was there to protect against no pv ass

@VinInn
Copy link
Contributor

VinInn commented Jun 20, 2024

IN anycase this PR cure the symptom NOT the cause!!!

@mandrenguyen
Copy link
Contributor Author

hold

@cmsbuild
Copy link
Contributor

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

@mandrenguyen
Copy link
Contributor Author

IN anycase this PR cure the symptom NOT the cause!!!

Indeed this was clear. Thanks for the proposed solution, I will update the PR with your suggestion and test it, when I find a free moment (offline F2F meeting happening now)

@mandrenguyen
Copy link
Contributor Author

@VinInn If you prefer, feel free to open a new PR of course.

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.

3 participants