BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
StepLimiter.cc
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description: Includes G4Steplimiter as process for the different Particles.
5// However, particles will only be affected by this process, if
6// G4UserLimit is associated to a volume. This method is used in
7// BesTofConstruction::ConstructMRPC()
8//Author: Matthias Ullrich
9//Created: October, 2011
10//Modified:
11//Comment:
12//---------------------------------------------------------------------------//
13//$ID: StepLimiter.hh
14
15
16
17
18
19#include "G4ParticleDefinition.hh"
20#include "G4ProcessManager.hh"
21#include "G4LossTableManager.hh"
22
23
24
25#include "G4Gamma.hh"
26#include "G4Electron.hh"
27#include "G4Positron.hh"
28#include "G4MuonPlus.hh"
29#include "G4MuonMinus.hh"
30#include "G4PionPlus.hh"
31#include "G4PionMinus.hh"
32#include "G4KaonPlus.hh"
33#include "G4KaonMinus.hh"
34#include "G4Proton.hh"
35#include "G4AntiProton.hh"
36#include "G4Deuteron.hh"
37#include "G4Triton.hh"
38#include "G4He3.hh"
39#include "G4Alpha.hh"
40#include "G4GenericIon.hh"
41
42
43#include "G4StepLimiter.hh"
44#include "StepLimiter.hh"
45
46StepLimiter::StepLimiter(G4int ver, const G4String& name)
47 : G4VPhysicsConstructor(name), verbose(ver)
48{
49 G4LossTableManager::Instance();
50}
51
53{}
54
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56
58{
59 // gamma
60 G4Gamma::Gamma();
61
62 // leptons
63 G4Electron::Electron();
64 G4Positron::Positron();
65 G4MuonPlus::MuonPlus();
66 G4MuonMinus::MuonMinus();
67
68 // mesons
69 G4PionPlus::PionPlusDefinition();
70 G4PionMinus::PionMinusDefinition();
71 G4KaonPlus::KaonPlusDefinition();
72 G4KaonMinus::KaonMinusDefinition();
73
74 // barions
75 G4Proton::Proton();
76 G4AntiProton::AntiProton();
77
78 // ions
79 G4Deuteron::Deuteron();
80 G4Triton::Triton();
81 G4He3::He3();
82 G4Alpha::Alpha();
83 G4GenericIon::GenericIonDefinition();
84}
85
86//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87
89{
90
91 theParticleIterator->reset();
92 while( (*theParticleIterator)() ){
93 G4ParticleDefinition* particle = theParticleIterator->value();
94 G4ProcessManager* pmanager = particle->GetProcessManager();
95 G4String particleName = particle->GetParticleName();
96
97 if (particleName == "gamma") {
98 pmanager ->AddDiscreteProcess(new G4StepLimiter());
99 } else if (particleName == "e-") {
100 pmanager ->AddDiscreteProcess(new G4StepLimiter());
101 } else if (particleName == "e+") {
102 pmanager ->AddDiscreteProcess(new G4StepLimiter());
103 } else if (particleName == "mu+" ||
104 particleName == "mu-" ) {
105 pmanager ->AddDiscreteProcess(new G4StepLimiter());
106 } else if (particleName == "alpha" ||
107 particleName == "He3") {
108 pmanager ->AddDiscreteProcess(new G4StepLimiter());
109 } else if (particleName == "GenericIon") {
110 pmanager ->AddDiscreteProcess(new G4StepLimiter());
111 } else if (particleName == "pi+" ||
112 particleName == "pi-" ||
113 particleName == "kaon+" ||
114 particleName == "kaon-" ||
115 particleName == "proton" ||
116 particleName == "anti_proton" ) {
117 pmanager ->AddDiscreteProcess(new G4StepLimiter());
118 }
119
120 }
121
122}
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
virtual ~StepLimiter()
Definition: StepLimiter.cc:52
StepLimiter(G4int ver=0, const G4String &name="StepLimiter")
Definition: StepLimiter.cc:46
virtual void ConstructParticle()
Definition: StepLimiter.cc:57
virtual void ConstructProcess()
Definition: StepLimiter.cc:88