npsim: disable unused optical processes (OpMieHG, OpWLS, OpWLS2)#67
Open
wdconinc wants to merge 1 commit into
Open
npsim: disable unused optical processes (OpMieHG, OpWLS, OpWLS2)#67wdconinc wants to merge 1 commit into
wdconinc wants to merge 1 commit into
Conversation
…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>
Contributor
There was a problem hiding this comment.
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 ... falsecommands toRUNNER.ui.commandsConfigureduring 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.
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.
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
commandsConfigureto deactivate these three processes before the physics list is finalized: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 checkG4OpticalParametersactivation 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.