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

#include <Acts/Propagator/SympyStepper.hpp>

Collaboration diagram for Acts::SympyStepper:
[legend]

Classes

struct  Config
struct  Options
struct  State
 State for track parameter propagation. More...

Public Types

using BoundState = std::tuple<BoundTrackParameters, Jacobian, double>
using Covariance = BoundSquareMatrix
using Jacobian = BoundMatrix
 Jacobian, Covariance and State definitions.

Public Member Functions

 SympyStepper (const Config &config)
 Constructor with configuration.
 SympyStepper (std::shared_ptr< const MagneticFieldProvider > bField)
 Constructor requires knowledge of the detector's magnetic field.
double absoluteMomentum (const State &state) const
 Absolute momentum accessor.
Result< BoundStateboundState (State &state, const Surface &surface, bool transportCov=true, const FreeToBoundCorrection &freeToBoundCorrection=FreeToBoundCorrection(false)) const
 Create and return the bound state at the current position.
double charge (const State &state) const
 Charge access.
BoundState curvilinearState (State &state, bool transportCov=true) const
 Create and return a curvilinear state at the current position.
Vector3 direction (const State &state) const
 Momentum direction accessor.
Result< Vector3getField (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.
double getStepSize (const State &state, ConstrainedStep::Type stype) const
 Get the step size.
void initialize (State &state, const BoundTrackParameters &par) const
void initialize (State &state, const BoundVector &boundParams, const std::optional< BoundMatrix > &cov, ParticleHypothesis particleHypothesis, const Surface &surface) const
State makeState (const Options &options) const
Vector3 momentum (const State &state) const
 Momentum accessor.
std::string outputStepSize (const State &state) const
 Output the Step Size - single component.
const ParticleHypothesisparticleHypothesis (const State &state) const
 Particle hypothesis.
Vector3 position (const State &state) const
 Global particle position accessor.
bool prepareCurvilinearState (State &state) const
 If necessary fill additional members needed for curvilinearState.
double qOverP (const State &state) const
 QoP direction accessor.
void releaseStepSize (State &state, ConstrainedStep::Type stype) const
 Release the Step size.
void setIdentityJacobian (State &state) const
 Method that reset the Jacobian to the Identity for when no bound state are available.
Result< double > step (State &state, Direction propDir, const IVolumeMaterial *material) const
 Perform a Runge-Kutta track parameter propagation step.
double time (const State &state) const
 Time access.
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.
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.
void update (State &state, const FreeVector &freeParams, const BoundVector &boundParams, const Covariance &covariance, const Surface &surface) const
 Method to update a stepper state to the some parameters.
void update (State &state, const Vector3 &uposition, const Vector3 &udirection, double qOverP, double time) const
 Method to update the stepper state.
void updateStepSize (State &state, const NavigationTarget &target, Direction direction, ConstrainedStep::Type stype) const
 Update step size.
void updateStepSize (State &state, double stepSize, ConstrainedStep::Type stype) const
 Update step size - explicitly with a double.
IntersectionStatus updateSurfaceStatus (State &state, const Surface &surface, std::uint8_t index, Direction navDir, const BoundaryTolerance &boundaryTolerance, double surfaceTolerance, ConstrainedStep::Type stype, const Logger &logger=getDummyLogger()) const
 Update surface status.

Protected Attributes

std::shared_ptr< const MagneticFieldProviderm_bField
 Magnetic field inside of the detector.

Member Typedef Documentation

◆ BoundState

◆ Covariance

◆ Jacobian

Jacobian, Covariance and State definitions.

Constructor & Destructor Documentation

◆ SympyStepper() [1/2]

Acts::SympyStepper::SympyStepper ( std::shared_ptr< const MagneticFieldProvider > bField)
explicit

Constructor requires knowledge of the detector's magnetic field.

Parameters
bFieldThe magnetic field provider

◆ SympyStepper() [2/2]

Acts::SympyStepper::SympyStepper ( const Config & config)
explicit

Constructor with configuration.

Parameters
configThe configuration of the stepper

Member Function Documentation

◆ absoluteMomentum()

double Acts::SympyStepper::absoluteMomentum ( const State & state) const

Absolute momentum accessor.

Parameters
state[in] The stepping state (thread-local cache)

◆ boundState()

Result< BoundState > Acts::SympyStepper::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

Parameters
[in]stateState that will be presented as BoundState
[in]surfaceThe surface to which we bind the state
[in]transportCovFlag steering covariance transport
[in]freeToBoundCorrectionCorrection for non-linearity effect during transform from free to bound
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)

◆ charge()

double Acts::SympyStepper::charge ( const State & state) const

Charge access.

Parameters
state[in] The stepping state (thread-local cache)

◆ curvilinearState()

BoundState Acts::SympyStepper::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.

Parameters
[in]stateState that will be presented as CurvilinearState
[in]transportCovFlag 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)

◆ direction()

Vector3 Acts::SympyStepper::direction ( const State & state) const

Momentum direction accessor.

Parameters
state[in] The stepping state (thread-local cache)

◆ getField()

Result< Vector3 > Acts::SympyStepper::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.

Parameters
[in,out]stateis the propagation state associated with the track the magnetic field cell is used (and potentially updated)
[in]posis the field position

◆ getStepSize()

double Acts::SympyStepper::getStepSize ( const State & state,
ConstrainedStep::Type stype ) const

Get the step size.

Parameters
state[in] The stepping state (thread-local cache)
stype[in] The step size type to be returned

◆ initialize() [1/2]

void Acts::SympyStepper::initialize ( State & state,
const BoundTrackParameters & par ) const

◆ initialize() [2/2]

void Acts::SympyStepper::initialize ( State & state,
const BoundVector & boundParams,
const std::optional< BoundMatrix > & cov,
ParticleHypothesis particleHypothesis,
const Surface & surface ) const

◆ makeState()

State Acts::SympyStepper::makeState ( const Options & options) const

◆ momentum()

Vector3 Acts::SympyStepper::momentum ( const State & state) const

Momentum accessor.

Parameters
state[in] The stepping state (thread-local cache)

◆ outputStepSize()

std::string Acts::SympyStepper::outputStepSize ( const State & state) const

Output the Step Size - single component.

Parameters
state[in,out] The stepping state (thread-local cache)

◆ particleHypothesis()

const ParticleHypothesis & Acts::SympyStepper::particleHypothesis ( const State & state) const

Particle hypothesis.

Parameters
state[in] The stepping state (thread-local cache)

◆ position()

Vector3 Acts::SympyStepper::position ( const State & state) const

Global particle position accessor.

Parameters
state[in] The stepping state (thread-local cache)

◆ prepareCurvilinearState()

bool Acts::SympyStepper::prepareCurvilinearState ( State & state) const

If necessary fill additional members needed for curvilinearState.

Compute path length derivatives in case they have not been computed yet, which is the case if no step has been executed yet.

Parameters
[in,out]stateState of the stepper
Returns
true if nothing is missing after this call, false otherwise.

◆ qOverP()

double Acts::SympyStepper::qOverP ( const State & state) const

QoP direction accessor.

Parameters
state[in] The stepping state (thread-local cache)

◆ releaseStepSize()

void Acts::SympyStepper::releaseStepSize ( State & state,
ConstrainedStep::Type stype ) const

Release the Step size.

Parameters
state[in,out] The stepping state (thread-local cache)
[in]stypeThe step size type to be released

◆ setIdentityJacobian()

void Acts::SympyStepper::setIdentityJacobian ( State & state) const

Method that reset the Jacobian to the Identity for when no bound state are available.

Parameters
[in,out]stateState of the stepper

◆ step()

Result< double > Acts::SympyStepper::step ( State & state,
Direction propDir,
const IVolumeMaterial * material ) const

Perform a Runge-Kutta track parameter propagation step.

Parameters
[in,out]stateState of the stepper
propDiris the direction of propagation
materialis the optional volume material we are stepping through.
Returns
the result of the step
Note
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.

◆ time()

double Acts::SympyStepper::time ( const State & state) const

Time access.

Parameters
state[in] The stepping state (thread-local cache)

◆ transportCovarianceToBound()

void Acts::SympyStepper::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.

Template Parameters
surface_tthe Surface type
Parameters
[in,out]stateState of the stepper
[in]surfaceis the surface to which the covariance is forwarded to
[in]freeToBoundCorrectionCorrection for non-linearity effect during transform from free to bound
Note
no check is done if the position is actually on the surface

◆ transportCovarianceToCurvilinear()

void Acts::SympyStepper::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
[in,out]stateState of the stepper

◆ update() [1/2]

void Acts::SympyStepper::update ( State & state,
const FreeVector & freeParams,
const BoundVector & boundParams,
const Covariance & covariance,
const Surface & surface ) const

Method to update a stepper state to the some parameters.

Parameters
[in,out]stateState object that will be updated
[in]freeParamsFree parameters that will be written into state
[in]boundParamsCorresponding bound parameters used to update jacToGlobal in state
[in]covarianceThe covariance that will be written into state
[in]surfaceThe surface used to update the jacToGlobal

◆ update() [2/2]

void Acts::SympyStepper::update ( State & state,
const Vector3 & uposition,
const Vector3 & udirection,
double qOverP,
double time ) const

Method to update the stepper state.

Parameters
[in,out]stateState object that will be updated
[in]upositionthe updated position
[in]udirectionthe updated direction
[in]qOverPthe updated qOverP value
[in]timethe updated time value

◆ updateStepSize() [1/2]

void Acts::SympyStepper::updateStepSize ( State & state,
const NavigationTarget & target,
Direction direction,
ConstrainedStep::Type stype ) 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)
target[in] The NavigationTarget
direction[in] The propagation direction
stype[in] The step size type to be set

◆ updateStepSize() [2/2]

void Acts::SympyStepper::updateStepSize ( State & state,
double stepSize,
ConstrainedStep::Type stype ) const

Update step size - explicitly 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

◆ updateSurfaceStatus()

IntersectionStatus Acts::SympyStepper::updateSurfaceStatus ( State & state,
const Surface & surface,
std::uint8_t index,
Direction navDir,
const BoundaryTolerance & boundaryTolerance,
double surfaceTolerance,
ConstrainedStep::Type stype,
const Logger & logger = getDummyLogger() ) const

Update surface status.

It checks the status to the reference surface & updates the step size accordingly

Parameters
[in,out]stateThe stepping state (thread-local cache)
[in]surfaceThe surface provided
[in]indexThe surface intersection index
[in]navDirThe navigation direction
[in]boundaryToleranceThe boundary check for this status update
[in]surfaceToleranceSurface tolerance used for intersection
[in]stypeThe step size type to be set
[in]loggerA Logger instance

Member Data Documentation

◆ m_bField

std::shared_ptr<const MagneticFieldProvider> Acts::SympyStepper::m_bField
protected

Magnetic field inside of the detector.