diff --git a/Core/include/Acts/Propagator/Propagator.hpp b/Core/include/Acts/Propagator/Propagator.hpp index 6a38e5d2a8f..842504f29f8 100644 --- a/Core/include/Acts/Propagator/Propagator.hpp +++ b/Core/include/Acts/Propagator/Propagator.hpp @@ -13,13 +13,8 @@ #include "Acts/Utilities/detail/ReferenceWrapperAnyCompat.hpp" // clang-format on -#include "Acts/Definitions/Algebra.hpp" -#include "Acts/Definitions/PdgParticle.hpp" -#include "Acts/Definitions/Units.hpp" #include "Acts/EventData/TrackParameters.hpp" #include "Acts/EventData/TrackParametersConcept.hpp" -#include "Acts/Geometry/GeometryContext.hpp" -#include "Acts/MagneticField/MagneticFieldContext.hpp" #include "Acts/Propagator/ActorList.hpp" #include "Acts/Propagator/PropagatorOptions.hpp" #include "Acts/Propagator/PropagatorResult.hpp" @@ -32,8 +27,6 @@ #include "Acts/Utilities/Logger.hpp" #include "Acts/Utilities/Result.hpp" -#include - namespace Acts { /// Common simplified base interface for propagators. @@ -56,6 +49,17 @@ class BasePropagator { const BoundTrackParameters& start, const Surface& target, const Options& options) const = 0; + /// Method to propagate start free vector to a target surface. + /// @note this will not do covariance transport and the particle + /// hypothesis in the result is meaningless + /// @param start The start free vector. + /// @param target The target surface. + /// @param options The propagation options. + /// @return The end bound track parameters. + virtual Result propagateToSurface( + const FreeVector& start, const Surface& target, + const Options& options) const = 0; + virtual ~BasePropagator() = default; }; @@ -68,6 +72,10 @@ class BasePropagatorHelper : public BasePropagator { Result propagateToSurface( const BoundTrackParameters& start, const Surface& target, const Options& options) const override; + + Result propagateToSurface( + const FreeVector& start, const Surface& target, + const Options& options) const override; }; } // namespace detail diff --git a/Core/include/Acts/Propagator/Propagator.ipp b/Core/include/Acts/Propagator/Propagator.ipp index 8a7c560a725..3df2385e6af 100644 --- a/Core/include/Acts/Propagator/Propagator.ipp +++ b/Core/include/Acts/Propagator/Propagator.ipp @@ -6,12 +6,14 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. +#include "Acts/Definitions/TrackParametrization.hpp" #include "Acts/EventData/TrackParametersConcept.hpp" #include "Acts/Propagator/ActorList.hpp" #include "Acts/Propagator/ConstrainedStep.hpp" #include "Acts/Propagator/PropagatorError.hpp" #include "Acts/Propagator/StandardAborters.hpp" #include "Acts/Propagator/detail/LoopProtection.hpp" +#include "Acts/Surfaces/CurvilinearSurface.hpp" #include @@ -383,3 +385,18 @@ Acts::detail::BasePropagatorHelper::propagateToSurface( return res.error(); } } + +template +Acts::Result +Acts::detail::BasePropagatorHelper::propagateToSurface( + const FreeVector& start, const Surface& target, + const Options& options) const { + // Convert free parameters to curvilinear parameters. Randomly picking pion + // hypothesis which should not make a difference as we extrapolate without + // interactions. + CurvilinearTrackParameters startBound( + start.segment<4>(Acts::eFreePos0), start.segment<3>(Acts::eFreeDir0), + start[Acts::eFreeQOverP], std::nullopt, ParticleHypothesis::pion()); + + return propagateToSurface(startBound, target, options); +}