Geant4-11
G4NucleiProperties.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// G4NucleiProperties class implementation
27//
28// Author: V.Lara, October 1998
29// History:
30// - 17.11.1998, H.Kurashige - Migrated into particles category
31// - 31.03.2009, T.Koi - Migrated to AME03
32// --------------------------------------------------------------------
33
34#include "G4NucleiProperties.hh"
35
38#include "G4ParticleTable.hh"
39
41#include "G4SystemOfUnits.hh"
42
49
51{
52 G4double mass =0.0;
53
54 if (std::fabs(A - G4int(A)) > 1.e-10)
55 {
56 mass = NuclearMass(A,Z);
57
58 }
59 else
60 {
61 // use mass table
62 G4int iZ = G4int(Z);
63 G4int iA = G4int(A);
64 mass =GetNuclearMass(iA,iZ);
65 }
66 return mass;
67}
68
69
71{
72 if (mass_proton <= 0.0 )
73 {
74 const G4ParticleDefinition * nucleus = nullptr;
75 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("neutron");
76 if (nucleus!=nullptr) mass_neutron = nucleus->GetPDGMass();
77
78 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("deuteron");
79 if (nucleus!=nullptr) mass_deuteron = nucleus->GetPDGMass();
80
82 if (nucleus!=nullptr) mass_triton = nucleus->GetPDGMass();
83
85 if (nucleus!=nullptr) mass_alpha = nucleus->GetPDGMass();
86
88 if (nucleus!=nullptr) mass_He3 = nucleus->GetPDGMass();
89
91 if (nucleus!=nullptr) mass_proton = nucleus->GetPDGMass();
92 }
93
94 if (A < 1 || Z < 0 || Z > A)
95 {
96#ifdef G4VERBOSE
97 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0)
98 {
99 G4cout << "G4NucleiProperties::GetNuclearMass: Wrong values for A = "
100 << A << " and Z = " << Z << G4endl;
101 }
102#endif
103 return 0.0;
104 }
105
106 G4double mass= -1.;
107 if ( (Z<=2) )
108 {
109 // light nuclei
110 if ( (Z==1)&&(A==1) ) {
111 mass = mass_proton;
112 } else if ( (Z==0)&&(A==1) ) {
113 mass = mass_neutron;
114 } else if ( (Z==1)&&(A==2) ) {
115 mass = mass_deuteron;
116 } else if ( (Z==1)&&(A==3) ) {
117 mass = mass_triton;
118 } else if ( (Z==2)&&(A==4) ) {
119 mass = mass_alpha;
120 } else if ( (Z==2)&&(A==3) ) {
121 mass = mass_He3;
122 }
123 }
124
125 if (mass < 0.)
126 {
128 // AME table
131 // Theoretical table
133 } else if ( Z == A ) {
134 mass = A*mass_proton;
135 } else if( 0 == Z ) {
136 mass = A*mass_neutron;
137 } else {
138 mass = NuclearMass(G4double(A),G4double(Z));
139 }
140 }
141
142 if (mass < 0.) mass = 0.0;
143 return mass;
144}
145
147{
148 G4int iA = G4int(A);
149 G4int iZ = G4int(Z);
150 return IsInStableTable(iA, iZ);
151}
152
154{
155 if (A < 1 || Z < 0 || Z > A)
156 {
157#ifdef G4VERBOSE
158 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0)
159 {
160 G4cout << "G4NucleiProperties::IsInStableTable: Wrong values for A = "
161 << A << " and Z = " << Z << G4endl;
162 }
163#endif
164 return false;
165 }
166
168}
169
171{
172 G4int iA = G4int(A);
173 G4int iZ = G4int(Z);
174 return GetMassExcess(iA,iZ);
175}
176
178{
179 if (A < 1 || Z < 0 || Z > A)
180 {
181#ifdef G4VERBOSE
182 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0)
183 {
184 G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = "
185 << A << " and Z = " << Z << G4endl;
186 }
187#endif
188 return 0.0;
189
190 }
191 else
192 {
193
195 // AME table
199 } else {
200 return MassExcess(A,Z);
201 }
202 }
203}
204
205
207{
208 if (A < 1 || Z < 0 || Z > A)
209 {
210#ifdef G4VERBOSE
211 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0)
212 {
213 G4cout << "G4NucleiProperties::GetAtomicMass: Wrong values for A = "
214 << A << " and Z = " << Z << G4endl;
215 }
216#endif
217 return 0.0;
218
219 }
220 else if (std::fabs(A - G4int(A)) > 1.e-10)
221 {
222 return AtomicMass(A,Z);
223 }
224 else
225 {
226 G4int iA = G4int(A);
227 G4int iZ = G4int(Z);
232 } else {
233 return AtomicMass(A,Z);
234 }
235 }
236}
237
240{
241 G4int iA = G4int(A);
242 G4int iZ = G4int(Z);
243 return GetBindingEnergy(iA,iZ);
244}
245
247{
248 if (A < 1 || Z < 0 || Z > A)
249 {
250#ifdef G4VERBOSE
251 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0)
252 {
253 G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = "
254 << A << " and Z = " << Z << G4endl;
255 }
256#endif
257 return 0.0;
258
259 }
260 else
261 {
266 }else {
267 return BindingEnergy(A,Z);
268 }
269 }
270}
271
273{
274 return GetAtomicMass(A,Z) - A*amu_c2;
275}
276
278{
279 G4double hydrogen_mass_excess;
280 G4double neutron_mass_excess;
281 hydrogen_mass_excess = G4NucleiPropertiesTableAME12::GetMassExcess(1,1);
282 neutron_mass_excess = G4NucleiPropertiesTableAME12::GetMassExcess(0,1);
283 G4double mass = (A-Z)*neutron_mass_excess
284 + Z*hydrogen_mass_excess - BindingEnergy(A,Z) + A*amu_c2;
285 return mass;
286}
287
289{
290 if (A < 1 || Z < 0 || Z > A)
291 {
292#ifdef G4VERBOSE
293 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0)
294 {
295 G4cout << "G4NucleiProperties::NuclearMass: Wrong values for A = "
296 << A << " and Z = " << Z << G4endl;
297 }
298#endif
299 return 0.0;
300 }
301
302 G4double mass = AtomicMass(A,Z);
303
304 // atomic mass is converted to nuclear mass according to
305 // formula in AME03 and 12
306 //
307 mass -= Z*electron_mass_c2;
308 mass += ( 14.4381*std::pow ( Z , 2.39 )
309 + 1.55468*1e-6*std::pow ( Z , 5.35 ) )*eV;
310
311 return mass;
312}
313
315{
316 //
317 // Weitzsaecker's Mass formula
318 //
319 G4int Npairing = G4int(A-Z)%2; // pairing
320 G4int Zpairing = G4int(Z)%2;
322 - 15.67*A // nuclear volume
323 + 17.23*std::pow(A,2./3.) // surface energy
324 + 93.15*((A/2.-Z)*(A/2.-Z))/A // asymmetry
325 + 0.6984523*Z*Z*std::pow(A,-1./3.); // coulomb
326 if( Npairing == Zpairing )
327 {
328 binding += (Npairing+Zpairing-1) * 12.0 / std::sqrt(A); // pairing
329 }
330
331 return -binding*MeV;
332}
static constexpr double eV
Definition: G4SIunits.hh:201
static constexpr double MeV
Definition: G4SIunits.hh:200
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4bool IsInTable(G4int Z, G4int A)
static G4double GetNuclearMass(G4int Z, G4int A)
static G4double GetAtomicMass(G4int Z, G4int A)
static G4double GetBindingEnergy(G4int Z, G4int A)
static G4double GetMassExcess(G4int Z, G4int A)
static G4double GetBindingEnergy(G4int Z, G4int A)
static G4ThreadLocal G4double mass_neutron
static G4ThreadLocal G4double mass_triton
static G4double GetMassExcess(const G4int A, const G4int Z)
static G4double MassExcess(G4double A, G4double Z)
static G4double GetAtomicMass(const G4double A, const G4double Z)
static G4ThreadLocal G4double mass_proton
static G4double NuclearMass(G4double A, G4double Z)
static G4ThreadLocal G4double mass_alpha
static G4bool IsInStableTable(const G4double A, const G4double Z)
static G4double GetBindingEnergy(const G4int A, const G4int Z)
static G4double BindingEnergy(G4double A, G4double Z)
static G4ThreadLocal G4double mass_He3
static G4double GetNuclearMass(const G4double A, const G4double Z)
static G4ThreadLocal G4double mass_deuteron
static G4double AtomicMass(G4double A, G4double Z)
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
float electron_mass_c2
Definition: hepunit.py:273
float amu_c2
Definition: hepunit.py:276
#define G4ThreadLocal
Definition: tls.hh:77