Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicShells.hh,v 1.7 2006/10/17 15:15:46 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
// class description
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Element.hh,v 1.22 2006/10/17 15:15:46 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElementTable.hh,v 1.6 2006/06/29 19:10:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElementVector.hh,v 1.6 2006/06/29 19:11:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IonisParamElm.hh,v 1.9 2006/06/29 19:11:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonisParamMat.hh,v 1.9 2006/06/29 19:11:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4IonisParamMat.hh,v 1.10 2007/09/27 14:05:47 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
@@ -36,9 +36,10 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// 28-10-02: add setMeanExcitationEnergy (V.Ivanchenko)
|
||||
// 09-03-01: copy constructor and assignement operator in public (mma)
|
||||
// 09-07-98: data moved from G4Material (mma)
|
||||
// 09-03-01: copy constructor and assignement operator in public (mma)
|
||||
// 28-10-02: add setMeanExcitationEnergy (V.Ivanchenko)
|
||||
// 27-09-07: add computation of parameters for ions (V.Ivanchenko)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -88,6 +89,11 @@ public:
|
||||
G4double GetEnergy0fluct() const {return fEnergy0fluct;};
|
||||
G4double GetRateionexcfluct() const {return fRateionexcfluct;};
|
||||
|
||||
// parameters for ion corrections computations
|
||||
G4double GetZeffective() const {return fZeff;};
|
||||
G4double GetFermiEnergy() const {return fFermiEnergy;};
|
||||
G4double GetLFactor() const {return fLfactor;};
|
||||
|
||||
public: // without description
|
||||
|
||||
G4IonisParamMat(const G4IonisParamMat&);
|
||||
@@ -111,6 +117,9 @@ private:
|
||||
// Compute parameters for the energy fluctuation model
|
||||
void ComputeFluctModel();
|
||||
|
||||
// Compute parameters for ion parameterizations
|
||||
void ComputeIonParameters();
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
@@ -140,6 +149,11 @@ private:
|
||||
G4double fLogEnergy2fluct;
|
||||
G4double fEnergy0fluct;
|
||||
G4double fRateionexcfluct;
|
||||
|
||||
// parameters for ion corrections computations
|
||||
G4double fZeff;
|
||||
G4double fFermiEnergy;
|
||||
G4double fLfactor;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Isotope.hh,v 1.19 2006/06/29 19:11:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IsotopeVector.hh,v 1.6 2006/06/29 19:11:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MPVEntry.hh,v 1.6 2006/06/29 19:11:11 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Material.hh,v 1.25 2006/06/29 19:11:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.hh,v 1.18 2006/06/29 19:11:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialPropertyVector.hh,v 1.10 2006/06/29 19:11:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialTable.hh,v 1.6 2006/06/29 19:11:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NistElementBuilder.hh,v 1.12 2007/05/02 11:22:35 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4NistElementBuilder.hh,v 1.13 2007/07/26 18:52:12 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#ifndef G4NistElementBuilder_h
|
||||
#define G4NistElementBuilder_h 1
|
||||
@@ -113,9 +113,11 @@ private:
|
||||
G4int nFirstIsotope [maxNumElements];
|
||||
G4int idxIsotopes [maxNumElements];
|
||||
|
||||
G4double massIsotopes [maxAbundance];
|
||||
G4double sigMass [maxAbundance];
|
||||
G4double relAbundance [maxAbundance];
|
||||
G4int elmIndex [maxNumElements];
|
||||
|
||||
G4double massIsotopes [maxAbundance];
|
||||
G4double sigMass [maxAbundance];
|
||||
G4double relAbundance [maxAbundance];
|
||||
|
||||
G4int limitNumElements; // protection
|
||||
G4int index;
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NistManager.hh,v 1.12 2007/05/02 11:22:35 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4NistManager.hh,v 1.17 2007/12/11 13:32:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
@@ -43,6 +43,8 @@
|
||||
// 17.10.06 V.Ivanchneko add methods: GetAtomicMass, GetNistElementNames,
|
||||
// GetNistMaterialNames
|
||||
// 02.05.07 V.Ivanchneko add GetNistFirstIsotopeN and GetNumberOfNistIsotopes
|
||||
// 28.07.07 V.Ivanchneko make simple methods inline
|
||||
// 28.10.07 V.Ivanchneko add state, T, P to maetrial build
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
@@ -66,8 +68,8 @@
|
||||
#include "globals.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4NistElementBuilder.hh"
|
||||
#include "G4NistMaterialBuilder.hh"
|
||||
|
||||
class G4NistMaterialBuilder;
|
||||
class G4NistMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -81,89 +83,105 @@ public:
|
||||
static G4NistManager* Instance();
|
||||
~G4NistManager();
|
||||
|
||||
// Elements
|
||||
//
|
||||
void RegisterElement (G4Element*);
|
||||
void DeRegisterElement(G4Element*);
|
||||
|
||||
G4Element* GetElement(size_t index);
|
||||
// Elements
|
||||
//
|
||||
inline G4Element* GetElement(size_t index);
|
||||
|
||||
// Find or build G4Element by atomic number
|
||||
G4Element* FindOrBuildElement(G4int Z, G4bool isotopes=true);
|
||||
inline G4Element* FindOrBuildElement(G4int Z, G4bool isotopes=true);
|
||||
|
||||
// Find or build G4Element by symbol
|
||||
G4Element* FindOrBuildElement(const G4String& symb, G4bool isotopes=true);
|
||||
inline G4Element* FindOrBuildElement(const G4String& symb,
|
||||
G4bool isotopes=true);
|
||||
|
||||
size_t GetNumberOfElements() const;
|
||||
G4int GetZ(const G4String& symb) const;
|
||||
inline size_t GetNumberOfElements() const;
|
||||
inline G4int GetZ(const G4String& symb) const;
|
||||
|
||||
// Mass in amu
|
||||
G4double GetAtomicMassAmu(G4int Z) const;
|
||||
inline G4double GetAtomicMassAmu(G4int Z) const;
|
||||
|
||||
// Mass in Geant4 units
|
||||
G4double GetIsotopeMass(G4int Z, G4int N) const;
|
||||
G4double GetAtomicMass(G4int Z, G4int N) const;
|
||||
inline G4double GetIsotopeMass(G4int Z, G4int N) const;
|
||||
inline G4double GetAtomicMass(G4int Z, G4int N) const;
|
||||
|
||||
// Number of isotopes
|
||||
G4int GetNistFirstIsotopeN(G4int Z) const;
|
||||
G4int GetNumberOfNistIsotopes(G4int Z) const;
|
||||
inline G4int GetNistFirstIsotopeN(G4int Z) const;
|
||||
inline G4int GetNumberOfNistIsotopes(G4int Z) const;
|
||||
|
||||
G4double GetIsotopeAbundance(G4int Z, G4int N) const;
|
||||
inline G4double GetIsotopeAbundance(G4int Z, G4int N) const;
|
||||
|
||||
void PrintElement(const G4String&);
|
||||
void PrintElement(G4int Z);
|
||||
|
||||
inline void PrintElement(G4int Z);
|
||||
|
||||
void PrintElement(const G4String&);
|
||||
void PrintG4Element(const G4String&);
|
||||
|
||||
const std::vector<G4String>& GetNistElementNames() const;
|
||||
|
||||
inline const std::vector<G4String>& GetNistElementNames() const;
|
||||
|
||||
// Materials
|
||||
//
|
||||
void RegisterMaterial (G4Material*);
|
||||
void DeRegisterMaterial(G4Material*);
|
||||
|
||||
G4Material* GetMaterial(size_t index);
|
||||
inline G4Material* GetMaterial(size_t index);
|
||||
|
||||
// Find or build a G4Material by name, from the dataBase
|
||||
//
|
||||
G4Material* FindOrBuildMaterial(const G4String& name, G4bool isotopes=true,
|
||||
G4bool warning=false);
|
||||
inline G4Material* FindOrBuildMaterial(const G4String& name,
|
||||
G4bool isotopes=true,
|
||||
G4bool warning=false);
|
||||
|
||||
// construct a G4Material from scratch by atome count
|
||||
//
|
||||
G4Material* ConstructNewMaterial(const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4int>& nbAtoms,
|
||||
G4double dens, G4bool isotopes=true);
|
||||
inline G4Material* ConstructNewMaterial(
|
||||
const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4int>& nbAtoms,
|
||||
G4double dens,
|
||||
G4bool isotopes=true,
|
||||
G4State state = kStateSolid,
|
||||
G4double temp = STP_Temperature,
|
||||
G4double pressure = STP_Pressure);
|
||||
|
||||
// construct a G4Material from scratch by fraction mass
|
||||
//
|
||||
G4Material* ConstructNewMaterial(const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4double>& weight,
|
||||
G4double dens, G4bool isotopes=true);
|
||||
inline G4Material* ConstructNewMaterial(
|
||||
const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4double>& weight,
|
||||
G4double dens,
|
||||
G4bool isotopes=true,
|
||||
G4State state = kStateSolid,
|
||||
G4double temp = STP_Temperature,
|
||||
G4double pressure = STP_Pressure);
|
||||
|
||||
// construct a gas G4Material from scratch by atome count
|
||||
//
|
||||
G4Material* ConstructNewGasMaterial(const G4String& name,
|
||||
const G4String& nameNist,
|
||||
G4double temp, G4double pres,
|
||||
G4bool isotopes=true);
|
||||
inline G4Material* ConstructNewGasMaterial(const G4String& name,
|
||||
const G4String& nameNist,
|
||||
G4double temp,
|
||||
G4double pres,
|
||||
G4bool isotopes=true);
|
||||
|
||||
size_t GetNumberOfMaterials();
|
||||
inline size_t GetNumberOfMaterials();
|
||||
|
||||
void SetVerbose(G4int);
|
||||
G4int GetVerbose();
|
||||
inline G4int GetVerbose();
|
||||
|
||||
void SetVerbose(G4int);
|
||||
|
||||
void ListMaterials(const G4String&);
|
||||
void PrintG4Material(const G4String&);
|
||||
|
||||
const std::vector<G4String>& GetNistMaterialNames() const;
|
||||
inline void ListMaterials(const G4String&);
|
||||
|
||||
inline const std::vector<G4String>& GetNistMaterialNames() const;
|
||||
|
||||
G4double GetZ13(G4double Z);
|
||||
|
||||
G4double GetLOGA(G4double A);
|
||||
|
||||
private:
|
||||
|
||||
G4NistManager();
|
||||
static G4NistManager* instance;
|
||||
|
||||
static G4double POWERZ13[256];
|
||||
static G4double LOGA[256];
|
||||
|
||||
std::vector<G4Element*> elements;
|
||||
std::vector<G4Material*> materials;
|
||||
@@ -193,8 +211,9 @@ size_t G4NistManager::GetNumberOfMaterials()
|
||||
inline
|
||||
G4Element* G4NistManager::GetElement(size_t index)
|
||||
{
|
||||
G4Element* elm = 0;
|
||||
if(index < nElements) elm = elements[index];
|
||||
G4Element* elm = 0;
|
||||
const G4ElementTable* theElementTable = G4Element::GetElementTable();
|
||||
if(index < theElementTable->size()) elm = (*theElementTable)[index];
|
||||
return elm;
|
||||
}
|
||||
|
||||
@@ -289,11 +308,20 @@ const std::vector<G4String>& G4NistManager::GetNistElementNames() const
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
void G4NistManager::PrintElement(G4int Z)
|
||||
{
|
||||
elmBuilder->PrintElement(Z);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
G4Material* G4NistManager::GetMaterial(size_t index)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
||||
G4Material* mat = 0;
|
||||
if(index < nMaterials) mat = materials[index];
|
||||
if(index < theMaterialTable->size()) mat = (*theMaterialTable)[index];
|
||||
return mat;
|
||||
}
|
||||
|
||||
@@ -307,5 +335,78 @@ G4int G4NistManager::GetVerbose()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
G4Material* G4NistManager::FindOrBuildMaterial(const G4String& name,
|
||||
G4bool isotopes,
|
||||
G4bool warning)
|
||||
{
|
||||
return matBuilder->FindOrBuildMaterial(name, isotopes, warning);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
G4Material* G4NistManager::ConstructNewMaterial(
|
||||
const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4int>& nbAtoms,
|
||||
G4double dens,
|
||||
G4bool isotopes,
|
||||
G4State state,
|
||||
G4double T,
|
||||
G4double P)
|
||||
|
||||
{
|
||||
return
|
||||
matBuilder->ConstructNewMaterial(name,elm,nbAtoms,dens,isotopes,state,T,P);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
G4Material* G4NistManager::ConstructNewMaterial(
|
||||
const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4double>& w,
|
||||
G4double dens,
|
||||
G4bool isotopes,
|
||||
G4State state,
|
||||
G4double T,
|
||||
G4double P)
|
||||
{
|
||||
return matBuilder->ConstructNewMaterial(name,elm,w,dens,isotopes,state,T,P);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
G4Material* G4NistManager::ConstructNewGasMaterial(
|
||||
const G4String& name,
|
||||
const G4String& nameNist,
|
||||
G4double temp, G4double pres,
|
||||
G4bool isotopes)
|
||||
{
|
||||
return matBuilder->ConstructNewGasMaterial(name,nameNist,
|
||||
temp,pres,isotopes);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
void G4NistManager::ListMaterials(const G4String& list)
|
||||
{
|
||||
matBuilder->ListMaterials(list);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
const std::vector<G4String>& G4NistManager::GetNistMaterialNames() const
|
||||
{
|
||||
return matBuilder->GetMaterialNames();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NistMaterialBuilder.hh,v 1.9 2006/10/17 15:15:46 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4NistMaterialBuilder.hh,v 1.12 2007/10/30 10:05:52 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#ifndef G4NistMaterialBuilder_h
|
||||
#define G4NistMaterialBuilder_h 1
|
||||
@@ -40,7 +40,10 @@
|
||||
// Modifications:
|
||||
// 31.10.05 Add chemical effect and gas properties (V.Ivanchenko)
|
||||
// 27.02.06 V.Ivanchneko add ConstructNewGasMaterial
|
||||
// 11.05.06 V.Ivanchneko add warning flag to FindMaterial method
|
||||
// 11.05.06 V.Ivanchneko add warning flag to FindOrBuildMaterial method
|
||||
// 27.07.06 V.Ivanchneko set defaul warning=true for FindOrBuildMaterial
|
||||
// 27.07.07 V.Ivanchneko add matIndex vector to control built materials
|
||||
// 28.07.07 V.Ivanchneko add BuildMaterial method using Nist index
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -58,36 +61,44 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4NistManager;
|
||||
class G4NistElementBuilder;
|
||||
|
||||
class G4NistMaterialBuilder
|
||||
{
|
||||
public:
|
||||
|
||||
G4NistMaterialBuilder(G4NistManager* mm=0, G4NistElementBuilder* eb=0,
|
||||
G4int verb=0);
|
||||
G4NistMaterialBuilder(G4NistElementBuilder*, G4int verb=0);
|
||||
|
||||
~G4NistMaterialBuilder();
|
||||
|
||||
// Find or build a G4Material by name, from dataBase
|
||||
//
|
||||
G4Material* FindOrBuildMaterial (const G4String& name, G4bool isotopes=true,
|
||||
G4bool warning=false);
|
||||
G4Material* FindOrBuildMaterial (const G4String& name,
|
||||
G4bool isotopes=true,
|
||||
G4bool warning=true);
|
||||
|
||||
// construct a G4Material from scratch by atome count
|
||||
//
|
||||
G4Material* ConstructNewMaterial (const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4int>& nbAtoms,
|
||||
G4double dens, G4bool isotopes=true);
|
||||
G4double dens,
|
||||
G4bool isotopes=true,
|
||||
G4State state = kStateSolid,
|
||||
G4double temp = STP_Temperature,
|
||||
G4double pressure = STP_Pressure);
|
||||
|
||||
// construct a G4Material from scratch by fraction mass
|
||||
//
|
||||
G4Material* ConstructNewMaterial (const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4double>& weight,
|
||||
G4double dens, G4bool isotopes=true);
|
||||
G4double dens,
|
||||
G4bool isotopes=true,
|
||||
G4State state = kStateSolid,
|
||||
G4double temp = STP_Temperature,
|
||||
G4double pressure = STP_Pressure);
|
||||
|
||||
|
||||
// construct a gas G4Material from scratch by atome count
|
||||
//
|
||||
@@ -129,13 +140,13 @@ private:
|
||||
|
||||
// build a G4Material from dataBase
|
||||
G4Material* BuildMaterial(const G4String& name, G4bool isotopes);
|
||||
G4Material* BuildMaterial(G4int idx, G4bool isotopes);
|
||||
|
||||
void DumpElm(G4int);
|
||||
void DumpMix(G4int);
|
||||
|
||||
private:
|
||||
|
||||
G4NistManager* matManager;
|
||||
G4NistElementBuilder* elmBuilder;
|
||||
|
||||
G4int verbose;
|
||||
@@ -156,6 +167,8 @@ private:
|
||||
std::vector<G4int> indexes;
|
||||
std::vector<G4int> elements;
|
||||
|
||||
std::vector<G4int> matIndex;
|
||||
|
||||
std::vector<G4double> temperatures;
|
||||
std::vector<G4double> presures;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NistMessenger.hh,v 1.4 2007/05/02 10:48:52 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// File name: G4NistMessenger
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpticalSurface.hh,v 1.8 2006/06/29 19:12:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SandiaTable.hh,v 1.14 2006/06/29 19:12:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4SandiaTable.hh,v 1.21 2007/10/02 10:13:33 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
// class description
|
||||
//
|
||||
@@ -38,12 +38,12 @@
|
||||
//
|
||||
// History:
|
||||
//
|
||||
// 05.03.04 V.Grichine, new methods for old sorting algorithm for PAI model
|
||||
// 03.04.01 fnulcof[4] added; returned if energy < emin
|
||||
// 10.06.97 created. V. Grichine
|
||||
// 18.11.98 simplified public interface; new methods for materials. mma
|
||||
// 30.01.01 major bug in the computation of AoverAvo and in the units (/g!)
|
||||
// in GetSandiaCofPerAtom(). mma
|
||||
// 18.11.98 simplified public interface; new methods for materials. mma
|
||||
// 10.06.97 created. V. Grichine
|
||||
// 03.04.01 fnulcof[4] added; returned if energy < emin
|
||||
// 05.03.04 V.Grichine, new methods for old sorting algorithm for PAI model
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -57,108 +57,113 @@
|
||||
|
||||
class G4Material;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
class G4SandiaTable
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4SandiaTable(G4int);
|
||||
G4SandiaTable(G4Material*);
|
||||
|
||||
G4SandiaTable(G4Material*);
|
||||
|
||||
~G4SandiaTable();
|
||||
~G4SandiaTable();
|
||||
|
||||
//main computation per atom:
|
||||
static G4double* GetSandiaCofPerAtom(G4int Z, G4double energy);
|
||||
static G4double GetZtoA (G4int Z);
|
||||
|
||||
//per volume of a material:
|
||||
inline G4int GetMatNbOfIntervals();
|
||||
inline G4double GetSandiaCofForMaterial(G4int,G4int);
|
||||
inline G4double* GetSandiaCofForMaterial(G4double energy);
|
||||
inline G4double GetSandiaMatTable(G4int,G4int);
|
||||
|
||||
inline G4double GetSandiaCofForMaterialPAI(G4int,G4int);
|
||||
inline G4double* GetSandiaCofForMaterialPAI(G4double energy);
|
||||
inline G4double GetSandiaMatTablePAI(G4int,G4int);
|
||||
inline G4OrderedTable* GetSandiaMatrixPAI();
|
||||
|
||||
//per atom of an Element:
|
||||
static G4int GetNbOfIntervals (G4int Z);
|
||||
static G4double GetSandiaCofPerAtom(G4int Z, G4int, G4int);
|
||||
static G4double* GetSandiaCofPerAtom(G4int Z, G4double energy);
|
||||
static G4double GetIonizationPot (G4int Z);
|
||||
static G4double GetZtoA (G4int Z);
|
||||
|
||||
//per volume of a material:
|
||||
G4int GetMatNbOfIntervals() {return fMatNbOfIntervals;};
|
||||
G4double GetSandiaCofForMaterial(G4int,G4int);
|
||||
G4double* GetSandiaCofForMaterial(G4double energy);
|
||||
|
||||
public: // without description
|
||||
|
||||
G4SandiaTable(__void__&);
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
G4SandiaTable(__void__&);
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
private:
|
||||
|
||||
void ComputeMatSandiaMatrix();
|
||||
|
||||
private:
|
||||
void ComputeMatSandiaMatrix();
|
||||
void ComputeMatSandiaMatrixPAI();
|
||||
|
||||
static const G4double fSandiaTable[981][5];
|
||||
static const G4int fNbOfIntervals[101];
|
||||
static G4int fCumulInterval[101];
|
||||
static const G4double fZtoAratio[101];
|
||||
static const G4double fIonizationPotentials[101];
|
||||
// methods per atom
|
||||
inline G4int GetNbOfIntervals (G4int Z);
|
||||
inline G4double GetSandiaCofPerAtom(G4int Z, G4int, G4int);
|
||||
inline G4double GetIonizationPot (G4int Z);
|
||||
|
||||
// static members of the class
|
||||
static const G4int fNumberOfElements;
|
||||
static const G4int fIntervalLimit;
|
||||
static const G4int fNumberOfIntervals;
|
||||
|
||||
static const G4double fSandiaTable[981][5];
|
||||
static const G4int fNbOfIntervals[101];
|
||||
static const G4double fZtoAratio[101];
|
||||
static const G4double fIonizationPotentials[101];
|
||||
static const G4double funitc[4];
|
||||
|
||||
static G4double fSandiaCofPerAtom[4];
|
||||
|
||||
G4Material* fMaterial;
|
||||
G4int fMatNbOfIntervals;
|
||||
G4OrderedTable* fMatSandiaMatrix;
|
||||
|
||||
G4double fnulcof[4];
|
||||
static G4int fCumulInterval[101];
|
||||
static G4double fSandiaCofPerAtom[4];
|
||||
|
||||
// members of the class
|
||||
G4Material* fMaterial;
|
||||
G4int fMatNbOfIntervals;
|
||||
G4OrderedTable* fMatSandiaMatrix;
|
||||
G4OrderedTable* fMatSandiaMatrixPAI;
|
||||
|
||||
G4double fnulcof[4];
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Methods for PAI model
|
||||
// Methods for old implementation of PAI model
|
||||
// Will be removed for the next major release
|
||||
|
||||
public: // without description
|
||||
|
||||
G4SandiaTable(G4int);
|
||||
|
||||
inline void SandiaSwap( G4double** da,
|
||||
G4int i,
|
||||
G4int j );
|
||||
inline void SandiaSwap( G4double** da,
|
||||
G4int i,
|
||||
G4int j );
|
||||
|
||||
void SandiaSort( G4double** da,
|
||||
G4int sz );
|
||||
void SandiaSort( G4double** da,
|
||||
G4int sz );
|
||||
|
||||
G4int SandiaIntervals( G4int Z[],
|
||||
G4int el );
|
||||
G4int SandiaIntervals( G4int Z[],
|
||||
G4int el );
|
||||
|
||||
G4int SandiaMixing( G4int Z[],
|
||||
const G4double fractionW[],
|
||||
G4int el,
|
||||
G4int mi );
|
||||
G4int SandiaMixing( G4int Z[],
|
||||
const G4double fractionW[],
|
||||
G4int el,
|
||||
G4int mi );
|
||||
|
||||
inline G4double GetPhotoAbsorpCof(G4int i , G4int j) const;
|
||||
inline G4double GetPhotoAbsorpCof(G4int i , G4int j) const;
|
||||
|
||||
inline G4int GetMaxInterval() const { return fMaxInterval;};
|
||||
inline G4int GetMaxInterval() const;
|
||||
|
||||
G4OrderedTable* GetSandiaMatTable() const {return fMatSandiaMatrix;};
|
||||
inline G4double GetSandiaMatTable(G4int,G4int) const;
|
||||
inline G4double** GetPointerToCof();
|
||||
|
||||
private:
|
||||
|
||||
void ComputeMatTable();
|
||||
|
||||
void ComputeMatTable();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// data members for PAI model
|
||||
|
||||
private:
|
||||
static const G4int fNumberOfElements ;
|
||||
static const G4int fIntervalLimit ;
|
||||
static const G4int fNumberOfIntervals ;
|
||||
|
||||
// G4double fPhotoAbsorptionCof[101][5] ; // SandiaTable for mixture
|
||||
G4double** fPhotoAbsorptionCof ; // SandiaTable for mixture
|
||||
|
||||
G4double** fPhotoAbsorptionCof ; // SandiaTable for mixture
|
||||
|
||||
// G4OrderedTable*
|
||||
G4int fMaxInterval ;
|
||||
G4int fMaxInterval ;
|
||||
|
||||
//
|
||||
//
|
||||
@@ -166,14 +171,156 @@ private:
|
||||
|
||||
};
|
||||
|
||||
// Inline methods
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4int
|
||||
G4SandiaTable::GetMatNbOfIntervals()
|
||||
{
|
||||
return fMatNbOfIntervals;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4int
|
||||
G4SandiaTable::GetNbOfIntervals(G4int Z)
|
||||
{
|
||||
// assert (Z>0 && Z<101);
|
||||
return fNbOfIntervals[Z];
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4SandiaTable::GetSandiaCofPerAtom(G4int Z, G4int interval, G4int j)
|
||||
{
|
||||
assert (Z>0 && Z<101 && interval>=0 && interval<fNbOfIntervals[Z]
|
||||
&& j>=0 && j<5);
|
||||
|
||||
G4int row = fCumulInterval[Z-1] + interval;
|
||||
G4double x = fSandiaTable[row][0]*keV;
|
||||
if (j > 0) {
|
||||
x = Z*amu/fZtoAratio[Z]*
|
||||
(fSandiaTable[row][j]*cm2*std::pow(keV,G4double(j))/g);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4SandiaTable::GetSandiaCofForMaterial(G4int interval, G4int j)
|
||||
{
|
||||
assert (interval>=0 && interval<fMatNbOfIntervals && j>=0 && j<5);
|
||||
return ((*(*fMatSandiaMatrix)[interval])[j]);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4double*
|
||||
G4SandiaTable::GetSandiaCofForMaterial(G4double energy)
|
||||
{
|
||||
G4double* x = fnulcof;
|
||||
if (energy >= (*(*fMatSandiaMatrix)[0])[0]) {
|
||||
|
||||
G4int interval = fMatNbOfIntervals - 1;
|
||||
while ((interval>0)&&(energy<(*(*fMatSandiaMatrix)[interval])[0]))
|
||||
{interval--;}
|
||||
x = &((*(*fMatSandiaMatrix)[interval])[1]);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4SandiaTable::GetSandiaMatTable(G4int interval, G4int j)
|
||||
{
|
||||
assert (interval >= 0 && interval < fMaxInterval && j >= 0 && j < 5 );
|
||||
G4double unitCof ;
|
||||
if(j == 0) unitCof = keV ;
|
||||
else unitCof = (cm2/g)*std::pow(keV,(G4double)j);
|
||||
return ( (*(*fMatSandiaMatrix)[interval])[j] )*unitCof;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4SandiaTable::GetSandiaCofForMaterialPAI(G4int interval, G4int j)
|
||||
{
|
||||
assert (interval>=0 && interval<fMatNbOfIntervals && j>=0 && j<5);
|
||||
if(!fMatSandiaMatrixPAI) ComputeMatSandiaMatrixPAI();
|
||||
return ((*(*fMatSandiaMatrixPAI)[interval])[j]);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4double*
|
||||
G4SandiaTable::GetSandiaCofForMaterialPAI(G4double energy)
|
||||
{
|
||||
if(!fMatSandiaMatrixPAI) ComputeMatSandiaMatrixPAI();
|
||||
G4double* x = fnulcof;
|
||||
if (energy >= (*(*fMatSandiaMatrixPAI)[0])[0]) {
|
||||
|
||||
G4int interval = fMatNbOfIntervals - 1;
|
||||
while ((interval>0)&&(energy<(*(*fMatSandiaMatrixPAI)[interval])[0]))
|
||||
{interval--;}
|
||||
x = &((*(*fMatSandiaMatrixPAI)[interval])[1]);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4SandiaTable::GetSandiaMatTablePAI(G4int interval, G4int j)
|
||||
{
|
||||
assert (interval >= 0 && interval < fMaxInterval && j >= 0 && j < 5 );
|
||||
if(!fMatSandiaMatrixPAI) ComputeMatSandiaMatrixPAI();
|
||||
G4double unitCof ;
|
||||
if(j == 0) unitCof = keV ;
|
||||
else unitCof = (cm2/g)*std::pow(keV,(G4double)j);
|
||||
return ( (*(*fMatSandiaMatrixPAI)[interval])[j] )*unitCof;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4SandiaTable::GetIonizationPot(G4int Z)
|
||||
{
|
||||
return fIonizationPotentials[Z]*eV;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
inline G4OrderedTable*
|
||||
G4SandiaTable::GetSandiaMatrixPAI()
|
||||
{
|
||||
if(!fMatSandiaMatrixPAI) ComputeMatSandiaMatrixPAI();
|
||||
return fMatSandiaMatrixPAI;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Inline methods for PAI model
|
||||
// Inline methods for PAI model, will be removed in next major release
|
||||
|
||||
inline
|
||||
void
|
||||
inline G4int
|
||||
G4SandiaTable::GetMaxInterval() const {
|
||||
return fMaxInterval;
|
||||
}
|
||||
|
||||
inline G4double**
|
||||
G4SandiaTable::GetPointerToCof()
|
||||
{
|
||||
if(!fPhotoAbsorptionCof) ComputeMatTable();
|
||||
return fPhotoAbsorptionCof;
|
||||
}
|
||||
|
||||
inline void
|
||||
G4SandiaTable::SandiaSwap( G4double** da ,
|
||||
G4int i,
|
||||
G4int j )
|
||||
@@ -183,31 +330,14 @@ G4SandiaTable::SandiaSwap( G4double** da ,
|
||||
da[j][0] = tmp ;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
inline
|
||||
G4double G4SandiaTable::GetPhotoAbsorpCof(G4int i, G4int j) const
|
||||
{
|
||||
G4double unitCof ;
|
||||
if(j == 0) unitCof = keV ;
|
||||
else unitCof = (cm2/g)*std::pow(keV,(G4double)j) ;
|
||||
G4double unitCof ;
|
||||
if(j == 0) unitCof = keV ;
|
||||
else unitCof = (cm2/g)*std::pow(keV,(G4double)j) ;
|
||||
|
||||
return fPhotoAbsorptionCof[i][j]*unitCof ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
inline G4double G4SandiaTable::GetSandiaMatTable(G4int interval, G4int j) const
|
||||
{
|
||||
assert (interval >= 0 && interval < fMaxInterval && j >= 0 && j < 5 );
|
||||
G4double unitCof ;
|
||||
if(j == 0) unitCof = keV ;
|
||||
else unitCof = (cm2/g)*std::pow(keV,(G4double)j);
|
||||
return ( (*(*fMatSandiaMatrix)[interval])[j] )*unitCof;
|
||||
return fPhotoAbsorptionCof[i][j]*unitCof ;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StaticSandiaData.hh,v 1.7 2006/06/29 19:12:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SurfaceProperty.hh,v 1.4 2007/04/25 16:18:34 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user