fix(drich): make mirror coating directional - #440
Open
plexoos wants to merge 2 commits into
Open
Conversation
Model the dRICH mirror coating as an ordered gas-to-mirror border surface instead of a logical skin surface. The skin surface applied the reflective dielectric-metal coating from both sides of the mirror volume. After the initial reflection, Geant4 could relocate the photon into the mirror backing, apply the coating again from the reverse side, and trap the photon in repeated StepTooSmall boundary interactions. The GPU performed only the intended reflection and continued toward the sensors. Introduce an optically gas-matched mirror-backing material while retaining the acrylic density and composition. Since the metallic coating is opaque, the backing should not affect optical transport. Index matching also prevents a nonphysical acrylic-to-gas refraction during Geant4 boundary relocation. Add a drich_mirror torch configuration that sends 10,000 photons along a realistic one-bounce mirror-to-SiPM path. Register a separate simg4ox integration test so the existing direct-SiPM coverage remains unchanged. The new test compares Geant4 and GPU hit counts and hit distributions. It produces 5672 Geant4 hits and 5637 GPU hits, with all statistical comparisons passing.
Rename the original dRICH torch configuration to drich_direct_sensor so its direct SiPM-hit purpose is explicit in both the config and CTest names. Add a drich_aerogel source that starts inside Aerogel_DRICH and sends a 30 mm photon disc through AirOptical and Acrylic_DRICH, off the directional mirror, and onto a SiPM. Run it through the shared CPU/GPU hit validator so hit counts and position and direction distributions use the existing statistical checks. Widen the mirror-only source disc to 100 mm to exercise a broader reflected footprint while retaining the dedicated control for gas-to-mirror transport.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the dRICH integration-test geometry and test harness to make the mirror coating directional (using an ordered gas→mirror border surface instead of a logical skin surface), and splits the previous single dRICH scenario into three targeted integration tests that exercise direct sensor illumination, mirror reflection, and a longer aerogel-to-sensor path.
Changes:
- Replace the dRICH mirror skin surface with an ordered
C2F6_DRICH → DRICH_mirror_sec0border surface and introduceMirrorBacking_DRICHwith gas-matched optical properties. - Split the previous
drichintegration test into three scenarios:drich_direct_sensor,drich_mirror, anddrich_aerogel. - Add per-scenario torch configuration files under
config/to drive the new integration tests.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_simg4ox.sh | Replaces the single drich test-case entry with three dedicated dRICH scenarios wired to run_hit_validation. |
| tests/geom/drich.gdml | Makes the mirror coating directional by switching to a border surface and adds MirrorBacking_DRICH with gas-matched optical properties. |
| tests/CMakeLists.txt | Registers three separate dRICH integration tests instead of one. |
| config/drich_mirror.json | Adds a mirror-bounce torch configuration for the new drich_mirror test scenario. |
| config/drich_direct_sensor.json | Adds a direct-illumination torch configuration preserving the prior direct-to-SiPM behavior as drich_direct_sensor. |
| config/drich_aerogel.json | Adds an aerogel-to-SiPM (multi-interface + mirror) torch configuration for the drich_aerogel scenario. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
C2F6_DRICH → DRICH_mirror_sec0border surfaceMirrorBacking_DRICH, retaining the acrylic composition and density while matching the surrounding gas optical propertiesdrich_direct_sensorMotivation
PR #434 demonstrated that the original dRICH integration test sent photons
directly to the SiPMs and therefore did not exercise mirror reflection. A
one-bounce mirror configuration produced approximately 5,600 GPU hits but no
Geant4 hits.
The discrepancy came from the mirror coating being represented as a logical
skin surface. Skin surfaces apply from either side of their logical volume.
After the intended reflection, Geant4 could relocate the photon into the
mirror backing, encounter the same coating from the reverse side, and become
trapped in repeated
StepTooSmallboundary interactions. Opticks performedthe intended reflection and continued toward the sensor.
This change models the coating as an ordered gas-to-mirror border surface, so
it is active only on the physically illuminated side. The optically
inaccessible backing is also index-matched to
C2F6_DRICH, preventing anumerical boundary relocation from introducing a nonphysical
acrylic-to-gas refraction.
Test coverage
The dRICH coverage is split into three independently named scenarios:
drich_direct_sensordrich_mirrordrich_aerogelAerogel_DRICH → AirOptical → Acrylic_DRICH → C2F6_DRICH → mirror → SiPMThe mirror-only source disc is widened to 100 mm to exercise a broader
reflected footprint. The aerogel source starts inside the realistic radiator
aperture and traverses all three downstream interfaces before reflecting onto
a SiPM.
All cases use the existing 3-sigma hit-count comparison and chi-squared
position/direction checks.
Validation