Import Geant4 9.3.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Element.cc,v 1.31 2008/08/11 11:53:11 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Element.cc,v 1.34 2009/09/18 15:35:36 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -98,10 +98,14 @@ G4Element::G4Element(const G4String& name, const G4String& symbol,
|
||||
" Attempt to create an Element with N < Z !!!" );
|
||||
}
|
||||
|
||||
fNbOfAtomicShells = G4AtomicShells::GetNumberOfShells(iz);
|
||||
fAtomicShells = new G4double[fNbOfAtomicShells];
|
||||
for (G4int i=0;i<fNbOfAtomicShells;i++) {
|
||||
fNbOfAtomicShells = G4AtomicShells::GetNumberOfShells(iz);
|
||||
fAtomicShells = new G4double[fNbOfAtomicShells];
|
||||
fNbOfShellElectrons = new G4int[fNbOfAtomicShells];
|
||||
|
||||
for (G4int i=0;i<fNbOfAtomicShells;i++)
|
||||
{
|
||||
fAtomicShells[i] = G4AtomicShells::GetBindingEnergy(iz, i);
|
||||
fNbOfShellElectrons[i] = G4AtomicShells::GetNumberOfElectrons(iz, i);
|
||||
}
|
||||
ComputeDerivedQuantities();
|
||||
}
|
||||
@@ -171,10 +175,13 @@ void G4Element::AddIsotope(G4Isotope* isotope, G4double abundance)
|
||||
|
||||
fNbOfAtomicShells = G4AtomicShells::GetNumberOfShells(iz);
|
||||
fAtomicShells = new G4double[fNbOfAtomicShells];
|
||||
for (G4int j=0;j<fNbOfAtomicShells;j++) {
|
||||
fAtomicShells[j] = G4AtomicShells::GetBindingEnergy(iz, j);
|
||||
}
|
||||
|
||||
fNbOfShellElectrons = new G4int[fNbOfAtomicShells];
|
||||
|
||||
for ( G4int j = 0; j < fNbOfAtomicShells; j++ )
|
||||
{
|
||||
fAtomicShells[j] = G4AtomicShells::GetBindingEnergy(iz, j);
|
||||
fNbOfShellElectrons[j] = G4AtomicShells::GetNumberOfElectrons(iz, j);
|
||||
}
|
||||
ComputeDerivedQuantities();
|
||||
|
||||
}
|
||||
@@ -187,6 +194,7 @@ void G4Element::InitializePointers()
|
||||
theIsotopeVector = 0;
|
||||
fRelativeAbundanceVector = 0;
|
||||
fAtomicShells = 0;
|
||||
fNbOfShellElectrons = 0;
|
||||
fIonisation = 0;
|
||||
fNumberOfIsotopes = 0;
|
||||
fNaturalAbandances = false;
|
||||
@@ -199,7 +207,7 @@ void G4Element::InitializePointers()
|
||||
|
||||
G4Element::G4Element( __void__& )
|
||||
: fZeff(0), fNeff(0), fAeff(0), fNbOfAtomicShells(0),
|
||||
fAtomicShells(0), fNumberOfIsotopes(0), theIsotopeVector(0),
|
||||
fAtomicShells(0), fNbOfShellElectrons(0), fNumberOfIsotopes(0), theIsotopeVector(0),
|
||||
fRelativeAbundanceVector(0), fCountUse(0), fIndexInTable(0),
|
||||
fCoulomb(0), fRadTsai(0), fIonisation(0)
|
||||
{
|
||||
@@ -214,6 +222,7 @@ G4Element::~G4Element()
|
||||
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
|
||||
@@ -287,13 +296,24 @@ void G4Element::ComputeLradTsaiFactor()
|
||||
|
||||
G4double G4Element::GetAtomicShell(G4int i) const
|
||||
{
|
||||
if (i<0 || i>=fNbOfAtomicShells)
|
||||
G4Exception("Invalid argument in G4Element::GetAtomicShell");
|
||||
if (i<0 || i>=fNbOfAtomicShells) {
|
||||
G4Exception("Invalid argument in G4Element::GetAtomicShell");
|
||||
}
|
||||
return fAtomicShells[i];
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4int G4Element::GetNbOfShellElectrons(G4int i) const
|
||||
{
|
||||
if (i<0 || i>=fNbOfAtomicShells) {
|
||||
G4Exception("Invalid argument in G4Element::GetNbOfShellElectrons");
|
||||
}
|
||||
return fNbOfShellElectrons[i];
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
const G4ElementTable* G4Element::GetElementTable()
|
||||
{
|
||||
return &theElementTable;
|
||||
@@ -351,11 +371,18 @@ const G4Element& G4Element::operator=(const G4Element& right)
|
||||
fAeff = right.fAeff;
|
||||
|
||||
if (fAtomicShells) delete [] fAtomicShells;
|
||||
fNbOfAtomicShells = right.fNbOfAtomicShells;
|
||||
fNbOfAtomicShells = right.fNbOfAtomicShells;
|
||||
fAtomicShells = new G4double[fNbOfAtomicShells];
|
||||
for (G4int i=0;i<fNbOfAtomicShells;i++)
|
||||
fAtomicShells[i] = right.fAtomicShells[i];
|
||||
|
||||
|
||||
if (fNbOfShellElectrons) delete [] fNbOfShellElectrons;
|
||||
fNbOfAtomicShells = right.fNbOfAtomicShells;
|
||||
fNbOfShellElectrons = new G4int[fNbOfAtomicShells];
|
||||
|
||||
for ( G4int i = 0; i < fNbOfAtomicShells; i++ )
|
||||
{
|
||||
fAtomicShells[i] = right.fAtomicShells[i];
|
||||
fNbOfShellElectrons[i] = right.fNbOfShellElectrons[i];
|
||||
}
|
||||
if (theIsotopeVector) delete theIsotopeVector;
|
||||
if (fRelativeAbundanceVector) delete [] fRelativeAbundanceVector;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user