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

Optimized navigation policy for cylindrical volumes that intelligently selects which portals to add as candidates based on geometric analysis. More...

#include <Acts/Navigation/CylinderNavigationPolicy.hpp>

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

Public Member Functions

 CylinderNavigationPolicy (const GeometryContext &gctx, const TrackingVolume &volume, const Logger &logger)
 Constructor from a volume.
void connect (NavigationDelegate &delegate) const override
 Connect the policy to a navigation delegate.
void initializeCandidates (const GeometryContext &gctx, const NavigationArguments &args, AppendOnlyNavigationStream &stream, const Logger &logger) const
 Intelligently select and add portal candidates based on geometric analysis.
Public Member Functions inherited from Acts::INavigationPolicy
virtual ~INavigationPolicy ()=default
 Virtual destructor so policies can be held through this base class.
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 &, 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

Optimized navigation policy for cylindrical volumes that intelligently selects which portals to add as candidates based on geometric analysis.

This policy performs geometric calculations to determine which cylinder faces (inner/outer cylinder, positive/negative discs) are reachable from the current position and direction, avoiding unnecessary intersection calculations with unreachable portals.

Algorithm overview:

  1. Transform position/direction to volume-local coordinates
  2. Check disc intersection: If not parallel to z-axis, calculate intersection with appropriate disc (positive/negative based on direction) and verify if intersection point lies within the annular disc bounds
  3. Check inner cylinder intersection: Find point of closest approach to the z-axis in the xy-plane. If this point is closer than inner radius and lies within the forward ray direction, add inner cylinder as candidate
  4. Optimization: If both inner cylinder and disc are hit, compare their 3D distances along the ray. If the inner cylinder is closer, discard the disc candidate as it will be blocked and never reached
  5. Default fallback: If neither disc nor inner cylinder are hit, add outer cylinder as the target (particle will exit through outer boundary)

Constraints:

  • Only works with cylindrical volumes having non-zero inner radius
  • Requires exactly 4 portals (inner cylinder, outer cylinder, ±z discs)
  • Does not handle contained sub-volumes

Performance benefits:

  • Reduces intersection calculations by ~2-3x compared to trying all portals
  • Eliminates false positive intersections that would be filtered later

Constructor & Destructor Documentation

◆ CylinderNavigationPolicy()

Acts::CylinderNavigationPolicy::CylinderNavigationPolicy ( 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

◆ connect()

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

Connect the policy to a navigation delegate.

Parameters
delegateis the navigation delegate

Implements Acts::INavigationPolicy.

◆ initializeCandidates()

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

Intelligently select and add portal candidates based on geometric analysis.

The algorithm determines which portals are geometrically reachable:

  • Disc portals: Added if ray intersects the annular disc area
  • Inner cylinder: Added if ray's closest approach to z-axis is within inner radius
  • Outer cylinder: Added as fallback when no other portals are reachable
Parameters
gctxis the geometry context
argsare the navigation arguments containing position and direction
streamis the navigation stream to update with selected candidates
loggeris the logger for debugging output