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] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /particles/management/src/G4NucleiPropertiesTheoreticalTableA.cc (Version 11.3.0) and /particles/management/src/G4NucleiPropertiesTheoreticalTableA.cc (Version 6.0)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
 26 // G4NucleiPropertiesTheoreticalTable          << 
 27 //                                                 23 //
 28 // Author: Tatsumi Koi, SLAC                   <<  24 // $Id: G4NucleiPropertiesTheoreticalTableA.cc,v 1.5 2003/05/19 17:10:25 kurasige Exp $
 29 // ------------------------------------------- <<  25 // GEANT4 tag $Name: geant4-06-00 $
                                                   >>  26 //
                                                   >>  27 // 
                                                   >>  28 // ------------------------------------------------------------
                                                   >>  29 //      GEANT 4 class implementation file
                                                   >>  30 //
                                                   >>  31 // ------------------------------------------------------------
 30                                                    32 
 31 #include "G4NucleiPropertiesTheoreticalTable.h     33 #include "G4NucleiPropertiesTheoreticalTable.hh"
 32 #include "G4PhysicalConstants.hh"              <<  34 
 33 #include "G4SystemOfUnits.hh"                  <<  35 
                                                   >>  36 
                                                   >>  37 G4int G4NucleiPropertiesTheoreticalTable::shortTable[G4NucleiPropertiesTheoreticalTable::shortTableSize];
                                                   >>  38 
                                                   >>  39 G4NucleiPropertiesTheoreticalTable G4NucleiPropertiesTheoreticalTable::theInstance(2.5);
                                                   >>  40 // Default constructor
                                                   >>  41 G4NucleiPropertiesTheoreticalTable::G4NucleiPropertiesTheoreticalTable(G4double )
                                                   >>  42 {
                                                   >>  43   G4int j = 0;
                                                   >>  44   
                                                   >>  45   for (G4int i = 0; i < G4NucleiPropertiesTheoreticalTable::nEntries; i++) {
                                                   >>  46     if (indexArray[0][i] > j+7) {
                                                   >>  47       shortTable[j++] = i;
                                                   >>  48     }
                                                   >>  49   }
                                                   >>  50   shortTable[G4NucleiPropertiesTheoreticalTable::shortTableSize-1] = 
                                                   >>  51                     G4NucleiPropertiesTheoreticalTable::nEntries;
                                                   >>  52 }
 34                                                    53 
 35 // Determine the table index for a Nuclide wit     54 // Determine the table index for a Nuclide with Z protons and A nucleons
 36 //                                             <<  55 G4int G4NucleiPropertiesTheoreticalTable::GetIndex(G4int Z, G4int A) 
 37 G4int G4NucleiPropertiesTheoreticalTable::GetI << 
 38 {                                                  56 {
 39   if (A > 339) {                               << 
 40     G4Exception("G4NucleiPropertiesTheoretical << 
 41                 "Nucleon number larger than 33 << 
 42   }                                            << 
 43   else if (A < 16) {                           << 
 44     G4Exception("G4NucleiPropertiesTheoretical << 
 45                 " Nucleon number smaller than  << 
 46   }                                            << 
 47   else if (Z > 136) {                          << 
 48     G4Exception("G4NucleiPropertiesTheoretical << 
 49                 "Proton number larger than 136 << 
 50   }                                            << 
 51   else if (Z < 8) {                            << 
 52     G4Exception("G4NucleiPropertiesTheoretical << 
 53                 "Proton number smaller than 8" << 
 54   }                                            << 
 55   else if (Z > A) {                            << 
 56     G4Exception("G4NucleiPropertiesTheoretical << 
 57                 "Nucleon number smaller than Z << 
 58   }                                            << 
 59                                                    57 
 60   for (G4int i = shortTable[Z - 8]; i < shortT <<  58   if(A>339) G4Exception(
 61     if (indexArray[1][i] == A) return i;       <<  59   "G4NucleiPropertiesTheoreticalTable::GetIndex : Nucleon number larger than 339!\n"); 
                                                   >>  60   if(A<16) G4Exception(
                                                   >>  61   "G4NucleiPropertiesTheoreticalTable::GetIndex : Nucleon number smaller than 16!\n"); 
                                                   >>  62   if(Z>136) G4Exception(
                                                   >>  63   "G4NucleiPropertiesTheoreticalTable::GetIndex : Proton number larger than 136!\n"); 
                                                   >>  64   if(Z<8) G4Exception(
                                                   >>  65   "G4NucleiPropertiesTheoreticalTable::GetIndex : Proton number smaller than 8!\n");  
                                                   >>  66   if(Z>A) G4Exception(
                                                   >>  67   "G4NucleiPropertiesTheoreticalTable::GetIndex : Nucleon number smaller than Z!\n"); 
                                                   >>  68   
                                                   >>  69   
                                                   >>  70   G4int i = shortTable[Z-8];
                                                   >>  71   while ( i < shortTable[Z-8+1] ) {
                                                   >>  72     if (indexArray[1][i] != A ) i++;
                                                   >>  73     else return i;
 62   }                                                74   }
 63                                                <<  75   
 64   return -1;                                       76   return -1;
 65 }                                                  77 }
 66                                                    78 
 67 G4double G4NucleiPropertiesTheoreticalTable::G <<  79 
                                                   >>  80 
                                                   >>  81 G4double G4NucleiPropertiesTheoreticalTable::GetMassExcess(G4int Z, G4int A) 
 68 {                                                  82 {
 69   G4int i = GetIndex(Z, A);                    <<  83   G4int i=GetIndex(Z, A);
 70   if (i >= 0) {                                    84   if (i >= 0) {
 71     return AtomicMassExcess[i] * MeV;          <<  85     return AtomicMassExcess[i]*MeV;
                                                   >>  86   } else {
                                                   >>  87     return 0.0;
 72   }                                                88   }
 73                                                << 
 74   return 0.0;                                  << 
 75 }                                                  89 }
 76                                                    90 
 77 G4double G4NucleiPropertiesTheoreticalTable::G     91 G4double G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(G4int Z, G4int A)
 78 {                                                  92 {
 79   G4int i = GetIndex(Z, A);                    <<  93   G4int i=GetIndex(Z, A);
 80   if (i >= 0) {                                <<  94   if (i >= 0){
 81     const G4double Mh = 7.289034 * MeV;  // hy <<  95     const G4double Mh = 7.289034*MeV;  // hydrogen atom mass excess
 82     const G4double Mn = 8.071431 * MeV;  // ne <<  96     const G4double Mn = 8.071431*MeV;  // neutron mass excess
 83     return G4double(Z) * Mh + G4double(A - Z)  <<  97     return G4double(Z)*Mh + G4double(A-Z)*Mn - AtomicMassExcess[i]*MeV;
                                                   >>  98   } else { 
                                                   >>  99     return 0.0;
 84   }                                               100   }
 85                                                << 
 86   return 0.0;                                  << 
 87 }                                                 101 }
 88                                                   102 
 89 G4double G4NucleiPropertiesTheoreticalTable::G << 103 
                                                   >> 104 
                                                   >> 105 G4double  G4NucleiPropertiesTheoreticalTable::GetAtomicMass(G4int Z, G4int A)
 90 {                                                 106 {
 91   G4int i = GetIndex(Z, A);                    << 107   G4int i=GetIndex(Z, A);
 92   if (i >= 0) {                                   108   if (i >= 0) {
 93     return AtomicMassExcess[i] * MeV + A * amu << 109     return AtomicMassExcess[i]*MeV + A*amu_c2;
 94   }                                            << 110     } else {
 95                                                << 111       return 0.0;
 96   return 0.0;                                  << 112     }
 97 }                                                 113 }
 98                                                   114 
 99 G4double G4NucleiPropertiesTheoreticalTable::G << 115 
                                                   >> 116 
                                                   >> 117 G4double  G4NucleiPropertiesTheoreticalTable::GetNuclearMass(G4int Z, G4int A)
100 {                                                 118 {
101   G4int i = GetIndex(Z, A);                    << 119   G4int i=GetIndex(Z, A);
102   if (i >= 0) {                                   120   if (i >= 0) {
103     return GetAtomicMass(Z, A) - G4double(Z) * << 121     return GetAtomicMass(Z,A) - G4double(Z)*electron_mass_c2 + ElectronicBindingEnergy(Z);
                                                   >> 122   } else {
                                                   >> 123     return 0.0;
104   }                                               124   }
105                                                << 
106   return 0.0;                                  << 
107 }                                                 125 }
108                                                   126 
109 G4double G4NucleiPropertiesTheoreticalTable::E << 127 G4double G4NucleiPropertiesTheoreticalTable::ElectronicBindingEnergy(G4int Z) {
110 {                                              << 128   const G4double ael = 1.433e-5*MeV; // electronic-binding constant
111   const G4double ael = 1.433e-5 * MeV;  // ele << 129   return ael*pow(G4double(Z),2.39);
112   return ael * std::pow(G4double(Z), 2.39);    << 
113 }                                                 130 }
114                                                   131 
115 G4bool G4NucleiPropertiesTheoreticalTable::IsI    132 G4bool G4NucleiPropertiesTheoreticalTable::IsInTable(G4int Z, G4int A)
116 {                                                 133 {
117   return (Z <= A && A >= 16 && A <= 339 && Z <    134   return (Z <= A && A >= 16 && A <= 339 && Z <= 136 && Z >= 8 && GetIndex(Z, A) >= 0);
118 }                                                 135 }
                                                   >> 136 
119                                                   137