Celeritas 0.7.0-dev.529+develop.b0df1df8d
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
celeritas::VgBasicTrackView Class Reference

Wrap basic navigation functionality from VecGeom. More...

#include <VgBasicTrackView.hh>

Classes

class  LocalNav
 
struct  LocalNavData
 

Public Member Functions

 VgBasicTrackView (ParamsRef const &data, StateRef const &stateview, TrackSlotId tid)
 Construct from persistent and state data.
 
VgBasicTrackViewoperator= (Initializer_t const &init)
 Construct the state.
 
VolumeId volume_id () const
 
VolumeInstanceId volume_instance_id () const
 
VolumeLevelId volume_level () const
 
void volume_instance_id (Span< VolumeInstanceId > levels) const
 
template<class F >
void foreach_volume_path (F &&visit) const
 
ImplVolumeId impl_volume_id () const
 Get the volume ID in the current cell.
 
OpaquePath opaque_path () const
 After 'find_next_step', the next straight-line surface.
 
bool is_outside () const
 Whether the track is outside the valid geometry region.
 
bool is_on_boundary () const
 Whether the track is on the boundary of a volume.
 
bool failed () const
 Whether the last operation resulted in an error.
 
Real3 normal () const
 Get the surface normal of the boundary the track is currently on.
 
Propagation find_next_step (real_type max_step)
 Find the distance to the next geometric boundary.
 
real_type find_safety (real_type max_step)
 Find the safety at the current position up to a maximum distance.
 
void move_to_boundary (real_type step)
 Move to the next boundary but don't cross yet.
 
void move_internal (real_type step)
 Move within the current volume.
 
void move_internal (Real3 const &pos)
 Move within the current volume to a nearby point.
 
void cross_boundary ()
 Cross from one side of the current surface to the other.
 
void set_dir (Real3 const &newdir)
 Change the track's direction.
 

Type aliases

using Initializer_t = GeoTrackInitializer
 
using ParamsRef = NativeCRef< VecgeomParamsData >
 
using StateRef = NativeRef< FutureVecgeomStateData >
 
using NavView = vecgeom::NavView
 
using OpaquePath = NavView::OpaquePath
 
using real_type = vg_real_type
 
using ImplVolInstanceId = VgVolumeInstanceId
 
Real3 constpos () const
 
Real3 constdir () const
 

Detailed Description

Wrap basic navigation functionality from VecGeom.

This is a transitional interface between the more full-featured VecgeomTrackView and the new NavView that lives in VecGeom.

Removed
Example
VgBasicTrackView geom(vg_params_ref, vg_state_ref, trackslot_id);
Wrap basic navigation functionality from VecGeom.
Definition VgBasicTrackView.hh:59

Member Typedef Documentation

◆ ImplVolInstanceId

State accessors

◆ Initializer_t

State accessors

◆ NavView

State accessors

◆ OpaquePath

State accessors

◆ ParamsRef

State accessors

◆ real_type

State accessors

◆ StateRef

State accessors

Member Function Documentation

◆ cross_boundary()

void celeritas::VgBasicTrackView::cross_boundary ( )
inline

Cross from one side of the current surface to the other.

The position must be on the boundary following a move-to-boundary.

◆ dir()

Real3 const & celeritas::VgBasicTrackView::dir ( ) const
inline

State accessors

◆ find_safety()

real_type celeritas::VgBasicTrackView::find_safety ( real_type  max_radius)
inline

Find the safety at the current position up to a maximum distance.

The safety within a step is only needed up to the end of the physics step length.

◆ move_internal() [1/2]

void celeritas::VgBasicTrackView::move_internal ( Real3 const pos)
inline

Move within the current volume to a nearby point.

The caller must ensure that the position is "nearby" and within the same volume.

◆ move_internal() [2/2]

void celeritas::VgBasicTrackView::move_internal ( real_type  dist)
inline

Move within the current volume.

The straight-line distance must be less than the distance to the boundary.

◆ move_to_boundary()

void celeritas::VgBasicTrackView::move_to_boundary ( real_type  dist)
inline

Move to the next boundary but don't cross yet.

Note that, unlike the regular move_internal, we allow zero distance in this case since it results in a change in state (though that may allow a cycle).

◆ operator=()

VgBasicTrackView & celeritas::VgBasicTrackView::operator= ( Initializer_t const init)
inline

Construct the state.

If a valid parent ID is provided, the state is constructed from a direction and a copy of the parent state. This is a faster method of creating secondaries from a parent that has just been absorbed, or when filling in an empty track from a parent that is still alive.

Otherwise, the state is initialized from a starting location and direction, which is expensive.

◆ pos()

Real3 const & celeritas::VgBasicTrackView::pos ( ) const
inline

State accessors

◆ set_dir()

void celeritas::VgBasicTrackView::set_dir ( Real3 const newdir)
inline

Change the track's direction.

This happens after a scattering event or movement inside a magnetic field. It resets the calculated distance-to-boundary.


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