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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.1)


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