MuonColliderSoft / ACTSTracking

GNU General Public License v3.0
0 stars 5 forks source link

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

Closed kkrizka closed 2 months ago

kkrizka commented 3 months ago

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.