Celeritas  0.5.0-57+aeecb15
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
celeritas::Interaction Struct Reference

Change in state due to an interaction. More...

#include <Interaction.hh>

Public Types

enum class  Action { scattered , absorbed , unchanged , failed }
 Interaction result category. More...
 

Public Member Functions

CELER_FUNCTION bool changed () const
 Whether the state changed but did not fail.
 

Static Public Member Functions

static CELER_FUNCTION Interaction from_failure ()
 Indicate a failure to allocate memory for secondaries.
 
static CELER_FUNCTION Interaction from_absorption ()
 Construct an interaction from a particle that was totally absorbed.
 
static CELER_FUNCTION Interaction from_unchanged ()
 Construct an interaction for edge cases where there is no state change.
 

Public Attributes

units::MevEnergy energy
 Post-interaction energy.
 
Real3 direction
 Post-interaction direction.
 
Span< Secondarysecondaries
 Emitted secondaries.
 
units::MevEnergy energy_deposition {0}
 Energy loss locally to material.
 
Action action {Action::scattered}
 Flags for interaction result.
 

Detailed Description

Change in state due to an interaction.

Member Enumeration Documentation

◆ Action

Interaction result category.

Enumerator
scattered 

Still alive, state has changed.

absorbed 

Absorbed or transformed to another particle type.

unchanged 

No state change, no secondaries.

failed 

Ran out of memory during sampling.


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