Skip to content

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

Merged
madbaron merged 1 commit intomainfrom
kk_fixhypo
Aug 24, 2024
Merged

Fix particle hypothesis having to be positive in truth tracking.#23
madbaron merged 1 commit intomainfrom
kk_fixhypo

Conversation

@kkrizka
Copy link
Copy Markdown
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 madbaron and pandreetto August 12, 2024 09:13
Copy link
Copy Markdown
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
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