34 #define INCLXX_IN_GEANT4_MODE 1
58 G4INCLXXInterfaceStore::G4INCLXXInterfaceStore() :
59 accurateProjectile(true),
60 theMaxProjMassINCL(18),
61 cascadeMinEnergyPerNucleon(1.*
MeV),
62 conservationTolerance(5*
MeV),
68 constructINCLXXVersionName();
72 G4INCLXXInterfaceStore::~G4INCLXXInterfaceStore() {
73 delete theINCLXXInterfaceMessenger;
77 void G4INCLXXInterfaceStore::DeleteModel() {
78 delete theINCLModel; theINCLModel=NULL;
103 const size_t lastDash = versionID.find_last_of(
"-");
104 versionName =
"INCL++ " + versionID.substr(0,lastDash);
114 if(accurateProjectile!=b) {
116 std::stringstream ss;
117 ss <<
"Switching from "
118 << (accurateProjectile ?
"\"accurate projectile\" mode to \"accurate target\"" :
"\"accurate target\" mode to \"accurate projectile\"")
121 <<
"Do this ONLY if you fully understand what it does!";
127 accurateProjectile=b;
132 if(theMaxClusterMass!=aMass) {
134 std::stringstream ss;
135 ss <<
"Changing maximum cluster mass from "
141 <<
"Do this ONLY if you fully understand what this setting does!";
172 if(++nWarnings<=maxWarnings) {
174 if(nWarnings==maxWarnings) {
175 G4cout <<
"[INCL++] INCL++ has already emitted " << maxWarnings <<
" warnings and will emit no more." <<
G4endl;
183 <<
"================================================================================"
185 <<
" INCL++ WARNING "
189 <<
"================================================================================"
195 if(cascadeMinEnergyPerNucleon!=anEnergy) {
197 std::stringstream ss;
198 ss <<
"Changing minimim cascade energy from "
199 << cascadeMinEnergyPerNucleon /
MeV
204 <<
"Do this ONLY if you fully understand what this setting does!";
210 cascadeMinEnergyPerNucleon=anEnergy;
214 conservationTolerance = aTolerance;
222 if(option ==
"default") {
224 }
else if(option ==
"incl42") {
225 const G4String message =
"Changing INCL++ physics to mimick INCL4.2. Do this ONLY if you fully understand the implications!";
241 "SetINCLPhysics argument must be one of: default, incl42"
250 for(std::vector<G4HadronicInteraction *>::const_iterator iInter=interactions.begin(), e=interactions.end();
251 iInter!=e; ++iInter) {
253 if(theINCLInterface) {
257 if(!theAblaInterface)
void SetConservationTolerance(const G4double aTolerance)
Setter for conservationTolerance.
G4int GetMaxProjMassINCL() const
Getter for theMaxProjMassINCL.
G4double GetCascadeMinEnergyPerNucleon() const
Getter for cascadeMinEnergyPerNucleon.
#define G4INCL_VERSION_ID
void UseAblaDeExcitation()
Set ABLA V3 to be the de-excitation model to be used with INCL++.
std::vector< G4HadronicInteraction * > FindAllModels(const G4String &name)
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.
Header file for the G4INCLXXInterfaceStore class.
INCL++ intra-nuclear cascade.
void setLocalEnergyBBType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
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 setLocalEnergyPiType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
void SetCascadeMinEnergyPerNucleon(const G4double anEnergy)
Setter for cascadeMinEnergyPerNucleon.
void setClusterAlgorithm(ClusterAlgorithmType const c)
Set the clustering algorithm.
void SetINCLPhysics(const G4String &option)
Set the INCL physics.
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetTally(G4INCLXXVInterfaceTally *const aTally)
Setter for the interface tally.
G4HadronicInteraction * FindModel(const G4String &name)
void setCoulombType(CoulombType const c)
Set the Coulomb-distortion algorithm.
void init()
Initialise the members.
void setPotentialType(PotentialType type)
Set the type of the potential for nucleons.
static G4HadronicInteractionRegistry * Instance()
Messenger class for the Geant4 INCL++ interface.
G4bool GetAccurateProjectile() const
Getter for accurateProjectile.
G4double GetConservationTolerance() const
Getter for conservationTolerance.
void SetDeExcitation(G4VPreCompoundModel *ptr)
void constructINCLXXVersionName()
void setClusterMaxMass(const G4int m)
Set the maximum mass for production of clusters.
static constexpr double MeV
void setPionPotential(const G4bool pionPot)
Set the type of the potential for nucleons.
void EmitWarning(const G4String &message)
Emit a warning to G4cout.
void setBackToSpectator(const G4bool b)
Set back-to-spectator.
void SetMaxClusterMass(const G4int aMass)
Setter for the maximum cluster mass.
void setCrossSectionsType(CrossSectionsType const c)
Set the Cross Section type.
G4INCL::Config & GetINCLConfig()
Getter for theConfig.
G4INCLXXVInterfaceTally * GetTally() const
Getter for the interface tally.
static void DeleteInstance()
Delete the singleton instance.