Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4StepLimiterPhysics Class Reference

#include <G4StepLimiterPhysics.hh>

Inheritance diagram for G4StepLimiterPhysics:
Collaboration 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 ()
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4int GetInstanceID () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel
 
G4String namePhysics
 
G4int typePhysics
 
G4ParticleTabletheParticleTable
 
G4int g4vpcInstanceID
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 43 of file G4StepLimiterPhysics.hh.

Constructor & Destructor Documentation

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

Definition at line 57 of file G4StepLimiterPhysics.cc.

58  : G4VPhysicsConstructor(name),fStepLimiter(0),fUserSpecialCuts(0),
59  fApplyToAll(false)
60 {}
G4VPhysicsConstructor(const G4String &="")
G4StepLimiterPhysics::~G4StepLimiterPhysics ( )
virtual

Definition at line 64 of file G4StepLimiterPhysics.cc.

65 {
66  delete fStepLimiter;
67  delete fUserSpecialCuts;
68 }

Member Function Documentation

void G4StepLimiterPhysics::ConstructParticle ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 72 of file G4StepLimiterPhysics.cc.

73 {}
void G4StepLimiterPhysics::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 77 of file G4StepLimiterPhysics.cc.

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

Here is the call graph for this function:

G4bool G4StepLimiterPhysics::GetApplyToAll ( ) const
inline

Definition at line 63 of file G4StepLimiterPhysics.hh.

63 { return fApplyToAll; }
void G4StepLimiterPhysics::SetApplyToAll ( G4bool  option)
inline

Definition at line 62 of file G4StepLimiterPhysics.hh.

62 { fApplyToAll= option; }

Here is the caller graph for this function:


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