From b407e7fcd258dd05a487304edf9c9eeee1b978a7 Mon Sep 17 00:00:00 2001 From: andiwand Date: Fri, 27 Oct 2023 11:29:23 +0200 Subject: [PATCH 1/2] improve ckf error message if target surface is not reached --- .../CombinatorialKalmanFilter.hpp | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp index 16e89fe91ce..06a0d50513e 100644 --- a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp +++ b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp @@ -549,12 +549,13 @@ class CombinatorialKalmanFilter { // -> then progress to target/reference surface and built the final // track parameters for found track indexed with iSmoothed - if (result.smoothed and - (smoothingTargetSurface == nullptr or - targetReached(state, stepper, navigator, - *smoothingTargetSurface, logger()) or - result.pathLimitReached(state, stepper, navigator, - logger()))) { + bool isTargetReached = + (smoothingTargetSurface == nullptr) or + targetReached(state, stepper, navigator, + *smoothingTargetSurface, logger()); + bool isPathLimitReached = + result.pathLimitReached(state, stepper, navigator, logger()); + if (result.smoothed and (isTargetReached or isPathLimitReached)) { ACTS_VERBOSE( "Completing the track with last measurement index = " << result.lastMeasurementIndices.at(result.iSmoothed)); @@ -564,7 +565,14 @@ class CombinatorialKalmanFilter { auto res = stepper.boundState(state.stepping, *smoothingTargetSurface); if (!res.ok()) { - ACTS_ERROR("Error in finalize: " << res.error()); + if (isPathLimitReached) { + ACTS_ERROR("Target surface not seached due to path limit: " + << res.error() << " " << res.error().message()); + } else { + ACTS_ERROR( + "Error while acquiring bound state for target surface: " + << res.error() << " " << res.error().message()); + } result.lastError = res.error(); } else { auto fittedState = *res; From 12f42ba3581bd60fd581d2def7017f6f912d7983 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Fri, 27 Oct 2023 11:32:46 +0200 Subject: [PATCH 2/2] Update Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp --- Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp index 06a0d50513e..30e266bf8b3 100644 --- a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp +++ b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp @@ -566,7 +566,7 @@ class CombinatorialKalmanFilter { stepper.boundState(state.stepping, *smoothingTargetSurface); if (!res.ok()) { if (isPathLimitReached) { - ACTS_ERROR("Target surface not seached due to path limit: " + ACTS_ERROR("Target surface not reached due to path limit: " << res.error() << " " << res.error().message()); } else { ACTS_ERROR(