Skip to content

examples: standalone dRICH GDML example (Geant4 + Simphony side-by-side) - #347

Closed
ggalgoczi wants to merge 4 commits into
mainfrom
examples-drich-gdml
Closed

examples: standalone dRICH GDML example (Geant4 + Simphony side-by-side)#347
ggalgoczi wants to merge 4 commits into
mainfrom
examples-drich-gdml

Conversation

@ggalgoczi

Copy link
Copy Markdown
Contributor

examples/drich runs the single-sector dRICH from a geoConverter-exported GDML through Geant4 (CPU) and Opticks (GPU), no DD4hep, comparing optical-photon hits. Driver + 0.2mm-airgap GDML + build/run README. Depends on the CSG phi-wedge and qbnd POINT/sibling-pair changes.

examples/drich runs the single-sector dRICH from a geoConverter-exported GDML through Geant4 (CPU) and Opticks (GPU), no DD4hep, comparing optical-photon hits. Driver + 0.2mm-airgap GDML + build/run README. Depends on the CSG phi-wedge and qbnd POINT/sibling-pair changes.
@ggalgoczi ggalgoczi self-assigned this May 29, 2026
@ggalgoczi ggalgoczi changed the title examples: standalone dRICH GDML example (Geant4 + Opticks side-by-side) examples: standalone dRICH GDML example (Geant4 + Simphony side-by-side) May 29, 2026
@ggalgoczi
ggalgoczi marked this pull request as draft May 29, 2026 14:10
ggalgoczi added 2 commits May 29, 2026 15:38
Gives examples/drich the standalone CMakeLists.txt (find_package eic-opticks +
Geant4 gdml) and run.sh that the sibling examples carry, so the no-DD4hep dRICH
driver builds the canonical way. Compiling it serves as a build-smoke for the
standalone GDML flow; README gains the CMake recipe.
@ggalgoczi
ggalgoczi force-pushed the examples-drich-gdml branch from 7fc3f6b to 3f977d1 Compare May 30, 2026 15:01
@ggalgoczi

Copy link
Copy Markdown
Contributor Author

@plexoos the test added here fails because needs #344 , #345, #346 merged first.

Adds tests/test_drich_gdml.sh (run on the [gpu] CI runner alongside the other
test_*.sh) that runs the standalone dRICH example through Geant4 CPU and Opticks
GPU side-by-side and asserts the sensor-hit counts agree within NSIGMA*sqrt(G+C)
(Poisson). Builds the example via its CMakeLists if no binary is installed.
SKIPs (benign) without a GPU or if the rare G4 navigator hang times out every
seed. Wired into build-pull-request.yaml's GPU test step.
@ggalgoczi
ggalgoczi force-pushed the examples-drich-gdml branch from 3f977d1 to 69fd4d8 Compare May 30, 2026 17:40
@plexoos

plexoos commented Jun 2, 2026

Copy link
Copy Markdown
Member

@plexoos the test added here fails because needs #344 , #345, #346 merged first.

You can cherry-pick or pull those changes into this branch.

plexoos added a commit that referenced this pull request Jul 29, 2026
The geoConverter-exported dRICH fixture from PR #347 defines optical
sensor skin surfaces but does not identify their logical volumes as
Geant4 sensitive detectors. simg4ox constructs PhotonSD instances from
the GDML auxiliary map, so photons reaching these surfaces are otherwise
absent from the Geant4 hit collection and cannot be compared with
Opticks GPU hits.

Add a SensDet=PhotonDetector auxiliary record to each of the 210
DRICH_pss logical volumes. This preserves the original solids,
placements, materials, and optical surfaces while allowing the CPU
simulation to attach PhotonSD instances and record the sensor hits
needed by the dRICH integration comparison.
plexoos added a commit that referenced this pull request Jul 29, 2026
The dRICH GDML exported by DD4hep stores optical-property energy axes in
GeV, while Geant4 imports the raw matrix coordinates using its MeV-based
internal units. This leaves material and surface spectra 1000 times
below their intended energies, moving them outside the optical-photon
range and suppressing physical transport and detection.

Scale the energy coordinate of all 41 two-column property tables by 1000
while preserving their property values. Also model the photon-sensor
surface as unified dielectric-metal with explicit zero reflectivity so
Geant4 enters the EFFICIENCY absorption/detection path rather than
applying dielectric Fresnel transport or reflecting photons before
detection.

These corrections encode the import-time adjustments from the PR #347
standalone dRICH driver directly in the reusable fixture, enabling
consistent Geant4 CPU and Opticks GPU hit comparisons while retaining
all 210 sensitive-detector annotations.
@ggalgoczi ggalgoczi closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants