Geant4  10.00.p01
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 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28 // Davide Mancusi, CEA
29 // Alain Boudard, CEA
30 // Sylvie Leray, CEA
31 // Joseph Cugnon, University of Liege
32 //
33 #define INCLXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
37 #ifndef G4INCLConfig_hh
38 #define G4INCLConfig_hh 1
39 
40 #include "G4INCLParticleSpecies.hh"
41 #include "G4INCLConfigEnums.hh"
43 #include <iostream>
44 #include <string>
45 #include <sstream>
46 // #include <cassert>
47 
48 #if defined(HAS_BOOST_PROGRAM_OPTIONS) && !defined(INCLXX_IN_GEANT4_MODE)
49 #include <boost/program_options/options_description.hpp>
50 #include <boost/program_options/parsers.hpp>
51 #include <boost/program_options/variables_map.hpp>
52 #include <fstream>
53 #include <cstdlib>
54 
55 namespace po = boost::program_options;
56 #endif
57 
58 namespace G4INCL {
59 
67  class Config {
68  public:
70  Config();
71 
77 
84  Config(G4int argc, char *argv[], G4bool isFullRun);
85 
87  ~Config();
88 
90  void init();
91 
93  std::string summary();
94 
96  G4int getVerbosity() const { return verbosity; }
97 
99  std::string const &getCalculationTitle() const { return title; }
100 
102  std::string const &getOutputFileRoot() const { return outputFileRoot; }
103 
105  G4int getNumberOfShots() const { return nShots; }
106 
109 
115  G4int getTargetA() const { return targetSpecies.theA; }
116 
118  G4int getTargetZ() const { return targetSpecies.theZ; }
119 
122 
125 
128 
131 
134 
137 
140 
142  G4int getVerboseEvent() const { return verboseEvent; }
143 
145  static std::string const getVersionID();
146 
148  static std::string const getVersionHash();
149 
151  static std::string const getVersionString() {
152  std::stringstream ss;
153  ss << getVersionID() << "-" << getVersionHash();
154  return ss.str();
155  }
156 
162  return s;
163  }
164 
166  PauliType getPauliType() const { return pauliType; }
167 
169  G4bool getCDPP() const { return CDPP; }
170 
173 
176 
179 
182 
184  void setPionPotential(const G4bool pionPot) { pionPotential = pionPot; }
185 
188 
191 
194 
197 
199  std::string const &getLogFileName() const { return logFileName; }
200 
203 
205  std::string getDeExcitationString() const { return deExcitationString; }
206 
209 
212 
215 
218 
221 
223  void setUseRealMasses(G4bool use) { useRealMasses = use; }
224 
225  std::string const &getINCLXXDataFilePath() const {
226  return INCLXXDataFilePath;
227  }
228 
229 #ifdef INCL_DEEXCITATION_ABLAXX
230  std::string const &getABLAv3pCxxDataFilePath() const {
231  return ablav3pCxxDataFilePath;
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 
247 
250 
253 
256 
257  G4double getCutNN() const { return cutNN; }
258 
259 #ifdef INCL_ROOT_USE
260  std::string const &getROOTSelectionString() const {
261  return rootSelectionString;
262  }
263 #endif
264 
265 #ifdef INCL_DEEXCITATION_FERMI_BREAKUP
266  G4int getMaxMassFermiBreakUp() const {
267  return maxMassFermiBreakUp;
268  }
269 #endif
270 
273 // assert(t==Proton || t==Neutron);
275  }
276 
278  void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff) {
279 // assert(t==Proton || t==Neutron);
280  if(t==Proton)
282  else
284  }
285 
287  void setRPCorrelationCoefficient(const G4double corrCoeff) {
290  }
291 
294 
297 
300 
303 
305  G4bool getRefraction() const { return refraction; }
306 
308  void setRefraction(const G4bool r) { refraction = r; }
309 
310 #if defined(HAS_BOOST_PROGRAM_OPTIONS) && !defined(INCLXX_IN_GEANT4_MODE)
311  std::string const echo() const;
313 #endif
314 
315  private:
316 
317 #if defined(HAS_BOOST_PROGRAM_OPTIONS) && !defined(INCLXX_IN_GEANT4_MODE)
318  std::string echoOptionsDescription(const po::options_description &aDesc) const;
319 
320  po::options_description runOptDesc;
321  po::options_description hiddenOptDesc;
322  po::options_description genericOptDesc;
323  po::options_description physicsOptDesc;
324  po::variables_map variablesMap;
325 #endif
326 
328  std::string inputFileName;
329  std::string title;
330  std::string outputFileRoot;
331  std::string fileSuffix;
332  std::string logFileName;
333 
335 
336  std::string targetString;
339 
340  std::string projectileString;
343 
345 
348 
349  std::string pauliString;
352 
353  std::string coulombString;
355 
356  std::string potentialString;
359 
360  std::string localEnergyBBString;
362 
363  std::string localEnergyPiString;
365 
368  std::string deExcitationString;
370 #ifdef INCL_DEEXCITATION_ABLAXX
371  std::string ablav3pCxxDataFilePath;
372 #endif
373 #ifdef INCL_DEEXCITATION_ABLA07
374  std::string abla07DataFilePath;
375 #endif
376 #ifdef INCL_DEEXCITATION_GEMINIXX
377  std::string geminixxDataFilePath;
378 #endif
379  std::string INCLXXDataFilePath;
380 
383 
385 
387 
389 
391 
394 
395  std::string fermiMomentumString;
397 
399 
400 #ifdef INCL_ROOT_USE
401  std::string rootSelectionString;
402 #endif
403 
404 #ifdef INCL_DEEXCITATION_FERMI_BREAKUP
405  G4int maxMassFermiBreakUp;
406 #endif
407 
411 
414 
416  };
417 
418 }
419 
420 #endif
DeExcitationType getDeExcitationType() const
Get the de-excitation model.
std::string fermiMomentumString
The INCL configuration object.
Definition: G4INCLConfig.hh:67
ParticleType getProjectileType() const
Get the projectile type.
LocalEnergyType localEnergyPiType
PauliType pauliType
std::string separationEnergyString
std::string targetString
void setFermiMomentumType(FermiMomentumType const f)
Set the Fermi-momentum type.
void setProjectileSpecies(ParticleSpecies const &ps)
Set the projectile species.
ClusterAlgorithmType clusterAlgorithmType
std::string potentialString
void setRPCorrelationCoefficient(const G4double corrCoeff)
Set the r-p correlation coefficient.
std::string localEnergyBBString
PotentialType potentialType
FermiMomentumType fermiMomentumType
std::string deExcitationOptionDescription
G4int getTargetZ() const
Get the target charge number.
G4int getNumberOfShots() const
Get the number of shots.
std::string pauliString
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.
G4int getClusterMaxMass() const
Get the maximum mass for production of clusters.
std::string localEnergyPiString
~Config()
Default destructor.
std::string clusterAlgorithmString
void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff)
Set the r-p correlation coefficient.
std::string outputFileRoot
G4bool backToSpectator
G4double getNeutronSkinAdditionalDiffuseness() const
Get the neutron-skin additional diffuseness.
G4bool isNaturalTarget() const
Natural targets.
static const G4int randomSeedMin
int G4int
Definition: G4Types.hh:78
SeparationEnergyType getSeparationEnergyType() const
Get the separation-energy type.
CoulombType coulombType
std::string coulombString
void setLocalEnergyBBType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
G4int getVerbosity() const
Get the verbosity.
Definition: G4INCLConfig.hh:96
static const double s
Definition: G4SIunits.hh:150
G4double getImpactParameter() const
G4bool getCDPP() const
Do we want CDPP?
static std::string const getVersionString()
Get the INCL version string.
LocalEnergyType localEnergyBBType
void setNeutronSkinAdditionalDiffuseness(const G4double d)
Set the neutron-skin additional diffuseness.
void setTargetA(G4int A)
Set target mass number.
G4bool getBackToSpectator() const
Get back-to-spectator.
G4double rpCorrelationCoefficientProton
std::string deExcitationModelList
PauliType getPauliType() const
Get the Pauli-blocking algorithm.
void setRefraction(const G4bool r)
Set the refraction variable.
bool G4bool
Definition: G4Types.hh:79
G4double neutronSkinAdditionalDiffuseness
G4int getTargetA() const
Get the target mass number.
void setLocalEnergyPiType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
G4bool getPionPotential() const
Do we want the pion potential?
G4double impactParameter
G4double rpCorrelationCoefficient
ParticleSpecies targetSpecies
G4bool getUseRealMasses() const
Whether to use real masses.
static const G4double A[nN]
G4bool useRealMasses
G4double neutronSkinThickness
G4double projectileKineticEnergy
Config()
Default constructor.
Definition: G4INCLConfig.cc:48
std::string deExcitationString
G4bool naturalTarget
Random::SeedVector getRandomSeeds() const
Get the seeds for the random-number generator.
ClusterAlgorithmType getClusterAlgorithm() const
Get the clustering algorithm.
std::string title
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.
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
void init()
Initialise the members.
static const G4int randomSeedMax
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.
void setNeutronSkinThickness(const G4double d)
Set the neutron-skin thickness.
G4bool pionPotential
std::string fileSuffix
CoulombType getCoulombType() const
Get the Coulomb-distortion algorithm.
G4double getNeutronSkinThickness() const
Get the neutron-skin thickness.
std::string const & getOutputFileRoot() const
Get the output file root.
std::string const & getCalculationTitle() const
Get the run title.
Definition: G4INCLConfig.hh:99
std::string summary()
Return a summary of the run configuration.
void setClusterMaxMass(const G4int m)
Set the maximum mass for production of clusters.
static const double m
Definition: G4SIunits.hh:110
std::string projectileString
G4double rpCorrelationCoefficientNeutron
std::string INCLXXDataFilePath
void setPionPotential(const G4bool pionPot)
Set the type of the potential for nucleons.
void setUseRealMasses(G4bool use)
Set whether to use real masses.
std::string inputFileName
double G4double
Definition: G4Types.hh:76
DeExcitationType deExcitationType
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
SeparationEnergyType separationEnergyType
G4double getRPCorrelationCoefficient(const ParticleType t) const
Get the r-p correlation coefficient.
std::string logFileName
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.
ParticleSpecies projectileSpecies