Skip to content

Commit

Permalink
perf: Share first smoothed state from filtered in smoothing (#3129)
Browse files Browse the repository at this point in the history
Sharing the state should be safe as it is the tip of the track. This should at least save a little of CPU and MEM
  • Loading branch information
andiwand authored Apr 24, 2024
1 parent 12b8611 commit 5ed2a2f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Core/include/Acts/TrackFitting/GainMatrixSmoother.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,8 @@ class GainMatrixSmoother {
ACTS_VERBOSE("Getting previous track state");
auto prev_ts = trajectory.getTrackState(entryIndex);

// ensure the track state has a smoothed component
prev_ts.addComponents(TrackStatePropMask::Smoothed);

prev_ts.smoothed() = prev_ts.filtered();
prev_ts.smoothedCovariance() = prev_ts.filteredCovariance();
prev_ts.shareFrom(TrackStatePropMask::Filtered,
TrackStatePropMask::Smoothed);

// make sure there is more than one track state
if (!prev_ts.hasPrevious()) {
Expand Down

0 comments on commit 5ed2a2f

Please sign in to comment.