Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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// G4NucleiPropertiesTheoreticalTable
27//
28// Author: Tatsumi Koi, SLAC
29// --------------------------------------------------------------------
30
33#include "G4SystemOfUnits.hh"
34
35// Determine the table index for a Nuclide with Z protons and A nucleons
36//
37G4int G4NucleiPropertiesTheoreticalTable::GetIndex(G4int Z, G4int A)
38{
39
40 if(A>339) {
41 G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
42 "PART202",
43 EventMustBeAborted,"Nucleon number larger than 339");
44 } else if(A<16) {
45 G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
46 "PART202",
47 EventMustBeAborted," Nucleon number smaller than 16");
48 } else if(Z>136) {
49 G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
50 "PART202",
51 EventMustBeAborted, "Proton number larger than 136");
52 } else if(Z<8) {
53 G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
54 "PART202",
55 EventMustBeAborted, "Proton number smaller than 8");
56 } else if(Z>A) {
57 G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
58 "PART202",
59 EventMustBeAborted, "Nucleon number smaller than Z");
60 }
61
62 for (G4int i = shortTable[Z-8]; i < shortTable[Z-8+1]; ++i )
63 {
64 if (indexArray[1][i] == A ) return i;
65 }
66
67 return -1;
68}
69
70G4double G4NucleiPropertiesTheoreticalTable::GetMassExcess(G4int Z, G4int A)
71{
72 G4int i=GetIndex(Z, A);
73 if (i >= 0)
74 {
75 return AtomicMassExcess[i]*MeV;
76 }
77 else
78 {
79 return 0.0;
80 }
81}
82
83G4double G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(G4int Z, G4int A)
84{
85 G4int i=GetIndex(Z, A);
86 if (i >= 0)
87 {
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 }
92 else
93 {
94 return 0.0;
95 }
96}
97
98G4double G4NucleiPropertiesTheoreticalTable::GetAtomicMass(G4int Z, G4int A)
99{
100 G4int i=GetIndex(Z, A);
101 if (i >= 0)
102 {
103 return AtomicMassExcess[i]*MeV + A*amu_c2;
104 }
105 else
106 {
107 return 0.0;
108 }
109}
110
111G4double G4NucleiPropertiesTheoreticalTable::GetNuclearMass(G4int Z, G4int A)
112{
113 G4int i=GetIndex(Z, A);
114 if (i >= 0)
115 {
116 return GetAtomicMass(Z,A)
117 - G4double(Z)*electron_mass_c2 + ElectronicBindingEnergy(Z);
118 }
119 else
120 {
121 return 0.0;
122 }
123}
124
125G4double G4NucleiPropertiesTheoreticalTable::ElectronicBindingEnergy(G4int Z)
126{
127 const G4double ael = 1.433e-5*MeV; // electronic-binding constant
128 return ael*std::pow(G4double(Z),2.39);
129}
130
131G4bool G4NucleiPropertiesTheoreticalTable::IsInTable(G4int Z, G4int A)
132{
133 return (Z <= A && A >= 16 && A <= 339 && Z <= 136
134 && Z >= 8 && GetIndex(Z, A) >= 0);
135}
double A(double temperature)
@ EventMustBeAborted
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85