Geant4 11.3.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GenericBiasingPhysics Class Reference

#include <G4GenericBiasingPhysics.hh>

+ Inheritance diagram for G4GenericBiasingPhysics:

Public Member Functions

 G4GenericBiasingPhysics (const G4String &name="BiasingP")
 
virtual ~G4GenericBiasingPhysics ()
 
void PhysicsBias (const G4String &particleName)
 
void PhysicsBias (const G4String &particleName, const std::vector< G4String > &processToBiasNames)
 
void NonPhysicsBias (const G4String &particleName)
 
void Bias (const G4String &particleName)
 
void Bias (const G4String &particleName, const std::vector< G4String > &processToBiasNames)
 
void PhysicsBiasAddPDGRange (G4int PDGlow, G4int PDGhigh, G4bool includeAntiParticle=true)
 
void NonPhysicsBiasAddPDGRange (G4int PDGlow, G4int PDGhigh, G4bool includeAntiParticle=true)
 
void BiasAddPDGRange (G4int PDGlow, G4int PDGhigh, G4bool includeAntiParticle=true)
 
void PhysicsBiasAllCharged (G4bool includeShortLived=false)
 
void NonPhysicsBiasAllCharged (G4bool includeShortLived=false)
 
void BiasAllCharged (G4bool includeShortLived=false)
 
void PhysicsBiasAllNeutral (G4bool includeShortLived=false)
 
void NonPhysicsBiasAllNeutral (G4bool includeShortLived=false)
 
void BiasAllNeutral (G4bool includeShortLived=false)
 
void AddParallelGeometry (const G4String &particleName, const G4String &parallelGeometryName)
 
void AddParallelGeometry (const G4String &particleName, const std::vector< G4String > &parallelGeometryNames)
 
void AddParallelGeometry (G4int PDGlow, G4int PDGhigh, const G4String &parallelGeometryName, G4bool includeAntiParticle=true)
 
void AddParallelGeometry (G4int PDGlow, G4int PDGhigh, const std::vector< G4String > &parallelGeometryNames, G4bool includeAntiParticle=true)
 
void AddParallelGeometryAllCharged (const G4String &parallelGeometryName, G4bool includeShortLived=false)
 
void AddParallelGeometryAllCharged (const std::vector< G4String > &parallelGeometryNames, G4bool includeShortLived=false)
 
void AddParallelGeometryAllNeutral (const G4String &parallelGeometryName, G4bool includeShortLived=false)
 
void AddParallelGeometryAllNeutral (const std::vector< G4String > &parallelGeometryNames, G4bool includeShortLived=false)
 
void BeVerbose ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
- Public Member Functions inherited from G4VPhysicsConstructor
 G4VPhysicsConstructor (const G4String &="")
 
 G4VPhysicsConstructor (const G4String &name, G4int physics_type)
 
virtual ~G4VPhysicsConstructor ()
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
G4int GetInstanceID () const
 
virtual void TerminateWorker ()
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Types inherited from G4VPhysicsConstructor
using PhysicsBuilder_V = G4VPCData::PhysicsBuilders_V
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
PhysicsBuilder_V GetBuilders () const
 
void AddBuilder (G4PhysicsBuilderInterface *bld)
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel = 0
 
G4String namePhysics = ""
 
G4int typePhysics = 0
 
G4ParticleTabletheParticleTable = nullptr
 
G4int g4vpcInstanceID = 0
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 41 of file G4GenericBiasingPhysics.hh.

Constructor & Destructor Documentation

◆ G4GenericBiasingPhysics()

G4GenericBiasingPhysics::G4GenericBiasingPhysics ( const G4String & name = "BiasingP")

Definition at line 59 of file G4GenericBiasingPhysics.cc.

61 fPhysBiasAllCharged(false), fNonPhysBiasAllCharged(false),
62 fPhysBiasAllChargedISL(false), fNonPhysBiasAllChargedISL(false),
63 fPhysBiasAllNeutral(false), fNonPhysBiasAllNeutral(false),
64 fPhysBiasAllNeutralISL(false), fNonPhysBiasAllNeutralISL(false),
65 fVerbose(false)
66{;}
G4VPhysicsConstructor(const G4String &="")

◆ ~G4GenericBiasingPhysics()

G4GenericBiasingPhysics::~G4GenericBiasingPhysics ( )
virtual

Definition at line 70 of file G4GenericBiasingPhysics.cc.

71{;}

Member Function Documentation

◆ AddParallelGeometry() [1/4]

void G4GenericBiasingPhysics::AddParallelGeometry ( const G4String & particleName,
const G4String & parallelGeometryName )

Definition at line 186 of file G4GenericBiasingPhysics.cc.

187{
188 // -- add particle, caring of possible duplication:
189 G4bool isKnown = false;
190 for ( G4String knownParticle : fParticlesWithParallelGeometries )
191 {
192 if ( knownParticle == particleName )
193 {
194 isKnown = true;
195 break;
196 }
197 }
198
199 // -- add the geometry, caring for possible duplication of this geometry, for this particle:
200 if ( !isKnown ) fParticlesWithParallelGeometries.push_back( particleName );
201 std::vector< G4String >& geometries = fParallelGeometriesForParticle[particleName];
202
203 isKnown = false;
204 for ( G4String knownGeometry : geometries )
205 {
206 if ( knownGeometry == parallelGeometryName )
207 {
208 isKnown = true;
209 break;
210 }
211 }
212 if ( !isKnown ) geometries.push_back( parallelGeometryName );
213
214}
bool G4bool
Definition G4Types.hh:86

Referenced by AddParallelGeometry(), and AddParallelGeometry().

◆ AddParallelGeometry() [2/4]

void G4GenericBiasingPhysics::AddParallelGeometry ( const G4String & particleName,
const std::vector< G4String > & parallelGeometryNames )

Definition at line 216 of file G4GenericBiasingPhysics.cc.

217{
218 for ( G4String geometry : parallelGeometryNames ) AddParallelGeometry( particleName, geometry );
219}
void AddParallelGeometry(const G4String &particleName, const G4String &parallelGeometryName)

◆ AddParallelGeometry() [3/4]

void G4GenericBiasingPhysics::AddParallelGeometry ( G4int PDGlow,
G4int PDGhigh,
const G4String & parallelGeometryName,
G4bool includeAntiParticle = true )

Definition at line 221 of file G4GenericBiasingPhysics.cc.

222{
223 if ( PDGlow > PDGhigh )
224 {
225 G4cout << "G4GenericBiasingPhysics::AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const G4String& parallelGeometryName , G4bool includeAntiParticle = true ), PDGlow > PDGhigh : call ignored" << G4endl;
226 return;
227 }
228
229 fPDGlowParallelGeometries .push_back( PDGlow );
230 fPDGhighParallelGeometries.push_back( PDGhigh );
231 G4int rangeIndex = G4int(fPDGlowParallelGeometries.size() - 1);
232 fPDGrangeParallelGeometries[rangeIndex].push_back( parallelGeometryName );
233
234 if ( includeAntiParticle )
235 {
236 fPDGlowParallelGeometries .push_back( -PDGhigh );
237 fPDGhighParallelGeometries.push_back( -PDGlow );
238 rangeIndex = G4int(fPDGlowParallelGeometries.size() - 1);
239 fPDGrangeParallelGeometries[rangeIndex].push_back( parallelGeometryName );
240 }
241
242}
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

◆ AddParallelGeometry() [4/4]

void G4GenericBiasingPhysics::AddParallelGeometry ( G4int PDGlow,
G4int PDGhigh,
const std::vector< G4String > & parallelGeometryNames,
G4bool includeAntiParticle = true )

Definition at line 244 of file G4GenericBiasingPhysics.cc.

245{
246 if ( PDGlow > PDGhigh )
247 {
248 G4cout << "G4GenericBiasingPhysics::AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const std::vector< G4String >& parallelGeometryNames, G4bool includeAntiParticle = true ), PDGlow > PDGhigh : call ignored" << G4endl;
249 return;
250 }
251
252 for ( G4String geometry : parallelGeometryNames ) AddParallelGeometry( PDGlow, PDGhigh, geometry, includeAntiParticle );
253}

◆ AddParallelGeometryAllCharged() [1/2]

void G4GenericBiasingPhysics::AddParallelGeometryAllCharged ( const G4String & parallelGeometryName,
G4bool includeShortLived = false )

Definition at line 255 of file G4GenericBiasingPhysics.cc.

256{
257 G4bool isKnown = false;
258 for ( G4String geometry : fParallelGeometriesForCharged )
259 {
260 if ( geometry == parallelGeometryName )
261 {
262 isKnown = true;
263 break;
264 }
265 }
266 if ( !isKnown )
267 {
268 fParallelGeometriesForCharged .push_back( parallelGeometryName );
269 fAllChargedParallelGeometriesISL.push_back( includeShortLived );
270 }
271}

Referenced by AddParallelGeometryAllCharged().

◆ AddParallelGeometryAllCharged() [2/2]

void G4GenericBiasingPhysics::AddParallelGeometryAllCharged ( const std::vector< G4String > & parallelGeometryNames,
G4bool includeShortLived = false )

Definition at line 273 of file G4GenericBiasingPhysics.cc.

274{
275 for ( G4String geometry : parallelGeometryNames ) AddParallelGeometryAllCharged( geometry, includeShortLived );
276}
void AddParallelGeometryAllCharged(const G4String &parallelGeometryName, G4bool includeShortLived=false)

◆ AddParallelGeometryAllNeutral() [1/2]

void G4GenericBiasingPhysics::AddParallelGeometryAllNeutral ( const G4String & parallelGeometryName,
G4bool includeShortLived = false )

Definition at line 278 of file G4GenericBiasingPhysics.cc.

279{
280 G4bool isKnown = false;
281 for ( G4String geometry : fParallelGeometriesForNeutral )
282 {
283 if ( geometry == parallelGeometryName )
284 {
285 isKnown = true;
286 break;
287 }
288 }
289 if ( !isKnown )
290 {
291 fParallelGeometriesForNeutral .push_back( parallelGeometryName );
292 fAllNeutralParallelGeometriesISL.push_back( includeShortLived );
293 }
294}

Referenced by AddParallelGeometryAllNeutral().

◆ AddParallelGeometryAllNeutral() [2/2]

void G4GenericBiasingPhysics::AddParallelGeometryAllNeutral ( const std::vector< G4String > & parallelGeometryNames,
G4bool includeShortLived = false )

Definition at line 296 of file G4GenericBiasingPhysics.cc.

297{
298 for ( G4String geometry : parallelGeometryNames ) AddParallelGeometryAllNeutral( geometry, includeShortLived );
299}
void AddParallelGeometryAllNeutral(const G4String &parallelGeometryName, G4bool includeShortLived=false)

◆ BeVerbose()

void G4GenericBiasingPhysics::BeVerbose ( )
inline

Definition at line 106 of file G4GenericBiasingPhysics.hh.

106{ fVerbose = true; }

◆ Bias() [1/2]

void G4GenericBiasingPhysics::Bias ( const G4String & particleName)

Definition at line 101 of file G4GenericBiasingPhysics.cc.

102{
103 PhysicsBias(particleName);
104 NonPhysicsBias(particleName);
105}
void PhysicsBias(const G4String &particleName)
void NonPhysicsBias(const G4String &particleName)

◆ Bias() [2/2]

void G4GenericBiasingPhysics::Bias ( const G4String & particleName,
const std::vector< G4String > & processToBiasNames )

Definition at line 109 of file G4GenericBiasingPhysics.cc.

110{
111 PhysicsBias(particleName, processNames);
112 NonPhysicsBias(particleName);
113}

◆ BiasAddPDGRange()

void G4GenericBiasingPhysics::BiasAddPDGRange ( G4int PDGlow,
G4int PDGhigh,
G4bool includeAntiParticle = true )

Definition at line 143 of file G4GenericBiasingPhysics.cc.

144{
145 if ( PDGlow > PDGhigh ) G4cout << " G4GenericBiasingPhysics::BiasAddPDGRange(...) : PDGlow > PDGhigh, call ignored." << G4endl;
146 PhysicsBiasAddPDGRange ( PDGlow, PDGhigh, includeAntiParticle );
147 NonPhysicsBiasAddPDGRange( PDGlow, PDGhigh, includeAntiParticle );
148}
void NonPhysicsBiasAddPDGRange(G4int PDGlow, G4int PDGhigh, G4bool includeAntiParticle=true)
void PhysicsBiasAddPDGRange(G4int PDGlow, G4int PDGhigh, G4bool includeAntiParticle=true)

◆ BiasAllCharged()

void G4GenericBiasingPhysics::BiasAllCharged ( G4bool includeShortLived = false)

Definition at line 160 of file G4GenericBiasingPhysics.cc.

161{
162 fPhysBiasAllCharged = true;
163 fNonPhysBiasAllCharged = true;
164 fPhysBiasAllChargedISL = includeShortLived;
165 fNonPhysBiasAllChargedISL = includeShortLived;
166}

◆ BiasAllNeutral()

void G4GenericBiasingPhysics::BiasAllNeutral ( G4bool includeShortLived = false)

Definition at line 177 of file G4GenericBiasingPhysics.cc.

178{
179 fPhysBiasAllNeutral = true;
180 fNonPhysBiasAllNeutral = true;
181 fPhysBiasAllNeutralISL = includeShortLived;
182 fNonPhysBiasAllNeutralISL = includeShortLived;
183}

◆ ConstructParticle()

void G4GenericBiasingPhysics::ConstructParticle ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 305 of file G4GenericBiasingPhysics.cc.

306{;}

◆ ConstructProcess()

void G4GenericBiasingPhysics::ConstructProcess ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 310 of file G4GenericBiasingPhysics.cc.

311{
312
313 // -- bias setup per individual particle name:
315 particleIterator->reset();
316
317 while( (*particleIterator)() )
318 {
319 G4ParticleDefinition* particle = particleIterator->value();
320 G4String particleName = particle->GetParticleName();
321 G4ProcessManager* pmanager = particle->GetProcessManager();
322
323 // -- include non physics process interface for biasing:
324 if ( std::find(fNonPhysBiasedParticles.begin(),
325 fNonPhysBiasedParticles.end(),
326 particleName ) != fNonPhysBiasedParticles.end() )
327 {
329 }
330
331 // -- wrap biased physics processes, all processes or only user selected:
332 std::vector< G4String >::const_iterator particleIt =
333 std::find(fBiasedParticles.begin(),
334 fBiasedParticles.end(),
335 particleName );
336 if ( particleIt == fBiasedParticles.end() ) continue;
337
338 std::vector < G4String >& biasedProcesses = fBiasedProcesses [ particleIt - fBiasedParticles.begin() ];
339 G4bool biasAll = fBiasAllProcesses[ particleIt - fBiasedParticles.begin() ];
340
341 if ( biasAll )
342 {
343 G4ProcessVector* vprocess = pmanager->GetProcessList();
344 for (G4int ip = 0 ; ip < (G4int)vprocess->size() ; ++ip)
345 {
346 G4VProcess* process = (*vprocess)[ip];
347 biasedProcesses.push_back( process->GetProcessName() );
348 }
349 }
350
351 G4bool restartLoop(true);
352 while ( restartLoop )
353 {
354 for (std::size_t ip = 0 ; ip < biasedProcesses.size() ; ++ip)
355 {
356 G4bool activ = G4BiasingHelper::ActivatePhysicsBiasing(pmanager, biasedProcesses[ip] );
357 restartLoop = activ;
358 if ( restartLoop ) break;
359 }
360 }
361
362 }
363
364
365 // -- bias setup per group:
366 particleIterator->reset();
367
368 while( (*particleIterator)() )
369 {
370 G4ParticleDefinition* particle = particleIterator->value();
371 G4String particleName = particle->GetParticleName();
372 G4ProcessManager* pmanager = particle->GetProcessManager();
373
374 // -- exclude particles invidually specified by name:
375 if ( std::find( fNonPhysBiasedParticles.begin(),
376 fNonPhysBiasedParticles.end(),
377 particleName ) != fNonPhysBiasedParticles.end() ) continue;
378
379 if ( std::find( fBiasedParticles.begin(),
380 fBiasedParticles.end(),
381 particleName ) != fBiasedParticles.end() ) continue;
382
383
384 G4bool physBias(false), nonPhysBias(false);
385
386 auto PDG = particle->GetPDGEncoding();
387
388 // -- include particle if in right PDG range:
389 for ( std::size_t i = 0 ; i < fPhysBiasByPDGRangeLow.size() ; i++ )
390 if ( ( PDG >= fPhysBiasByPDGRangeLow[i] ) && ( PDG <= fPhysBiasByPDGRangeHigh[i] ) )
391 {
392 physBias = true;
393 break;
394 }
395 for ( std::size_t i = 0 ; i < fNonPhysBiasByPDGRangeLow.size() ; i++ )
396 if ( ( PDG >= fNonPhysBiasByPDGRangeLow[i] ) && ( PDG <= fNonPhysBiasByPDGRangeHigh[i] ) )
397 {
398 nonPhysBias = true;
399 break;
400 }
401
402 // -- if particle has not yet any biasing, include it on charge criteria:
403 if ( ( physBias == false ) && ( nonPhysBias == false ) )
404 {
405 if ( std::abs( particle->GetPDGCharge() ) > DBL_MIN )
406 {
407 if ( fPhysBiasAllCharged ) if ( fPhysBiasAllChargedISL || !particle->IsShortLived() ) physBias = true;
408 if ( fNonPhysBiasAllCharged ) if ( fNonPhysBiasAllChargedISL || !particle->IsShortLived() ) nonPhysBias = true;
409 }
410 else
411 {
412 if ( fPhysBiasAllNeutral ) if ( fPhysBiasAllNeutralISL || !particle->IsShortLived() ) physBias = true;
413 if ( fNonPhysBiasAllNeutral ) if ( fNonPhysBiasAllNeutralISL || !particle->IsShortLived() ) nonPhysBias = true;
414 }
415 }
416
417
418 if ( nonPhysBias ) G4BiasingHelper::ActivateNonPhysicsBiasing(pmanager);
419
420 if ( physBias )
421 {
422 std::vector < G4String > biasedProcesses;
423 G4ProcessVector* vprocess = pmanager->GetProcessList();
424 for (G4int ip = 0 ; ip < (G4int)vprocess->size() ; ++ip)
425 {
426 G4VProcess* process = (*vprocess)[ip];
427 biasedProcesses.push_back( process->GetProcessName() );
428 }
429
430 G4bool restartLoop(true);
431 while ( restartLoop )
432 {
433 for (std::size_t ip = 0 ; ip < biasedProcesses.size() ; ++ip)
434 {
435 G4bool activ = G4BiasingHelper::ActivatePhysicsBiasing(pmanager, biasedProcesses[ip] );
436 restartLoop = activ;
437 if ( restartLoop ) break;
438 }
439 }
440 }
441
442 }
443
444
445
446 // -- Associate parallel geometries:
447 AssociateParallelGeometries();
448
449
450 // -- tells what is done:
451 if ( fVerbose )
452 {
453 // -- print:
454 particleIterator->reset();
455
456 while( (*particleIterator)() )
457 {
458 G4ParticleDefinition* particle = particleIterator->value();
459 G4String particleName = particle->GetParticleName();
460 G4ProcessManager* pmanager = particle->GetProcessManager();
461
462 G4bool isBiased(false);
463 G4String processNames;
464 G4int icount(0);
465
466 G4ProcessVector* vprocess = pmanager->GetProcessList();
467 for (G4int ip = 0 ; ip < (G4int)vprocess->size() ; ++ip)
468 {
469 G4VProcess* process = (*vprocess)[ip];
470 G4BiasingProcessInterface* pb = dynamic_cast< G4BiasingProcessInterface* >(process);
471 if ( pb != nullptr )
472 {
473 isBiased = true;
474 if ( icount < 3 )
475 {
476 processNames += pb->GetProcessName();
477 processNames += " ";
478 }
479 else
480 {
481 processNames += "\n ";
482 processNames += pb->GetProcessName();
483 processNames += " ";
484 icount = 0;
485 }
486 icount++;
487 }
488 }
489 if ( isBiased )
490 {
491 if ( particle->IsShortLived() )
492 G4cout << std::setw(14) << particleName << " **** : " << processNames << G4endl;
493 else
494 G4cout << std::setw(18) << particleName << " : " << processNames << G4endl;
495 }
496 }
497 }
498}
std::vector< G4InuclElementaryParticle >::iterator particleIterator
static G4bool ActivatePhysicsBiasing(G4ProcessManager *pmanager, const G4String &physicsProcessToBias, const G4String &wrappedName="")
static void ActivateNonPhysicsBiasing(G4ProcessManager *pmanager, const G4String &nonPhysicsProcessName="")
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4ProcessVector * GetProcessList() const
std::size_t size() const
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
const G4String & GetProcessName() const
#define DBL_MIN
Definition templates.hh:54

◆ NonPhysicsBias()

void G4GenericBiasingPhysics::NonPhysicsBias ( const G4String & particleName)

Definition at line 94 of file G4GenericBiasingPhysics.cc.

95{
96 fNonPhysBiasedParticles.push_back(particleName);
97}

Referenced by Bias(), and Bias().

◆ NonPhysicsBiasAddPDGRange()

void G4GenericBiasingPhysics::NonPhysicsBiasAddPDGRange ( G4int PDGlow,
G4int PDGhigh,
G4bool includeAntiParticle = true )

Definition at line 129 of file G4GenericBiasingPhysics.cc.

130{
131 if ( PDGlow > PDGhigh ) G4cout << " G4GenericBiasingPhysics::NonPhysicsBiasAddPDGRange(...) : PDGlow > PDGhigh, call ignored." << G4endl;
132 fNonPhysBiasByPDGRangeLow .push_back( PDGlow );
133 fNonPhysBiasByPDGRangeHigh.push_back( PDGhigh );
134 if ( includeAntiParticle )
135 {
136 fNonPhysBiasByPDGRangeLow .push_back( -PDGhigh );
137 fNonPhysBiasByPDGRangeHigh.push_back( -PDGlow );
138 }
139}

Referenced by BiasAddPDGRange().

◆ NonPhysicsBiasAllCharged()

void G4GenericBiasingPhysics::NonPhysicsBiasAllCharged ( G4bool includeShortLived = false)

Definition at line 155 of file G4GenericBiasingPhysics.cc.

156{
157 fNonPhysBiasAllCharged = true;
158 fNonPhysBiasAllChargedISL = includeShortLived;
159}

◆ NonPhysicsBiasAllNeutral()

void G4GenericBiasingPhysics::NonPhysicsBiasAllNeutral ( G4bool includeShortLived = false)

Definition at line 172 of file G4GenericBiasingPhysics.cc.

173{
174 fNonPhysBiasAllNeutral = true;
175 fNonPhysBiasAllNeutralISL = includeShortLived;
176}

◆ PhysicsBias() [1/2]

void G4GenericBiasingPhysics::PhysicsBias ( const G4String & particleName)

Definition at line 76 of file G4GenericBiasingPhysics.cc.

77{
78 fBiasedParticles.push_back(particleName);
79 fBiasedProcesses.emplace_back();
80 fBiasAllProcesses.push_back(true);
81}

Referenced by Bias(), and Bias().

◆ PhysicsBias() [2/2]

void G4GenericBiasingPhysics::PhysicsBias ( const G4String & particleName,
const std::vector< G4String > & processToBiasNames )

Definition at line 85 of file G4GenericBiasingPhysics.cc.

86{
87 fBiasedParticles.push_back(particleName);
88 fBiasedProcesses.push_back(processNames);
89 fBiasAllProcesses.push_back(false);
90}

◆ PhysicsBiasAddPDGRange()

void G4GenericBiasingPhysics::PhysicsBiasAddPDGRange ( G4int PDGlow,
G4int PDGhigh,
G4bool includeAntiParticle = true )

Definition at line 116 of file G4GenericBiasingPhysics.cc.

117{
118 if ( PDGlow > PDGhigh ) G4cout << " G4GenericBiasingPhysics::PhysicsBiasAddPDGRange(...) : PDGlow > PDGhigh, call ignored." << G4endl;
119 fPhysBiasByPDGRangeLow .push_back( PDGlow );
120 fPhysBiasByPDGRangeHigh.push_back( PDGhigh );
121 if ( includeAntiParticle )
122 {
123 fPhysBiasByPDGRangeLow .push_back( -PDGhigh );
124 fPhysBiasByPDGRangeHigh.push_back( -PDGlow );
125 }
126}

Referenced by BiasAddPDGRange().

◆ PhysicsBiasAllCharged()

void G4GenericBiasingPhysics::PhysicsBiasAllCharged ( G4bool includeShortLived = false)

Definition at line 150 of file G4GenericBiasingPhysics.cc.

151{
152 fPhysBiasAllCharged = true;
153 fPhysBiasAllChargedISL = includeShortLived;
154}

◆ PhysicsBiasAllNeutral()

void G4GenericBiasingPhysics::PhysicsBiasAllNeutral ( G4bool includeShortLived = false)

Definition at line 167 of file G4GenericBiasingPhysics.cc.

168{
169 fPhysBiasAllNeutral = true;
170 fPhysBiasAllNeutralISL = includeShortLived;
171}

The documentation for this class was generated from the following files: