Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLConfig.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// INCL++ intra-nuclear cascade model
27// Alain Boudard, CEA-Saclay, France
28// Joseph Cugnon, University of Liege, Belgium
29// Jean-Christophe David, CEA-Saclay, France
30// Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31// Sylvie Leray, CEA-Saclay, France
32// Davide Mancusi, CEA-Saclay, France
33//
34#define INCLXX_IN_GEANT4_MODE 1
35
36#include "globals.hh"
37
38#ifndef G4INCLConfig_hh
39#define G4INCLConfig_hh 1
40
42#include "G4INCLConfigEnums.hh"
44#include <iostream>
45#include <string>
46#include <sstream>
47// #include <cassert>
48
49class ConfigParser;
50
51namespace G4INCL {
52
53 /**
54 * The INCL configuration object
55 *
56 * The Config object keeps track of various INCL physics options
57 * (e.g. which Pauli blocking scheme to use, whether to use local
58 * energy option or not, etc.
59 */
60 class Config {
61 public:
62 /// \brief Default constructor
63 Config();
64
65 /// \brief Default destructor
66 ~Config();
67
68 /// \brief Initialise the members
69 void init();
70
71 /// \brief Return a summary of the run configuration.
72 std::string summary();
73
74 /// \brief Get the verbosity.
75 G4int getVerbosity() const { return verbosity; }
76
77 /// \brief Get the run title.
78 std::string const &getCalculationTitle() const { return title; }
79
80 /// \brief Get the output file root.
81 std::string const &getOutputFileRoot() const { return outputFileRoot; }
82
83 /// \brief Get the number of shots.
84 G4int getNumberOfShots() const { return nShots; }
85
86 /// \brief Natural targets.
87 G4bool isNaturalTarget() const { return naturalTarget; }
88
89 /** \brief Get the target mass number.
90 *
91 * Note that A==0 means natural target. You should first check the
92 * isNaturalTarget() method.
93 */
94 G4int getTargetA() const { return targetSpecies.theA; }
95
96 /// \brief Get the target charge number.
97 G4int getTargetZ() const { return targetSpecies.theZ; }
98
99 /// \brief Get the target strangess number.
100 G4int getTargetS() const { return targetSpecies.theS; }
101
102 /// \brief Set target mass number
103 void setTargetA(G4int A) { targetSpecies.theA = A; }
104
105 /// \brief Set target charge number
106 void setTargetZ(G4int Z) { targetSpecies.theZ = Z; }
107
108 /// \brief Set target strangess number
109 void setTargetS(G4int S) { targetSpecies.theS = S; }
110
111 /// \brief Get the projectile type
112 ParticleType getProjectileType() const { return projectileSpecies.theType; }
113
114 /// \brief Get the projectile species
115 ParticleSpecies getProjectileSpecies() const { return projectileSpecies; }
116
117 /// \brief Set the projectile species
118 void setProjectileSpecies(ParticleSpecies const &ps) { projectileSpecies=ps; }
119
120 /// \brief Get the projectile kinetic energy.
121 G4double getProjectileKineticEnergy() const { return projectileKineticEnergy; }
122
123 /// \brief Set the projectile kinetic energy.
124 void setProjectileKineticEnergy(G4double const kinE) { projectileKineticEnergy=kinE; }
125
126 /// \brief Get the number of the verbose event.
127 G4int getVerboseEvent() const { return verboseEvent; }
128
129 /// \brief Get the INCL version ID.
130 static std::string const getVersionID();
131
132 /// \brief Get the INCL version hash.
133 static std::string const getVersionHash();
134
135 /// \brief Get the INCL version string.
136 static std::string const getVersionString() {
137 std::stringstream ss;
138 ss << getVersionID() << "-" << getVersionHash();
139 return ss.str();
140 }
141
142 /// \brief Get the seeds for the random-number generator.
144 return randomSeedVector;
145 }
146
147 /// \brief Get the Pauli-blocking algorithm.
148 PauliType getPauliType() const { return pauliType; }
149
150 /// \brief Do we want CDPP?
151 G4bool getCDPP() const { return CDPP; }
152
153 /// \brief Get the Coulomb-distortion algorithm.
154 CoulombType getCoulombType() const { return coulombType; }
155
156 /// \brief Set the Coulomb-distortion algorithm.
157 void setCoulombType(CoulombType const c) { coulombType = c; }
158
159 /// \brief Get the type of the potential for nucleons.
160 PotentialType getPotentialType() const { return potentialType; }
161
162 /// \brief Set the type of the potential for nucleons.
163 void setPotentialType(PotentialType type) { potentialType = type; }
164
165 /// \brief Do we want the pion potential?
166 G4bool getPionPotential() const { return pionPotential; }
167
168 /// \brief Set the type of the potential for nucleons.
169 void setPionPotential(const G4bool pionPot) { pionPotential = pionPot; }
170
171 /// \brief Get the type of local energy for N-N avatars.
172 LocalEnergyType getLocalEnergyBBType() const { return localEnergyBBType; }
173
174 /// \brief Set the type of local energy for N-N avatars.
175 void setLocalEnergyBBType(const LocalEnergyType t) { localEnergyBBType=t; }
176
177 /// \brief Get the type of local energy for pi-N and decay avatars.
178 LocalEnergyType getLocalEnergyPiType() const { return localEnergyPiType; }
179
180 /// \brief Set the type of local energy for N-N avatars.
181 void setLocalEnergyPiType(const LocalEnergyType t) { localEnergyPiType=t; }
182
183 /// \brief Get the log file name.
184 std::string const &getLogFileName() const { return logFileName; }
185
186 /// \brief Get the de-excitation model.
187 DeExcitationType getDeExcitationType() const { return deExcitationType; }
188
189 /// \brief Get the de-excitation string.
190 std::string getDeExcitationString() const { return deExcitationString; }
191
192 /// \brief Get the clustering algorithm.
193 ClusterAlgorithmType getClusterAlgorithm() const { return clusterAlgorithmType; }
194
195 /// \brief Set the clustering algorithm.
196 void setClusterAlgorithm(ClusterAlgorithmType const c) { clusterAlgorithmType = c; }
197
198 /// \brief Get the maximum mass for production of clusters.
199 G4int getClusterMaxMass() const { return clusterMaxMass; }
200
201 /// \brief Set the maximum mass for production of clusters.
202 void setClusterMaxMass(const G4int m){ clusterMaxMass=m; }
203
204 /// \brief Get back-to-spectator
205 G4bool getBackToSpectator() const { return backToSpectator; }
206
207 /// \brief Set back-to-spectator
208 void setBackToSpectator(const G4bool b) { backToSpectator = b; }
209
210 /// \brief Whether to use real masses
211 G4bool getUseRealMasses() const { return useRealMasses; }
212
213 /// \brief Set whether to use real masses
214 void setUseRealMasses(G4bool use) { useRealMasses = use; }
215
216 /// \brief Set the INCLXX datafile path
217 void setINCLXXDataFilePath(std::string const &s) { INCLXXDataFilePath=s; }
218
219 std::string const &getINCLXXDataFilePath() const {
220 return INCLXXDataFilePath;
221 }
222
223#ifdef INCL_DEEXCITATION_ABLAXX
224 std::string const &getABLAv3pCxxDataFilePath() const {
225 return ablav3pCxxDataFilePath;
226 }
227#endif
228
229#ifdef INCL_DEEXCITATION_ABLACXX
230 std::string const &getABLAXXDataFilePath() const {
231 return ablaxxDataFilePath;
232 }
233#endif
234
235#ifdef INCL_DEEXCITATION_ABLA07
236 std::string const &getABLA07DataFilePath() const {
237 return abla07DataFilePath;
238 }
239#endif
240#ifdef INCL_DEEXCITATION_GEMINIXX
241 std::string const &getGEMINIXXDataFilePath() const {
242 return geminixxDataFilePath;
243 }
244#endif
245
246 G4double getImpactParameter() const { return impactParameter; }
247
248 /// \brief Get the separation-energy type
249 SeparationEnergyType getSeparationEnergyType() const { return separationEnergyType; }
250
251 /// \brief Get the Fermi-momentum type
252 FermiMomentumType getFermiMomentumType() const { return fermiMomentumType; }
253
254 /// \brief Set the Fermi-momentum type
255 void setFermiMomentumType(FermiMomentumType const f) { fermiMomentumType=f; }
256
257 /// \brief Get the Fermi momentum
258 G4double getFermiMomentum() const { return fermiMomentum; }
259
260 /// \brief Set the Fermi momentum
261 void setFermiMomentum(const G4double p) { fermiMomentum = p; }
262
263 G4double getCutNN() const { return cutNN; }
264
265#ifdef INCL_ROOT_USE
266 std::string const &getROOTSelectionString() const {
267 return rootSelectionString;
268 }
269#endif
270
271#ifdef INCL_DEEXCITATION_FERMI_BREAKUP
272 G4int getMaxMassFermiBreakUp() const {
273 return maxMassFermiBreakUp;
274 }
275
276 G4int getMaxChargeFermiBreakUp() const {
277 return maxChargeFermiBreakUp;
278 }
279#endif
280
281 /// \brief Get the r-p correlation coefficient
283// assert(t==Proton || t==Neutron);
284 return ((t==Proton) ? rpCorrelationCoefficientProton : rpCorrelationCoefficientNeutron);
285 }
286
287 /// \brief Set the r-p correlation coefficient
288 void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff) {
289// assert(t==Proton || t==Neutron);
290 if(t==Proton)
291 rpCorrelationCoefficientProton=corrCoeff;
292 else
293 rpCorrelationCoefficientNeutron=corrCoeff;
294 }
295
296 /// \brief Set the r-p correlation coefficient
297 void setRPCorrelationCoefficient(const G4double corrCoeff) {
300 }
301
302 /// \brief Get the neutron-skin thickness
303 G4double getNeutronSkin() const { return neutronSkin; }
304
305 /// \brief Set the neutron-skin thickness
306 void setNeutronSkin(const G4double d) { neutronSkin=d; }
307
308 /// \brief Get the neutron-halo size
309 G4double getNeutronHalo() const { return neutronHalo; }
310
311 /// \brief Set the neutron-halo size
312 void setNeutronHalo(const G4double d) { neutronHalo=d; }
313
314 /// \brief True if we should use refraction
315 G4bool getRefraction() const { return refraction; }
316
317 /// \brief Set the refraction variable
318 void setRefraction(const G4bool r) { refraction = r; }
319
320 /// \brief Get the RNG type
321 RNGType getRNGType() const { return rngType; }
322
323 /// \brief Set the RNG type
324 void setRNGType(RNGType const r) { rngType=r; }
325
326 /// \brief Get the phase-space-generator type
327 PhaseSpaceGeneratorType getPhaseSpaceGeneratorType() const { return phaseSpaceGeneratorType; }
328
329 /// \brief Set the phase-space-generator type
330 void setPhaseSpaceGeneratorType(PhaseSpaceGeneratorType const p) { phaseSpaceGeneratorType=p; }
331
332 /// \brief Get the cascade-action type
333 CascadeActionType getCascadeActionType() const { return cascadeActionType; }
334
335 /// \brief Set the cascade-action type
336 void setCascadeActionType(CascadeActionType const c) { cascadeActionType=c; }
337
338 /// \brief Get the autosave frequency
339 unsigned int getAutosaveFrequency() const { return autosaveFrequency; }
340
341 /// \brief Set the autosave frequency
342 void setAutosaveFrequency(const unsigned int f) { autosaveFrequency=f; }
343
344 /// \brief Get the Cross Section type
345 CrossSectionsType getCrossSectionsType() const { return crossSectionsType; }
346
347 /// \brief Get the maximum number of pions for multipion collisions
348 G4int getMaxNumberMultipions() const { return maxNumberMultipions; }
349
350 /// \brief Set the maximum number of pions for multipion collisions
351 void setMaxNumberMultipions(const G4int n) { maxNumberMultipions=n; }
352
353 /// \brief Set the Cross Section type
354 void setCrossSectionsType(CrossSectionsType const c) { crossSectionsType=c; }
355
356 /// \brief Get the hadronization time
357 G4double getHadronizationTime() const { return hadronizationTime; }
358
359 /// \brief Set the hadronization time
360 void setHadronizationTime(const G4double t) { hadronizationTime=t; }
361
362#ifdef INCL_ROOT_USE
363 G4bool getConciseROOTTree() const { return conciseROOTTree; }
364#endif
365
366 G4bool getInverseKinematics() const { return inverseKinematics; }
367
368 /// \brief Get the decay time threshold time
369 G4double getDecayTimeThreshold() const { return decayTimeThreshold; }
370
371 /// \brief Set decay time threshold time
372 void setDecayTimeThreshold(const G4double t) { decayTimeThreshold=t; }
373
374 /// \brief Get the bias
375 G4double getBias() const { return bias; }
376
377 private:
378
379 G4int verbosity;
380 std::string inputFileName;
381 std::string title;
382 std::string outputFileRoot;
383 std::string fileSuffix;
384 std::string logFileName;
385
386 G4int nShots;
387
388 std::string targetString;
389 ParticleSpecies targetSpecies;
390 G4bool naturalTarget;
391
392 std::string projectileString;
393 ParticleSpecies projectileSpecies;
394 G4double projectileKineticEnergy;
395
396 G4int verboseEvent;
397
398 std::string randomSeeds;
399 Random::SeedVector randomSeedVector;
400
401 std::string pauliString;
402 PauliType pauliType;
403 G4bool CDPP;
404
405 std::string coulombString;
406 CoulombType coulombType;
407
408 std::string potentialString;
409 PotentialType potentialType;
410 G4bool pionPotential;
411
412 std::string localEnergyBBString;
413 LocalEnergyType localEnergyBBType;
414
415 std::string localEnergyPiString;
416 LocalEnergyType localEnergyPiType;
417
418 std::string deExcitationModelList;
419 std::string deExcitationOptionDescription;
420 std::string deExcitationString;
421 DeExcitationType deExcitationType;
422#ifdef INCL_DEEXCITATION_ABLAXX
423 std::string ablav3pCxxDataFilePath;
424#endif
425#ifdef INCL_DEEXCITATION_ABLACXX
426 std::string ablaxxDataFilePath;
427#endif
428#ifdef INCL_DEEXCITATION_ABLA07
429 std::string abla07DataFilePath;
430#endif
431#ifdef INCL_DEEXCITATION_GEMINIXX
432 std::string geminixxDataFilePath;
433#endif
434 std::string INCLXXDataFilePath;
435
436 std::string clusterAlgorithmString;
437 ClusterAlgorithmType clusterAlgorithmType;
438
439 G4int clusterMaxMass;
440
441 G4bool backToSpectator;
442
443 G4bool useRealMasses;
444
445 G4double impactParameter;
446
447 std::string separationEnergyString;
448 SeparationEnergyType separationEnergyType;
449
450 std::string fermiMomentumString;
451 FermiMomentumType fermiMomentumType;
452
453 G4double fermiMomentum;
454
455 G4double cutNN;
456
457 G4double bias;
458
459#ifdef INCL_ROOT_USE
460 std::string rootSelectionString;
461#endif
462
463#ifdef INCL_DEEXCITATION_FERMI_BREAKUP
464 G4int maxMassFermiBreakUp;
465 G4int maxChargeFermiBreakUp;
466#endif
467
468 G4double rpCorrelationCoefficient;
469 G4double rpCorrelationCoefficientProton;
470 G4double rpCorrelationCoefficientNeutron;
471
472 G4double neutronSkin;
473 G4double neutronHalo;
474
475 G4bool refraction;
476
477 std::string randomNumberGenerator;
478 RNGType rngType;
479
480 std::string phaseSpaceGenerator;
481 PhaseSpaceGeneratorType phaseSpaceGeneratorType;
482
483 unsigned int autosaveFrequency;
484
485 std::string crossSectionsString;
486 CrossSectionsType crossSectionsType;
487 G4int maxNumberMultipions;
488
489 std::string cascadeAction;
490 CascadeActionType cascadeActionType;
491
492 G4double hadronizationTime;
493
494#ifdef INCL_ROOT_USE
495 G4bool conciseROOTTree;
496#endif
497
498 G4bool inverseKinematics;
499
500 G4double decayTimeThreshold;
501
502 friend class ::ConfigParser;
503 };
504
505}
506
507#endif
double S(double temp)
double A(double temperature)
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4double getNeutronHalo() const
Get the neutron-halo size.
static std::string const getVersionString()
Get the INCL version string.
void setFermiMomentumType(FermiMomentumType const f)
Set the Fermi-momentum type.
PauliType getPauliType() const
Get the Pauli-blocking algorithm.
void setClusterAlgorithm(ClusterAlgorithmType const c)
Set the clustering algorithm.
void setProjectileSpecies(ParticleSpecies const &ps)
Set the projectile species.
G4bool getPionPotential() const
Do we want the pion potential?
FermiMomentumType getFermiMomentumType() const
Get the Fermi-momentum type.
PotentialType getPotentialType() const
Get the type of the potential for nucleons.
static std::string const getVersionID()
Get the INCL version ID.
void setDecayTimeThreshold(const G4double t)
Set decay time threshold time.
G4double getImpactParameter() const
void setLocalEnergyPiType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
void setBackToSpectator(const G4bool b)
Set back-to-spectator.
SeparationEnergyType getSeparationEnergyType() const
Get the separation-energy type.
CascadeActionType getCascadeActionType() const
Get the cascade-action type.
G4double getRPCorrelationCoefficient(const ParticleType t) const
Get the r-p correlation coefficient.
void setRNGType(RNGType const r)
Set the RNG type.
G4bool getRefraction() const
True if we should use refraction.
std::string const & getINCLXXDataFilePath() const
G4int getClusterMaxMass() const
Get the maximum mass for production of clusters.
G4int getVerboseEvent() const
Get the number of the verbose event.
void setCoulombType(CoulombType const c)
Set the Coulomb-distortion algorithm.
G4int getTargetA() const
Get the target mass number.
Definition: G4INCLConfig.hh:94
G4double getDecayTimeThreshold() const
Get the decay time threshold time.
std::string const & getCalculationTitle() const
Get the run title.
Definition: G4INCLConfig.hh:78
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
G4int getVerbosity() const
Get the verbosity.
Definition: G4INCLConfig.hh:75
void setTargetS(G4int S)
Set target strangess number.
void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff)
Set the r-p correlation coefficient.
G4int getMaxNumberMultipions() const
Get the maximum number of pions for multipion collisions.
std::string const & getLogFileName() const
Get the log file name.
unsigned int getAutosaveFrequency() const
Get the autosave frequency.
PhaseSpaceGeneratorType getPhaseSpaceGeneratorType() const
Get the phase-space-generator type.
void setCascadeActionType(CascadeActionType const c)
Set the cascade-action type.
DeExcitationType getDeExcitationType() const
Get the de-excitation model.
Random::SeedVector getRandomSeeds() const
Get the seeds for the random-number generator.
void setTargetA(G4int A)
Set target mass number.
G4double getHadronizationTime() const
Get the hadronization time.
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
ClusterAlgorithmType getClusterAlgorithm() const
Get the clustering algorithm.
void setTargetZ(G4int Z)
Set target charge number.
void setPionPotential(const G4bool pionPot)
Set the type of the potential for nucleons.
~Config()
Default destructor.
Definition: G4INCLConfig.cc:49
void setNeutronHalo(const G4double d)
Set the neutron-halo size.
void setPhaseSpaceGeneratorType(PhaseSpaceGeneratorType const p)
Set the phase-space-generator type.
void setPotentialType(PotentialType type)
Set the type of the potential for nucleons.
LocalEnergyType getLocalEnergyPiType() const
Get the type of local energy for pi-N and decay avatars.
G4bool getInverseKinematics() const
void setCrossSectionsType(CrossSectionsType const c)
Set the Cross Section type.
G4bool isNaturalTarget() const
Natural targets.
Definition: G4INCLConfig.hh:87
void setAutosaveFrequency(const unsigned int f)
Set the autosave frequency.
G4int getTargetS() const
Get the target strangess number.
G4bool getBackToSpectator() const
Get back-to-spectator.
void setProjectileKineticEnergy(G4double const kinE)
Set the projectile kinetic energy.
void setMaxNumberMultipions(const G4int n)
Set the maximum number of pions for multipion collisions.
Config()
Default constructor.
Definition: G4INCLConfig.cc:45
G4bool getCDPP() const
Do we want CDPP?
G4double getNeutronSkin() const
Get the neutron-skin thickness.
CrossSectionsType getCrossSectionsType() const
Get the Cross Section type.
void setHadronizationTime(const G4double t)
Set the hadronization time.
G4double getCutNN() const
void setINCLXXDataFilePath(std::string const &s)
Set the INCLXX datafile path.
G4double getFermiMomentum() const
Get the Fermi momentum.
LocalEnergyType getLocalEnergyBBType() const
Get the type of local energy for N-N avatars.
G4double getBias() const
Get the bias.
void setNeutronSkin(const G4double d)
Set the neutron-skin thickness.
std::string summary()
Return a summary of the run configuration.
void init()
Initialise the members.
Definition: G4INCLConfig.cc:51
void setFermiMomentum(const G4double p)
Set the Fermi momentum.
G4int getTargetZ() const
Get the target charge number.
Definition: G4INCLConfig.hh:97
void setLocalEnergyBBType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
RNGType getRNGType() const
Get the RNG type.
void setRefraction(const G4bool r)
Set the refraction variable.
void setUseRealMasses(G4bool use)
Set whether to use real masses.
ParticleType getProjectileType() const
Get the projectile type.
G4bool getUseRealMasses() const
Whether to use real masses.
CoulombType getCoulombType() const
Get the Coulomb-distortion algorithm.
G4int getNumberOfShots() const
Get the number of shots.
Definition: G4INCLConfig.hh:84
std::string getDeExcitationString() const
Get the de-excitation string.
void setClusterMaxMass(const G4int m)
Set the maximum mass for production of clusters.
std::string const & getOutputFileRoot() const
Get the output file root.
Definition: G4INCLConfig.hh:81
void setRPCorrelationCoefficient(const G4double corrCoeff)
Set the r-p correlation coefficient.
static std::string const getVersionHash()
Get the INCL version hash.