Skip to content

Feat/quasioptical photon offload#317

Draft
ggalgoczi wants to merge 3 commits into
mainfrom
feat/quasioptical-photon-offload
Draft

Feat/quasioptical photon offload#317
ggalgoczi wants to merge 3 commits into
mainfrom
feat/quasioptical-photon-offload

Conversation

@ggalgoczi
Copy link
Copy Markdown
Contributor

Adds examples/GPURaytraceQuasi/, a standalone consumer example that mirrors src/GPURaytrace but uses the new Geant4 11.4 native optical-photon offload classes (G4QuasiOpticalPhoton, G4QuasiCerenkov, G4QuasiScintillation) together with G4OpticalParameters::Set{Cerenkov,Scint}{Offload,Stack}Photons(...).

This is purely additive — no modifications to any core source under CSG/, CSGOptiX/, qudarap/, sysrap/, u4/, g4cx/, dd4hepplugins/, or any other tracked file in the repo. All changes live under examples/GPURaytraceQuasi/.

ggalgoczi added 2 commits May 1, 2026 17:47
…sses

New standalone example demonstrating optical-photon offload via the
G4 11.4 G4QuasiCerenkov / G4QuasiScintillation processes. Mirrors the
structure of examples/async_gpu_std: standalone CMakeLists with
find_package(eic-opticks), bare includes, manual argv parsing,
glm find_package workaround for the eic-opticksConfig.cmake gap.

Quasi process registration uses an inline QuasiOpticalPhysics
constructor because G4OpticalPhysics::ConstructProcess in v11.4.1
does not auto-instantiate the Quasi variants based on
G4OpticalParameters offload flags. The constructor activates after
G4OpticalPhysics has run, with the legacy Cerenkov / Scintillation
processes disabled via SetProcessActivation(false).

The SteppingAction matches both "QuasiScintillation" and the upstream
typo "QausiScintillation" for forward compatibility.

Bit-identical output to the legacy GPURaytrace example when both run
with stackPhotons=false (verified at 100-event and 50M-photon scales).
No modifications to eic-opticks core source.
@ggalgoczi ggalgoczi requested a review from plexoos May 1, 2026 17:59
@ggalgoczi ggalgoczi self-assigned this May 1, 2026
@ggalgoczi ggalgoczi marked this pull request as draft May 1, 2026 19:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v20.1.2) reports: 2 file(s) not formatted
  • examples/GPURaytraceQuasi/GPURaytraceQuasi.cpp
  • examples/GPURaytraceQuasi/GPURaytraceQuasi.h

Have any feedback or feature suggestions? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants