Surface physics

Optical photons have special interactions at material boundaries, specified by user-provided surface properties or the adjacent bulk material properties.

class SurfacePhysicsParams : public celeritas::ParamsDataInterface<SurfacePhysicsParamsData>

Manage properties for optical surface physics.

Surface physics during boundary crossing is split into three actions.

  1. Initialize the boundary crossing (see Boundary initialization ).

  2. Apply surface physics models.

  3. If exiting the surface, the crossing or move into the previous volume (see Boundary crossing ).

The second action is broken down into sets of “internal” celeritas::optical::SurfaceModel classes categorized by a SurfacePhysicsOrder . These are called sequentially, with one model from each set applying to each track on a surface.

  1. Sample a local facet normal (see Roughness ).

  2. Select transmittance/reflectivity/absorption override (see Reflectivity ).

  3. Sample and perform reflection/refraction (see Interaction ).

Note

The developer documentation includes further details of the low-level Executor classes that performs these actions.

enum class celeritas::optical::SurfacePhysicsOrder

Ordering of surface physics boundary crossing models.

Values:

enumerator roughness

Sample a facet normal.

enumerator reflectivity

Select physics override.

enumerator interaction

Apply reflection and refraction.

enumerator size_

During surface crossing, tracks maintain a “within-surface state” that stores the current layer and direction, decoupling the geometry state from the material state.

class SurfaceTraversalView

Manage one-dimensional logic for traversing an optical surface.

Todo:

Add documentation and diagram

Boundary initialization

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.

Roughness

Surface normals are defined by the track position in the geometry. Corrections may be applied to the geometric (macroscopic) 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).

These samplers may use rejection based on the macroscopic surface normal.

template<class Calculator>
class EnteringSurfaceNormalSampler

Sample a valid facet normal by wrapping a roughness sampler.

Some facet normal calculators might not produce surface normals valid for optical physics surface crossings (see is_entering_surface ). This functor will construct and repeatedly sample the distribution until the track is exiting the sampled facet normal.

This uses a gaussian roughness distribution to accept only facets that have a direction where the track is exiting the sampled normal.

Example

EnteringSurfaceNormalSampler<GaussianRoughnessSampler> sample_facet{
    track.geometry().dir(),
    s_phys.global_normal(),
    data.sigma_alpha[sub_model_id]};
auto rng = track.rng();
s_phys.facet_normal(sample_facet(rng));

Reflectivity

To support custom overrides of standard surface physics, Geant4 allows surfaces to have user-defined grids which determine the frequency at which optical photons should bypass the surface. A transmittance value greater than zero allows photons to be transmitted across the surface without change, bypassing all surface interactions. A reflectivity value below one allows photons to be absorbed directly on the surface.

While Celeritas supports these grid-based overrides for Geant4 compatibility, similar effects for most use cases may be achieved by using Celeritas-specific roughness and interaction models without the need to specify dummy values.

class GridReflectivityModel : public celeritas::optical::SurfaceModel

User-defined grid reflectivity model.

Allows user-defined grids (probability as a function of energy) to override the usual surface physics logic. Following Geant4’s conventions, reflectivity is defined as the probability a track continues with the usual surface interaction (not necessarily just reflects). Transmittance is the probability the track moves to the next surface layer without any changes. If the reflectivity and transmittance do not sum to 1, then the remaining probability is the chance the track is absorbed on the surface.

If a track is absorbed on the surface and there’s a non-zero efficiency grid, it is sampled as the probability the track is “detected” on the surface. Because this is a hold-over from Geant4 integration, if the track is sampled to pass the efficiency then it is changed from absorbed to transmitted. If the next volume is indeed a detector volume, then it is detected and killed at the surface which matches Geant4’s expectation for detection on a surface.

Todo:

Refactor into a unified grid that at each point has the probability of forcing absorption (before entering a potential detector region) or transmission ?

class FresnelReflectivityModel : public celeritas::optical::SurfaceModel

Trivial reflectivity model.

All tracks at a surface crossing will undergo the surface interaction.

Todo:

Should the interaction “absorption vs reflection” calculation be performed here instead?

Interaction

Interactions are sampled from models describing the distributions of absorption, reflection, and refraction on the surface.

class FresnelCalculator

Helper class for calculating quantities for Fresnel equations.

Incident waves are decomposed into transverse-electric (TE) and transverse-magnetic (TM) polarizations. The interaction plane is defined as the span of the photon direction and the surface normal. The TE (TM) polarization has the electric (magnetic) field polarization transverse to the interaction plane. If the direction is parallel to the surface normal, then interaction plane is degenerate and the incident photon is defined to be entirely in the TE polarization.

This calculator helps handle this degenerate case, and also handles calculating reflectivity and transmission in the total internal reflection case.

Convention follows [Fowles, 1975] section 2.6, except that photon phase is not tracked in Celeritas.

class ReflectionFormCalculator

Calculator for UNIFIED reflection model.

The model specifies 4 different reflection modes:

  1. Specular spike: geometric reflection about global normal

  2. Specular lobe: geometric reflection about facet normal

  3. Back-scattering: reversed photon direction and polarization

  4. Diffuse Lambertian: reflection following Lambert’s cosine law

class DielectricInteractor

Sample optical interactions for dielectric-dielectric and dielectric-metal interfaces.

For both interfaces, the reflectivity is first calculated from Fresnel equations with the FresnelCalculator and sampled to determine if the photon will reflect or refract. If it reflects, then the UNIFIED model is used to handle the different forms of reflection via ReflectionFormSampler. If it refracts, then dielectric-dielectric interfaces will use Snell’s law to determine the refracted wave direction and polarization. For dielectric-metal interfaces, refracted waves are just absorbed.

The result is used by SurfaceInteractionApplier to update the track.

struct OnlyReflectionExecutor

Return only a reflection interaction based on the ReflectionMode.

This applies the ReflectionFormCalculator directly to the track for the given mode.

class TrivialInteractor

Return a trivial interaction based on the TrivialInteractionMode.

Each surface in the trivial model has one interaction mode, which is applied to all incident tracks. None of the modes depend on any of the previous surface physics state or models.

  1. All photons are absorbed on the surface.

  2. All photons are transmitted with no change to direction or polarization.

  3. All photons are reflected (back-scattered) with opposite direction and polarization.

Boundary crossing

If a track exits the surface (i.e., in the initial and final layer, heading away from the surface), the geometry state is updated accordingly at the end of the loop.