Celeritas
0.5.0-86+4a8eea4
|
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 "celeritas/Types.hh"
#include "celeritas/grid/EnergyLossCalculator.hh"
#include "celeritas/grid/InverseRangeCalculator.hh"
#include "celeritas/grid/RangeCalculator.hh"
#include "celeritas/grid/SplineXsCalculator.hh"
#include "celeritas/grid/XsCalculator.hh"
#include "celeritas/mat/MaterialTrackView.hh"
#include "celeritas/random/Selector.hh"
#include "celeritas/random/distribution/GenerateCanonical.hh"
#include "ParticleTrackView.hh"
#include "PhysicsStepView.hh"
#include "PhysicsTrackView.hh"
Functions | |
CELER_FUNCTION StepLimit | celeritas::calc_physics_step_limit (MaterialTrackView const &material, ParticleTrackView const &particle, PhysicsTrackView &physics, PhysicsStepView &pstep) |
Calculate physics step limits based on cross sections and range limiters. More... | |
CELER_FUNCTION ParticleTrackView::Energy | celeritas::calc_mean_energy_loss (ParticleTrackView const &particle, PhysicsTrackView const &physics, real_type step) |
Calculate mean energy loss over the given "true" step length. More... | |
template<class Engine > | |
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. More... | |
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:
\[ \frac{dE}{dx} = N_Z \int_0^{T_c} \frac{d \sigma_Z(E, T)}{dT} T dT \]
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} - \frac{dx}{dE} dE . \]
Both Celeritas and Geant4 approximate the range limit as the minimum range over all processes, rather than the range as a result from integrating all energy loss processes over the allowed energy range. This is usually not a problem in practice because the range will get automatically decreased by range_to_step
, and the above range calculation neglects energy loss by discrete processes.
Both Geant4 and Celeritas integrate the energy loss terms across processes to get a single energy loss vector per particle type. The range table is an integral of the mean stopping power: the total distance for the particle's energy to reach zero.
Zero energy loss can occur in the following cases:
|
inline |
Calculate physics step limits based on cross sections and range limiters.
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.