Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4NucleiPropertiesTheoreticalTableA.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4NucleiPropertiesTheoreticalTableA.cc 91885 2015-08-10 07:05:56Z gcosmo $
28 //
29 //
30 // ------------------------------------------------------------
31 // GEANT 4 class implementation file
32 //
33 // ------------------------------------------------------------
34 // Remove "theInstance" by H.Kurashige (12 Dec. 03)
35 
37 #include "G4PhysicalConstants.hh"
38 #include "G4SystemOfUnits.hh"
39 
40 // Determine the table index for a Nuclide with Z protons and A nucleons
41 G4int G4NucleiPropertiesTheoreticalTable::GetIndex(G4int Z, G4int A)
42 {
43 
44  if(A>339) {
45  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
46  "PART202",
47  EventMustBeAborted,"Nucleon number larger than 339");
48  } else if(A<16) {
49  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
50  "PART202",
51  EventMustBeAborted," Nucleon number smaller than 16");
52  } else if(Z>136) {
53  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
54  "PART202",
55  EventMustBeAborted, "Proton number larger than 136");
56  } else if(Z<8) {
57  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
58  "PART202",
59  EventMustBeAborted, "Proton number smaller than 8");
60  } else if(Z>A) {
61  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
62  "PART202",
63  EventMustBeAborted, "Nucleon number smaller than Z");
64  }
65 
66  for (G4int i = shortTable[Z-8]; i < shortTable[Z-8+1]; i++ ) {
67  if (indexArray[1][i] == A ) return i;
68  }
69 
70  return -1;
71 }
72 
73 
74 
75 G4double G4NucleiPropertiesTheoreticalTable::GetMassExcess(G4int Z, G4int A)
76 {
77  G4int i=GetIndex(Z, A);
78  if (i >= 0) {
79  return AtomicMassExcess[i]*MeV;
80  } else {
81  return 0.0;
82  }
83 }
84 
85 G4double G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(G4int Z, G4int A)
86 {
87  G4int i=GetIndex(Z, A);
88  if (i >= 0){
89  const G4double Mh = 7.289034*MeV; // hydrogen atom mass excess
90  const G4double Mn = 8.071431*MeV; // neutron mass excess
91  return G4double(Z)*Mh + G4double(A-Z)*Mn - AtomicMassExcess[i]*MeV;
92  } else {
93  return 0.0;
94  }
95 }
96 
97 
98 
99 G4double G4NucleiPropertiesTheoreticalTable::GetAtomicMass(G4int Z, G4int A)
100 {
101  G4int i=GetIndex(Z, A);
102  if (i >= 0) {
103  return AtomicMassExcess[i]*MeV + A*amu_c2;
104  } else {
105  return 0.0;
106  }
107 }
108 
109 
110 
111 G4double G4NucleiPropertiesTheoreticalTable::GetNuclearMass(G4int Z, G4int A)
112 {
113  G4int i=GetIndex(Z, A);
114  if (i >= 0) {
115  return GetAtomicMass(Z,A) - G4double(Z)*electron_mass_c2 + ElectronicBindingEnergy(Z);
116  } else {
117  return 0.0;
118  }
119 }
120 
121 G4double G4NucleiPropertiesTheoreticalTable::ElectronicBindingEnergy(G4int Z) {
122  const G4double ael = 1.433e-5*MeV; // electronic-binding constant
123  return ael*std::pow(G4double(Z),2.39);
124 }
125 
126 G4bool G4NucleiPropertiesTheoreticalTable::IsInTable(G4int Z, G4int A)
127 {
128  return (Z <= A && A >= 16 && A <= 339 && Z <= 136 && Z >= 8 && GetIndex(Z, A) >= 0);
129 }
130 
131 
132 
133 
134 
135 
136 
137 
int G4int
Definition: G4Types.hh:78
static constexpr double electron_mass_c2
double A(double temperature)
bool G4bool
Definition: G4Types.hh:79
static constexpr double amu_c2
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76