Skip to content

npsim: disable unused optical processes (OpMieHG, OpWLS, OpWLS2)#67

Open
wdconinc wants to merge 1 commit into
mainfrom
disable-unused-optical-processes-v2
Open

npsim: disable unused optical processes (OpMieHG, OpWLS, OpWLS2)#67
wdconinc wants to merge 1 commit into
mainfrom
disable-unused-optical-processes-v2

Conversation

@wdconinc
Copy link
Copy Markdown
Contributor

@wdconinc wdconinc commented May 28, 2026

Problem

Optical processes OpMieHG, OpWLS, and OpWLS2 have no material property tables in the EIC epic detector description and always return DBL_MAX (infinite mean free path). Evaluating them on every optical photon step wastes GPIL time without contributing to the physics.

Solution

Add standard Geant4 UI commands in commandsConfigure to deactivate these three processes before the physics list is finalized:

/process/optical/processActivation OpMieHG false
/process/optical/processActivation OpWLS false
/process/optical/processActivation OpWLS2 false

OpRayleigh is kept active — aerogel in dRICH/pfRICH defines RAYLEIGH tables.

Dependency

For these commands to actually suppress process registration (rather than just setting flags), DDG4's Geant4OpticalPhotonPhysics::constructProcesses() must be updated to check G4OpticalParameters activation flags before adding each process. That upstream fix is in AIDASoft/DD4hep#1636.

Until that DD4hep PR merges, these commands are harmless no-ops. Once it merges, the three processes will be omitted from the optical photon process manager.

…mmands

Optical processes OpMieHG, OpWLS, and OpWLS2 have no material property
tables in the EIC epic detector description and always return DBL_MAX
(infinite mean free path). Evaluating them on every optical photon step
wastes GPIL time without contributing to the physics.

Add Geant4 UI commands in commandsConfigure to deactivate these three
processes before the physics list is finalized. OpRayleigh is kept
active because aerogel in the dRICH/pfRICH defines RAYLEIGH tables.

NOTE: for these commands to suppress process registration, DDG4's
Geant4OpticalPhotonPhysics::constructProcesses() must check
G4OpticalParameters activation flags before adding each process. That
upstream fix is tracked in eic/DD4hep PR #1
(optical-honor-process-activation). Until that PR merges, the commands
are harmless no-ops that prepare the configuration for when it does.

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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Geant4 UI configuration commands to disable three optical processes (OpMieHG, OpWLS, OpWLS2) that are unused in EPIC due to missing material property tables, reducing per-step optical photon GPIL overhead in npsim runs.

Changes:

  • Append three /process/optical/processActivation ... false commands to RUNNER.ui.commandsConfigure during Cerenkov/optical physics setup.
  • Document rationale and the upstream DD4hep/DDG4 dependency required for the commands to suppress process registration.

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

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