Skip to content

test(simg4ox): validate dRICH sensor hits - #428

Merged
plexoos merged 2 commits into
mainfrom
test-drich
Jul 30, 2026
Merged

test(simg4ox): validate dRICH sensor hits#428
plexoos merged 2 commits into
mainfrom
test-drich

Conversation

@plexoos

@plexoos plexoos commented Jul 29, 2026

Copy link
Copy Markdown
Member

The partial-phi sphere and tube implementation from #426
has focused geometry and intersection tests, but it lacks an end-to-end
regression using a realistic detector that converts those solids and
compares optical-photon detection across Geant4 and Opticks. The dRICH
fixture provides that coverage with one partial sphere, three partial
tubes, and 210 annotated photon-sensor volumes.

Add a deterministic 10,000-photon, 420 nm torch configuration aimed at
a dRICH SiPM patch so the CPU and GPU receive identical optical input
and produce stable nonzero hit samples. Register
Integration.simg4ox.drich through the common CMake helper, allow
hit-validation cases to select a custom macro, and use run_validate.mac
so Geant4 invokes the sensor SDs. The complete geometry is converted
before transport, so the test exercises partial-phi construction even
though the controlled beam targets the sensors directly.

GDML import strips pointer-like suffixes from logical-volume names,
leaving distinct dRICH sensor volumes with duplicate names. Append
a numeric index to each PhotonSD name so G4SDManager collection keys
remain unique and all Geant4 sensor hits are retained for the existing
three-sigma count and distribution comparison.

The partial-phi sphere and tube implementation from #426
has focused geometry and intersection tests, but it lacks an end-to-end
regression using a realistic detector that converts those solids and
compares optical-photon detection across Geant4 and Opticks. The dRICH
fixture provides that coverage with one partial sphere, three partial
tubes, and 210 annotated photon-sensor volumes.

Add a deterministic 10,000-photon, 420 nm torch configuration aimed at
a dRICH SiPM patch so the CPU and GPU receive identical optical input
and produce stable nonzero hit samples. Register
Integration.simg4ox.drich through the common CMake helper, allow
hit-validation cases to select a custom macro, and use run_validate.mac
so Geant4 invokes the sensor SDs. The complete geometry is converted
before transport, so the test exercises partial-phi construction even
though the controlled beam targets the sensors directly.

GDML import strips pointer-like suffixes from logical-volume names,
leaving distinct dRICH sensor volumes with duplicate names. Append
a numeric index to each PhotonSD name so G4SDManager collection keys
remain unique and all Geant4 sensor hits are retained for the existing
three-sigma count and distribution comparison.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an end-to-end dRICH regression to the simg4ox integration suite, using a deterministic torch configuration to compare Geant4 vs Opticks optical-photon hit distributions while exercising partial-phi solid conversion and ensuring Geant4 hit collection names remain unique.

Changes:

  • Add drich as a CTest-driven simg4ox integration test case and wire it into the existing test runner.
  • Allow hit-validation tests to override the Geant4 macro file and run dRICH with run_validate.mac to ensure sensor SD invocation.
  • Introduce a config/drich.json torch/event configuration and update Geant4 PhotonSD naming to avoid duplicate SD/HC keys.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/test_simg4ox.sh Adds drich test case; allows hit-validation to pass a custom macro (uses run_validate.mac).
tests/CMakeLists.txt Registers Integration.simg4ox.drich via the common CMake test helper.
src/g4app.h Appends an index to PhotonSD names to avoid collisions from duplicate GDML logical-volume names.
config/drich.json New deterministic 10,000-photon (420 nm) torch configuration for dRICH hit validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/g4app.h

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@plexoos

plexoos commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 63129e70c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@plexoos
plexoos merged commit de3ec2e into main Jul 30, 2026
23 checks passed
@plexoos
plexoos deleted the test-drich branch July 30, 2026 16:36
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