Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
+25 -13
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Element.cc,v 1.34 2009/09/18 15:35:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4Element.cc,v 1.36 2010/10/25 07:58:15 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -56,6 +56,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Element.hh"
#include "G4AtomicShells.hh"
#include <iomanip>
G4ElementTable G4Element::theElementTable;
@@ -137,13 +138,14 @@ void G4Element::AddIsotope(G4Isotope* isotope, G4double abundance)
G4cout << "G4Element ERROR: " << fName << G4endl;
G4Exception ("ERROR from G4Element::AddIsotope!"
" Trying to add an Isotope before contructing the element.");
return;
}
G4int iz = isotope->GetZ();
// filling ...
if ( fNumberOfIsotopes < theIsotopeVector->size() ) {
// check same Z
if (fNumberOfIsotopes==0) fZeff = G4double(iz);
if (fNumberOfIsotopes==0) { fZeff = G4double(iz); }
else if (G4double(iz) != fZeff) {
G4Exception ("ERROR from G4Element::AddIsotope!"
" Try to add isotopes with different Z");
@@ -198,6 +200,18 @@ void G4Element::InitializePointers()
fIonisation = 0;
fNumberOfIsotopes = 0;
fNaturalAbandances = false;
// add initialisation of all remaining members
fZeff = 0;
fNeff = 0;
fAeff = 0;
fNbOfAtomicShells = 0;
fCountUse = 0;
fIndexZ = 0;
fIndexInTable = 0;
fNaturalAbandances = false;
fCoulomb = 0.0;
fRadTsai = 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -206,11 +220,9 @@ void G4Element::InitializePointers()
// for usage restricted to object persistency
G4Element::G4Element( __void__& )
: fZeff(0), fNeff(0), fAeff(0), fNbOfAtomicShells(0),
fAtomicShells(0), fNbOfShellElectrons(0), fNumberOfIsotopes(0), theIsotopeVector(0),
fRelativeAbundanceVector(0), fCountUse(0), fIndexInTable(0),
fCoulomb(0), fRadTsai(0), fIonisation(0)
: fZeff(0), fNeff(0), fAeff(0)
{
InitializePointers();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -219,11 +231,11 @@ G4Element::~G4Element()
{
// G4cout << "### Destruction of element " << fName << " started" <<G4endl;
if (theIsotopeVector) delete theIsotopeVector;
if (fRelativeAbundanceVector) delete [] fRelativeAbundanceVector;
if (fAtomicShells) delete [] fAtomicShells;
if (fNbOfShellElectrons) delete [] fNbOfShellElectrons;
if (fIonisation) delete fIonisation;
if (theIsotopeVector) { delete theIsotopeVector; }
if (fRelativeAbundanceVector) { delete [] fRelativeAbundanceVector; }
if (fAtomicShells) { delete [] fAtomicShells; }
if (fNbOfShellElectrons) { delete [] fNbOfShellElectrons; }
if (fIonisation) { delete fIonisation; }
//remove this element from theElementTable
theElementTable[fIndexInTable] = 0;
@@ -252,7 +264,7 @@ void G4Element::ComputeDerivedQuantities()
ComputeLradTsaiFactor();
// parameters for energy loss by ionisation
if (fIonisation) delete fIonisation;
if (fIonisation) { delete fIonisation; }
fIonisation = new G4IonisParamElm(fZeff);
}