Celeritas 0.6.0-47+develop.b3cbb238
|
Helper functions for physics step processing. More...
#include "corecel/Assert.hh"
#include "corecel/Types.hh"
#include "corecel/cont/Range.hh"
#include "corecel/math/Algorithms.hh"
#include "corecel/math/NumericLimits.hh"
#include "corecel/random/distribution/GenerateCanonical.hh"
#include "corecel/random/distribution/Selector.hh"
#include "celeritas/Types.hh"
#include "celeritas/grid/EnergyLossCalculator.hh"
#include "celeritas/grid/InverseRangeCalculator.hh"
#include "celeritas/grid/RangeCalculator.hh"
#include "celeritas/grid/SplineCalculator.hh"
#include "celeritas/grid/XsCalculator.hh"
#include "celeritas/mat/MaterialTrackView.hh"
#include "ParticleTrackView.hh"
#include "PhysicsStepView.hh"
#include "PhysicsTrackView.hh"
Helper functions for physics step processing.
|
inline |
Calculate mean energy loss over the given "true" step length.
Stopping power is an integral over low-exiting-energy secondaries. Above some threshold energy T_c we treat exiting secondaries discretely; below it, we lump them into this continuous loss term that varies based on the energy, the atomic number density, and the element number:
\[ \difd{E}{x} = N_Z \int_0^{T_c} \frac{d \sigma_Z(E, T)}{dT} T \dif T \]
Here, the cross section is a function of the primary's energy E and the exiting secondary energy T.
The stopping range R due to these low-energy processes is an integral over the inverse of the stopping power: basically the distance that will take a particle (without discrete processes at play) from its current energy to an energy of zero.
\[ R = \int_0 ^{E_0} - \difd{E}{x} \dif E . \]
Zero energy loss can occur in the following cases:
|
inline |
Calculate physics step limits based on cross sections and range limiters.
Processes with integral cross section rejection calculate an estimated "maximum" over the step: see PhysicsTrackView.calc_max_xs .
|
inline |
Sample the process for the discrete interaction.
If the particle has changed energy over the step by continuous energy loss, and the process supports integral cross section rejection, then the cross section is recalculated with the new energy. The collision is sampled based by rejection sampling with the updated cross section.
CELER_FUNCTION ActionId celeritas::select_discrete_interaction | ( | MaterialView const & | material, |
ParticleTrackView const & | particle, | ||
PhysicsTrackView const & | physics, | ||
PhysicsStepView & | pstep, | ||
Engine & | rng | ||
) |
Choose the physics model for a track's pending interaction.