Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -30,8 +30,6 @@
// Sylvie Leray, CEA
// Joseph Cugnon, University of Liege
//
// INCL++ revision: v5.1.8
//
#define INCLXX_IN_GEANT4_MODE 1
#include "globals.hh"
@@ -48,6 +46,7 @@
#include "G4INCLXXInterface.hh"
#include "G4INCLCascade.hh"
#include "G4INCLVersion.hh"
#include "G4INCLConfig.hh"
#include <list>
#include <sstream>
@@ -64,71 +63,31 @@ class G4INCLXXInterfaceStore {
public:
/// \brief Get the singleton instance
static G4INCLXXInterfaceStore *GetInstance() {
if(!theInstance)
theInstance = new G4INCLXXInterfaceStore;
return theInstance;
}
static G4INCLXXInterfaceStore *GetInstance();
/// \brief Delete the singleton instance
static void DeleteInstance() {
delete theInstance;
theInstance = NULL;
}
static void DeleteInstance();
/// \brief Get the cached INCL model engine
G4INCL::INCL *GetINCLModel() {
if(!theINCLModel) {
G4INCL::Config *theConfig = new G4INCL::Config;
theConfig->setClusterMaxMass(theMaxClusterMass);
theINCLModel = new G4INCL::INCL(theConfig);
// ownership of the Config object is taken over by the INCL model engine
}
return theINCLModel;
}
G4INCL::INCL *GetINCLModel();
void constructINCLXXVersionName();
const std::string &getINCLXXVersionName();
/// \brief Setter for accurateProjectile
void SetAccurateProjectile(const G4bool b) {
if(accurateProjectile!=b) {
// Parameter is changed, emit a big warning message
std::stringstream ss;
ss << "Switching from "
<< (accurateProjectile ? "\"accurate projectile\" mode to \"accurate target\"" : "\"accurate target\" mode to \"accurate projectile\"")
<< " mode."
<< G4endl
<< "Do this ONLY if you fully understand what it does!";
EmitBigWarning(ss.str());
}
// No need to delete the model for this parameter
accurateProjectile=b;
}
void SetAccurateProjectile(const G4bool b);
/// \brief Setter for theMaxClusterMass
void SetMaxClusterMass(const G4int aMass) {
if(theMaxClusterMass!=aMass) {
// Parameter is changed, emit a big warning message
std::stringstream ss;
ss << "Changing maximum cluster mass from "
<< theMaxClusterMass
<< " to "
<< aMass
<< "."
<< G4endl
<< "Do this ONLY if you fully understand what this setting does!";
EmitBigWarning(ss.str());
}
void SetMaxClusterMass(const G4int aMass);
// We must delete the model object to make sure that we use the new
// parameter
DeleteModel();
/// \brief Setter for cascadeMinEnergyPerNucleon
void SetCascadeMinEnergyPerNucleon(const G4double anEnergy);
theMaxClusterMass=aMass;
}
/// \brief Setter for conservationTolerance
void SetConservationTolerance(const G4double aTolerance);
@@ -138,26 +97,35 @@ class G4INCLXXInterfaceStore {
* The \see{G4INCLXXInterfaceMessenger} class provides a UI command to set
* this parameter.
*/
G4bool GetAccurateProjectile() const { return accurateProjectile; }
G4bool GetAccurateProjectile() const;
/** \brief Getter for cascadeMinEnergyPerNucleon
*
* The \see{G4INCLXXInterfaceMessenger} class provides a UI command to set
* this parameter.
*/
G4double GetCascadeMinEnergyPerNucleon() const;
/** \brief Getter for ClusterMaxMass
*
* The \see{G4INCLXXInterfaceMessenger} class provides a UI command to set
* this parameter.
*/
G4int GetMaxClusterMass() const { return theMaxClusterMass; }
G4int GetMaxClusterMass() const;
/// \brief Getter for theMaxProjMassINCL
G4int GetMaxProjMassINCL() const { return theMaxProjMassINCL; }
G4int GetMaxProjMassINCL() const;
/// \brief Getter for dumpInput
G4bool GetDumpInput() const { return dumpInput; }
/// \brief Getter for conservationTolerance
G4double GetConservationTolerance() const;
/** \brief Emit a warning to G4cout
@@ -193,13 +161,14 @@ class G4INCLXXInterfaceStore {
/// \brief Create a new Config object from the current options
static G4INCLXXInterfaceStore *theInstance;
static G4ThreadLocal G4INCLXXInterfaceStore *theInstance;
G4bool dumpInput;
G4bool accurateProjectile;
const G4int theMaxClusterMassDefault;
G4int theMaxClusterMass;
const G4int theMaxProjMassINCL;
G4double cascadeMinEnergyPerNucleon;
G4double conservationTolerance;
G4INCLXXInterfaceMessenger *theINCLXXInterfaceMessenger;
@@ -210,6 +179,8 @@ class G4INCLXXInterfaceStore {
/// \brief Maximum number of warnings
const G4int maxWarnings;
std::string versionName;
};
#endif // G4INCLXXINTERFACESTORE_HH_