Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Improve CKF error message if target surface is not reached #2587

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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 reached 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;
Expand Down