ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NeutronHPphysics.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file NeutronHPphysics.cc
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 
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 
33 #include "NeutronHPphysics.hh"
34 
35 #include "NeutronHPMessenger.hh"
36 
37 #include "G4ParticleDefinition.hh"
38 #include "G4ProcessManager.hh"
39 #include "G4ProcessTable.hh"
40 
41 // Processes
42 
46 #include "G4ParticleHPElastic.hh"
48 
51 #include "G4ParticleHPInelastic.hh"
52 
55 #include "G4ParticleHPCapture.hh"
56 
59 #include "G4ParticleHPFission.hh"
60 
61 #include "G4SystemOfUnits.hh"
62 
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
64 
66 : G4VPhysicsConstructor(name), fThermal(true), fNeutronMessenger(0)
67 {
69 }
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72 
74 {
75  delete fNeutronMessenger;
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81 {
83  G4ProcessManager* pManager = neutron->GetProcessManager();
84 
85  // delete all neutron processes if already registered
86  //
87  G4VProcess* process = 0;
88  process = pManager->GetProcess("hadElastic");
89  if (process) pManager->RemoveProcess(process);
90  //
91  process = pManager->GetProcess("neutronInelastic");
92  if (process) pManager->RemoveProcess(process);
93  //
94  process = pManager->GetProcess("nCapture");
95  if (process) pManager->RemoveProcess(process);
96  //
97  process = pManager->GetProcess("nFission");
98  if (process) pManager->RemoveProcess(process);
99 
100  // (re) create process: elastic
101  //
103  pManager->AddDiscreteProcess(process1);
104  //
105  // model1a
106  G4ParticleHPElastic* model1a = new G4ParticleHPElastic();
107  process1->RegisterMe(model1a);
108  process1->AddDataSet(new G4ParticleHPElasticData());
109  //
110  // model1b
111  if (fThermal) {
112  model1a->SetMinEnergy(4*eV);
114  process1->RegisterMe(model1b);
116  }
117 
118  // (re) create process: inelastic
119  //
121  pManager->AddDiscreteProcess(process2);
122  //
123  // cross section data set
125  process2->AddDataSet(dataSet2);
126  //
127  // models
129  process2->RegisterMe(model2);
130 
131  // (re) create process: nCapture
132  //
134  pManager->AddDiscreteProcess(process3);
135  //
136  // cross section data set
138  process3->AddDataSet(dataSet3);
139  //
140  // models
142  process3->RegisterMe(model3);
143 
144  // (re) create process: nFission
145  //
147  pManager->AddDiscreteProcess(process4);
148  //
149  // cross section data set
151  process4->AddDataSet(dataSet4);
152  //
153  // models
155  process4->RegisterMe(model4);
156 }
157 
158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......