61 fPhysBiasAllCharged(false), fNonPhysBiasAllCharged(false),
62 fPhysBiasAllChargedISL(false), fNonPhysBiasAllChargedISL(false),
63 fPhysBiasAllNeutral(false), fNonPhysBiasAllNeutral(false),
64 fPhysBiasAllNeutralISL(false), fNonPhysBiasAllNeutralISL(false),
79 std::vector< G4String > dummy;
119 if ( PDGlow > PDGhigh )
G4cout <<
" G4GenericBiasingPhysics::PhysicsBiasAddPDGRange(...) : PDGlow > PDGhigh, call ignored." <<
G4endl;
122 if ( includeAntiParticle )
132 if ( PDGlow > PDGhigh )
G4cout <<
" G4GenericBiasingPhysics::NonPhysicsBiasAddPDGRange(...) : PDGlow > PDGhigh, call ignored." <<
G4endl;
135 if ( includeAntiParticle )
146 if ( PDGlow > PDGhigh )
G4cout <<
" G4GenericBiasingPhysics::BiasAddPDGRange(...) : PDGlow > PDGhigh, call ignored." <<
G4endl;
193 if ( knownParticle == particleName )
205 for (
G4String knownGeometry : geometries )
207 if ( knownGeometry == parallelGeometryName )
213 if ( !isKnown ) geometries.push_back( parallelGeometryName );
224 if ( PDGlow > PDGhigh )
226 G4cout <<
"G4GenericBiasingPhysics::AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const G4String& parallelGeometryName , G4bool includeAntiParticle = true ), PDGlow > PDGhigh : call ignored" <<
G4endl;
235 if ( includeAntiParticle )
247 if ( PDGlow > PDGhigh )
249 G4cout <<
"G4GenericBiasingPhysics::AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const std::vector< G4String >& parallelGeometryNames, G4bool includeAntiParticle = true ), PDGlow > PDGhigh : call ignored" <<
G4endl;
261 if ( geometry == parallelGeometryName )
284 if ( geometry == parallelGeometryName )
333 std::vector< G4String >::const_iterator particleIt =
345 for (std::size_t ip = 0 ; ip < vprocess->
size() ; ++ip)
353 while ( restartLoop )
355 for (std::size_t ip = 0 ; ip < biasedProcesses.size() ; ++ip)
359 if ( restartLoop )
break;
385 G4bool physBias(
false), nonPhysBias(
false);
404 if ( ( physBias ==
false ) && ( nonPhysBias ==
false ) )
423 std::vector < G4String > biasedProcesses;
425 for (std::size_t ip = 0 ; ip < vprocess->
size() ; ++ip)
432 while ( restartLoop )
434 for (std::size_t ip = 0 ; ip < biasedProcesses.size() ; ++ip)
438 if ( restartLoop )
break;
468 for (std::size_t ip = 0 ; ip < vprocess->
size() ; ++ip)
482 processNames +=
"\n ";
493 G4cout << std::setw(14) << particleName <<
" **** : " << processNames <<
G4endl;
495 G4cout << std::setw(18) << particleName <<
" : " << processNames <<
G4endl;
519 if ( requestedParticles == particleName )
553 if ( ( particlePDG >= PDGlow ) && ( particlePDG <= PDGhigh ) )
570 G4bool islAllNeutral =
false;
572 { islAllNeutral |= isln; }
573 G4bool islAllCharged =
false;
575 { islAllCharged |= islc; }
584 if(particle->
IsShortLived() && !islAllNeutral)
continue;
597 if(particle->
IsShortLived() && !islAllCharged)
continue;
std::vector< G4InuclElementaryParticle >::iterator particleIterator
G4_DECLARE_PHYSCONSTR_FACTORY(G4GenericBiasingPhysics)
G4GLOB_DLL std::ostream G4cout
static void ActivateNonPhysicsBiasing(G4ProcessManager *pmanager, G4String nonPhysicsProcessName="")
static G4ParallelGeometriesLimiterProcess * AddLimiterProcess(G4ProcessManager *pmanager, const G4String &processName="biasLimiter")
static G4bool ActivatePhysicsBiasing(G4ProcessManager *pmanager, G4String physicsProcessToBias, G4String wrappedName="")
G4bool fNonPhysBiasAllNeutralISL
void BiasAllNeutral(G4bool includeShortLived=false)
std::vector< G4int > fPDGlowParallelGeometries
G4bool fPhysBiasAllChargedISL
std::vector< G4int > fPhysBiasByPDGRangeLow
void NonPhysicsBiasAllNeutral(G4bool includeShortLived=false)
std::map< G4int, std::vector< G4String > > fPDGrangeParallelGeometries
virtual void ConstructProcess()
G4GenericBiasingPhysics(const G4String &name="BiasingP")
std::vector< G4bool > fBiasAllProcesses
std::vector< G4String > fParallelGeometriesForNeutral
void BiasAddPDGRange(G4int PDGlow, G4int PDGhigh, G4bool includeAntiParticle=true)
void AddParallelGeometry(const G4String &particleName, const G4String ¶llelGeometryName)
G4bool fNonPhysBiasAllNeutral
void NonPhysicsBiasAddPDGRange(G4int PDGlow, G4int PDGhigh, G4bool includeAntiParticle=true)
void PhysicsBias(const G4String &particleName)
std::vector< G4int > fNonPhysBiasByPDGRangeLow
void PhysicsBiasAddPDGRange(G4int PDGlow, G4int PDGhigh, G4bool includeAntiParticle=true)
void AssociateParallelGeometries()
std::vector< G4bool > fAllChargedParallelGeometriesISL
void AddParallelGeometryAllNeutral(const G4String ¶llelGeometryName, G4bool includeShortLived=false)
std::vector< G4bool > fAllNeutralParallelGeometriesISL
void NonPhysicsBias(const G4String &particleName)
std::vector< G4String > fParallelGeometriesForCharged
G4bool fPhysBiasAllNeutralISL
std::vector< G4String > fBiasedParticles
G4bool fPhysBiasAllNeutral
std::vector< G4int > fNonPhysBiasByPDGRangeHigh
std::vector< G4String > fNonPhysBiasedParticles
void AddParallelGeometryAllCharged(const G4String ¶llelGeometryName, G4bool includeShortLived=false)
std::vector< G4String > fParticlesWithParallelGeometries
virtual void ConstructParticle()
std::map< G4String, std::vector< G4String > > fParallelGeometriesForParticle
void PhysicsBiasAllCharged(G4bool includeShortLived=false)
void Bias(const G4String &particleName)
G4bool fNonPhysBiasAllChargedISL
std::vector< G4int > fPDGhighParallelGeometries
void BiasAllCharged(G4bool includeShortLived=false)
G4bool fNonPhysBiasAllCharged
virtual ~G4GenericBiasingPhysics()
G4bool fPhysBiasAllCharged
std::vector< std::vector< G4String > > fBiasedProcesses
std::vector< G4int > fPhysBiasByPDGRangeHigh
void PhysicsBiasAllNeutral(G4bool includeShortLived=false)
void NonPhysicsBiasAllCharged(G4bool includeShortLived=false)
void AddParallelWorld(const G4String ¶llelWorldName)
G4ProcessManager * GetProcessManager() const
G4bool IsShortLived() const
G4int GetPDGEncoding() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4ProcessVector * GetProcessList() const
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
const G4String & GetProcessName() const
const char * name(G4int ptype)