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(gx2f): make constant TrackStatePropMask #3293

Merged
merged 3 commits into from
Jun 14, 2024
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
33 changes: 13 additions & 20 deletions Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ namespace Acts::Experimental {

namespace Gx2fConstants {
constexpr std::string_view gx2fnUpdateColumn = "Gx2fnUpdateColumn";

// Mask for the track states. We don't need Smoothed and Filtered
constexpr TrackStatePropMask trackStateMask = TrackStatePropMask::Predicted |
TrackStatePropMask::Jacobian |
TrackStatePropMask::Calibrated;
} // namespace Gx2fConstants

/// Extension struct which holds delegates to customize the KF behavior
Expand Down Expand Up @@ -463,17 +468,11 @@ class Gx2Fitter {
// TODO generalize the update of the currentTrackIndex
auto& fittedStates = *result.fittedStates;

// Mask for the track states. We don't need Smoothed and Filtered
TrackStatePropMask mask = TrackStatePropMask::Predicted |
TrackStatePropMask::Jacobian |
TrackStatePropMask::Calibrated;

ACTS_VERBOSE(" processSurface: addTrackState");

// Add a <mask> TrackState entry multi trajectory. This allocates
// storage for all components, which we will set later.
// Add a <trackStateMask> TrackState entry multi trajectory. This
// allocates storage for all components, which we will set later.
typename traj_t::TrackStateProxy trackStateProxy =
fittedStates.makeTrackState(mask, result.lastTrackIndex);
fittedStates.makeTrackState(Gx2fConstants::trackStateMask,
result.lastTrackIndex);
std::size_t currentTrackIndex = trackStateProxy.index();

// Set the trackStateProxy components with the state from the ongoing
Expand Down Expand Up @@ -552,17 +551,11 @@ class Gx2Fitter {

auto& fittedStates = *result.fittedStates;

// Mask for the track states. We don't need Smoothed and Filtered
TrackStatePropMask mask = TrackStatePropMask::Predicted |
TrackStatePropMask::Jacobian |
TrackStatePropMask::Calibrated;

ACTS_VERBOSE(" processSurface: addTrackState");

// Add a <mask> TrackState entry multi trajectory. This allocates
// storage for all components, which we will set later.
// Add a <trackStateMask> TrackState entry multi trajectory. This
// allocates storage for all components, which we will set later.
typename traj_t::TrackStateProxy trackStateProxy =
fittedStates.makeTrackState(mask, result.lastTrackIndex);
fittedStates.makeTrackState(Gx2fConstants::trackStateMask,
result.lastTrackIndex);
std::size_t currentTrackIndex = trackStateProxy.index();
{
// Set the trackStateProxy components with the state from the
Expand Down
Loading