LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
NeutronHPphysics.cc
Go to the documentation of this file.
1 
7 #include "NeutronHPphysics.hh"
8 
9 #include "Geant4/G4ParticleDefinition.hh"
10 #include "Geant4/G4ProcessManager.hh"
11 #include "Geant4/G4ProcessTable.hh"
12 
13 // Processes
14 #include "Geant4/G4HadronElasticProcess.hh"
15 #include "Geant4/G4ParticleHPElastic.hh"
16 #include "Geant4/G4ParticleHPElasticData.hh"
17 #include "Geant4/G4ParticleHPThermalScattering.hh"
18 #include "Geant4/G4ParticleHPThermalScatteringData.hh"
19 
20 #include "Geant4/G4NeutronInelasticProcess.hh"
21 #include "Geant4/G4ParticleHPInelastic.hh"
22 #include "Geant4/G4ParticleHPInelasticData.hh"
23 
24 #include "Geant4/G4HadronCaptureProcess.hh"
25 #include "Geant4/G4ParticleHPCapture.hh"
26 #include "Geant4/G4ParticleHPCaptureData.hh"
27 
28 #include "Geant4/G4HadronFissionProcess.hh"
29 #include "Geant4/G4ParticleHPFission.hh"
30 #include "Geant4/G4ParticleHPFissionData.hh"
31 
32 #include "Geant4/G4SystemOfUnits.hh"
33 
34 // Thermal neutron physics is enabled by default
35 // (important for low-energy neutron interactions!)
37  : G4VPhysicsConstructor(name), fThermal(true)
38 {}
39 
41 {
42  G4ParticleDefinition* neutron = G4Neutron::Neutron();
43  G4ProcessManager* pManager = neutron->GetProcessManager();
44 
45  // delete all neutron processes if already registered
46  G4ProcessTable* processTable = G4ProcessTable::GetProcessTable();
47  G4VProcess* process = 0;
48  process = processTable->FindProcess("hadElastic", neutron);
49  if (process) pManager->RemoveProcess(process);
50  //
51  process = processTable->FindProcess("neutronInelastic", neutron);
52  if (process) pManager->RemoveProcess(process);
53  //
54  process = processTable->FindProcess("nCapture", neutron);
55  if (process) pManager->RemoveProcess(process);
56  //
57  process = processTable->FindProcess("nFission", neutron);
58  if (process) pManager->RemoveProcess(process);
59 
60  // (re) create process: elastic
61  //
62  G4HadronElasticProcess* process1 = new G4HadronElasticProcess();
63  pManager->AddDiscreteProcess(process1);
64  //
65  // model1a
66  G4ParticleHPElastic* model1a = new G4ParticleHPElastic();
67  process1->RegisterMe(model1a);
68  process1->AddDataSet(new G4ParticleHPElasticData());
69  //
70  // model1b
71  if (fThermal) {
72  model1a->SetMinEnergy(4 * eV);
73  G4ParticleHPThermalScattering* model1b = new G4ParticleHPThermalScattering();
74  process1->RegisterMe(model1b);
75  process1->AddDataSet(new G4ParticleHPThermalScatteringData());
76  }
77 
78  // (re) create process: inelastic
79  //
80  G4NeutronInelasticProcess* process2 = new G4NeutronInelasticProcess();
81  pManager->AddDiscreteProcess(process2);
82  //
83  // cross section data set
84  G4ParticleHPInelasticData* dataSet2 = new G4ParticleHPInelasticData();
85  process2->AddDataSet(dataSet2);
86  //
87  // models
88  G4ParticleHPInelastic* model2 = new G4ParticleHPInelastic();
89  process2->RegisterMe(model2);
90 
91  // (re) create process: nCapture
92  //
93  G4HadronCaptureProcess* process3 = new G4HadronCaptureProcess();
94  pManager->AddDiscreteProcess(process3);
95  //
96  // cross section data set
97  G4ParticleHPCaptureData* dataSet3 = new G4ParticleHPCaptureData();
98  process3->AddDataSet(dataSet3);
99  //
100  // models
101  G4ParticleHPCapture* model3 = new G4ParticleHPCapture();
102  process3->RegisterMe(model3);
103 
104  // (re) create process: nFission
105  //
106  G4HadronFissionProcess* process4 = new G4HadronFissionProcess();
107  pManager->AddDiscreteProcess(process4);
108  //
109  // cross section data set
110  G4ParticleHPFissionData* dataSet4 = new G4ParticleHPFissionData();
111  process4->AddDataSet(dataSet4);
112  //
113  // models
114  G4ParticleHPFission* model4 = new G4ParticleHPFission();
115  process4->RegisterMe(model4);
116 }
void ConstructProcess() override
High precision neutron physics constructor for Geant4.
NeutronHPphysics(const G4String &name="neutron")