Geant4  10.03
B03PhysicsList.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 // $Id: B03PhysicsList.cc 75089 2013-10-25 23:25:21Z dwright $
31 //
32 
33 #include "globals.hh"
34 #include <iomanip>
35 
36 #include "B03PhysicsList.hh"
37 
38 #include "G4ParticleDefinition.hh"
39 #include "G4ParticleWithCuts.hh"
40 #include "G4ProcessManager.hh"
41 #include "G4ProcessVector.hh"
42 #include "G4ParticleTypes.hh"
43 #include "G4ParticleTable.hh"
44 #include "G4BosonConstructor.hh"
45 #include "G4LeptonConstructor.hh"
46 #include "G4MesonConstructor.hh"
47 #include "G4BaryonConstructor.hh"
48 #include "G4IonConstructor.hh"
50 #include "G4Material.hh"
51 #include "G4MaterialTable.hh"
52 #include "G4SystemOfUnits.hh"
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55 
57 {
58  fParaWorldName.clear();
59  SetVerboseLevel(1);
60 }
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65 {
66  fParaWorldName.clear();
67 }
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
72 {
73  // In this method, static member functions should be called
74  // for all particles which you want to use.
75  // This ensures that objects of these particle types will be
76  // created in the program.
77 
84 }
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87 
89 {
90  // Construct all bosons
91  G4BosonConstructor pConstructor;
92  pConstructor.ConstructParticle();
93 }
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
96 
98 {
99  // Construct all leptons
100  G4LeptonConstructor pConstructor;
101  pConstructor.ConstructParticle();
102 }
103 
104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105 
107 {
108  // Construct all mesons
109  G4MesonConstructor pConstructor;
110  pConstructor.ConstructParticle();
111 }
112 
113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
114 
116 {
117  // Construct all barions
118  G4BaryonConstructor pConstructor;
119  pConstructor.ConstructParticle();
120 }
121 
122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
123 
125 {
126  // Construct light ions
127  G4IonConstructor pConstructor;
128  pConstructor.ConstructParticle();
129 }
130 
131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132 
134 {
135  // Construct resonaces and quarks
136  G4ShortLivedConstructor pConstructor;
137  pConstructor.ConstructParticle();
138 }
139 
140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
141 
143 {
147  ConstructEM();
149  ConstructHad();
151 }
152 
153 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
154 
155 #include "G4ComptonScattering.hh"
156 #include "G4GammaConversion.hh"
157 #include "G4PhotoElectricEffect.hh"
158 
159 #include "G4eMultipleScattering.hh"
160 #include "G4MuMultipleScattering.hh"
161 #include "G4hMultipleScattering.hh"
162 
163 #include "G4eIonisation.hh"
164 #include "G4eBremsstrahlung.hh"
165 #include "G4eplusAnnihilation.hh"
166 
167 #include "G4MuIonisation.hh"
168 #include "G4MuBremsstrahlung.hh"
169 #include "G4MuPairProduction.hh"
170 
171 #include "G4hIonisation.hh"
172 
174 {
176  particleIterator->reset();
177  while( (*particleIterator)() ){
178  G4ParticleDefinition* particle = particleIterator->value();
179  G4ProcessManager* pmanager = particle->GetProcessManager();
180  G4String particleName = particle->GetParticleName();
181 
182  if (particleName == "gamma") {
183  // gamma
184  // Construct processes for gamma
185  pmanager->AddDiscreteProcess(new G4GammaConversion());
186  pmanager->AddDiscreteProcess(new G4ComptonScattering());
187  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
188 
189  } else if (particleName == "e-") {
190  //electron
191  // Construct processes for electron
192  pmanager->AddProcess(new G4eMultipleScattering(),-1,1,1);
193  pmanager->AddProcess(new G4eIonisation(),-1,2,2);
194  pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
195 
196  } else if (particleName == "e+") {
197  //positron
198  // Construct processes for positron
199  pmanager->AddProcess(new G4eMultipleScattering(),-1,1,1);
200 
201  pmanager->AddProcess(new G4eIonisation(),-1,2,2);
202  pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
203  pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);
204 
205  } else if( particleName == "mu+" ||
206  particleName == "mu-" ) {
207  //muon
208  // Construct processes for muon+
209  pmanager->AddProcess(new G4MuMultipleScattering(),-1,1,1);
210  pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
211  pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
212  pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
213 
214  } else if( particleName == "GenericIon" ) {
215  pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
216  pmanager->AddProcess(new G4hIonisation(),-1,2,2);
217  } else {
218  if ((particle->GetPDGCharge() != 0.0) &&
219  (particle->GetParticleName() != "chargedgeantino")&&
220  (!particle->IsShortLived()) ) {
221  // all others charged particles except geantino
222  pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
223  pmanager->AddProcess(new G4hIonisation(),-1,2,2);
224  }
225  }
226  }
227 }
228 
229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
230 
231 // Hadron Processes
232 
233 #include "G4HadronElasticProcess.hh"
234 #include "G4HadronFissionProcess.hh"
235 #include "G4HadronCaptureProcess.hh"
236 
262 
263 // Low-energy Models
264 
265 #include "G4HadronElastic.hh"
266 #include "G4NeutronRadCapture.hh"
267 #include "G4LFission.hh"
268 
269 // -- generator models
270 #include "G4TheoFSGenerator.hh"
271 #include "G4ExcitationHandler.hh"
272 #include "G4Evaporation.hh"
273 #include "G4CompetitiveFission.hh"
274 #include "G4FermiBreakUp.hh"
275 #include "G4StatMF.hh"
277 #include "G4Fancy3DNucleus.hh"
278 #include "G4CascadeInterface.hh"
279 #include "G4StringModel.hh"
280 #include "G4PreCompoundModel.hh"
281 #include "G4FTFModel.hh"
282 #include "G4QGSMFragmentation.hh"
284 #include "G4ExcitedStringDecay.hh"
285 #include "G4QMDReaction.hh"
287 
288 // Cross sections
289 #include "G4IonsShenCrossSection.hh"
290 #include "G4TripathiCrossSection.hh"
292 
293 //
294 // ConstructHad()
295 //
296 // Makes discrete physics processes for the hadrons
297 // The processes are: Elastic scattering, Inelastic scattering,
298 // Fission (for neutron only), and Capture (neutron).
299 //
300 
302 {
303  // this will be the model class for high energies
304  G4TheoFSGenerator* theTheoModel = new G4TheoFSGenerator;
305  G4TheoFSGenerator* antiBHighEnergyModel = new G4TheoFSGenerator;
306 
307  // all models for treatment of thermal nucleus
308  G4Evaporation* theEvaporation = new G4Evaporation;
309  G4FermiBreakUp* theFermiBreakUp = new G4FermiBreakUp;
310  G4StatMF* theMF = new G4StatMF;
311 
312  // Evaporation logic
313  G4ExcitationHandler* theHandler = new G4ExcitationHandler;
314  theHandler->SetEvaporation(theEvaporation);
315  theHandler->SetFermiModel(theFermiBreakUp);
316  theHandler->SetMultiFragmentation(theMF);
317  theHandler->SetMaxAandZForFermiBreakUp(12, 6);
318  theHandler->SetMinEForMultiFrag(3*MeV);
319 
320  // Pre equilibrium stage
321  G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel(theHandler);
322 
323  // a no-cascade generator-precompound interaface
324  G4GeneratorPrecompoundInterface* theCascade =
326  theCascade->SetDeExcitation(thePreEquilib);
327 
328  // Bertini cascade
329  G4CascadeInterface* bertini = new G4CascadeInterface;
330  bertini->SetMaxEnergy(22*MeV);
331 
332  // here come the high energy parts
333  G4VPartonStringModel* theStringModel;
334  theStringModel = new G4FTFModel;
335  theTheoModel->SetTransport(theCascade);
336  theTheoModel->SetHighEnergyGenerator(theStringModel);
337  theTheoModel->SetMinEnergy(19*GeV);
338  theTheoModel->SetMaxEnergy(100*TeV);
339 
340  G4VLongitudinalStringDecay* theFragmentation = new G4QGSMFragmentation;
341  G4ExcitedStringDecay* theStringDecay =
342  new G4ExcitedStringDecay(theFragmentation);
343  theStringModel->SetFragmentationModel(theStringDecay);
344 
345  // high energy model for anti-baryons
346  antiBHighEnergyModel = new G4TheoFSGenerator("ANTI-FTFP");
347  G4FTFModel* antiBStringModel = new G4FTFModel;
348  G4ExcitedStringDecay* stringDecay =
350  antiBStringModel->SetFragmentationModel(stringDecay);
351 
352  G4GeneratorPrecompoundInterface* antiBCascade =
354  G4PreCompoundModel* preEquilib =
356  antiBCascade->SetDeExcitation(preEquilib);
357 
358  antiBHighEnergyModel->SetTransport(antiBCascade);
359  antiBHighEnergyModel->SetHighEnergyGenerator(antiBStringModel);
360  antiBHighEnergyModel->SetMinEnergy(0.0);
361  antiBHighEnergyModel->SetMaxEnergy(20*TeV);
362 
363  // Light ion models
365  binaryCascade->SetMinEnergy(0.0);
366  binaryCascade->SetMaxEnergy(110*MeV);
367 
368  G4QMDReaction* qmd = new G4QMDReaction;
369  qmd->SetMinEnergy(100*MeV);
370  qmd->SetMaxEnergy(10*GeV);
371 
375 
376  // Elastic process
377  G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
378  G4HadronElastic* theElasticModel = new G4HadronElastic;
379  theElasticProcess->RegisterMe(theElasticModel);
380 
382  particleIterator->reset();
383  while ((*particleIterator)()) {
384  G4ParticleDefinition* particle = particleIterator->value();
385  G4ProcessManager* pmanager = particle->GetProcessManager();
386  G4String particleName = particle->GetParticleName();
387 
388  if (particleName == "pi+") {
389  pmanager->AddDiscreteProcess(theElasticProcess);
390  G4PionPlusInelasticProcess* theInelasticProcess =
391  new G4PionPlusInelasticProcess("inelastic");
392  theInelasticProcess->RegisterMe(bertini);
393  theInelasticProcess->RegisterMe(theTheoModel);
394  pmanager->AddDiscreteProcess(theInelasticProcess);
395  } else if (particleName == "pi-") {
396  pmanager->AddDiscreteProcess(theElasticProcess);
397  G4PionMinusInelasticProcess* theInelasticProcess =
398  new G4PionMinusInelasticProcess("inelastic");
399  theInelasticProcess->RegisterMe(bertini);
400  theInelasticProcess->RegisterMe(theTheoModel);
401  pmanager->AddDiscreteProcess(theInelasticProcess);
402  } else if (particleName == "kaon+") {
403  pmanager->AddDiscreteProcess(theElasticProcess);
404  G4KaonPlusInelasticProcess* theInelasticProcess =
405  new G4KaonPlusInelasticProcess("inelastic");
406  theInelasticProcess->RegisterMe(bertini);
407  theInelasticProcess->RegisterMe(theTheoModel);
408  pmanager->AddDiscreteProcess(theInelasticProcess);
409  }
410  else if (particleName == "kaon0S") {
411  pmanager->AddDiscreteProcess(theElasticProcess);
412  G4KaonZeroSInelasticProcess* theInelasticProcess =
413  new G4KaonZeroSInelasticProcess("inelastic");
414  theInelasticProcess->RegisterMe(bertini);
415  theInelasticProcess->RegisterMe(theTheoModel);
416  pmanager->AddDiscreteProcess(theInelasticProcess);
417  }
418  else if (particleName == "kaon0L") {
419  pmanager->AddDiscreteProcess(theElasticProcess);
420  G4KaonZeroLInelasticProcess* theInelasticProcess =
421  new G4KaonZeroLInelasticProcess("inelastic");
422  theInelasticProcess->RegisterMe(bertini);
423  theInelasticProcess->RegisterMe(theTheoModel);
424  pmanager->AddDiscreteProcess(theInelasticProcess);
425  }
426  else if (particleName == "kaon-") {
427  pmanager->AddDiscreteProcess(theElasticProcess);
428  G4KaonMinusInelasticProcess* theInelasticProcess =
429  new G4KaonMinusInelasticProcess("inelastic");
430  theInelasticProcess->RegisterMe(bertini);
431  theInelasticProcess->RegisterMe(theTheoModel);
432  pmanager->AddDiscreteProcess(theInelasticProcess);
433  }
434  else if (particleName == "proton") {
435  pmanager->AddDiscreteProcess(theElasticProcess);
436  G4ProtonInelasticProcess* theInelasticProcess =
437  new G4ProtonInelasticProcess("inelastic");
438  theInelasticProcess->RegisterMe(bertini);
439  theInelasticProcess->RegisterMe(theTheoModel);
440  pmanager->AddDiscreteProcess(theInelasticProcess);
441  }
442  else if (particleName == "anti_proton") {
443  pmanager->AddDiscreteProcess(theElasticProcess);
444  G4AntiProtonInelasticProcess* theInelasticProcess =
445  new G4AntiProtonInelasticProcess("inelastic");
446  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
447  pmanager->AddDiscreteProcess(theInelasticProcess);
448 
449  } else if (particleName == "neutron") {
450  // elastic scattering
451  pmanager->AddDiscreteProcess(theElasticProcess);
452 
453  // inelastic scattering
454  G4NeutronInelasticProcess* theInelasticProcess =
455  new G4NeutronInelasticProcess("inelastic");
456  theInelasticProcess->RegisterMe(bertini);
457  theInelasticProcess->RegisterMe(theTheoModel);
458  pmanager->AddDiscreteProcess(theInelasticProcess);
459 
460  // fission
461  G4HadronFissionProcess* theFissionProcess = new G4HadronFissionProcess;
462  G4LFission* theFissionModel = new G4LFission;
463  theFissionProcess->RegisterMe(theFissionModel);
464  pmanager->AddDiscreteProcess(theFissionProcess);
465 
466  // capture
467  G4HadronCaptureProcess* theCaptureProcess = new G4HadronCaptureProcess;
468  G4NeutronRadCapture* theCaptureModel = new G4NeutronRadCapture;
469  theCaptureProcess->RegisterMe(theCaptureModel);
470  pmanager->AddDiscreteProcess(theCaptureProcess);
471 
472  } else if (particleName == "anti_neutron") {
473  pmanager->AddDiscreteProcess(theElasticProcess);
474  G4AntiNeutronInelasticProcess* theInelasticProcess =
475  new G4AntiNeutronInelasticProcess("inelastic");
476  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
477  pmanager->AddDiscreteProcess(theInelasticProcess);
478 
479  } else if (particleName == "lambda") {
480  pmanager->AddDiscreteProcess(theElasticProcess);
481  G4LambdaInelasticProcess* theInelasticProcess =
482  new G4LambdaInelasticProcess("inelastic");
483  theInelasticProcess->RegisterMe(bertini);
484  theInelasticProcess->RegisterMe(theTheoModel);
485  pmanager->AddDiscreteProcess(theInelasticProcess);
486  }
487  else if (particleName == "anti_lambda") {
488  pmanager->AddDiscreteProcess(theElasticProcess);
489  G4AntiLambdaInelasticProcess* theInelasticProcess =
490  new G4AntiLambdaInelasticProcess("inelastic");
491  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
492  pmanager->AddDiscreteProcess(theInelasticProcess);
493  }
494  else if (particleName == "sigma+") {
495  pmanager->AddDiscreteProcess(theElasticProcess);
496  G4SigmaPlusInelasticProcess* theInelasticProcess =
497  new G4SigmaPlusInelasticProcess("inelastic");
498  theInelasticProcess->RegisterMe(bertini);
499  theInelasticProcess->RegisterMe(theTheoModel);
500  pmanager->AddDiscreteProcess(theInelasticProcess);
501  }
502  else if (particleName == "sigma-") {
503  pmanager->AddDiscreteProcess(theElasticProcess);
504  G4SigmaMinusInelasticProcess* theInelasticProcess =
505  new G4SigmaMinusInelasticProcess("inelastic");
506  theInelasticProcess->RegisterMe(bertini);
507  theInelasticProcess->RegisterMe(theTheoModel);
508  pmanager->AddDiscreteProcess(theInelasticProcess);
509  }
510  else if (particleName == "anti_sigma+") {
511  pmanager->AddDiscreteProcess(theElasticProcess);
512  G4AntiSigmaPlusInelasticProcess* theInelasticProcess =
513  new G4AntiSigmaPlusInelasticProcess("inelastic");
514  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
515  pmanager->AddDiscreteProcess(theInelasticProcess);
516  }
517  else if (particleName == "anti_sigma-") {
518  pmanager->AddDiscreteProcess(theElasticProcess);
519  G4AntiSigmaMinusInelasticProcess* theInelasticProcess =
520  new G4AntiSigmaMinusInelasticProcess("inelastic");
521  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
522  pmanager->AddDiscreteProcess(theInelasticProcess);
523  }
524  else if (particleName == "xi0") {
525  pmanager->AddDiscreteProcess(theElasticProcess);
526  G4XiZeroInelasticProcess* theInelasticProcess =
527  new G4XiZeroInelasticProcess("inelastic");
528  theInelasticProcess->RegisterMe(bertini);
529  theInelasticProcess->RegisterMe(theTheoModel);
530  pmanager->AddDiscreteProcess(theInelasticProcess);
531  }
532  else if (particleName == "xi-") {
533  pmanager->AddDiscreteProcess(theElasticProcess);
534  G4XiMinusInelasticProcess* theInelasticProcess =
535  new G4XiMinusInelasticProcess("inelastic");
536  theInelasticProcess->RegisterMe(bertini);
537  theInelasticProcess->RegisterMe(theTheoModel);
538  pmanager->AddDiscreteProcess(theInelasticProcess);
539  }
540  else if (particleName == "anti_xi0") {
541  pmanager->AddDiscreteProcess(theElasticProcess);
542  G4AntiXiZeroInelasticProcess* theInelasticProcess =
543  new G4AntiXiZeroInelasticProcess("inelastic");
544  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
545  pmanager->AddDiscreteProcess(theInelasticProcess);
546  }
547  else if (particleName == "anti_xi-") {
548  pmanager->AddDiscreteProcess(theElasticProcess);
549  G4AntiXiMinusInelasticProcess* theInelasticProcess =
550  new G4AntiXiMinusInelasticProcess("inelastic");
551  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
552  pmanager->AddDiscreteProcess(theInelasticProcess);
553  }
554  else if (particleName == "deuteron") {
555  pmanager->AddDiscreteProcess(theElasticProcess);
556  G4DeuteronInelasticProcess* theInelasticProcess =
557  new G4DeuteronInelasticProcess("inelastic");
558  theInelasticProcess->RegisterMe(binaryCascade);
559  theInelasticProcess->RegisterMe(qmd);
560  theInelasticProcess->AddDataSet(shenXS);
561  theInelasticProcess->AddDataSet(tripXS);
562  theInelasticProcess->AddDataSet(tripLightXS);
563  pmanager->AddDiscreteProcess(theInelasticProcess);
564  }
565  else if (particleName == "triton") {
566  pmanager->AddDiscreteProcess(theElasticProcess);
567  G4TritonInelasticProcess* theInelasticProcess =
568  new G4TritonInelasticProcess("inelastic");
569  theInelasticProcess->RegisterMe(binaryCascade);
570  theInelasticProcess->RegisterMe(qmd);
571  theInelasticProcess->AddDataSet(shenXS);
572  theInelasticProcess->AddDataSet(tripXS);
573  theInelasticProcess->AddDataSet(tripLightXS);
574  pmanager->AddDiscreteProcess(theInelasticProcess);
575  }
576  else if (particleName == "alpha") {
577  pmanager->AddDiscreteProcess(theElasticProcess);
578  G4AlphaInelasticProcess* theInelasticProcess =
579  new G4AlphaInelasticProcess("inelastic");
580  theInelasticProcess->RegisterMe(binaryCascade);
581  theInelasticProcess->RegisterMe(qmd);
582  theInelasticProcess->AddDataSet(shenXS);
583  theInelasticProcess->AddDataSet(tripXS);
584  theInelasticProcess->AddDataSet(tripLightXS);
585  pmanager->AddDiscreteProcess(theInelasticProcess);
586 
587  } else if (particleName == "omega-") {
588  pmanager->AddDiscreteProcess(theElasticProcess);
589  G4OmegaMinusInelasticProcess* theInelasticProcess =
590  new G4OmegaMinusInelasticProcess("inelastic");
591  theInelasticProcess->RegisterMe(bertini);
592  theInelasticProcess->RegisterMe(theTheoModel);
593  pmanager->AddDiscreteProcess(theInelasticProcess);
594 
595  } else if (particleName == "anti_omega-") {
596  pmanager->AddDiscreteProcess(theElasticProcess);
597  G4AntiOmegaMinusInelasticProcess* theInelasticProcess =
598  new G4AntiOmegaMinusInelasticProcess("inelastic");
599  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
600  pmanager->AddDiscreteProcess(theInelasticProcess);
601  }
602  }
603 }
604 
605 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
606 
608 {;}
609 
610 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
611 
612 #include "G4Decay.hh"
614 {
615  G4Decay* theDecayProcess = new G4Decay();
617  particleIterator->reset();
618  while( (*particleIterator)() ){
619  G4ParticleDefinition* particle = particleIterator->value();
620  G4ProcessManager* pmanager = particle->GetProcessManager();
621  if (theDecayProcess->IsApplicable(*particle)) {
622  pmanager ->AddProcess(theDecayProcess);
623  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
624  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
625  }
626  }
627 }
628 
629 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
630 
632 {
633  if (verboseLevel >0)
634  {
635  G4cout << "B03PhysicsList::SetCuts:";
636  G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
637  }
638  // "G4VUserPhysicsList::SetCutsWithDefault" method sets
639  // the default cut value for all particle types
641 }
642 
643 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
644 
645 #include "G4ParallelWorldProcess.hh"
647 
648  G4int npw = fParaWorldName.size();
649  for ( G4int i = 0; i < npw; i++){
650  G4String procName = "ParaWorldProc_"+fParaWorldName[i];
651  G4ParallelWorldProcess* theParallelWorldProcess
652  = new G4ParallelWorldProcess(procName);
653  theParallelWorldProcess->SetParallelWorld(fParaWorldName[i]);
654 
656  particleIterator->reset();
657  while( (*particleIterator)() ){
658  G4ParticleDefinition* particle = particleIterator->value();
659  G4ProcessManager* pmanager = particle->GetProcessManager();
660  pmanager->AddProcess(theParallelWorldProcess);
661  if(theParallelWorldProcess->IsAtRestRequired(particle))
662  {pmanager->SetProcessOrdering(theParallelWorldProcess, idxAtRest, 9900);}
663  pmanager->SetProcessOrderingToSecond(theParallelWorldProcess, idxAlongStep);
664  pmanager->SetProcessOrdering(theParallelWorldProcess, idxPostStep, 9900);
665  }
666  }
667 
668 }
669 
670 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
671 
672 #include "G4ImportanceProcess.hh"
673 #include "G4IStore.hh"
675 
676 
677  G4cout << " Preparing Importance Sampling with GhostWorld "
678  << fBiasWorldName << G4endl;
679  fGeomSampler->SetParallel(true); // parallelworld
682  // fGeomSampler->PrepareImportanceSampling(G4IStore::
683  // GetInstance(fBiasWorldName), 0);
684  static G4bool first = true;
685  if(first) {
687 
689  G4cout << " GeomSampler Configured!!! " << G4endl;
690  first = false;
691  }
692 
693 #ifdef G4MULTITHREADED
695 #else
696  G4cout << " Running in singlethreaded mode!!! " << G4endl;
697 #endif
698 
699 }
700 
701 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SetWorld(const G4VPhysicalVolume *world)
void ConstructAllBosons()
static constexpr double mm
Definition: G4SIunits.hh:115
void AddScoringProcess()
void SetProcessOrderingToSecond(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4Decay.cc:89
void SetFragmentationModel(G4VStringFragmentation *aModel)
G4bool IsAtRestRequired(G4ParticleDefinition *)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
Definition of the B03PhysicsList class.
void SetMinEForMultiFrag(G4double anE)
void SetParallel(G4bool paraflag)
static void ConstructParticle()
virtual void SetCuts()
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
virtual const G4VPhysicalVolume * GetParallelWorldVolumePointer() const
Definition: G4IStore.cc:93
const G4String & GetParticleName() const
void SetHighEnergyGenerator(G4VHighEnergyGenerator *const value)
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
static constexpr double TeV
Definition: G4SIunits.hh:218
void AddBiasingProcess()
void SetParallelWorld(G4String parallelWorldName)
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
virtual void ConstructGeneral()
G4GLOB_DLL std::ostream G4cout
static void ConstructParticle()
virtual void ConstructProcess()
virtual void ConstructLeptHad()
bool G4bool
Definition: G4Types.hh:79
virtual void AddProcess()
void SetFermiModel(G4VFermiBreakUp *ptr)
void SetVerboseLevel(G4int value)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetMultiFragmentation(G4VMultiFragmentation *ptr)
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
void ConstructAllLeptons()
static void ConstructParticle()
void SetEvaporation(G4VEvaporation *ptr, G4bool isLocal=false)
virtual void ConstructHad()
void ConstructAllShortLiveds()
void ConstructAllBaryons()
static G4IStore * GetInstance()
Definition: G4IStore.cc:210
virtual void ConstructEM()
void ConstructAllMesons()
G4ProcessManager * GetProcessManager() const
void SetMaxAandZForFermiBreakUp(G4int anA, G4int aZ)
virtual void ConstructParticle()
static constexpr double GeV
Definition: G4SIunits.hh:217
void SetMaxEnergy(const G4double anEnergy)
void SetDeExcitation(G4VPreCompoundModel *ptr)
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
#define G4endl
Definition: G4ios.hh:61
void SetTransport(G4VIntraNuclearTransportModel *const value)
static constexpr double MeV
Definition: G4SIunits.hh:214
G4String fBiasWorldName
G4GeometrySampler * fGeomSampler
virtual void Configure()
G4double GetPDGCharge() const
virtual void PrepareImportanceSampling(G4VIStore *istore, const G4VImportanceAlgorithm *ialg)
std::vector< G4String > fParaWorldName
virtual ~B03PhysicsList()