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.

Here is a flowchart depicting the creation of optical photons in the optical tracking loop:

        flowchart TB
  gun["Gun or external"]
  geant4-direct["Direct Geant4 offload"]
  geant4-scint["Geant4 scintillation"]
  geant4-ceren["Geant4 cerenkov"]

  classDef not-impl stroke-width:2px,stroke-dasharray: 5 5
  class geant4-direct,geant4-scint,geant4-ceren not-impl

  subgraph main-celeritas-loop["Main celeritas loop"]
    offload-gather
    scintillation-offload
    cerenkov-offload
  end

  offload-gather -->|pre-step| scintillation-offload
  offload-gather -->|pre-step| cerenkov-offload

  subgraph photon-gen["Optical photon generation"]
    scintillation-gen
    cerenkov-gen
  end

  scintillation-offload -->|generator dist| scintillation-gen
  cerenkov-offload -->|generator dist| cerenkov-gen
  geant4-scint -->|generator dist| scintillation-gen
  geant4-ceren -->|generator dist| cerenkov-gen


  photons["Optical tracking loop"]
  gun -->|inits| photons

  geant4-direct -->|inits| photons
  scintillation-gen -->|inits| photons
  cerenkov-gen -->|inits| photons
    

Optical materials

Each “physics material” (see celeritas::ImportPhysMaterial) can have an associated “optical material.” When importing from Geant4, each optical material corresponds to a single “geometry material” (see celeritas::ImportGeoMaterial) that has a RINDEX material property, and all physical materials that use the geometry material share the same optical material.

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&#8212;especially those in mechanical structures and components not optically connected to the detector&#8212;may have no optical properties at all.

Optical volume properties are imported from Geant4 into the ImportData container. The celeritas::MaterialParams class loads the mapping of MaterialId to OpticalMaterialId and makes it accessible via the main loop’s material view. By combining that with the GeoMaterialParams which maps volumes to MaterialId, 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.

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.

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 Cerenkov 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:

Rename to OpticalOffload

class CerenkovOffload

Sample the number of Cerenkov photons to be generated.

This populates the GeneratorDistributionData used by the CerenkovGenerator 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} \]
where \( \ell_\text{step} \) is the step length.

class ScintillationOffload

Sample the number of scintillation photons to be generated.

This populates the GeneratorDistributionData used by the ScintillationGenerator 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.

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 CerenkovGenerator

Sample Cerenkov photons from the given distribution.

Cerenkov 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}, \]
where \( h \) is the Planck constant and \( c \) is the speed of light, and \( \lambda \) is sampled by the normal distribution with the mean of scintillation emission spectrum and the standard deviation. The emitted time is simulated according to empirical shapes of the material-dependent scintillation time structure with one or double exponentials.

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.

class AbsorptionModel : public celeritas::optical::Model

Set up and launch the optical absorption model interaction.

class RayleighModel : public celeritas::optical::Model

Set up and launch the optical Rayleigh scattering model interaction.

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 Lifshitz Electrodynamics of Continuous Media, 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 \]
where we only consider density fluctations at constant temperature. The first partial derivative may be rewritten in terms of the isothermal compressibility \( \beta_T \):
\[ \left(\frac{\partial \rho}{\partial P}\right)_T = \rho \beta_T. \]
The latter partial derivative may be calculated via the Clausius-Mossetti equation
\[ \frac{\varepsilon - 1}{\varepsilon + 2} = A \rho \]
for constant \( A \), giving
\[ \left(\frac{\partial \varepsilon}{\partial \rho}\right)_T = \frac{(\varepsilon - 1)(\varepsilon + 2)}{3\rho}. \]
The final equation for the MFP in terms of energy:
\[ 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’s multiplied to the inverse MFP.

Surface processes

Optical photons also have special interactions at material boundaries. These boundaries are imported from Geant4 using the “skin” definitions that specify properties of a volume’s outer surface or of the surface between two specific volumes.

Imported data

In addition to the core Imported data, these import parameters are used to provide cross sections, setup options, and other data to the optical physics.

struct ImportOpticalModel

Imported data for an optical physics model.

struct ImportOpticalMaterial

Store optical material properties.

Todo:

boolean for enabling cerenkov in the material??

struct ImportOpticalParameters

TODO: Placeholder for optical parameter data.

See G4OpticalParameters .

struct ImportOpticalProperty

Store common optical material properties.

struct ImportOpticalRayleigh

Store optical material properties for Rayleigh scattering.

The isothermal compressibility is used to calculate the Rayleigh mean free path if no mean free paths are provided.

struct ImportScintComponent

Store basic properties for different scintillation component types.

Fast/intermediate/slow/etc scintillation components can be used for both particle- and material-dependent spectra, as well as material-only spectra.

struct ImportScintData

Store optical properties for scintillation.

struct ImportParticleScintSpectrum

Store per-particle material scintillation spectrum information.

The yield vector is the only necessary element, needed to calculate the yield based on the particle energy-loss during the stepping loop. Components may not be assigned&#8212;they are the equivalent of k[Particle]ScintillationYield[i] in G4MaterialPropertiesIndex.hh

struct ImportMaterialScintSpectrum

Store material-only scintillation spectrum information.

In contrast to Geant4, we can have an arbitrary number of components for scintillation spectra.

struct ImportWavelengthShift

Store optical photon wavelength shifting properties.

The component vector represents the relative population as a function of the re-emission energy. It is used to define an inverse CDF needed to sample the re-emitted optical photon energy.