Class Acts::ConstrainedStep
-
class ConstrainedStep
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
Public Functions
-
constexpr ConstrainedStep() = default
-
inline explicit constexpr ConstrainedStep(Scalar value)
constructor from Scalar
- Parameters
value – is the user given initial value
-
inline constexpr Scalar accuracy() const
Access the accuracy value.
- Parameters
type – is the requested parameter type
-
inline constexpr void release(Type type)
release a certain constraint value
- Parameters
type – is the constraint type to be released
-
inline constexpr void releaseAccuracy()
release accuracy
- Parameters
type – is the constraint type to be released
-
inline constexpr void setAccuracy(Scalar value)
set accuracy by one Scalar
this will set only the accuracy, as this is the most exposed to the Propagator
- Parameters
value – is the new accuracy value
-
inline constexpr void setUser(Scalar value)
set user by one Scalar
- Parameters
value – is the new user 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
- Parameters
value – is the new value to be updated
type – is the constraint type
releaseStep – Allow step size to increase again
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.