File Navigator.hpp¶
-
namespace Acts
Set the Geometry Context PLUGIN.
Set the Calibration Context PLUGIN.
Convenience functions to ease creation of and Acts::InterpolatedMaterialMap and to avoid code duplication.
Set the Mangetic Field Context PLUGIN.
Convenience functions to ease creation of and Acts::InterpolatedBFieldMap and to avoid code duplication.
Currently implemented for the two most common formats: rz and xyz.
-
template<typename object_t>
struct NavigationOptions - #include <Acts/Geometry/Layer.hpp>
-
class Navigator
- #include <Acts/Propagator/Navigator.hpp>
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.
Public Types
-
using ExternalSurfaces = std::multimap<uint64_t, GeometryIdentifier>
-
using NavigationBoundaries = boost::container::small_vector<BoundaryIntersection, 4>
-
using NavigationBoundaryIter = NavigationBoundaries::iterator
-
using NavigationLayerIter = NavigationLayers::iterator
-
using NavigationLayers = boost::container::small_vector<LayerIntersection, 10>
-
using NavigationSurfaceIter = NavigationSurfaces::iterator
-
using NavigationSurfaces = boost::container::small_vector<SurfaceIntersection, 10>
-
enum Stage
The navigation stage.
Values:
-
enumerator undefined
-
enumerator surfaceTarget
-
enumerator layerTarget
-
enumerator boundaryTarget
-
enumerator undefined
-
using SurfaceIter = std::vector<const Surface*>::iterator
-
using Surfaces = std::vector<const Surface*>
Public Functions
-
inline explicit Navigator(Config cfg)
Constructor with configuration object.
- Parameters
cfg – The navigator configuration
-
template<typename propagator_state_t, typename stepper_t>
inline void status(propagator_state_t &state, const stepper_t &stepper) const 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_t – is the type of Propagatgor state
stepper_t – is the used type of the Stepper by the Propagator
- Parameters
state – [inout] is the mutable propagator state object
stepper – [in] Stepper in use
-
template<typename propagator_state_t, typename stepper_t>
inline void target(propagator_state_t &state, const stepper_t &stepper) const 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_t – is the type of Propagatgor state
stepper_t – is the used type of the Stepper by the Propagator
- Parameters
state – [inout] is the mutable propagator state object
stepper – [in] Stepper in use
Private Functions
-
template<typename propagator_state_t, typename stepper_t>
inline bool inactive(propagator_state_t &state, const stepper_t &stepper) const¶ Inactive
This checks if a navigation break had been triggered or navigator is misconfigured
boolean return triggers exit to stepper
- Template Parameters
propagator_state_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
-
template<typename propagator_state_t, typename stepper_t>
inline void initialize(propagator_state_t &state, const stepper_t &stepper) const¶ Initialize call - start of propagation
- Template Parameters
propagator_state_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
- Returns
boolean return triggers exit to stepper
-
template<typename propagator_state_t, typename stepper_t>
inline void initializeTarget(propagator_state_t &state, const stepper_t &stepper) const¶ 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
boolean return triggers exit to stepper
- Template Parameters
propagator_state_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
-
template<typename propagator_state_t, typename stepper_t>
inline bool resolveLayers(propagator_state_t &state, const stepper_t &stepper) const¶ Navigation through layers
Resolve layers.
This initializes the layer candidates when starting or when entering a new volume
- Template Parameters
propagator_state_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
- Returns
boolean return triggers exit to stepper
-
template<typename propagator_state_t, typename stepper_t>
inline bool resolveSurfaces(propagator_state_t &state, const stepper_t &stepper, const Layer *cLayer = nullptr) const¶ Resolve the surfaces of this layer.
boolean return triggers exit to stepper
- Template Parameters
propagator_state_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
cLayer – [in] is the already assigned current layer, e.g. start layer
-
template<typename propagator_state_t, typename stepper_t, typename navigation_surfaces_t, typename navigation_iter_t>
inline bool status(propagator_state_t &state, const stepper_t &stepper, navigation_surfaces_t &navSurfaces, const navigation_iter_t &navIter) const¶ 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_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
navigation_surfaces_t – Type of the propagagor
navigation_iter_t – Type of the navigation iterator
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
navSurfaces – [in] is the navigation status objects
navIter – [in] test surface fore the status test
- Returns
boolean return triggers exit to stepper
-
template<typename propagator_state_t, typename stepper_t>
inline bool targetBoundaries(propagator_state_t &state, const stepper_t &stepper) const¶ 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.
boolean return triggers exit to stepper
- Template Parameters
propagator_state_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
-
template<typename propagator_state_t, typename stepper_t>
inline bool targetLayers(propagator_state_t &state, const stepper_t &stepper) const¶ 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_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
- Returns
boolean return triggers exit to stepper
-
template<typename propagator_state_t, typename stepper_t>
inline bool targetSurfaces(propagator_state_t &state, const stepper_t &stepper) const¶ 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
boolean return triggers exit to stepper
- Template Parameters
propagator_state_t – The state type of the propagagor
stepper_t – The type of stepper used for the propagation
- Parameters
state – [inout] is the propagation state object
stepper – [in] Stepper in use
-
template<typename propagator_state_t>
inline std::string volInfo(const propagator_state_t &state) const¶
-
struct Config
- #include <Acts/Propagator/Navigator.hpp>
Public Members
-
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
-
bool resolveSensitive = true
Configuration for this Navigator stop at every sensitive surface (whether it has material or not)
-
double tolerance = s_onSurfaceTolerance
The tolerance used to defined “reached”.
-
std::shared_ptr<const TrackingGeometry> trackingGeometry = {nullptr}
Tracking Geometry for this Navigator.
-
bool resolveMaterial = true
-
struct State
- #include <Acts/Propagator/Navigator.hpp>
Nested State struct.
It acts as an internal state which is created for every propagation/extrapolation step and keep thread-local navigation information
Public Functions
-
inline void reset(const GeometryContext &geoContext, const Vector3 &pos, const Vector3 &dir, NavigationDirection navDir, const Surface *ssurface, const Surface *tsurface)
Reset state.
- Parameters
geoContext – is the geometry context
pos – is the global position
dir – is the momentum direction
navDir – is the navigation direction
ssurface – is the new starting surface
tsurface – is the target surface
Public Members
-
const Surface *currentSurface = nullptr
Navigation state - external state: the current surface.
-
const TrackingVolume *currentVolume = nullptr
Navigation state: the current volume.
-
ExternalSurfaces externalSurfaces = {}
Externally provided surfaces - these are tried to be hit.
-
bool lastHierarchySurfaceReached = false
Indicator that the last VolumeHierarchy surface was reached skip the next layer targeting to the next boundary/volume.
-
NavigationBoundaries navBoundaries = {}
the vector of boundary surfaces to work through
-
NavigationBoundaryIter navBoundaryIter = navBoundaries.end()
the current boundary iterator of the navigation state
-
bool navigationBreak = false
Navigation state : a break has been detected.
-
NavigationLayerIter navLayerIter = navLayers.end()
the current layer iterator of the navigation state
-
NavigationLayers navLayers = {}
the vector of navigation layers to work through
-
NavigationSurfaceIter navSurfaceIter = navSurfaces.end()
the current surface iterator of the navigation state
-
NavigationSurfaces navSurfaces = {}
the vector of navigation surfaces to work through
-
const Layer *startLayer = nullptr
Navigation state: the start layer.
-
bool startLayerResolved = false
Indicator for start layer treatment.
-
const Surface *startSurface = nullptr
Navigation state: the start surface.
-
const TrackingVolume *startVolume = nullptr
Navigation state: the start volume.
-
const Layer *targetLayer = nullptr
Navigation state: the target layer.
-
bool targetReached = false
Indicator if the target is reached.
-
const Surface *targetSurface = nullptr
Navigation state: the target surface.
-
const TrackingVolume *targetVolume = nullptr
Navigation state: the target volume.
-
const TrackingVolume *worldVolume = nullptr
Navigation sate: the world volume.
-
inline void reset(const GeometryContext &geoContext, const Vector3 &pos, const Vector3 &dir, NavigationDirection navDir, const Surface *ssurface, const Surface *tsurface)
-
using ExternalSurfaces = std::multimap<uint64_t, GeometryIdentifier>
-
template<typename object_t>