Repository navigation
refactor(api)!: remove G4CX and migrate external integrations - #459
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
plexoos
force-pushed
the
retire-g4cx
branch
2 times, most recently
from
October 17, 2026 04:20
08442b5 to
1d0b888
Compare
plexoos
added a commit
that referenced
this pull request
Oct 17, 2026
Introduce an installed, function-based runtime over U4 geometry conversion and CSGOptiX execution. Applications initialize a live Geant4 world through `simphony::simphony`, query GPU availability, simulate/reset events, and explicitly save geometry. - Install the documented `simphony.h` and `SensorIdentifier.h` public headers. Applications provide custom sensor mappings through `simphony::SensorIdentifier` without including U4 implementation headers. - Support `Required`, `Optional`, and `Disabled` GPU policies, idempotent initialization with matching inputs, and explicit pending-event/reset checks. - Update U4Tree, the default sensor identifier, and the retained G4CX/DD4hep sensor adapters to consume the public protocol. - Migrate the Simphony-owned `src/` applications to the runtime. The external-example and DD4hep run/event migrations are in the stacked G4CX retirement PR. - Cover custom sensor dispatch, changed-identifier rejection, lifecycle errors, geometry-only export, and executable ELF dependencies. Honor `CMAKE_INSTALL_PREFIX` for installed configuration data. Validation: independently built the API commit with the retained G4CX library, `simg4ox`, `consgeo`, and API/legacy geometry tests. All 22 API, retained-G4CX geometry, and `simg4ox` integration checks passed. The complete stack passed 255 enabled CTest tests and DD4hep in-tree/standalone runtime checks. Migration: custom identifiers now implement `simphony::SensorIdentifier` from `SensorIdentifier.h`; the old `U4SensorIdentifier` type/header is removed. The retained G4CX setter accepts the new protocol. Follow-up: #459 removes G4CX and migrates the remaining external examples and DD4hep run/event actions. It is stacked on this PR and targets `rm-g4cx`.
Finish retiring the legacy G4CX layer after the src frontends moved to the public Simphony runtime. Embedded applications, DD4hep actions, and CSG geometry tests now use the same process-wide initialization and event lifecycle through simphony::simphony. - Remove the g4cx library, exported target, headers, legacy executables and tests, top-level build entries, and OPTICKS_G4CX logging hooks. - Migrate the MC_Truth, async_gpu_launch, and async_gpu_std examples to simphony::initialize/simulate/reset and the installed public target. Require C++20 and release retained event data after result retrieval, including synchronous and output-file failure paths. - Migrate DD4hep run/event actions while retaining sensor mapping, hit injection, and end-of-run batch flushing. Reuse the initialized runtime across runs, remove the no-op Finalize call, and add GeometryDirectory (default: geometry) as the explicit SaveGeometry destination. - Preserve in-tree and standalone DD4hep builds. Remove inherited raw language-standard flags from DD4hep's Geant4::Interface helper so they cannot override the plugin's declared C++20 requirement. - Initialize CSG test geometry with the GPU disabled. Keep U4GDML parsing to preserve volume names, path expansion, and auxiliary sensitive- detector tags. Replace retired geometry-test export lookup paths with consgeo exports and the SIMPHONY_GEOMETRY_DIR override. - Document external builds, reset ordering, geometry export, lower-level saved-foundry tools, and current simg4ox Cerenkov/scintillation capabilities. Validation: - Full build with DD4hep enabled; 255 enabled CTest tests passed, including all 20 simg4ox integration tests. SBndTest and CSGOptiXRenderTest remain disabled. All 44 CSG tests also passed after preserving GDML handling. - Clean Release build/install with BUILD_TESTING=OFF; no G4CX library, headers, exported target, or runtime dependency in the clean package. The installed geometry-only consgeo export also passed. - All four standalone examples built against the clean installation. MC-truth completed two runs; both async examples completed synchronous and batched modes across two runs. - DD4hep v01-38, ROOT 6.36.14, and Geant4 11.4.2: in-tree and standalone plugin builds and standalone installation passed, as did two-event CPU/GPU raindrop tests. In-tree and standalone hit counts matched with the same GPU kernel. Consecutive runs, geometry export, and end-of-run batch flushing passed. This local Geant4 build required DD4hep's TLS-check override and Geant4 preloading because it uses initial-exec TLS. - git diff --check and public-header/script syntax checks passed. BREAKING CHANGE: remove simphony::G4CX and G4CXOpticks. Consumers must link simphony::simphony and use simphony.h. Initialize from a live Geant4 world and reset retained events after reading results. Saved-foundry rendering and simtrace remain available through lower-level CSGOptiX tools.
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
Follow-up to #457, now merged into main. The public runtime, sensor interface, and API regression tests were introduced there; this PR removes G4CX and migrates its remaining consumers.
Remove the legacy G4CX coordinator and move its remaining consumers to
simphony::simphony. This completes the migration of CSG test setup, DD4hep run/event actions, and the MC-truth and async examples to the same initialization and event lifecycle used bysimg4ox.SaveGeometryplusGeometryDirectory.consgeoexports.Validation:
consgeoexport passed.Breaking change: consumers of
simphony::G4CX/G4CXOpticksmust linksimphony::simphony, includesimphony.h, initialize from a live Geant4 world, and reset retained events after reading results. Saved-foundry rendering and simtrace remain available through lower-level CSGOptiX tools. The three migrated standalone examples explicitly move from C++17 to C++20.