Skip to content

Commit

Permalink
2nd review felix-russo
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger committed Oct 6, 2023
1 parent c30d49d commit 05fbecf
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ class Gx2Fitter {
/// The current iteration of the fitter
size_t nUpdate = Acts::MultiTrajectoryTraits::kInvalid;

/// Mask for the track states. We don't need Smoothed and Filtered
TrackStatePropMask mask =
~(TrackStatePropMask::Smoothed | TrackStatePropMask::Filtered);

/// @brief Gx2f actor operation
///
/// @tparam propagator_state_t is the type of Propagator state
Expand Down Expand Up @@ -415,16 +419,15 @@ class Gx2Fitter {
size_t currentTrackIndex = Acts::MultiTrajectoryTraits::kInvalid;

// Checks if an existing surface is found during the gx2f-iteration.
// If not, there a new index will be generated afterwards
// During the first iteration, we will always create a new index
// If not, a new index will be generated afterwards.
// During the first iteration, we will always create a new index.
if (nUpdate == 0) {
ACTS_VERBOSE(" processSurface: nUpdate == 0 decision");

// Add a full TrackState entry multi trajectory. This allocates
// storage for all components, which we will set later.
currentTrackIndex = result.fittedStates->addTrackState(
~(TrackStatePropMask::Smoothed | TrackStatePropMask::Filtered),
result.lastTrackIndex);
currentTrackIndex =
result.fittedStates->addTrackState(mask, result.lastTrackIndex);
} else {
ACTS_VERBOSE(" processSurface: nUpdate > 0 decision");

Expand All @@ -442,19 +445,15 @@ class Gx2Fitter {
// Add a full TrackState entry multi trajectory. This allocates
// storage for all components, which we will set later.
currentTrackIndex = result.fittedStates->addTrackState(
~(TrackStatePropMask::Smoothed |
TrackStatePropMask::Filtered),
result.lastTrackIndex);
mask, result.lastTrackIndex);
ACTS_VERBOSE(" processSurface: currentTrackIndex (ADD NEW)= "
<< currentTrackIndex);
}
}

auto trackStateProxyRes = detail::getTrackStateProxy(
state, stepper, *surface, *result.fittedStates, currentTrackIndex,
false, logger(), freeToBoundCorrection,
~(TrackStatePropMask::Smoothed | TrackStatePropMask::Filtered),
true);
false, logger(), freeToBoundCorrection, mask, true);
if (!trackStateProxyRes.ok()) {
result.result = trackStateProxyRes.error();
}
Expand Down

0 comments on commit 05fbecf

Please sign in to comment.