|
Celeritas 0.7-develop+0ab295a
|
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 ¶ms, SimStateRef const &states, TrackSlotId tid) | |
| Construct from persistent and local data. | |
| SimTrackView & | operator= (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. | |
| size_type | generation () const |
| Number of generations since the track's ancestor was offloaded. | |
| 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 const & | looping_threshold (ParticleId) const |
| Particle-dependent parameters for killing looping tracks. | |
| size_type | max_steps () const |
| Maximum number of steps before killing the track. | |
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"?
|
inline |
Number of generations since the track's ancestor was offloaded.
This is zero for a primary, i.e. a track given to Celeritas (e.g., offloaded from Geant4), and one more than its parent for a secondary. A track that leaves Celeritas (e.g., is handed back to Geant4) and is offloaded again becomes a new primary and restarts at zero, so this is the generation since the latest offload, not the generation in the full event history.
Integrations use it to recognize secondaries of the offloaded track itself (generation 1), whose parent the host application knows by its original (e.g., Geant4) identity rather than by its Celeritas track ID.
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 limiter at the beginning of a step.
The action can be unset if and only if the step is infinite.
Limit the step by this distance and action.
If the step limits are the same, the original action is retained.