Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -97,11 +97,12 @@ private:
G4double fGlauberEnergy;
G4double fLowEnergy;
static G4double theGlauberFac[93];
static G4double theCoulombFac[93];
static G4double theGlauberFacP[93];
static G4double theCoulombFacP[93];
static G4double theGlauberFacN[93];
static G4double theCoulombFacN[93];
static G4int theA[93];
const G4ParticleDefinition* particle;
const G4ParticleDefinition* theProton;
G4ComponentGGHadronNucleusXsc* fGlauber;
G4NucleonNuclearCrossSection* fNucleon;
@@ -96,13 +96,13 @@ private:
G4double fGlauberEnergy;
G4double fLowEnergy;
G4double fHighEnergy;
static G4double theGlauberFac[93];
static G4double theCoulombFac[93];
static G4double theGlauberFacP[93];
static G4double theCoulombFacP[93];
static G4double theGlauberFacN[93];
static G4double theCoulombFacN[93];
static G4int theA[93];
const G4ParticleDefinition* particle;
const G4ParticleDefinition* theProton;
G4ComponentGGHadronNucleusXsc* fGlauber;
@@ -59,6 +59,7 @@ class G4HadronNucleonXsc;
class G4Material;
class G4Element;
class G4Isotope;
class G4Pow;
class G4BGGPionElasticXS : public G4VCrossSectionDataSet
{
@@ -89,11 +90,16 @@ public:
private:
G4double CoulombFactorPiPlus(G4double kinEnergy, G4int Z);
G4double FactorPiMinus(G4double kinEnergy);
G4BGGPionElasticXS & operator=(const G4BGGPionElasticXS &right);
G4BGGPionElasticXS(const G4BGGPionElasticXS&);
G4double fGlauberEnergy;
G4double fLowEnergy;
G4double fLowestEnergy;
static G4double theGlauberFacPiPlus[93];
static G4double theCoulombFacPiPlus[93];
@@ -101,8 +107,11 @@ private:
static G4double theCoulombFacPiMinus[93];
static G4int theA[93];
const G4ParticleDefinition* particle;
const G4ParticleDefinition* theProton;
const G4ParticleDefinition* thePiPlus;
G4Pow* fG4pow;
G4ComponentGGHadronNucleusXsc* fGlauber;
G4UPiNuclearCrossSection* fPion;
G4HadronNucleonXsc* fHadron;
@@ -91,13 +91,16 @@ public:
private:
G4double CoulombFactor(G4double kinEnergy, G4int Z);
G4double CoulombFactorPiPlus(G4double kinEnergy, G4int Z);
G4double FactorPiMinus(G4double kinEnergy);
G4BGGPionInelasticXS & operator=(const G4BGGPionInelasticXS &right);
G4BGGPionInelasticXS(const G4BGGPionInelasticXS&);
G4double fGlauberEnergy;
G4double fLowEnergy;
G4double fGlauberEnergy;
G4double fLowEnergy;
G4double fLowestEnergy;
static G4double theGlauberFacPiPlus[93];
static G4double theGlauberFacPiMinus[93];
@@ -105,8 +108,8 @@ private:
static G4double theLowEPiMinus[93];
static G4int theA[93];
const G4ParticleDefinition* particle;
const G4ParticleDefinition* theProton;
const G4ParticleDefinition* thePiPlus;
G4Pow* fG4pow;
@@ -55,6 +55,10 @@ public:
~G4HadronNucleonXsc ();
// Xsc parametrisations return total x-section
G4double HadronNucleonXsc(const G4ParticleDefinition* theParticle,
const G4ParticleDefinition* nucleon, G4double ekin);
G4double HadronNucleonXscPDG(const G4ParticleDefinition* theParticle,
const G4ParticleDefinition* nucleon, G4double ekin);
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
@@ -91,7 +90,13 @@ public:
private:
void Initialise(G4int Z, const char*);
void Initialise(G4int Z);
void InitialiseOnFly(G4int Z);
const G4String& FindDirectoryPath();
const G4PhysicsVector* GetPhysicsVector(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
@@ -104,14 +109,14 @@ private:
G4double elimit;
G4double logElimit;
size_t fIdxXSTable;
std::vector<G4double> temp;
G4bool isMaster;
static G4ElementData* data;
std::vector<G4double> temp;
static const G4int amin[MAXZCAPTURE];
static const G4int amax[MAXZCAPTURE];
static G4String gDataDirectory;
#ifdef G4MULTITHREADED
static G4Mutex neutronCaptureXSMutex;
@@ -46,7 +46,6 @@
#include "globals.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
const G4int MAXZEL = 93;
@@ -70,16 +69,35 @@ public:
G4bool IsElementApplicable(const G4DynamicParticle*,
G4int Z, const G4Material*) final;
G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
const G4Element*, const G4Material*) final;
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material*) final;
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
const G4Material* mat) final;
const G4Isotope* SelectIsotope(const G4Element*,
G4double kinEnergy, G4double logE) final;
void BuildPhysicsTable(const G4ParticleDefinition&) final;
void CrossSectionDescription(std::ostream&) const final;
G4double IsoCrossSection(G4double ekin, G4double logE, G4int Z, G4int A);
private:
void Initialise(G4int Z, const char*);
void Initialise(G4int Z);
void InitialiseOnFly(G4int Z);
const G4String& FindDirectoryPath();
G4PhysicsVector* GetPhysicsVector(G4int Z);
G4NeutronElasticXS & operator=(const G4NeutronElasticXS &right);
G4NeutronElasticXS(const G4NeutronElasticXS&);
@@ -88,10 +106,13 @@ private:
G4ComponentGGHadronNucleusXsc* ggXsection;
const G4ParticleDefinition* neutron;
std::vector<G4double> temp;
static G4PhysicsVector* data[MAXZEL];
static G4double coeff[MAXZEL];
static G4double aeff[MAXZEL];
static G4String gDataDirectory;
size_t fIdxXSTable;
G4bool isMaster;
#ifdef G4MULTITHREADED
@@ -38,9 +38,6 @@
#include "G4VCrossSectionDataSet.hh"
#include "G4DynamicParticle.hh"
using namespace std;
using namespace CLHEP;
// class G4ParticleDefinition;
class G4PhysicsLogVector;
class G4PhysicsTable;
@@ -119,10 +116,10 @@ GetElementNonRelXsc(const G4DynamicParticle* aPart, G4int ZZ,
G4double result(0.), te(0.), momentum(0.);
te = aPart->GetKineticEnergy()*fme/fM;
momentum = sqrt( te*(te + 2.*fme) );
momentum = std::sqrt( te*(te + 2.*fme) );
fAm = CalculateAm(momentum);
result = 1. + log(1. +1./fAm);
result = 1. + std::log(1. +1./fAm);
result *= fCofXsc; //*energy;
result *= ZZ; // incoherent sum over all element electrons
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
@@ -47,7 +46,6 @@
#include "G4ElementData.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
const G4int MAXZINEL = 93;
@@ -75,8 +73,7 @@ public:
const G4Element*, const G4Material*) final;
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z,
const G4Material* mat=nullptr) final;
G4int Z, const G4Material*) final;
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso,
@@ -92,7 +89,13 @@ public:
private:
void Initialise(G4int Z, const char*);
void Initialise(G4int Z);
void InitialiseOnFly(G4int Z);
const G4String& FindDirectoryPath();
const G4PhysicsVector* GetPhysicsVector(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
@@ -106,17 +109,16 @@ private:
const G4ParticleDefinition* neutron;
G4double emax;
std::vector<G4double> temp;
size_t fIdxXSTable;
G4bool isMaster;
static G4ElementData* data;
static G4double coeff[MAXZINEL];
static G4double aeff[MAXZINEL];
static const G4int amin[MAXZINEL];
static const G4int amax[MAXZINEL];
static G4String gDataDirectory;
#ifdef G4MULTITHREADED
static G4Mutex neutronInelasticXSMutex;
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
@@ -92,7 +91,13 @@ public:
private:
void Initialise(G4int Z, const char*);
void Initialise(G4int Z);
void InitialiseOnFly(G4int Z);
const G4String& FindDirectoryPath();
const G4PhysicsVector* GetPhysicsVector(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
@@ -106,18 +111,16 @@ private:
const G4ParticleDefinition* particle;
const G4ParticleDefinition* proton;
G4double emax;
std::vector<G4double> temp;
size_t fIdxXSTable;
G4bool isMaster;
static G4double coeff[MAXZINELP];
static G4ElementData* data;
static G4double coeff[MAXZINELP];
static G4double aeff[MAXZINELP];
static const G4int amin[MAXZINELP];
static const G4int amax[MAXZINELP];
static G4ElementData* data;
static G4String gDataDirectory;
#ifdef G4MULTITHREADED
static G4Mutex particleInelasticXSMutex;
@@ -31,12 +31,12 @@
// 05.03.07 V.Ivanchenko - add IfZAApplicable
//
#ifndef G4UPiNuclearCrossSection_h
#define G4UPiNuclearCrossSection_h
#include "G4VCrossSectionDataSet.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "globals.hh"
#include "G4Threading.hh"
@@ -53,9 +53,11 @@ public:
G4bool IsElementApplicable(const G4DynamicParticle* aParticle,
G4int Z, const G4Material*) final;
inline
G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
G4int Z, G4int A) const;
inline
G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle,
G4int Z, G4int A) const;
@@ -67,7 +69,8 @@ public:
private:
G4double Interpolate(G4int Z, G4int A, G4double ekin, G4PhysicsTable*) const;
G4double Interpolate(G4int Z, G4int A, G4double ekin,
const G4PhysicsTable*) const;
void AddDataSet(const G4String& p, const G4double* tot,
const G4double* in, const G4double* e, G4int n);
@@ -79,6 +82,7 @@ private:
static const G4int NZ = 16;
static G4int theZ[NZ];
static G4int idxZ[93];
static G4double theA[NZ];
static G4double APower[93];
@@ -90,7 +94,6 @@ private:
G4double aPower;
G4double elow;
G4double elowest;
G4bool isMaster;
@@ -99,4 +102,22 @@ private:
#endif
};
inline G4double
G4UPiNuclearCrossSection::GetElasticCrossSection(
const G4DynamicParticle* dp, G4int Z, G4int A) const
{
const G4PhysicsTable* table =
(dp->GetDefinition() == piPlus) ? piPlusElastic : piMinusElastic;
return Interpolate(Z, A, dp->GetKineticEnergy(), table);
}
inline G4double
G4UPiNuclearCrossSection::GetInelasticCrossSection(
const G4DynamicParticle* dp, G4int Z, G4int A) const
{
const G4PhysicsTable* table =
(dp->GetDefinition() == piPlus) ? piPlusInelastic : piMinusInelastic;
return Interpolate(Z, A, dp->GetKineticEnergy(), table);
}
#endif