Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
41 #include "G4INCLParticleSpecies.hh"
42 #include "G4INCLConfigEnums.hh"
44 #include <iostream>
45 #include <string>
46 #include <sstream>
47 // #include <cassert>
48 
49 class ConfigParser;
50 
51 namespace G4INCL {
52 
60  class Config {
61  public:
63  Config();
64 
66  ~Config();
67 
69  void init();
70 
72  std::string summary();
73 
75  G4int getVerbosity() const { return verbosity; }
76 
78  std::string const &getCalculationTitle() const { return title; }
79 
81  std::string const &getOutputFileRoot() const { return outputFileRoot; }
82 
84  G4int getNumberOfShots() const { return nShots; }
85 
87  G4bool isNaturalTarget() const { return naturalTarget; }
88 
94  G4int getTargetA() const { return targetSpecies.theA; }
95 
97  G4int getTargetZ() const { return targetSpecies.theZ; }
98 
100  void setTargetA(G4int A) { targetSpecies.theA = A; }
101 
103  void setTargetZ(G4int Z) { targetSpecies.theZ = Z; }
104 
106  ParticleType getProjectileType() const { return projectileSpecies.theType; }
107 
109  ParticleSpecies getProjectileSpecies() const { return projectileSpecies; }
110 
112  void setProjectileSpecies(ParticleSpecies const &ps) { projectileSpecies=ps; }
113 
115  G4double getProjectileKineticEnergy() const { return projectileKineticEnergy; }
116 
118  void setProjectileKineticEnergy(G4double const kinE) { projectileKineticEnergy=kinE; }
119 
121  G4int getVerboseEvent() const { return verboseEvent; }
122 
124  static std::string const getVersionID();
125 
127  static std::string const getVersionHash();
128 
130  static std::string const getVersionString() {
131  std::stringstream ss;
132  ss << getVersionID() << "-" << getVersionHash();
133  return ss.str();
134  }
135 
138  return randomSeedVector;
139  }
140 
142  PauliType getPauliType() const { return pauliType; }
143 
145  G4bool getCDPP() const { return CDPP; }
146 
148  CoulombType getCoulombType() const { return coulombType; }
149 
151  void setCoulombType(CoulombType const c) { coulombType = c; }
152 
154  PotentialType getPotentialType() const { return potentialType; }
155 
157  void setPotentialType(PotentialType type) { potentialType = type; }
158 
160  G4bool getPionPotential() const { return pionPotential; }
161 
163  void setPionPotential(const G4bool pionPot) { pionPotential = pionPot; }
164 
166  LocalEnergyType getLocalEnergyBBType() const { return localEnergyBBType; }
167 
169  void setLocalEnergyBBType(const LocalEnergyType t) { localEnergyBBType=t; }
170 
172  LocalEnergyType getLocalEnergyPiType() const { return localEnergyPiType; }
173 
175  void setLocalEnergyPiType(const LocalEnergyType t) { localEnergyPiType=t; }
176 
178  std::string const &getLogFileName() const { return logFileName; }
179 
181  DeExcitationType getDeExcitationType() const { return deExcitationType; }
182 
184  std::string getDeExcitationString() const { return deExcitationString; }
185 
187  ClusterAlgorithmType getClusterAlgorithm() const { return clusterAlgorithmType; }
188 
190  void setClusterAlgorithm(ClusterAlgorithmType const c) { clusterAlgorithmType = c; }
191 
193  G4int getClusterMaxMass() const { return clusterMaxMass; }
194 
196  void setClusterMaxMass(const G4int m){ clusterMaxMass=m; }
197 
199  G4bool getBackToSpectator() const { return backToSpectator; }
200 
202  void setBackToSpectator(const G4bool b) { backToSpectator = b; }
203 
205  G4bool getUseRealMasses() const { return useRealMasses; }
206 
208  void setUseRealMasses(G4bool use) { useRealMasses = use; }
209 
211  void setINCLXXDataFilePath(std::string const &s) { INCLXXDataFilePath=s; }
212 
213  std::string const &getINCLXXDataFilePath() const {
214  return INCLXXDataFilePath;
215  }
216 
217 #ifdef INCL_DEEXCITATION_ABLAXX
218  std::string const &getABLAv3pCxxDataFilePath() const {
219  return ablav3pCxxDataFilePath;
220  }
221 #endif
222 
223 #ifdef INCL_DEEXCITATION_ABLA07
224  std::string const &getABLA07DataFilePath() const {
225  return abla07DataFilePath;
226  }
227 #endif
228 #ifdef INCL_DEEXCITATION_GEMINIXX
229  std::string const &getGEMINIXXDataFilePath() const {
230  return geminixxDataFilePath;
231  }
232 #endif
233 
234  G4double getImpactParameter() const { return impactParameter; }
235 
237  SeparationEnergyType getSeparationEnergyType() const { return separationEnergyType; }
238 
240  FermiMomentumType getFermiMomentumType() const { return fermiMomentumType; }
241 
243  void setFermiMomentumType(FermiMomentumType const f) { fermiMomentumType=f; }
244 
246  G4double getFermiMomentum() const { return fermiMomentum; }
247 
249  void setFermiMomentum(const G4double p) { fermiMomentum = p; }
250 
251  G4double getCutNN() const { return cutNN; }
252 
253 #ifdef INCL_ROOT_USE
254  std::string const &getROOTSelectionString() const {
255  return rootSelectionString;
256  }
257 #endif
258 
259 #ifdef INCL_DEEXCITATION_FERMI_BREAKUP
260  G4int getMaxMassFermiBreakUp() const {
261  return maxMassFermiBreakUp;
262  }
263 
264  G4int getMaxChargeFermiBreakUp() const {
265  return maxChargeFermiBreakUp;
266  }
267 #endif
268 
271 // assert(t==Proton || t==Neutron);
272  return ((t==Proton) ? rpCorrelationCoefficientProton : rpCorrelationCoefficientNeutron);
273  }
274 
276  void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff) {
277 // assert(t==Proton || t==Neutron);
278  if(t==Proton)
279  rpCorrelationCoefficientProton=corrCoeff;
280  else
281  rpCorrelationCoefficientNeutron=corrCoeff;
282  }
283 
285  void setRPCorrelationCoefficient(const G4double corrCoeff) {
288  }
289 
291  G4double getNeutronSkin() const { return neutronSkin; }
292 
294  void setNeutronSkin(const G4double d) { neutronSkin=d; }
295 
297  G4double getNeutronHalo() const { return neutronHalo; }
298 
300  void setNeutronHalo(const G4double d) { neutronHalo=d; }
301 
303  G4bool getRefraction() const { return refraction; }
304 
306  void setRefraction(const G4bool r) { refraction = r; }
307 
309  RNGType getRNGType() const { return rngType; }
310 
312  void setRNGType(RNGType const r) { rngType=r; }
313 
315  PhaseSpaceGeneratorType getPhaseSpaceGeneratorType() const { return phaseSpaceGeneratorType; }
316 
318  void setPhaseSpaceGeneratorType(PhaseSpaceGeneratorType const p) { phaseSpaceGeneratorType=p; }
319 
321  CascadeActionType getCascadeActionType() const { return cascadeActionType; }
322 
324  void setCascadeActionType(CascadeActionType const c) { cascadeActionType=c; }
325 
327  unsigned int getAutosaveFrequency() const { return autosaveFrequency; }
328 
330  void setAutosaveFrequency(const unsigned int f) { autosaveFrequency=f; }
331 
333  CrossSectionsType getCrossSectionsType() const { return crossSectionsType; }
334 
336  G4int getMaxNumberMultipions() const { return maxNumberMultipions; }
337 
339  void setMaxNumberMultipions(const G4int n) { maxNumberMultipions=n; }
340 
342  void setCrossSectionsType(CrossSectionsType const c) { crossSectionsType=c; }
343 
345  G4double getHadronizationTime() const { return hadronizationTime; }
346 
348  void setHadronizationTime(const G4double t) { hadronizationTime=t; }
349 
350 #ifdef INCL_ROOT_USE
351  G4bool getConciseROOTTree() const { return conciseROOTTree; }
352 #endif
353 
354  G4bool getInverseKinematics() const { return inverseKinematics; }
355 
357  G4double getDecayTimeThreshold() const { return decayTimeThreshold; }
358 
360  void setDecayTimeThreshold(const G4double t) { decayTimeThreshold=t; }
361 
362  private:
363 
364  G4int verbosity;
365  std::string inputFileName;
366  std::string title;
367  std::string outputFileRoot;
368  std::string fileSuffix;
369  std::string logFileName;
370 
371  G4int nShots;
372 
373  std::string targetString;
374  ParticleSpecies targetSpecies;
375  G4bool naturalTarget;
376 
377  std::string projectileString;
378  ParticleSpecies projectileSpecies;
379  G4double projectileKineticEnergy;
380 
381  G4int verboseEvent;
382 
383  std::string randomSeeds;
384  Random::SeedVector randomSeedVector;
385 
386  std::string pauliString;
387  PauliType pauliType;
388  G4bool CDPP;
389 
390  std::string coulombString;
391  CoulombType coulombType;
392 
393  std::string potentialString;
394  PotentialType potentialType;
395  G4bool pionPotential;
396 
397  std::string localEnergyBBString;
398  LocalEnergyType localEnergyBBType;
399 
400  std::string localEnergyPiString;
401  LocalEnergyType localEnergyPiType;
402 
403  std::string deExcitationModelList;
404  std::string deExcitationOptionDescription;
405  std::string deExcitationString;
406  DeExcitationType deExcitationType;
407 #ifdef INCL_DEEXCITATION_ABLAXX
408  std::string ablav3pCxxDataFilePath;
409 #endif
410 #ifdef INCL_DEEXCITATION_ABLA07
411  std::string abla07DataFilePath;
412 #endif
413 #ifdef INCL_DEEXCITATION_GEMINIXX
414  std::string geminixxDataFilePath;
415 #endif
416  std::string INCLXXDataFilePath;
417 
418  std::string clusterAlgorithmString;
419  ClusterAlgorithmType clusterAlgorithmType;
420 
421  G4int clusterMaxMass;
422 
423  G4bool backToSpectator;
424 
425  G4bool useRealMasses;
426 
427  G4double impactParameter;
428 
429  std::string separationEnergyString;
430  SeparationEnergyType separationEnergyType;
431 
432  std::string fermiMomentumString;
433  FermiMomentumType fermiMomentumType;
434 
435  G4double fermiMomentum;
436 
437  G4double cutNN;
438 
439 #ifdef INCL_ROOT_USE
440  std::string rootSelectionString;
441 #endif
442 
443 #ifdef INCL_DEEXCITATION_FERMI_BREAKUP
444  G4int maxMassFermiBreakUp;
445  G4int maxChargeFermiBreakUp;
446 #endif
447 
448  G4double rpCorrelationCoefficient;
449  G4double rpCorrelationCoefficientProton;
450  G4double rpCorrelationCoefficientNeutron;
451 
452  G4double neutronSkin;
453  G4double neutronHalo;
454 
455  G4bool refraction;
456 
457  std::string randomNumberGenerator;
458  RNGType rngType;
459 
460  std::string phaseSpaceGenerator;
461  PhaseSpaceGeneratorType phaseSpaceGeneratorType;
462 
463  unsigned int autosaveFrequency;
464 
465  std::string crossSectionsString;
466  CrossSectionsType crossSectionsType;
467  G4int maxNumberMultipions;
468 
469  std::string cascadeAction;
470  CascadeActionType cascadeActionType;
471 
472  G4double hadronizationTime;
473 
474 #ifdef INCL_ROOT_USE
475  G4bool conciseROOTTree;
476 #endif
477 
478  G4bool inverseKinematics;
479 
480  G4double decayTimeThreshold;
481 
482  friend class ::ConfigParser;
483  };
484 
485 }
486 
487 #endif
DeExcitationType getDeExcitationType() const
Get the de-excitation model.
CascadeActionType getCascadeActionType() const
Get the cascade-action type.
ParticleType getProjectileType() const
Get the projectile type.
void setFermiMomentumType(FermiMomentumType const f)
Set the Fermi-momentum type.
void setProjectileSpecies(ParticleSpecies const &ps)
Set the projectile species.
void setRPCorrelationCoefficient(const G4double corrCoeff)
Set the r-p correlation coefficient.
void setHadronizationTime(const G4double t)
Set the hadronization time.
G4int getTargetZ() const
Get the target charge number.
Definition: G4INCLConfig.hh:97
G4int getNumberOfShots() const
Get the number of shots.
Definition: G4INCLConfig.hh:84
G4double getNeutronSkin() const
Get the neutron-skin thickness.
std::string const & getINCLXXDataFilePath() const
G4int getVerboseEvent() const
Get the number of the verbose event.
void setProjectileKineticEnergy(G4double const kinE)
Set the projectile kinetic energy.
const char * p
Definition: xmltok.h:285
G4int getClusterMaxMass() const
Get the maximum mass for production of clusters.
void setCascadeActionType(CascadeActionType const c)
Set the cascade-action type.
~Config()
Default destructor.
Definition: G4INCLConfig.cc:49
void setINCLXXDataFilePath(std::string const &s)
Set the INCLXX datafile path.
void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff)
Set the r-p correlation coefficient.
G4bool isNaturalTarget() const
Natural targets.
Definition: G4INCLConfig.hh:87
G4double getFermiMomentum() const
Get the Fermi momentum.
int G4int
Definition: G4Types.hh:78
SeparationEnergyType getSeparationEnergyType() const
Get the separation-energy type.
void setMaxNumberMultipions(const G4int n)
Set the maximum number of pions for multipion collisions.
void setLocalEnergyBBType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
G4int getVerbosity() const
Get the verbosity.
Definition: G4INCLConfig.hh:75
G4double getImpactParameter() const
const XML_Char * s
Definition: expat.h:262
G4bool getCDPP() const
Do we want CDPP?
static std::string const getVersionString()
Get the INCL version string.
double A(double temperature)
static constexpr double m
Definition: G4SIunits.hh:129
void setNeutronHalo(const G4double d)
Set the neutron-halo size.
void setFermiMomentum(const G4double p)
Set the Fermi momentum.
void setTargetA(G4int A)
Set target mass number.
G4bool getBackToSpectator() const
Get back-to-spectator.
PauliType getPauliType() const
Get the Pauli-blocking algorithm.
void setRefraction(const G4bool r)
Set the refraction variable.
bool G4bool
Definition: G4Types.hh:79
G4double getDecayTimeThreshold() const
Get the hadronization time.
G4int getTargetA() const
Get the target mass number.
Definition: G4INCLConfig.hh:94
void setLocalEnergyPiType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
G4bool getPionPotential() const
Do we want the pion potential?
void setClusterAlgorithm(ClusterAlgorithmType const c)
Set the clustering algorithm.
void setPhaseSpaceGeneratorType(PhaseSpaceGeneratorType const p)
Set the phase-space-generator type.
PhaseSpaceGeneratorType getPhaseSpaceGeneratorType() const
Get the phase-space-generator type.
G4bool getUseRealMasses() const
Whether to use real masses.
void setAutosaveFrequency(const unsigned int f)
Set the autosave frequency.
Config()
Default constructor.
Definition: G4INCLConfig.cc:45
G4double getHadronizationTime() const
Get the hadronization time.
unsigned int getAutosaveFrequency() const
Get the autosave frequency.
G4int getMaxNumberMultipions() const
Get the maximum number of pions for multipion collisions.
RNGType getRNGType() const
Get the RNG type.
void setDecayTimeThreshold(const G4double t)
Set the hadronization time.
G4double getNeutronHalo() const
Get the neutron-halo size.
Random::SeedVector getRandomSeeds() const
Get the seeds for the random-number generator.
ClusterAlgorithmType getClusterAlgorithm() const
Get the clustering algorithm.
void setRNGType(RNGType const r)
Set the RNG type.
FermiMomentumType getFermiMomentumType() const
Get the Fermi-momentum type.
std::string const & getLogFileName() const
Get the log file name.
PotentialType getPotentialType() const
Get the type of the potential for nucleons.
std::string getDeExcitationString() const
Get the de-excitation string.
static std::string const getVersionID()
Get the INCL version ID.
void setCoulombType(CoulombType const c)
Set the Coulomb-distortion algorithm.
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
void init()
Initialise the members.
Definition: G4INCLConfig.cc:51
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.
LocalEnergyType getLocalEnergyBBType() const
Get the type of local energy for N-N avatars.
CoulombType getCoulombType() const
Get the Coulomb-distortion algorithm.
std::string const & getOutputFileRoot() const
Get the output file root.
Definition: G4INCLConfig.hh:81
std::string const & getCalculationTitle() const
Get the run title.
Definition: G4INCLConfig.hh:78
std::string summary()
Return a summary of the run configuration.
void setClusterMaxMass(const G4int m)
Set the maximum mass for production of clusters.
void setPionPotential(const G4bool pionPot)
Set the type of the potential for nucleons.
G4bool getInverseKinematics() const
void setUseRealMasses(G4bool use)
Set whether to use real masses.
double G4double
Definition: G4Types.hh:76
void setBackToSpectator(const G4bool b)
Set back-to-spectator.
static constexpr double ps
Definition: G4SIunits.hh:172
void setNeutronSkin(const G4double d)
Set the neutron-skin thickness.
CrossSectionsType getCrossSectionsType() const
Get the Cross Section type.
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
void setCrossSectionsType(CrossSectionsType const c)
Set the Cross Section type.
G4double getRPCorrelationCoefficient(const ParticleType t) const
Get the r-p correlation coefficient.
G4double getCutNN() const
static std::string const getVersionHash()
Get the INCL version hash.
G4bool getRefraction() const
True if we should use refraction.
void setTargetZ(G4int Z)
Set target charge number.