Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4AtomicShells.hh,v 1.7 2006/10/17 15:15:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
// class description
//
+22 -20
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Element.hh,v 1.22 2006/10/17 15:15:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4Element.hh,v 1.23 2008/11/14 15:14:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// class description
@@ -117,18 +117,18 @@ public: // with description
//
// retrieval methods
//
G4String GetName() const {return fName;};
G4String GetSymbol() const {return fSymbol;};
G4double GetZ() const {return fZeff;}; //atomic number
G4double GetN() const {return fNeff;}; //number of nucleons
G4double GetA() const {return fAeff;}; //mass of a mole
const G4String& GetName() const {return fName;}
const G4String& GetSymbol() const {return fSymbol;}
G4double GetZ() const {return fZeff;} //atomic number
G4double GetN() const {return fNeff;} //number of nucleons
G4double GetA() const {return fAeff;} //mass of a mole
G4bool GetNaturalAbandancesFlag();
void SetNaturalAbandancesFlag(G4bool);
//the number of atomic shells in this element:
//
G4int GetNbOfAtomicShells() const {return fNbOfAtomicShells;};
G4int GetNbOfAtomicShells() const {return fNbOfAtomicShells;}
//the binding energy of the shell:
//
@@ -136,19 +136,19 @@ public: // with description
//number of isotopes constituing this element:
//
size_t GetNumberOfIsotopes() const {return fNumberOfIsotopes;};
size_t GetNumberOfIsotopes() const {return fNumberOfIsotopes;}
//vector of pointers to isotopes constituing this element:
//
G4IsotopeVector* GetIsotopeVector() const {return theIsotopeVector;};
G4IsotopeVector* GetIsotopeVector() const {return theIsotopeVector;}
//vector of relative abundance of each isotope:
//
G4double* GetRelativeAbundanceVector() const
{return fRelativeAbundanceVector;};
{return fRelativeAbundanceVector;}
const G4Isotope* GetIsotope(G4int iso) const
{return (*theIsotopeVector)[iso];};
{return (*theIsotopeVector)[iso];}
//the (static) Table of Elements:
//
@@ -160,7 +160,7 @@ public: // with description
//the index of this element in the Table:
//
size_t GetIndex() const {return fIndexInTable;};
size_t GetIndex() const {return fIndexInTable;}
//return pointer to an element, given its name:
//
@@ -169,25 +169,25 @@ public: // with description
//count number of materials which use this element
//
G4int GetCountUse() const {return fCountUse;};
void increaseCountUse() {fCountUse++;};
void decreaseCountUse() {fCountUse--;};
G4int GetCountUse() const {return fCountUse;}
void increaseCountUse() {fCountUse++;}
void decreaseCountUse() {fCountUse--;}
//count elements with same Z
//
G4int GetIndexZ() const {return fIndexZ;};
G4int GetIndexZ() const {return fIndexZ;}
//Coulomb correction factor:
//
G4double GetfCoulomb() const {return fCoulomb;};
G4double GetfCoulomb() const {return fCoulomb;}
//Tsai formula for the radiation length:
//
G4double GetfRadTsai() const {return fRadTsai;};
G4double GetfRadTsai() const {return fRadTsai;}
//pointer to ionisation parameters:
//
G4IonisParamElm* GetIonisation() const {return fIonisation;};
G4IonisParamElm* GetIonisation() const {return fIonisation;}
// printing methods
//
@@ -205,6 +205,8 @@ public: // without description
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
void SetName(const G4String& name) {fName=name;}
private:
G4Element(G4Element&);
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4ElementTable.hh,v 1.6 2006/06/29 19:10:58 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4ElementVector.hh,v 1.6 2006/06/29 19:11:00 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ------------------------------------------------------------
+10 -3
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4IonisParamElm.hh,v 1.9 2006/06/29 19:11:02 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4IonisParamElm.hh,v 1.10 2008/06/03 14:30:10 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// class description
@@ -74,7 +74,10 @@ public: // with description
// parameters for the low energy ion.loss
G4double GetMeanExcitationEnergy() const {return fMeanExcitationEnergy;}
// 16*std::pow(Z,0.9)*eV
// ICRU'37 report
G4double GetFermiVelocity() const {return fVFermi;};
G4double GetLFactor() const {return fLFactor;};
G4double* GetShellCorrectionVector() const {return fShellCorrectionVector;}
// shell correction coefficients
@@ -109,6 +112,10 @@ private:
G4double fAlow,fBlow,fClow; // parameters for the low energy ion.loss
G4double fMeanExcitationEnergy; //
G4double* fShellCorrectionVector; // shell correction coefficients
// parameters for ion corrections computations
G4double fVFermi;
G4double fLFactor;
};
#endif
+16 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4IonisParamMat.hh,v 1.10 2007/09/27 14:05:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4IonisParamMat.hh,v 1.12 2008/07/08 10:34:56 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// class description
@@ -40,6 +40,7 @@
// 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)
// 04-03-08: add fBirks constant (mma)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
@@ -93,7 +94,15 @@ public:
G4double GetZeffective() const {return fZeff;};
G4double GetFermiEnergy() const {return fFermiEnergy;};
G4double GetLFactor() const {return fLfactor;};
// parameters for Birks attenuation:
void SetBirksConstant(G4double value) {fBirks = value;};
G4double GetBirksConstant() const {return fBirks;};
// parameters for average energy per ion
void SetMeanEnergyPerIonPair(G4double value) {fMeanEnergyPerIon = value;};
G4double GetMeanEnergyPerIonPair() const {return fMeanEnergyPerIon;};
public: // without description
G4IonisParamMat(const G4IonisParamMat&);
@@ -154,6 +163,11 @@ private:
G4double fZeff;
G4double fFermiEnergy;
G4double fLfactor;
// parameter for Birks attenuation
G4double fBirks;
// average energy per ion pair
G4double fMeanEnergyPerIon;
};
#endif
@@ -0,0 +1,197 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: G4IronStoppingICRU73.hh,v 1.3 2008/11/02 12:22:19 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4IronStoppingICRU73_h
#define G4IronStoppingICRU73_h 1
//---------------------------------------------------------------------------
//
// ClassName: G4IronStoppingICRU73
//
// Description: Data on stopping powers for light ions in compounds
//
// Author: A.Ivantchenko 8.08.2008
//
// Modifications:
//
//----------------------------------------------------------------------------
//
// Class Description:
//
// Data on Stopping Powers from the ICRU73 report
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4LPhysicsFreeVector.hh"
#include <vector>
class G4IronStoppingICRU73
{
public:
G4IronStoppingICRU73(G4bool splineFlag = true);
~G4IronStoppingICRU73();
G4double GetDEDX(G4int idxMaterial, G4double kinEnergy);
inline G4double GetDEDX(const G4String& NameMaterial, G4double kinEnergy);
inline G4int GetMaterialIndex(const G4String& NameMaterial);
// Function returns an unique index (>=0) for each ion-material couple (the
// return value is -1 if the couple is not found):
inline G4int GetIonMaterialCoupleIndex(
G4int atomicNumber, // Atomic number of ion
const G4String& materialName); // Material name
inline G4double GetDensity(G4int idx);
inline G4String GetMaterialName(G4int idx);
inline G4PhysicsVector* GetPhysicsVector(G4int idx);
inline G4PhysicsVector* GetPhysicsVector(const G4String& NameMaterial);
inline G4double GetLowerEnergyBoundary();
inline G4double GetUpperEnergyBoundary();
private:
void AddData(G4double* energy, G4double* stoppower, G4double factor);
void Initialise();
// hide assignment operator
G4IronStoppingICRU73 & operator=(const G4IronStoppingICRU73 &right);
G4IronStoppingICRU73(const G4IronStoppingICRU73&);
G4bool spline;
G4String MatName[16];
G4double Density[16];
// Lower and upper energy boundaries for dE/dx vectors:
G4double lowerEnergyBoundary;
G4double upperEnergyBoundary;
std::vector<G4LPhysicsFreeVector*> dedx;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4IronStoppingICRU73::GetDEDX(const G4String& NameMaterial,
G4double kinEnergy)
{
return GetDEDX(GetMaterialIndex(NameMaterial), kinEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4int
G4IronStoppingICRU73::GetMaterialIndex(const G4String& NameMaterial)
{
G4int idx = -1;
for (G4int idxMaterial=0; idxMaterial<16; idxMaterial++){
if(MatName[idxMaterial] == NameMaterial) {
idx = idxMaterial;
break;
}
}
return idx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4int
G4IronStoppingICRU73::GetIonMaterialCoupleIndex(G4int atomicNumber,
const G4String& materialName)
{
G4int idx = -1;
if(atomicNumber == 26) idx = GetMaterialIndex(materialName);
return idx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4IronStoppingICRU73::GetDensity(G4int idxMaterial)
{
G4double d = 0.0;
if( idxMaterial >= 0 && idxMaterial <= 15) d = Density[idxMaterial];
return d;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4String G4IronStoppingICRU73::GetMaterialName(G4int idxMaterial)
{
G4String s = "";
if( idxMaterial >= 0 && idxMaterial <= 15) s = MatName[idxMaterial];
return s;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4PhysicsVector* G4IronStoppingICRU73::GetPhysicsVector(G4int idxMaterial)
{
G4PhysicsVector* v = 0;
if(idxMaterial >= 0 && idxMaterial <= 15) v = dedx[idxMaterial];
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4PhysicsVector*
G4IronStoppingICRU73::GetPhysicsVector(const G4String& NameMaterial)
{
return GetPhysicsVector(GetMaterialIndex(NameMaterial));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4IronStoppingICRU73::GetLowerEnergyBoundary() {
return lowerEnergyBoundary;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4IronStoppingICRU73::GetUpperEnergyBoundary() {
return upperEnergyBoundary;
}
#endif
+16 -11
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Isotope.hh,v 1.19 2006/06/29 19:11:07 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4Isotope.hh,v 1.21 2008/11/14 15:14:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,6 +35,7 @@
// Z: atomic number,
// N: number of nucleons,
// A: mass of a mole (optional).
// If A is not defined it is taken from Geant4 database
//
// The class contains as a private static member the table of defined
// isotopes (an ordered vector of isotopes).
@@ -72,6 +73,7 @@ class G4Isotope
public: // with description
// Make an isotope
//
G4Isotope(const G4String& name, //its name
G4int z, //atomic number
G4int n, //number of nucleons
@@ -80,14 +82,13 @@ class G4Isotope
virtual ~G4Isotope();
// Retrieval methods
G4String GetName() const {return fName;};
G4int GetZ() const {return fZ;};
G4int GetN() const {return fN;};
G4double GetA() const {return fA;};
//
const G4String& GetName() const {return fName;}
G4int GetZ() const {return fZ;}
G4int GetN() const {return fN;}
G4double GetA() const {return fA;}
G4int GetCountUse() const {return fCountUse;};
void increaseCountUse() {fCountUse++;};
void decreaseCountUse() {fCountUse--;};
G4int GetCountUse() const {return fCountUse;}
static
G4Isotope* GetIsotope(G4String name, G4bool warning=false);
@@ -98,7 +99,7 @@ class G4Isotope
static
size_t GetNumberOfIsotopes();
size_t GetIndex() const {return fIndexInTable;};
size_t GetIndex() const {return fIndexInTable;}
friend
std::ostream& operator<<(std::ostream&, G4Isotope*);
@@ -119,11 +120,15 @@ class G4Isotope
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
void SetName(const G4String& name) {fName=name;}
void increaseCountUse() {fCountUse++;}
void decreaseCountUse() {fCountUse--;}
private:
G4Isotope(G4Isotope&);
G4Isotope& operator=(const G4Isotope&);
private:
G4String fName; // name of the Isotope
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4IsotopeVector.hh,v 1.6 2006/06/29 19:11:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ------------------------------------------------------------
+9 -9
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MPVEntry.hh,v 1.6 2006/06/29 19:11:11 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MPVEntry.hh,v 1.7 2008/06/05 23:36:56 gum Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -83,7 +83,7 @@ public: // Without description
// Constructor and Destructor
///////////////////////////////
G4MPVEntry(G4double aPhotonMomentum, G4double aPropertyValue);
G4MPVEntry(G4double aPhotonEnergy, G4double aPropertyValue);
G4MPVEntry(const G4MPVEntry &right);
@@ -93,7 +93,7 @@ public: // Without description
// Methods
////////////
G4double GetPhotonMomentum();
G4double GetPhotonEnergy();
G4double GetProperty();
@@ -109,7 +109,7 @@ private:
// Private Data members
/////////////////////////
G4double thePhotonMomentum;
G4double thePhotonEnergy;
G4double theProperty;
};
@@ -117,14 +117,14 @@ private:
// Inline methods
////////////////////
// GetPhotonMomentum
// -----------------
// GetPhotonEnergy
// ---------------
//
inline
G4double G4MPVEntry::GetPhotonMomentum()
G4double G4MPVEntry::GetPhotonEnergy()
{
return thePhotonMomentum;
return thePhotonEnergy;
}
// GetProperty
+33 -31
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Material.hh,v 1.25 2006/06/29 19:11:13 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4Material.hh,v 1.27 2008/11/14 15:14:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// class description
@@ -102,7 +102,7 @@ enum G4State { kStateUndefined, kStateSolid, kStateLiquid, kStateGas };
class G4Material
{
public: // with description
public: // with description
//
// Constructor to create a material from scratch.
@@ -144,60 +144,59 @@ public: // with description
virtual ~G4Material();
void SetChemicalFormula(const G4String& chF) {fChemicalFormula=chF;};
void SetChemicalFormula (const G4String& chF) {fChemicalFormula=chF;}
//
// retrieval methods
//
G4String GetName() const {return fName;};
G4String GetChemicalFormula() const {return fChemicalFormula;};
G4double GetDensity() const {return fDensity;};
G4State GetState() const {return fState;};
G4double GetTemperature() const {return fTemp;};
G4double GetPressure() const {return fPressure;};
const G4String& GetName() const {return fName;}
const G4String& GetChemicalFormula() const {return fChemicalFormula;}
G4double GetDensity() const {return fDensity;}
G4State GetState() const {return fState;}
G4double GetTemperature() const {return fTemp;}
G4double GetPressure() const {return fPressure;}
//number of elements constituing this material:
size_t GetNumberOfElements() const {return fNumberOfElements;};
size_t GetNumberOfElements() const {return fNumberOfElements;}
//vector of pointers to elements constituing this material:
const
G4ElementVector* GetElementVector() const {return theElementVector;};
G4ElementVector* GetElementVector() const {return theElementVector;}
//vector of fractional mass of each element:
const G4double* GetFractionVector() const {return fMassFractionVector;};
const G4double* GetFractionVector() const {return fMassFractionVector;}
//vector of atom count of each element:
const G4int* GetAtomsVector() const {return fAtomsVector;};
const G4int* GetAtomsVector() const {return fAtomsVector;}
//return a pointer to an element, given its index in the material:
const
G4Element* GetElement(G4int iel) const {return (*theElementVector)[iel];};
G4Element* GetElement(G4int iel) const {return (*theElementVector)[iel];}
//vector of nb of atoms per volume of each element in this material:
const
G4double* GetVecNbOfAtomsPerVolume() const {return VecNbOfAtomsPerVolume;};
G4double* GetVecNbOfAtomsPerVolume() const {return VecNbOfAtomsPerVolume;}
//total number of atoms per volume:
G4double GetTotNbOfAtomsPerVolume() const {return TotNbOfAtomsPerVolume;};
G4double GetTotNbOfAtomsPerVolume() const {return TotNbOfAtomsPerVolume;}
//total number of electrons per volume:
G4double GetTotNbOfElectPerVolume() const {return TotNbOfElectPerVolume;};
G4double GetTotNbOfElectPerVolume() const {return TotNbOfElectPerVolume;}
//obsolete names (5-10-98) see the 2 functions above
const
G4double* GetAtomicNumDensityVector() const {return VecNbOfAtomsPerVolume;};
G4double GetElectronDensity() const {return TotNbOfElectPerVolume;};
G4double* GetAtomicNumDensityVector() const {return VecNbOfAtomsPerVolume;}
G4double GetElectronDensity() const {return TotNbOfElectPerVolume;}
// Radiation length:
G4double GetRadlen() const {return fRadlen;};
G4double GetRadlen() const {return fRadlen;}
// Nuclear interaction length:
G4double GetNuclearInterLength() const {return fNuclInterLen;};
G4double GetNuclearInterLength() const {return fNuclInterLen;}
// ionisation parameters:
G4IonisParamMat* GetIonisation() const {return fIonisation;};
G4IonisParamMat* GetIonisation() const {return fIonisation;}
// Sandia table:
G4SandiaTable* GetSandiaTable() const {return fSandiaTable;};
G4SandiaTable* GetSandiaTable() const {return fSandiaTable;}
//meaningful only for single material:
G4double GetZ() const;
@@ -205,10 +204,10 @@ public: // with description
//the MaterialPropertiesTable (if any) attached to this material:
void SetMaterialPropertiesTable(G4MaterialPropertiesTable* anMPT)
{fMaterialPropertiesTable = anMPT;};
{fMaterialPropertiesTable = anMPT;}
G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
{return fMaterialPropertiesTable;};
{return fMaterialPropertiesTable;}
//the (static) Table of Materials:
//
@@ -219,7 +218,7 @@ public: // with description
size_t GetNumberOfMaterials();
//the index of this material in the Table:
size_t GetIndex() const {return fIndexInTable;};
size_t GetIndex() const {return fIndexInTable;}
//return pointer to a material, given its name:
static G4Material* GetMaterial(G4String name, G4bool warning=true);
@@ -231,7 +230,7 @@ public: // with description
friend std::ostream& operator<<(std::ostream&, G4Material&);
friend std::ostream& operator<<(std::ostream&, G4MaterialTable);
public: // without description
public: // without description
G4int operator==(const G4Material&) const;
G4int operator!=(const G4Material&) const;
@@ -240,7 +239,9 @@ public: // without description
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
private:
void SetName (const G4String& name) {fName=name;}
private:
G4Material(const G4Material&);
const G4Material& operator=(const G4Material&);
@@ -272,6 +273,7 @@ private:
G4double fPressure; // Pressure (defaults: STP)
G4int maxNbComponents; // totalNbOfComponentsInTheMaterial
G4int fArrayLength; // the length of FAtomVector
size_t fNumberOfComponents; // Nb of components declared so far
size_t fNumberOfElements; // Nb of Elements in the material
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MaterialPropertiesTable.hh,v 1.18 2006/06/29 19:11:15 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MaterialPropertiesTable.hh,v 1.19 2008/06/05 23:38:03 gum Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -100,7 +100,7 @@ public: // With description
// Add a new property to the table by giving a key-name and value
void AddProperty(const char *key,
G4double *PhotonMomenta,
G4double *PhotonEnergies,
G4double *PropertyValues,
G4int NumEntries);
// Add a new property to the table by giving a key-name and the
@@ -125,11 +125,11 @@ public: // With description
G4MaterialPropertyVector* GetProperty(const char *key);
// Get the property from the table corresponding to the key-name.
void AddEntry(const char *key, G4double aPhotonMomentum,
void AddEntry(const char *key, G4double aPhotonEnergy,
G4double aPropertyValue);
// Add a new entry (pair of numbers) to the table for a given key.
void RemoveEntry(const char *key, G4double aPhotonMomentum);
void RemoveEntry(const char *key, G4double aPhotonEnergy);
// Remove an entry from the table for a given key and x-value.
void DumpTable();
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MaterialPropertyVector.hh,v 1.10 2006/06/29 19:11:17 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MaterialPropertyVector.hh,v 1.11 2008/06/05 23:37:37 gum Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@
//
// File: G4MaterialPropertyVector.hh
//
// Description: A one-to-one mapping from Photon Momentum to some
// Description: A one-to-one mapping from Photon Energy to some
// optical property
// Version: 1.0
// Created: 1996-02-08
@@ -58,7 +58,7 @@
#include <functional>
// Class Description:
// A one-to-one mapping from Photon Momentum to some optical property.
// A one-to-one mapping from Photon Energy to some optical property.
// Class Description - End:
/////////////////////
@@ -95,7 +95,7 @@ public: // Without description
public: // With description
G4MaterialPropertyVector(G4double *PhotonMomenta,
G4MaterialPropertyVector(G4double *PhotonEnergies,
G4double *PropertyValues,
G4int NumElements);
// Constructor of G4MaterialPropertyVector object.
@@ -118,15 +118,15 @@ public: // With description
void ResetIterator();
void AddElement(G4double aPhotonMomentum,
void AddElement(G4double aPhotonEnergy,
G4double aPropertyValue);
// Add a new element (pair of numbers) to the G4MaterialPropertyVector.
void RemoveElement(G4double aPhotonMomentum);
void RemoveElement(G4double aPhotonEnergy);
// Remove the element with given x-value.
G4double GetProperty(G4double aPhotonMomentum) const;
G4double GetProperty(G4double aPhotonEnergy) const;
// Returns the y-value for given x-value (with interpolation).
G4double GetPhotonMomentum(G4double aProperty) const;
G4double GetPhotonEnergy(G4double aProperty) const;
// Returns the x-value for given y-value (with interpolation).
// NOTE: Assumes that the y-value is an increasing function of
// the x-value. Returns the x-value corresponding to the
@@ -134,15 +134,15 @@ public: // With description
// the y-value passed in, the method returns the first
// x-value in the vector that corresponds to that value.
// For use with G4MaterialPropertyVector iterator: return
// property (or Photon momentum) at current point of iterator.
// property (or Photon Energy) at current point of iterator.
G4double GetProperty() const;
G4double GetPhotonMomentum() const;
G4double GetPhotonEnergy() const;
G4double GetMaxProperty() const;
G4double GetMinProperty() const;
G4double GetMaxPhotonMomentum() const;
G4double GetMinPhotonMomentum() const;
G4double GetMaxPhotonEnergy() const;
G4double GetMinPhotonEnergy() const;
//////////
// Tests
@@ -158,7 +158,7 @@ private:
G4MPVEntry GetEntry(G4int i) const;
void GetAdjacentBins(G4double aPhotonMomentum,
void GetAdjacentBins(G4double aPhotonEnergy,
G4int *left,G4int *right) const;
/////////////////////////
@@ -187,15 +187,15 @@ G4double G4MaterialPropertyVector::GetMinProperty() const
}
inline
G4double G4MaterialPropertyVector::GetMaxPhotonMomentum() const
G4double G4MaterialPropertyVector::GetMaxPhotonEnergy() const
{
return MPV.back()->GetPhotonMomentum();
return MPV.back()->GetPhotonEnergy();
}
inline
G4double G4MaterialPropertyVector::GetMinPhotonMomentum() const
G4double G4MaterialPropertyVector::GetMinPhotonEnergy() const
{
return MPV.front()->GetPhotonMomentum();
return MPV.front()->GetPhotonEnergy();
}
#endif /* G4MaterialPropertyVector_h */
@@ -0,0 +1,211 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: G4MaterialStoppingICRU73.hh,v 1.3 2008/11/02 12:22:19 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4MaterialStoppingICRU73_h
#define G4MaterialStoppingICRU73_h 1
//---------------------------------------------------------------------------
//
// ClassName: G4MaterialStoppingICRU73
//
// Description: Data on stopping powers for light ions in compounds
//
// Author: A.Ivantchenko 10.07.2008
//
// Modifications:
//
//----------------------------------------------------------------------------
//
// Class Description:
//
// Data on Stopping Powers from the ICRU73 report
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4LPhysicsFreeVector.hh"
#include <vector>
class G4MaterialStoppingICRU73
{
public:
G4MaterialStoppingICRU73(G4bool splineFlag = true);
~G4MaterialStoppingICRU73();
G4double GetDEDX(G4int ionZ, G4int idxMaterial, G4double kinEnergy);
inline G4double GetDEDX(G4int ionZ, const G4String& NameMaterial,
G4double kinEnergy);
inline G4int GetMaterialIndex(const G4String& NameMaterial);
// Function returns an unique index (>=0) for each ion-material couple (the
// return value is -1 if the couple is not found):
inline G4int GetIonMaterialCoupleIndex(
G4int atomicNumber, // Atomic number of ion
const G4String& materialName); // Material name
inline G4double GetDensity(G4int idxMaterial);
inline G4String GetMaterialName(G4int idxMaterial);
inline G4PhysicsVector* GetPhysicsVector(G4int ionZ, G4int idxMaterial);
inline G4PhysicsVector* GetPhysicsVector(G4int ionZ,
const G4String& NameMaterial);
inline G4double GetLowerEnergyBoundary();
inline G4double GetUpperEnergyBoundary();
private:
void Initialise();
void AddData(G4double* energy, G4double* stoppower, G4double factor);
// hide assignment operator
G4MaterialStoppingICRU73 & operator=(const G4MaterialStoppingICRU73 &right);
G4MaterialStoppingICRU73(const G4MaterialStoppingICRU73&);
G4bool spline;
G4int Z[16];
G4double A[16];
G4String MatName[31];
G4double Density[31];
// Lower and upper energy boundaries for dE/dx vectors:
G4double lowerEnergyBoundary;
G4double upperEnergyBoundary;
std::vector<G4LPhysicsFreeVector*> dedx;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4MaterialStoppingICRU73::GetDEDX(G4int ionZ, const G4String& NameMaterial,
G4double kinEnergy)
{
return GetDEDX(ionZ, GetMaterialIndex(NameMaterial), kinEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4int
G4MaterialStoppingICRU73::GetMaterialIndex(const G4String& NameMaterial)
{
G4int idx = -1;
for (G4int i=0; i<25; i++){
if(MatName[i] == NameMaterial) {
idx = i;
break;
}
}
return idx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4int
G4MaterialStoppingICRU73::GetIonMaterialCoupleIndex(
G4int atomicNumber,
const G4String& materialName)
{
G4int idx = -1;
if(atomicNumber >= 3 && atomicNumber <= 18) {
G4int materialIndex = GetMaterialIndex(materialName);
if(materialIndex >= 0) idx = materialIndex * 16 + atomicNumber - 3;
}
return idx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4MaterialStoppingICRU73::GetDensity(G4int idxMaterial)
{
G4double d = 0.0;
if( idxMaterial >= 0 && idxMaterial <= 24) d = Density[idxMaterial];
return d;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4String G4MaterialStoppingICRU73::GetMaterialName(G4int idxMaterial)
{
G4String s = "";
if( idxMaterial >= 0 && idxMaterial <= 24) s = MatName[idxMaterial];
return s;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4PhysicsVector*
G4MaterialStoppingICRU73::GetPhysicsVector(G4int ionZ, G4int idxMaterial)
{
G4PhysicsVector* v = 0;
if(ionZ >= 3 && ionZ <= 18 && idxMaterial >= 0 && idxMaterial <= 24) {
v = dedx[idxMaterial*16 + ionZ - 3];
}
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4PhysicsVector*
G4MaterialStoppingICRU73::GetPhysicsVector(G4int ionZ,
const G4String& NameMaterial)
{
return GetPhysicsVector(ionZ, GetMaterialIndex(NameMaterial));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4MaterialStoppingICRU73::GetLowerEnergyBoundary() {
return lowerEnergyBoundary;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4MaterialStoppingICRU73::GetUpperEnergyBoundary() {
return upperEnergyBoundary;
}
#endif
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4MaterialTable.hh,v 1.6 2006/06/29 19:11:19 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ------------------------------------------------------------
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NistElementBuilder.hh,v 1.13 2007/07/26 18:52:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4NistElementBuilder.hh,v 1.18 2008/08/07 10:15:16 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4NistElementBuilder_h
#define G4NistElementBuilder_h 1
@@ -40,9 +40,11 @@
//
// Modifications:
// 27.02.06 V.Ivanchenko Return m=0 if Z&N combination is out of NIST
// 27.02.06 V.Ivanchneko add GetAtomicMassAmu
// 17.10.06 V.Ivanchneko add GetAtomicMass and GetNistElementNames methods
// 02.05.07 V.Ivanchneko add GetNistFirstIsotopeN and GetNumberOfNistIsotopes
// 27.02.06 V.Ivanchenko add GetAtomicMassAmu
// 17.10.06 V.Ivanchenko add GetAtomicMass and GetNistElementNames methods
// 02.05.07 V.Ivanchenko add GetNistFirstIsotopeN and GetNumberOfNistIsotopes
// 06.08.08 V.Ivanchenko add binding energy parameterisation and use isotope
// mass in G4 units
//
//----------------------------------------------------------------------------
//
@@ -54,7 +56,6 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4AtomicShells.hh"
#include <vector>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -67,23 +68,12 @@ class G4Element;
class G4NistElementBuilder
{
public:
G4NistElementBuilder(G4int vb);
~G4NistElementBuilder();
G4int GetZ (const G4String& symb);
G4double GetA (G4int Z);
G4double GetIsotopeMass (G4int Z, G4int N);
G4double GetAtomicMass (G4int Z, G4int N);
G4double GetIsotopeAbundance (G4int Z, G4int N);
G4int GetNistFirstIsotopeN(G4int Z);
G4int GetNumberOfNistIsotopes(G4int Z);
G4int GetMaxNumElements();
void SetVerbose (G4int);
void PrintElement (G4int Z);
// Get atomic number by element symbol
G4int GetZ(const G4String& symb);
// Find or build a G4Element by atomic number
G4Element* FindOrBuildElement (G4int Z, G4bool buildIsotopes = true);
@@ -91,32 +81,65 @@ public:
// Find or build a G4Element by symbol
G4Element* FindOrBuildElement (const G4String& symb,
G4bool buildIsotopes = true);
// print element information
void PrintElement (G4int Z);
// Return reference to vector of element names
// Access to the vector of Geant4 predefined element names
const std::vector<G4String>& GetElementNames() const;
// Get the mass of the element in amu for the natuaral isotope composition
// with electron shell
inline G4double GetA (G4int Z);
// Get the mass of the isotope in G4 units (without electron shell)
inline G4double GetIsotopeMass (G4int Z, G4int N);
// Get the atomic mass of the isotope in G4 units (with electron shell)
inline G4double GetAtomicMass (G4int Z, G4int N);
// Get total ionisation energy of an atom
inline G4double GetTotalElectronBindingEnergy(G4int Z) const;
// Get natural isotope abandance
inline G4double GetIsotopeAbundance (G4int Z, G4int N);
// Get N for the first natural isotope
inline G4int GetNistFirstIsotopeN(G4int Z);
// Get number of natural isotopes
inline G4int GetNumberOfNistIsotopes(G4int Z);
inline G4int GetMaxNumElements();
inline void SetVerbose (G4int);
private:
void Initialise();
void AddElement(const G4String& symbol, G4int Z, G4int nc, const G4int& N,
const G4double& A, const G4double& sA, const G4double& W);
// 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)
void AddElement(const G4String& symbol, G4int Z, G4int NumberOfIsotopes,
const G4int& N, const G4double& A, const G4double& sigmaA,
const G4double& W);
// Build a G4Element from dataBase
// Build a G4Element from the G4 dataBase
G4Element* BuildElement(G4int Z, G4bool buildIsotopes);
private:
G4String elmSymbol [maxNumElements];
G4double atomicMass [maxNumElements];
G4double atomicMass [maxNumElements]; // amu
G4double bindingEnergy [maxNumElements];
G4int nIsotopes [maxNumElements];
G4int nFirstIsotope [maxNumElements];
G4int idxIsotopes [maxNumElements];
G4int elmIndex [maxNumElements];
G4double massIsotopes [maxAbundance];
G4double sigMass [maxAbundance];
G4double massIsotopes [maxAbundance]; // G4 units
G4double sigMass [maxAbundance]; // G4 units
G4double relAbundance [maxAbundance];
G4int limitNumElements; // protection
@@ -125,21 +148,11 @@ private:
G4bool first;
std::vector<G4String> elmNames;
G4AtomicShells aShell;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4int G4NistElementBuilder::GetZ(const G4String& name)
{
G4int Z = maxNumElements;
do {Z--;} while( Z>0 && elmSymbol[Z] != name);
return Z;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistElementBuilder::GetA(G4int Z)
{
G4double a = 0.0;
@@ -153,9 +166,7 @@ inline G4double G4NistElementBuilder::GetIsotopeMass(G4int Z, G4int N)
{
G4double m = 0.0;
G4int i = N - nFirstIsotope[Z];
if(i >= 0 && i <nIsotopes[Z])
m = massIsotopes[i + idxIsotopes[Z]]*amu_c2
- Z*electron_mass_c2 + aShell.GetTotalBindingEnergy(Z);
if(i >= 0 && i <nIsotopes[Z]) {m = massIsotopes[i + idxIsotopes[Z]];}
return m;
}
@@ -165,18 +176,28 @@ inline G4double G4NistElementBuilder::GetAtomicMass(G4int Z, G4int N)
{
G4double m = 0.0;
G4int i = N - nFirstIsotope[Z];
if(i >= 0 && i <nIsotopes[Z])
m = massIsotopes[i + idxIsotopes[Z]]*amu_c2;
if(i >= 0 && i <nIsotopes[Z]) {
m = massIsotopes[i + idxIsotopes[Z]] + Z*electron_mass_c2 - bindingEnergy[Z];
}
return m;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4NistElementBuilder::GetTotalElectronBindingEnergy(G4int Z) const
{
return bindingEnergy[Z];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistElementBuilder::GetIsotopeAbundance(G4int Z, G4int N)
{
G4double x = 0.0;
G4int i = N - nFirstIsotope[Z];
if(i >= 0 && i <nIsotopes[Z]) x = relAbundance[i + idxIsotopes[Z]];
if(i >= 0 && i <nIsotopes[Z]) {x = relAbundance[i + idxIsotopes[Z]];}
return x;
}
+155 -43
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NistManager.hh,v 1.17 2007/12/11 13:32:08 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4NistManager.hh,v 1.23 2008/08/07 10:15:16 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// -------------------------------------------------------------------
@@ -83,51 +83,83 @@ public:
static G4NistManager* Instance();
~G4NistManager();
// Elements
// Get G4Element by index
//
inline G4Element* GetElement(size_t index);
// Find or build G4Element by atomic number
//
inline G4Element* FindOrBuildElement(G4int Z, G4bool isotopes=true);
// Find or build G4Element by symbol
//
inline G4Element* FindOrBuildElement(const G4String& symb,
G4bool isotopes=true);
inline size_t GetNumberOfElements() const;
inline G4int GetZ(const G4String& symb) const;
// Get number of elements
//
inline size_t GetNumberOfElements() const;
// Mass in amu
// Get atomic number by element symbol
//
inline G4int GetZ(const G4String& symb) const;
// Get the mass of the element in amu for the natuaral isotope composition
// with electron shell
//
inline G4double GetAtomicMassAmu(G4int Z) const;
// Mass in Geant4 units
// Get mass of the isotope in Geant4 units without electron shell
//
inline G4double GetIsotopeMass(G4int Z, G4int N) const;
// Get mass of the isotope in Geant4 units with electron shell
//
inline G4double GetAtomicMass(G4int Z, G4int N) const;
// Number of isotopes
inline G4int GetNistFirstIsotopeN(G4int Z) const;
inline G4int GetNumberOfNistIsotopes(G4int Z) const;
// Get total ionisation energy of an atom
//
inline G4double GetTotalElectronBindingEnergy(G4int Z) const;
// Get N for the first natural isotope
//
inline G4int GetNistFirstIsotopeN(G4int Z) const;
// Get number of natural isotopes
//
inline G4int GetNumberOfNistIsotopes(G4int Z) const;
// Get natural isotope abandance
//
inline G4double GetIsotopeAbundance(G4int Z, G4int N) const;
// Print element by Z
//
inline void PrintElement(G4int Z);
// Print element from internal DB by symbol, if "all" - print all elements
//
void PrintElement(const G4String&);
// Print G4Element by name, if "all" - print all G4Elements
//
void PrintG4Element(const G4String&);
// Access to the vector of Geant4 predefined element names
//
inline const std::vector<G4String>& GetNistElementNames() const;
// Materials
// Get G4Material by index
//
inline G4Material* GetMaterial(size_t index);
// Find or build a G4Material by name, from the dataBase
// Find or build a G4Material by name, from the Geant4 dataBase
//
inline G4Material* FindOrBuildMaterial(const G4String& name,
G4bool isotopes=true,
G4bool warning=false);
// construct a G4Material from scratch by atome count
// Construct a G4Material from scratch by atome count
//
inline G4Material* ConstructNewMaterial(
const G4String& name,
@@ -139,7 +171,7 @@ public:
G4double temp = STP_Temperature,
G4double pressure = STP_Pressure);
// construct a G4Material from scratch by fraction mass
// Construct a G4Material from scratch by fraction mass
//
inline G4Material* ConstructNewMaterial(
const G4String& name,
@@ -151,7 +183,7 @@ public:
G4double temp = STP_Temperature,
G4double pressure = STP_Pressure);
// construct a gas G4Material from scratch by atome count
// Construct a gas G4Material from scratch by atome count
//
inline G4Material* ConstructNewGasMaterial(const G4String& name,
const G4String& nameNist,
@@ -159,29 +191,57 @@ public:
G4double pres,
G4bool isotopes=true);
// Get number of G4Materials
//
inline size_t GetNumberOfMaterials();
inline G4int GetVerbose();
void SetVerbose(G4int);
// Print G4Material by name
//
void PrintG4Material(const G4String&);
// Print predefined Geant4 materials:
// "simple" - only pure materials in basic state (Z = 1, ..., 98)
// "compound" - NIST compounds
// "hep" - HEP materials and compounds
// "all" - all
//
inline void ListMaterials(const G4String&);
// Access to the list of names of Geant4 predefined materials
//
inline const std::vector<G4String>& GetNistMaterialNames() const;
G4double GetZ13(G4double Z);
// Fast computation of Z^1/3
//
inline G4double GetZ13(G4double Z);
inline G4double GetZ13(G4int Z);
G4double GetLOGA(G4double A);
// Fast computation of A^0.27 for natuaral abandances
//
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();
static G4NistManager* instance;
static G4double POWERZ13[256];
static G4double LOGA[256];
G4double POWERZ13[256];
G4double LOGA[256];
G4double POWERA27[101];
G4double LOGAZ[101];
std::vector<G4Element*> elements;
std::vector<G4Material*> materials;
@@ -200,16 +260,14 @@ private:
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
size_t G4NistManager::GetNumberOfMaterials()
inline size_t G4NistManager::GetNumberOfMaterials()
{
return nMaterials;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4Element* G4NistManager::GetElement(size_t index)
inline G4Element* G4NistManager::GetElement(size_t index)
{
G4Element* elm = 0;
const G4ElementTable* theElementTable = G4Element::GetElementTable();
@@ -236,24 +294,21 @@ G4Element* G4NistManager::FindOrBuildElement(const G4String& symb,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
size_t G4NistManager::GetNumberOfElements() const
inline size_t G4NistManager::GetNumberOfElements() const
{
return nElements;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4int G4NistManager::GetZ(const G4String& symb) const
inline G4int G4NistManager::GetZ(const G4String& symb) const
{
return elmBuilder->GetZ(symb);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4NistManager::GetAtomicMassAmu(G4int Z) const
inline G4double G4NistManager::GetAtomicMassAmu(G4int Z) const
{
return elmBuilder->GetA(Z);
}
@@ -276,6 +331,14 @@ G4double G4NistManager::GetAtomicMass(G4int Z, G4int N) const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4NistManager::GetTotalElectronBindingEnergy(G4int Z) const
{
return elmBuilder->GetTotalElectronBindingEnergy(Z);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4NistManager::GetIsotopeAbundance(G4int Z, G4int N) const
{
@@ -308,16 +371,14 @@ const std::vector<G4String>& G4NistManager::GetNistElementNames() const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4NistManager::PrintElement(G4int Z)
inline void G4NistManager::PrintElement(G4int Z)
{
elmBuilder->PrintElement(Z);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4Material* G4NistManager::GetMaterial(size_t index)
inline G4Material* G4NistManager::GetMaterial(size_t index)
{
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4Material* mat = 0;
@@ -327,8 +388,7 @@ G4Material* G4NistManager::GetMaterial(size_t index)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4int G4NistManager::GetVerbose()
inline G4int G4NistManager::GetVerbose()
{
return verbose;
}
@@ -345,8 +405,7 @@ G4Material* G4NistManager::FindOrBuildMaterial(const G4String& name,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4Material* G4NistManager::ConstructNewMaterial(
inline G4Material* G4NistManager::ConstructNewMaterial(
const G4String& name,
const std::vector<G4String>& elm,
const std::vector<G4int>& nbAtoms,
@@ -363,8 +422,7 @@ G4Material* G4NistManager::ConstructNewMaterial(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4Material* G4NistManager::ConstructNewMaterial(
inline G4Material* G4NistManager::ConstructNewMaterial(
const G4String& name,
const std::vector<G4String>& elm,
const std::vector<G4double>& w,
@@ -379,8 +437,7 @@ G4Material* G4NistManager::ConstructNewMaterial(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4Material* G4NistManager::ConstructNewGasMaterial(
inline G4Material* G4NistManager::ConstructNewGasMaterial(
const G4String& name,
const G4String& nameNist,
G4double temp, G4double pres,
@@ -392,8 +449,7 @@ G4Material* G4NistManager::ConstructNewGasMaterial(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4NistManager::ListMaterials(const G4String& list)
inline void G4NistManager::ListMaterials(const G4String& list)
{
matBuilder->ListMaterials(list);
}
@@ -408,5 +464,61 @@ const std::vector<G4String>& G4NistManager::GetNistMaterialNames() const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistManager::GetZ13(G4double Z)
{
G4int iz = G4int(Z);
G4double x = (Z - G4double(iz))/(3.0*Z);
if(iz > 255) iz = 255;
else if(iz < 0) iz = 0;
return POWERZ13[iz]*(1.0 + x);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistManager::GetZ13(G4int Z)
{
return POWERZ13[Z];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistManager::GetA27(G4int Z)
{
G4double res = 0.0;
if(Z < 101) res = POWERA27[Z];
return res;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistManager::GetLOGZ(G4int Z)
{
G4double res = 0.0;
if(Z < 256) res = LOGA[Z];
return res;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4NistManager::GetLOGA(G4double A)
{
G4int ia = G4int(A);
G4double x = (A - G4double(ia))/A;
if(ia > 255) ia = 255;
else if(ia < 0) ia = 0;
return LOGA[ia] + x*(1.0 - 0.5*x);
}
//....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,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NistMaterialBuilder.hh,v 1.12 2007/10/30 10:05:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4NistMaterialBuilder.hh,v 1.13 2008/04/28 08:51:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4NistMaterialBuilder_h
#define G4NistMaterialBuilder_h 1
@@ -107,12 +107,26 @@ public:
G4double temp, G4double pres,
G4bool isotopes=true);
// verbosity level defined by G4NistManager
//
void SetVerbose(G4int val);
// cout predefined materials:
// "simple" - only pure materials in basic state (Z = 1, ..., 98)
// "compound" - NIST compounds
// "hep" - HEP materials and compounds
// "all" - all
//
void ListMaterials(const G4String&);
// cout lists of predefined materials
//
void ListNistSimpleMaterials();
void ListNistCompoundMaterials();
void ListHepMaterials();
// access to the list of names of Geant4 predefined materials
//
const std::vector<G4String>& GetMaterialNames() const;
private:
@@ -122,6 +136,9 @@ private:
void NistCompoundMaterials();
void HepAndNuclearMaterials();
// add parameters of material from NIST DB to internal vectors
// density in g/cm3, mean ionisation potential in eV
//
void AddMaterial(const G4String& nameMat, G4double dens, G4int Z=0,
G4double pot=0.0, G4int ncomp=1,
G4State=kStateSolid,
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4NistMessenger.hh,v 1.4 2007/05/02 10:48:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// File name: G4NistMessenger
//
+19 -18
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4OpticalSurface.hh,v 1.8 2006/06/29 19:12:31 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4OpticalSurface.hh,v 1.11 2008/12/11 10:23:54 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -83,22 +83,10 @@ class G4MaterialPropertiesTable;
class G4OpticalSurface : public G4SurfaceProperty
{
public: // Without description
//////////////
// Operators
//////////////
G4OpticalSurface(const G4OpticalSurface &right);
const G4OpticalSurface & operator=(const G4OpticalSurface &right);
G4int operator==(const G4OpticalSurface &right) const;
G4int operator!=(const G4OpticalSurface &right) const;
public: // With description
////////////////////////////////
// Constructors and Destructor
// Constructor
////////////////////////////////
G4OpticalSurface(const G4String& name,
@@ -110,14 +98,27 @@ public: // With description
public: // Without description
~G4OpticalSurface();
//////////////
// Constructors and destructor
//////////////
G4OpticalSurface();
virtual ~G4OpticalSurface();
G4OpticalSurface(const G4OpticalSurface &right);
//////////////
// Operators
//////////////
const G4OpticalSurface & operator=(const G4OpticalSurface &right);
G4int operator==(const G4OpticalSurface &right) const;
G4int operator!=(const G4OpticalSurface &right) const;
////////////
// Methods
////////////
// public methods
public: // With description
G4OpticalSurfaceFinish GetFinish() const {return theFinish;};
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4SandiaTable.hh,v 1.21 2007/10/02 10:13:33 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
// class description
//
@@ -0,0 +1,212 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: G4SimpleMaterialStoppingICRU73.hh,v 1.3 2008/11/02 12:22:19 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4SimpleMaterialStoppingICRU73_h
#define G4SimpleMaterialStoppingICRU73_h 1
//---------------------------------------------------------------------------
//
// ClassName: G4SimpleMaterialStoppingICRU73
//
// Description: Data on stopping powers for light ions in compounds
//
// Author: A.Ivantchenko 10.07.2008
//
// Modifications:
//
//----------------------------------------------------------------------------
//
// Class Description:
//
// Data on Stopping Powers from the ICRU73 report
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4LPhysicsFreeVector.hh"
#include <vector>
class G4SimpleMaterialStoppingICRU73
{
public:
G4SimpleMaterialStoppingICRU73(G4bool splineFlag = true);
~G4SimpleMaterialStoppingICRU73();
G4double GetDEDX(G4int ionZ, G4int idxMaterial, G4double kinEnergy);
inline G4double GetDEDX(G4int ionZ, const G4String& NameMaterial,
G4double kinEnergy);
inline G4int GetMaterialIndex(const G4String& NameMaterial);
// Function returns an unique index (>=0) for each ion-material couple (the
// return value is -1 if the couple is not found):
inline G4int GetIonMaterialCoupleIndex(
G4int atomicNumber, // Atomic number of ion
const G4String& materialName); // Material name
inline G4double GetDensity(G4int idxMaterial);
inline G4String GetMaterialName(G4int idxMaterial);
inline G4PhysicsVector* GetPhysicsVector(G4int ionZ, G4int idxMaterial);
inline G4PhysicsVector* GetPhysicsVector(G4int ionZ,
const G4String& NameMaterial);
inline G4double GetLowerEnergyBoundary();
inline G4double GetUpperEnergyBoundary();
private:
void Initialise();
void AddData(G4double* energy, G4double* stoppower, G4double factor);
// hide assignment operator
G4SimpleMaterialStoppingICRU73 & operator=(const G4SimpleMaterialStoppingICRU73 &right);
G4SimpleMaterialStoppingICRU73(const G4SimpleMaterialStoppingICRU73&);
G4bool spline;
G4int Z[16];
G4double A[16];
G4String MatName[31];
G4double Density[31];
// Lower and upper energy boundaries for dE/dx vectors:
G4double lowerEnergyBoundary;
G4double upperEnergyBoundary;
std::vector<G4LPhysicsFreeVector*> dedx;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4SimpleMaterialStoppingICRU73::GetDEDX(G4int ionZ, const G4String& NameMaterial,
G4double kinEnergy)
{
return GetDEDX(ionZ, GetMaterialIndex(NameMaterial), kinEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4int
G4SimpleMaterialStoppingICRU73::GetMaterialIndex(const G4String& NameMaterial)
{
G4int idx = -1;
for (G4int i=0; i<25; i++){
if(MatName[i] == NameMaterial) {
idx = i;
break;
}
}
return idx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4int
G4SimpleMaterialStoppingICRU73::GetIonMaterialCoupleIndex(
G4int atomicNumber,
const G4String& materialName)
{
G4int idx = -1;
if(atomicNumber >= 3 && atomicNumber <= 18) {
G4int materialIndex = GetMaterialIndex(materialName);
if(materialIndex >= 0) idx = materialIndex * 16 + atomicNumber - 3;
}
return idx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4SimpleMaterialStoppingICRU73::GetDensity(G4int idxMaterial)
{
G4double d = 0.0;
if( idxMaterial >= 0 && idxMaterial <= 24) d = Density[idxMaterial];
return d;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4String G4SimpleMaterialStoppingICRU73::GetMaterialName(G4int idxMaterial)
{
G4String s = "";
if( idxMaterial >= 0 && idxMaterial <= 24) s = MatName[idxMaterial];
return s;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4PhysicsVector*
G4SimpleMaterialStoppingICRU73::GetPhysicsVector(G4int ionZ, G4int idxMaterial)
{
G4PhysicsVector* v = 0;
if(ionZ >= 3 && ionZ <= 18 && idxMaterial >= 0 && idxMaterial <= 24) {
v = dedx[idxMaterial*16 + ionZ - 3];
}
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4PhysicsVector*
G4SimpleMaterialStoppingICRU73::GetPhysicsVector(G4int ionZ,
const G4String& NameMaterial)
{
return GetPhysicsVector(ionZ, GetMaterialIndex(NameMaterial));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4SimpleMaterialStoppingICRU73::GetLowerEnergyBoundary() {
return lowerEnergyBoundary;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double
G4SimpleMaterialStoppingICRU73::GetUpperEnergyBoundary() {
return upperEnergyBoundary;
}
#endif
@@ -25,7 +25,7 @@
//
//
// $Id: G4StaticSandiaData.hh,v 1.7 2006/06/29 19:12:35 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
+6 -10
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SurfaceProperty.hh,v 1.4 2007/04/25 16:18:34 gum Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4SurfaceProperty.hh,v 1.8 2008/12/11 10:23:54 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -96,17 +96,13 @@ public: // With description
// Constructors and Destructor
////////////////////////////////
G4SurfaceProperty(const G4String& name,
G4SurfaceType type = x_ray)
: theName(name), theType(type)
{
theSurfacePropertyTable.push_back(this);
}
G4SurfaceProperty(const G4String& name, G4SurfaceType type = x_ray);
// Constructor of a X-ray optical surface object.
public: // Without description
~G4SurfaceProperty(){};
G4SurfaceProperty();
virtual ~G4SurfaceProperty();
////////////
// Methods
@@ -129,7 +125,7 @@ public: // With description
static void CleanSurfacePropertyTable();
static const G4SurfacePropertyTable* GetSurfacePropertyTable();
static size_t GetNumberOfSurfaceProperties();
static void DumpInfo();
static void DumpTableInfo();
// To handle the table of surface properties.
protected: