Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
@@ -96,12 +96,18 @@ namespace G4INCL {
/// \brief Get the target charge number.
G4int getTargetZ() const { return targetSpecies.theZ; }
/// \brief Get the target strangess number.
G4int getTargetS() const { return targetSpecies.theS; }
/// \brief Set target mass number
void setTargetA(G4int A) { targetSpecies.theA = A; }
/// \brief Set target charge number
void setTargetZ(G4int Z) { targetSpecies.theZ = Z; }
/// \brief Set target strangess number
void setTargetS(G4int S) { targetSpecies.theS = S; }
/// \brief Get the projectile type
ParticleType getProjectileType() const { return projectileSpecies.theType; }
@@ -353,12 +359,15 @@ namespace G4INCL {
G4bool getInverseKinematics() const { return inverseKinematics; }
/// \brief Get the hadronization time
/// \brief Get the decay time threshold time
G4double getDecayTimeThreshold() const { return decayTimeThreshold; }
/// \brief Set the hadronization time
/// \brief Set decay time threshold time
void setDecayTimeThreshold(const G4double t) { decayTimeThreshold=t; }
/// \brief Get the bias
G4double getBias() const { return bias; }
private:
G4int verbosity;
@@ -435,6 +444,8 @@ namespace G4INCL {
G4double fermiMomentum;
G4double cutNN;
G4double bias;
#ifdef INCL_ROOT_USE
std::string rootSelectionString;
@@ -118,7 +118,8 @@ namespace G4INCL {
INCL46CrossSections,
MultiPionsCrossSections,
TruncatedMultiPionsCrossSections,
MultiPionsAndResonancesCrossSections
MultiPionsAndResonancesCrossSections,
StrangenessCrossSections
};
// Enumerator for phase-space generator
@@ -71,9 +71,12 @@ namespace G4INCL {
projectileType(0),
At(0),
Zt(0),
St(0),
Ap(0),
Zp(0),
Sp(0),
Ep((Float_t)0.0),
eventBias((Float_t)0.0),
impactParameter((Float_t)0.0),
nCollisions(0),
stoppingTime((Float_t)0.0),
@@ -90,9 +93,18 @@ namespace G4INCL {
nBlockedDecays(0),
effectiveImpactParameter((Float_t)0.0),
deltasInside(false),
sigmasInside(false),
kaonsInside(false),
antikaonsInside(false),
lambdasInside(false),
forcedDeltasInside(false),
forcedDeltasOutside(false),
forcedPionResonancesOutside(false),
absorbedStrangeParticle(false),
forcedSigmaOutside(false),
forcedStrangeInside(false),
emitLambda(0),
emitKaon(false),
clusterDecay(false),
firstCollisionTime((Float_t)0.0),
firstCollisionXSec((Float_t)0.0),
@@ -109,7 +121,9 @@ namespace G4INCL {
{
std::fill_n(A, maxSizeParticles, 0);
std::fill_n(Z, maxSizeParticles, 0);
std::fill_n(S, maxSizeParticles, 0);
std::fill_n(PDGCode, maxSizeParticles, 0);
std::fill_n(ParticleBias, maxSizeParticles, (Float_t)0.0);
std::fill_n(EKin, maxSizeParticles, (Float_t)0.0);
std::fill_n(px, maxSizeParticles, (Float_t)0.0);
std::fill_n(py, maxSizeParticles, (Float_t)0.0);
@@ -120,6 +134,7 @@ namespace G4INCL {
std::fill_n(emissionTime, maxSizeParticles, (Float_t)0.0);
std::fill_n(ARem, maxSizeRemnants, 0);
std::fill_n(ZRem, maxSizeRemnants, 0);
std::fill_n(SRem, maxSizeRemnants, 0);
std::fill_n(EStarRem, maxSizeRemnants, (Float_t)0.0);
std::fill_n(JRem, maxSizeRemnants, (Float_t)0.0);
std::fill_n(EKinRem, maxSizeRemnants, (Float_t)0.0);
@@ -151,8 +166,12 @@ namespace G4INCL {
Short_t A[maxSizeParticles];
/** \brief Particle charge number */
Short_t Z[maxSizeParticles];
/** \brief Particle strangeness number */
Short_t S[maxSizeParticles];
/** \brief PDG numbering of the particles */
Int_t PDGCode[maxSizeParticles];
/** \brief Particle weight due to the bias */
Float_t ParticleBias[maxSizeParticles];
/** \brief Particle kinetic energy [MeV] */
Float_t EKin[maxSizeParticles];
/** \brief Particle momentum, x component [MeV/c] */
@@ -197,6 +216,8 @@ namespace G4INCL {
Short_t ARem[maxSizeRemnants];
/** \brief Remnant charge number */
Short_t ZRem[maxSizeRemnants];
/** \brief Remnant strangeness number */
Short_t SRem[maxSizeRemnants];
/** \brief Remnant excitation energy [MeV] */
Float_t EStarRem[maxSizeRemnants];
/** \brief Remnant spin [\f$\hbar\f$] */
@@ -225,12 +246,18 @@ namespace G4INCL {
Short_t At;
/** \brief Charge number of the target nucleus */
Short_t Zt;
/** \brief Strangeness number of the target nucleus */
Short_t St;
/** \brief Mass number of the projectile nucleus */
Short_t Ap;
/** \brief Charge number of the projectile nucleus */
Short_t Zp;
/** \brief Strangeness number of the projectile nucleus */
Short_t Sp;
/** \brief Projectile kinetic energy given as input */
Float_t Ep;
/** \brief Event bias */
Float_t eventBias;
/** \brief Impact parameter [fm] */
Float_t impactParameter;
/** \brief Number of accepted two-body collisions */
@@ -263,12 +290,30 @@ namespace G4INCL {
Float_t effectiveImpactParameter;
/** \brief Event involved deltas in the nucleus at the end of the cascade */
Bool_t deltasInside;
/** \brief Event involved sigmas in the nucleus at the end of the cascade */
Bool_t sigmasInside;
/** \brief Event involved kaons in the nucleus at the end of the cascade */
Bool_t kaonsInside;
/** \brief Event involved antikaons in the nucleus at the end of the cascade */
Bool_t antikaonsInside;
/** \brief Event involved lambdas in the nucleus at the end of the cascade */
Bool_t lambdasInside;
/** \brief Event involved forced delta decays inside the nucleus */
Bool_t forcedDeltasInside;
/** \brief Event involved forced delta decays outside the nucleus */
Bool_t forcedDeltasOutside;
/** \brief Event involved forced eta/omega decays outside the nucleus */
Bool_t forcedPionResonancesOutside;
/** \brief Event involved forced strange absorbtion inside the nucleus */
Bool_t absorbedStrangeParticle;
/** \brief Event involved forced Sigma Zero decays outside the nucleus */
Bool_t forcedSigmaOutside;
/** \brief Event involved forced antiKaon/Sigma absorbtion inside the nucleus */
Bool_t forcedStrangeInside;
/** \brief Number of forced Lambda emit out of the nucleus */
Int_t emitLambda;
/** \brief Event involved forced Kaon emission */
Bool_t emitKaon;
/** \brief Event involved cluster decay */
Bool_t clusterDecay;
/** \brief Time of the first collision [fm/c] */
@@ -308,9 +353,12 @@ namespace G4INCL {
projectileType = 0;
At = 0;
Zt = 0;
St = 0;
Ap = 0;
Zp = 0;
Sp = 0;
Ep = (Float_t)0.0;
eventBias = (Float_t)0.0;
impactParameter = (Float_t)0.0;
nCollisions = 0;
stoppingTime = (Float_t)0.0;
@@ -327,9 +375,18 @@ namespace G4INCL {
nBlockedDecays = 0;
effectiveImpactParameter = (Float_t)0.0;
deltasInside = false;
sigmasInside = false;
kaonsInside = false;
antikaonsInside = false;
lambdasInside = false;
forcedDeltasInside = false;
forcedDeltasOutside = false;
forcedPionResonancesOutside = false;
absorbedStrangeParticle = false;
forcedSigmaOutside = false;
forcedStrangeInside = false;
emitLambda = 0;
emitKaon = false;
clusterDecay = false;
firstCollisionTime = (Float_t)0.0;
firstCollisionXSec = (Float_t)0.0;
@@ -68,8 +68,10 @@ namespace G4INCL {
#endif
Ap(0),
Zp(0),
Sp(0),
At(0),
Zt(0),
St(0),
Ep((Float_t)0.0),
nShots(0),
geometricCrossSection((Float_t)0.0),
@@ -107,10 +109,14 @@ namespace G4INCL {
Short_t Ap;
/** \brief Projectile charge number given as input */
Short_t Zp;
/** \brief Projectile strangeness number given as input */
Short_t Sp;
/** \brief Target mass number given as input */
Short_t At;
/** \brief Target charge number given as input */
Short_t Zt;
/** \brief Target strangeness number given as input */
Short_t St;
/** \brief Projectile kinetic energy given as input */
Float_t Ep;
/** \brief Number of shots */
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// INCL++ intra-nuclear cascade model
// 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
#include "globals.hh"
#define G4INCLHFB_hh
#include <string>
#include <vector>
// #include <cassert>
#include "G4INCLParticleType.hh"
namespace G4INCL {
namespace HFB {
const G4int nTableZSize = 120;
const G4int nTableASize = 290;
const G4int pTableZSize = 120;
const G4int pTableASize = 290;
/// \brief Get the radius and diffuseness parameters from HFB calculations
G4double getRadiusParameterHFB(const ParticleType t, const G4int A, const G4int Z);
G4double getSurfaceDiffusenessHFB(const ParticleType t, const G4int A, const G4int Z);
}
}
@@ -64,9 +64,9 @@ template class std::vector<G4INCL::IAvatar*>;
namespace G4INCL {
enum AvatarType {SurfaceAvatarType,
CollisionAvatarType,
DecayAvatarType,
ParticleEntryAvatarType,
CollisionAvatarType,
DecayAvatarType,
ParticleEntryAvatarType,
UnknownAvatarType};
class IAvatar {
@@ -65,6 +65,8 @@ namespace G4INCL {
void rotatePosition(const G4double angle, const ThreeVector &axis) const;
void rotateMomentum(const G4double angle, const ThreeVector &axis) const;
void boost(const ThreeVector &b) const;
G4double getParticleListBias() const;
std::vector<G4int> getParticleListBiasVector() const;
};
typedef ParticleList::const_iterator ParticleIter;
@@ -84,6 +86,7 @@ namespace G4INCL {
Particle(const Particle &rhs) :
theZ(rhs.theZ),
theA(rhs.theA),
theS(rhs.theS),
theParticipantType(rhs.theParticipantType),
theType(rhs.theType),
theEnergy(rhs.theEnergy),
@@ -96,6 +99,7 @@ namespace G4INCL {
thePotentialEnergy(rhs.thePotentialEnergy),
rpCorrelated(rhs.rpCorrelated),
uncorrelatedMomentum(rhs.uncorrelatedMomentum),
theParticleBias(rhs.theParticleBias),
theHelicity(rhs.theHelicity),
emissionTime(rhs.emissionTime),
outOfWell(rhs.outOfWell),
@@ -118,6 +122,7 @@ namespace G4INCL {
void swap(Particle &rhs) {
std::swap(theZ, rhs.theZ);
std::swap(theA, rhs.theA);
std::swap(theS, rhs.theS);
std::swap(theParticipantType, rhs.theParticipantType);
std::swap(theType, rhs.theType);
if(rhs.thePropagationEnergy == &(rhs.theFrozenEnergy))
@@ -179,45 +184,104 @@ namespace G4INCL {
case DeltaPlusPlus:
theA = 1;
theZ = 2;
theS = 0;
break;
case Proton:
case DeltaPlus:
theA = 1;
theZ = 1;
theS = 0;
break;
case Neutron:
case DeltaZero:
theA = 1;
theZ = 0;
theS = 0;
break;
case DeltaMinus:
theA = 1;
theZ = -1;
theS = 0;
break;
case PiPlus:
theA = 0;
theZ = 1;
theS = 0;
break;
case PiZero:
case Eta:
case Omega:
case EtaPrime:
case Photon:
case Eta:
case Omega:
case EtaPrime:
case Photon:
theA = 0;
theZ = 0;
theS = 0;
break;
case PiMinus:
theA = 0;
theZ = -1;
theS = 0;
break;
case Lambda:
theA = 1;
theZ = 0;
theS = -1;
break;
case SigmaPlus:
theA = 1;
theZ = 1;
theS = -1;
break;
case SigmaZero:
theA = 1;
theZ = 0;
theS = -1;
break;
case SigmaMinus:
theA = 1;
theZ = -1;
theS = -1;
break;
case KPlus:
theA = 0;
theZ = 1;
theS = 1;
break;
case KZero:
theA = 0;
theZ = 0;
theS = 1;
break;
case KZeroBar:
theA = 0;
theZ = 0;
theS = -1;
break;
case KShort:
theA = 0;
theZ = 0;
theS = -99;
break;
case KLong:
theA = 0;
theZ = 0;
theS = 99;
break;
case KMinus:
theA = 0;
theZ = -1;
theS = -1;
break;
case Composite:
// INCL_ERROR("Trying to set particle type to Composite! Construct a Cluster object instead" << '\n');
theA = 0;
theZ = 0;
theS = 0;
break;
case UnknownParticle:
theA = 0;
theZ = 0;
theS = 0;
INCL_ERROR("Trying to set particle type to Unknown!" << '\n');
break;
}
@@ -231,9 +295,9 @@ namespace G4INCL {
*/
G4bool isNucleon() const {
if(theType == G4INCL::Proton || theType == G4INCL::Neutron)
return true;
return true;
else
return false;
return false;
};
ParticipantType getParticipantType() const {
@@ -271,29 +335,61 @@ namespace G4INCL {
/** \brief Is this a pion? */
G4bool isPion() const { return (theType == PiPlus || theType == PiZero || theType == PiMinus); }
/** \brief Is this a eta? */
/** \brief Is this an eta? */
G4bool isEta() const { return (theType == Eta); }
/** \brief Is this a omega? */
/** \brief Is this an omega? */
G4bool isOmega() const { return (theType == Omega); }
/** \brief Is this a etaprime? */
/** \brief Is this an etaprime? */
G4bool isEtaPrime() const { return (theType == EtaPrime); }
/** \brief Is this a photon? */
G4bool isPhoton() const { return (theType == Photon); }
/** \brief Is it a resonance? */
inline G4bool isResonance() const { return isDelta(); }
/** \brief Is it a Delta? */
inline G4bool isDelta() const {
return (theType==DeltaPlusPlus || theType==DeltaPlus ||
theType==DeltaZero || theType==DeltaMinus);
}
theType==DeltaZero || theType==DeltaMinus); }
/** \brief Is this a Sigma? */
G4bool isSigma() const { return (theType == SigmaPlus || theType == SigmaZero || theType == SigmaMinus); }
/** \brief Is this a Kaon? */
G4bool isKaon() const { return (theType == KPlus || theType == KZero); }
/** \brief Is this an antiKaon? */
G4bool isAntiKaon() const { return (theType == KZeroBar || theType == KMinus); }
/** \brief Is this a Lambda? */
G4bool isLambda() const { return (theType == Lambda); }
/** \brief Is this a Nucleon or a Lambda? */
G4bool isNucleonorLambda() const { return (isNucleon() || isLambda()); }
/** \brief Is this an Hyperon? */
G4bool isHyperon() const { return (isLambda() || isSigma()); }
/** \brief Is this a Meson? */
G4bool isMeson() const { return (isPion() || isKaon() || isAntiKaon() || isEta() || isEtaPrime() || isOmega()); }
/** \brief Is this a Baryon? */
G4bool isBaryon() const { return (isNucleon() || isResonance() || isHyperon()); }
/** \brief Is this an Strange? */
G4bool isStrange() const { return (isKaon() || isAntiKaon() || isHyperon()); }
/** \brief Returns the baryon number. */
G4int getA() const { return theA; }
/** \brief Returns the charge number. */
G4int getZ() const { return theZ; }
/** \brief Returns the strangeness number. */
G4int getS() const { return theS; }
G4double getBeta() const {
const G4double P = theMomentum.mag();
@@ -355,6 +451,16 @@ namespace G4INCL {
case PiPlus:
case PiMinus:
case PiZero:
case Lambda:
case SigmaPlus:
case SigmaZero:
case SigmaMinus:
case KPlus:
case KZero:
case KZeroBar:
case KShort:
case KLong:
case KMinus:
case Eta:
case Omega:
case EtaPrime:
@@ -388,6 +494,16 @@ namespace G4INCL {
case PiPlus:
case PiMinus:
case PiZero:
case Lambda:
case SigmaPlus:
case SigmaZero:
case SigmaMinus:
case KPlus:
case KZero:
case KZeroBar:
case KShort:
case KLong:
case KMinus:
case Eta:
case Omega:
case EtaPrime:
@@ -421,6 +537,16 @@ namespace G4INCL {
case PiPlus:
case PiMinus:
case PiZero:
case Lambda:
case SigmaPlus:
case SigmaZero:
case SigmaMinus:
case KPlus:
case KZero:
case KZeroBar:
case KShort:
case KLong:
case KMinus:
case Eta:
case Omega:
case EtaPrime:
@@ -803,8 +929,55 @@ namespace G4INCL {
return 1.;
}
/// \brief General bias vector function
static G4double getTotalBias();
static void setINCLBiasVector(std::vector<G4double> NewVector);
static void FillINCLBiasVector(G4double newBias);
static G4double getBiasFromVector(std::vector<G4int> VectorBias);
static std::vector<G4int> MergeVectorBias(Particle const * const p1, Particle const * const p2);
static std::vector<G4int> MergeVectorBias(std::vector<G4int> p1, Particle const * const p2);
/// \brief Get the particle bias.
G4double getParticleBias() const { return theParticleBias; };
/// \brief Set the particle bias.
void setParticleBias(G4double ParticleBias) { this->theParticleBias = ParticleBias; }
/// \brief Get the vector list of biased vertices on the particle path.
std::vector<G4int> getBiasCollisionVector() const { return theBiasCollisionVector; }
/// \brief Set the vector list of biased vertices on the particle path.
void setBiasCollisionVector(std::vector<G4int> BiasCollisionVector) {
this->theBiasCollisionVector = BiasCollisionVector;
this->setParticleBias(Particle::getBiasFromVector(BiasCollisionVector));
}
public:
/** \brief Time ordered vector of all bias applied
*
* /!\ Caution /!\
* methods Assotiated to G4VectorCache<T> are:
* Push_back(…),
* operator[],
* Begin(),
* End(),
* Clear(),
* Size() and
* Pop_back()
*
*/
#ifdef INCLXX_IN_GEANT4_MODE
static std::vector<G4double> INCLBiasVector;
//static G4VectorCache<G4double> INCLBiasVector;
#else
static G4ThreadLocal std::vector<G4double> INCLBiasVector;
//static G4VectorCache<G4double> INCLBiasVector;
#endif
static G4ThreadLocal G4int nextBiasedCollisionID;
protected:
G4int theZ, theA;
G4int theZ, theA, theS;
ParticipantType theParticipantType;
G4INCL::ParticleType theType;
G4double theEnergy;
@@ -821,11 +994,16 @@ namespace G4INCL {
G4bool rpCorrelated;
G4double uncorrelatedMomentum;
G4double theParticleBias;
private:
G4double theHelicity;
G4double emissionTime;
G4bool outOfWell;
/// \brief Time ordered vector of all biased vertices on the particle path
std::vector<G4int> theBiasCollisionVector;
G4double theMass;
static G4ThreadLocal long nextID;
@@ -56,14 +56,16 @@ namespace G4INCL {
ParticleSpecies() :
theType(UnknownParticle),
theA(0),
theZ(0)
theZ(0),
theS(0)
{}
ParticleSpecies(std::string const &pS);
ParticleSpecies(ParticleType const t);
ParticleSpecies(const G4int A, const G4int Z);
ParticleSpecies(const G4int A, const G4int Z, const G4int S);
ParticleType theType;
G4int theA, theZ;
G4int theA, theZ, theS;
/** \brief Set a PDG Code (MONTE CARLO PARTICLE NUMBERING)
*
@@ -46,6 +46,7 @@
#include "G4INCLParticleSpecies.hh"
#include "G4INCLLogger.hh"
#include "G4INCLConfig.hh"
#include "G4INCLHFB.hh"
#ifdef INCLXX_IN_GEANT4_MODE
#include "G4IonTable.hh"
@@ -69,6 +70,10 @@ namespace G4INCL {
const G4double effectiveDeltaMass = 1232.0;
const G4double effectiveDeltaWidth = 130.0;
const G4double effectivePionMass = 138.0;
const G4double effectiveLambdaMass = 1115.683;
const G4double effectiveSigmaMass = 1197.45; // max value
const G4double effectiveKaonMass = 497.614; // max value
const G4double effectiveAntiKaonMass = 497.614; // max value
const G4double effectiveEtaMass = 547.862;
const G4double effectiveOmegaMass = 782.65;
const G4double effectiveEtaPrimeMass = 957.78;
@@ -151,6 +156,9 @@ namespace G4INCL {
/// \brief Get charge number from particle type
G4int getChargeNumber(const ParticleType t);
/// \brief Get strangeness number from particle type
G4int getStrangenessNumber(const ParticleType t);
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z);
G4double getLargestNuclearRadius(const G4int A, const G4int Z);
@@ -270,8 +278,17 @@ namespace G4INCL {
/// \brief Get the type of delta
ParticleType getDeltaType(const G4int isosp);
/// \brief Get particle width (in s)
G4double getWidth(const ParticleType t);
/// \brief Get the type of sigma
ParticleType getSigmaType(const G4int isosp);
/// \brief Get the type of kaon
ParticleType getKaonType(const G4int isosp);
/// \brief Get the type of antikaon
ParticleType getAntiKaonType(const G4int isosp);
/// \brief Get particle width (in s)
G4double getWidth(const ParticleType t);
}
}
@@ -62,6 +62,16 @@ namespace G4INCL {
Omega,
EtaPrime,
Photon,
Lambda,
SigmaPlus,
SigmaZero,
SigmaMinus,
KPlus,
KZero,
KZeroBar,
KMinus,
KShort,
KLong,
// WARNING: if you add more particle types, you MUST add them BEFORE the
// UnknownParticle type! This is because UnknownParticle is used as a
// counter of the number of available particle types.
@@ -102,6 +102,12 @@ namespace G4INCL {
*/
G4double gauss(G4double sigma=1.);
/**
* Generate random numbers using gaussian distribution to be used only
* for correlated pairs
*/
G4double gaussWithMemory(G4double sigma=1.);
/**
* Generate isotropically-distributed ThreeVectors of given norm.
*/
@@ -35,5 +35,5 @@
#include "globals.hh"
#define G4INCL_VERSION_ID "v5.3-clean"
#define G4INCL_GIT_HASH "4b60f13e3a0cddd63f948f27373aecdd41a081ad"
#define G4INCL_VERSION_ID "v6.0_rc18-clean"
#define G4INCL_GIT_HASH "0245237c88562613c6907a0b5cf93e78ec1a16a1"