Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 constgetCalculationTitle () const
 Get the run title.
 
std::string constgetOutputFileRoot () 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 constgetLogFileName () 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 constgetINCLXXDataFilePath () 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 58 of file G4INCLConfig.hh.

Constructor & Destructor Documentation

◆ Config() [1/3]

G4INCL::Config::Config ( )

Default constructor.

Definition at line 58 of file G4INCLConfig.cc.

59 {
60 init();
61 }
void init()
Initialise the members.

◆ Config() [2/3]

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

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

Definition at line 63 of file G4INCLConfig.cc.

64 {
65 init();
66 projectileSpecies = proj;
67 projectileKineticEnergy = projectileE;
68 }

◆ Config() [3/3]

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

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

Parameters
argccommand-line parameters
argvcommand-line parameters
isFullRunis this a real calculation: true = yes; false = no, it's just a unit test

Definition at line 633 of file G4INCLConfig.cc.

634 {
635 init();
636 }

◆ ~Config()

G4INCL::Config::~Config ( )

Default destructor.

Definition at line 639 of file G4INCLConfig.cc.

640 {}

Member Function Documentation

◆ echo()

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

Echo the input options.

Definition at line 694 of file G4INCLConfig.cc.

694 {
695 std::stringstream ss;
696 ss << std::boolalpha;
697 ss << "###########################" << std::endl
698 << "### Start of input echo ###" << std::endl
699 << "###########################" << std::endl << std::endl
700 << " # You may re-use this snippet of the log file as an input file!" << std::endl
701 << " # Options marked with a * are compulsory." << std::endl
702 << std::endl
703 << "# Run options" << std::endl
704 << "title = " << title << "\t# run title" << std::endl
705 << "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
706 << "logfile = " << logFileName << "\t# log file name. Defaults to `<output_root>.log'. Use `-' if you want to redirect logging to stdout" << std::endl
707 << "number-shots = " << nShots << "\t# * number of shots" << std::endl
708 << "inclxx-datafile-path = " << INCLXXDataFilePath << std::endl
709#ifdef INCL_DEEXCITATION_ABLAXX
710 << "ablav3p-cxx-datafile-path = " << ablav3pCxxDataFilePath << std::endl
711#endif
712#ifdef INCL_DEEXCITATION_ABLA07
713 << "abla07-datafile-path = " << abla07DataFilePath << std::endl
714#endif
715#ifdef INCL_DEEXCITATION_GEMINIXX
716 << "geminixx-datafile-path = " << geminixxDataFilePath << std::endl
717#endif
718 << std::endl << "# Projectile and target definitions" << std::endl
719 << "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
720 << " " << "# the target nuclide was parsed as Z=" << targetSpecies.theZ;
721 if(targetSpecies.theA>0)
722 ss << ", A=" << targetSpecies.theA;
723 else
724 ss << ", natural target";
725 ss << std::endl
726 << "projectile = " << projectileString << "\t# * projectile name (proton, neutron, pi+, pi0, pi-, d, t, a, He-4...)" << std::endl
727 << " " << "# the projectile nuclide was parsed as Z=" << projectileSpecies.theZ << ", A=" << projectileSpecies.theA << std::endl
728 << "energy = " << projectileKineticEnergy << "\t# * total kinetic energy of the projectile, in MeV" << std::endl
729 << std::endl << "# Physics options " << std::endl
730 << "pauli = " << pauliString << "\t# Pauli-blocking algorithm. Must be one of: strict-statistical (default), strict, statistical, global, none" << std::endl
731 << "cdpp = " << CDPP << "\t# whether to apply CDPP after collisions" << std::endl
732 << "coulomb = " << coulombString << "\t# Coulomb-distortion algorithm. Must be one of: non-relativistic (default), none" << std::endl
733 << "potential = " << potentialString << "\t# nucleon potential. Must be one of: isospin-energy-smooth, isospin-energy (default), isospin, constant" << std::endl
734 << "pion-potential = " << pionPotential << "\t# whether to use a pion potential" << std::endl
735 << "local-energy-BB = " << localEnergyBBString << "\t# local energy in baryon-baryon collisions. Must be one of: always, first-collision (default), never" << std::endl
736 << "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
737 << "de-excitation = " << deExcitationString << "\t # which de-excitation model to use. Must be one of:"
738 " none (default)"
739#ifdef INCL_DEEXCITATION_ABLAXX
740 ", ABLAv3p"
741#endif
742#ifdef INCL_DEEXCITATION_ABLA07
743 ", ABLA07"
744#endif
745#ifdef INCL_DEEXCITATION_SMM
746 ", SMM"
747#endif
748#ifdef INCL_DEEXCITATION_GEMINIXX
749 ", GEMINIXX"
750#endif
751 << std::endl
752 << "cluster-algorithm = " << clusterAlgorithmString << "\t# clustering algorithm for production of composites. Must be one of: intercomparison (default), none" << std::endl
753 << "cluster-max-mass = " << clusterMaxMass << "\t# maximum mass of produced composites. Must be between 2 and 12 (included)" << std::endl
754 << "back-to-spectator = " << backToSpectator << "\t# whether to use back-to-spectator" << std::endl
755 << "use-real-masses = " << useRealMasses << "\t# whether to use real masses for the outgoing particle energies" << std::endl
756 << "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
757 << std::endl << "# Technical options " << std::endl
758 << "verbosity = " << verbosity << "\t# from 0 (quiet) to 10 (most verbose)" << std::endl
759 << "verbose-event = " << verboseEvent << "\t# request verbose logging for the specified event only" << std::endl
760 << "random-seed-1 = " << randomSeed1 << "\t# first seed for the random-number generator" << std::endl
761 << "random-seed-2 = " << randomSeed2 << "\t# second seed for the random-number generator" << std::endl
762 << std::endl << "#########################" << std::endl
763 << "### End of input echo ###" << std::endl
764 << "#########################" << std::endl;
765
766 return ss.str();
767 }

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

◆ getBackToSpectator()

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

Get back-to-spectator.

Definition at line 195 of file G4INCLConfig.hh.

195{ return backToSpectator; }

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

◆ getCalculationTitle()

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

Get the run title.

Definition at line 90 of file G4INCLConfig.hh.

90{ return title; }

◆ getCDPP()

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

Do we want CDPP?

Definition at line 150 of file G4INCLConfig.hh.

150{ return CDPP; }

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

◆ getClusterAlgorithm()

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

Get the clustering algorithm.

Definition at line 186 of file G4INCLConfig.hh.

186{ return clusterAlgorithmType; }

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

◆ getClusterMaxMass()

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

Get the maximum mass for production of clusters.

Definition at line 189 of file G4INCLConfig.hh.

189{ return clusterMaxMass; }

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

◆ getCoulombType()

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

Get the Coulomb-distortion algorithm.

Definition at line 156 of file G4INCLConfig.hh.

156{ return coulombType; }

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

◆ getDeExcitationType()

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

Get the de-excitation model.

Definition at line 183 of file G4INCLConfig.hh.

183{ return deExcitationType; }

◆ getImpactParameter()

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

Definition at line 227 of file G4INCLConfig.hh.

227{ return impactParameter; }

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

◆ getINCLXXDataFilePath()

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

Definition at line 206 of file G4INCLConfig.hh.

206 {
207 return INCLXXDataFilePath;
208 }

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

◆ getLocalEnergyBBType()

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

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

Definition at line 168 of file G4INCLConfig.hh.

168{ return localEnergyBBType; }

Referenced by G4INCL::INCL::INCL(), and G4INCL::InteractionAvatar::shouldUseLocalEnergy().

◆ getLocalEnergyPiType()

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

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

Definition at line 171 of file G4INCLConfig.hh.

171{ return localEnergyPiType; }

Referenced by G4INCL::INCL::INCL(), and G4INCL::InteractionAvatar::shouldUseLocalEnergy().

◆ getLogFileName()

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

Get the log file name.

Definition at line 180 of file G4INCLConfig.hh.

180{ return logFileName; }

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

◆ getNumberOfShots()

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

Get the number of shots.

Definition at line 96 of file G4INCLConfig.hh.

96{ return nShots; }

◆ getOutputFileRoot()

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

Get the output file root.

Definition at line 93 of file G4INCLConfig.hh.

93{ return outputFileRoot; }

◆ getPauliType()

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

Get the Pauli-blocking algorithm.

Definition at line 147 of file G4INCLConfig.hh.

147{ return pauliType; }

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

◆ getPionPotential()

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

Do we want the pion potential?

Definition at line 153 of file G4INCLConfig.hh.

153{ return pionPotential; }

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

◆ getPotentialType()

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

Get the type of the potential for nucleons.

Definition at line 159 of file G4INCLConfig.hh.

159{ return potentialType; }

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

◆ getProjectileKineticEnergy()

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

Get the projectile kinetic energy.

Definition at line 127 of file G4INCLConfig.hh.

127{ return projectileKineticEnergy; }

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

◆ getProjectileSpecies()

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

Get the projectile species.

Definition at line 121 of file G4INCLConfig.hh.

121{ return projectileSpecies; }

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

◆ getProjectileType()

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

Get the projectile type.

Definition at line 118 of file G4INCLConfig.hh.

118{ return projectileSpecies.theType; }

◆ getRandomSeeds()

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

Get the seeds for the random-number generator.

Definition at line 139 of file G4INCLConfig.hh.

139 {
140 SeedVector s;
141 s.push_back(randomSeed1);
142 s.push_back(randomSeed2);
143 return s;
144 }
std::vector< long > SeedVector

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

◆ getSeparationEnergyType()

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

Get the separation-energy type.

Definition at line 230 of file G4INCLConfig.hh.

230{ return separationEnergyType; }

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

◆ getTargetA()

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 106 of file G4INCLConfig.hh.

106{ return targetSpecies.theA; }

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

◆ getTargetZ()

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

Get the target charge number.

Definition at line 109 of file G4INCLConfig.hh.

109{ return targetSpecies.theZ; }

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

◆ getUseRealMasses()

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

Whether to use real masses.

Definition at line 198 of file G4INCLConfig.hh.

198{ return useRealMasses; }

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

◆ getVerboseEvent()

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

Get the number of the verbose event.

Definition at line 133 of file G4INCLConfig.hh.

133{ return verboseEvent; }

◆ getVerbosity()

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

Get the verbosity.

Definition at line 87 of file G4INCLConfig.hh.

87{ return verbosity; }

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

◆ getVersionID()

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

Get the INCL version ID.

Definition at line 55 of file G4INCLConfigVersion.cc.

55{ return G4INCL_VERSION_ID; }
#define G4INCL_VERSION_ID

Referenced by G4INCL::INCL::INCL(), and summary().

◆ init()

void G4INCL::Config::init ( )

Initialise the members.

Definition at line 642 of file G4INCLConfig.cc.

642 {
643 verbosity = 1;
644 inputFileName = "";
645 title = "INCL default run title";
646 nShots = 1000;
647 naturalTarget = false;
648 projectileString = "proton";
649 projectileSpecies = G4INCL::Proton;
650 projectileKineticEnergy = 1000.0;
651 verboseEvent = -1;
652 randomSeed1 = 666;
653 randomSeed2 = 777;
654 pauliString = "strict-statistical";
655 pauliType = StrictStatisticalPauli;
656 CDPP = true;
657 coulombString = "non-relativistic";
658 coulombType = NonRelativisticCoulomb;
659 potentialString = "isospin-energy";
660 potentialType = IsospinEnergyPotential;
661 pionPotential = true;
662 localEnergyBBString = "first-collision";
663 localEnergyBBType = FirstCollisionLocalEnergy;
664 localEnergyPiString = "first-collision";
665 localEnergyPiType = FirstCollisionLocalEnergy;
666 deExcitationString = "none";
667 deExcitationType = DeExcitationNone;
668 clusterAlgorithmString = "intercomparison";
669 clusterAlgorithmType = IntercomparisonClusterAlgorithm;
670 clusterMaxMass = 8;
671 backToSpectator = true;
672 useRealMasses = true;
673 impactParameter = -1.;
674 separationEnergyString = "INCL";
675 separationEnergyType = INCLSeparationEnergy;
676 }
@ FirstCollisionLocalEnergy
@ IntercomparisonClusterAlgorithm
@ NonRelativisticCoulomb
@ IsospinEnergyPotential
@ StrictStatisticalPauli
@ INCLSeparationEnergy

Referenced by Config().

◆ isNaturalTarget()

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

Natural targets.

Definition at line 99 of file G4INCLConfig.hh.

99{ return naturalTarget; }

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

◆ setClusterMaxMass()

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

Set the maximum mass for production of clusters.

Definition at line 192 of file G4INCLConfig.hh.

192{ clusterMaxMass=m; }

Referenced by G4INCLXXInterfaceStore::GetINCLModel().

◆ setLocalEnergyBBType()

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

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

Definition at line 174 of file G4INCLConfig.hh.

174{ localEnergyBBType=t; }

◆ setLocalEnergyPiType()

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

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

Definition at line 177 of file G4INCLConfig.hh.

177{ localEnergyPiType=t; }

◆ setPionPotential()

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

Set the type of the potential for nucleons.

Definition at line 165 of file G4INCLConfig.hh.

165{ pionPotential = pionPot; }

◆ setPotentialType()

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

Set the type of the potential for nucleons.

Definition at line 162 of file G4INCLConfig.hh.

162{ potentialType = type; }

◆ setProjectileKineticEnergy()

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

Set the projectile kinetic energy.

Definition at line 130 of file G4INCLConfig.hh.

130{ projectileKineticEnergy=kinE; }

◆ setProjectileSpecies()

void G4INCL::Config::setProjectileSpecies ( ParticleSpecies const ps)
inline

Set the projectile species.

Definition at line 124 of file G4INCLConfig.hh.

124{ projectileSpecies=ps; }

◆ setTargetA()

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

Set target mass number.

Definition at line 112 of file G4INCLConfig.hh.

112{ targetSpecies.theA = A; }

◆ setTargetZ()

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

Set target charge number.

Definition at line 115 of file G4INCLConfig.hh.

115{ targetSpecies.theZ = Z; }

◆ setUseRealMasses()

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

Set whether to use real masses.

Definition at line 201 of file G4INCLConfig.hh.

201{ useRealMasses = use; }

◆ summary()

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

Return a summary of the run configuration.

Definition at line 678 of file G4INCLConfig.cc.

678 {
679 std::stringstream message;
680 message << "INCL++ version " << getVersionID() << std::endl;
681 if(projectileSpecies.theType != Composite)
682 message << "Projectile: " << ParticleTable::getName(projectileSpecies) << std::endl;
683 else
684 message << "Projectile: composite, A=" << projectileSpecies.theA << ", Z=" << projectileSpecies.theZ << std::endl;
685 message << " energy = " << projectileKineticEnergy << std::endl;
686 if(targetSpecies.theA>0)
687 message << "Target: A = " << targetSpecies.theA << " Z = " << targetSpecies.theZ << std::endl;
688 else
689 message << "Target: natural isotopic composition, Z = " << targetSpecies.theZ << std::endl;
690 message << "Number of requested shots = " << nShots << std::endl;
691 return message.str();
692 }
static std::string const getVersionID()
Get the INCL version ID.
static std::string getName(const ParticleType t)
Get the native INCL name of the particle.

The documentation for this class was generated from the following files: