From a42f23b96876a0fdfba5a8ab1b6c90a9b1f2dc30 Mon Sep 17 00:00:00 2001 From: "Alexander J. Pfleger" <70842573+AJPfleger@users.noreply.github.com> Date: Wed, 21 Feb 2024 18:15:50 +0100 Subject: [PATCH] fix(gx2f): improved actor and navigation break (#2972) This improves the actor by - aborting when the navigation finished - only acting on `associatedDetectorElement` ## Previous Problem The propagation fails on some geometries with ``` Gx2fPropagat ERROR Step failed with MagneticFieldError:1: Interpolation out of bounds was requested ``` --- Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp b/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp index fad35d61ce9..659b36af6c1 100644 --- a/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp +++ b/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp @@ -393,6 +393,11 @@ class Gx2Fitter { const Logger& /*logger*/) const { assert(result.fittedStates && "No MultiTrajectory set"); + if (state.navigation.navigationBreak) { + ACTS_INFO("Actor: finish: state.navigation.navigationBreak"); + result.finished = true; + } + if (result.finished) { return; } @@ -400,8 +405,8 @@ class Gx2Fitter { // Update: // - Waiting for a current surface auto surface = navigator.currentSurface(state.navigation); - // std::string direction = state.stepping.navDir.toString(); - if (surface != nullptr) { + if (surface != nullptr && + surface->associatedDetectorElement() != nullptr) { ++result.surfaceCount; ACTS_VERBOSE("Surface " << surface->geometryId() << " detected.");