Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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$
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  G4int i = shortTable[Z-8];
67  while ( i < shortTable[Z-8+1] ) {
68  if (indexArray[1][i] != A ) i++;
69  else return i;
70  }
71 
72  return -1;
73 }
74 
75 
76 
77 G4double G4NucleiPropertiesTheoreticalTable::GetMassExcess(G4int Z, G4int A)
78 {
79  G4int i=GetIndex(Z, A);
80  if (i >= 0) {
81  return AtomicMassExcess[i]*MeV;
82  } else {
83  return 0.0;
84  }
85 }
86 
87 G4double G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(G4int Z, G4int A)
88 {
89  G4int i=GetIndex(Z, A);
90  if (i >= 0){
91  const G4double Mh = 7.289034*MeV; // hydrogen atom mass excess
92  const G4double Mn = 8.071431*MeV; // neutron mass excess
93  return G4double(Z)*Mh + G4double(A-Z)*Mn - AtomicMassExcess[i]*MeV;
94  } else {
95  return 0.0;
96  }
97 }
98 
99 
100 
101 G4double G4NucleiPropertiesTheoreticalTable::GetAtomicMass(G4int Z, G4int A)
102 {
103  G4int i=GetIndex(Z, A);
104  if (i >= 0) {
105  return AtomicMassExcess[i]*MeV + A*amu_c2;
106  } else {
107  return 0.0;
108  }
109 }
110 
111 
112 
113 G4double G4NucleiPropertiesTheoreticalTable::GetNuclearMass(G4int Z, G4int A)
114 {
115  G4int i=GetIndex(Z, A);
116  if (i >= 0) {
117  return GetAtomicMass(Z,A) - G4double(Z)*electron_mass_c2 + ElectronicBindingEnergy(Z);
118  } else {
119  return 0.0;
120  }
121 }
122 
123 G4double G4NucleiPropertiesTheoreticalTable::ElectronicBindingEnergy(G4int Z) {
124  const G4double ael = 1.433e-5*MeV; // electronic-binding constant
125  return ael*std::pow(G4double(Z),2.39);
126 }
127 
128 G4bool G4NucleiPropertiesTheoreticalTable::IsInTable(G4int Z, G4int A)
129 {
130  return (Z <= A && A >= 16 && A <= 339 && Z <= 136 && Z >= 8 && GetIndex(Z, A) >= 0);
131 }
132 
133 
134 
135 
136 
137 
138 
139