Celeritas 0.6.0-2+develop.96611fab
|
#include "corecel/Assert.hh"
#include "corecel/random/distribution/Selector.hh"
#include "ParticleTrackView.hh"
#include "PhysicsTrackView.hh"
Functions | |
CELER_FUNCTION StepLimit | celeritas::optical::calc_physics_step_limit (ParticleTrackView const &particle, PhysicsTrackView &physics) |
Calculate the discrete physics step limit for the given track. | |
template<class Engine > | |
CELER_FUNCTION ActionId | celeritas::optical::select_discrete_interaction (ParticleTrackView const &particle, PhysicsTrackView const &physics, Engine &rng) |
Randomly sample a discrete interaction by their cross sections. | |
|
inline |
Calculate the discrete physics step limit for the given track.
The total cross section is cached in the PhysicsTrackView
.
CELER_FUNCTION ActionId celeritas::optical::select_discrete_interaction | ( | ParticleTrackView const & | particle, |
PhysicsTrackView const & | physics, | ||
Engine & | rng | ||
) |
Randomly sample a discrete interaction by their cross sections.
Should be performed after discrete select action has reset the MFP, and the macroscopic cross sections have been built.