Skip to content

fix: honor G4OpticalParameters process activation flags in DDG4#1636

Open
wdconinc wants to merge 1 commit into
AIDASoft:masterfrom
wdconinc:optical-honor-process-activation
Open

fix: honor G4OpticalParameters process activation flags in DDG4#1636
wdconinc wants to merge 1 commit into
AIDASoft:masterfrom
wdconinc:optical-honor-process-activation

Conversation

@wdconinc
Copy link
Copy Markdown
Contributor

The Geant4OpticalPhotonPhysics DDG4 plugin previously unconditionally constructed and registered all four optical processes (G4OpAbsorption, G4OpRayleigh, G4OpMieHG, G4OpBoundaryProcess) regardless of the G4OpticalParameters activation flags set by the user.

This patch makes the plugin (for Geant4 >= 10.7) check each process against G4OpticalParameters::GetProcessActivation() before adding it to the G4ProcessManager. Processes that are deactivated are safely deleted instead. G4OpBoundaryProcess is always registered since it controls all surface interactions.

Additionally, OpWLS and OpWLS2 are now registered when activated, completing the set of optical processes that can be controlled via

  /process/optical/processActivation <ProcessName> true/false

The log message now dynamically lists the actually-registered processes instead of a hardcoded string.

BEGINRELEASENOTES

  • honor G4OpticalParameters process activation flags in DDG4

ENDRELEASENOTES

…icalPhotonPhysics

The Geant4OpticalPhotonPhysics DDG4 plugin previously unconditionally
constructed and registered all four optical processes (G4OpAbsorption,
G4OpRayleigh, G4OpMieHG, G4OpBoundaryProcess) regardless of the
G4OpticalParameters activation flags set by the user.

This patch makes the plugin (for Geant4 >= 10.7) check each process
against G4OpticalParameters::GetProcessActivation() before adding it
to the G4ProcessManager.  Processes that are deactivated are safely
deleted instead.  G4OpBoundaryProcess is always registered since it
controls all surface interactions.

Additionally, OpWLS and OpWLS2 are now registered when activated,
completing the set of optical processes that can be controlled via
  /process/optical/processActivation <ProcessName> true/false

The log message now dynamically lists the actually-registered processes
instead of a hardcoded string.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 28, 2026 18:36
@wdconinc
Copy link
Copy Markdown
Contributor Author

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

Test Results

   18 files     18 suites   7h 29m 43s ⏱️
  357 tests   356 ✅ 0 💤 1 ❌
3 143 runs  3 137 ✅ 0 💤 6 ❌

For more details on these failures, see this check.

Results for commit d16f338.

♻️ This comment has been updated with latest results.

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.

1 participant