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

A navigation policy that uses frustum-octree intersections to find portals. More...

#include <Acts/Navigation/FrustumNavigationPolicy.hpp>

Inheritance diagram for Acts::Experimental::FrustumNavigationPolicy:
[legend]
Collaboration diagram for Acts::Experimental::FrustumNavigationPolicy:
[legend]

Classes

struct  Config
 Configuration for the frustum navigation policy. More...
struct  State
 Frustum navigation policy state, which holds the frustum. More...

Public Types

using BoundingBox = AxisAlignedBoundingBox<Volume, double, 3>
 Typedef for the 3d bounding box.
using Frustum3 = Frustum<double, 3, 3>
 Typedef for the 3d frustum.

Public Member Functions

 FrustumNavigationPolicy (const GeometryContext &gctx, const TrackingVolume &volume, const Logger &logger, const Config &config)
 Main constructor, which takes the top-level volume and builds the octree.
void connect (NavigationDelegate &delegate) const override
 Connect this policy with a navigation delegate.
void createState (const GeometryContext &, const NavigationArguments &args, NavigationPolicyStateManager &stateManager, const Logger &logger) const override
 Create and initialize a new navigation state.
void initializeCandidates (const GeometryContext &, const NavigationArguments &args, NavigationPolicyState &state, AppendOnlyNavigationStream &stream, const Logger &logger) const
 Update the navigation state.
bool isValid (const GeometryContext &, const NavigationArguments &args, NavigationPolicyState &state, const Logger &logger) const override
 Check the validity of the navigation state.
void popState (NavigationPolicyStateManager &stateManager, const Logger &logger) const override
 Remove the state from the state manager.
Public Member Functions inherited from Acts::INavigationPolicy
virtual ~INavigationPolicy ()=default
 Virtual destructor so policies can be held through this base class.
void initializeStatelessCache (const GeometryContext &gctx, const Logger &logger=getDummyLogger())
 One-time initialization step that probes whether this policy pushes only default (empty) states and caches the result (mutating internal state), allowing the navigator to skip the per-volume-entry state creation and the matching pop entirely for volumes with such policies.
bool isStateless () const
 Whether this policy is known to push only default (empty) states, see initializeStatelessCache.
virtual void visit (const std::function< void(const INavigationPolicy &)> &visitor) const
 Convenience function to walk over all navigation policies.

Additional Inherited Members

Static Public Member Functions inherited from Acts::INavigationPolicy
static void noopInitializeCandidates (const GeometryContext &, const NavigationArguments &, NavigationPolicyState &, const AppendOnlyNavigationStream &, const Logger &)
 Noop update function that is suitable as a default for default navigation delegates.
Protected Member Functions inherited from Acts::INavigationPolicy
template<NavigationPolicyConcept T>
void connectDefault (NavigationDelegate &delegate) const
 Internal helper function for derived classes that conform to the concept and have a conventional updateState method.

Detailed Description

A navigation policy that uses frustum-octree intersections to find portals.

The frustum is a cone that points in the direction of the particle's travel. It is set at the start of navigation, and only updated if the particle leaves it. The octree is built from the first-level child volumes inside the top-level volume. Each level of the tree splits each piece of the previous level into eight equal pieces. The number of levels is the configurable depth parameter. Each child volume is assigned to the piece of the whole that contains it on each level. Navigation candidates are found by intersecting the frustum with the octree. On each level, the frustum only checks for intersections with pieces that descend from previously intersected pieces. This allows for a rapid determination of candidates in geometries with many volumes.

Constructor & Destructor Documentation

◆ FrustumNavigationPolicy()

Acts::Experimental::FrustumNavigationPolicy::FrustumNavigationPolicy ( const GeometryContext & gctx,
const TrackingVolume & volume,
const Logger & logger,
const Config & config )
explicit

Main constructor, which takes the top-level volume and builds the octree.

Parameters
gctxThe geometrycontext object
volumeThe tracking volume used to build the octree
loggerA logging instance
configThe configuration of the Navigation Policy

Member Function Documentation

◆ connect()

void Acts::Experimental::FrustumNavigationPolicy::connect ( NavigationDelegate & delegate) const
overridevirtual

Connect this policy with a navigation delegate.

Parameters
delegateThe navigation delegate to connect to

Implements Acts::INavigationPolicy.

◆ createState()

void Acts::Experimental::FrustumNavigationPolicy::createState ( const GeometryContext & ,
const NavigationArguments & args,
NavigationPolicyStateManager & stateManager,
const Logger & logger ) const
overridevirtual

Create and initialize a new navigation state.

Parameters
argsThe navigation arguments
stateManagerThe navigation state manager to push the new state onto
loggerThe logger

Reimplemented from Acts::INavigationPolicy.

◆ initializeCandidates()

void Acts::Experimental::FrustumNavigationPolicy::initializeCandidates ( const GeometryContext & ,
const NavigationArguments & args,
NavigationPolicyState & state,
AppendOnlyNavigationStream & stream,
const Logger & logger ) const

Update the navigation state.

Parameters
argsThe navigation arguments, position and direction
stateThe navigation state for this policy
streamThe navigation stream to update
loggerThe logger

◆ isValid()

bool Acts::Experimental::FrustumNavigationPolicy::isValid ( const GeometryContext & ,
const NavigationArguments & args,
NavigationPolicyState & state,
const Logger & logger ) const
overridevirtual

Check the validity of the navigation state.

Parameters
argsThe navigation arguments
stateThe navigation state to check
loggerThe logger
Returns
True if the state is valid, false otherwise

Reimplemented from Acts::INavigationPolicy.

◆ popState()

void Acts::Experimental::FrustumNavigationPolicy::popState ( NavigationPolicyStateManager & stateManager,
const Logger & logger ) const
overridevirtual

Remove the state from the state manager.

Parameters
stateManagerThe state manager to pop the state from
loggerThe logger

Reimplemented from Acts::INavigationPolicy.