Import Geant4 10.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 14:11:04 +02:00
parent c9b32a6c0a
commit d4af681f38
4886 changed files with 420149 additions and 1023309 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4AtomicShells.hh 66811 2013-01-12 16:04:23Z gcosmo $
// $Id: G4AtomicShells.hh 94016 2015-11-05 10:14:49Z gcosmo $
// class description
//
+3 -3
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4Element.hh 80747 2014-05-09 12:53:43Z gcosmo $
// $Id: G4Element.hh 87870 2015-01-16 08:27:07Z gcosmo $
//
//---------------------------------------------------------------------------
@@ -199,8 +199,8 @@ public: // with description
// printing methods
//
friend std::ostream& operator<<(std::ostream&, G4Element*);
friend std::ostream& operator<<(std::ostream&, G4Element&);
friend std::ostream& operator<<(std::ostream&, const G4Element*);
friend std::ostream& operator<<(std::ostream&, const G4Element&);
friend std::ostream& operator<<(std::ostream&, G4ElementTable);
public: // without description
+43 -11
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IonisParamMat.hh 81374 2014-05-27 13:07:25Z gcosmo $
// $Id: G4IonisParamMat.hh 93568 2015-10-26 14:52:36Z gcosmo $
//
// class description
@@ -47,6 +47,8 @@
#include "G4ios.hh"
#include "globals.hh"
#include "G4Log.hh"
#include "G4Exp.hh"
class G4Material; // forward declaration
class G4DensityEffectData;
@@ -65,57 +67,83 @@ public:
//
// parameters for mean energy loss calculation:
inline
G4double GetMeanExcitationEnergy() const {return fMeanExcitationEnergy;};
void SetMeanExcitationEnergy(G4double value);
G4double FindMeanExcitationEnergy(const G4String& chFormula);
inline
G4double GetLogMeanExcEnergy() const {return fLogMeanExcEnergy;};
inline
G4double* GetShellCorrectionVector() const {return fShellCorrectionVector;};
inline
G4double GetTaul() const {return fTaul;};
// parameters of the density correction:
inline
G4double GetPlasmaEnergy() const {return fPlasmaEnergy;};
inline
G4double GetAdjustmentFactor() const {return fAdjustmentFactor;};
inline
G4double GetCdensity() const {return fCdensity;};
inline
G4double GetMdensity() const {return fMdensity;};
inline
G4double GetAdensity() const {return fAdensity;};
inline
G4double GetX0density() const {return fX0density;};
inline
G4double GetX1density() const {return fX1density;};
inline
G4double GetD0density() const {return fD0density;};
// compute density correction as a function of the kinematic variable
// x = log10(beta*gamma)
inline G4double DensityCorrection(G4double x);
static G4DensityEffectData* GetDensityEffectData();
// parameters of the energy loss fluctuation model:
inline
G4double GetF1fluct() const {return fF1fluct;};
inline
G4double GetF2fluct() const {return fF2fluct;};
inline
G4double GetEnergy1fluct() const {return fEnergy1fluct;};
inline
G4double GetLogEnergy1fluct() const {return fLogEnergy1fluct;};
inline
G4double GetEnergy2fluct() const {return fEnergy2fluct;};
inline
G4double GetLogEnergy2fluct() const {return fLogEnergy2fluct;};
inline
G4double GetEnergy0fluct() const {return fEnergy0fluct;};
inline
G4double GetRateionexcfluct() const {return fRateionexcfluct;};
// parameters for ion corrections computations
inline
G4double GetZeffective() const {return fZeff;};
inline
G4double GetFermiEnergy() const {return fFermiEnergy;};
inline
G4double GetLFactor() const {return fLfactor;};
inline
G4double GetInvA23() const {return fInvA23;};
// parameters for Birks attenuation:
inline
void SetBirksConstant(G4double value) {fBirks = value;};
inline
G4double GetBirksConstant() const {return fBirks;};
// parameters for average energy per ion
inline
void SetMeanEnergyPerIonPair(G4double value) {fMeanEnergyPerIon = value;};
inline
G4double GetMeanEnergyPerIonPair() const {return fMeanEnergyPerIon;};
// operators
G4IonisParamMat& operator=(const G4IonisParamMat&);
G4int operator==(const G4IonisParamMat&) const;
G4int operator!=(const G4IonisParamMat&) const;
G4IonisParamMat(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
@@ -135,11 +163,15 @@ private:
// Compute parameters for ion parameterizations
void ComputeIonParameters();
// operators
G4IonisParamMat& operator=(const G4IonisParamMat&);
G4int operator==(const G4IonisParamMat&) const;
G4int operator!=(const G4IonisParamMat&) const;
G4IonisParamMat(const G4IonisParamMat&);
//
// data members
//
//
// data members
//
G4Material* fMaterial; // this material
// parameters for mean energy loss calculation
@@ -193,9 +225,9 @@ inline G4double G4IonisParamMat::DensityCorrection(G4double x)
G4double y = 0.0;
if(x < fX0density) {
if(fD0density > 0.0) { y = fD0density*std::pow(10.,2*(x - fX0density)); }
if(fD0density > 0.0) { y = fD0density*G4Exp(twoln10*(x - fX0density)); }
} else if(x >= fX1density) { y = twoln10*x - fCdensity; }
else {y = twoln10*x - fCdensity + fAdensity*std::pow(fX1density - x, fMdensity);}
else {y = twoln10*x - fCdensity + fAdensity*G4Exp(G4Log(fX1density - x)*fMdensity);}
return y;
}
+3 -3
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4Isotope.hh 68070 2013-03-13 15:03:06Z gcosmo $
// $Id: G4Isotope.hh 87870 2015-01-16 08:27:07Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -113,10 +113,10 @@ class G4Isotope
size_t GetIndex() const {return fIndexInTable;}
friend
std::ostream& operator<<(std::ostream&, G4Isotope*);
std::ostream& operator<<(std::ostream&, const G4Isotope*);
friend
std::ostream& operator<<(std::ostream&, G4Isotope&);
std::ostream& operator<<(std::ostream&, const G4Isotope&);
friend
std::ostream& operator<<(std::ostream&, G4IsotopeTable);
+18 -16
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4Material.hh 81374 2014-05-27 13:07:25Z gcosmo $
// $Id: G4Material.hh 94016 2015-11-05 10:14:49Z gcosmo $
//
//---------------------------------------------------------------------------
@@ -113,6 +113,8 @@
enum G4State { kStateUndefined = 0, kStateSolid, kStateLiquid, kStateGas };
static const G4double NTP_Temperature = 293.15;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Material
@@ -126,7 +128,7 @@ public: // with description
G4double a, //mass of mole
G4double density, //density
G4State state = kStateUndefined, //solid,gas
G4double temp = CLHEP::STP_Temperature, //temperature
G4double temp = NTP_Temperature, //temperature
G4double pressure = CLHEP::STP_Pressure); //pressure
//
@@ -137,7 +139,7 @@ public: // with description
G4double density, //density
G4int nComponents, //nbOfComponents
G4State state = kStateUndefined, //solid,gas
G4double temp = CLHEP::STP_Temperature, //temperature
G4double temp = NTP_Temperature, //temperature
G4double pressure = CLHEP::STP_Pressure); //pressure
//
@@ -147,7 +149,7 @@ public: // with description
G4double density, //density
const G4Material* baseMaterial, //base material
G4State state = kStateUndefined, //solid,gas
G4double temp = CLHEP::STP_Temperature, //temperature
G4double temp = NTP_Temperature, //temperature
G4double pressure = CLHEP::STP_Pressure); //pressure
//
@@ -215,7 +217,7 @@ public: // with description
inline G4double GetElectronDensity() const {return TotNbOfElectPerVolume;}
// Radiation length:
inline G4double GetRadlen() const {return fRadlen;}
inline G4double GetRadlen() const {return fRadlen;}
// Nuclear interaction length
inline G4double GetNuclearInterLength() const {return fNuclInterLen;}
@@ -232,17 +234,17 @@ public: // with description
// material components:
inline
std::map<G4Material*,G4double> GetMatComponents() const
{return fMatComponents;}
const std::map<G4Material*,G4double>& GetMatComponents() const
{return fMatComponents;}
//for chemical compound
// for chemical compound
inline
G4double GetMassOfMolecule() const {return fMassOfMolecule;}
G4double GetMassOfMolecule() const {return fMassOfMolecule;}
//meaningful only for single material:
// meaningful only for single material:
G4double GetZ() const;
G4double GetA() const;
//the MaterialPropertiesTable (if any) attached to this material:
inline void SetMaterialPropertiesTable(G4MaterialPropertiesTable* anMPT)
{fMaterialPropertiesTable = anMPT;}
@@ -250,7 +252,7 @@ public: // with description
inline G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
{return fMaterialPropertiesTable;}
//the (static) Table of Materials:
// the static Table of Materials:
//
static G4MaterialTable* GetMaterialTable();
@@ -265,13 +267,14 @@ public: // with description
//
//printing methods
//
friend std::ostream& operator<<(std::ostream&, G4Material*);
friend std::ostream& operator<<(std::ostream&, G4Material&);
friend std::ostream& operator<<(std::ostream&, const G4Material*);
friend std::ostream& operator<<(std::ostream&, const G4Material&);
friend std::ostream& operator<<(std::ostream&, G4MaterialTable);
// operators
G4int operator==(const G4Material&) const;
G4int operator!=(const G4Material&) const;
G4Material(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
@@ -318,7 +321,6 @@ private:
G4int fNumberOfElements; // Nb of Elements in the material
G4ElementVector* theElementVector; // vector of constituent Elements
G4bool fImplicitElement; // implicit Element created by this?
G4double* fMassFractionVector; // composition by fractional mass
G4int* fAtomsVector; // composition by atom count
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NistElementBuilder.hh 72057 2013-07-04 13:07:29Z gcosmo $
// $Id: G4NistElementBuilder.hh 94234 2015-11-09 10:58:13Z gcosmo $
#ifndef G4NistElementBuilder_h
#define G4NistElementBuilder_h 1
@@ -105,7 +105,7 @@ public:
// Get total ionisation energy of an atom
inline G4double GetTotalElectronBindingEnergy(G4int Z) const;
// Get natural isotope abandance
// Get natural isotope abundance
inline G4double GetIsotopeAbundance (G4int Z, G4int N) const;
// Get N for the first natural isotope
@@ -125,7 +125,7 @@ private:
// Add element parameters to internal G4 database:
// Z - atomic number, N - number of nucleons, A - atomic mass (amu),
// sigmaA - accuracy of mass in last digits, W - natural abandances (percent)
// sigmaA - accuracy of mass in last digits, W - natural abundances (percent)
void AddElement(const G4String& symbol, G4int Z, G4int NumberOfIsotopes,
const G4int& N, const G4double& A, const G4double& sigmaA,
const G4double& W);
+33 -29
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NistManager.hh 72057 2013-07-04 13:07:29Z gcosmo $
// $Id: G4NistManager.hh 94234 2015-11-09 10:58:13Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -139,7 +139,7 @@ public:
//
inline G4int GetNumberOfNistIsotopes(G4int Z) const;
// Get natural isotope abandance
// Get natural isotope abundance
//
inline G4double GetIsotopeAbundance(G4int Z, G4int N) const;
@@ -163,6 +163,11 @@ public:
//
inline G4double GetMeanIonisationEnergy(G4int Z) const;
// Access nominal density by atomic number for simple materials and
// by the index for other NIST materials
//
inline G4double GetNominalDensity(G4int Z) const;
// Get G4Material by index
//
inline G4Material* GetMaterial(size_t index);
@@ -172,6 +177,11 @@ public:
inline G4Material* FindOrBuildMaterial(const G4String& name,
G4bool isotopes=true,
G4bool warning=false);
// Find or build a simple material via atomic number
//
inline G4Material* FindOrBuildSimpleMaterial(G4int Z,
G4bool warning=false);
// Build G4Material with user defined name and density on base
// of a material from Geant4 dataBase
@@ -179,7 +189,7 @@ public:
G4Material* BuildMaterialWithNewDensity(const G4String& name,
const G4String& basename,
G4double density = 0.0,
G4double temp = CLHEP::STP_Temperature,
G4double temp = NTP_Temperature,
G4double pres = CLHEP::STP_Pressure);
// Construct a G4Material from scratch by atome count
@@ -191,7 +201,7 @@ public:
G4double dens,
G4bool isotopes=true,
G4State state = kStateSolid,
G4double temp = CLHEP::STP_Temperature,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure);
// Construct a G4Material from scratch by fraction mass
@@ -203,7 +213,7 @@ public:
G4double dens,
G4bool isotopes=true,
G4State state = kStateSolid,
G4double temp = CLHEP::STP_Temperature,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure);
// Construct a gas G4Material from scratch by atome count
@@ -221,7 +231,7 @@ public:
const std::vector<G4String>& elm,
const std::vector<G4int>& nbAtoms,
G4bool isotopes = true,
G4double temp = CLHEP::STP_Temperature,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure);
// Get number of G4Materials
@@ -254,19 +264,14 @@ public:
inline G4double GetZ13(G4double Z);
inline G4double GetZ13(G4int Z);
// Fast computation of A^0.27 for natuaral abandances
// Fast computation of A^0.27 for natuaral abundances
//
inline G4double GetA27(G4int Z);
// Fast computation of log(A)
//
inline G4double GetLOGA(G4double A);
inline G4double GetLOGZ(G4int Z);
// Fast computation of log(A) for natuaral abandances
//
inline G4double GetLOGA(G4int Z);
private:
G4NistManager();
@@ -418,6 +423,13 @@ inline G4double G4NistManager::GetMeanIonisationEnergy(G4int Z) const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistManager::GetNominalDensity(G4int Z) const
{
return matBuilder->GetNominalDensity(Z-1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void G4NistManager::PrintElement(G4int Z)
{
elmBuilder->PrintElement(Z);
@@ -429,7 +441,7 @@ inline G4Material* G4NistManager::GetMaterial(size_t index)
{
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4Material* mat = 0;
if(index < theMaterialTable->size()) mat = (*theMaterialTable)[index];
if(index < theMaterialTable->size()) { mat = (*theMaterialTable)[index]; }
return mat;
}
@@ -452,6 +464,14 @@ G4Material* G4NistManager::FindOrBuildMaterial(const G4String& name,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4Material* G4NistManager::FindOrBuildSimpleMaterial(G4int Z, G4bool warning)
{
return matBuilder->FindOrBuildSimpleMaterial(Z, warning);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4Material* G4NistManager::ConstructNewMaterial(
const G4String& name,
const std::vector<G4String>& elm,
@@ -555,21 +575,5 @@ inline G4double G4NistManager::GetLOGZ(G4int Z)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistManager::GetLOGA(G4double A)
{
return g4pow->logA(A);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistManager::GetLOGA(G4int Z)
{
G4double res = 0.0;
if(Z < 101) { res = LOGAZ[Z]; }
return res;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NistMaterialBuilder.hh 72057 2013-07-04 13:07:29Z gcosmo $
// $Id: G4NistMaterialBuilder.hh 91920 2015-08-11 09:50:13Z gcosmo $
#ifndef G4NistMaterialBuilder_h
#define G4NistMaterialBuilder_h 1
@@ -80,6 +80,11 @@ public:
G4bool isotopes=true,
G4bool warning =true);
// Find or build a simple material via atomic number
//
G4Material* FindOrBuildSimpleMaterial(G4int Z, G4bool warning);
// construct a G4Material from scratch by atome count
//
G4Material* ConstructNewMaterial (const G4String& name,
@@ -88,7 +93,7 @@ public:
G4double dens,
G4bool isotopes = true,
G4State state = kStateSolid,
G4double temp = CLHEP::STP_Temperature,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure);
// construct a G4Material from scratch by fraction mass
@@ -99,7 +104,7 @@ public:
G4double dens,
G4bool isotopes = true,
G4State state = kStateSolid,
G4double temp = CLHEP::STP_Temperature,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure);
@@ -116,7 +121,7 @@ public:
const std::vector<G4String>& elm,
const std::vector<G4int>& nbAtoms,
G4bool isotopes = true,
G4double temp = CLHEP::STP_Temperature,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure);
// verbosity level defined by G4NistManager
@@ -144,15 +149,17 @@ public:
//
const std::vector<G4String>& GetMaterialNames() const;
// access to the NIST mean ionisation potentials
// access to the NIST mean ionisation potentials and nominal densities
//
inline G4double GetMeanIonisationEnergy(G4int index) const;
inline G4double GetNominalDensity(G4int index) const;
private:
void Initialise();
void NistSimpleMaterials();
void NistCompoundMaterials();
void NistCompoundMaterials2();
void HepAndNuclearMaterials();
void SpaceMaterials();
void BioChemicalMaterials();
@@ -164,7 +171,7 @@ private:
G4double pot=0.0, G4int ncomp=1,
G4State=kStateSolid, G4bool stp = true);
void AddGas(const G4String& nameMat, G4double t=CLHEP::STP_Temperature,
void AddGas(const G4String& nameMat, G4double t=NTP_Temperature,
G4double p=CLHEP::STP_Pressure);
void AddElementByWeightFraction(G4int Z, G4double);
@@ -228,4 +235,12 @@ G4NistMaterialBuilder::GetMeanIonisationEnergy(G4int index) const
return res;
}
inline G4double
G4NistMaterialBuilder::GetNominalDensity(G4int index) const
{
G4double res = 0.0;
if(index >= 0 && index < nMaterials) { res = densities[index]; }
return res;
}
#endif