G4INCL::Config Class Reference

#include <G4INCLConfig.hh>


Public Member Functions

 Config ()
 Default constructor.
 Config (G4int, G4int, ParticleSpecies, G4double)
 Config (G4int argc, char *argv[], G4bool isFullRun)
 Constructor based on command-line and config-file options.
 ~Config ()
 Default destructor.
void init ()
 Initialise the members.
std::string summary ()
 Return a summary of the run configuration.
G4int getVerbosity () const
 Get the verbosity.
std::string const & getCalculationTitle () const
 Get the run title.
std::string const & getOutputFileRoot () const
 Get the output file root.
G4int getNumberOfShots () const
 Get the number of shots.
G4bool isNaturalTarget () const
 Natural targets.
G4int getTargetA () const
 Get the target mass number.
G4int getTargetZ () const
 Get the target charge number.
void setTargetA (G4int A)
 Set target mass number.
void setTargetZ (G4int Z)
 Set target charge number.
ParticleType getProjectileType () const
 Get the projectile type.
ParticleSpecies getProjectileSpecies () const
 Get the projectile species.
void setProjectileSpecies (ParticleSpecies const &ps)
 Set the projectile species.
G4float getProjectileKineticEnergy () const
 Get the projectile kinetic energy.
void setProjectileKineticEnergy (G4float const kinE)
 Set the projectile kinetic energy.
G4int getVerboseEvent () const
 Get the number of the verbose event.
SeedVector const getRandomSeeds () const
 Get the seeds for the random-number generator.
PauliType getPauliType () const
 Get the Pauli-blocking algorithm.
G4bool getCDPP () const
 Do we want CDPP?
G4bool getPionPotential () const
 Do we want the pion potential?
CoulombType getCoulombType () const
 Get the Coulomb-distortion algorithm.
PotentialType getPotentialType () const
 Get the type of the potential for nucleons.
void setPotentialType (PotentialType type)
 Set the type of the potential for nucleons.
void setPionPotential (const G4bool pionPot)
 Set the type of the potential for nucleons.
LocalEnergyType getLocalEnergyBBType () const
 Get the type of local energy for N-N avatars.
LocalEnergyType getLocalEnergyPiType () const
 Get the type of local energy for pi-N and decay avatars.
void setLocalEnergyBBType (const LocalEnergyType t)
 Set the type of local energy for N-N avatars.
void setLocalEnergyPiType (const LocalEnergyType t)
 Set the type of local energy for N-N avatars.
std::string const & getLogFileName () const
 Get the log file name.
DeExcitationType getDeExcitationType () const
 Get the de-excitation model.
ClusterAlgorithmType getClusterAlgorithm () const
 Get the clustering algorithm.
G4int getClusterMaxMass () const
 Get the maximum mass for production of clusters.
void setClusterMaxMass (const G4int m)
 Set the maximum mass for production of clusters.
G4bool getBackToSpectator () const
 Get back-to-spectator.
G4bool getUseRealMasses () const
 Whether to use real masses.
void setUseRealMasses (G4bool use)
 Set whether to use real masses.
std::string const echo () const
 Echo the input options.
std::string const & getINCLXXDataFilePath () const
G4double getImpactParameter () const
SeparationEnergyType getSeparationEnergyType () const
 Get the separation-energy type.

Static Public Member Functions

static std::string const getVersionID ()
 Get the INCL version ID.


Detailed Description

The INCL configuration object

The Config object keeps track of various INCL physics options (e.g. which Pauli blocking scheme to use, whether to use local energy option or not, etc.

Definition at line 56 of file G4INCLConfig.hh.


Constructor & Destructor Documentation

G4INCL::Config::Config (  ) 

Default constructor.

Definition at line 56 of file G4INCLConfig.cc.

References init().

00057   {
00058     init();
00059   }

G4INCL::Config::Config ( G4int  ,
G4int  ,
ParticleSpecies  ,
G4double   
)

Constructor for INCL++ with specified target A, Z, projectile type and energy. All other options are the default ones.

Definition at line 61 of file G4INCLConfig.cc.

References init().

00062   {
00063     init();
00064     projectileSpecies = proj;
00065     projectileKineticEnergy = projectileE;
00066   }

G4INCL::Config::Config ( G4int  argc,
char *  argv[],
G4bool  isFullRun 
)

Constructor based on command-line and config-file options.

Parameters:
argc command-line parameters
argv command-line parameters
isFullRun is this a real calculation: true = yes; false = no, it's just a unit test

Definition at line 631 of file G4INCLConfig.cc.

References init().

00632     {
00633       init();
00634     }

G4INCL::Config::~Config (  ) 

Default destructor.

Definition at line 637 of file G4INCLConfig.cc.

00638   {}


Member Function Documentation

std::string const G4INCL::Config::echo (  )  const

Echo the input options.

Definition at line 692 of file G4INCLConfig.cc.

References G4INCL::ParticleSpecies::theA, and G4INCL::ParticleSpecies::theZ.

Referenced by G4INCL::INCL::configToString().

00692                                      {
00693     std::stringstream ss;
00694     ss << std::boolalpha;
00695     ss << "###########################" << std::endl
00696       << "### Start of input echo ###" << std::endl
00697       << "###########################" << std::endl << std::endl
00698       << " # You may re-use this snippet of the log file as an input file!" << std::endl
00699       << " # Options marked with a * are compulsory." << std::endl
00700       << std::endl
00701       << "# Run options" << std::endl
00702       << "title = " << title << "\t# run title" << std::endl
00703       << "output = " << outputFileRoot << "\t# root for generating output file names. Suffixes (.root, .out, etc.) will be appended to this root. Defaults to the input file name, if given; otherwise, defaults to a string composed of the explicitly specified options" << std::endl
00704       << "logfile = " << logFileName << "\t# log file name. Defaults to `<output_root>.log'. Use `-' if you want to redirect logging to stdout" << std::endl
00705       << "number-shots = " << nShots << "\t# * number of shots" << std::endl
00706       << "inclxx-datafile-path = " << INCLXXDataFilePath << std::endl
00707 #ifdef INCL_DEEXCITATION_ABLAXX
00708       << "ablav3p-cxx-datafile-path = " << ablav3pCxxDataFilePath << std::endl
00709 #endif
00710 #ifdef INCL_DEEXCITATION_ABLA07
00711       << "abla07-datafile-path = " << abla07DataFilePath << std::endl
00712 #endif
00713 #ifdef INCL_DEEXCITATION_GEMINIXX
00714       << "geminixx-datafile-path = " << geminixxDataFilePath << std::endl
00715 #endif
00716       << std::endl << "# Projectile and target definitions" << std::endl
00717       << "target = " << targetString << "\t# * target nuclide. Can be specified as Fe56, 56Fe, Fe-56, 56-Fe, Fe_56, 56_Fe or Fe. If the mass number is omitted, natural target composition is assumed." << std::endl
00718       << "         " << "# the target nuclide was parsed as Z=" << targetSpecies.theZ;
00719     if(targetSpecies.theA>0)
00720       ss << ", A=" << targetSpecies.theA;
00721     else
00722       ss << ", natural target";
00723     ss << std::endl
00724       << "projectile = " << projectileString << "\t# * projectile name (proton, neutron, pi+, pi0, pi-, d, t, a, He-4...)" << std::endl
00725       << "         " << "# the projectile nuclide was parsed as Z=" << projectileSpecies.theZ << ", A=" << projectileSpecies.theA << std::endl
00726       << "energy = " << projectileKineticEnergy << "\t# * total kinetic energy of the projectile, in MeV" << std::endl
00727       << std::endl << "# Physics options " << std::endl
00728       << "pauli = " << pauliString << "\t# Pauli-blocking algorithm. Must be one of: strict-statistical (default), strict, statistical, global, none" << std::endl
00729       << "cdpp = " << CDPP << "\t# whether to apply CDPP after collisions" << std::endl
00730       << "coulomb = " << coulombString << "\t# Coulomb-distortion algorithm. Must be one of: non-relativistic (default), none" << std::endl
00731       << "potential = " << potentialString << "\t# nucleon potential. Must be one of: isospin-energy-smooth, isospin-energy (default), isospin, constant" << std::endl
00732       << "pion-potential = " << pionPotential << "\t# whether to use a pion potential" << std::endl
00733       << "local-energy-BB = " << localEnergyBBString << "\t# local energy in baryon-baryon collisions. Must be one of: always, first-collision (default), never" << std::endl
00734       << "local-energy-pi = " << localEnergyPiString << "\t# local energy in pi-N collisions and in delta decays. Must be one of: always, first-collision (default), never" << std::endl
00735       << "de-excitation = " << deExcitationString << "\t # which de-excitation model to use. Must be one of:"
00736       " none (default)"
00737 #ifdef INCL_DEEXCITATION_ABLAXX
00738       ", ABLAv3p"
00739 #endif
00740 #ifdef INCL_DEEXCITATION_ABLA07
00741       ", ABLA07"
00742 #endif
00743 #ifdef INCL_DEEXCITATION_SMM
00744       ", SMM"
00745 #endif
00746 #ifdef INCL_DEEXCITATION_GEMINIXX
00747       ", GEMINIXX"
00748 #endif
00749       << std::endl
00750       << "cluster-algorithm = " << clusterAlgorithmString << "\t# clustering algorithm for production of composites. Must be one of: intercomparison (default), none" << std::endl
00751       << "cluster-max-mass = " << clusterMaxMass << "\t# maximum mass of produced composites. Must be between 2 and 12 (included)" << std::endl
00752       << "back-to-spectator = " << backToSpectator << "\t# whether to use back-to-spectator" << std::endl
00753       << "use-real-masses = " << useRealMasses << "\t# whether to use real masses for the outgoing particle energies" << std::endl
00754       << "separation-energies = " << separationEnergyString << "\t# how to assign the separation energies of the INCL nucleus. Must be one of: INCL (default), real, real-light" << std::endl
00755       << std::endl << "# Technical options " << std::endl
00756       << "verbosity = " << verbosity << "\t# from 0 (quiet) to 10 (most verbose)" << std::endl
00757       << "verbose-event = " << verboseEvent << "\t# request verbose logging for the specified event only" << std::endl
00758       << "random-seed-1 = " << randomSeed1 << "\t# first seed for the random-number generator" << std::endl
00759       << "random-seed-2 = " << randomSeed2 << "\t# second seed for the random-number generator" << std::endl
00760       << std::endl << "#########################" << std::endl
00761       << "### End of input echo ###" << std::endl
00762       << "#########################" << std::endl;
00763 
00764     return ss.str();
00765   }

G4bool G4INCL::Config::getBackToSpectator (  )  const [inline]

Get back-to-spectator.

Definition at line 193 of file G4INCLConfig.hh.

Referenced by G4INCL::InteractionAvatar::postInteraction().

00193 { return backToSpectator; }

std::string const& G4INCL::Config::getCalculationTitle (  )  const [inline]

Get the run title.

Definition at line 88 of file G4INCLConfig.hh.

00088 { return title; }

G4bool G4INCL::Config::getCDPP (  )  const [inline]

Do we want CDPP?

Definition at line 148 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::INCL().

00148 { return CDPP; }

ClusterAlgorithmType G4INCL::Config::getClusterAlgorithm (  )  const [inline]

Get the clustering algorithm.

Definition at line 184 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::INCL().

00184 { return clusterAlgorithmType; }

G4int G4INCL::Config::getClusterMaxMass (  )  const [inline]

Get the maximum mass for production of clusters.

Definition at line 187 of file G4INCLConfig.hh.

Referenced by G4INCL::ClusteringModelIntercomparison::getCluster().

00187 { return clusterMaxMass; }

CoulombType G4INCL::Config::getCoulombType (  )  const [inline]

Get the Coulomb-distortion algorithm.

Definition at line 154 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::INCL().

00154 { return coulombType; }

DeExcitationType G4INCL::Config::getDeExcitationType (  )  const [inline]

Get the de-excitation model.

Definition at line 181 of file G4INCLConfig.hh.

00181 { return deExcitationType; }

G4double G4INCL::Config::getImpactParameter (  )  const [inline]

Definition at line 225 of file G4INCLConfig.hh.

00225 { return impactParameter; }

std::string const& G4INCL::Config::getINCLXXDataFilePath (  )  const [inline]

Definition at line 204 of file G4INCLConfig.hh.

Referenced by G4INCL::ParticleTable::initialize().

00204                                                    {
00205       return INCLXXDataFilePath;
00206     }

LocalEnergyType G4INCL::Config::getLocalEnergyBBType (  )  const [inline]

Get the type of local energy for N-N avatars.

Definition at line 166 of file G4INCLConfig.hh.

Referenced by G4INCL::InteractionAvatar::shouldUseLocalEnergy().

00166 { return localEnergyBBType; }

LocalEnergyType G4INCL::Config::getLocalEnergyPiType (  )  const [inline]

Get the type of local energy for pi-N and decay avatars.

Definition at line 169 of file G4INCLConfig.hh.

Referenced by G4INCL::InteractionAvatar::shouldUseLocalEnergy().

00169 { return localEnergyPiType; }

std::string const& G4INCL::Config::getLogFileName (  )  const [inline]

Get the log file name.

Definition at line 178 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::INCL().

00178 { return logFileName; }

G4int G4INCL::Config::getNumberOfShots (  )  const [inline]

Get the number of shots.

Definition at line 94 of file G4INCLConfig.hh.

00094 { return nShots; }

std::string const& G4INCL::Config::getOutputFileRoot (  )  const [inline]

Get the output file root.

Definition at line 91 of file G4INCLConfig.hh.

00091 { return outputFileRoot; }

PauliType G4INCL::Config::getPauliType (  )  const [inline]

Get the Pauli-blocking algorithm.

Definition at line 145 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::INCL().

00145 { return pauliType; }

G4bool G4INCL::Config::getPionPotential (  )  const [inline]

Do we want the pion potential?

Definition at line 151 of file G4INCLConfig.hh.

Referenced by G4INCL::Nucleus::Nucleus().

00151 { return pionPotential; }

PotentialType G4INCL::Config::getPotentialType (  )  const [inline]

Get the type of the potential for nucleons.

Definition at line 157 of file G4INCLConfig.hh.

Referenced by G4INCL::Nucleus::Nucleus().

00157 { return potentialType; }

G4float G4INCL::Config::getProjectileKineticEnergy (  )  const [inline]

Get the projectile kinetic energy.

Definition at line 125 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::processEvent().

00125 { return projectileKineticEnergy; }

ParticleSpecies G4INCL::Config::getProjectileSpecies (  )  const [inline]

Get the projectile species.

Definition at line 119 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::processEvent().

00119 { return projectileSpecies; }

ParticleType G4INCL::Config::getProjectileType (  )  const [inline]

Get the projectile type.

Definition at line 116 of file G4INCLConfig.hh.

References G4INCL::ParticleSpecies::theType.

00116 { return projectileSpecies.theType; }

SeedVector const G4INCL::Config::getRandomSeeds (  )  const [inline]

Get the seeds for the random-number generator.

Definition at line 137 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::INCL().

00137                                             {
00138       SeedVector s;
00139       s.push_back(randomSeed1);
00140       s.push_back(randomSeed2);
00141       return s;
00142     }

SeparationEnergyType G4INCL::Config::getSeparationEnergyType (  )  const [inline]

Get the separation-energy type.

Definition at line 228 of file G4INCLConfig.hh.

Referenced by G4INCL::ParticleTable::initialize().

00228 { return separationEnergyType; }

G4int G4INCL::Config::getTargetA (  )  const [inline]

Get the target mass number.

Note that A==0 means natural target. You should first check the isNaturalTarget() method.

Definition at line 104 of file G4INCLConfig.hh.

References G4INCL::ParticleSpecies::theA.

Referenced by G4INCL::INCL::processEvent().

00104 { return targetSpecies.theA; }

G4int G4INCL::Config::getTargetZ (  )  const [inline]

Get the target charge number.

Definition at line 107 of file G4INCLConfig.hh.

References G4INCL::ParticleSpecies::theZ.

Referenced by G4INCL::INCL::processEvent().

00107 { return targetSpecies.theZ; }

G4bool G4INCL::Config::getUseRealMasses (  )  const [inline]

Whether to use real masses.

Definition at line 196 of file G4INCLConfig.hh.

Referenced by G4INCL::ParticleTable::initialize().

00196 { return useRealMasses; }

G4int G4INCL::Config::getVerboseEvent (  )  const [inline]

Get the number of the verbose event.

Definition at line 131 of file G4INCLConfig.hh.

00131 { return verboseEvent; }

G4int G4INCL::Config::getVerbosity (  )  const [inline]

Get the verbosity.

Definition at line 85 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::INCL().

00085 { return verbosity; }

std::string const G4INCL::Config::getVersionID (  )  [static]

Get the INCL version ID.

Definition at line 53 of file G4INCLConfigVersion.cc.

References G4INCL_VERSION_ID.

Referenced by summary().

00053 { return G4INCL_VERSION_ID; }

void G4INCL::Config::init (  ) 

Initialise the members.

Definition at line 640 of file G4INCLConfig.cc.

References G4INCL::DeExcitationNone, G4INCL::FirstCollisionLocalEnergy, G4INCL::INCLSeparationEnergy, G4INCL::IntercomparisonClusterAlgorithm, G4INCL::IsospinEnergyPotential, G4INCL::NonRelativisticCoulomb, G4INCL::Proton, and G4INCL::StrictStatisticalPauli.

Referenced by Config().

00640                     {
00641       verbosity = 1;
00642       inputFileName = "";
00643       title = "INCL default run title";
00644       nShots = 1000;
00645       naturalTarget = false;
00646       projectileString = "proton";
00647       projectileSpecies = G4INCL::Proton;
00648       projectileKineticEnergy = 1000.0;
00649       verboseEvent = -1;
00650       randomSeed1 = 666;
00651       randomSeed2 = 777;
00652       pauliString = "strict-statistical";
00653       pauliType = StrictStatisticalPauli;
00654       CDPP = true;
00655       coulombString = "non-relativistic";
00656       coulombType = NonRelativisticCoulomb;
00657       potentialString = "isospin-energy";
00658       potentialType = IsospinEnergyPotential;
00659       pionPotential = true;
00660       localEnergyBBString = "first-collision";
00661       localEnergyBBType = FirstCollisionLocalEnergy;
00662       localEnergyPiString = "first-collision";
00663       localEnergyPiType = FirstCollisionLocalEnergy;
00664       deExcitationString = "none";
00665       deExcitationType = DeExcitationNone;
00666       clusterAlgorithmString = "intercomparison";
00667       clusterAlgorithmType = IntercomparisonClusterAlgorithm;
00668       clusterMaxMass = 8;
00669       backToSpectator = true;
00670       useRealMasses = true;
00671       impactParameter = -1.;
00672       separationEnergyString = "INCL";
00673       separationEnergyType = INCLSeparationEnergy;
00674   }

G4bool G4INCL::Config::isNaturalTarget (  )  const [inline]

Natural targets.

Definition at line 97 of file G4INCLConfig.hh.

Referenced by G4INCL::INCL::prepareReaction().

00097 { return naturalTarget; }

void G4INCL::Config::setClusterMaxMass ( const G4int  m  )  [inline]

Set the maximum mass for production of clusters.

Definition at line 190 of file G4INCLConfig.hh.

Referenced by G4INCLXXInterfaceStore::GetINCLModel().

00190 { clusterMaxMass=m; }

void G4INCL::Config::setLocalEnergyBBType ( const LocalEnergyType  t  )  [inline]

Set the type of local energy for N-N avatars.

Definition at line 172 of file G4INCLConfig.hh.

00172 { localEnergyBBType=t; }

void G4INCL::Config::setLocalEnergyPiType ( const LocalEnergyType  t  )  [inline]

Set the type of local energy for N-N avatars.

Definition at line 175 of file G4INCLConfig.hh.

00175 { localEnergyPiType=t; }

void G4INCL::Config::setPionPotential ( const G4bool  pionPot  )  [inline]

Set the type of the potential for nucleons.

Definition at line 163 of file G4INCLConfig.hh.

00163 { pionPotential = pionPot; }

void G4INCL::Config::setPotentialType ( PotentialType  type  )  [inline]

Set the type of the potential for nucleons.

Definition at line 160 of file G4INCLConfig.hh.

00160 { potentialType = type; }

void G4INCL::Config::setProjectileKineticEnergy ( G4float const   kinE  )  [inline]

Set the projectile kinetic energy.

Definition at line 128 of file G4INCLConfig.hh.

00128 { projectileKineticEnergy=kinE; }

void G4INCL::Config::setProjectileSpecies ( ParticleSpecies const &  ps  )  [inline]

Set the projectile species.

Definition at line 122 of file G4INCLConfig.hh.

00122 { projectileSpecies=ps; }

void G4INCL::Config::setTargetA ( G4int  A  )  [inline]

Set target mass number.

Definition at line 110 of file G4INCLConfig.hh.

References G4INCL::ParticleSpecies::theA.

00110 { targetSpecies.theA = A; }

void G4INCL::Config::setTargetZ ( G4int  Z  )  [inline]

Set target charge number.

Definition at line 113 of file G4INCLConfig.hh.

References G4INCL::ParticleSpecies::theZ.

00113 { targetSpecies.theZ = Z; }

void G4INCL::Config::setUseRealMasses ( G4bool  use  )  [inline]

Set whether to use real masses.

Definition at line 199 of file G4INCLConfig.hh.

00199 { useRealMasses = use; }

std::string G4INCL::Config::summary (  ) 

Return a summary of the run configuration.

Definition at line 676 of file G4INCLConfig.cc.

References G4INCL::Composite, G4INCL::ParticleTable::getName(), getVersionID(), G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theType, and G4INCL::ParticleSpecies::theZ.

00676                             {
00677     std::stringstream message;
00678     message << "INCL++ version " << getVersionID() << std::endl;
00679     if(projectileSpecies.theType != Composite)
00680       message << "Projectile: " << ParticleTable::getName(projectileSpecies) << std::endl;
00681     else
00682       message << "Projectile: composite, A=" << projectileSpecies.theA << ", Z=" << projectileSpecies.theZ << std::endl;
00683     message << "  energy = " << projectileKineticEnergy << std::endl;
00684     if(targetSpecies.theA>0)
00685       message << "Target: A = " << targetSpecies.theA << " Z = " << targetSpecies.theZ << std::endl;
00686     else
00687       message << "Target: natural isotopic composition, Z = " << targetSpecies.theZ << std::endl;
00688     message << "Number of requested shots = " << nShots << std::endl;
00689     return message.str();
00690   }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:54:08 2013 for Geant4 by  doxygen 1.4.7