ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::TryAllNavigationPolicy Class Referencefinal

Policy which adds all candidates of the configured type to the stream. More...

#include <Acts/Navigation/TryAllNavigationPolicy.hpp>

Inheritance diagram for Acts::TryAllNavigationPolicy:
[legend]
Collaboration diagram for Acts::TryAllNavigationPolicy:
[legend]

Classes

struct  Config
 Configuration for the try-all navigation policy. More...

Public Member Functions

 TryAllNavigationPolicy (const GeometryContext &gctx, const TrackingVolume &volume, const Logger &logger)
 Constructor from a volume.
 TryAllNavigationPolicy (const GeometryContext &gctx, const TrackingVolume &volume, const Logger &logger, const Config &config)
 Constructor from a volume.
const Configconfig () const
 Constant access to config.
void connect (NavigationDelegate &delegate) const override
 Connect the policy to a navigation delegate.
void initializeCandidates (const GeometryContext &gctx, const NavigationArguments &args, NavigationPolicyState &state, AppendOnlyNavigationStream &stream, const Logger &logger) const
 Add all candidates to the stream.
Public Member Functions inherited from Acts::INavigationPolicy
virtual ~INavigationPolicy ()=default
 Virtual destructor so policies can be held through this base class.
virtual void createState (const GeometryContext &gctx, const NavigationArguments &args, NavigationPolicyStateManager &stateManager, const Logger &logger) const
 Create and initialize the state for this policy.
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 bool isValid (const GeometryContext &gctx, const NavigationArguments &args, NavigationPolicyState &state, const Logger &logger) const
 Check if the policy is in a valid state for navigation.
virtual void popState (NavigationPolicyStateManager &stateManager, const Logger &logger) const
 Remove the state for this policy from the state manager.
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

Policy which adds all candidates of the configured type to the stream.

Constructor & Destructor Documentation

◆ TryAllNavigationPolicy() [1/2]

Acts::TryAllNavigationPolicy::TryAllNavigationPolicy ( const GeometryContext & gctx,
const TrackingVolume & volume,
const Logger & logger,
const Config & config )

Constructor from a volume.

Parameters
gctxis the geometry context
volumeis the volume to navigate
loggeris the logger
configThe configuration for the policy

◆ TryAllNavigationPolicy() [2/2]

Acts::TryAllNavigationPolicy::TryAllNavigationPolicy ( const GeometryContext & gctx,
const TrackingVolume & volume,
const Logger & logger )

Constructor from a volume.

Parameters
gctxis the geometry context
volumeis the volume to navigate
loggeris the logger

Member Function Documentation

◆ config()

const Config & Acts::TryAllNavigationPolicy::config ( ) const

Constant access to config.

Returns
config

◆ connect()

void Acts::TryAllNavigationPolicy::connect ( NavigationDelegate & delegate) const
overridevirtual

Connect the policy to a navigation delegate.

Parameters
delegateis the navigation delegate

Implements Acts::INavigationPolicy.

◆ initializeCandidates()

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

Add all candidates to the stream.

Parameters
gctxis the geometry context
argsare the navigation arguments
stateis the navigation policy state
streamis the navigation stream to update
loggeris the logger