ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::ConstrainedStep Class Reference

A constrained step class for the steppers. More...

#include <Acts/Propagator/ConstrainedStep.hpp>

Public Types

enum class  Type : int { Navigator = 0 , Actor = 1 , User = 2 }
 the types of constraints from navigator - this would be a navigation step from actor - this would be an actor condition from user - this is user given for what reason ever More...

Public Member Functions

constexpr ConstrainedStep ()=default
constexpr ConstrainedStep (double v)
 constructor
constexpr double accuracy () const
 Access the accuracy value.
constexpr void release (Type type)
 release a certain constraint value
constexpr void releaseAccuracy ()
 release accuracy
constexpr void setAccuracy (double v)
 set accuracy
constexpr void setUser (double v)
 set user
std::ostream & toStream (std::ostream &os) const
 Stream the constrained step into an output stream.
std::string toString () const
 Convert the constrained step to a string representation.
constexpr void update (double v, Type type)
 Update the step size of a certain type.
constexpr double value () const
 returns the min step size
constexpr double value (Type type) const
 Access a specific value.

Detailed Description

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<double>::max()

Member Enumeration Documentation

◆ Type

enum class Acts::ConstrainedStep::Type : int
strong

the types of constraints from navigator - this would be a navigation step from actor - this would be an actor condition from user - this is user given for what reason ever

Enumerator
Navigator 
Actor 
User 

Constructor & Destructor Documentation

◆ ConstrainedStep() [1/2]

Acts::ConstrainedStep::ConstrainedStep ( )
constexprdefault

◆ ConstrainedStep() [2/2]

Acts::ConstrainedStep::ConstrainedStep ( double v)
explicitconstexpr

constructor

Parameters
vis the user given initial value

Member Function Documentation

◆ accuracy()

double Acts::ConstrainedStep::accuracy ( ) const
constexpr

Access the accuracy value.

Returns
The step size accuracy constraint

◆ release()

void Acts::ConstrainedStep::release ( Type type)
constexpr

release a certain constraint value

Parameters
typeis the constraint type to be released

◆ releaseAccuracy()

void Acts::ConstrainedStep::releaseAccuracy ( )
constexpr

release accuracy

◆ setAccuracy()

void Acts::ConstrainedStep::setAccuracy ( double v)
constexpr

set accuracy

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

Parameters
vis the new accuracy value

◆ setUser()

void Acts::ConstrainedStep::setUser ( double v)
constexpr

set user

Parameters
vis the new user value

◆ toStream()

std::ostream & Acts::ConstrainedStep::toStream ( std::ostream & os) const

Stream the constrained step into an output stream.

Parameters
osOutput stream to write to
Returns
Reference to the output stream for chaining

◆ toString()

std::string Acts::ConstrainedStep::toString ( ) const

Convert the constrained step to a string representation.

Returns
String representation of the constrained step

◆ update()

void Acts::ConstrainedStep::update ( double v,
Type type )
constexpr

Update the step size of a certain type.

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

Parameters
vis the new value to be updated
typeis the constraint type

◆ value() [1/2]

double Acts::ConstrainedStep::value ( ) const
constexpr

returns the min step size

Returns
The minimum constrained step size considering all constraints

◆ value() [2/2]

double Acts::ConstrainedStep::value ( Type type) const
constexpr

Access a specific value.

Parameters
typeis the requested parameter type
Returns
The step size for the specified constraint type