LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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/G4ParticleHPElasticData.hh"
16 #include "Geant4/G4ParticleHPThermalScatteringData.hh"
17 #include "Geant4/G4ParticleHPElastic.hh"
18 #include "Geant4/G4ParticleHPThermalScattering.hh"
19 
20 #include "Geant4/G4NeutronInelasticProcess.hh"
21 #include "Geant4/G4ParticleHPInelasticData.hh"
22 #include "Geant4/G4ParticleHPInelastic.hh"
23 
24 #include "Geant4/G4HadronCaptureProcess.hh"
25 #include "Geant4/G4ParticleHPCaptureData.hh"
26 #include "Geant4/G4ParticleHPCapture.hh"
27 
28 #include "Geant4/G4HadronFissionProcess.hh"
29 #include "Geant4/G4ParticleHPFissionData.hh"
30 #include "Geant4/G4ParticleHPFission.hh"
31 
32 #include "Geant4/G4SystemOfUnits.hh"
33 
34 // LArSoft includes
36 
37 // Register this physics constructor so that we can use the name "NeutronHP" to
38 // load it in a FHiCL custom physics list. See the section "Using Custom
39 // Physics Modules" on the web page
40 // http://cdcvs.fnal.gov/redmine/projects/larsoft/wiki/LArG4 for more details.
42 
43 // Thermal neutron physics is enabled by default
44 // (important for low-energy neutron interactions!)
46  : G4VPhysicsConstructor(name), fThermal(true) {}
47 
49 
51 {
52  G4ParticleDefinition* neutron = G4Neutron::Neutron();
53  G4ProcessManager* pManager = neutron->GetProcessManager();
54 
55  // delete all neutron processes if already registered
56  G4ProcessTable* processTable = G4ProcessTable::GetProcessTable();
57  G4VProcess* process = 0;
58  process = processTable->FindProcess("hadElastic", neutron);
59  if (process) pManager->RemoveProcess(process);
60  //
61  process = processTable->FindProcess("neutronInelastic", neutron);
62  if (process) pManager->RemoveProcess(process);
63  //
64  process = processTable->FindProcess("nCapture", neutron);
65  if (process) pManager->RemoveProcess(process);
66  //
67  process = processTable->FindProcess("nFission", neutron);
68  if (process) pManager->RemoveProcess(process);
69 
70  // (re) create process: elastic
71  //
72  G4HadronElasticProcess* process1 = new G4HadronElasticProcess();
73  pManager->AddDiscreteProcess(process1);
74  //
75  // model1a
76  G4ParticleHPElastic* model1a = new G4ParticleHPElastic();
77  process1->RegisterMe(model1a);
78  process1->AddDataSet(new G4ParticleHPElasticData());
79  //
80  // model1b
81  if (fThermal) {
82  model1a->SetMinEnergy(4*eV);
83  G4ParticleHPThermalScattering* model1b = new G4ParticleHPThermalScattering();
84  process1->RegisterMe(model1b);
85  process1->AddDataSet(new G4ParticleHPThermalScatteringData());
86  }
87 
88  // (re) create process: inelastic
89  //
90  G4NeutronInelasticProcess* process2 = new G4NeutronInelasticProcess();
91  pManager->AddDiscreteProcess(process2);
92  //
93  // cross section data set
94  G4ParticleHPInelasticData* dataSet2 = new G4ParticleHPInelasticData();
95  process2->AddDataSet(dataSet2);
96  //
97  // models
98  G4ParticleHPInelastic* model2 = new G4ParticleHPInelastic();
99  process2->RegisterMe(model2);
100 
101  // (re) create process: nCapture
102  //
103  G4HadronCaptureProcess* process3 = new G4HadronCaptureProcess();
104  pManager->AddDiscreteProcess(process3);
105  //
106  // cross section data set
107  G4ParticleHPCaptureData* dataSet3 = new G4ParticleHPCaptureData();
108  process3->AddDataSet(dataSet3);
109  //
110  // models
111  G4ParticleHPCapture* model3 = new G4ParticleHPCapture();
112  process3->RegisterMe(model3);
113 
114  // (re) create process: nFission
115  //
116  G4HadronFissionProcess* process4 = new G4HadronFissionProcess();
117  pManager->AddDiscreteProcess(process4);
118  //
119  // cross section data set
120  G4ParticleHPFissionData* dataSet4 = new G4ParticleHPFissionData();
121  process4->AddDataSet(dataSet4);
122  //
123  // models
124  G4ParticleHPFission* model4 = new G4ParticleHPFission();
125  process4->RegisterMe(model4);
126 }
larg4::CustomPhysicsFactory< NeutronHPphysics > dummy_factory("NeutronHP")
virtual void ConstructProcess()
High precision neutron physics constructor for Geant4.
NeutronHPphysics(const G4String &name="neutron")