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

Fix the bug in getting the first smoother state #863

Merged
merged 1 commit into from
Feb 14, 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
10 changes: 9 additions & 1 deletion core/include/traccc/fitting/kalman_filter/kalman_fitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,15 @@ class kalman_fitter {
// Since the smoothed track parameter of the last surface can be
// considered to be the filtered one, we can reversly iterate the
// algorithm to obtain the smoothed parameter of other surfaces
auto& last = track_states.back();
for (auto it = track_states.rbegin(); it != track_states.rend(); ++it) {
if (!(*it).is_hole) {
fitter_state.m_fit_actor_state.m_it_rev = it;
break;
}
// TODO: Return false because there is no valid track state
// return false;
}
auto& last = *fitter_state.m_fit_actor_state.m_it_rev;
last.smoothed().set_parameter_vector(last.filtered());
last.smoothed().set_covariance(last.filtered().covariance());
last.smoothed_chi2() = last.filtered_chi2();
Expand Down
Loading