ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4NucleiPropertiesTheoreticalTableA.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4NucleiPropertiesTheoreticalTableA.cc
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 //
28 //
29 // ------------------------------------------------------------
30 // GEANT 4 class implementation file
31 //
32 // ------------------------------------------------------------
33 // Remove "theInstance" by H.Kurashige (12 Dec. 03)
34 
36 #include "G4PhysicalConstants.hh"
37 #include "G4SystemOfUnits.hh"
38 
39 // Determine the table index for a Nuclide with Z protons and A nucleons
41 {
42 
43  if(A>339) {
44  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
45  "PART202",
46  EventMustBeAborted,"Nucleon number larger than 339");
47  } else if(A<16) {
48  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
49  "PART202",
50  EventMustBeAborted," Nucleon number smaller than 16");
51  } else if(Z>136) {
52  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
53  "PART202",
54  EventMustBeAborted, "Proton number larger than 136");
55  } else if(Z<8) {
56  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
57  "PART202",
58  EventMustBeAborted, "Proton number smaller than 8");
59  } else if(Z>A) {
60  G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
61  "PART202",
62  EventMustBeAborted, "Nucleon number smaller than Z");
63  }
64 
65  for (G4int i = shortTable[Z-8]; i < shortTable[Z-8+1]; i++ ) {
66  if (indexArray[1][i] == A ) return i;
67  }
68 
69  return -1;
70 }
71 
72 
73 
75 {
76  G4int i=GetIndex(Z, A);
77  if (i >= 0) {
78  return AtomicMassExcess[i]*MeV;
79  } else {
80  return 0.0;
81  }
82 }
83 
85 {
86  G4int i=GetIndex(Z, A);
87  if (i >= 0){
88  const G4double Mh = 7.289034*MeV; // hydrogen atom mass excess
89  const G4double Mn = 8.071431*MeV; // neutron mass excess
90  return G4double(Z)*Mh + G4double(A-Z)*Mn - AtomicMassExcess[i]*MeV;
91  } else {
92  return 0.0;
93  }
94 }
95 
96 
97 
99 {
100  G4int i=GetIndex(Z, A);
101  if (i >= 0) {
102  return AtomicMassExcess[i]*MeV + A*amu_c2;
103  } else {
104  return 0.0;
105  }
106 }
107 
108 
109 
111 {
112  G4int i=GetIndex(Z, A);
113  if (i >= 0) {
115  } else {
116  return 0.0;
117  }
118 }
119 
121  const G4double ael = 1.433e-5*MeV; // electronic-binding constant
122  return ael*std::pow(G4double(Z),2.39);
123 }
124 
126 {
127  return (Z <= A && A >= 16 && A <= 339 && Z <= 136 && Z >= 8 && GetIndex(Z, A) >= 0);
128 }
129 
130 
131 
132 
133 
134 
135 
136