Celeritas
0.5.0-86+4a8eea4
|
Make a weighted random selection of an element. More...
#include <TabulatedElementSelector.hh>
Public Types | |
Type aliases | |
using | Energy = Quantity< XsGridData::EnergyUnits > |
using | GridValues = Collection< ValueGrid, Ownership::const_reference, MemSpace::native > |
using | GridIdValues = Collection< ValueGridId, Ownership::const_reference, MemSpace::native > |
using | Values = Collection< real_type, Ownership::const_reference, MemSpace::native > |
Public Member Functions | |
CELER_FUNCTION | TabulatedElementSelector (ValueTable const &table, GridValues const &grids, GridIdValues const &ids, Values const &reals, Energy energy) |
Construct with xs CDF data for a particular model and material. | |
template<class Engine > | |
CELER_FUNCTION ElementComponentId | operator() (Engine &rng) const |
Sample the element with the given RNG. | |
Make a weighted random selection of an element.
This selects an elemental component (atom) of a material based on the precalculated cross section CDF tables of the elements in the material. Unlike ElementSelector
which calculates the microscopic cross sections on the fly, this interpolates the values using tabulated CDF grids.