Optical physics¶
As with EM physics, the optical physics models in Celeritas are closely related to those in Geant4. Unlike Geant4, optical photon generation and stepping in Celeritas takes place in a drastically different manner. Fig. 2 depicts the creation of optical photons in the optical tracking loop as a flowchart.

Fig. 2 Creation of optical photons in the optical tracking loop.¶
Optical materials¶
Each “physics material” (i.e., a combination of material and physics options) can have an associated “optical material” (compatible with optical photons).
-
class MaterialParams : public celeritas::ParamsDataInterface<MaterialParamsData>¶
Manage properties for optical materials.
Each “physics material” (the combination of a geometry-specified material and a user-specified region) can map to a single optical material. Many materials—especially those in mechanical structures and components not optically connected to the detector—may have no optical properties at all.
Optical volume properties are imported from Geant4 into the
ImportData
container. Theceleritas::MaterialParams
class loads the mapping ofPhysMatId
toOptMatId
and makes it accessible via the main loop’s material view. By combining that with theGeoMaterialParams
which maps volumes toPhysMatId
, this class maps the geometry volumes to optical materials for use in the optical tracking loop.When surface models are implemented, surface properties will also be added to this class.
Geant4 integration¶
When importing from Geant4, each optical material corresponds to a single
G4MaterialPropertiesTable
that has a RINDEX
material property.
(It also provides a special case for water if no material table is associated,
allowing Rayleigh scattering by default by providing an isothermal
compressibility and assuming STP.)
Celeritas translates many Geant4 material properties into its internal physics input parameters. It also allows material-specific user configuration of Celeritas-only physics, using properties listed in the following table.
Name |
Description |
---|---|
|
Mean wavelength of the Gaussian scintillation peak [mm] |
|
Standard deviation of the Gaussian scintillation peak [mm] |
Offloading¶
During the main stepping loop, the celeritas::OpticalCollector
class adds a pre-step hook to store each track’s speed, position, time, and
material; at the end of the step, the track’s updated properties and
within-step energy distribution are used to “offload” optical photons by
generating distribution parameters to be sampled in the stepping loop. The
generator distribution data is analogous to the “genstep” data structure in
Opticks [Blyth, 2019].
-
class OpticalCollector¶
Generate and track optical photons.
This class is the interface between the main stepping loop and the photon stepping loop and constructs kernel actions for:
gathering the pre-step data needed to generate the optical distributions,
generating the scintillation and Cherenkov optical distributions at the end of the step, and
launching the photon stepping loop.
The photon stepping loop will then generate optical primaries.
The “collector” (TODO: rename?) will “own” the optical state data and optical params since it’s the only thing that launches the optical stepping loop.
- Todo:
This doesn’t do anything but set up the optical tracking loop: move to
setup
namespace
-
class CherenkovOffload¶
Sample the number of Cherenkov photons to be generated.
This populates the
GeneratorDistributionData
used by theCherenkovGenerator
to generate optical photons using post-step and cached pre-step data.The number of photons is sampled from a Poisson distribution with a mean
\[ \langle n \rangle = \ell_\text{step} \difd{N}{x} \]
-
class ScintillationOffload¶
Sample the number of scintillation photons to be generated.
This populates the
GeneratorDistributionData
used by theScintillationGenerator
to generate optical photons using post-step and cached pre-step data.The mean number of photons is a product of the energy deposition and a material-dependent yield fraction (photons per MeV). The actual number of photons sampled is determined by sampling:
for large (n > 10) mean yield, from a Gaussian distribution with a material-dependent spread, or
for small yields, from a Poisson distribution.
-
struct GeneratorDistributionData
Input data for sampling optical photons.
This contains all the data needed to sample optical photons directly generated by tracks in the main stepping loop.
Public Functions
-
inline explicit operator bool() const
Check whether the data are assigned.
-
inline explicit operator bool() const
Generating¶
Depending on the process that emitted a photon, the generator classes sample from the distribution of photons specified by the generator distribution to create optical photon initializers which are analogous to secondary particles in Geant4.
-
class CherenkovGenerator¶
Sample Cherenkov photons from a generator distribution.
Cherenkov radiation is emitted when a charged particle passes through a dielectric medium faster than the speed of light in that medium. Photons are emitted on the surface of a cone, with the cone angle, \( \theta \), measured with respect to the incident particle direction. As the particle slows down, the cone angle and the number of emitted photons decreases and the frequency of the emitted photons increases.
An incident charged particle with speed \( \beta \) will emit photons at an angle \( \theta \) given by \( \cos\theta = 1 / (\beta n) \) where \( n \) is the index of refraction of the matarial. The photon energy \( \epsilon \) is sampled from the PDF
\[ f(\epsilon) = \left[1 - \frac{1}{n^2(\epsilon)\beta^2}\right] \]
-
class ScintillationGenerator¶
Sample scintillation photons from optical property data and step data.
The optical photons are generated evenly along the step and are emitted uniformly over the entire solid angle with a random linear polarization. The photon energy is calculated by the scintillation emission wavelength
\[ E = \frac{hc}{\lambda}, \]Note
This performs the same sampling routine as in G4Scintillation class of the Geant4 release 11.2 with some modifications.
Volumetric processes¶
Like other particles, optical photons undergo stochastic interactions inside optical materials.
+.. doxygenclass:: celeritas::optical::AbsorptionInteractor +.. doxygenclass:: celeritas::optical::RayleighInteractor +.. doxygenclass:: celeritas::optical::MieInteractor +.. doxygenclass:: celeritas::optical::WaveLengthShiftInteractor
-
class RayleighMfpCalculator¶
Calculate the Rayleigh MFP for a given set of material properties.
Uses the Einstein-Smoluchowski formula to calculate the mean free path at a given energy. In [Landau and L\'ıfsh\'ıts, 1884] , the mean free path is given by equation (120.2):
\[ l^{-1} = \frac{1}{6\pi} k^4 \rho k_B T \left(\frac{\partial \rho}{\partial P}\right)_T \left(\frac{\partial \varepsilon}{\partial \rho}\right)_T^2 \]\[ \left(\frac{\partial \rho}{\partial P}\right)_T = \rho \beta_T. \]\[ \frac{\varepsilon - 1}{\varepsilon + 2} = A \rho \]\[ \left(\frac{\partial \varepsilon}{\partial \rho}\right)_T = \frac{(\varepsilon - 1)(\varepsilon + 2)}{3\rho}. \]\[ l^{-1} = \frac{k_B T \beta_T}{6\pi} \left(\frac{E}{\hbar c}\right)^4 \left[ \frac{(\varepsilon - 1)(\varepsilon + 2)}{3} \right]^2. \]The scale factor is a unitless user customizable factor that is multiplied to the inverse MFP.
Surface processes¶
Optical photons also have special interactions at material boundaries, specified by user-provided surface properties. Users can define “boundary” and “interface” surfaces representing, respectively, the entire boundary of a volume (all points where it touches the parent or child volumes) and the common face between two adjacent volume instances. See Geometry for a discussion of these definitions and Geant4 geometry for their translation from Geant4.
-
class VolumeSurfaceSelector¶
Retrieve the surface ID between two volume instances.
Given (old, new) physical volumes P0, P1 corresponding to logical volumes L0, L1
Ordered (P0, P1) interface surface
Boundary surface of L0
Boundary surface of L1
This behavior differs from Geant4’s order of precedence, which considers if there’s a mother-daughter relation between L0 and L1 when both have a boundary surface:
Ordered (P0, P1) interface surface
Boundary surface of L1 if it’s the daughter of L0
Boundary surface of L0
Boundary surface of L1
When multiple layers are implemented, this selector will be responsible for determining the ordering of the layers between the volumes, including both interface and boundary surfaces.
Surface normals are defined by the track position in the geometry. Corrections may be applied to the geometric surface normal by sampling from a “microfacet distribution” to account for the roughness of the surface.
-
class SmearRoughnessSampler¶
Sample a facet normal from a smear roughness model.
The smear roughness model is parameterized by a single roughness value in [0,1] where:
0 roughness is polished (specular spike reflection)
1 roughness is rough (diffuse reflection)
A smear direction is uniformly sampled within a sphere of radius 1, which is then scaled by the roughness parameter and added to the global normal.
-
class GaussianRoughnessSampler¶
Sample a facet normal from a Gaussian roughness model.
The Gaussian roughness model was introduced in Levin and Moisan [1996] . The “facet slope”, an angle \( \alpha \) along a linear slice of a crystal surface, is approximated as a normal distribution standard deviation \( \sigma_\alpha \) . (The paper justifies this distribution based on surface roughness measurements with a bismuth germanate [BGO] crystal.) Assuming an azimuthally isotropic surface, the polar distribution must be expressed in terms of the tilt \( \theta \). The Jacobian factor for spherical coordinates contributes a \( \sin \theta \) term, leading to the spherical PDF
\[ p(\sigma_\alpha; \theta,\phi) = \frac{1}{2\pi}\,\frac{1}{\mathcal N}\, \exp\!\left(-\frac{\theta^{2}}{2\sigma_\alpha^{2}}\right)\sin\theta \,. \]The polar angle \( \theta \) is sampled using rejection:
Draw \( \alpha \) from the positive half of a normal distribution
Reject angles greater than 90 degrees (for physicality) or 4 sigma (for sampling efficiency)
Use an acceptance function \( \sin \theta \) bounded by the maximum theta
The extra limitation of the angle being less than 4 sigma reduces the rejection fraction by a factor of ~25 for smooth crystals (sigma = 0.01).