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

The NavigationStream is a container for the navigation candidates that are currentlu processed in a given context. More...

#include <Acts/Navigation/NavigationStream.hpp>

Classes

struct  QueryPoint
 The query point for the navigation stream. More...

Public Member Functions

void addPortalCandidate (const Portal &portal)
 Fill one portal into the candidate vector.
void addSurfaceCandidate (const Surface &surface, const BoundaryTolerance &bTolerance)
 Fill one surface into the candidate vector.
void addSurfaceCandidates (std::span< const Surface * > surfaces, const BoundaryTolerance &bTolerance)
 Fill n surfaces into the candidate vector.
std::vector< NavigationTarget > & candidates ()
 Non-const access the candidate vector.
const std::vector< NavigationTarget > & candidates () const
 Const access the candidate vector.
NavigationTargetcurrentCandidate ()
 Non-const access the current candidate.
const NavigationTargetcurrentCandidate () const
 Const access the current candidate.
std::size_t currentIndex () const
 Current Index.
bool initialize (const GeometryContext &gctx, const NavigationStream::QueryPoint &queryPoint, const BoundaryTolerance &cTolerance, double onSurfaceTolerance=s_onSurfaceTolerance)
 Initialize the stream from a query point.
std::size_t remainingCandidates () const
 The number of active candidates.
void reset ()
 Reset the navigation stream by clearing all candidates and resetting the index.
bool switchToNextCandidate ()
 Switch to next next candidate.
bool update (const GeometryContext &gctx, const NavigationStream::QueryPoint &queryPoint, double onSurfaceTolerance=s_onSurfaceTolerance)
 Convenience method to update a stream from a new query point, this could be called from navigation delegates that do not require a local state or from the navigator on the target stream.

Detailed Description

The NavigationStream is a container for the navigation candidates that are currentlu processed in a given context.

The context could be local to a volume, or global to an entire track following.

The current candidates are stored in a vector of candidates, where an index is used to indicate the current active candidate.

Member Function Documentation

◆ addPortalCandidate()

void Acts::NavigationStream::addPortalCandidate ( const Portal & portal)

Fill one portal into the candidate vector.

Parameters
portalthe portals that are filled in

◆ addSurfaceCandidate()

void Acts::NavigationStream::addSurfaceCandidate ( const Surface & surface,
const BoundaryTolerance & bTolerance )

Fill one surface into the candidate vector.

Parameters
surfacethe surface to be filled
bTolerancethe boundary tolerance used for the intersection

◆ addSurfaceCandidates()

void Acts::NavigationStream::addSurfaceCandidates ( std::span< const Surface * > surfaces,
const BoundaryTolerance & bTolerance )

Fill n surfaces into the candidate vector.

Parameters
surfacesthe surfaces that are filled in
bTolerancethe boundary tolerance used for the intersection

◆ candidates() [1/2]

std::vector< NavigationTarget > & Acts::NavigationStream::candidates ( )

Non-const access the candidate vector.

Returns
Mutable reference to vector of navigation candidates

◆ candidates() [2/2]

const std::vector< NavigationTarget > & Acts::NavigationStream::candidates ( ) const

Const access the candidate vector.

Returns
Const reference to vector of navigation candidates

◆ currentCandidate() [1/2]

NavigationTarget & Acts::NavigationStream::currentCandidate ( )

Non-const access the current candidate.

This will throw and out of bounds exception if the stream is not valid anymore.

Returns
Mutable reference to current candidate

◆ currentCandidate() [2/2]

const NavigationTarget & Acts::NavigationStream::currentCandidate ( ) const

Const access the current candidate.

Returns
Const reference to current candidate

◆ currentIndex()

std::size_t Acts::NavigationStream::currentIndex ( ) const

Current Index.

Returns
Index of the current candidate in the vector

◆ initialize()

bool Acts::NavigationStream::initialize ( const GeometryContext & gctx,
const NavigationStream::QueryPoint & queryPoint,
const BoundaryTolerance & cTolerance,
double onSurfaceTolerance = s_onSurfaceTolerance )

Initialize the stream from a query point.

Parameters
gctxis the geometry context
queryPointholds current position, direction, etc.
cToleranceis the candidate search tolerance
onSurfaceToleranceis the tolerance for on-surface intersections

This method will first de-duplicate the candidates on basis of the surface pointer to make sure that the multi-intersections are handled correctly. This will allow intializeStream() to be called even as a re-initialization and still work correctly with at one time valid candidates.

Returns
true if the stream is active, false indicates that there are no valid candidates

◆ remainingCandidates()

std::size_t Acts::NavigationStream::remainingCandidates ( ) const

The number of active candidates.

Returns
Number of remaining candidates from current position onwards

◆ reset()

void Acts::NavigationStream::reset ( )

Reset the navigation stream by clearing all candidates and resetting the index.

This clears the candidates vector and resets the current index to 0.

◆ switchToNextCandidate()

bool Acts::NavigationStream::switchToNextCandidate ( )

Switch to next next candidate.

Returns
true if a next candidate is available

◆ update()

bool Acts::NavigationStream::update ( const GeometryContext & gctx,
const NavigationStream::QueryPoint & queryPoint,
double onSurfaceTolerance = s_onSurfaceTolerance )

Convenience method to update a stream from a new query point, this could be called from navigation delegates that do not require a local state or from the navigator on the target stream.

Parameters
gctxis the geometry context
queryPointholds current position, direction, etc.
onSurfaceToleranceis the tolerance for on-surface intersections
Returns
true if the stream is active, false indicate no valid candidates left