Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/docs/core/propagation.md is written in an unsupported language. File is not indexed.

0001 (propagation_impl)=
0002 # Propagation and extrapolation
0003 
0004 The track propagation is an essential part of track reconstruction. This section describes the high-level classes and concepts used for this task in ACTS.
0005 
0006 ## Overview: Steppers, Navigators and Actors
0007 
0008 The propagation through a geometry is based on the interaction of two different components:
0009 
0010 * The **Stepper** provides the implementation of the solution of the equation of motion (either by analytical means or through numerical integration).
0011 * The **Navigator** keeps track of the current position in the geometry and adjusts the step size so that the stepper does not step through a surface.
0012 
0013 Following the general ACTS design, these classes do not manage their internal state via member variables, but provide an internal `State` struct which contains all relevant data and is managed by the propagator.
0014 
0015 The interaction of these two components is handled by the {class}`Acts::Propagator` class template that takes the stepper and the navigator as template parameters:
0016 
0017 ```cpp
0018 Propagator<Navigator, Stepper>
0019 ```
0020 
0021 Additional to these mandatory components, the propagator can be equipped with **Actors** to allow for custom behaviour. These are function objects that are hooked in the propagation loop. Actors just perform some action on the propagator state (e.g. the {class}`Acts::KalmanFitter` is an actor), aborts can abort propagation (e.g., the {struct}`Acts::PathLimitReached`).
0022 
0023 The propagator exposes its state to the actors as arguments to `act()` and `checkAbort()`. Actors must define a default-constructable `result_type`, which can be modified in each call:
0024 
0025 ```cpp
0026 template<typename propagator_state_t, typename stepper_t>
0027 auto operator(propagator_state_t &state, const stepper_t &stepper, result_type &result) const {
0028   const auto &navigatorState = state.navigation;
0029   const auto &stepperState = state.stepping;
0030   const auto &options = state.options;
0031 }
0032 ```
0033 
0034 The result of a propagation consists of the track parameters at the endpoint of the propagation as well as the results of all actors.
0035 
0036 ## Initialization and running
0037 
0038 The {class}`Acts::Propagator` is initialized with the helper class
0039 {struct}`Acts::PropagatorOptions`, which is templated on the list of actors.
0040 This is done with the class {struct}`Acts::ActorList`
0041 (which are in fact small wrappers around `std::tuple`):
0042 
0043 ```cpp
0044 using MyOptions = Acts::PropagatorOptions<
0045                     Acts::ActorList<MyActor1, MyActor2>
0046                   >;
0047 ```
0048 
0049 The actors are instantiated with the options and can be accessed with the `get`-method that expects the corresponding actor type as template parameter. Besides this, the {struct}`Acts::PropagatorOptions` also contains a lot of general options like the `maxStepSize`:
0050 
0051 ```cpp
0052 auto options = MyOptions();
0053 options.actorList.get<MyActor1>().foo = bar;
0054 options.maxStepSize = 100;
0055 ```
0056 
0057 All available options can be found in the {struct}`Acts::PropagatorPlainOptions`, from which {struct}`Acts::PropagatorOptions` inherits.
0058 
0059 :::{tip}
0060 The propagator also contains a loop-protection mechanism. It estimates a circle perimeter from the momentum and the magnetic field, and aborts the propagation when a certain fraction (default: 0.5) of the circle has been propagated. This behaviour can be changed in the {struct}`Acts::PropagatorOptions` via the boolean `loopProtection` and the float `loopFraction`.
0061 :::
0062 
0063 To run the propagation, we must call the member function `propagate(...)` with the initial track parameters and the propagator options. There are several overloads to the `propagate(...)` function, which allow further customization:
0064 * With/without a target surface: The overload with a target surface automatically adds an aborter for the passed `Surface` to the `ActorList`.
0065 * With/without a prepared result object: Without a result object, a suitable result object is default-constructed internally.
0066 
0067 The result is an instance of {class}`Acts::Result`. It contains the actual result, or an error code in case something went wrong. In the actual result, the results of the different actors can again be accessed via a `get` method:
0068 
0069 ```cpp
0070 auto res = propagator.propagate(myParams, options);
0071 
0072 if( res.ok() ) {
0073   res.value().get<MyActor1::result_type>();
0074 }
0075 ```
0076 
0077 ## Navigators
0078 
0079 ACTS comes with a couple of different navigator implementations:
0080 - The standard navigator {class}`Acts::Navigator` which performs the full navigation in the volume/layer/surface hierarchy
0081 - The {class}`Acts::DirectNavigator` which takes a sequence of surfaces and just navigates to one after the other.
0082 - The {class}`Acts::TryAllNavigator` which, as the name suggests, tries to intersect all available surfaces without acceleration structure and special assumptions. This navigator is meant for validation rather than production.
0083 - The {class}`Acts::TryAllOverstepNavigator` which is similar to the {class}`Acts::TryAllNavigator`, but deliberately oversteps and then intersects surfaces which might have been missed by that step and targets them. This navigator is meant for validation rather than production.
0084 - The {class}`Acts::Experimental::DetectorNavigator` which performs the full navigation in the gen2 geometry. Note that this is still experimental and should not be included in production code as it might be unstable and break with minor version updates of ACTS.
0085 
0086 The navigators provide information about the current position inside the geometry in their state variable (e.g. {struct}`Acts::Navigator::State` and {struct}`Acts::DirectNavigator::State`), e.g. pointers to the `currentSurface` and the `currentVolume`.
0087 
0088 ## Steppers
0089 
0090 ACTS also provides a variety of stepper implementations. Since these in general can work very differently internally, the state itself is not the main interface to the steppers. Instead, all steppers provide a common API, to that we can pass instances of the stepper state. This allows a generic and template-based design even for very different steppers:
0091 
0092 ```cpp
0093 template<typename propagator_state_t, typename stepper_t>
0094 auto operator(propagator_state_t &state, const stepper_t &stepper) const {
0095   stepper.foo(state.stepping);
0096 }
0097 ```
0098 
0099 ### AtlasStepper
0100 
0101 The {class}`Acts::AtlasStepper` is a pure transcript from the ATLAS `RungeKuttaPropagator` and `RungeKuttaUtils`.
0102 
0103 ### StraightLineStepper
0104 
0105 The {class}`Acts::StraightLineStepper` is a very stripped down stepper that just performs a linear propagation without magnetic field. It can be used for debugging, validation or other simple tasks.
0106 
0107 ### EigenStepper
0108 
0109 The {class}`Acts::EigenStepper` implements the same functionality as the ATLAS stepper, however, the stepping code is rewritten by using `Eigen` primitives. Thus, it also uses a 4th-order Runge-Kutta algorithm for the integration of the EOM. Additionally, the {class}`Acts::EigenStepper` allows to customize the concrete integration step via **extension**.
0110 
0111 The extension encapsulate the relevant equations for different environments. There exists a {struct}`Acts::EigenStepperDefaultExtension` that is suited for propagation in a vacuum, and the {struct}`Acts::EigenStepperDenseExtension`, that contains additional code to handle the propagation inside materials. Which extension is used is decided by the user.
0112 
0113 The extension can be configured via the {class}`Acts::EigenStepper`:
0114 
0115 ```c++
0116 using Stepper = Acts::EigenStepper<Acts::EigenStepperDenseExtension>;
0117 ```
0118 
0119 By default, the {class}`Acts::EigenStepper` only uses the {struct}`Acts::EigenStepperDenseExtension`.
0120 
0121 ### MultiEigenStepperLoop
0122 
0123 The {class}`Acts::MultiEigenStepperLoop` is an extension of the {class}`Acts::EigenStepper` and is designed to internally handle a multi-component state, while interfacing as a single component to the navigator. It is mainly used for the {struct}`Acts::GaussianSumFitter`.