I recently asked about how to inactivate processes by region, which is not a built in feature of G4. I’m working on implementing something myself, but I can’t find supporting documentation.
My basic question is this: What is the correct Geant4 method for having PostStepGetPhysicalInteractionLength()
set G4ForceCondition
to suppress a process?
In G4ForceCondition.hh
we have six possible values:
InActivated,
// This PostStepDoit is inactivated by a user
Forced,
// This PostStepDoIt is forced to invoke if particle is not in state of
// StopAndKill.
NotForced,
// This PostStepDoIt is not forced to invoke.
Conditionally,
// This PostStepDoIt is forced to invoke only when corresponding
// AlongStepDoIt limits the Step.
ExclusivelyForced,
// Only this PostStepDoIt (or AtRestDoIt) is exclusively forced
// to invoke - all other DoIt including AlongStepDoIts are ignored.
StronglyForced
// This PostStepDoIt is really forced to invoke, anyway.
My question is about the InActivated
value, which is not mentioned in either the Application Guide or the Toolkit Guide.
If I return *condition = InActivated
in GetMeanFreePath()
(or PostStepGPIL()
) is that considered permanent, or will the tracking manager come back and interrogate PostStepGPIL()
in the future to see whether it has changed? Is there a different/better way to stop a process’ DoIt()
from being called?