Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NucleiProperties.cc,v 1.6.4.2 2001/06/28 20:19:12 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NucleiProperties.cc,v 1.9 2001/10/16 08:16:21 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
@@ -204,3 +204,70 @@ G4double G4NucleiProperties::GetNuclearMass(const G4double A, const G4double Z)
// };
G4double G4NucleiProperties::GetMassExcess(const G4int A, const G4int Z)
{
if (A < 1 || Z < 0 || Z > A) {
G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = " << A
<< " and Z = " << Z << G4endl;
return 0.0;
} else {
if (G4NucleiPropertiesTable::IsInTable(Z,A)){
return G4NucleiPropertiesTable::GetMassExcess(Z,A);
} else if (G4NucleiPropertiesTheoreticalTable::IsInTable(Z,A)){
return G4NucleiPropertiesTheoreticalTable::GetMassExcess(Z,A);
} else {
return MassExcess(A,Z);
}
}
}
G4double G4NucleiProperties::GetAtomicMass(const G4double A, const G4double Z)
{
if (Z < 0 || Z > A) {
G4cout << "G4NucleiProperties::GetAtomicMass: Wrong values for A = " << A
<< " and Z = " << Z << G4endl; return 0.0;
} else if (abs(A - G4int(A)) > 1.e-10) {
return AtomicMass(A,Z);
} else {
if (G4NucleiPropertiesTable::IsInTable(Z,A)) {
return G4NucleiPropertiesTable::GetAtomicMass(Z,A);
} else if (G4NucleiPropertiesTheoreticalTable::IsInTable(Z,A)){
return G4NucleiPropertiesTheoreticalTable::GetAtomicMass(Z,A);
} else {
return AtomicMass(A,Z);
}
}
}
G4double G4NucleiProperties::GetBindingEnergy(const G4int A, const G4int Z)
{
if (A < 1 || Z < 0 || Z > A) {
G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = " << A
<< " and Z = " << Z << G4endl;
return 0.0;
} else {
if (G4NucleiPropertiesTable::IsInTable(Z,A)) {
return G4NucleiPropertiesTable::GetBindingEnergy(Z,A);
} else if (G4NucleiPropertiesTheoreticalTable::IsInTable(Z,A)) {
return G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(Z,A);
}else {
return BindingEnergy(A,Z);
}
}
}
G4double G4NucleiProperties::MassExcess(G4double A, G4double Z)
{
return GetAtomicMass(A,Z) - A*amu_c2;
}