Warning, /eic-opticks/docs/physics.md is written in an unsupported language. File is not indexed.
0001 # Physics
0002
0003 This guide describes the optical-photon physics behavior relevant to
0004 Simphony's GPU propagation. For runtime configuration, GDML syntax
0005 requirements, application input modes, and persisted event output schemas, see
0006 [Simulation inputs and outputs](inputs-outputs.md).
0007
0008 ## Optical surface models in Geant4
0009
0010 In Geant4, optical surface properties such as `finish`, `model`, and `type`
0011 are defined using enums in the `G4OpticalSurface` and `G4SurfaceProperty`
0012 header files:
0013
0014 - [`G4OpticalSurface.hh`](https://github.com/Geant4/geant4/blob/geant4-11.3-release/source/materials/include/G4OpticalSurface.hh#L52-L113)
0015 - [`G4SurfaceProperty.hh`](https://github.com/Geant4/geant4/blob/geant4-11.3-release/source/materials/include/G4SurfaceProperty.hh#L58-L68)
0016
0017 These enums allow users to configure how optical photons interact with
0018 surfaces, controlling behaviors like reflection, transmission, and absorption
0019 based on physical models and surface qualities. The string values
0020 corresponding to these enums, such as `ground`, `glisur`, and
0021 `dielectric_dielectric`, can also be used directly in GDML files when defining
0022 `<opticalsurface>` elements for geometry. Geant4 parses these attributes and
0023 applies the corresponding surface behavior.
0024
0025 For a physics-motivated explanation of how Geant4 handles optical photon
0026 boundary interactions, refer to the [Geant4 Application Developer Guide
0027 boundary process](https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/TrackingAndPhysics/physicsProcess.html#boundary-process).
0028 The [UNIFIED model
0029 section](https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/TrackingAndPhysics/physicsProcess.html#the-unified-model)
0030 is especially useful when comparing Geant4 behavior with Simphony's GPU
0031 implementation.
0032
0033 ```gdml
0034 <gdml>
0035 ...
0036 <solids>
0037 <opticalsurface finish="ground" model="glisur" name="medium_surface" type="dielectric_dielectric" value="1">
0038 <property name="EFFICIENCY" ref="EFFICIENCY_DEF"/>
0039 <property name="REFLECTIVITY" ref="REFLECTIVITY_DEF"/>
0040 </opticalsurface>
0041 </solids>
0042 ...
0043 </gdml>
0044 ```
0045
0046 ## Optical surface support in Simphony
0047
0048 Simphony reads GDML through Geant4, so `<opticalsurface>` attributes such as
0049 `model="glisur"`, `model="unified"`, `finish="ground"`, and
0050 `type="dielectric_dielectric"` can be present in input files. During geometry
0051 translation, Simphony also preserves the Geant4 surface metadata and material
0052 property table arrays in the serialized surface fold. The standard GPU
0053 propagation path, however, implements a smaller optical-surface model than
0054 Geant4.
0055
0056 For ordinary explicit surfaces, Simphony builds a four-probability surface
0057 payload:
0058
0059 ```text
0060 (detect, absorb, reflect_specular, reflect_diffuse)
0061 ```
0062
0063 This is done in `u4/U4SurfaceArray.h` and consumed by
0064 `qsim::propagate_at_surface` in `qudarap/qsim.h`. The supported ordinary
0065 surface behavior is:
0066
0067 | GDML input | Standard GPU behavior |
0068 |------------|-----------------------|
0069 | `EFFICIENCY` with any value greater than zero | Treats the surface as sensor-like: detect with `EFFICIENCY`, absorb with `1 - EFFICIENCY`, and do not reflect. |
0070 | No nonzero `EFFICIENCY`, with `REFLECTIVITY` and a polished finish | Specular reflection with probability `REFLECTIVITY`; otherwise absorption. |
0071 | No nonzero `EFFICIENCY`, with `REFLECTIVITY` and a ground finish | Diffuse/Lambertian reflection with probability `REFLECTIVITY`; otherwise absorption. |
0072 | Boundary from a material with `RINDEX` to a material without `RINDEX` | Adds an implicit perfect absorber, matching Geant4's stop-and-kill behavior for non-transparent boundaries. |
0073
0074 When no explicit optical surface is present and both materials have `RINDEX`,
0075 Simphony uses the material refractive indices in `qsim::propagate_at_boundary`
0076 to perform Fresnel reflection or transmission with polarization handling.
0077 This corresponds to Geant4's smooth dielectric-dielectric boundary case.
0078
0079 Several Geant4 optical-surface features are currently parsed or preserved as
0080 metadata, but are not used by the standard GPU surface propagation:
0081
0082 - `model="glisur"` and `model="unified"` are recorded, but ordinary GPU
0083 propagation is not selected from the full Geant4 model implementation.
0084 - The `value` attribute is stored as polish for `glisur` and as `sigma_alpha`
0085 for non-`glisur` models, but normal smearing from polish or `sigma_alpha` is
0086 not active in the ordinary surface path.
0087 - `type`, such as `dielectric_metal` or `dielectric_dielectric`, is recorded,
0088 but ordinary explicit surfaces are still reduced to the probability payload
0089 above.
0090 - UNIFIED-model properties such as `SPECULARLOBECONSTANT`,
0091 `SPECULARSPIKECONSTANT`, `BACKSCATTERCONSTANT`, and `TRANSMITTANCE` are not
0092 used by the ordinary GPU surface path.
0093 - `RINDEX` or `GROUPVEL` properties attached to an optical surface are
0094 preserved, but the standard boundary calculation uses the corresponding
0095 material properties.
0096 - LUT, DAVIS, dichroic, and coated/thin-film Geant4 models should not be
0097 treated as supported standard GDML surface features in Simphony.
0098 - Only the common polished and ground finish families are recognized by the
0099 current helper code: `polished`, `polishedfrontpainted`,
0100 `polishedbackpainted`, `ground`, `groundfrontpainted`, and
0101 `groundbackpainted`.
0102
0103 For example, in `tests/geom/basic_detector.gdml`, the surface named
0104 `medium_container_bs...` is a `ground` `glisur` surface with `REFLECTIVITY`.
0105 In the standard GPU path it becomes a diffuse reflector. The
0106 `medium_drop_surface` and `MirrorPyramid...` surfaces both define
0107 `EFFICIENCY=1`, so they become fully detecting surfaces in the simplified
0108 payload, even though they also define `REFLECTIVITY`.