Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 "G4CompetitiveFission.hh"
274 #include "G4Fancy3DNucleus.hh"
275 #include "G4CascadeInterface.hh"
276 #include "G4StringModel.hh"
277 #include "G4PreCompoundModel.hh"
278 #include "G4FTFModel.hh"
279 #include "G4QGSMFragmentation.hh"
281 #include "G4ExcitedStringDecay.hh"
282 #include "G4QMDReaction.hh"
284 
285 // Cross sections
286 #include "G4IonsShenCrossSection.hh"
287 #include "G4TripathiCrossSection.hh"
289 
290 //
291 // ConstructHad()
292 //
293 // Makes discrete physics processes for the hadrons
294 // The processes are: Elastic scattering, Inelastic scattering,
295 // Fission (for neutron only), and Capture (neutron).
296 //
297 
299 {
300  // this will be the model class for high energies
301  G4TheoFSGenerator* theTheoModel = new G4TheoFSGenerator;
302  G4TheoFSGenerator* antiBHighEnergyModel = new G4TheoFSGenerator;
303 
304  // Evaporation logic
305  G4ExcitationHandler* theHandler = new G4ExcitationHandler;
306  theHandler->SetMinEForMultiFrag(3*MeV);
307 
308  // Pre equilibrium stage
309  G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel(theHandler);
310 
311  // a no-cascade generator-precompound interaface
312  G4GeneratorPrecompoundInterface* theCascade =
314  theCascade->SetDeExcitation(thePreEquilib);
315 
316  // Bertini cascade
317  G4CascadeInterface* bertini = new G4CascadeInterface;
318  bertini->SetMaxEnergy(22*MeV);
319 
320  // here come the high energy parts
321  G4VPartonStringModel* theStringModel;
322  theStringModel = new G4FTFModel;
323  theTheoModel->SetTransport(theCascade);
324  theTheoModel->SetHighEnergyGenerator(theStringModel);
325  theTheoModel->SetMinEnergy(19*GeV);
326  theTheoModel->SetMaxEnergy(100*TeV);
327 
328  G4VLongitudinalStringDecay* theFragmentation = new G4QGSMFragmentation;
329  G4ExcitedStringDecay* theStringDecay =
330  new G4ExcitedStringDecay(theFragmentation);
331  theStringModel->SetFragmentationModel(theStringDecay);
332 
333  // high energy model for anti-baryons
334  antiBHighEnergyModel = new G4TheoFSGenerator("ANTI-FTFP");
335  G4FTFModel* antiBStringModel = new G4FTFModel;
336  G4ExcitedStringDecay* stringDecay =
338  antiBStringModel->SetFragmentationModel(stringDecay);
339 
340  G4GeneratorPrecompoundInterface* antiBCascade =
342  G4PreCompoundModel* preEquilib =
344  antiBCascade->SetDeExcitation(preEquilib);
345 
346  antiBHighEnergyModel->SetTransport(antiBCascade);
347  antiBHighEnergyModel->SetHighEnergyGenerator(antiBStringModel);
348  antiBHighEnergyModel->SetMinEnergy(0.0);
349  antiBHighEnergyModel->SetMaxEnergy(20*TeV);
350 
351  // Light ion models
353  binaryCascade->SetMinEnergy(0.0);
354  binaryCascade->SetMaxEnergy(110*MeV);
355 
356  G4QMDReaction* qmd = new G4QMDReaction;
357  qmd->SetMinEnergy(100*MeV);
358  qmd->SetMaxEnergy(10*GeV);
359 
363 
364  // Elastic process
365  G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
366  G4HadronElastic* theElasticModel = new G4HadronElastic;
367  theElasticProcess->RegisterMe(theElasticModel);
368 
370  particleIterator->reset();
371  while ((*particleIterator)()) {
372  G4ParticleDefinition* particle = particleIterator->value();
373  G4ProcessManager* pmanager = particle->GetProcessManager();
374  G4String particleName = particle->GetParticleName();
375 
376  if (particleName == "pi+") {
377  pmanager->AddDiscreteProcess(theElasticProcess);
378  G4PionPlusInelasticProcess* theInelasticProcess =
379  new G4PionPlusInelasticProcess("inelastic");
380  theInelasticProcess->RegisterMe(bertini);
381  theInelasticProcess->RegisterMe(theTheoModel);
382  pmanager->AddDiscreteProcess(theInelasticProcess);
383  } else if (particleName == "pi-") {
384  pmanager->AddDiscreteProcess(theElasticProcess);
385  G4PionMinusInelasticProcess* theInelasticProcess =
386  new G4PionMinusInelasticProcess("inelastic");
387  theInelasticProcess->RegisterMe(bertini);
388  theInelasticProcess->RegisterMe(theTheoModel);
389  pmanager->AddDiscreteProcess(theInelasticProcess);
390  } else if (particleName == "kaon+") {
391  pmanager->AddDiscreteProcess(theElasticProcess);
392  G4KaonPlusInelasticProcess* theInelasticProcess =
393  new G4KaonPlusInelasticProcess("inelastic");
394  theInelasticProcess->RegisterMe(bertini);
395  theInelasticProcess->RegisterMe(theTheoModel);
396  pmanager->AddDiscreteProcess(theInelasticProcess);
397  }
398  else if (particleName == "kaon0S") {
399  pmanager->AddDiscreteProcess(theElasticProcess);
400  G4KaonZeroSInelasticProcess* theInelasticProcess =
401  new G4KaonZeroSInelasticProcess("inelastic");
402  theInelasticProcess->RegisterMe(bertini);
403  theInelasticProcess->RegisterMe(theTheoModel);
404  pmanager->AddDiscreteProcess(theInelasticProcess);
405  }
406  else if (particleName == "kaon0L") {
407  pmanager->AddDiscreteProcess(theElasticProcess);
408  G4KaonZeroLInelasticProcess* theInelasticProcess =
409  new G4KaonZeroLInelasticProcess("inelastic");
410  theInelasticProcess->RegisterMe(bertini);
411  theInelasticProcess->RegisterMe(theTheoModel);
412  pmanager->AddDiscreteProcess(theInelasticProcess);
413  }
414  else if (particleName == "kaon-") {
415  pmanager->AddDiscreteProcess(theElasticProcess);
416  G4KaonMinusInelasticProcess* theInelasticProcess =
417  new G4KaonMinusInelasticProcess("inelastic");
418  theInelasticProcess->RegisterMe(bertini);
419  theInelasticProcess->RegisterMe(theTheoModel);
420  pmanager->AddDiscreteProcess(theInelasticProcess);
421  }
422  else if (particleName == "proton") {
423  pmanager->AddDiscreteProcess(theElasticProcess);
424  G4ProtonInelasticProcess* theInelasticProcess =
425  new G4ProtonInelasticProcess("inelastic");
426  theInelasticProcess->RegisterMe(bertini);
427  theInelasticProcess->RegisterMe(theTheoModel);
428  pmanager->AddDiscreteProcess(theInelasticProcess);
429  }
430  else if (particleName == "anti_proton") {
431  pmanager->AddDiscreteProcess(theElasticProcess);
432  G4AntiProtonInelasticProcess* theInelasticProcess =
433  new G4AntiProtonInelasticProcess("inelastic");
434  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
435  pmanager->AddDiscreteProcess(theInelasticProcess);
436 
437  } else if (particleName == "neutron") {
438  // elastic scattering
439  pmanager->AddDiscreteProcess(theElasticProcess);
440 
441  // inelastic scattering
442  G4NeutronInelasticProcess* theInelasticProcess =
443  new G4NeutronInelasticProcess("inelastic");
444  theInelasticProcess->RegisterMe(bertini);
445  theInelasticProcess->RegisterMe(theTheoModel);
446  pmanager->AddDiscreteProcess(theInelasticProcess);
447 
448  // fission
449  G4HadronFissionProcess* theFissionProcess = new G4HadronFissionProcess;
450  G4LFission* theFissionModel = new G4LFission;
451  theFissionProcess->RegisterMe(theFissionModel);
452  pmanager->AddDiscreteProcess(theFissionProcess);
453 
454  // capture
455  G4HadronCaptureProcess* theCaptureProcess = new G4HadronCaptureProcess;
456  G4NeutronRadCapture* theCaptureModel = new G4NeutronRadCapture;
457  theCaptureProcess->RegisterMe(theCaptureModel);
458  pmanager->AddDiscreteProcess(theCaptureProcess);
459 
460  } else if (particleName == "anti_neutron") {
461  pmanager->AddDiscreteProcess(theElasticProcess);
462  G4AntiNeutronInelasticProcess* theInelasticProcess =
463  new G4AntiNeutronInelasticProcess("inelastic");
464  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
465  pmanager->AddDiscreteProcess(theInelasticProcess);
466 
467  } else if (particleName == "lambda") {
468  pmanager->AddDiscreteProcess(theElasticProcess);
469  G4LambdaInelasticProcess* theInelasticProcess =
470  new G4LambdaInelasticProcess("inelastic");
471  theInelasticProcess->RegisterMe(bertini);
472  theInelasticProcess->RegisterMe(theTheoModel);
473  pmanager->AddDiscreteProcess(theInelasticProcess);
474  }
475  else if (particleName == "anti_lambda") {
476  pmanager->AddDiscreteProcess(theElasticProcess);
477  G4AntiLambdaInelasticProcess* theInelasticProcess =
478  new G4AntiLambdaInelasticProcess("inelastic");
479  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
480  pmanager->AddDiscreteProcess(theInelasticProcess);
481  }
482  else if (particleName == "sigma+") {
483  pmanager->AddDiscreteProcess(theElasticProcess);
484  G4SigmaPlusInelasticProcess* theInelasticProcess =
485  new G4SigmaPlusInelasticProcess("inelastic");
486  theInelasticProcess->RegisterMe(bertini);
487  theInelasticProcess->RegisterMe(theTheoModel);
488  pmanager->AddDiscreteProcess(theInelasticProcess);
489  }
490  else if (particleName == "sigma-") {
491  pmanager->AddDiscreteProcess(theElasticProcess);
492  G4SigmaMinusInelasticProcess* theInelasticProcess =
493  new G4SigmaMinusInelasticProcess("inelastic");
494  theInelasticProcess->RegisterMe(bertini);
495  theInelasticProcess->RegisterMe(theTheoModel);
496  pmanager->AddDiscreteProcess(theInelasticProcess);
497  }
498  else if (particleName == "anti_sigma+") {
499  pmanager->AddDiscreteProcess(theElasticProcess);
500  G4AntiSigmaPlusInelasticProcess* theInelasticProcess =
501  new G4AntiSigmaPlusInelasticProcess("inelastic");
502  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
503  pmanager->AddDiscreteProcess(theInelasticProcess);
504  }
505  else if (particleName == "anti_sigma-") {
506  pmanager->AddDiscreteProcess(theElasticProcess);
507  G4AntiSigmaMinusInelasticProcess* theInelasticProcess =
508  new G4AntiSigmaMinusInelasticProcess("inelastic");
509  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
510  pmanager->AddDiscreteProcess(theInelasticProcess);
511  }
512  else if (particleName == "xi0") {
513  pmanager->AddDiscreteProcess(theElasticProcess);
514  G4XiZeroInelasticProcess* theInelasticProcess =
515  new G4XiZeroInelasticProcess("inelastic");
516  theInelasticProcess->RegisterMe(bertini);
517  theInelasticProcess->RegisterMe(theTheoModel);
518  pmanager->AddDiscreteProcess(theInelasticProcess);
519  }
520  else if (particleName == "xi-") {
521  pmanager->AddDiscreteProcess(theElasticProcess);
522  G4XiMinusInelasticProcess* theInelasticProcess =
523  new G4XiMinusInelasticProcess("inelastic");
524  theInelasticProcess->RegisterMe(bertini);
525  theInelasticProcess->RegisterMe(theTheoModel);
526  pmanager->AddDiscreteProcess(theInelasticProcess);
527  }
528  else if (particleName == "anti_xi0") {
529  pmanager->AddDiscreteProcess(theElasticProcess);
530  G4AntiXiZeroInelasticProcess* theInelasticProcess =
531  new G4AntiXiZeroInelasticProcess("inelastic");
532  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
533  pmanager->AddDiscreteProcess(theInelasticProcess);
534  }
535  else if (particleName == "anti_xi-") {
536  pmanager->AddDiscreteProcess(theElasticProcess);
537  G4AntiXiMinusInelasticProcess* theInelasticProcess =
538  new G4AntiXiMinusInelasticProcess("inelastic");
539  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
540  pmanager->AddDiscreteProcess(theInelasticProcess);
541  }
542  else if (particleName == "deuteron") {
543  pmanager->AddDiscreteProcess(theElasticProcess);
544  G4DeuteronInelasticProcess* theInelasticProcess =
545  new G4DeuteronInelasticProcess("inelastic");
546  theInelasticProcess->RegisterMe(binaryCascade);
547  theInelasticProcess->RegisterMe(qmd);
548  theInelasticProcess->AddDataSet(shenXS);
549  theInelasticProcess->AddDataSet(tripXS);
550  theInelasticProcess->AddDataSet(tripLightXS);
551  pmanager->AddDiscreteProcess(theInelasticProcess);
552  }
553  else if (particleName == "triton") {
554  pmanager->AddDiscreteProcess(theElasticProcess);
555  G4TritonInelasticProcess* theInelasticProcess =
556  new G4TritonInelasticProcess("inelastic");
557  theInelasticProcess->RegisterMe(binaryCascade);
558  theInelasticProcess->RegisterMe(qmd);
559  theInelasticProcess->AddDataSet(shenXS);
560  theInelasticProcess->AddDataSet(tripXS);
561  theInelasticProcess->AddDataSet(tripLightXS);
562  pmanager->AddDiscreteProcess(theInelasticProcess);
563  }
564  else if (particleName == "alpha") {
565  pmanager->AddDiscreteProcess(theElasticProcess);
566  G4AlphaInelasticProcess* theInelasticProcess =
567  new G4AlphaInelasticProcess("inelastic");
568  theInelasticProcess->RegisterMe(binaryCascade);
569  theInelasticProcess->RegisterMe(qmd);
570  theInelasticProcess->AddDataSet(shenXS);
571  theInelasticProcess->AddDataSet(tripXS);
572  theInelasticProcess->AddDataSet(tripLightXS);
573  pmanager->AddDiscreteProcess(theInelasticProcess);
574 
575  } else if (particleName == "omega-") {
576  pmanager->AddDiscreteProcess(theElasticProcess);
577  G4OmegaMinusInelasticProcess* theInelasticProcess =
578  new G4OmegaMinusInelasticProcess("inelastic");
579  theInelasticProcess->RegisterMe(bertini);
580  theInelasticProcess->RegisterMe(theTheoModel);
581  pmanager->AddDiscreteProcess(theInelasticProcess);
582 
583  } else if (particleName == "anti_omega-") {
584  pmanager->AddDiscreteProcess(theElasticProcess);
585  G4AntiOmegaMinusInelasticProcess* theInelasticProcess =
586  new G4AntiOmegaMinusInelasticProcess("inelastic");
587  theInelasticProcess->RegisterMe(antiBHighEnergyModel);
588  pmanager->AddDiscreteProcess(theInelasticProcess);
589  }
590  }
591 }
592 
593 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
594 
596 {;}
597 
598 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
599 
600 #include "G4Decay.hh"
602 {
603  G4Decay* theDecayProcess = new G4Decay();
605  particleIterator->reset();
606  while( (*particleIterator)() ){
607  G4ParticleDefinition* particle = particleIterator->value();
608  G4ProcessManager* pmanager = particle->GetProcessManager();
609  if (theDecayProcess->IsApplicable(*particle)) {
610  pmanager ->AddProcess(theDecayProcess);
611  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
612  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
613  }
614  }
615 }
616 
617 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
618 
620 {
621  if (verboseLevel >0)
622  {
623  G4cout << "B03PhysicsList::SetCuts:";
624  G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
625  }
626  // "G4VUserPhysicsList::SetCutsWithDefault" method sets
627  // the default cut value for all particle types
629 }
630 
631 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
632 
633 #include "G4ParallelWorldProcess.hh"
635 
636  G4int npw = fParaWorldName.size();
637  for ( G4int i = 0; i < npw; i++){
638  G4String procName = "ParaWorldProc_"+fParaWorldName[i];
639  G4ParallelWorldProcess* theParallelWorldProcess
640  = new G4ParallelWorldProcess(procName);
641  theParallelWorldProcess->SetParallelWorld(fParaWorldName[i]);
642 
644  particleIterator->reset();
645  while( (*particleIterator)() ){
646  G4ParticleDefinition* particle = particleIterator->value();
647  G4ProcessManager* pmanager = particle->GetProcessManager();
648  pmanager->AddProcess(theParallelWorldProcess);
649  if(theParallelWorldProcess->IsAtRestRequired(particle))
650  {pmanager->SetProcessOrdering(theParallelWorldProcess, idxAtRest, 9900);}
651  pmanager->SetProcessOrderingToSecond(theParallelWorldProcess, idxAlongStep);
652  pmanager->SetProcessOrdering(theParallelWorldProcess, idxPostStep, 9900);
653  }
654  }
655 
656 }
657 
658 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
659 
660 #include "G4ImportanceProcess.hh"
661 #include "G4IStore.hh"
663 
664 
665  G4cout << " Preparing Importance Sampling with GhostWorld "
666  << fBiasWorldName << G4endl;
667  fGeomSampler->SetParallel(true); // parallelworld
668  G4IStore* iStore = G4IStore::GetInstance(fBiasWorldName);
669  fGeomSampler->SetWorld(iStore->GetParallelWorldVolumePointer());
670  // fGeomSampler->PrepareImportanceSampling(G4IStore::
671  // GetInstance(fBiasWorldName), 0);
672  static G4bool first = true;
673  if(first) {
674  fGeomSampler->PrepareImportanceSampling(iStore, 0);
675 
676  fGeomSampler->Configure();
677  G4cout << " GeomSampler Configured!!! " << G4endl;
678  first = false;
679  }
680 
681 #ifdef G4MULTITHREADED
682  fGeomSampler->AddProcess();
683 #else
684  G4cout << " Running in singlethreaded mode!!! " << G4endl;
685 #endif
686 
687 }
688 
689 //....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:97
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 SetVerboseLevel(G4int value)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
void ConstructAllLeptons()
static void ConstructParticle()
virtual void ConstructHad()
void ConstructAllShortLiveds()
void ConstructAllBaryons()
static G4IStore * GetInstance()
Definition: G4IStore.cc:236
virtual void ConstructEM()
void ConstructAllMesons()
G4ProcessManager * GetProcessManager() const
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
virtual void Configure()
G4double GetPDGCharge() const
virtual void PrepareImportanceSampling(G4VIStore *istore, const G4VImportanceAlgorithm *ialg)
virtual ~B03PhysicsList()