Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion Core/include/Acts/EventData/TrackParametersConcept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "Acts/Geometry/GeometryContext.hpp"

#include <optional>
#include <tuple>

namespace Acts {

Expand Down
6 changes: 4 additions & 2 deletions Core/include/Acts/Propagator/AtlasStepper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ class IVolumeMaterial;
/// This is based original stepper code from the ATLAS RungeKuttaPropagator
class AtlasStepper {
public:
/// Type alias for bound track parameters
using BoundParameters = BoundTrackParameters;
/// Type alias for Jacobian matrix
using Jacobian = BoundMatrix;
/// Type alias for covariance matrix
using Covariance = BoundMatrix;
/// Type alias for bound state (parameters, jacobian, path length)
using BoundState = std::tuple<BoundTrackParameters, Jacobian, double>;
using BoundState = std::tuple<BoundParameters, Jacobian, double>;

/// Configuration for constructing an AtlasStepper.
struct Config {
Expand Down Expand Up @@ -183,7 +185,7 @@ class AtlasStepper {
/// Initialize stepper state from bound track parameters
/// @param state Stepper state to initialize
/// @param par Bound track parameters containing initial conditions
void initialize(State& state, const BoundTrackParameters& par) const {
void initialize(State& state, const BoundParameters& par) const {
initialize(state, par.parameters(), par.covariance(),
par.particleHypothesis(), par.referenceSurface());
}
Expand Down
6 changes: 4 additions & 2 deletions Core/include/Acts/Propagator/EigenStepper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ class IVolumeMaterial;
template <typename extension_t = EigenStepperDefaultExtension>
class EigenStepper final {
public:
/// Type alias for bound track parameters
using BoundParameters = BoundTrackParameters;
/// Type alias for jacobian matrix
using Jacobian = BoundMatrix;
/// Type alias for covariance matrix
using Covariance = BoundMatrix;
/// Bound state tuple containing parameters, Jacobian, and path length
using BoundState = std::tuple<BoundTrackParameters, Jacobian, double>;
using BoundState = std::tuple<BoundParameters, Jacobian, double>;

/// Configuration for the Eigen stepper.
struct Config {
Expand Down Expand Up @@ -167,7 +169,7 @@ class EigenStepper final {
/// Initialize the stepper state from bound track parameters
/// @param state Stepper state to initialize
/// @param par Bound track parameters to initialize from
void initialize(State& state, const BoundTrackParameters& par) const;
void initialize(State& state, const BoundParameters& par) const;

/// Initialize the stepper state from bound parameters and surface
/// @param state Stepper state to initialize
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Propagator/EigenStepper.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ auto Acts::EigenStepper<E>::makeState(const Options& options) const -> State {

template <typename E>
void Acts::EigenStepper<E>::initialize(State& state,
const BoundTrackParameters& par) const {
const BoundParameters& par) const {
initialize(state, par.parameters(), par.covariance(),
par.particleHypothesis(), par.referenceSurface());
}
Expand Down
14 changes: 10 additions & 4 deletions Core/include/Acts/Propagator/MultiStepperLoop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,14 @@ class MultiStepperLoop final {
/// @brief Typedef to the Config of the single component Stepper
using SingleConfig = typename SingleStepper::Config;

/// Type alias for bound track parameters
using BoundParameters = MultiComponentBoundTrackParameters;
/// Type alias for jacobian matrix
using Jacobian = BoundMatrix;
/// Type alias for covariance matrix
using Covariance = BoundMatrix;
/// Bound state tuple containing parameters, Jacobian, and path length
using BoundState =
std::tuple<MultiComponentBoundTrackParameters, Jacobian, double>;
using BoundState = std::tuple<BoundParameters, Jacobian, double>;

/// @brief The reducer type
using Reducer = component_reducer_t;
Expand Down Expand Up @@ -270,8 +271,13 @@ class MultiStepperLoop final {
/// Initialize the stepper state from multi-component bound track parameters
/// @param state The stepper state to initialize
/// @param par The multi-component bound track parameters
void initialize(State& state,
const MultiComponentBoundTrackParameters& par) const {
void initialize(State& state, const BoundParameters& par) const {
if (par.empty()) {
throw std::invalid_argument(
"Cannot construct MultiEigenStepperLoop::State with empty "
"multi-component parameters");
}

state.particleHypothesis = par.particleHypothesis();

const auto surface = par.referenceSurface().getSharedPtr();
Expand Down
2 changes: 2 additions & 0 deletions Core/include/Acts/Propagator/MultiStepperLoop.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#include "Acts/Propagator/MultiStepperError.hpp"

#include <vector>

namespace Acts {

template <Concepts::SingleStepper S, typename R>
Expand Down
59 changes: 14 additions & 45 deletions Core/include/Acts/Propagator/Propagator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "Acts/Propagator/StandardAborters.hpp"
#include "Acts/Propagator/StepperConcept.hpp"
#include "Acts/Propagator/VoidNavigator.hpp"
#include "Acts/Propagator/detail/ParameterTraits.hpp"
#include "Acts/Utilities/Logger.hpp"
#include "Acts/Utilities/Result.hpp"

Expand Down Expand Up @@ -84,25 +83,16 @@ class BasePropagatorHelper : public BasePropagator {
/// - a type mapping for: (initial track parameter type and destination
/// surface type) -> type of internal state object
///
template <typename stepper_t, typename navigator_t = VoidNavigator>
template <StepperConcept stepper_t, typename navigator_t = VoidNavigator>
class Propagator final
: public std::conditional_t<
SupportsBoundParameters_v<stepper_t>,
detail::BasePropagatorHelper<Propagator<stepper_t, navigator_t>>,
detail::PropagatorStub> {
/// Re-define bound track parameters dependent on the stepper
using StepperBoundTrackParameters =
detail::stepper_bound_parameters_type_t<stepper_t>;
static_assert(std::copy_constructible<StepperBoundTrackParameters>,
"return track parameter type must be copy-constructible");
using BoundParameters = stepper_t::BoundParameters;

using Jacobian = BoundMatrix;
using BoundState = std::tuple<StepperBoundTrackParameters, Jacobian, double>;

static_assert(StepperStateConcept<typename stepper_t::State>,
"Stepper does not fulfill stepper concept.");
static_assert(StepperConcept<stepper_t>,
"Stepper does not fulfill stepper concept.");
using BoundState = std::tuple<BoundParameters, Jacobian, double>;

/// @brief Helper struct determining the state's type
///
Expand Down Expand Up @@ -140,7 +130,6 @@ class Propagator final
///
template <typename propagator_options_t>
struct result_type_helper {
using parameters_t = StepperBoundTrackParameters;
using actor_list_t = typename propagator_options_t::actor_list_type;

/// @brief Propagation result type for an arbitrary list of additional
Expand All @@ -149,7 +138,7 @@ class Propagator final
/// @tparam args Parameter pack specifying additional propagation results
///
template <typename... args>
using this_result_type = PropagatorResult<parameters_t, args...>;
using this_result_type = PropagatorResult<BoundParameters, args...>;

/// @brief Propagation result type derived from a given action list
using type = typename actor_list_t::template result_type<this_result_type>;
Expand Down Expand Up @@ -216,7 +205,6 @@ class Propagator final
/// fulfilled or the maximum number of steps/path length provided in the
/// propagation options is reached.
///
/// @tparam parameters_t Type of initial track parameters to propagate
/// @tparam propagator_options_t Type of the propagator options
/// @tparam path_aborter_t The path aborter type to be added
///
Expand All @@ -227,10 +215,10 @@ class Propagator final
/// @return Propagation result containing the propagation status, final
/// track parameters, and output of actions (if they produce any)
///
template <typename parameters_t, typename propagator_options_t,
template <typename propagator_options_t,
typename path_aborter_t = PathLimitReached>
Result<ResultType<propagator_options_t>> propagate(
const parameters_t& start, const propagator_options_t& options,
const BoundParameters& start, const propagator_options_t& options,
bool createFinalParameters = true) const;

/// @brief Propagate track parameters - User method
Expand All @@ -240,7 +228,6 @@ class Propagator final
/// is fulfilled, the destination surface is hit or the maximum number of
/// steps/path length as given in the propagation options is reached.
///
/// @tparam parameters_t Type of initial track parameters to propagate
/// @tparam propagator_options_t Type of the propagator options
/// @tparam target_aborter_t The target aborter type to be added
/// @tparam path_aborter_t The path aborter type to be added
Expand All @@ -251,11 +238,11 @@ class Propagator final
///
/// @return Propagation result containing the propagation status, final
/// track parameters, and output of actions (if they produce any)
template <typename parameters_t, typename propagator_options_t,
template <typename propagator_options_t,
typename target_aborter_t = SurfaceReached,
typename path_aborter_t = PathLimitReached>
Result<ResultType<propagator_options_t>> propagate(
const parameters_t& start, const Surface& target,
const BoundParameters& start, const Surface& target,
const propagator_options_t& options) const;

/// @brief Builds the propagator state object
Expand Down Expand Up @@ -303,10 +290,10 @@ class Propagator final
/// @param [in] start Initial track parameters to propagate
///
/// @return Indication if the initialization was successful
template <typename propagator_state_t, typename parameters_t,
template <typename propagator_state_t,
typename path_aborter_t = PathLimitReached>
[[nodiscard]] Result<void> initialize(propagator_state_t& state,
const parameters_t& start) const;
const BoundParameters& start) const;

/// @brief Propagate track parameters
///
Expand Down Expand Up @@ -340,33 +327,15 @@ class Propagator final
/// @param [in] result Result of the propagation
/// @param [in] options Propagation options
/// @param [in] createFinalParameters Whether to produce parameters at the end of the propagation
/// @param [in] target Surface to be used for the final parameters, if createFinalParameters is true
/// If nullptr, the current surface of the navigator will be used
///
/// @return Propagation result
template <typename propagator_state_t, typename propagator_options_t>
Result<ResultType<propagator_options_t>> makeResult(
propagator_state_t state, Result<void> result,
const propagator_options_t& options, bool createFinalParameters) const;

/// @brief Builds the propagator result object
///
/// This function creates the propagator result object from the propagator
/// state object. The `result` is passed to pipe a potential error from the
/// propagation call. The `options` are used to determine the type of the
/// result object.
///
/// @tparam propagator_state_t Type of the propagator state object
/// @tparam propagator_options_t Type of the propagator options
///
/// @param [in] state Propagator state object
/// @param [in] result Result of the propagation
/// @param [in] target Target surface of to propagate to
/// @param [in] options Propagation options
///
/// @return Propagation result
template <typename propagator_state_t, typename propagator_options_t>
Result<ResultType<propagator_options_t>> makeResult(
propagator_state_t state, Result<void> result, const Surface& target,
const propagator_options_t& options) const;
const propagator_options_t& options, bool createFinalParameters,
const Surface* target = nullptr) const;

private:
/// Implementation of propagation algorithm
Expand Down
Loading
Loading