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

Run the track parameter assertions after updating the track parameters #888

Merged
merged 2 commits into from
Feb 25, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ struct two_filters_smoother {
const matrix_type<1, 1> chi2 =
matrix::transpose(residual) * matrix::inverse(R) * residual;

// Update the bound track parameters
bound_params.set_vector(filtered_vec);
bound_params.set_covariance(filtered_cov);

// Return false if track is parallel to z-axis or phi is not finite
const scalar theta = bound_params.theta();
if (theta <= 0.f || theta >= constant<traccc::scalar>::pi) {
Expand All @@ -159,9 +163,9 @@ struct two_filters_smoother {
return kalman_fitter_status::ERROR_INVERSION;
}

// Update the bound track parameters
bound_params.set_vector(filtered_vec);
bound_params.set_covariance(filtered_cov);
if (std::abs(bound_params.qop()) == 0.f) {
return kalman_fitter_status::ERROR_QOP_ZERO;
}

// Set backward chi2
trk_state.backward_chi2() = getter::element(chi2, 0, 0);
Expand Down
Loading