Geant4_10
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 
108  G4bool isNaturalTarget() const { return naturalTarget; }
109 
115  G4int getTargetA() const { return targetSpecies.theA; }
116 
118  G4int getTargetZ() const { return targetSpecies.theZ; }
119 
121  void setTargetA(G4int A) { targetSpecies.theA = A; }
122 
124  void setTargetZ(G4int Z) { targetSpecies.theZ = Z; }
125 
127  ParticleType getProjectileType() const { return projectileSpecies.theType; }
128 
130  ParticleSpecies getProjectileSpecies() const { return projectileSpecies; }
131 
133  void setProjectileSpecies(ParticleSpecies const &ps) { projectileSpecies=ps; }
134 
136  G4double getProjectileKineticEnergy() const { return projectileKineticEnergy; }
137 
139  void setProjectileKineticEnergy(G4double const kinE) { projectileKineticEnergy=kinE; }
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 
160  s.push_back(randomSeed1);
161  s.push_back(randomSeed2);
162  return s;
163  }
164 
166  PauliType getPauliType() const { return pauliType; }
167 
169  G4bool getCDPP() const { return CDPP; }
170 
172  G4bool getPionPotential() const { return pionPotential; }
173 
175  CoulombType getCoulombType() const { return coulombType; }
176 
178  PotentialType getPotentialType() const { return potentialType; }
179 
181  void setPotentialType(PotentialType type) { potentialType = type; }
182 
184  void setPionPotential(const G4bool pionPot) { pionPotential = pionPot; }
185 
187  LocalEnergyType getLocalEnergyBBType() const { return localEnergyBBType; }
188 
190  LocalEnergyType getLocalEnergyPiType() const { return localEnergyPiType; }
191 
193  void setLocalEnergyBBType(const LocalEnergyType t) { localEnergyBBType=t; }
194 
196  void setLocalEnergyPiType(const LocalEnergyType t) { localEnergyPiType=t; }
197 
199  std::string const &getLogFileName() const { return logFileName; }
200 
202  DeExcitationType getDeExcitationType() const { return deExcitationType; }
203 
205  std::string getDeExcitationString() const { return deExcitationString; }
206 
208  ClusterAlgorithmType getClusterAlgorithm() const { return clusterAlgorithmType; }
209 
211  G4int getClusterMaxMass() const { return clusterMaxMass; }
212 
214  void setClusterMaxMass(const G4int m){ clusterMaxMass=m; }
215 
217  G4bool getBackToSpectator() const { return backToSpectator; }
218 
220  G4bool getUseRealMasses() const { return useRealMasses; }
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 
246  G4double getImpactParameter() const { return impactParameter; }
247 
249  SeparationEnergyType getSeparationEnergyType() const { return separationEnergyType; }
250 
252  FermiMomentumType getFermiMomentumType() const { return fermiMomentumType; }
253 
255  void setFermiMomentumType(FermiMomentumType const f) { fermiMomentumType=f; }
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);
274  return ((t==Proton) ? rpCorrelationCoefficientProton : rpCorrelationCoefficientNeutron);
275  }
276 
278  void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff) {
279 // assert(t==Proton || t==Neutron);
280  if(t==Proton)
281  rpCorrelationCoefficientProton=corrCoeff;
282  else
283  rpCorrelationCoefficientNeutron=corrCoeff;
284  }
285 
287  void setRPCorrelationCoefficient(const G4double corrCoeff) {
290  }
291 
293  G4double getNeutronSkinThickness() const { return neutronSkinThickness; }
294 
296  void setNeutronSkinThickness(const G4double d) { neutronSkinThickness=d; }
297 
299  G4double getNeutronSkinAdditionalDiffuseness() const { return neutronSkinAdditionalDiffuseness; }
300 
302  void setNeutronSkinAdditionalDiffuseness(const G4double d) { neutronSkinAdditionalDiffuseness=d; }
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 
327  G4int verbosity;
328  std::string inputFileName;
329  std::string title;
330  std::string outputFileRoot;
331  std::string fileSuffix;
332  std::string logFileName;
333 
334  G4int nShots;
335 
336  std::string targetString;
337  ParticleSpecies targetSpecies;
338  G4bool naturalTarget;
339 
340  std::string projectileString;
341  ParticleSpecies projectileSpecies;
342  G4double projectileKineticEnergy;
343 
344  G4int verboseEvent;
345 
346  G4int randomSeed1, randomSeed2;
347  static const G4int randomSeedMin, randomSeedMax;
348 
349  std::string pauliString;
350  PauliType pauliType;
351  G4bool CDPP;
352 
353  std::string coulombString;
354  CoulombType coulombType;
355 
356  std::string potentialString;
357  PotentialType potentialType;
358  G4bool pionPotential;
359 
360  std::string localEnergyBBString;
361  LocalEnergyType localEnergyBBType;
362 
363  std::string localEnergyPiString;
364  LocalEnergyType localEnergyPiType;
365 
366  std::string deExcitationModelList;
367  std::string deExcitationOptionDescription;
368  std::string deExcitationString;
369  DeExcitationType deExcitationType;
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 
381  std::string clusterAlgorithmString;
382  ClusterAlgorithmType clusterAlgorithmType;
383 
384  G4int clusterMaxMass;
385 
386  G4bool backToSpectator;
387 
388  G4bool useRealMasses;
389 
390  G4double impactParameter;
391 
392  std::string separationEnergyString;
393  SeparationEnergyType separationEnergyType;
394 
395  std::string fermiMomentumString;
396  FermiMomentumType fermiMomentumType;
397 
398  G4double cutNN;
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 
408  G4double rpCorrelationCoefficient;
409  G4double rpCorrelationCoefficientProton;
410  G4double rpCorrelationCoefficientNeutron;
411 
412  G4double neutronSkinThickness;
413  G4double neutronSkinAdditionalDiffuseness;
414 
415  G4bool refraction;
416  };
417 
418 }
419 
420 #endif
DeExcitationType getDeExcitationType() const
Get the de-excitation model.
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.
G4int getTargetZ() const
Get the target charge number.
Float_t d
Definition: plot.C:237
G4int getNumberOfShots() const
Get the number of shots.
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 XML_Char * s
Definition: expat.h:262
G4int getClusterMaxMass() const
Get the maximum mass for production of clusters.
~Config()
Default destructor.
void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff)
Set the r-p correlation coefficient.
G4double getNeutronSkinAdditionalDiffuseness() const
Get the neutron-skin additional diffuseness.
G4bool isNaturalTarget() const
Natural targets.
int G4int
Definition: G4Types.hh:78
TFile f
Definition: plotHisto.C:6
SeparationEnergyType getSeparationEnergyType() const
Get the separation-energy type.
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
G4double getImpactParameter() const
G4bool getCDPP() const
Do we want CDPP?
static std::string const getVersionString()
Get the INCL version string.
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.
Float_t Z
Definition: plot.C:39
PauliType getPauliType() const
Get the Pauli-blocking algorithm.
void setRefraction(const G4bool r)
Set the refraction variable.
bool G4bool
Definition: G4Types.hh:79
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?
G4bool getUseRealMasses() const
Whether to use real masses.
Config()
Default constructor.
Definition: G4INCLConfig.cc:48
Random::SeedVector getRandomSeeds() const
Get the seeds for the random-number generator.
jump r
Definition: plot.C:36
ClusterAlgorithmType getClusterAlgorithm() const
Get the clustering algorithm.
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.
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.
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.
void setPionPotential(const G4bool pionPot)
Set the type of the potential for nucleons.
void setUseRealMasses(G4bool use)
Set whether to use real masses.
double G4double
Definition: G4Types.hh:76
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
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.