ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Navigator Class Reference

#include <acts/blob/master/Core/include/Acts/Propagator/Navigator.hpp>

Classes

struct  State
 

Public Types

enum  Stage : int
 The navigation stage. More...
 
using Surfaces = std::vector< const Surface * >
 
using SurfaceIter = std::vector< const Surface * >::iterator
 
using NavigationSurfaces = std::vector< SurfaceIntersection >
 
using NavigationSurfaceIter = NavigationSurfaces::iterator
 
using NavigationLayers = std::vector< LayerIntersection >
 
using NavigationLayerIter = NavigationLayers::iterator
 
using NavigationBoundaries = std::vector< BoundaryIntersection >
 
using NavigationBoundaryIter = NavigationBoundaries::iterator
 
using ExternalSurfaces = std::multimap< const Layer *, const Surface * >
 

Public Member Functions

 Navigator (std::shared_ptr< const TrackingGeometry > tGeometry=nullptr)
 
template<typename propagator_state_t , typename stepper_t >
void status (propagator_state_t &state, const stepper_t &stepper) const
 Navigator status call, will be called in two modes.
 
template<typename propagator_state_t , typename stepper_t >
void target (propagator_state_t &state, const stepper_t &stepper) const
 Navigator target call.
 

Public Attributes

std::shared_ptr< const
TrackingGeometry
trackingGeometry
 Tracking Geometry for this Navigator.
 
double tolerance = s_onSurfaceTolerance
 The tolerance used to defined "reached".
 
bool resolveSensitive = true
 
bool resolveMaterial = true
 stop at every material surface (whether it is passive or not)
 
bool resolvePassive = false
 stop at every surface regardless what it is
 

Private Member Functions

template<typename propagator_state_t , typename stepper_t >
void initialize (propagator_state_t &state, const stepper_t &stepper) const
 
template<typename propagator_state_t , typename stepper_t , typename navigation_surfaces_t , typename navigation_iter_t >
bool status (propagator_state_t &state, const stepper_t &stepper, navigation_surfaces_t &navSurfaces, const navigation_iter_t &navIter) const
 
template<typename propagator_state_t , typename stepper_t >
bool targetSurfaces (propagator_state_t &state, const stepper_t &stepper) const
 
template<typename propagator_state_t , typename stepper_t >
bool targetLayers (propagator_state_t &state, const stepper_t &stepper) const
 Target layer candidates.
 
template<typename propagator_state_t , typename stepper_t >
bool targetBoundaries (propagator_state_t &state, const stepper_t &stepper) const
 
template<typename propagator_state_t , typename stepper_t >
void initializeTarget (propagator_state_t &state, const stepper_t &stepper) const
 
template<typename propagator_state_t , typename stepper_t >
bool resolveSurfaces (propagator_state_t &state, const stepper_t &stepper, const Layer *cLayer=nullptr) const
 Resolve the surfaces of this layer.
 
template<typename propagator_state_t , typename stepper_t >
bool resolveLayers (propagator_state_t &state, const stepper_t &stepper) const
 
template<typename propagator_state_t , typename stepper_t >
bool inactive (propagator_state_t &state, const stepper_t &stepper) const
 
template<typename propagator_state_t >
void debugLog (propagator_state_t &state, const std::function< std::string()> &logAction) const
 

Detailed Description

Navigator class

This is an Actor to be added to the ActorList in order to navigate through the static tracking geometry setup.

The current navigation stage is cached in the state struct and updated when necessary. If any surface in the extrapolation flow is hit, it is set to the propagation satate, such that other actors can deal wit it. This navigation actor thus always needs to run first! It does two things: it figures out the order of volumes, layers and surfaces. For each propagation step, the operator() runs, which checks if the current surface (or layer/volume boundary) is reached.

The current target surface is the surface pointed to by of the iterators for the surfaces, layers or volume boundaries. If a surface is found, the state.navigation.currentSurface pointer is set. This enables subsequent actors to react. Secondly, this actor uses the ordered iterators to figure out which surface, layer or volume boundary is supposed to be hit next. It then sets the maximum step size to the path length found out by straight line intersection. If the state is not on surface, it also re-computes the step size, to make sure we end up at the desired surface.

Definition at line 111 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 111 of file Navigator.hpp

Member Typedef Documentation

using Acts::Navigator::ExternalSurfaces = std::multimap<const Layer*, const Surface*>

Definition at line 125 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 125 of file Navigator.hpp

Definition at line 122 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 122 of file Navigator.hpp

using Acts::Navigator::NavigationBoundaryIter = NavigationBoundaries::iterator

Definition at line 123 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 123 of file Navigator.hpp

using Acts::Navigator::NavigationLayerIter = NavigationLayers::iterator

Definition at line 120 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 120 of file Navigator.hpp

Definition at line 119 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 119 of file Navigator.hpp

using Acts::Navigator::NavigationSurfaceIter = NavigationSurfaces::iterator

Definition at line 117 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 117 of file Navigator.hpp

Definition at line 116 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 116 of file Navigator.hpp

using Acts::Navigator::SurfaceIter = std::vector<const Surface*>::iterator

Definition at line 114 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 114 of file Navigator.hpp

using Acts::Navigator::Surfaces = std::vector<const Surface*>

Definition at line 113 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 113 of file Navigator.hpp

Member Enumeration Documentation

The navigation stage.

Definition at line 128 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 128 of file Navigator.hpp

Constructor & Destructor Documentation

Acts::Navigator::Navigator ( std::shared_ptr< const TrackingGeometry tGeometry = nullptr)
inline

Constructor with shared tracking geometry

Parameters
tGeometryThe tracking geometry for the navigator

Definition at line 138 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 138 of file Navigator.hpp

Member Function Documentation

template<typename propagator_state_t >
void Acts::Navigator::debugLog ( propagator_state_t &  state,
const std::function< std::string()> &  logAction 
) const
inlineprivate

The private navigation debug logging

It needs to be fed by a lambda function that returns a string, that guarantees that the lambda is only called in the state.options.debug == true case in order not to spend time when not needed.

Template Parameters
propagator_state_tType of the propagator state
Parameters
[in,out]statethe propagator state for the debug flag, prefix and length
logActionis a callable function that returns a streamable object

Definition at line 1275 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 1275 of file Navigator.hpp

References split().

+ Here is the call graph for this function:

template<typename propagator_state_t , typename stepper_t >
bool Acts::Navigator::inactive ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inlineprivate

Inactive

This checks if a navigation break had been triggered or navigator is misconfigured

Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use

boolean return triggers exit to stepper

Definition at line 1223 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 1223 of file Navigator.hpp

References Acts::trackingGeometry().

+ Here is the call graph for this function:

template<typename propagator_state_t , typename stepper_t >
void Acts::Navigator::initialize ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inlineprivate

Initialize call - start of propagation

Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use
Returns
boolean return triggers exit to stepper

Definition at line 429 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 429 of file Navigator.hpp

References Acts::toString(), and Acts::trackingGeometry().

+ Here is the call graph for this function:

template<typename propagator_state_t , typename stepper_t >
void Acts::Navigator::initializeTarget ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inlineprivate

Navigation (re-)initialisation for the target

This is only called a few times every propagation/extrapolation


As a straight line estimate can lead you to the wrong destination Volume, this will be called at:

  • initialization
  • attempted volume switch Target finding by association will not be done again
Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use

boolean return triggers exit to stepper

get the target volume from the intersection

Definition at line 990 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 990 of file Navigator.hpp

References Acts::trackingGeometry().

+ Here is the call graph for this function:

template<typename propagator_state_t , typename stepper_t >
bool Acts::Navigator::resolveLayers ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inlineprivate

Navigation through layers

Resolve layers.

This initializes the layer candidates when starting or when entering a new volume

Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use
Returns
boolean return triggers exit to stepper

Definition at line 1140 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 1140 of file Navigator.hpp

References Acts::ConstrainedStep::aborter, g4zmq::lc(), and Acts::NavigationOptions< object_t >::targetSurface.

+ Here is the call graph for this function:

template<typename propagator_state_t , typename stepper_t >
bool Acts::Navigator::resolveSurfaces ( propagator_state_t &  state,
const stepper_t &  stepper,
const Layer cLayer = nullptr 
) const
inlineprivate

Resolve the surfaces of this layer.

Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use
[in]cLayeris the already assigned current layer, e.g. start layer

boolean return triggers exit to stepper

Definition at line 1070 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 1070 of file Navigator.hpp

References Acts::ConstrainedStep::aborter, Acts::NavigationOptions< object_t >::overstepLimit, Acts::NavigationOptions< object_t >::pathLimit, and Acts::s_onSurfaceTolerance.

template<typename propagator_state_t , typename stepper_t >
void Acts::Navigator::status ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inline

Navigator status call, will be called in two modes.

(a) It initializes the Navigation stream if start volume is not yet defined:

  • initialize the volume
  • establish the start layer and start volume
  • set the current surface to the start surface

(b) It establishes the currentSurface status during the propagation flow, currentSurface can be

  • surfaces still to be handled within a layer
  • layers still to be handled within a volume
  • boundaries still to be handled to exit a volume
Template Parameters
propagator_state_tis the type of Propagatgor state
stepper_tis the used type of the Stepper by the Propagator
Parameters
[in,out]stateis the mutable propagator state object
[in]stepperStepper in use

Definition at line 232 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 232 of file Navigator.hpp

References inactive, G4INCL::Clustering::initialize(), and PHG4CellDefs::undefined.

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 stepper_t , typename navigation_surfaces_t , typename navigation_iter_t >
bool Acts::Navigator::status ( propagator_state_t &  state,
const stepper_t &  stepper,
navigation_surfaces_t &  navSurfaces,
const navigation_iter_t &  navIter 
) const
inlineprivate

Status call for test surfaces (surfaces, layers, boundaries)

If there are surfaces to be handled, check if the current state is on the surface

Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
navigation_surfaces_tType of the propagagor
navigation_iter_tType of the navigation iterator
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use
[in]navSurfacesis the navigation status objects
[in]navItertest surface fore the status test
Returns
boolean return triggers exit to stepper

Definition at line 514 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 514 of file Navigator.hpp

References surface().

+ Here is the call graph for this function:

template<typename propagator_state_t , typename stepper_t >
void Acts::Navigator::target ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inline

Navigator target call.

Call options (a) there are still surfaces to be resolved: handle those (b) there no surfaces but still layers to be resolved, handle those (c) there are no surfaces nor layers to be resolved, handle boundary

Template Parameters
propagator_state_tis the type of Propagatgor state
stepper_tis the used type of the Stepper by the Propagator
Parameters
[in,out]stateis the mutable propagator state object
[in]stepperStepper in use

Definition at line 375 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 375 of file Navigator.hpp

References inactive.

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

+ Here is the caller graph for this function:

template<typename propagator_state_t , typename stepper_t >
bool Acts::Navigator::targetBoundaries ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inlineprivate

Navigation through volumes

This is the boundary check routine. If the code above set up the boundary surface iterator, we advance through them here. If we are on the boundary surface, we set the current surface to the boundary surface, and get the volume pointed at by the boundary surface. Next we unpack the layers from that volume. If the volume contains layers we set the step size to the straight line path length to the first layer. If we don't find a next volume, the navigationBreak indicator is set. This ends the navigation. Finally, the boundary iterator is cleared, so that the subsequent call goes back to the layer iteration logic.

If we are not on the current boundary surface, we try the next one. The iterator is advanced and the step size is set. If no straight line intersect is found, the boundary surface is skipped. If we are out of boundary surfaces, the navigation is terminated.

Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use

boolean return triggers exit to stepper

Definition at line 843 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 843 of file Navigator.hpp

References Acts::ConstrainedStep::aborter, Acts::NavigationOptions< object_t >::overstepLimit, Acts::NavigationOptions< object_t >::pathLimit, and Acts::NavigationOptions< object_t >::startObject.

template<typename propagator_state_t , typename stepper_t >
bool Acts::Navigator::targetLayers ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inlineprivate

Target layer candidates.

We are now trying to advance to the next layer (with surfaces) Check if we are on the representing surface of the layer pointed at by navLayerIter. If so, we unpack the compatible surfaces (determined by straight line intersect), and set up the iterator so that the next status() call will enter the surface check mode above. If no surfaces are found, we skip the layer. If we unpack a surface, the step size is set to the path length to the first surface, as determined by straight line intersect.

Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use
Returns
boolean return triggers exit to stepper

Definition at line 667 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 667 of file Navigator.hpp

References Acts::NavigationOptions< object_t >::overstepLimit.

template<typename propagator_state_t , typename stepper_t >
bool Acts::Navigator::targetSurfaces ( propagator_state_t &  state,
const stepper_t &  stepper 
) const
inlineprivate

Loop over surface candidates here:

  • if an intersect is valid but not yet reached then return with updated step size
  • if an intersect is not valid, switch to next
Template Parameters
propagator_state_tThe state type of the propagagor
stepper_tThe type of stepper used for the propagation
Parameters
[in,out]stateis the propagation state object
[in]stepperStepper in use

boolean return triggers exit to stepper

Definition at line 560 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 560 of file Navigator.hpp

References surface().

+ Here is the call graph for this function:

Member Data Documentation

bool Acts::Navigator::resolveMaterial = true

stop at every material surface (whether it is passive or not)

Definition at line 151 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 151 of file Navigator.hpp

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

bool Acts::Navigator::resolvePassive = false

stop at every surface regardless what it is

Definition at line 153 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 153 of file Navigator.hpp

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

bool Acts::Navigator::resolveSensitive = true

Configuration for this Navigator stop at every sensitive surface (whether it has material or not)

Definition at line 149 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 149 of file Navigator.hpp

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

double Acts::Navigator::tolerance = s_onSurfaceTolerance

The tolerance used to defined "reached".

Definition at line 145 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 145 of file Navigator.hpp

std::shared_ptr<const TrackingGeometry> Acts::Navigator::trackingGeometry

Tracking Geometry for this Navigator.

Definition at line 142 of file Navigator.hpp.

View newest version in sPHENIX GitHub at line 142 of file Navigator.hpp

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


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