Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4StepLimiterPhysics.cxx
Go to the documentation of this file.
1//------------------------------------------------
2// The Geant4 Virtual Monte Carlo package
3// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4// All rights reserved.
5//
6// For the licensing terms see geant4_vmc/LICENSE.
7// Contact: root-vmc@cern.ch
8//-------------------------------------------------
9
14
16
17#include <G4ParticleDefinition.hh>
18#include <G4ProcessManager.hh>
19#include <G4StepLimiter.hh>
20
21//_____________________________________________________________________________
23 : TG4VPhysicsConstructor(name), fStepLimiterProcess(0)
24{
26}
27
28//_____________________________________________________________________________
30 G4int theVerboseLevel, const G4String& name)
31 : TG4VPhysicsConstructor(name, theVerboseLevel), fStepLimiterProcess(0)
32{
34}
35
36//_____________________________________________________________________________
43
44//
45// protected methods
46//
47
48//_____________________________________________________________________________
53
54//_____________________________________________________________________________
56{
58
59 fStepLimiterProcess = new G4StepLimiter();
60
61 auto aParticleIterator = GetParticleIterator();
62 aParticleIterator->reset();
63 while ((*aParticleIterator)()) {
64
65 G4ParticleDefinition* particle = aParticleIterator->value();
66 G4ProcessManager* pmanager = particle->GetProcessManager();
67
68 if (!pmanager) continue;
69
70 pmanager->AddProcess(fStepLimiterProcess, -1, -1, 6);
71 }
72
73 if (VerboseLevel() > 0) {
74 G4cout << "### Step limiter physics constructed." << G4endl;
75 }
76}
Definition of the TG4StepLimiterPhysics class.
virtual void ConstructParticle()
Construct particles.
TG4StepLimiterPhysics(const G4String &name="StepLimiter")
virtual void ConstructProcess()
Construct physics processes.
G4StepLimiter * fStepLimiterProcess
step limiter process
Abstract base class for physics constructors with verbose.
virtual G4int VerboseLevel() const