Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BetheHeitlerModel.hh 96934 2016-05-18 09:10:41Z gcosmo $
// $Id: G4BetheHeitlerModel.hh 100399 2016-10-20 07:38:12Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -97,7 +97,7 @@ private:
G4BetheHeitlerModel & operator=(const G4BetheHeitlerModel &right) = delete;
G4BetheHeitlerModel(const G4BetheHeitlerModel&) = delete;
G4Pow* g4pow;
G4Pow* g4calc;
G4ParticleDefinition* theGamma;
G4ParticleDefinition* theElectron;
G4ParticleDefinition* thePositron;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ICRU49NuclearStoppingModel.hh 96934 2016-05-18 09:10:41Z gcosmo $
// $Id: G4ICRU49NuclearStoppingModel.hh 100399 2016-10-20 07:38:12Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -96,7 +96,7 @@ private:
(const G4ICRU49NuclearStoppingModel &right) = delete;
G4ICRU49NuclearStoppingModel(const G4ICRU49NuclearStoppingModel&) = delete;
G4Pow* g4pow;
G4Pow* g4calc;
G4double theZieglerFactor;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IonFluctuations.hh 96934 2016-05-18 09:10:41Z gcosmo $
// $Id: G4IonFluctuations.hh 100399 2016-10-20 07:38:12Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -99,7 +99,7 @@ private:
G4UniversalFluctuation uniFluct;
const G4ParticleDefinition* particle;
G4Pow* g4pow;
G4Pow* g4calc;
G4double particleMass;
G4double charge;
@@ -64,6 +64,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Pow;
class G4MottCoefficients
{
@@ -80,12 +82,10 @@ private:
G4MottCoefficients & operator=(const G4MottCoefficients &right) = delete;
G4MottCoefficients(const G4MottCoefficients&) = delete;
G4Pow* fG4pow;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -98,13 +98,11 @@ public:
G4double GetScreeningAngle();
void SetScreeningCoefficient();
inline void SetupParticle(const G4ParticleDefinition*);
void SetupKinematic(G4double kinEnergy ,G4int Z);
void SetupKinematic(G4double kinEnergy ,G4double Z);
G4double NuclearCrossSection();
G4double NuclearCrossSection(G4int form);
G4ThreeVector GetNewDirection();
inline G4double GetMom2CM()const;
@@ -113,20 +111,18 @@ public:
inline G4double GetScreeningCoefficient() const;
inline G4double GetTotalCross() const;
G4double McFcorrection(G4double);
G4double RatioMottRutherford(G4double);//.....new
G4double RatioMottRutherford(G4double);
G4double FormFactor2ExpHof(G4double);
G4double GetScatteringAngle();
G4double FormFactor2Gauss(G4double);
G4double FormFactor2UniformHelm(G4double);
G4double GetScatteringAngle();
G4double AngleDistribution(G4double);
private:
G4ScreeningMottCrossSection & operator=(const G4ScreeningMottCrossSection &right);
G4ScreeningMottCrossSection(const G4ScreeningMottCrossSection&);
G4ScreeningMottCrossSection & operator=(const G4ScreeningMottCrossSection &right) = delete;
G4ScreeningMottCrossSection(const G4ScreeningMottCrossSection&) = delete;
G4NistManager* fNistManager;
G4Pow* fG4pow;
@@ -141,7 +137,6 @@ private:
G4double cosTetMinNuc;
G4double cosTetMaxNuc;
//energy cut
G4double ecut;
G4double etag;
@@ -165,9 +160,8 @@ private:
G4double beta;
G4double gamma;
// target nucleus
G4int targetZ;
G4double targetZ;
G4double targetA;
G4double targetMass;
G4double Trec;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4SeltzerBergerModel.hh 93362 2015-10-19 13:45:19Z gcosmo $
// $Id: G4SeltzerBergerModel.hh 98737 2016-08-09 12:51:38Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -63,26 +63,26 @@ class G4SeltzerBergerModel : public G4eBremsstrahlungRelModel
public:
G4SeltzerBergerModel(const G4ParticleDefinition* p = nullptr,
const G4String& nam = "eBremSB");
explicit G4SeltzerBergerModel(const G4ParticleDefinition* p = nullptr,
const G4String& nam = "eBremSB");
virtual ~G4SeltzerBergerModel();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
virtual void InitialiseForElement(const G4ParticleDefinition*, G4int Z);
virtual void InitialiseForElement(const G4ParticleDefinition*, G4int Z) override;
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double cutEnergy,
G4double maxEnergy);
G4double maxEnergy) override;
inline void SetBicubicInterpolationFlag(G4bool);
protected:
virtual G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
virtual G4double ComputeDXSectionPerAtom(G4double gammaEnergy) override;
virtual G4String DirectoryPath() const;
@@ -91,8 +91,8 @@ private:
void ReadData(G4int Z, const char* path = 0);
// hide assignment operator
G4SeltzerBergerModel & operator=(const G4SeltzerBergerModel &right);
G4SeltzerBergerModel(const G4SeltzerBergerModel&);
G4SeltzerBergerModel & operator=(const G4SeltzerBergerModel &right) = delete;
G4SeltzerBergerModel(const G4SeltzerBergerModel&) = delete;
static G4Physics2DVector* dataSB[101];
static G4double ylimit[101];
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UniversalFluctuation.hh 95832 2016-02-26 11:12:31Z gcosmo $
// $Id: G4UniversalFluctuation.hh 101807 2016-11-30 13:42:28Z gunter $
//
// -------------------------------------------------------------------
//
@@ -162,7 +162,7 @@ G4UniversalFluctuation::SampleGauss(CLHEP::HepRandomEngine* rndm,
{
G4double x = eav;
if(esig2 > 0.0) {
G4double sig = sqrt(esig2);
G4double sig = std::sqrt(esig2);
G4double deltae = std::min(4.*sig, eav);
if(deltae < 0.25*sig) {
x += (2.*rndm->flat() - 1.)*deltae;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WentzelOKandVIxSection.hh 96934 2016-05-18 09:10:41Z gcosmo $
// $Id: G4WentzelOKandVIxSection.hh 98737 2016-08-09 12:51:38Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -61,6 +61,7 @@
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "G4NistManager.hh"
#include "G4NuclearFormfactorType.hh"
#include "G4ThreeVector.hh"
#include "G4Pow.hh"
@@ -113,6 +114,8 @@ private:
void ComputeMaxElectronScattering(G4double cut);
inline G4double FlatFormfactor(G4double x);
// hide assignment operator
G4WentzelOKandVIxSection & operator=
(const G4WentzelOKandVIxSection &right) = delete;
@@ -134,6 +137,8 @@ private:
G4int nwarnings;
G4int nwarnlimit;
G4NuclearFormfactorType fNucFormfactor;
G4bool isCombined;
// single scattering parameters
@@ -254,6 +259,12 @@ G4WentzelOKandVIxSection::ComputeElectronCrossSection(G4double cosTMin,
}
return xsec;
}
inline G4double G4WentzelOKandVIxSection::FlatFormfactor(G4double x)
{
return 3*(std::sin(x) - x*std::cos(x))/(x*x*x);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremParametrizedModel.hh 74581 2013-10-15 12:03:25Z gcosmo $
// $Id: G4eBremParametrizedModel.hh 98737 2016-08-09 12:51:38Z gcosmo $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
@@ -63,38 +63,38 @@ class G4eBremParametrizedModel : public G4VEmModel
public:
G4eBremParametrizedModel(const G4ParticleDefinition* p = 0,
const G4String& nam = "eBremParam");
explicit G4eBremParametrizedModel(const G4ParticleDefinition* p = nullptr,
const G4String& nam = "eBremParam");
virtual ~G4eBremParametrizedModel();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
virtual void InitialiseLocal(const G4ParticleDefinition*,
G4VEmModel* masterModel);
G4VEmModel* masterModel) override;
virtual G4double MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple*);
const G4MaterialCutsCouple*) override;
virtual G4double ComputeDEDXPerVolume(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
G4double cutEnergy) override;
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double tkin,
G4double Z, G4double,
G4double cutEnergy,
G4double maxEnergy = DBL_MAX);
G4double maxEnergy = DBL_MAX) override;
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double cutEnergy,
G4double maxEnergy);
G4double maxEnergy) override;
virtual void SetupForMaterial(const G4ParticleDefinition*,
const G4Material*,G4double);
const G4Material*,G4double) override;
private:
@@ -121,8 +121,8 @@ private:
inline void SetCurrentElement(const G4double);
// hide assignment operator
G4eBremParametrizedModel & operator=(const G4eBremParametrizedModel &right);
G4eBremParametrizedModel(const G4eBremParametrizedModel&);
G4eBremParametrizedModel & operator=(const G4eBremParametrizedModel &right) = delete;
G4eBremParametrizedModel(const G4eBremParametrizedModel&) = delete;
protected:
@@ -163,7 +163,7 @@ private:
inline void G4eBremParametrizedModel::SetCurrentElement(const G4double Z)
{
std::cout<<"SetCurrentElement Z="<<Z<<std::endl;
//std::cout<<"SetCurrentElement Z="<<Z<<std::endl;
if(Z != currentZ) {
currentZ = Z;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungRelModel.hh 93567 2015-10-26 14:51:41Z gcosmo $
// $Id: G4eBremsstrahlungRelModel.hh 98737 2016-08-09 12:51:38Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -64,39 +64,39 @@ class G4eBremsstrahlungRelModel : public G4VEmModel
public:
G4eBremsstrahlungRelModel(const G4ParticleDefinition* p = 0,
const G4String& nam = "eBremLPM");
explicit G4eBremsstrahlungRelModel(const G4ParticleDefinition* p = 0,
const G4String& nam = "eBremLPM");
virtual ~G4eBremsstrahlungRelModel();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
virtual void InitialiseLocal(const G4ParticleDefinition*,
G4VEmModel* masterModel);
G4VEmModel* masterModel) override;
virtual G4double ComputeDEDXPerVolume(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
G4double cutEnergy) override;
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double tkin,
G4double Z, G4double,
G4double cutEnergy,
G4double maxEnergy = DBL_MAX);
G4double maxEnergy = DBL_MAX) override;
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double cutEnergy,
G4double maxEnergy);
G4double maxEnergy) override;
virtual void SetupForMaterial(const G4ParticleDefinition*,
const G4Material*,G4double);
const G4Material*,G4double) override;
virtual G4double MinPrimaryEnergy(const G4Material*,
const G4ParticleDefinition*,
G4double cut);
G4double cut) override;
inline void SetLPMconstant(G4double val);
inline G4double LPMconstant() const;
@@ -110,7 +110,7 @@ protected:
virtual G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
// * fast inline functions *
inline void SetCurrentElement(const G4double);
inline void SetCurrentElement(G4int);
private:
@@ -132,8 +132,8 @@ private:
inline G4double Psi1M2(G4double,G4double);
// hide assignment operator
G4eBremsstrahlungRelModel & operator=(const G4eBremsstrahlungRelModel &right);
G4eBremsstrahlungRelModel(const G4eBremsstrahlungRelModel&);
G4eBremsstrahlungRelModel & operator=(const G4eBremsstrahlungRelModel &right) = delete;
G4eBremsstrahlungRelModel(const G4eBremsstrahlungRelModel&) = delete;
protected:
@@ -148,10 +148,10 @@ protected:
G4double particleMass;
G4double kinEnergy;
G4double totalEnergy;
G4double currentZ;
G4double densityFactor;
G4double densityCorr;
G4int currentZ;
G4bool isElectron;
private:
@@ -174,7 +174,6 @@ private:
// LPM effect
G4double lpmEnergy;
G4PhysicsVector *fXiLPM, *fPhiLPM, *fGLPM;
G4double xiLPM, phiLPM, gLPM;
// critical gamma energies
@@ -186,19 +185,18 @@ private:
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void G4eBremsstrahlungRelModel::SetCurrentElement(const G4double Z)
inline void G4eBremsstrahlungRelModel::SetCurrentElement(G4int Z)
{
if(Z != currentZ) {
currentZ = Z;
G4int iz = G4lrint(Z);
z13 = nist->GetZ13(iz);
z13 = nist->GetZ13(Z);
z23 = z13*z13;
lnZ = nist->GetLOGZ(iz);
lnZ = nist->GetLOGZ(Z);
if (iz <= 4) {
Fel = Fel_light[iz];
Finel = Finel_light[iz] ;
if (Z <= 4) {
Fel = Fel_light[Z];
Finel = Finel_light[Z] ;
}
else {
G4double lnzt = lnZ/3.;
@@ -207,7 +205,8 @@ inline void G4eBremsstrahlungRelModel::SetCurrentElement(const G4double Z)
}
fCoulomb = GetCurrentElement()->GetfCoulomb();
fMax = Fel-fCoulomb + Finel/currentZ + (1.+1./currentZ)/12.;
G4double xz = 1.0/(G4double)Z;
fMax = Fel-fCoulomb + Finel*xz + (1. + xz)/12.;
}
}
@@ -118,6 +118,7 @@ private:
G4double cosThetaMin;
G4double recoilThreshold;
G4int FormFactor;
// projectile
const G4ParticleDefinition* particle;