Celeritas 0.7.0-dev.127+develop.e63889793
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
celeritas::optical::SurfaceTraversalView Class Reference

Manage one-dimensional logic for traversing an optical surface. More...

#include <SurfaceTraversalView.hh>

Classes

struct  Initializer
 

Public Types

Type aliases
using SurfaceParamsRef = NativeCRef< SurfacePhysicsParamsData >
 
using SurfaceStateRef = NativeRef< SurfacePhysicsStateData >
 

Public Member Functions

CELER_FUNCTION SurfaceTraversalView (SurfaceParamsRef const &, SurfaceStateRef const &, TrackSlotId)
 Create view from surface physics data and state for a given track.
 
CELER_FUNCTION SurfaceTraversalViewoperator= (Initializer const &)
 Initialize track state with given initializer data.
 
CELER_FUNCTION bool in_pre_volume () const
 Whether the track is in the pre-volume.
 
CELER_FUNCTION bool in_post_volume () const
 Whether the track is in the post-volume.
 
CELER_FUNCTION bool is_exiting () const
 Whether the current track direction is exiting the surface.
 
CELER_FUNCTION bool is_exiting (SubsurfaceDirection) const
 Whether the direction is exiting the surface.
 
CELER_FUNCTION SurfaceTrackPosition pos () const
 Current position of the track in the sub-surfaces, in track-local coordinates.
 
CELER_FUNCTION SurfaceTrackPosition next_pos () const
 
CELER_FUNCTION void pos (SurfaceTrackPosition)
 Set current position of the track in the sub-surfaces, in track-local coordinates.
 
CELER_FUNCTION SurfaceTrackPosition::size_type num_positions () const
 Get number of valid track positions in the surface.
 
CELER_FUNCTION SubsurfaceDirection dir () const
 Get current track traversal direction.
 
CELER_FUNCTION void dir (SubsurfaceDirection)
 Set current track traversal direction.
 
CELER_FUNCTION void cross_interface (SubsurfaceDirection)
 Cross the subsurface interface in the given direction.
 

Detailed Description

Manage one-dimensional logic for traversing an optical surface.

Member Function Documentation

◆ dir()

CELER_FUNCTION SubsurfaceDirection celeritas::optical::SurfaceTraversalView::dir ( ) const
inline

Get current track traversal direction.

This quantity is cached for a single loop of surface boundary crossing to avoid repeated queries of the geometry. The traversal direction should be updated when the geometry direction is updated after an interaction.

◆ num_positions()

CELER_FUNCTION SurfaceTrackPosition::size_type celeritas::optical::SurfaceTraversalView::num_positions ( ) const
inline

Get number of valid track positions in the surface.

This is equivalent to the number of interstitial sub-surface materials, plus the pre-volume and post-volumes.

Todo:
Check if caching this would improve performance over redirections.

◆ pos()

CELER_FUNCTION SurfaceTrackPosition celeritas::optical::SurfaceTraversalView::pos ( ) const
inline

Current position of the track in the sub-surfaces, in track-local coordinates.

Tracks traverse a surface in track-local coordinates where 0 is the pre-volume and N is the post-volume. Depending on the surface orientation, this will be mapped to the appropriate sub-surface material and interface.


The documentation for this class was generated from the following file: