G4NucleiPropertiesTheoreticalTableA.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 // ------------------------------------------------------------
00031 //      GEANT 4 class implementation file
00032 //
00033 // ------------------------------------------------------------
00034 // Remove "theInstance"  by H.Kurashige (12 Dec. 03)
00035 
00036 #include "G4NucleiPropertiesTheoreticalTable.hh"
00037 #include "G4PhysicalConstants.hh"
00038 #include "G4SystemOfUnits.hh"
00039 
00040 // Determine the table index for a Nuclide with Z protons and A nucleons
00041 G4int G4NucleiPropertiesTheoreticalTable::GetIndex(G4int Z, G4int A) 
00042 {
00043 
00044   if(A>339) {
00045     G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
00046                 "PART202",
00047                 EventMustBeAborted,"Nucleon number larger than 339");
00048   } else if(A<16) {
00049     G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
00050                 "PART202",
00051                 EventMustBeAborted," Nucleon number smaller than 16"); 
00052   } else if(Z>136) {
00053     G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
00054                 "PART202",
00055                 EventMustBeAborted, "Proton number larger than 136");
00056   } else if(Z<8) {
00057     G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
00058                 "PART202",
00059                 EventMustBeAborted, "Proton number smaller than 8");
00060   } else if(Z>A) {
00061     G4Exception("G4NucleiPropertiesTheoreticalTable::GetIndex",
00062                 "PART202",
00063                 EventMustBeAborted, "Nucleon number smaller than Z"); 
00064   }
00065   
00066   G4int i = shortTable[Z-8];
00067   while ( i < shortTable[Z-8+1] ) {
00068     if (indexArray[1][i] != A ) i++;
00069     else return i;
00070   }
00071   
00072   return -1;
00073 }
00074 
00075 
00076 
00077 G4double G4NucleiPropertiesTheoreticalTable::GetMassExcess(G4int Z, G4int A) 
00078 {
00079   G4int i=GetIndex(Z, A);
00080   if (i >= 0) {
00081     return AtomicMassExcess[i]*MeV;
00082   } else {
00083     return 0.0;
00084   }
00085 }
00086 
00087 G4double G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(G4int Z, G4int A)
00088 {
00089   G4int i=GetIndex(Z, A);
00090   if (i >= 0){
00091     const G4double Mh = 7.289034*MeV;  // hydrogen atom mass excess
00092     const G4double Mn = 8.071431*MeV;  // neutron mass excess
00093     return G4double(Z)*Mh + G4double(A-Z)*Mn - AtomicMassExcess[i]*MeV;
00094   } else { 
00095     return 0.0;
00096   }
00097 }
00098 
00099 
00100 
00101 G4double  G4NucleiPropertiesTheoreticalTable::GetAtomicMass(G4int Z, G4int A)
00102 {
00103   G4int i=GetIndex(Z, A);
00104   if (i >= 0) {
00105     return AtomicMassExcess[i]*MeV + A*amu_c2;
00106     } else {
00107       return 0.0;
00108     }
00109 }
00110 
00111 
00112 
00113 G4double  G4NucleiPropertiesTheoreticalTable::GetNuclearMass(G4int Z, G4int A)
00114 {
00115   G4int i=GetIndex(Z, A);
00116   if (i >= 0) {
00117     return GetAtomicMass(Z,A) - G4double(Z)*electron_mass_c2 + ElectronicBindingEnergy(Z);
00118   } else {
00119     return 0.0;
00120   }
00121 }
00122 
00123 G4double G4NucleiPropertiesTheoreticalTable::ElectronicBindingEnergy(G4int Z) {
00124   const G4double ael = 1.433e-5*MeV; // electronic-binding constant
00125   return ael*std::pow(G4double(Z),2.39);
00126 }
00127 
00128 G4bool G4NucleiPropertiesTheoreticalTable::IsInTable(G4int Z, G4int A)
00129 {
00130   return (Z <= A && A >= 16 && A <= 339 && Z <= 136 && Z >= 8 && GetIndex(Z, A) >= 0);
00131 }
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 

Generated on Mon May 27 17:49:07 2013 for Geant4 by  doxygen 1.4.7