From 059cf50e1cf6bf9e03549ae5338df5c2c9dda6bb Mon Sep 17 00:00:00 2001 From: AJPfleger Date: Fri, 14 Jun 2024 15:27:47 +0200 Subject: [PATCH 1/2] make constant --- .../TrackFitting/GlobalChiSquareFitter.hpp | 35 ++++++++----------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp b/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp index d0cb780efee..f621a10dd20 100644 --- a/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp +++ b/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp @@ -49,9 +49,14 @@ 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 +/// Extension struct which holds delegates to customise the GX2F behaviour template struct Gx2FitterExtensions { using TrackStateProxy = typename MultiTrajectory::TrackStateProxy; @@ -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 TrackState entry multi trajectory. This allocates - // storage for all components, which we will set later. + // Add a 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 @@ -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 TrackState entry multi trajectory. This allocates - // storage for all components, which we will set later. + // Add a 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 From 680ce71c426524d59d458bfce81d89c705d02f78 Mon Sep 17 00:00:00 2001 From: AJPfleger Date: Fri, 14 Jun 2024 15:39:12 +0200 Subject: [PATCH 2/2] revert doc line --- Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp b/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp index f621a10dd20..6b0e10dc86e 100644 --- a/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp +++ b/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp @@ -56,7 +56,7 @@ constexpr TrackStatePropMask trackStateMask = TrackStatePropMask::Predicted | TrackStatePropMask::Calibrated; } // namespace Gx2fConstants -/// Extension struct which holds delegates to customise the GX2F behaviour +/// Extension struct which holds delegates to customize the KF behavior template struct Gx2FitterExtensions { using TrackStateProxy = typename MultiTrajectory::TrackStateProxy;