Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
+26 -9
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Element.cc,v 1.20 2005/04/01 12:41:11 maire Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Element.cc,v 1.22 2005/11/15 15:24:37 maire Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -44,7 +44,8 @@
// 13-09-01: suppression of the data member fIndexInTable
// 14-09-01: fCountUse: nb of materials which use this element
// 26-02-02: fIndexInTable renewed
// 30-03-05: warning in GetElement(elementName)
// 30-03-05: warning in GetElement(elementName)
// 15-11-05: GetElement(elementName, G4bool warning=true)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -59,7 +60,7 @@ G4ElementTable G4Element::theElementTable;
G4Element::G4Element(const G4String& name, const G4String& symbol,
G4double zeff, G4double aeff)
:fName(name),fSymbol(symbol)
: fName(name), fSymbol(symbol)
{
if (zeff<1.) G4Exception (" ERROR from G4Element::G4Element !"
" It is not allowed to create an Element with Z < 1" );
@@ -105,8 +106,9 @@ G4Element::G4Element(const G4String& name, const G4String& symbol,
// Constructor to Generate element from a List of 'nIsotopes' isotopes, added
// via AddIsotope
G4Element::G4Element(const G4String& name, const G4String& symbol, G4int nIsotopes)
:fName(name),fSymbol(symbol)
G4Element::G4Element(const G4String& name,
const G4String& symbol, G4int nIsotopes)
: fName(name),fSymbol(symbol)
{
InitializePointers();
@@ -190,6 +192,19 @@ void G4Element::InitializePointers()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Fake default constructor - sets only member data and allocates memory
// for usage restricted to object persistency
G4Element::G4Element( __void__& )
: fZeff(0), fNeff(0), fAeff(0), fNbOfAtomicShells(0),
fAtomicShells(0), fNumberOfIsotopes(0), theIsotopeVector(0),
fRelativeAbundanceVector(0), fCountUse(0), fIndexInTable(0),
fCoulomb(0), fRadTsai(0), fIonisation(0)
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Element::~G4Element()
{
if (fCountUse != 0)
@@ -256,7 +271,7 @@ void G4Element::ComputeLradTsaiFactor()
G4double Lrad, Lprad;
G4int iz = (int)(fZeff+0.5) - 1 ;
if (iz <= 3) { Lrad = Lrad_light[iz] ; Lprad = Lprad_light[iz] ; }
else { Lrad = std::log(184.15) - logZ3 ; Lprad = std::log(1194.) - 2*logZ3 ; }
else { Lrad = std::log(184.15) - logZ3 ; Lprad = std::log(1194.) - 2*logZ3;}
fRadTsai = 4*alpha_rcl2*fZeff*(fZeff*(Lrad-fCoulomb) + Lprad);
}
@@ -286,7 +301,7 @@ size_t G4Element::GetNumberOfElements()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Element* G4Element::GetElement(G4String elementName)
G4Element* G4Element::GetElement(G4String elementName, G4bool warning)
{
// search the element by its name
for (size_t J=0 ; J<theElementTable.size() ; J++)
@@ -296,9 +311,11 @@ G4Element* G4Element::GetElement(G4String elementName)
}
// the element does not exist in the table
if (warning) {
G4cout << "\n---> warning from G4Element::GetElement(). The element: "
<< elementName << " does not exist in the table. Return NULL pointer."
<< G4endl;
<< G4endl;
}
return 0;
}