Celeritas 0.6.0-rc.2.10+develop.de0a3a05
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::XsCalculator Class Reference

Find and interpolate scaled cross sections. More...

#include <XsCalculator.hh>

Public Types

Type aliases
using Energy = RealQuantity< XsGridRecord::EnergyUnits >
 
using Values = Collection< real_type, Ownership::const_reference, MemSpace::native >
 

Public Member Functions

CELER_FUNCTION XsCalculator (XsGridRecord const &grid, Values const &reals)
 Construct from cross section data.
 
CELER_FUNCTION real_type operator() (Energy energy) const
 Calculate the cross section using linear or spline interpolation.
 
CELER_FUNCTION Energy energy_min () const
 Get the minimum energy.
 
CELER_FUNCTION Energy energy_max () const
 Get the maximum energy.
 

Detailed Description

Find and interpolate scaled cross sections.

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.

XsCalculator calc_xs(grid, params.reals);
real_type xs = calc_xs(particle.energy());
Find and interpolate scaled cross sections.
Definition XsCalculator.hh:50
double real_type
Numerical type for real numbers.
Definition corecel/Types.hh:34

The documentation for this class was generated from the following file: