source: trunk/source/particles/management/src/G4NucleiPropertiesTheoreticalTableA.cc @ 1202

Last change on this file since 1202 was 1196, checked in by garnier, 15 years ago

update CVS release candidate geant4.9.3.01

File size: 4.5 KB
Line 
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,v 1.8 2006/06/29 19:25:46 gunter Exp $
28// GEANT4 tag $Name: geant4-09-03-cand-01 $
29//
30//
31// ------------------------------------------------------------
32//      GEANT 4 class implementation file
33//
34// ------------------------------------------------------------
35// Remove "theInstance"  by H.Kurashige (12 Dec. 03)
36
37#include "G4NucleiPropertiesTheoreticalTable.hh"
38
39// Determine the table index for a Nuclide with Z protons and A nucleons
40G4int G4NucleiPropertiesTheoreticalTable::GetIndex(G4int Z, G4int A) 
41{
42
43  if(A>339) {
44    G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
45                "Illegal arguemnt",
46                EventMustBeAborted,"Nucleon number larger than 339!");
47  } else if(A<16) {
48    G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
49                "Illegal arguemnt",
50                EventMustBeAborted," Nucleon number smaller than 16!"); 
51  } else if(Z>136) {
52    G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
53                "Illegal arguemnt",
54                EventMustBeAborted, "Proton number larger than 136!");
55  } else if(Z<8) {
56    G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
57                "Illegal arguemnt",
58                EventMustBeAborted, "Proton number smaller than 8!");
59  } else if(Z>A) {
60    G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
61                "Illegal arguemnt",
62                EventMustBeAborted, "Nucleon number smaller than Z!"); 
63  }
64 
65  G4int i = shortTable[Z-8];
66  while ( i < shortTable[Z-8+1] ) {
67    if (indexArray[1][i] != A ) i++;
68    else return i;
69  }
70 
71  return -1;
72}
73
74
75
76G4double G4NucleiPropertiesTheoreticalTable::GetMassExcess(G4int Z, G4int A) 
77{
78  G4int i=GetIndex(Z, A);
79  if (i >= 0) {
80    return AtomicMassExcess[i]*MeV;
81  } else {
82    return 0.0;
83  }
84}
85
86G4double G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(G4int Z, G4int A)
87{
88  G4int i=GetIndex(Z, A);
89  if (i >= 0){
90    const G4double Mh = 7.289034*MeV;  // hydrogen atom mass excess
91    const G4double Mn = 8.071431*MeV;  // neutron mass excess
92    return G4double(Z)*Mh + G4double(A-Z)*Mn - AtomicMassExcess[i]*MeV;
93  } else { 
94    return 0.0;
95  }
96}
97
98
99
100G4double  G4NucleiPropertiesTheoreticalTable::GetAtomicMass(G4int Z, G4int A)
101{
102  G4int i=GetIndex(Z, A);
103  if (i >= 0) {
104    return AtomicMassExcess[i]*MeV + A*amu_c2;
105    } else {
106      return 0.0;
107    }
108}
109
110
111
112G4double  G4NucleiPropertiesTheoreticalTable::GetNuclearMass(G4int Z, G4int A)
113{
114  G4int i=GetIndex(Z, A);
115  if (i >= 0) {
116    return GetAtomicMass(Z,A) - G4double(Z)*electron_mass_c2 + ElectronicBindingEnergy(Z);
117  } else {
118    return 0.0;
119  }
120}
121
122G4double G4NucleiPropertiesTheoreticalTable::ElectronicBindingEnergy(G4int Z) {
123  const G4double ael = 1.433e-5*MeV; // electronic-binding constant
124  return ael*std::pow(G4double(Z),2.39);
125}
126
127G4bool G4NucleiPropertiesTheoreticalTable::IsInTable(G4int Z, G4int A)
128{
129  return (Z <= A && A >= 16 && A <= 339 && Z <= 136 && Z >= 8 && GetIndex(Z, A) >= 0);
130}
131
132
133
134
135
136
137
138
Note: See TracBrowser for help on using the repository browser.