35 const G4String& physicsProcessToBias,
41 for (
auto ip = 0 ; ip < (
G4int)vprocess->
size() ; ++ip)
43 if ( (*vprocess)[ip]->GetProcessName() == physicsProcessToBias )
45 physicsProcess = (*vprocess)[ip];
51 if ( physicsProcess ==
nullptr )
return false;
55 if ( ( processType != 2 ) &&
56 ( processType != 3 ) &&
57 ( processType != 4 ) &&
58 ( processType != 6 ) )
72 if ( removed != physicsProcess )
75 ed <<
"Internal inconsistency in processes handling. Please report !" <<
G4endl;
76 G4Exception(
"G4BiasingHelper::ActivatePhysicsBiasing(...)",
87 if ( alongStepIndex == -1 ) alongStepIndex =
ordDefault;
89 pmanager->
AddProcess( biasingWrapper, atRestIndex, alongStepIndex, postStepIndex);
95 const G4String& nonPhysicsProcessName )
98 if ( nonPhysicsProcessName ==
"" )
114 for (
auto i = 0 ; i < (
G4int)processList->
size() ; ++i)
122 ed <<
"Trying to re-add a G4ParallelGeometriesLimiterProcess process \n"
123 <<
"to the process manager for '"
126 <<
" while one is already present." <<
G4endl;
127 G4Exception(
"G4BiasingHelper::AddBiasingProcessLimiter()",
140 toReturn = biasingLimiter;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static G4bool ActivatePhysicsBiasing(G4ProcessManager *pmanager, const G4String &physicsProcessToBias, const G4String &wrappedName="")
static void ActivateNonPhysicsBiasing(G4ProcessManager *pmanager, const G4String &nonPhysicsProcessName="")
static G4ParallelGeometriesLimiterProcess * AddLimiterProcess(G4ProcessManager *pmanager, const G4String &processName="biasLimiter")
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
G4ParticleDefinition * GetParticleType() const
G4int GetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
void SetProcessOrderingToSecond(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
G4ProcessVector * GetProcessList() const
G4VProcess * RemoveProcess(G4VProcess *aProcess)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
G4ProcessType GetProcessType() const