33 #define INCLXX_IN_GEANT4_MODE 1
49 G4INCLXXInterfaceStore::G4INCLXXInterfaceStore() :
50 accurateProjectile(true),
51 theMaxProjMassINCL(18),
52 cascadeMinEnergyPerNucleon(1.*
MeV),
53 conservationTolerance(5*
MeV),
58 constructINCLXXVersionName();
62 G4INCLXXInterfaceStore::~G4INCLXXInterfaceStore() {
63 delete theINCLXXInterfaceMessenger;
67 void G4INCLXXInterfaceStore::DeleteModel() {
68 delete theINCLModel; theINCLModel=NULL;
93 const size_t lastDash = versionID.find_last_of(
"-");
94 versionName =
"INCL++ " + versionID.substr(0,lastDash);
104 if(accurateProjectile!=b) {
106 std::stringstream ss;
107 ss <<
"Switching from "
108 << (accurateProjectile ?
"\"accurate projectile\" mode to \"accurate target\"" :
"\"accurate target\" mode to \"accurate projectile\"")
111 <<
"Do this ONLY if you fully understand what it does!";
117 accurateProjectile=
b;
122 if(theMaxClusterMass!=aMass) {
124 std::stringstream ss;
125 ss <<
"Changing maximum cluster mass from "
131 <<
"Do this ONLY if you fully understand what this setting does!";
159 if(++nWarnings<=maxWarnings) {
161 if(nWarnings==maxWarnings) {
162 G4cout <<
"[INCL++] INCL++ has already emitted " << maxWarnings <<
" warnings and will emit no more." <<
G4endl;
170 <<
"================================================================================"
172 <<
" INCL++ WARNING "
176 <<
"================================================================================"
182 if(cascadeMinEnergyPerNucleon!=anEnergy) {
184 std::stringstream ss;
185 ss <<
"Changing minimim cascade energy from "
186 << cascadeMinEnergyPerNucleon /
MeV
191 <<
"Do this ONLY if you fully understand what this setting does!";
197 cascadeMinEnergyPerNucleon=anEnergy;
201 conservationTolerance = aTolerance;
void SetConservationTolerance(const G4double aTolerance)
Setter for conservationTolerance.
G4int GetMaxProjMassINCL() const
Getter for theMaxProjMassINCL.
G4double GetCascadeMinEnergyPerNucleon() const
Getter for cascadeMinEnergyPerNucleon.
#define G4INCL_VERSION_ID
const std::string & getINCLXXVersionName()
G4int getClusterMaxMass() const
Get the maximum mass for production of clusters.
void EmitBigWarning(const G4String &message) const
Emit a BIG warning to G4cout.
void SetAccurateProjectile(const G4bool b)
Setter for accurateProjectile.
static G4INCLXXInterfaceStore * GetInstance()
Get the singleton instance.
Singleton class for configuring the INCL++ Geant4 interface.
G4GLOB_DLL std::ostream G4cout
G4INCL::INCL * GetINCLModel()
Get the cached INCL model engine.
void SetCascadeMinEnergyPerNucleon(const G4double anEnergy)
Setter for cascadeMinEnergyPerNucleon.
Messenger class for the Geant4 INCL++ interface.
G4bool GetAccurateProjectile() const
Getter for accurateProjectile.
G4double GetConservationTolerance() const
Getter for conservationTolerance.
void constructINCLXXVersionName()
void setClusterMaxMass(const G4int m)
Set the maximum mass for production of clusters.
void EmitWarning(const G4String &message)
Emit a warning to G4cout.
void SetMaxClusterMass(const G4int aMass)
Setter for the maximum cluster mass.
G4INCL::Config & GetINCLConfig()
Getter for theConfig.
static void DeleteInstance()
Delete the singleton instance.