Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::StraightLineStepper Class Reference

straight line stepper based on Surface intersection More...

#include <acts/blob/sPHENIX/Core/include/Acts/Propagator/StraightLineStepper.hpp>

Classes

struct  State
 

Public Types

using Jacobian = BoundMatrix
 
using Covariance = BoundSquareMatrix
 
using BoundState = std::tuple< BoundTrackParameters, Jacobian, double >
 
using CurvilinearState = std::tuple< CurvilinearTrackParameters, Jacobian, double >
 
using BField = NullBField
 
using state_type = State
 

Public Member Functions

 StraightLineStepper ()=default
 
State makeState (std::reference_wrapper< const GeometryContext > gctx, std::reference_wrapper< const MagneticFieldContext > mctx, const BoundTrackParameters &par, double ssize=std::numeric_limits< double >::max(), double stolerance=s_onSurfaceTolerance) const
 
void resetState (State &state, const BoundVector &boundParams, const BoundSquareMatrix &cov, const Surface &surface, const double stepSize=std::numeric_limits< double >::max()) const
 Resets the state.
 
Result< Vector3getField (State &state, const Vector3 &pos) const
 
Vector3 position (const State &state) const
 
Vector3 direction (const State &state) const
 
double qOverP (const State &state) const
 
double absoluteMomentum (const State &state) const
 
Vector3 momentum (const State &state) const
 
double charge (const State &state) const
 
const ParticleHypothesisparticleHypothesis (const State &state) const
 
double time (const State &state) const
 
double overstepLimit (const State &state) const
 
Intersection3D::Status updateSurfaceStatus (State &state, const Surface &surface, Direction navDir, const BoundaryCheck &bcheck, ActsScalar surfaceTolerance=s_onSurfaceTolerance, const Logger &logger=getDummyLogger()) const
 
template<typename object_intersection_t >
void updateStepSize (State &state, const object_intersection_t &oIntersection, Direction, bool release=true) const
 
void setStepSize (State &state, double stepSize, ConstrainedStep::Type stype=ConstrainedStep::actor, bool release=true) const
 
double getStepSize (const State &state, ConstrainedStep::Type stype) const
 
void releaseStepSize (State &state) const
 
std::string outputStepSize (const State &state) const
 
Result< BoundStateboundState (State &state, const Surface &surface, bool transportCov=true, const FreeToBoundCorrection &freeToBoundCorrection=FreeToBoundCorrection(false)) const
 It does not check if the transported state is at the surface, this needs to be guaranteed by the propagator.
 
CurvilinearState curvilinearState (State &state, bool transportCov=true) const
 This creates a curvilinear state.
 
void update (State &state, const FreeVector &freeParams, const BoundVector &boundParams, const Covariance &covariance, const Surface &surface) const
 
void update (State &state, const Vector3 &uposition, const Vector3 &udirection, double qop, double time) const
 
void transportCovarianceToCurvilinear (State &state) const
 
void transportCovarianceToBound (State &state, const Surface &surface, const FreeToBoundCorrection &freeToBoundCorrection=FreeToBoundCorrection(false)) const
 
template<typename propagator_state_t , typename navigator_t >
Result< doublestep (propagator_state_t &state, const navigator_t &) const
 

Private Attributes

double m_overstepLimit = s_onSurfaceTolerance
 

Detailed Description

straight line stepper based on Surface intersection

The straight line stepper is a simple navigation stepper to be used to navigate through the tracking geometry. It can be used for simple material mapping, navigation validation

Definition at line 45 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 45 of file StraightLineStepper.hpp

Member Typedef Documentation

Definition at line 52 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 52 of file StraightLineStepper.hpp

Definition at line 49 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 49 of file StraightLineStepper.hpp

Definition at line 48 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 48 of file StraightLineStepper.hpp

Definition at line 51 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 51 of file StraightLineStepper.hpp

Definition at line 47 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 47 of file StraightLineStepper.hpp

Always use the same propagation state type, independently of the initial track parameter type and of the target surface

Definition at line 132 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 132 of file StraightLineStepper.hpp

Constructor & Destructor Documentation

Acts::StraightLineStepper::StraightLineStepper ( )
default

Member Function Documentation

double Acts::StraightLineStepper::absoluteMomentum ( const State state) const
inline

Absolute momentum accessor

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

Definition at line 190 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 190 of file StraightLineStepper.hpp

References particleHypothesis(), and qOverP().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), momentum(), and step().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Result< std::tuple< BoundTrackParameters, BoundMatrix, double > > Acts::StraightLineStepper::boundState ( State state,
const Surface surface,
bool  transportCov = true,
const FreeToBoundCorrection freeToBoundCorrection = FreeToBoundCorrection(false) 
) const

It does not check if the transported state is at the surface, this needs to be guaranteed by the propagator.

Create and return the bound state at the current position

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)

Definition at line 17 of file StraightLineStepper.cpp.

View newest version in sPHENIX GitHub at line 17 of file StraightLineStepper.cpp

References Acts::detail::boundState(), Acts::StraightLineStepper::State::cov, Acts::StraightLineStepper::State::covTransport, Acts::StraightLineStepper::State::derivative, Acts::StraightLineStepper::State::geoContext, Acts::StraightLineStepper::State::jacobian, Acts::StraightLineStepper::State::jacToGlobal, Acts::StraightLineStepper::State::jacTransport, Acts::StraightLineStepper::State::pars, Acts::StraightLineStepper::State::particleHypothesis, and Acts::StraightLineStepper::State::pathAccumulated.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Acts::StraightLineStepper::charge ( const State state) const
inline

Charge access

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

Definition at line 204 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 204 of file StraightLineStepper.hpp

References particleHypothesis(), and qOverP().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::tuple< CurvilinearTrackParameters, BoundMatrix, double > Acts::StraightLineStepper::curvilinearState ( State state,
bool  transportCov = true 
) const

This creates a curvilinear state.

Create and return a curvilinear state at the current position

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)

Definition at line 28 of file StraightLineStepper.cpp.

View newest version in sPHENIX GitHub at line 28 of file StraightLineStepper.cpp

References Acts::StraightLineStepper::State::cov, Acts::StraightLineStepper::State::covTransport, Acts::detail::curvilinearState(), Acts::StraightLineStepper::State::derivative, Acts::StraightLineStepper::State::jacobian, Acts::StraightLineStepper::State::jacToGlobal, Acts::StraightLineStepper::State::jacTransport, Acts::StraightLineStepper::State::pars, Acts::StraightLineStepper::State::particleHypothesis, and Acts::StraightLineStepper::State::pathAccumulated.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 Acts::StraightLineStepper::direction ( const State state) const
inline

Momentum direction accessor

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

Definition at line 178 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 178 of file StraightLineStepper.hpp

References Acts::eFreeDir0, and Acts::StraightLineStepper::State::pars.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), momentum(), and step().

+ Here is the caller graph for this function:

Result<Vector3> Acts::StraightLineStepper::getField ( State state,
const Vector3 pos 
) const
inline

Get the field for the stepping, this gives back a zero field

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

Definition at line 161 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 161 of file StraightLineStepper.hpp

double Acts::StraightLineStepper::getStepSize ( const State state,
ConstrainedStep::Type  stype 
) const
inline

Get the step size

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

Definition at line 282 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 282 of file StraightLineStepper.hpp

References Acts::StraightLineStepper::State::stepSize, and Acts::ConstrainedStep::value().

+ Here is the call graph for this function:

State Acts::StraightLineStepper::makeState ( std::reference_wrapper< const GeometryContext gctx,
std::reference_wrapper< const MagneticFieldContext mctx,
const BoundTrackParameters par,
double  ssize = std::numeric_limits<double>::max(),
double  stolerance = s_onSurfaceTolerance 
) const
inline

Definition at line 136 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 136 of file StraightLineStepper.hpp

References gctx.

Vector3 Acts::StraightLineStepper::momentum ( const State state) const
inline

Momentum accessor

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

Definition at line 197 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 197 of file StraightLineStepper.hpp

References absoluteMomentum(), and direction().

+ Here is the call graph for this function:

std::string Acts::StraightLineStepper::outputStepSize ( const State state) const
inline

Output the Step Size - single component

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

Definition at line 296 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 296 of file StraightLineStepper.hpp

References Acts::StraightLineStepper::State::stepSize, and Acts::ConstrainedStep::toString().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Acts::StraightLineStepper::overstepLimit ( const State state) const
inline

Overstep limit

Parameters
stateThe stepping state (thread-local cache)

Definition at line 223 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 223 of file StraightLineStepper.hpp

References m_overstepLimit.

const ParticleHypothesis& Acts::StraightLineStepper::particleHypothesis ( const State state) const
inline

Particle hypothesis

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

Definition at line 211 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 211 of file StraightLineStepper.hpp

References Acts::StraightLineStepper::State::particleHypothesis.

Referenced by absoluteMomentum(), and charge().

+ Here is the caller graph for this function:

Vector3 Acts::StraightLineStepper::position ( const State state) const
inline

Global particle position accessor

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

Definition at line 171 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 171 of file StraightLineStepper.hpp

References Acts::eFreePos0, and Acts::StraightLineStepper::State::pars.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

double Acts::StraightLineStepper::qOverP ( const State state) const
inline

QoP direction accessor

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

Definition at line 185 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 185 of file StraightLineStepper.hpp

References Acts::eFreeQOverP, and Acts::StraightLineStepper::State::pars.

Referenced by absoluteMomentum(), and charge().

+ Here is the caller graph for this function:

void Acts::StraightLineStepper::releaseStepSize ( State state) const
inline

Release the Step size

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

Definition at line 289 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 289 of file StraightLineStepper.hpp

References Acts::ConstrainedStep::actor, Acts::ConstrainedStep::release(), and Acts::StraightLineStepper::State::stepSize.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::StraightLineStepper::resetState ( State state,
const BoundVector boundParams,
const BoundSquareMatrix cov,
const Surface surface,
const double  stepSize = std::numeric_limits<double>::max() 
) const

Resets the state.

Parameters
[in,out]stateState of the stepper
[in]boundParamsParameters in bound parametrisation
[in]covCovariance matrix
[in]surfaceThe reset State will be on this surface
[in]stepSizeStep size

Definition at line 69 of file StraightLineStepper.cpp.

View newest version in sPHENIX GitHub at line 69 of file StraightLineStepper.cpp

References Acts::Surface::boundToFreeJacobian(), Acts::StraightLineStepper::State::derivative, Acts::StraightLineStepper::State::geoContext, Acts::StraightLineStepper::State::jacobian, Acts::StraightLineStepper::State::jacToGlobal, Acts::StraightLineStepper::State::jacTransport, Acts::StraightLineStepper::State::pathAccumulated, Acts::StraightLineStepper::State::stepSize, Acts::detail::transformBoundToFreeParameters(), and update().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::StraightLineStepper::setStepSize ( State state,
double  stepSize,
ConstrainedStep::Type  stype = ConstrainedStep::actor,
bool  release = true 
) const
inline

Set 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
release[in] Do we release the step size?

Definition at line 271 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 271 of file StraightLineStepper.hpp

References Acts::StraightLineStepper::State::previousStepSize, Acts::StraightLineStepper::State::stepSize, Acts::ConstrainedStep::update(), and Acts::ConstrainedStep::value().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename propagator_state_t , typename navigator_t >
Result<double> Acts::StraightLineStepper::step ( propagator_state_t &  state,
const navigator_t &   
) const
inline

Perform a straight line propagation step

Parameters
[in,out]stateis the propagation state associated with the track parameters that are being propagated. 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.
Returns
the step size taken

Definition at line 389 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 389 of file StraightLineStepper.hpp

References absoluteMomentum(), direction(), Acts::eFreePos0, Acts::eFreeQOverP, Acts::eFreeTime, h, Acts::UnitConstants::m, and merge_hashes::p.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Acts::StraightLineStepper::time ( const State state) const
inline

Time access

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

Definition at line 218 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 218 of file StraightLineStepper.hpp

References Acts::eFreeTime, and Acts::StraightLineStepper::State::pars.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and update().

+ Here is the caller graph for this function:

void Acts::StraightLineStepper::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 - for the moment a dummy method

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

Definition at line 60 of file StraightLineStepper.cpp.

View newest version in sPHENIX GitHub at line 60 of file StraightLineStepper.cpp

References Acts::StraightLineStepper::State::cov, Acts::StraightLineStepper::State::derivative, Acts::StraightLineStepper::State::geoContext, Acts::StraightLineStepper::State::jacobian, Acts::StraightLineStepper::State::jacToGlobal, Acts::StraightLineStepper::State::jacTransport, Acts::StraightLineStepper::State::pars, and Acts::detail::transportCovarianceToBound().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::StraightLineStepper::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 - for the moment a dummy method

Parameters
[in,out]stateState of the stepper

Definition at line 54 of file StraightLineStepper.cpp.

View newest version in sPHENIX GitHub at line 54 of file StraightLineStepper.cpp

References Acts::StraightLineStepper::State::cov, Acts::StraightLineStepper::State::derivative, Acts::eFreeDir0, Acts::StraightLineStepper::State::jacobian, Acts::StraightLineStepper::State::jacToGlobal, Acts::StraightLineStepper::State::jacTransport, Acts::StraightLineStepper::State::pars, and Acts::detail::transportCovarianceToCurvilinear().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::StraightLineStepper::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]covarianceCovariance that will be written into state
[in]surfaceThe surface used to update the jacToGlobal

Definition at line 35 of file StraightLineStepper.cpp.

View newest version in sPHENIX GitHub at line 35 of file StraightLineStepper.cpp

References Acts::Surface::boundToFreeJacobian(), Acts::StraightLineStepper::State::cov, covariance(), Acts::StraightLineStepper::State::geoContext, Acts::StraightLineStepper::State::jacToGlobal, and Acts::StraightLineStepper::State::pars.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and resetState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::StraightLineStepper::update ( State state,
const Vector3 uposition,
const Vector3 udirection,
double  qop,
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]qopthe updated qop value
[in]timethe updated time value

Definition at line 45 of file StraightLineStepper.cpp.

View newest version in sPHENIX GitHub at line 45 of file StraightLineStepper.cpp

References Acts::eFreeDir0, Acts::eFreePos0, Acts::eFreeQOverP, Acts::eFreeTime, Acts::StraightLineStepper::State::pars, and time().

+ Here is the call graph for this function:

template<typename object_intersection_t >
void Acts::StraightLineStepper::updateStepSize ( State state,
const object_intersection_t &  oIntersection,
Direction  ,
bool  release = true 
) const
inline

Update step size

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

Parameters
state[in,out] The stepping state (thread-local cache)
oIntersection[in] The ObjectIntersection to layer, boundary, etc
release[in] boolean to trigger step size release

Definition at line 259 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 259 of file StraightLineStepper.hpp

References filter::state.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

Intersection3D::Status Acts::StraightLineStepper::updateSurfaceStatus ( State state,
const Surface surface,
Direction  navDir,
const BoundaryCheck bcheck,
ActsScalar  surfaceTolerance = s_onSurfaceTolerance,
const Logger logger = getDummyLogger() 
) const
inline

Update surface status

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
[in,out]stateThe stepping state (thread-local cache)
[in]surfaceThe surface provided
[in]navDirThe navigation direction
[in]bcheckThe boundary check for this status update
[in]surfaceToleranceSurface tolerance used for intersection
[in]loggerA logger instance

Definition at line 241 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 241 of file StraightLineStepper.hpp

References logger(), Acts::Test::navDir, filter::state, and writeMapConfig::surface.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

double Acts::StraightLineStepper::m_overstepLimit = s_onSurfaceTolerance
private

Definition at line 423 of file StraightLineStepper.hpp.

View newest version in sPHENIX GitHub at line 423 of file StraightLineStepper.hpp

Referenced by overstepLimit().


The documentation for this class was generated from the following files: