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

#include <G4StepLimiterPhysics.hh>

+ Inheritance diagram for G4StepLimiterPhysics:

Public Member Functions

 G4StepLimiterPhysics (const G4String &name="stepLimiter")
 
virtual ~G4StepLimiterPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
void SetApplyToAll (G4bool option)
 
G4bool GetApplyToAll () const
 
- Public Member Functions inherited from G4VPhysicsConstructor
 G4VPhysicsConstructor (const G4String &="")
 
 G4VPhysicsConstructor (const G4String &name, G4int physics_type)
 
virtual ~G4VPhysicsConstructor ()
 
virtual void ConstructParticle ()=0
 
virtual void ConstructProcess ()=0
 
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 42 of file G4StepLimiterPhysics.hh.

Constructor & Destructor Documentation

◆ G4StepLimiterPhysics()

G4StepLimiterPhysics::G4StepLimiterPhysics ( const G4String name = "stepLimiter")

Definition at line 57 of file G4StepLimiterPhysics.cc.

◆ ~G4StepLimiterPhysics()

G4StepLimiterPhysics::~G4StepLimiterPhysics ( )
virtual

Definition at line 65 of file G4StepLimiterPhysics.cc.

66{}

Member Function Documentation

◆ ConstructParticle()

void G4StepLimiterPhysics::ConstructParticle ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 70 of file G4StepLimiterPhysics.cc.

71{}

◆ ConstructProcess()

void G4StepLimiterPhysics::ConstructProcess ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 75 of file G4StepLimiterPhysics.cc.

76{
77 auto myParticleIterator=GetParticleIterator();
78 myParticleIterator->reset();
79
80 G4StepLimiter* stepLimiter = new G4StepLimiter();
81 G4UserSpecialCuts* userSpecialCuts = new G4UserSpecialCuts();
82 while ((*myParticleIterator)()) {
83 G4ParticleDefinition* particle = myParticleIterator->value();
84 G4ProcessManager* pmanager = particle->GetProcessManager();
85 G4double charge = particle->GetPDGCharge();
86
87 if(!particle->IsShortLived()) {
88 if (charge != 0.0 || fApplyToAll) {
89 // All charged particles should have a step limiter
90 // to make sure that the steps do not get too long.
91 pmanager->AddDiscreteProcess(stepLimiter);
92 pmanager->AddDiscreteProcess(userSpecialCuts);
93 } else {
94 // Energy cuts for all other neutral particles
95 pmanager->AddDiscreteProcess(userSpecialCuts);
96 }
97 }
98 }
99}
double G4double
Definition: G4Types.hh:83
G4ProcessManager * GetProcessManager() const
G4double GetPDGCharge() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const

◆ GetApplyToAll()

G4bool G4StepLimiterPhysics::GetApplyToAll ( ) const
inline

Definition at line 62 of file G4StepLimiterPhysics.hh.

62{ return fApplyToAll; }

◆ SetApplyToAll()

void G4StepLimiterPhysics::SetApplyToAll ( G4bool  option)
inline

Definition at line 61 of file G4StepLimiterPhysics.hh.

61{ fApplyToAll= option; }

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