diff --git a/Core/include/Acts/TrackFitting/BetheHeitlerApprox.hpp b/Core/include/Acts/TrackFitting/BetheHeitlerApprox.hpp index 5138917b271..24d411b329b 100644 --- a/Core/include/Acts/TrackFitting/BetheHeitlerApprox.hpp +++ b/Core/include/Acts/TrackFitting/BetheHeitlerApprox.hpp @@ -63,8 +63,6 @@ inline auto inverseTransformComponent(double transformed_weight, } // namespace detail -namespace Experimental { - /// This class approximates the Bethe-Heitler with only one component. This is /// mainly inside @ref AtlasBetheHeitlerApprox, but can also be used as the /// only component approximation (then probably for debugging) @@ -283,5 +281,4 @@ class AtlasBetheHeitlerApprox { /// the GSF without the need to load files AtlasBetheHeitlerApprox<6, 5> makeDefaultBetheHeitlerApprox(); -} // namespace Experimental } // namespace Acts diff --git a/Core/include/Acts/TrackFitting/GaussianSumFitter.hpp b/Core/include/Acts/TrackFitting/GaussianSumFitter.hpp index 0d1e63285dc..f4d7f6d61a7 100644 --- a/Core/include/Acts/TrackFitting/GaussianSumFitter.hpp +++ b/Core/include/Acts/TrackFitting/GaussianSumFitter.hpp @@ -36,8 +36,6 @@ struct IsMultiComponentBoundParameters } // namespace detail -namespace Experimental { - /// Gaussian Sum Fitter implementation. /// @tparam propagator_t The propagator type on which the algorithm is built on /// @tparam bethe_heitler_approx_t The type of the Bethe-Heitler-Approximation @@ -472,5 +470,4 @@ struct GaussianSumFitter { } }; -} // namespace Experimental } // namespace Acts diff --git a/Core/include/Acts/TrackFitting/GsfError.hpp b/Core/include/Acts/TrackFitting/GsfError.hpp index b2fa29b40cb..ec74825bd79 100644 --- a/Core/include/Acts/TrackFitting/GsfError.hpp +++ b/Core/include/Acts/TrackFitting/GsfError.hpp @@ -12,7 +12,6 @@ #include namespace Acts { -namespace Experimental { enum class GsfError { StartParametersNotOnStartSurface = 1, @@ -24,11 +23,10 @@ enum class GsfError { std::error_code make_error_code(GsfError e); -} // namespace Experimental } // namespace Acts // register with STL namespace std { template <> -struct is_error_code_enum : std::true_type {}; +struct is_error_code_enum : std::true_type {}; } // namespace std diff --git a/Core/include/Acts/TrackFitting/GsfMixtureReduction.hpp b/Core/include/Acts/TrackFitting/GsfMixtureReduction.hpp index 7861502c778..3b0a3d9704f 100644 --- a/Core/include/Acts/TrackFitting/GsfMixtureReduction.hpp +++ b/Core/include/Acts/TrackFitting/GsfMixtureReduction.hpp @@ -13,8 +13,8 @@ namespace Acts { -void reduceMixtureWithKLDistance( - std::vector &cmpCache, - std::size_t maxCmpsAfterMerge, const Surface &surface); +void reduceMixtureWithKLDistance(std::vector &cmpCache, + std::size_t maxCmpsAfterMerge, + const Surface &surface); } diff --git a/Core/include/Acts/TrackFitting/GsfOptions.hpp b/Core/include/Acts/TrackFitting/GsfOptions.hpp index 920402c5c2a..9930c534d0c 100644 --- a/Core/include/Acts/TrackFitting/GsfOptions.hpp +++ b/Core/include/Acts/TrackFitting/GsfOptions.hpp @@ -20,8 +20,6 @@ namespace Acts { -namespace Experimental { - struct GsfComponent { ActsScalar weight = 0; BoundVector boundPars = BoundVector::Zero(); @@ -109,5 +107,4 @@ struct GsfOptions { #endif }; -} // namespace Experimental } // namespace Acts diff --git a/Core/include/Acts/TrackFitting/detail/GsfActor.hpp b/Core/include/Acts/TrackFitting/detail/GsfActor.hpp index 3eecd0006a1..1eede7cfb40 100644 --- a/Core/include/Acts/TrackFitting/detail/GsfActor.hpp +++ b/Core/include/Acts/TrackFitting/detail/GsfActor.hpp @@ -61,7 +61,7 @@ struct GsfResult { Result result{Result::success()}; // Internal: component cache to avoid reallocation - std::vector componentCache; + std::vector componentCache; }; /// The actor carrying out the GSF algorithm @@ -70,7 +70,7 @@ struct GsfActor { /// Enforce default construction GsfActor() = default; - using ComponentCache = Acts::Experimental::GsfComponent; + using ComponentCache = Acts::GsfComponent; /// Broadcast the result_type using result_type = GsfResult; @@ -106,7 +106,7 @@ struct GsfActor { std::optional numberMeasurements; /// The extensions - Experimental::GsfExtensions extensions; + GsfExtensions extensions; /// Whether we are in the reverse pass or not. This is more reliable than /// checking the navigation direction, because in principle the fitter can @@ -760,7 +760,7 @@ struct GsfActor { /// Set the relevant options that can be set from the Options struct all in /// one place - void setOptions(const Acts::Experimental::GsfOptions& options) { + void setOptions(const Acts::GsfOptions& options) { m_cfg.maxComponents = options.maxComponents; m_cfg.extensions = options.extensions; m_cfg.abortOnError = options.abortOnError; @@ -774,7 +774,7 @@ struct GsfActor { /// An actor that collects the final multi component state once the propagation /// finished struct FinalStateCollector { - using MultiPars = Acts::Experimental::GsfConstants::FinalMultiComponentState; + using MultiPars = Acts::GsfConstants::FinalMultiComponentState; struct result_type { MultiPars pars; diff --git a/Core/src/TrackFitting/BetheHeitlerApprox.cpp b/Core/src/TrackFitting/BetheHeitlerApprox.cpp index 557990ce5af..8b862007050 100644 --- a/Core/src/TrackFitting/BetheHeitlerApprox.cpp +++ b/Core/src/TrackFitting/BetheHeitlerApprox.cpp @@ -8,9 +8,7 @@ #include "Acts/TrackFitting/BetheHeitlerApprox.hpp" -namespace Acts::Experimental { - -AtlasBetheHeitlerApprox<6, 5> makeDefaultBetheHeitlerApprox() { +Acts::AtlasBetheHeitlerApprox<6, 5> Acts::makeDefaultBetheHeitlerApprox() { // Tracking/TrkFitter/TrkGaussianSumFilterUtils/Data/BetheHeitler_cdf_nC6_O5.par // clang-format off constexpr static AtlasBetheHeitlerApprox<6, 5>::Data cdf_cmps6_order5_data = {{ @@ -56,5 +54,3 @@ AtlasBetheHeitlerApprox<6, 5> makeDefaultBetheHeitlerApprox() { return AtlasBetheHeitlerApprox<6, 5>(cdf_cmps6_order5_data, cdf_cmps6_order5_data, true, true); } - -} // namespace Acts::Experimental diff --git a/Core/src/TrackFitting/GsfError.cpp b/Core/src/TrackFitting/GsfError.cpp index 03c771208da..6f925ded1f9 100644 --- a/Core/src/TrackFitting/GsfError.cpp +++ b/Core/src/TrackFitting/GsfError.cpp @@ -19,7 +19,7 @@ class GsfErrorCategory : public std::error_category { // Return what each enum means in text. std::string message(int c) const final { - using Acts::Experimental::GsfError; + using Acts::GsfError; switch (static_cast(c)) { case GsfError::StartParametersHaveNoCovariance: @@ -40,8 +40,7 @@ class GsfErrorCategory : public std::error_category { } // namespace -std::error_code Acts::Experimental::make_error_code( - Acts::Experimental::GsfError e) { +std::error_code Acts::make_error_code(Acts::GsfError e) { static GsfErrorCategory c; return {static_cast(e), c}; } diff --git a/Core/src/TrackFitting/GsfMixtureReduction.cpp b/Core/src/TrackFitting/GsfMixtureReduction.cpp index c4192308167..d0545ad7d02 100644 --- a/Core/src/TrackFitting/GsfMixtureReduction.cpp +++ b/Core/src/TrackFitting/GsfMixtureReduction.cpp @@ -11,10 +11,9 @@ #include "Acts/TrackFitting/detail/SymmetricKlDistanceMatrix.hpp" template -void reduceWithKLDistanceImpl( - std::vector &cmpCache, - std::size_t maxCmpsAfterMerge, const proj_t &proj, - const angle_desc_t &desc) { +void reduceWithKLDistanceImpl(std::vector &cmpCache, + std::size_t maxCmpsAfterMerge, const proj_t &proj, + const angle_desc_t &desc) { Acts::detail::SymmetricKLDistanceMatrix distances(cmpCache, proj); auto remainingComponents = cmpCache.size(); @@ -50,9 +49,9 @@ void reduceWithKLDistanceImpl( namespace Acts { -void reduceMixtureWithKLDistance( - std::vector &cmpCache, - std::size_t maxCmpsAfterMerge, const Surface &surface) { +void reduceMixtureWithKLDistance(std::vector &cmpCache, + std::size_t maxCmpsAfterMerge, + const Surface &surface) { if (cmpCache.size() <= maxCmpsAfterMerge) { return; } diff --git a/Examples/Algorithms/TrackFitting/include/ActsExamples/TrackFitting/TrackFitterFunction.hpp b/Examples/Algorithms/TrackFitting/include/ActsExamples/TrackFitting/TrackFitterFunction.hpp index 75498bb5950..de0dcf09650 100644 --- a/Examples/Algorithms/TrackFitting/include/ActsExamples/TrackFitting/TrackFitterFunction.hpp +++ b/Examples/Algorithms/TrackFitting/include/ActsExamples/TrackFitting/TrackFitterFunction.hpp @@ -72,7 +72,7 @@ std::shared_ptr makeKalmanFitterFunction( /// This type is used in the Examples framework for the Bethe-Heitler /// approximation -using BetheHeitlerApprox = Acts::Experimental::AtlasBetheHeitlerApprox<6, 5>; +using BetheHeitlerApprox = Acts::AtlasBetheHeitlerApprox<6, 5>; /// Makes a fitter function object for the GSF /// diff --git a/Examples/Algorithms/TrackFitting/src/GsfFitterFunction.cpp b/Examples/Algorithms/TrackFitting/src/GsfFitterFunction.cpp index d01005ca0a3..989d1ccfe72 100644 --- a/Examples/Algorithms/TrackFitting/src/GsfFitterFunction.cpp +++ b/Examples/Algorithms/TrackFitting/src/GsfFitterFunction.cpp @@ -62,12 +62,11 @@ using MultiStepper = Acts::MultiEigenStepperLoop<>; using Propagator = Acts::Propagator; using DirectPropagator = Acts::Propagator; -using Fitter = - Acts::Experimental::GaussianSumFitter; +using Fitter = Acts::GaussianSumFitter; using DirectFitter = - Acts::Experimental::GaussianSumFitter; + Acts::GaussianSumFitter; using TrackContainer = Acts::TrackContainer; @@ -96,12 +95,12 @@ struct GsfFitterFunctionImpl final : public ActsExamples::TrackFitterFunction { template auto makeGsfOptions(const GeneralFitterOptions& options, const calibrator_t& calibrator) const { - Acts::Experimental::GsfExtensions extensions; + Acts::GsfExtensions extensions; extensions.updater.connect< &Acts::GainMatrixUpdater::operator()>( &updater); - Acts::Experimental::GsfOptions gsfOptions{ + Acts::GsfOptions gsfOptions{ options.geoContext, options.magFieldContext, options.calibrationContext, @@ -131,7 +130,7 @@ struct GsfFitterFunctionImpl final : public ActsExamples::TrackFitterFunction { TrackContainer& tracks) const override { const auto gsfOptions = makeGsfOptions(options, calibrator); - using namespace Acts::Experimental::GsfConstants; + using namespace Acts::GsfConstants; if (not tracks.hasColumn( Acts::hashString(kFinalMultiComponentStateColumn))) { std::string key(kFinalMultiComponentStateColumn); @@ -151,7 +150,7 @@ struct GsfFitterFunctionImpl final : public ActsExamples::TrackFitterFunction { TrackContainer& tracks) const override { const auto gsfOptions = makeGsfOptions(options, calibrator); - using namespace Acts::Experimental::GsfConstants; + using namespace Acts::GsfConstants; if (not tracks.hasColumn( Acts::hashString(kFinalMultiComponentStateColumn))) { std::string key(kFinalMultiComponentStateColumn); diff --git a/Examples/Python/src/TrackFitting.cpp b/Examples/Python/src/TrackFitting.cpp index 0c00c3e9f1f..8dcf9f0e917 100644 --- a/Examples/Python/src/TrackFitting.cpp +++ b/Examples/Python/src/TrackFitting.cpp @@ -105,9 +105,8 @@ void addTrackFitting(Context& ctx) { .def_static("loadFromFiles", &ActsExamples::BetheHeitlerApprox::loadFromFiles, py::arg("lowParametersPath"), py::arg("lowParametersPath")) - .def_static("makeDefault", []() { - return Acts::Experimental::makeDefaultBetheHeitlerApprox(); - }); + .def_static("makeDefault", + []() { return Acts::makeDefaultBetheHeitlerApprox(); }); mex.def( "makeGsfFitterFunction", diff --git a/Tests/UnitTests/Core/TrackFitting/GsfMixtureReductionTests.cpp b/Tests/UnitTests/Core/TrackFitting/GsfMixtureReductionTests.cpp index 9cf93d69cec..e7775686d84 100644 --- a/Tests/UnitTests/Core/TrackFitting/GsfMixtureReductionTests.cpp +++ b/Tests/UnitTests/Core/TrackFitting/GsfMixtureReductionTests.cpp @@ -24,8 +24,6 @@ #include using namespace Acts; -using namespace Acts::Experimental; -using namespace Acts::UnitLiterals; BOOST_AUTO_TEST_CASE(test_distance_matrix_min_distance) { std::vector cmps = { diff --git a/Tests/UnitTests/Core/TrackFitting/GsfTests.cpp b/Tests/UnitTests/Core/TrackFitting/GsfTests.cpp index e59872a6f79..57ad2d176b4 100644 --- a/Tests/UnitTests/Core/TrackFitting/GsfTests.cpp +++ b/Tests/UnitTests/Core/TrackFitting/GsfTests.cpp @@ -65,7 +65,6 @@ namespace { using namespace Acts; using namespace Acts::Test; using namespace Acts::UnitLiterals; -using namespace Acts::Experimental; static const auto electron = ParticleHypothesis::electron(); @@ -224,7 +223,7 @@ BOOST_AUTO_TEST_CASE(ZeroFieldWithOutliers) { BOOST_AUTO_TEST_CASE(WithFinalMultiComponentState) { Acts::TrackContainer tracks{Acts::VectorTrackContainer{}, Acts::VectorMultiTrajectory{}}; - using namespace Acts::Experimental::GsfConstants; + using namespace Acts::GsfConstants; std::string key(kFinalMultiComponentStateColumn); tracks.template addColumn(key); diff --git a/docs/core/track_fitting.md b/docs/core/track_fitting.md index c12e63523d6..4dd96955b1d 100644 --- a/docs/core/track_fitting.md +++ b/docs/core/track_fitting.md @@ -33,10 +33,6 @@ This chapter will be extended in the future. (gsf_core)= ## Gaussian Sum Filter (GSF) -:::{note} -The GSF is not considered as production ready yet, therefore it is located in the namespace `Acts::Experimental`. -::: - The GSF is an extension of the Kalman-Filter that allows to handle non-gaussian errors by modelling the track state as a gaussian mixture: $$ @@ -82,9 +78,9 @@ Even though the multi-stepper interface exposes only one aggregate state and thu ### Using the GSF -The GSF is implemented in the class {class}`Acts::Experimental::GaussianSumFitter`. The interface of its `fit(...)`-functions is very similar to the one of the {class}`Acts::KalmanFitter` (one for the standard {class}`Acts::Navigator` and one for the {class}`Acts::DirectNavigator` that takes an additional `std::vector` as an argument): +The GSF is implemented in the class {class}`Acts::GaussianSumFitter`. The interface of its `fit(...)`-functions is very similar to the one of the {class}`Acts::KalmanFitter` (one for the standard {class}`Acts::Navigator` and one for the {class}`Acts::DirectNavigator` that takes an additional `std::vector` as an argument): -```{doxygenstruct} Acts::Experimental::GaussianSumFitter +```{doxygenstruct} Acts::GaussianSumFitter --- members: fit outline: @@ -95,17 +91,17 @@ The fit can be customized with several options, e.g., the maximum number of comp To simplify integration, the GSF returns an {class}`Acts::KalmanFitterResult` object, the same as the {class}`Acts::KalmanFitter`. This allows to use the same analysis tools for both fitters. -If the GSF finds the column with the string identifier *"gsf-final-multi-component-state"* (defined in `Acts::Experimental::GsfConstants::kFinalMultiComponentStateColumn`) in the track container, it adds the final multi-component state to the track as a `std::optional>` object. +If the GSF finds the column with the string identifier *"gsf-final-multi-component-state"* (defined in `Acts::GsfConstants::kFinalMultiComponentStateColumn`) in the track container, it adds the final multi-component state to the track as a `std::optional>` object. A GSF example can be found in the Acts Examples Framework [here](https://github.com/acts-project/acts/blob/main/Examples/Scripts/Python/truth_tracking_gsf.py). ### Customising the Bethe-Heitler approximation -The GSF needs an approximation of the Bethe-Heitler distribution as a Gaussian mixture on each material interaction (see above). This task is delegated to a separate class, that can be provided by a template parameter to {class}`Acts::Experimental::GaussianSumFitter`, so in principle it can be implemented in different ways. +The GSF needs an approximation of the Bethe-Heitler distribution as a Gaussian mixture on each material interaction (see above). This task is delegated to a separate class, that can be provided by a template parameter to {class}`Acts::GaussianSumFitter`, so in principle it can be implemented in different ways. -However, ACTS ships with the class {class}`Acts::Experimental::AtlasBetheHeitlerApprox` that implements the ATLAS strategy for this task: To be able to evaluate the approximation of the Bethe-Heitler distribution for different materials and thicknesses, the individual Gaussian components (weight, mean, variance of the ratio $E_f/E_i$) are parametrised as polynomials in $x/x_0$. This class can load files in the ATLAS format that can be found [here](https://gitlab.cern.ch/atlas/athena/-/tree/master/Tracking/TrkFitter/TrkGaussianSumFilter/Data). A default parameterization can be created with {func}`Acts::Experimental::makeDefaultBetheHeitlerApprox`. +However, ACTS ships with the class {class}`Acts::AtlasBetheHeitlerApprox` that implements the ATLAS strategy for this task: To be able to evaluate the approximation of the Bethe-Heitler distribution for different materials and thicknesses, the individual Gaussian components (weight, mean, variance of the ratio $E_f/E_i$) are parametrised as polynomials in $x/x_0$. This class can load files in the ATLAS format that can be found [here](https://gitlab.cern.ch/atlas/athena/-/tree/master/Tracking/TrkFitter/TrkGaussianSumFilter/Data). A default parameterization can be created with {func}`Acts::makeDefaultBetheHeitlerApprox`. -The {class}`Acts::Experimental::AtlasBetheHeitlerApprox` is constructed with two parameterizations, allowing to use different parameterizations for different $x/x_0$. In particular, it has this behaviour: +The {class}`Acts::AtlasBetheHeitlerApprox` is constructed with two parameterizations, allowing to use different parameterizations for different $x/x_0$. In particular, it has this behaviour: * $x/x_0 < 0.0001$: Return no change * $x/x_0 < 0.002$: Return a single gaussian approximation * $x/x_0 < 0.1$: Return the approximation for low $x/x_0$.