Celeritas 0.7.0-dev.242+develop.62c3034b
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::SimTrackView Class Reference

Simulation properties for a single track. More...

#include <SimTrackView.hh>

Public Types

Type aliases
using SimParamsRef = NativeCRef< SimParamsData >
 
using SimStateRef = NativeRef< SimStateData >
 
using Initializer_t = SimTrackInitializer
 
using Energy = units::MevEnergy
 

Public Member Functions

 SimTrackView (SimParamsRef const &params, SimStateRef const &states, TrackSlotId tid)
 Construct from persistent and local data.
 
SimTrackViewoperator= (Initializer_t const &other)
 Initialize the particle.
 
void add_time (real_type delta)
 Add the time change over the step.
 
void increment_num_steps ()
 Increment the total number of steps.
 
void update_looping (bool)
 Update the number of steps this track has been looping.
 
bool is_looping (ParticleId, Energy)
 Whether the looping track should be abandoned.
 
void status (TrackStatus)
 Set whether the track is active, dying, or inactive.
 
void reset_step_limit ()
 Reset step limiter at the beginning of a step.
 
void reset_step_limit (StepLimit const &sl)
 Reset step limiter at the beginning of a step.
 
bool step_limit (StepLimit const &sl)
 Limit the step by this distance and action.
 
TrackId track_id () const
 Unique track identifier.
 
PrimaryId primary_id () const
 Originating primary identifier.
 
TrackId parent_id () const
 Track ID of parent.
 
EventId event_id () const
 Event ID.
 
size_type num_steps () const
 Total number of steps taken by the track.
 
size_type num_looping_steps () const
 Number of steps taken by the track since it was flagged as looping.
 
real_type time () const
 Time elapsed in the lab frame since the start of the event [s].
 
TrackStatus status () const
 Whether the track is inactive, alive, or being killed.
 
real_type step_length () const
 Get the current limiting step.
 
real_type weight () const
 Get the weight.
 
void step_length (real_type length)
 Update the current limiting step.
 
ActionId post_step_action () const
 Access post-step action to take.
 
void post_step_action (ActionId action)
 Force the limiting action to take.
 
ActionId along_step_action () const
 Access along-step action to take.
 
void along_step_action (ActionId action)
 Update along-step action to take.
 
LoopingThreshold constlooping_threshold (ParticleId) const
 Particle-dependent parameters for killing looping tracks.
 
size_type max_steps () const
 Maximum number of steps before killing the track.
 

Detailed Description

Simulation properties for a single track.

TODO: refactor "reset_step_limit" and the along/post-step action setters to validate that setting a new action may only increase the ID (if it's explicit) and can only reduce the step limit. See StatusCheckExecutor . Maybe we also need to reconsider having separate along- and post-step action IDs: perhaps find a way to have a "step limit action" and a "next action"?

Member Function Documentation

◆ post_step_action()

void celeritas::SimTrackView::post_step_action ( ActionId  action)
inline

Force the limiting action to take.

This is used by intermediate kernels (such as discrete_select_track ) that dispatch to another kernel action before the end of the step without changing the step itself.

◆ reset_step_limit()

void celeritas::SimTrackView::reset_step_limit ( StepLimit const sl)
inline

Reset step limiter at the beginning of a step.

The action can be unset if and only if the step is infinite.

◆ step_limit()

bool celeritas::SimTrackView::step_limit ( StepLimit const sl)
inline

Limit the step by this distance and action.

If the step limits are the same, the original action is retained.

Returns
Whether the given limit is the new limit.

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