File ConstrainedStep.hpp

namespace Acts


This file is foreseen for the Geometry module to replace Extent


inline std::ostream &operator<<(std::ostream &os, const ConstrainedStep &step)
class ConstrainedStep
#include <Acts/Propagator/ConstrainedStep.hpp>

A constrained step class for the steppers.

This class is symmetrical for forward and backward propagation. The sign of the propagation direction should not enter here but rather be applied the step is actually taken.

As simple as this class looks it hides a few very important details:

  • Overstepping handling. The step size sign will flip if we happened to pass our target.

  • Convergence handling. Smaller and smaller step sizes have to be used in order to converge on a target.

Because of the points mentioned above, the update function will always prefer negative step sizes. A side effect of this is that we will propagate in the opposite direction if the target is “behind us”.

The hierarchy is:

  • Overstepping resolution / backpropagation

  • Convergence

  • Step into the void with std::numeric_limits<Scalar>max()

Public Types

using Scalar = ActsScalar
enum Type

the types of constraints from accuracy - this can vary up and down given a good step estimator from actor - this would be a typical navigation step from aborter - this would be a target condition from user - this is user given for what reason ever


enumerator accuracy
enumerator actor
enumerator aborter
enumerator user

Public Functions

constexpr ConstrainedStep() = default
inline explicit constexpr ConstrainedStep(Scalar value)

constructor from Scalar


value – is the user given initial value

inline constexpr Type currentType() const

Access the currently leading type.

inline constexpr void release(Type type)

release a certain constraint value


type – is the constraint type to be released

inline constexpr void scale(Scalar factor)
inline constexpr void setValue(Scalar value)

set accuracy by one Scalar

this will set only the accuracy, as this is the most exposed to the Propagator


value – is the new accuracy value

inline std::ostream &toStream(std::ostream &os) const
inline std::string toString() const
inline constexpr void update(Scalar value, Type type, bool releaseStep = false)

Update the step size of a certain type.

Only navigation and target abortion step size updates may change the sign due to overstepping

  • value – is the new value to be updated

  • type – is the constraint type

  • releaseStep – Allow step size to increase again

inline constexpr Scalar value() const

returns the min step size

inline constexpr Scalar value(Type type) const

Access a specific value.


type – is the requested parameter type

Public Members

size_t nStepTrials = std::numeric_limits<size_t>::max()

Number of iterations needed by the stepsize finder (e.g.

Runge-Kutta) of the stepper.

Private Members

std::array<Scalar, 4> m_values = {kNotSet, kNotSet, kNotSet, kNotSet}

the step size tuple

Private Static Attributes

static constexpr auto kNotSet = std::numeric_limits<Scalar>::max()