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

Fix particle hypothesis having to be positive in truth tracking. #23

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

kkrizka
Copy link
Contributor

@kkrizka kkrizka commented Aug 7, 2024

I had the truth-based tracking (either full truth or truth ckf) fail with the following error:

[ MESSAGE "EventNumber"]  ===== Run  :       1  Event:       0
Marlin: /opt/spack/opt/spack/linux-almalinux9-x86_64/gcc-11.3.1/acts-32.1.0-xyo4rjih3ae4dvy3mgyi4wayju6fme63/include/Acts/EventData/GenericParticleHypothesis.hpp:52: Acts::GenericParticleHypothesis<charge_t>::GenericParticleHypothesis(Acts::PdgParticle) [with charge_t = Acts::AnyCharge]: Assertion `absPdg == makeAbsolutePdgParticle(absPdg) && "pdg is expected to be absolute"' failed.
Aborted

Appears that ACTS requires the particle hypothesis to always correspond to original (? not anti-) variation of the particle. This fixes it by taking the absolute value of the MCParticle PDG before creating the hypothesis.

The convertParticle function has been renamed to getParticleHypothesis to indicate that this is no longer a simple event data model conversion. The PDG ID does change.

@kkrizka kkrizka requested review from pandreetto and madbaron August 12, 2024 09:13
Copy link
Contributor

@madbaron madbaron left a comment

Choose a reason for hiding this comment

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

Looks good to me

@madbaron madbaron merged commit 69c0428 into main Aug 24, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants