Celeritas
0.5.0-56+6b053cd
|
Find and interpolate scaled cross sections on a uniform log grid. More...
#include <XsCalculator.hh>
Public Types | |
Type aliases | |
using | Energy = Quantity< XsGridData::EnergyUnits > |
using | Values = Collection< real_type, Ownership::const_reference, MemSpace::native > |
Public Member Functions | |
CELER_FUNCTION | XsCalculator (XsGridData const &grid, Values const &values) |
Construct from cross section data. | |
CELER_FUNCTION real_type | operator() (Energy energy) const |
Calculate the cross section. More... | |
CELER_FUNCTION real_type | operator[] (size_type index) const |
Get the cross section at the given index. | |
CELER_FUNCTION Energy | energy_min () const |
CELER_FUNCTION Energy | energy_max () const |
Find and interpolate scaled cross sections on a uniform log grid.
This cross section calculator uses the same representation and interpolation as Geant4's physics tables for EM physics:
This scaling and interpolation exactly reproduces functions \( f(E) \sim a E + b \) below the E' threshold and \( f(E) \sim \frac{a'}{E} + b' \) above that threshold.
Note that linear interpolation is applied with energy points, not log-energy points.
|
inline |
Calculate the cross section.
If needed, we can add a "log(energy/MeV)" accessor if we constantly reuse that value and don't want to repeat the std::log
operation.