Class Acts::MultiEigenStepperLoop¶
-
template<typename extensionlist_t = StepperExtensionList<DefaultExtension>, typename component_reducer_t = WeightedComponentReducerLoop, typename auctioneer_t = detail::VoidAuctioneer>
class MultiEigenStepperLoop : public Acts::EigenStepper<extensionlist_t, auctioneer_t>¶ Stepper based on the EigenStepper, but handles Multi-Component Tracks (e.g., for the GSF).
Internally, this only manages a vector of EigenStepper::States. This simplifies implementation, but has several drawbacks:
There are certain redundancies between the global State and the component states
The components do not share a single magnetic-field-cache
- Template Parameters
extensionlist_t – See EigenStepper for details
component_reducer_t – How to map the multi-component state to a single component
auctioneer_t – See EigenStepper for details
small_vector_size – A size-hint how much memory should be allocated by the small vector
Public Types
-
using BoundState = std::tuple<BoundTrackParameters, Jacobian, double>¶
-
using ConstComponentProxy = ComponentProxyBase<const typename State::Component>¶
A proxy struct which allows access to a single component of the multi-component state.
It has the semantics of a const reference, i.e. it requires a const reference of the single-component state it represents
-
using Covariance = BoundSymMatrix¶
-
using CurvilinearState = std::tuple<CurvilinearTrackParameters, Jacobian, double>¶
-
using Jacobian = BoundMatrix¶
Jacobian, Covariance and State defintions.
-
using Reducer = component_reducer_t¶
The reducer type.
-
using SingleState = typename SingleStepper::State¶
Typedef to the State of the single component Stepper.
-
using SingleStepper = EigenStepper<extensionlist_t, auctioneer_t>¶
Typedef to the Single-Component Eigen Stepper.
Public Functions
Constructor from a magnetic field and a optionally provided Logger.
-
template<typename charge_t>
inline Result<ComponentProxy> addComponent(State &state, const SingleBoundTrackParameters<charge_t> &pars, double weight) const¶ Add a component to the Multistepper.
Note
: It is not ensured that the weights are normalized afterwards
Note
This function makes no garantuees about how new components are initialized, it is up to the caller to ensure that all components are valid in the end.
Note
The returned component-proxy is only garantueed to be valid until the component number is again modified
- Parameters
state – [inout] The stepping state (thread-local cache)
pars – [in] Parameters of the component to add
weight – [in] Weight of the component to add
-
Result<BoundState> boundState(State &state, const Surface &surface, bool transportCov = true, const FreeToBoundCorrection &freeToBoundCorrection = FreeToBoundCorrection(false)) const¶
Create and return the bound state at the current position.
This transports (if necessary) the covariance to the surface and creates a bound state. It does not check if the transported state is at the surface, this needs to be guaranteed by the propagator.
Note
This is done by combining the gaussian mixture on the specified surface. If the conversion to bound states of some components failes, these components are ignored unless all components fail. In this case an error code is returned.
- Parameters
state – [in] State that will be presented as
BoundState
surface – [in] The surface to which we bind the state
transportCov – [in] Flag steering covariance transport
freeToBoundCorrection – [in] Flag steering non-linear correction during global to local correction
- Returns
A bound state:
the parameters at the surface
the stepwise jacobian towards it (from last bound)
and the path length (from start - for ordering)
-
inline double charge(const State &state) const¶
Charge access.
- Parameters
state – [in] The stepping state (thread-local cache)
-
inline void clearComponents(State &state) const¶
Reset the number of components.
- Parameters
state – [inout] The stepping state (thread-local cache)
-
inline auto componentIterable(State &state) const¶
Creates an iterable which can be plugged into a range-based for-loop to iterate over components.
Note
Use a for-loop with by-value semantics, since the Iterable returns a proxy internally holding a reference
-
inline auto constComponentIterable(const State &state) const¶
Creates an constant iterable which can be plugged into a range-based for-loop to iterate over components.
Note
Use a for-loop with by-value semantics, since the Iterable returns a proxy internally holding a reference
-
CurvilinearState curvilinearState(State &state, bool transportCov = true) const¶
Create and return a curvilinear state at the current position.
This transports (if necessary) the covariance to the current position and creates a curvilinear state.
Note
This is done as a simple average over the free representation and covariance of the components.
- Parameters
state – [in] State that will be presented as
CurvilinearState
transportCov – [in] Flag steering covariance transport
- Returns
A curvilinear state:
the curvilinear parameters at given position
the stepweise jacobian towards it (from last bound)
and the path length (from start - for ordering)
-
inline Vector3 direction(const State &state) const¶
Momentum direction accessor.
- Parameters
state – [in] The stepping state (thread-local cache)
-
inline Result<Vector3> getField(State &state, const Vector3 &pos) const¶
Get the field for the stepping, it checks first if the access is still within the Cell, and updates the cell if necessary.
Note
This uses the cache of the first component stored in the state
- Parameters
state – [inout] is the propagation state associated with the track the magnetic field cell is used (and potentially updated)
pos – [in] is the field position
-
inline double getStepSize(const State &state, ConstrainedStep::Type stype) const¶
Get the step size.
Note
This returns the smalles step size of all components. It uses std::abs for comparison to handle backward propagation and negative step sizes correctly.
- Parameters
state – [in] The stepping state (thread-local cache)
stype – [in] The step size type to be returned
Construct and initialize a state.
-
inline double momentum(const State &state) const¶
Absolute momentum accessor.
- Parameters
state – [in] The stepping state (thread-local cache)
-
inline std::size_t numberComponents(const State &state) const¶
Get the number of components.
- Parameters
state – [in,out] The stepping state (thread-local cache)
-
inline std::string outputStepSize(const State &state) const¶
Output the Step Size of all components into one std::string.
- Parameters
state – [in,out] The stepping state (thread-local cache)
-
inline double overstepLimit(const State &state) const¶
Overstep limit.
- Parameters
state – [in] The stepping state (thread-local cache)
-
inline Vector3 position(const State &state) const¶
Global particle position accessor.
- Parameters
state – [in] The stepping state (thread-local cache)
-
inline void releaseStepSize(State &state) const¶
Release the step-size for all components.
- Parameters
state – [in,out] The stepping state (thread-local cache)
-
inline void removeMissedComponents(State &state) const¶
Remove missed components from the component state.
- Parameters
state – [in,out] The stepping state (thread-local cache)
Resets the state.
- Parameters
state – [inout] State of the stepper
boundParams – [in] Parameters in bound parametrisation
cov – [in] Covariance matrix
surface – [in] The reference surface of the bound parameters
navDir – [in] Navigation direction
stepSize – [in] Step size
-
inline void reweightComponents(State &state) const¶
Reweight the components.
- Parameters
state – [inout] The stepping state (thread-local cache)
-
inline void setStepSize(State &state, double stepSize, ConstrainedStep::Type stype = ConstrainedStep::actor, bool release = true) const¶
Set Step size - explicitely with a double.
- Parameters
state – [in,out] The stepping state (thread-local cache)
stepSize – [in] The step size value
stype – [in] The step size type to be set
release – [in] Do we release the step size?
Perform a Runge-Kutta track parameter propagation step.
The state contains the desired step size. It can be negative during backwards track propagation, and since we’re using an adaptive algorithm, it can be modified by the stepper class during propagation.
- Parameters
state – [inout] is the propagation state associated with the track parameters that are being propagated.
navigator – [in] is the navigator of the propagation
-
inline double time(const State &state) const¶
Time access.
- Parameters
state – [in] The stepping state (thread-local cache)
-
inline void transportCovarianceToBound(State &state, const Surface &surface, const FreeToBoundCorrection &freeToBoundCorrection = FreeToBoundCorrection(false)) const¶
Method for on-demand transport of the covariance to a new curvilinear frame at current position, or direction of the state.
Note
no check is done if the position is actually on the surface
- Template Parameters
surface_t – the Surface type
- Parameters
state – [inout] State of the stepper
surface – [in] is the surface to which the covariance is forwarded
freeToBoundCorrection – [in] Flag steering non-linear correction during global to local correction to
-
inline void transportCovarianceToCurvilinear(State &state) const¶
Method for on-demand transport of the covariance to a new curvilinear frame at current position, or direction of the state.
- Parameters
state – [inout] State of the stepper
-
template<typename object_intersection_t>
inline void updateStepSize(State &state, const object_intersection_t &oIntersection, bool release = true) const¶ Update step size.
This method intersects the provided surface and update the navigation step estimation accordingly (hence it changes the state). It also returns the status of the intersection to trigger onSurface in case the surface is reached.
- Parameters
state – [in,out] The stepping state (thread-local cache)
oIntersection – [in] The ObjectIntersection to layer, boundary, etc
release – [in] boolean to trigger step size release
-
inline Intersection3D::Status updateSurfaceStatus(State &state, const Surface &surface, const BoundaryCheck &bcheck, const Logger &logger = getDummyLogger()) const¶
Update surface status.
It checks the status to the reference surface & updates the step size accordingly
- Parameters
state – [in,out] The stepping state (thread-local cache)
surface – [in] The surface provided
bcheck – [in] The boundary check for this status update
logger – [in] A
Loggerinstance
Public Static Attributes
-
static constexpr int maxComponents = std::numeric_limits<int>::max()¶
How many components can this stepper manage?
-
struct ComponentProxy : public Acts::MultiEigenStepperLoop<extensionlist_t, component_reducer_t, auctioneer_t>::ComponentProxyBase<State::Component>¶
A proxy struct which allows access to a single component of the multi-component state.
It has the semantics of a mutable reference, i.e. it requires a mutable reference of the single-component state it represents
Public Types
-
using Base = ComponentProxyBase<typename State::Component>¶
Public Functions
-
inline Result<BoundState> boundState(const Surface &surface, bool transportCov, const FreeToBoundCorrection &freeToBoundCorrection)¶
-
inline auto &charge()¶
-
inline auto &cov()¶
-
inline auto &derivative()¶
-
inline auto &jacobian()¶
-
inline auto &jacToGlobal()¶
-
inline auto &jacTransport()¶
-
inline auto &pars()¶
-
inline auto &pathAccumulated()¶
-
template<typename propagator_state_t>
inline auto singleState(propagator_state_t &state)¶
-
inline auto &status()¶
-
inline void update(const FreeVector &freeParams, const BoundVector &boundParams, const Covariance &covariance, const Surface &surface)¶
-
inline auto &weight()¶
-
using Base = ComponentProxyBase<typename State::Component>¶
-
template<typename component_t>
struct ComponentProxyBase¶ A template class which contains all const member functions, that should be available both in the mutable ComponentProxy and the ConstComponentProxy.
- Template Parameters
component_t – Must be a const or mutable State::Component.
Public Functions
-
inline ComponentProxyBase(component_t &c)¶
-
inline auto charge() const¶
-
inline const auto &cov() const¶
-
inline const auto &derivative() const¶
-
inline const auto &jacobian() const¶
-
inline const auto &jacToGlobal() const¶
-
inline const auto &jacTransport() const¶
-
inline const auto &pars() const¶
-
inline auto pathAccumulated() const¶
-
template<typename propagator_state_t>
inline auto singleState(const propagator_state_t &state) const¶
-
inline const auto &singleStepper(const MultiEigenStepperLoop &stepper) const¶
-
inline auto status() const¶
-
inline auto weight() const¶
Public Members
-
component_t &cmp¶
-
template<typename stepping_t, typename navigation_t, typename options_t, typename geoctx_t>
struct SinglePropState¶ A helper type for providinig a propagation state which can be used with functions expecting single-component steppers and states.
Public Functions
-
struct State¶
Public Functions
-
State() = delete¶
No default constructor is provided.
Constructor from the initial bound track parameters.
Note
the covariance matrix is copied when needed
- Template Parameters
charge_t – Type of the bound parameter charge
- Parameters
gctx – [in] is the context object for the geometry
mctx – [in] is the context object for the magnetic field
bfield – [in] the shared magnetic filed provider
multipars – [in] The track multi-component track-parameters at start
ndir – [in] The navigation direction w.r.t momentum
ssize – [in] is the maximum step size
stolerance – [in] is the stepping tolerance
Public Members
-
SmallVector<Component> components¶
The components of which the state consists.
-
bool covTransport = false¶
-
std::reference_wrapper<const GeometryContext> geoContext¶
geoContext
-
std::reference_wrapper<const MagneticFieldContext> magContext¶
MagneticFieldContext.
-
double pathAccumulated = 0.¶
-
std::optional<std::size_t> stepCounterAfterFirstComponentOnSurface¶
Step-limit counter which limits the number of steps when one component reached a surface.
-
std::size_t steps = 0¶
-
struct Component¶
The struct that stores the individual components.
-
State() = delete¶