diff --git a/core/include/traccc/fitting/kalman_filter/gain_matrix_updater.hpp b/core/include/traccc/fitting/kalman_filter/gain_matrix_updater.hpp index 34ee9b3bb..e54b048ad 100644 --- a/core/include/traccc/fitting/kalman_filter/gain_matrix_updater.hpp +++ b/core/include/traccc/fitting/kalman_filter/gain_matrix_updater.hpp @@ -40,7 +40,7 @@ struct gain_matrix_updater { TRACCC_HOST_DEVICE inline bool operator()( const mask_group_t& /*mask_group*/, const index_t& /*index*/, track_state& trk_state, - bound_track_parameters& bound_params) const { + const bound_track_parameters& bound_params) const { using shape_type = typename mask_group_t::value_type::shape; @@ -63,7 +63,7 @@ struct gain_matrix_updater { template TRACCC_HOST_DEVICE inline bool update( track_state& trk_state, - bound_track_parameters& bound_params) const { + const bound_track_parameters& bound_params) const { static_assert(((D == 1u) || (D == 2u)), "The measurement dimension should be 1 or 2"); @@ -138,9 +138,6 @@ struct gain_matrix_updater { // Wrap the phi in the range of [-pi, pi] wrap_phi(trk_state.filtered()); - // Update the propagation flow - bound_params = trk_state.filtered(); - return true; } }; diff --git a/core/include/traccc/fitting/kalman_filter/kalman_actor.hpp b/core/include/traccc/fitting/kalman_filter/kalman_actor.hpp index 4384c49de..7427b9244 100644 --- a/core/include/traccc/fitting/kalman_filter/kalman_actor.hpp +++ b/core/include/traccc/fitting/kalman_filter/kalman_actor.hpp @@ -75,13 +75,11 @@ struct kalman_actor : detray::actor { /// @return true if the iterator reaches the end of vector TRACCC_HOST_DEVICE bool is_complete() const { - /* if (!backward_mode && m_it == m_track_states.end()) { return true; } else if (backward_mode && m_it_rev == m_track_states.rend()) { return true; } - */ return false; } @@ -144,6 +142,9 @@ struct kalman_actor : detray::actor { res = sf.template visit_mask>( trk_state, propagation._stepping.bound_params()); + // Update the propagation flow + stepping.bound_params() = trk_state.filtered(); + // Set full jacobian trk_state.jacobian() = stepping.full_jacobian(); } diff --git a/core/include/traccc/fitting/kalman_filter/two_filters_smoother.hpp b/core/include/traccc/fitting/kalman_filter/two_filters_smoother.hpp index 72f375b0f..a5aa2996f 100644 --- a/core/include/traccc/fitting/kalman_filter/two_filters_smoother.hpp +++ b/core/include/traccc/fitting/kalman_filter/two_filters_smoother.hpp @@ -154,7 +154,7 @@ struct two_filters_smoother { return false; } - // Update the propagation flow + // Update the bound track parameters bound_params.set_vector(filtered_vec); bound_params.set_covariance(filtered_cov);