33#include "G4ParticleDefinition.hh"
34#include "G4ParticleWithCuts.hh"
35#include "G4ProcessManager.hh"
36#include "G4ProcessVector.hh"
37#include "G4ParticleTypes.hh"
38#include "G4ParticleTable.hh"
39#include "G4Material.hh"
46 defaultCutValue = 1.0*cm;
76 G4Geantino::GeantinoDefinition();
77 G4ChargedGeantino::ChargedGeantinoDefinition();
80 G4Gamma::GammaDefinition();
89 G4Electron::ElectronDefinition();
90 G4Positron::PositronDefinition();
92 G4MuonPlus::MuonPlusDefinition();
93 G4MuonMinus::MuonMinusDefinition();
95 G4NeutrinoE::NeutrinoEDefinition();
96 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
98 G4NeutrinoMu::NeutrinoMuDefinition();
99 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
108 G4PionPlus::PionPlusDefinition();
109 G4PionMinus::PionMinusDefinition();
110 G4PionZero::PionZeroDefinition();
111 G4Eta::EtaDefinition();
112 G4EtaPrime::EtaPrimeDefinition();
113 G4KaonPlus::KaonPlusDefinition();
114 G4KaonMinus::KaonMinusDefinition();
115 G4KaonZero::KaonZeroDefinition();
116 G4AntiKaonZero::AntiKaonZeroDefinition();
117 G4KaonZeroLong::KaonZeroLongDefinition();
118 G4KaonZeroShort::KaonZeroShortDefinition();
126 G4Proton::ProtonDefinition();
127 G4AntiProton::AntiProtonDefinition();
129 G4Neutron::NeutronDefinition();
130 G4AntiNeutron::AntiNeutronDefinition();
144#include "G4ComptonScattering.hh"
145#include "G4GammaConversion.hh"
146#include "G4PhotoElectricEffect.hh"
148#include "G4MultipleScattering.hh"
150#include "G4eIonisation.hh"
151#include "G4eBremsstrahlung.hh"
152#include "G4eplusAnnihilation.hh"
154#include "G4MuIonisation.hh"
155#include "G4MuBremsstrahlung.hh"
156#include "G4MuPairProduction.hh"
158#include "G4hIonisation.hh"
160#include "G4UserSpecialCuts.hh"
166 theParticleIterator->reset();
167 while( (*theParticleIterator)() ){
168 G4ParticleDefinition* particle = theParticleIterator->value();
169 G4ProcessManager* pmanager = particle->GetProcessManager();
170 G4String particleName = particle->GetParticleName();
172 if (particleName ==
"gamma") {
174 pmanager->AddDiscreteProcess(
new G4GammaConversion());
175 pmanager->AddDiscreteProcess(
new G4ComptonScattering());
176 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect());
178 }
else if (particleName ==
"e-") {
180 G4VProcess* theeminusMultipleScattering =
new G4MultipleScattering();
181 G4VProcess* theeminusIonisation =
new G4eIonisation();
182 G4VProcess* theeminusBremsstrahlung =
new G4eBremsstrahlung();
185 pmanager->AddProcess(theeminusMultipleScattering);
186 pmanager->AddProcess(theeminusIonisation);
187 pmanager->AddProcess(theeminusBremsstrahlung);
190 pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
191 pmanager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2);
194 pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
195 pmanager->SetProcessOrdering(theeminusIonisation, idxPostStep,2);
196 pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3);
198 }
else if (particleName ==
"e+") {
200 G4VProcess* theeplusMultipleScattering =
new G4MultipleScattering();
201 G4VProcess* theeplusIonisation =
new G4eIonisation();
202 G4VProcess* theeplusBremsstrahlung =
new G4eBremsstrahlung();
203 G4VProcess* theeplusAnnihilation =
new G4eplusAnnihilation();
206 pmanager->AddProcess(theeplusMultipleScattering);
207 pmanager->AddProcess(theeplusIonisation);
208 pmanager->AddProcess(theeplusBremsstrahlung);
209 pmanager->AddProcess(theeplusAnnihilation);
212 pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
215 pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
216 pmanager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2);
219 pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
220 pmanager->SetProcessOrdering(theeplusIonisation, idxPostStep,2);
221 pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3);
222 pmanager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4);
224 }
else if( particleName ==
"mu+" ||
225 particleName ==
"mu-" ) {
227 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
228 G4VProcess* aBremsstrahlung =
new G4MuBremsstrahlung();
229 G4VProcess* aPairProduction =
new G4MuPairProduction();
230 G4VProcess* anIonisation =
new G4MuIonisation();
233 pmanager->AddProcess(anIonisation);
234 pmanager->AddProcess(aMultipleScattering);
235 pmanager->AddProcess(aBremsstrahlung);
236 pmanager->AddProcess(aPairProduction);
239 pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
240 pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
243 pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
244 pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
245 pmanager->SetProcessOrdering(aBremsstrahlung, idxPostStep,3);
246 pmanager->SetProcessOrdering(aPairProduction, idxPostStep,4);
248 }
else if ((!particle->IsShortLived()) &&
249 (particle->GetPDGCharge() != 0.0) &&
250 (particle->GetParticleName() !=
"chargedgeantino")) {
252 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
253 G4VProcess* anIonisation =
new G4hIonisation();
258 pmanager->AddProcess(anIonisation);
259 pmanager->AddProcess(aMultipleScattering);
264 pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
265 pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
269 pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
270 pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
282 G4Decay* theDecayProcess =
new G4Decay();
283 theParticleIterator->reset();
284 while( (*theParticleIterator)() ){
285 G4ParticleDefinition* particle = theParticleIterator->value();
286 G4ProcessManager* pmanager = particle->GetProcessManager();
287 if (theDecayProcess->IsApplicable(*particle)) {
288 pmanager ->AddProcess(theDecayProcess);
290 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
291 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
303 SetCutsWithDefault();
305 if (verboseLevel>0) DumpCutValuesTable();