33 #define INCLXX_IN_GEANT4_MODE 1
49 G4INCLXXInterfaceStore::G4INCLXXInterfaceStore() :
50 accurateProjectile(true),
51 theMaxClusterMassDefault(8),
52 theMaxClusterMass(theMaxClusterMassDefault),
53 theMaxProjMassINCL(18),
54 cascadeMinEnergyPerNucleon(1.*
MeV),
55 conservationTolerance(5*
MeV),
60 constructINCLXXVersionName();
64 G4INCLXXInterfaceStore::~G4INCLXXInterfaceStore() {
65 delete theINCLXXInterfaceMessenger;
92 const size_t lastDash = versionID.find_last_of(
"-");
93 versionName =
"INCL++ " + versionID.substr(0,lastDash);
103 if(accurateProjectile!=b) {
105 std::stringstream ss;
106 ss <<
"Switching from "
107 << (accurateProjectile ?
"\"accurate projectile\" mode to \"accurate target\"" :
"\"accurate target\" mode to \"accurate projectile\"")
110 <<
"Do this ONLY if you fully understand what it does!";
116 accurateProjectile=
b;
120 if(theMaxClusterMass!=aMass) {
122 std::stringstream ss;
123 ss <<
"Changing maximum cluster mass from "
129 <<
"Do this ONLY if you fully understand what this setting does!";
137 theMaxClusterMass=aMass;
157 if(++nWarnings<=maxWarnings) {
159 if(nWarnings==maxWarnings) {
160 G4cout <<
"[INCL++] INCL++ has already emitted " << maxWarnings <<
" warnings and will emit no more." <<
G4endl;
168 <<
"================================================================================"
170 <<
" INCL++ WARNING "
174 <<
"================================================================================"
180 if(cascadeMinEnergyPerNucleon!=anEnergy) {
182 std::stringstream ss;
183 ss <<
"Changing minimim cascade energy from "
184 << cascadeMinEnergyPerNucleon /
MeV
189 <<
"Do this ONLY if you fully understand what this setting does!";
195 cascadeMinEnergyPerNucleon=anEnergy;
199 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()
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.
G4int GetMaxClusterMass() const
Getter for ClusterMaxMass.
void EmitWarning(const G4String &message)
Emit a warning to G4cout.
void SetMaxClusterMass(const G4int aMass)
Setter for theMaxClusterMass.
static void DeleteInstance()
Delete the singleton instance.