From afa54d1dbf60f06ec51face9bdcfc49fd2ba4b0d Mon Sep 17 00:00:00 2001 From: Joana Niermann Date: Wed, 1 Apr 2026 17:59:26 +0200 Subject: [PATCH] Skip material interactions for chaged particles, if the particle is neutral --- .../actors/pointwise_material_interactor.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/include/detray/propagator/actors/pointwise_material_interactor.hpp b/core/include/detray/propagator/actors/pointwise_material_interactor.hpp index 09fdf5086..578f184b5 100644 --- a/core/include/detray/propagator/actors/pointwise_material_interactor.hpp +++ b/core/include/detray/propagator/actors/pointwise_material_interactor.hpp @@ -93,6 +93,18 @@ struct pointwise_material_interactor : public base_actor { const scalar_type qop = bound_params.qop(); + // Set to exactly zero if the particle is not charged + if (qop == 0.f) { + + // TODO: Implement interactions for neutral particles here + + DETRAY_DEBUG_HOST_DEVICE( + "Currently no interactions for neutral particles " + "implemented: skipping"); + + return false; + } + const scalar_type path_segment{ mat.path_segment(cos_inc_angle, approach)};