34#define INCLXX_IN_GEANT4_MODE 1
59G4INCLXXInterfaceStore::G4INCLXXInterfaceStore() :
60 accurateProjectile(true),
61 theMaxProjMassINCL(18),
62 cascadeMinEnergyPerNucleon(1.*MeV),
63 conservationTolerance(5*MeV),
69 constructINCLXXVersionName();
73G4INCLXXInterfaceStore::~G4INCLXXInterfaceStore() {
74 delete theINCLXXInterfaceMessenger;
78void G4INCLXXInterfaceStore::DeleteModel() {
79 delete theINCLModel; theINCLModel=NULL;
104 const size_t lastDash = versionID.find_last_of(
"-");
105 versionName =
"INCL++ " + versionID.substr(0,lastDash);
115 if(accurateProjectile!=b) {
117 std::stringstream ss;
118 ss <<
"Switching from "
119 << (accurateProjectile ?
"\"accurate projectile\" mode to \"accurate target\"" :
"\"accurate target\" mode to \"accurate projectile\"")
122 <<
"Do this ONLY if you fully understand what it does!";
128 accurateProjectile=b;
133 if(theMaxClusterMass!=aMass) {
135 std::stringstream ss;
136 ss <<
"Changing maximum cluster mass from "
142 <<
"Do this ONLY if you fully understand what this setting does!";
173 if(++nWarnings<=maxWarnings) {
175 if(nWarnings==maxWarnings) {
176 G4cout <<
"[INCL++] INCL++ has already emitted " << maxWarnings <<
" warnings and will emit no more." <<
G4endl;
187 <<
"================================================================================"
189 <<
" INCL++ WARNING "
193 <<
"================================================================================"
199 if(cascadeMinEnergyPerNucleon!=anEnergy) {
201 std::stringstream ss;
202 ss <<
"Changing minimim cascade energy from "
203 << cascadeMinEnergyPerNucleon / MeV
208 <<
"Do this ONLY if you fully understand what this setting does!";
214 cascadeMinEnergyPerNucleon=anEnergy;
218 conservationTolerance = aTolerance;
226 if(option ==
"default") {
228 }
else if(option ==
"incl42") {
229 const G4String message =
"Changing INCL++ physics to mimic INCL4.2. Do this ONLY if you fully understand the implications!";
245 "SetINCLPhysics argument must be one of: default, incl42"
254 for(std::vector<G4HadronicInteraction *>::const_iterator iInter=interactions.begin(), e=interactions.end();
255 iInter!=e; ++iInter) {
257 if(theINCLInterface) {
261 if(!theAblaInterface)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4INCL_VERSION_ID
Messenger class for the Geant4 INCL++ interface.
Header file for the G4INCLXXInterfaceStore class.
G4GLOB_DLL std::ostream G4cout
std::vector< G4HadronicInteraction * > FindAllModels(const G4String &name)
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
static G4HadronicParameters * Instance()
Singleton class for configuring the INCL++ Geant4 interface.
void EmitWarning(const G4String &message)
Emit a warning to G4cout.
static G4INCLXXInterfaceStore * GetInstance()
Get the singleton instance.
void SetAccurateProjectile(const G4bool b)
Setter for accurateProjectile.
void SetCascadeMinEnergyPerNucleon(const G4double anEnergy)
Setter for cascadeMinEnergyPerNucleon.
G4int GetMaxProjMassINCL() const
Getter for theMaxProjMassINCL.
G4INCL::INCL * GetINCLModel()
Get the cached INCL model engine.
void SetTally(G4INCLXXVInterfaceTally *const aTally)
Setter for the interface tally.
G4double GetConservationTolerance() const
Getter for conservationTolerance.
static void DeleteInstance()
Delete the singleton instance.
void EmitBigWarning(const G4String &message) const
Emit a BIG warning to G4cout.
G4INCL::Config & GetINCLConfig()
Getter for theConfig.
void SetConservationTolerance(const G4double aTolerance)
Setter for conservationTolerance.
void constructINCLXXVersionName()
G4double GetCascadeMinEnergyPerNucleon() const
Getter for cascadeMinEnergyPerNucleon.
G4INCLXXVInterfaceTally * GetTally() const
Getter for the interface tally.
void UseAblaDeExcitation()
Set ABLA V3 to be the de-excitation model to be used with INCL++.
const std::string & getINCLXXVersionName()
void SetMaxClusterMass(const G4int aMass)
Setter for the maximum cluster mass.
G4bool GetAccurateProjectile() const
Getter for accurateProjectile.
void SetINCLPhysics(const G4String &option)
Set the INCL physics.
INCL++ intra-nuclear cascade.
void SetDeExcitation(G4VPreCompoundModel *ptr)
void setClusterAlgorithm(ClusterAlgorithmType const c)
Set the clustering algorithm.
void setLocalEnergyPiType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
void setBackToSpectator(const G4bool b)
Set back-to-spectator.
G4int getClusterMaxMass() const
Get the maximum mass for production of clusters.
void setCoulombType(CoulombType const c)
Set the Coulomb-distortion algorithm.
void setPionPotential(const G4bool pionPot)
Set the type of the potential for nucleons.
void setPotentialType(PotentialType type)
Set the type of the potential for nucleons.
void setCrossSectionsType(CrossSectionsType const c)
Set the Cross Section type.
void init()
Initialise the members.
void setLocalEnergyBBType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
void setClusterMaxMass(const G4int m)
Set the maximum mass for production of clusters.