Physics

Note

For discussion of model and process naming, see issue 1562 .

The selection and data used to create physics classes will be defined underneath this struct.

struct Physics

Set up physics options.

Todo:

Move optical and hadronic physics options from celeritas::GeantPhysicsOptions

Move particle data from celeritas::ImportParticle

Add function for injecting user processes for celeritas::PhysicsParams

Todo:

How to better group these, especially when adding hadronic/photonuclear/decay/…?

Public Members

EmPhysics em

Physics that applies to offloaded EM particles.

OpticalPhysics optical

Physics for optical photons.

Electromagnetic

struct EmPhysics

Electromagnetic physics processes and options.

Todo:

The ProcessBuilder is the “general” process builder type and should be refactored once import data is moved into the inp classes. The user_processes can be set externally or via FrameworkInput.geant.ignore_processes.

Public Members

BremsstrahlungProcess brems

Bremsstrahlung process.

PairProductionProcess pair_production

Electron+positron pair production process.

PhotoelectricProcess photoelectric

Photoelectric effect.

AtomicRelaxation atomic_relaxation

Atomic relaxation.

ProcessBuilderMap user_processes

Add custom user processes.

Optical

Optical photon _generation_ is a part of the standard stepping loop that manages EM, decay, and hadronic physics, but its _transport_ has its own separate stepping loop, where surface physics is the most complex part. Therefore, the OpticalPhysics input includes optical photon _generation_ processes (such as Cherenkov and scintillation) and surface physics information. The latter describing how optical photons should interact with it.

struct OpticalPhysics

Optical physics processes, options, and surface definitions.

Todo:

Move cherenkov/scintillation to a OpticalGenPhysics class.

Optical photon generation from EM particles

Todo:

Replace with physics input data

bool cherenkov = {false}

Generate Cherenkov photons.

bool scintillation = {false}

Generate scintillation photons.

Public Functions

inline explicit operator bool() const

Whether optical physics is enabled.

Todo:

Move optical bulk models here

Celeritas’ surface physics implementation is designed differently from Geant4 and is meant to reduce code complexity and improve extensibility. In Geant4, a single model (e.g. “unified”) is a hard-coded combination of:

  • surface roughness types (e.g., polished or Gaussian),

  • reflectivity calculation (whether to use a grid or not), and

  • interaction description (e.g. dielectric-dielectric).

Celeritas separates these out into fully configurable surface physics inputs, so that a given surface ID must be present in three separate surface models. This “model unfolding” leads to a less simple input definition compared to Geant4, but it allows for user-extensible surface physics models.

struct SurfacePhysics

Surface physics definition.

Maps all optical surfaces with interaction models and surface parameters.

Interstitial materials are the interstitial materials per geometric surface. The last entry is used as the default surface.

Todo:

rename OpticalSurfacePhysics

Public Members

RoughnessModels roughness

Microfacet distribution models.

ReflectivityModels reflectivity

Reflectivity models.

InteractionModels interaction

Reflection+refraction+absorption models.

Reflection

struct GridReflection

Model reflectivity as a user-prescribed function of energy.

The grid can also be used to represent a constant reflectivity.

Public Members

Grid reflectivity

Reflectivity values [MeV -> unitless].

Processes

struct BremsstrahlungProcess

Construct a physics process for bremsstrahlung.

Public Functions

inline explicit operator bool() const

TODO: macroscopic xs tables.

Whether process has data and is to be used

Public Members

SeltzerBergerModel sb

Lower-energy electron/positron.

RelBremsModel rel

High-energy electron/positron.

MuBremsModel mu

Muon (-/+)

struct PairProductionProcess

Construct a physics process for electron/positron pair production.

Public Functions

inline explicit operator bool() const

Whether process has data and is to be used.

Public Members

BetheHeitlerProductionModel bethe_heitler

Pair production from gammas.

MuPairProductionModel mu

Pair production from muons.

struct PhotoelectricProcess

Construct a physics process for photoelectric effect.

Public Functions

inline explicit operator bool() const

Whether process has data and is to be used.

struct AtomicRelaxation

Emit fluorescence photons/auger electrons from atomic de-excitation.

Todo:

Since multiple processes can cause the loss of a bound electron, we should have a separate “deexcitation” process that manages this efficiently. (Or perhaps a “generator” class to emit many simultaneously.)

Public Functions

inline explicit operator bool() const

True if data is assigned.

Public Members

std::map<AtomicNumber, ImportAtomicRelaxation> atomic_xs

Differential cross sections [(log MeV, unitless) -> millibarn].

Models

struct SeltzerBergerModel

Seltzer-Berger bremsstrahlung model.

Public Functions

inline explicit operator bool() const

TODO: microscopic elemental xs tables.

Whether model has data and is to be used

Public Members

std::map<AtomicNumber, inp::TwodGrid> atomic_xs

Differential cross sections [(log MeV, unitless) -> millibarn].

struct RelBremsModel

Relativistic bremsstrahlung model.

Public Functions

inline explicit operator bool() const

Whether model has data and is to be used.

Public Members

bool enable_lpm = {true}

Account for LPM effect at very high energies.

struct MuBremsModel

Muon bremsstrahlung model.

Public Functions

inline explicit operator bool() const

Whether model has data and is to be used.

struct BetheHeitlerProductionModel

Bethe-Heitler relativistic pair production from gammas.

Public Functions

inline explicit operator bool() const

Whether model has data and is to be used.

struct MuPairProductionModel

Pair production from muons.

Public Functions

inline explicit operator bool() const

True if data is assigned.

Public Members

MuPairProductionEnergyTransferTable muppet_table

Grid for sampling the energy of the electron-positron.

struct LivermorePhotoModel

Livermore photoelectric effect model.

Public Functions

inline explicit operator bool() const

Whether model has data and is to be used.

Public Members

std::map<AtomicNumber, LivermoreXs> atomic_xs

Tabulated microsopic cross sections [MeV -> b].

Grids

Tabulated physics data such as cross sections or energy loss are stored on increasing, sorted 1D or 2D grids. Both linear and spline interpolation are supported.

struct Grid

A grid of increasing, sorted 1D data.

This is used to store tabulated physics data such as cross sections or energy loss.

Public Static Functions

static inline Grid from_constant(double y)

Construct a grid with a constant value for all real numbers.

struct UniformGrid

A uniform grid of increasing, sorted 1D data.

struct TwodGrid

An increasing, sorted 2D grid with node-centered data.

Data is interpolated linearly and indexed as ‘[x][y]’.

struct Interpolation

Interpolation options for the physics grids.

order is only used for poly_spline interpolation and bc is only used for cubic_spline interpolation.

Todo:

Let’s just use “Geant4 spline” and linear interpolation, and maybe it shouldn’t be inside every single grid?

Public Members

size_type order = {1}

Polynomial order for spline interpolation.

BC bc = {BC::geant}

Boundary conditions for calculating cubic spline second derivatives.