examples: standalone dRICH GDML example (Geant4 + Simphony side-by-side) - #347
Closed
ggalgoczi wants to merge 4 commits into
Closed
examples: standalone dRICH GDML example (Geant4 + Simphony side-by-side)#347ggalgoczi wants to merge 4 commits into
ggalgoczi wants to merge 4 commits into
Conversation
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
marked this pull request as draft
May 29, 2026 14:10
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
force-pushed
the
examples-drich-gdml
branch
from
May 30, 2026 15:01
7fc3f6b to
3f977d1
Compare
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
force-pushed
the
examples-drich-gdml
branch
from
May 30, 2026 17:40
3f977d1 to
69fd4d8
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.