Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
@@ -24,11 +24,12 @@
// ********************************************************************
//
// INCL++ intra-nuclear cascade model
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
// Davide Mancusi, CEA
// Alain Boudard, CEA
// Sylvie Leray, CEA
// Joseph Cugnon, University of Liege
// Alain Boudard, CEA-Saclay, France
// Joseph Cugnon, University of Liege, Belgium
// Jean-Christophe David, CEA-Saclay, France
// Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
// Sylvie Leray, CEA-Saclay, France
// Davide Mancusi, CEA-Saclay, France
//
#define INCLXX_IN_GEANT4_MODE 1
@@ -68,7 +69,7 @@ namespace G4INCL {
const G4double ClusteringModelIntercomparison::limitCosEscapeAngle = 0.7;
#ifndef INCLXX_IN_GEANT4_MODE
#ifdef INCL_DO_NOT_COMPILE
namespace {
G4bool cascadingFirstPredicate(ConsideredPartner const &aPartner) {
return !aPartner.isTargetSpectator;
@@ -145,7 +146,7 @@ namespace G4INCL {
// cluster production:
cascadingEnergyPool = 0.;
nConsidered = 0;
const ParticleList particles = theNucleus->getStore()->getParticles();
ParticleList const &particles = theNucleus->getStore()->getParticles();
for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
if (!(*i)->isNucleon()) continue; // Only nucleons are allowed in clusters
if ((*i)->getID() == theLeadingParticle->getID()) continue; // Don't count the leading particle
@@ -173,12 +174,14 @@ namespace G4INCL {
// spectators too.
// std::partition(consideredPartners, consideredPartners+nConsidered, cascadingFirstPredicate);
#ifndef INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_None
// Clear the sets of checked configurations
// We stop caching two masses short of the max mass -- there seems to be a
// performance hit above
maxMassConfigurationSkipping = runningMaxClusterAlgorithmMass-2;
for(G4int i=0; i<runningMaxClusterAlgorithmMass-2; ++i) // no caching for A=1,2
checkedConfigurations[i].clear();
#endif
// Initialise position, momentum and energy of the running cluster
// configuration
@@ -210,7 +213,7 @@ namespace G4INCL {
return chosenCluster;
}
inline G4double ClusteringModelIntercomparison::getPhaseSpace(const G4int oldA, ConsideredPartner const &p) {
G4double ClusteringModelIntercomparison::getPhaseSpace(const G4int oldA, ConsideredPartner const &p) {
const G4double psSpace = (p.position - runningPositions[oldA]).mag2();
const G4double psMomentum = (p.momentum*oldA - runningMomenta[oldA]).mag2();
return psSpace * psMomentum * clusterPosFact2[oldA + 1];
@@ -241,8 +244,8 @@ namespace G4INCL {
theConfigContainer = &(checkedConfigurations[oldA-2]);
else
theConfigContainer = NULL;
#else
#error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask.
#elif !defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_None)
#error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask, None.
#endif
// Minimum and maximum Z values for this mass
@@ -323,12 +326,13 @@ namespace G4INCL {
runningMomenta[newA] = runningMomenta[oldA] + candidateNucleon.momentum;
// Add the config to the container
if(cachingEnabled)
if(cachingEnabled) {
#if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
theHashContainer->insert(aHashIter, configHash);
#elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
theConfigContainer->insert(thisConfigIter, thisConfig);
#endif
}
// Set the flag that reminds us that this nucleon has already been taken
// in the running configuration