Changeset 890 for trunk/source


Ignore:
Timestamp:
Nov 25, 2008, 5:27:50 PM (16 years ago)
Author:
garnier
Message:

update to pre-tag revision

Location:
trunk/source/particles/management
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/particles/management/include/G4NucleiProperties.hh

    r850 r890  
    2525//
    2626//
    27 // $Id: G4NucleiProperties.hh,v 1.14 2006/06/29 19:23:54 gunter Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4NucleiProperties.hh,v 1.18 2008/10/28 07:12:31 kurasige Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    5454 //   (i.e. it has static member function only)
    5555
    56 
    5756public:
    5857
     
    6665public:  // With Description
    6766
    68         // Calculate Mass Excess of nucleus A,Z
    69         static G4double GetMassExcess(const G4int A, const G4int Z);
     67  // Give mass of nucleus A,Z
     68  static G4double GetNuclearMass(const G4double A, const G4double Z);
    7069
    71         static G4double GetAtomicMass(const G4double A, const G4double Z);
    72        
    73         static G4double GetBindingEnergy(const G4int A, const G4int Z);
    74        
    75         static G4double GetNuclearMass(const G4double A, const G4double Z);
     70  // return 'true' if the nucleus in the stable table
     71  // (i.e.in G4NucleiPropertiesTable)
     72  static bool IsInStableTable(const G4double A, const G4double Z);
     73
     74  // Give binding energy
     75  static G4double GetBindingEnergy(const G4int A, const G4int Z);
     76  static G4double GetBindingEnergy(const G4double A, const G4double Z);
     77
     78  // Calculate Mass Excess of nucleus A,Z
     79  static G4double GetMassExcess(const G4int A, const G4int Z);
     80  static G4double GetMassExcess(const G4double A, const G4double Z);
    7681
    7782private:
     83  // hidie methods to enforce using GetNuclearMass
     84  // Give mass of Atom A,Z
     85  static G4double GetAtomicMass(const G4double A, const G4double Z);
     86 
     87private:
     88 
     89  static G4double  AtomicMass(G4double A, G4double Z);
     90 
     91  static G4double BindingEnergy(G4double A, G4double Z);
     92 
     93  static G4double MassExcess(G4double A, G4double Z);
    7894
    79         // Calculate Mass Excess according to Cameron's liquid drop formula
    80 //      static G4double CameronMassExcess(const G4int A, const G4int Z);
     95private:
     96  // table of orbit electrons mass - binding energy
     97  enum  {MaxZ = 120};
     98  static G4double electronMass[MaxZ];
    8199
    82         static G4double  AtomicMass(G4double A, G4double Z);
    83        
    84         static G4double BindingEnergy(G4double A, G4double Z);
    85 
    86         static G4double MassExcess(G4double A, G4double Z);
    87        
    88        
     100private:
     101  static G4bool   isIntialized;
     102  static G4double mass_proton;
     103  static G4double mass_neutron;
     104  static G4double mass_deuteron;
     105  static G4double mass_triton;
     106  static G4double mass_alpha;
     107  static G4double mass_He3;
     108       
    89109};
    90110
  • trunk/source/particles/management/include/G4NucleiPropertiesTable.hh

    r850 r890  
    2525//
    2626//
    27 // $Id: G4NucleiPropertiesTable.hh,v 1.13 2006/06/29 19:23:56 gunter Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4NucleiPropertiesTable.hh,v 1.14 2008/10/22 12:35:46 kurasige Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030// -------------------------------------------------------------------
     
    6767//      Atomic Mass
    6868
     69class G4NucleiProperties;
    6970
    7071class G4NucleiPropertiesTable
     
    8384
    8485  // Other Operations
    85  public: // With Description
     86  // all methods are private and can be used only by G4NucleiProperties
     87
     88  friend class G4NucleiProperties; 
     89
     90private:
    8691
    8792  // Operation: GetMassExcess
  • trunk/source/particles/management/include/G4NucleiPropertiesTheoreticalTable.hh

    r850 r890  
    2525//
    2626//
    27 // $Id: G4NucleiPropertiesTheoreticalTable.hh,v 1.7 2006/06/29 19:23:58 gunter Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4NucleiPropertiesTheoreticalTable.hh,v 1.8 2008/10/22 12:35:46 kurasige Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    4646#include "globals.hh"
    4747
     48class G4NucleiProperties;
     49
    4850class G4NucleiPropertiesTheoreticalTable
    4951{
     
    6163
    6264  // Other Operations
     65  // all methods are private and can be used only by G4NucleiProperties
     66  friend class G4NucleiProperties; 
    6367
    64  public: // With Description
     68 
     69 private: // With Description
    6570  // Operation: GetMassExcess
    6671  static G4double GetMassExcess(G4int Z, G4int A);
  • trunk/source/particles/management/include/G4ParticleDefinition.hh

    r850 r890  
    2525//
    2626//
    27 // $Id: G4ParticleDefinition.hh,v 1.32 2008/03/22 06:03:40 kurasige Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4ParticleDefinition.hh,v 1.33 2008/11/14 16:26:30 kurasige Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    129129 
    130130      G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; }
    131   void SetPDGMagneticMoment(G4double mageticMoment);
     131      void     SetPDGMagneticMoment(G4double mageticMoment);
     132      G4double CalculateAnomaly()  const;
     133      // gives the anomaly of magnetic moment for spin 1/2 particles
    132134
    133135      const G4String& GetParticleType() const { return theParticleType; }
  • trunk/source/particles/management/include/G4ParticleDefinition.icc

    r850 r890  
    2525//
    2626//
    27 // $Id: G4ParticleDefinition.icc,v 1.12 2007/03/11 07:17:35 kurasige Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4ParticleDefinition.icc,v 1.13 2008/11/14 16:26:30 kurasige Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030
     
    155155}
    156156
    157 
     157inline
     158  G4double G4ParticleDefinition::CalculateAnomaly()  const
     159{
     160   // gives the anomaly of magnetic moment for spin 1/2 particles
     161   if (thePDGiSpin==1) {
     162     G4double muB = 0.5*eplus*hbar_Planck/(thePDGMass/c_squared);
     163     return 0.5*fabs(thePDGMagneticMoment/muB - 2.*thePDGCharge/eplus);   
     164   } else {     
     165     return 0.0;
     166   }
     167}
  • trunk/source/particles/management/src/G4HyperNucleiProperties.cc

    r850 r890  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HyperNucleiProperties.cc,v 1.3 2007/12/10 16:30:47 gunter Exp $
    27 // GEANT4 tag $Name: HEAD $
     26// $Id: G4HyperNucleiProperties.cc,v 1.4 2008/10/22 12:35:46 kurasige Exp $
     27// GEANT4 tag $Name: $
    2828//
    2929// ------------------------------------------------------------
     
    101101G4double G4HyperNucleiProperties::GetAtomicMass(G4int A, G4int Z, G4int L)
    102102{
    103   if (L==0) return G4NucleiProperties::GetAtomicMass(A,Z);
    104 
    105103  if (A < 1 || Z < 0 || Z > A-L || L > A || L <0 ) {
    106104#ifdef G4VERBOSE
  • trunk/source/particles/management/src/G4IonTable.cc

    r850 r890  
    2525//
    2626//
    27 // $Id: G4IonTable.cc,v 1.51 2008/06/08 12:55:45 kurasige Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4IonTable.cc,v 1.53 2008/10/15 02:41:37 kurasige Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    615615{
    616616  // returns pointer to pre-defined ions
     617  static G4bool isInitialized = false;
     618  static G4ParticleDefinition* p_proton=0;
     619  static G4ParticleDefinition* p_neutron=0;
     620  static G4ParticleDefinition* p_deuteron=0;
     621  static G4ParticleDefinition* p_triton=0;
     622  static G4ParticleDefinition* p_alpha=0;
     623  static G4ParticleDefinition* p_He3=0;
     624 
     625  if (!isInitialized) {
     626    p_proton   = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton
     627    p_neutron  = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron
     628    p_deuteron = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron
     629    p_triton   = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // tritoon
     630    p_alpha    = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha
     631    p_He3      = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3
     632    isInitialized = true;
     633  }
    617634
    618635  G4ParticleDefinition* ion=0;
    619636  if ( (Z<=2) ) {
    620637    if ( (Z==1)&&(A==1) ) {
    621       ion = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton
    622 
     638      ion = p_proton;
    623639    } else if ( (Z==0)&&(A==1) ) {
    624       ion = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron
     640      ion = p_neutron;
    625641    } else if ( (Z==1)&&(A==2) ) {
    626       ion = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron
     642      ion = p_deuteron;
    627643    } else if ( (Z==1)&&(A==3) ) {
    628       ion = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // tritoon
     644      ion = p_triton;
    629645    } else if ( (Z==2)&&(A==4) ) {
    630       ion = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha
    631 
     646      ion = p_alpha;
    632647    } else if ( (Z==2)&&(A==3) ) {
    633       ion = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3
     648      ion = p_He3;
    634649    }
    635650  }
  • trunk/source/particles/management/src/G4NucleiProperties.cc

    r850 r890  
    2525//
    2626//
    27 // $Id: G4NucleiProperties.cc,v 1.13 2007/09/14 07:04:09 kurasige Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4NucleiProperties.cc,v 1.18 2008/11/06 13:17:36 kurasige Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    4343#include "G4NucleiProperties.hh"
    4444
    45 
     45G4bool   G4NucleiProperties::isIntialized = false;
     46
     47G4double G4NucleiProperties::mass_proton = -1.;
     48G4double G4NucleiProperties::mass_neutron = -1.;
     49G4double G4NucleiProperties::mass_deuteron = -1.;
     50G4double G4NucleiProperties::mass_triton = -1.;
     51G4double G4NucleiProperties::mass_alpha = -1.;
     52G4double G4NucleiProperties::mass_He3 = -1.;
     53G4double G4NucleiProperties::electronMass[MaxZ];
    4654
    4755G4double  G4NucleiProperties::AtomicMass(G4double A, G4double Z)
     
    7684G4double G4NucleiProperties::GetNuclearMass(const G4double A, const G4double Z)
    7785{
     86  if (!isIntialized) {
     87    isIntialized = true;
     88    G4ParticleDefinition * nucleus = 0;
     89    nucleus = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton
     90    if (nucleus!=0) mass_proton = nucleus->GetPDGMass();
     91    nucleus = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron
     92    if (nucleus!=0) mass_neutron = nucleus->GetPDGMass();
     93    nucleus = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron
     94    if (nucleus!=0) mass_deuteron = nucleus->GetPDGMass();
     95    nucleus = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // triton
     96    if (nucleus!=0) mass_triton = nucleus->GetPDGMass();
     97    nucleus = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha
     98    if (nucleus!=0) mass_alpha = nucleus->GetPDGMass();
     99    nucleus = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3
     100    if (nucleus!=0) mass_He3 = nucleus->GetPDGMass();
     101
     102    for (int iz=1; iz<MaxZ; iz+=1){
     103      electronMass[iz] =  iz*electron_mass_c2
     104                                 - 1.433e-5*MeV*std::pow(G4double(iz),2.39); ;
     105    }
     106  }
     107
    78108  if (A < 1 || Z < 0 || Z > A) {
    79109#ifdef G4VERBOSE
     
    85115    return 0.0;
    86116  } else {
    87     G4ParticleDefinition * nucleus = 0;
     117    G4double mass= -1.;
    88118    if ( (Z<=2) ) {
    89119      if ( (Z==1)&&(A==1) ) {
    90         nucleus = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton
     120        mass = mass_proton;
    91121      } else if ( (Z==0)&&(A==1) ) {
    92         nucleus = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron
     122        mass = mass_neutron;
    93123      } else if ( (Z==1)&&(A==2) ) {
    94         nucleus = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron
     124        mass = mass_deuteron;
    95125      } else if ( (Z==1)&&(A==3) ) {
    96         nucleus = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // triton
     126        mass = mass_triton;
    97127      } else if ( (Z==2)&&(A==4) ) {
    98         nucleus = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha
     128        mass = mass_alpha;
    99129      } else if ( (Z==2)&&(A==3) ) {
    100         nucleus = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3
     130        mass = mass_He3;
    101131      }
    102132    }
    103     if (nucleus!=0) {
    104       return nucleus->GetPDGMass();
    105     }else {
    106       return GetAtomicMass(A,Z) - Z*electron_mass_c2 + 1.433e-5*MeV*std::pow(Z,2.39);
    107     }
    108   }
    109 }
    110 
    111 
    112 // G4double G4NucleiProperties::CameronMassExcess(const G4int A, const G4int Z)
    113 // {
    114 //      const G4double alpha = -17.0354*MeV;
    115 //      const G4double beta = -31.4506*MeV;
    116 //      const G4double phi = 44.2355*MeV;
    117 //      const G4double gamma = 25.8357*MeV;
    118 //   
    119 //      const G4double A13 = std::pow(G4double(A),1.0/3.0);
    120 //      const G4double A23 = A13*A13;
    121 //      const G4double A43 = A23*A23;
    122 //      const G4double Z43 = std::pow(G4double(Z),4.0/3.0);
    123 //      G4double D = (G4double(A) - 2.0*G4double(Z))/G4double(A);
    124 //      D *= D; // D = std::pow((A-2Z)/A,2)
    125 //   
    126 //   
    127 //      // Surface term
    128 //      G4double SurfaceEnergy = (gamma - phi*D)*(1.0 - 0.62025/A23)*(1.0 - 0.62025/A23)*A23;
    129 //
    130 //      // Coulomb term
    131 //      G4double CoulombEnergy = 0.779*MeV*(G4double(Z*(Z-1))/A13)*(1.0-1.5849/A23+1.2273/A+1.5772/A43);
    132 //
    133 //      // Exchange term
    134 //      G4double ExchangeEnergy = -0.4323*MeV*(Z43/A13)*(1.0-0.57811/A13-0.14518/A23+0.49597/A);
    135 // 
    136 //      // Volume term
    137 //      G4double VolumeEnergy = G4double(A)*(alpha-beta*D);
    138 //
    139 //      // Shell+Pairing corrections for protons
    140 //      G4double SPcorrectionZ;
    141 //      if (Z <= TableSize) SPcorrectionZ = SPZTable[Z-1]*MeV;
    142 //      else SPcorrectionZ = 0.0;
    143 //     
    144 //      // Shell+Pairing corrections for protons
    145 //      G4int N = A - Z;
    146 //      G4double SPcorrectionN;
    147 //      if (N <= TableSize) SPcorrectionN = SPNTable[N-1]*MeV;
    148 //      else SPcorrectionN = 0.0;
    149 //
    150 //
    151 //      // Mass Excess
    152 //      // First two terms give the mass excess of the neutrons and protons in the nucleus
    153 //      // (see Cameron, Canadian Journal of Physics, 35, 1957 page 1022)
    154 //      G4double MassExcess = 8.367*MeV*A - 0.783*MeV*Z +
    155 //                                                               SurfaceEnergy + CoulombEnergy + ExchangeEnergy + VolumeEnergy +
    156 //                                                               SPcorrectionZ + SPcorrectionN;
    157 //                       
    158 //      return MassExcess;
    159 // }
    160 
    161 
    162 // S(Z)+P(Z) from Tab. 1 from A.G.W. Cameron, Canad. J. Phys., 35(1957)1021
    163 //                   or Delta M(Z) from Tab. 97 of book [1]
    164 // const G4double G4NucleiProperties::SPZTable[TableSize] = {
    165 //   20.80, 15.80, 21.00, 16.80, 19.80, 16.50, 18.80, 16.50, 18.50, 17.20, //   1 - 10
    166 //   18.26, 15.05, 16.01, 12.04, 13.27, 11.09, 12.17, 10.26, 11.04,  8.41, //  11 - 20
    167 //    9.79,  7.36,  8.15,  5.63,  5.88,  3.17,  3.32,   .82,  1.83,   .97, //  21 - 30
    168 //    2.33,  1.27,  2.92,  1.61,  2.91,  1.35,  2.40,   .89,  1.74,   .36, //  31
    169 //    0.95, -0.65, -0.04, -1.73, -0.96, -2.87, -2.05, -4.05, -3.40, -5.72, //  41
    170 //   -3.75, -4.13, -2.42, -2.85, -1.01, -1.33,  0.54, -0.02,  1.74,  0.75, //  51
    171 //    2.24,  1.00,  1.98,  0.79,  1.54,  0.39,  1.08,  0.00,  0.78, -0.35, //  61
    172 //    0.58, -0.55,  0.59, -0.61,  0.59, -0.35,  0.32, -0.96, -0.52, -2.08, //  71
    173 //   -2.46, -3.64, -1.55, -0.96,  0.97,  0.88,  2.37,  1.75,  2.72,  1.90, //  81
    174 //    2.55,  1.46,  1.93,  0.86,  1.17,  0.08,  0.39, -0.76, -0.39, -1.51, //  91 - 100
    175 //   -1.17, -2.36, -1.95, -3.06, -2.62, -3.55, -2.95, -3.75, -3.07, -3.79, // 101 - 110
    176 //   -3.06, -3.77, -3.05, -3.78, -3.12, -3.90, -3.35, -4.24, -3.86, -4.92, // 111 - 120
    177 //   -5.06, -6.77, -7.41, -9.18,-10.16,-11.12, -9.76, -9.23, -7.96, -7.65, // 121 - 130
    178 //   // --------- from this point there are not tabulated values -----------------------
    179 //    0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00, // 131 - 140
    180 //    0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00, // 141 - 150
    181 //    0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00, // 151
    182 //    0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00, // 161
    183 //    0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00, // 171
    184 //    0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00, // 181
    185 //    0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00  // 191 - 200
    186 // };
    187 
    188 // S(N)+P(N) from Tab. 1 from A.G.W. Cameron, Canad. J. Phys., 35(1957)1021
    189 //                   or Delta M(N) from Tab. 97 of book [1]
    190 // const G4double G4NucleiProperties::SPNTable[TableSize] = {
    191 //   -8.40,-12.90, -8.00, 11.90, -9.20,-12.50,-10.80,-13.60,-11.20,-12.20, //   1 - 10
    192 //  -12.81,-15.40,-13.07,-15.80,-13.81,-14.98,-12.63,-13.76,-11.37,-12.38, //  11 - 20
    193 //   -9.23, -9.65, -7.64, -9.17, -8.05, -9.72, -8.87,-10.76, -8.64, -8.89, //  21 - 30
    194 //   -6.60, -7.13, -4.77, -5.33, -3.06, -3.79, -1.72, -2.79, -0.93, -2.19, //  31
    195 //   -0.52, -1.90, -0.45, -2.20, -1.22, -3.07, -2.42, -4.37, -3.94, -6.08, //  41
    196 //   -4.49, -4.50, -3.14, -2.93, -1.04, -1.36,  0.69,  0.21,  2.11,  1.33, //  51
    197 //    3.29,  2.46,  4.30,  3.32,  4.79,  3.62,  4.97,  3.64,  4.63,  3.07, //  61
    198 //    4.06,  2.49,  3.30,  1.46,  2.06,  0.51,  0.74, -1.18, -1.26, -3.54, //  71
    199 //   -3.97, -5.26, -4.18, -3.71, -2.10, -1.70, -0.08, -0.18,  0.94,  0.27, //  81
    200 //    1.13,  0.08,  0.91, -0.31,  0.49, -0.78,  0.08, -1.15, -0.23, -1.41, //  91 - 100
    201 //   -0.42, -1.55, -0.55, -1.66, -0.66, -1.73, -0.75, -1.74, -0.78, -1.69, // 101 - 110
    202 //   -0.78, -1.60, -0.75, -1.46, -0.67, -1.26, -0.51, -1.04, -0.53, -1.84, // 111 - 120
    203 //   -2.42, -4.52, -4.76, -6.33, -6.76, -7.81, -5.80, -5.37, -3.63, -3.35, // 121 - 130
    204 //   -1.75, -1.88, -0.61, -0.90,  0.09, -0.32,  0.55, -0.13,  0.70, -0.06, // 131 - 140
    205 //    0.49, -0.20,  0.40, -0.22,  0.36, -0.09,  0.58,  0.12,  0.75,  0.15, // 141 - 150
    206 //    0.70,  0.17,  1.11,  0.89,  1.85,  1.62,  2.54,  2.29,  3.20,  2.91, // 151
    207 //    3.84,  3.53,  4.48,  4.15,  5.12,  4.78,  5.75,  5.39,  6.31,  5.91, // 161
    208 //    6.87,  6.33,  7.13,  6.61,  7.30,  6.31,  6.27,  4.83,  4.49,  2.85, // 171
    209 //    2.32,  0.58, -0.11, -0.98,  0.81,  1.77,  3.37,  4.13,  5.60,  6.15, // 181
    210 //    7.29,  7.35,  7.95,  7.67,  8.16,  7.83,  8.31,  8.01,  8.53,  8.27  // 191 - 200
    211 // };
    212 
    213 
     133    if (mass < 0.) {
     134      if (Z >= MaxZ) {
     135        mass = GetAtomicMass(A,Z) - Z*electron_mass_c2 + 1.433e-5*MeV*std::pow(Z,2.39);     
     136      } else {
     137        mass = GetAtomicMass(A,Z) - electronMass[G4int(Z)];
     138      }
     139    }
     140    if (mass < 0.) mass = 0.0;
     141    return mass;
     142  }
     143}
     144
     145G4bool G4NucleiProperties::IsInStableTable(const G4double A, const G4double Z)
     146{
     147  if (Z < 0 || Z > A) {
     148#ifdef G4VERBOSE
     149    if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {
     150      G4cout << "G4NucleiProperties::IsInStableTable: Wrong values for A = "
     151             << A << " and Z = " << Z << G4endl;       
     152    }
     153#endif
     154    return false;
     155
     156  } else {
     157    G4int iA = G4int(A);
     158    G4int iZ = G4int(Z);
     159    return G4NucleiPropertiesTable::IsInTable(iZ,iA);
     160  }
     161}
     162
     163G4double G4NucleiProperties::GetMassExcess(const G4double A, const G4double Z)
     164{
     165  G4int iA = G4int(A);
     166  G4int iZ = G4int(Z);
     167  return GetMassExcess(iA,iZ);
     168}
    214169
    215170G4double G4NucleiProperties::GetMassExcess(const G4int A, const G4int Z)
     
    265220}
    266221
     222G4double G4NucleiProperties::GetBindingEnergy(const G4double A, const G4double Z)
     223{
     224  G4int iA = G4int(A);
     225  G4int iZ = G4int(Z);
     226  return GetBindingEnergy(iA,iZ);
     227}
     228
    267229G4double G4NucleiProperties::GetBindingEnergy(const G4int A, const G4int Z)
    268230{
  • trunk/source/particles/management/src/G4NucleiPropertiesTableA.cc

    r850 r890  
    2525//
    2626//
    27 // $Id: G4NucleiPropertiesTableA.cc,v 1.10 2006/06/29 19:25:42 gunter Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4NucleiPropertiesTableA.cc,v 1.11 2008/10/23 13:34:59 kurasige Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030// -------------------------------------------------------------------
     
    108108
    109109
    110 
    111 
    112110G4double G4NucleiPropertiesTable::GetMassExcess(G4int Z, G4int A)
    113111{
Note: See TracChangeset for help on using the changeset viewer.