Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticleHPManager.hh
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//
26
27#ifndef G4ParticleHPManager_h
28#define G4ParticleHPManager_h 1
29
30// 121031 First implementation done by T. Koi (SLAC/PPA)
31// P. Arce, June-2014 Conversion neutron_hp to particle_hp
32// V. Ivanchenko, July-2023 Basic revision of particle HP classes
33//
35#include "globals.hh"
36
37#include <map>
38#include <vector>
39
45class G4PhysicsTable;
46struct E_isoAng;
47struct E_P_E_isoAng;
48
50{
51 public:
54
58
59 void GetDataStream(const G4String&, std::istringstream& iss);
60 void GetDataStream2(const G4String&, std::istringstream& iss);
61 void SetVerboseLevel(G4int i);
62 G4int GetVerboseLevel() const { return verboseLevel; };
63
64 void DumpDataSource();
65
66 G4bool GetUseOnlyPhotoEvaporation() const { return USE_ONLY_PHOTONEVAPORATION; };
67 G4bool GetSkipMissingIsotopes() const { return SKIP_MISSING_ISOTOPES; };
68 G4bool GetNeglectDoppler() const { return NEGLECT_DOPPLER; };
69 G4bool GetDoNotAdjustFinalState() const { return DO_NOT_ADJUST_FINAL_STATE; };
70 G4bool GetProduceFissionFragments() const { return PRODUCE_FISSION_FRAGMENTS; };
71 G4bool GetUseWendtFissionModel() const { return USE_WENDT_FISSION_MODEL; };
72 G4bool GetUseNRESP71Model() const { return USE_NRESP71_MODEL; };
73 G4bool GetUseDBRC() const { return USE_DBRC; };
74 G4bool GetCheckHPNames() const { return CHECK_HP_NAMES; };
75 G4bool GetPHPCheck() const { return PHP_CHECK; };
76 G4bool GetPHCUsePoisson() const { return PHP_USE_POISSON; };
77 G4bool GetDEBUG() const { return DEBUG; };
78
79 const G4String& GetNeutronHPPath() const { return fDataPath[0]; };
82
83 void SetUseOnlyPhotoEvaporation(G4bool val) { USE_ONLY_PHOTONEVAPORATION = val; };
84 void SetSkipMissingIsotopes(G4bool val) { SKIP_MISSING_ISOTOPES = val; };
85 void SetNeglectDoppler(G4bool val) { NEGLECT_DOPPLER = val; };
86 void SetDoNotAdjustFinalState(G4bool val) { DO_NOT_ADJUST_FINAL_STATE = val; };
88 {
89 // Make sure both fission fragment models are not active at same time
90 PRODUCE_FISSION_FRAGMENTS = USE_WENDT_FISSION_MODEL ? false : val;
91 };
93 {
94 USE_WENDT_FISSION_MODEL = val;
95 // Make sure both fission fragment models are not active at same time
96 if (USE_WENDT_FISSION_MODEL) PRODUCE_FISSION_FRAGMENTS = false;
97 };
98 void SetUseNRESP71Model(G4bool val) { USE_NRESP71_MODEL = val; };
99 void SetUseDBRC(G4bool val) { USE_DBRC = val; };
100
101 void DumpSetting();
102
103 void RegisterElasticCrossSections(G4PhysicsTable* val) { theElasticCrossSections = val; };
104 G4PhysicsTable* GetElasticCrossSections() const { return theElasticCrossSections; };
105 void RegisterCaptureCrossSections(G4PhysicsTable* val) { theCaptureCrossSections = val; };
106 G4PhysicsTable* GetCaptureCrossSections() const { return theCaptureCrossSections; };
108 {
109 theInelasticCrossSections[GetPHPIndex(part)] = ptr;
110 };
112 {
113 return theInelasticCrossSections[GetPHPIndex(part)];
114 };
115 void RegisterFissionCrossSections(G4PhysicsTable* val) { theFissionCrossSections = val; };
116 G4PhysicsTable* GetFissionCrossSections() const { return theFissionCrossSections; };
117
118 std::vector<G4ParticleHPChannel*>* GetElasticFinalStates() const { return theElasticFSs; };
119 void RegisterElasticFinalStates(std::vector<G4ParticleHPChannel*>* val)
120 {
121 theElasticFSs = val;
122 };
123
124 std::vector<G4ParticleHPChannelList*>*
126 {
127 return theInelasticFSs[GetPHPIndex(part)];
128 };
130 std::vector<G4ParticleHPChannelList*>* ptr)
131 {
132 theInelasticFSs[GetPHPIndex(part)] = ptr;
133 };
134
135 std::vector<G4ParticleHPChannel*>* GetCaptureFinalStates() const { return theCaptureFSs; };
136 void RegisterCaptureFinalStates(std::vector<G4ParticleHPChannel*>* val)
137 {
138 theCaptureFSs = val;
139 };
140 std::vector<G4ParticleHPChannel*>* GetFissionFinalStates() const { return theFissionFSs; };
141 void RegisterFissionFinalStates(std::vector<G4ParticleHPChannel*>* val)
142 {
143 theFissionFSs = val;
144 };
145
146 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>*
148 {
149 return theTSCoherentCrossSections;
150 };
152 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* val)
153 {
154 theTSCoherentCrossSections = val;
155 };
156 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>*
158 {
159 return theTSIncoherentCrossSections;
160 };
162 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* val)
163 {
164 theTSIncoherentCrossSections = val;
165 };
166 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>*
168 {
169 return theTSInelasticCrossSections;
170 };
172 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* val)
173 {
174 theTSInelasticCrossSections = val;
175 };
176
177 std::map<G4int, std::map<G4double, std::vector<std::pair<G4double, G4double>*>*>*>*
179 {
180 return theTSCoherentFinalStates;
181 };
183 std::map<G4int, std::map<G4double, std::vector<std::pair<G4double, G4double>*>*>*>* val)
184 {
185 theTSCoherentFinalStates = val;
186 };
187 std::map<G4int, std::map<G4double, std::vector<E_isoAng*>*>*>*
189 {
190 return theTSIncoherentFinalStates;
191 };
193 std::map<G4int, std::map<G4double, std::vector<E_isoAng*>*>*>* val)
194 {
195 theTSIncoherentFinalStates = val;
196 };
197 std::map<G4int, std::map<G4double, std::vector<E_P_E_isoAng*>*>*>*
199 {
200 return theTSInelasticFinalStates;
201 };
203 std::map<G4int, std::map<G4double, std::vector<E_P_E_isoAng*>*>*>* val)
204 {
205 theTSInelasticFinalStates = val;
206 };
207
208 G4double GetMinADBRC() const { return theMinADBRC; };
209 G4double GetMinEnergyDBRC() const { return theMinEnergyDBRC; };
210 G4double GetMaxEnergyDBRC() const { return theMaxEnergyDBRC; };
211 G4double GetMaxEnergyDoppler() const { return theMaxEnergyDoppler; };
212
213 void SetMinADBRC(G4double val) { theMinADBRC = val; };
214 void SetMinEnergyDBRC(G4double val) { theMinEnergyDBRC = val; };
215 void SetMaxEnergyDBRC(G4double val) { theMaxEnergyDBRC = val; };
216 void SetMaxEnergyDoppler(G4double val) { theMaxEnergyDoppler = val; };
217
220
221 private:
223 void register_data_file(const G4String&, const G4String&);
224
225 static G4ParticleHPManager* instance;
226
227 std::map<G4String, G4String> mDataEvaluation;
228
229 G4int verboseLevel{1};
230
231 G4ParticleHPMessenger* messenger;
232 G4bool USE_ONLY_PHOTONEVAPORATION{false};
233 G4bool SKIP_MISSING_ISOTOPES{false};
234 G4bool NEGLECT_DOPPLER{false};
235 G4bool DO_NOT_ADJUST_FINAL_STATE{false};
236 G4bool PRODUCE_FISSION_FRAGMENTS{false};
237 G4bool USE_WENDT_FISSION_MODEL{false};
238 G4bool USE_NRESP71_MODEL{false};
239 G4bool USE_DBRC{false};
240 G4bool CHECK_HP_NAMES{false};
241 G4bool PHP_CHECK{true};
242 G4bool PHP_USE_POISSON{false};
243 G4bool DEBUG{false};
244 G4bool isPrinted{false};
245
246 G4PhysicsTable* theElasticCrossSections{nullptr};
247 G4PhysicsTable* theCaptureCrossSections{nullptr};
248 G4PhysicsTable* theInelasticCrossSections[6]{nullptr};
249 G4PhysicsTable* theFissionCrossSections{nullptr};
250
251 std::vector<G4ParticleHPChannel*>* theElasticFSs{nullptr};
252 std::vector<G4ParticleHPChannelList*>* theInelasticFSs[6]{nullptr};
253 std::vector<G4ParticleHPChannel*>* theCaptureFSs{nullptr};
254 std::vector<G4ParticleHPChannel*>* theFissionFSs{nullptr};
255
256 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* theTSCoherentCrossSections{nullptr};
257 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* theTSIncoherentCrossSections{
258 nullptr};
259 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* theTSInelasticCrossSections{nullptr};
260
261 std::map<G4int, std::map<G4double, std::vector<std::pair<G4double, G4double>*>*>*>*
262 theTSCoherentFinalStates{nullptr};
263 std::map<G4int, std::map<G4double, std::vector<E_isoAng*>*>*>* theTSIncoherentFinalStates{
264 nullptr};
265 std::map<G4int, std::map<G4double, std::vector<E_P_E_isoAng*>*>*>* theTSInelasticFinalStates{
266 nullptr};
267
268 G4double theMinADBRC{200.};
269 G4double theMinEnergyDBRC;
270 G4double theMaxEnergyDBRC;
271 G4double theMaxEnergyDoppler;
272
273 G4String fDataPath[6]{""};
274};
275#endif
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
const G4String & GetParticleHPPath(const G4ParticleDefinition *) const
G4PhysicsTable * GetElasticCrossSections() const
void SetUseNRESP71Model(G4bool val)
std::map< G4int, std::map< G4double, std::vector< E_isoAng * > * > * > * GetThermalScatteringIncoherentFinalStates() const
void RegisterThermalScatteringCoherentFinalStates(std::map< G4int, std::map< G4double, std::vector< std::pair< G4double, G4double > * > * > * > *val)
void SetMinADBRC(G4double val)
void SetNeglectDoppler(G4bool val)
std::vector< G4ParticleHPChannel * > * GetFissionFinalStates() const
void SetMaxEnergyDoppler(G4double val)
G4PhysicsTable * GetInelasticCrossSections(const G4ParticleDefinition *part) const
void RegisterElasticFinalStates(std::vector< G4ParticleHPChannel * > *val)
void RegisterInelasticCrossSections(const G4ParticleDefinition *part, G4PhysicsTable *ptr)
G4bool GetProduceFissionFragments() const
std::vector< G4ParticleHPChannel * > * GetElasticFinalStates() const
void GetDataStream2(const G4String &, std::istringstream &iss)
void SetMinEnergyDBRC(G4double val)
G4ParticleHPManager & operator=(const G4ParticleHPManager &right)=delete
std::vector< G4ParticleHPChannel * > * GetCaptureFinalStates() const
void RegisterFissionFinalStates(std::vector< G4ParticleHPChannel * > *val)
G4bool GetUseOnlyPhotoEvaporation() const
void SetProduceFissionFragments(G4bool val)
void RegisterThermalScatteringIncoherentCrossSections(std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *val)
void SetSkipMissingIsotopes(G4bool val)
void SetDoNotAdjustFinalState(G4bool val)
G4int GetPHPIndex(const G4ParticleDefinition *) const
void RegisterThermalScatteringIncoherentFinalStates(std::map< G4int, std::map< G4double, std::vector< E_isoAng * > * > * > *val)
std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > * GetThermalScatteringCoherentCrossSections() const
void RegisterThermalScatteringInelasticFinalStates(std::map< G4int, std::map< G4double, std::vector< E_P_E_isoAng * > * > * > *val)
const G4String & GetNeutronHPPath() const
G4double GetMaxEnergyDoppler() const
G4bool GetUseWendtFissionModel() const
G4bool GetPHCUsePoisson() const
G4PhysicsTable * GetCaptureCrossSections() const
void RegisterInelasticFinalStates(const G4ParticleDefinition *part, std::vector< G4ParticleHPChannelList * > *ptr)
G4double GetMinEnergyDBRC() const
std::map< G4int, std::map< G4double, std::vector< E_P_E_isoAng * > * > * > * GetThermalScatteringInelasticFinalStates() const
void RegisterThermalScatteringCoherentCrossSections(std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *val)
std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > * GetThermalScatteringInelasticCrossSections() const
G4PhysicsTable * GetFissionCrossSections() const
G4double GetMinADBRC() const
void GetDataStream(const G4String &, std::istringstream &iss)
G4bool GetUseNRESP71Model() const
G4ParticleHPManager(G4ParticleHPManager &)=delete
G4bool GetSkipMissingIsotopes() const
std::vector< G4ParticleHPChannelList * > * GetInelasticFinalStates(const G4ParticleDefinition *part) const
void RegisterElasticCrossSections(G4PhysicsTable *val)
void RegisterCaptureCrossSections(G4PhysicsTable *val)
static G4ParticleHPManager * GetInstance()
void SetUseDBRC(G4bool val)
void SetUseWendtFissionModel(G4bool val)
G4bool GetNeglectDoppler() const
G4bool GetCheckHPNames() const
std::map< G4int, std::map< G4double, std::vector< std::pair< G4double, G4double > * > * > * > * GetThermalScatteringCoherentFinalStates() const
void SetMaxEnergyDBRC(G4double val)
void RegisterThermalScatteringInelasticCrossSections(std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > *val)
void RegisterCaptureFinalStates(std::vector< G4ParticleHPChannel * > *val)
void SetUseOnlyPhotoEvaporation(G4bool val)
G4double GetMaxEnergyDBRC() const
G4bool GetDoNotAdjustFinalState() const
void RegisterFissionCrossSections(G4PhysicsTable *val)
std::map< G4int, std::map< G4double, G4ParticleHPVector * > * > * GetThermalScatteringIncoherentCrossSections() const
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()