Index: trunk/source/processes/hadronic/util/src/G4HadronicWhiteBoard.cc
===================================================================
--- trunk/source/processes/hadronic/util/src/G4HadronicWhiteBoard.cc	(revision 1201)
+++ trunk/source/processes/hadronic/util/src/G4HadronicWhiteBoard.cc	(revision 1315)
@@ -49,6 +49,6 @@
 G4double G4HadronicWhiteBoard::GetPy(){return thePy;}
 G4double G4HadronicWhiteBoard::GetPz(){return thePz;}
-G4double G4HadronicWhiteBoard::GetA(){return theA;}
-G4double G4HadronicWhiteBoard::GetZ(){return theZ;}
+G4int G4HadronicWhiteBoard::GetA(){return theA;}
+G4int G4HadronicWhiteBoard::GetZ(){return theZ;}
 
   
@@ -68,6 +68,6 @@
 {
   theTarget = aTarget;
-  theA = theTarget.GetN();
-  theZ = theTarget.GetZ();
+  theA = theTarget.GetA_asInt();
+  theZ = theTarget.GetZ_asInt();
 }
 
Index: trunk/source/processes/hadronic/util/src/G4LightMedia.cc
===================================================================
--- trunk/source/processes/hadronic/util/src/G4LightMedia.cc	(revision 1201)
+++ trunk/source/processes/hadronic/util/src/G4LightMedia.cc	(revision 1315)
@@ -44,5 +44,5 @@
     G4ParticleDefinition* aPiZero = G4PionZero::PionZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -83,5 +83,5 @@
     G4ParticleDefinition* aKaonZL = G4KaonZeroLong::KaonZeroLong();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -117,5 +117,5 @@
     G4ParticleDefinition* aKaonZL = G4KaonZeroLong::KaonZeroLong();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -176,5 +176,5 @@
     G4ParticleDefinition* aNeutron = G4Neutron::Neutron();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -203,5 +203,5 @@
     G4ParticleDefinition* anAntiNeutron = G4AntiNeutron::AntiNeutron();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -229,5 +229,5 @@
     G4ParticleDefinition* aProton = G4Proton::Proton();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -256,5 +256,5 @@
     G4ParticleDefinition* anAntiProton = G4AntiProton::AntiProton();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -286,5 +286,5 @@
     G4ParticleDefinition* aSigmaZero = G4SigmaZero::SigmaZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -364,5 +364,5 @@
     G4ParticleDefinition* anAntiSigmaZero = G4AntiSigmaZero::AntiSigmaZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -443,5 +443,5 @@
     G4ParticleDefinition* aSigmaZero = G4SigmaZero::SigmaZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -505,5 +505,5 @@
     G4ParticleDefinition* aSigmaZero = G4SigmaZero::SigmaZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -567,5 +567,5 @@
     G4ParticleDefinition* anAntiSigmaZero = G4AntiSigmaZero::AntiSigmaZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -626,5 +626,5 @@
     G4ParticleDefinition* anAntiSigmaZero = G4AntiSigmaZero::AntiSigmaZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -689,5 +689,5 @@
     G4ParticleDefinition* aXiMinus = G4XiMinus::XiMinus();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -773,5 +773,5 @@
     G4ParticleDefinition* aXiZero = G4XiZero::XiZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -862,5 +862,5 @@
     G4ParticleDefinition* aXiMinus = G4XiMinus::XiMinus();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -950,5 +950,5 @@
     G4ParticleDefinition* aXiZero = G4XiZero::XiZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -1036,5 +1036,5 @@
     G4ParticleDefinition* aXiZero = G4XiZero::XiZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -1137,5 +1137,5 @@
     G4ParticleDefinition* aXiZero = G4XiZero::XiZero();
     
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
Index: trunk/source/processes/hadronic/util/src/G4Nucleus.cc
===================================================================
--- trunk/source/processes/hadronic/util/src/G4Nucleus.cc	(revision 1201)
+++ trunk/source/processes/hadronic/util/src/G4Nucleus.cc	(revision 1315)
@@ -38,4 +38,5 @@
  // HPW added utilities for low energy neutron transport. (12.04.1998)
  // M.G. Pia, 2 Oct 1998: modified GetFermiMomentum to avoid memory leaks
+ // G.Folger, spring 2010:  add integer A/Z interface
  
 #include "G4Nucleus.hh"
@@ -57,4 +58,17 @@
 
 G4Nucleus::G4Nucleus( const G4double A, const G4double Z )
+{
+  SetParameters( A, Z );
+  pnBlackTrackEnergy = 0.0;
+  dtaBlackTrackEnergy = 0.0;
+  pnBlackTrackEnergyfromAnnihilation = 0.0;
+  dtaBlackTrackEnergyfromAnnihilation = 0.0;
+  excitationEnergy = 0.0;
+  momentum = G4ThreeVector(0.,0.,0.);
+  fermiMomentum = 1.52*hbarc/fermi;
+  theTemp = 293.16*kelvin;
+}
+
+G4Nucleus::G4Nucleus( const G4int A, const G4int Z )
 {
   SetParameters( A, Z );
@@ -136,21 +150,35 @@
   {
     G4double random = G4UniformRand();
-    G4double sum = 0;
+    G4double sum = aMaterial->GetTotNbOfAtomsPerVolume();
     const G4ElementVector *theElementVector = aMaterial->GetElementVector();
-    unsigned int i;
-    for(i=0; i<aMaterial->GetNumberOfElements(); ++i )
-    {
-      sum += aMaterial->GetAtomicNumDensityVector()[i];
-    }
-    G4double running = 0;
-    for(i=0; i<aMaterial->GetNumberOfElements(); ++i )
-    {
-      running += aMaterial->GetAtomicNumDensityVector()[i];
-      if( running/sum > random ) {
-        aEff = (*theElementVector)[i]->GetA()*mole/g;
-        zEff = (*theElementVector)[i]->GetZ();
+    G4double running(0);
+    G4Element* element(0);
+    for(unsigned int i=0; i<aMaterial->GetNumberOfElements(); ++i )
+    {
+      running += aMaterial->GetVecNbOfAtomsPerVolume()[i];
+      if( running > random*sum ) {
+        element=(*theElementVector)[i];
         break;
       }
     }
+    if ( element->GetNumberOfIsotopes() > 0 ) {
+      G4double randomAbundance = G4UniformRand();
+      G4double sumAbundance = element->GetRelativeAbundanceVector()[0];
+      unsigned int iso=0;
+      while ( iso < element->GetNumberOfIsotopes() &&
+               sumAbundance < randomAbundance ) {
+         ++iso;
+	 sumAbundance += element->GetRelativeAbundanceVector()[iso];
+      }
+      theA=element->GetIsotope(iso)->GetN();
+      theZ=element->GetIsotope(iso)->GetZ();
+      aEff=theA;
+      zEff=theZ;
+    } else {   
+      aEff = element->GetN();
+      zEff = element->GetZ();
+      theZ = G4int(zEff + 0.5);
+      theA = G4int(aEff + 0.5);   
+    }
   }
  
@@ -158,7 +186,21 @@
   G4Nucleus::SetParameters( const G4double A, const G4double Z )
   {
-    G4int myZ = G4int(Z + 0.5);
-    G4int myA = G4int(A + 0.5);   
-    if( myA<1 || myZ<0 || myZ>myA )
+    theZ = G4int(Z + 0.5);
+    theA = G4int(A + 0.5);   
+    if( theA<1 || theZ<0 || theZ>theA )
+    {
+      throw G4HadronicException(__FILE__, __LINE__,
+                               "G4Nucleus::SetParameters called with non-physical parameters");
+    }
+    aEff = A;  // atomic weight
+    zEff = Z;  // atomic number
+  }
+
+ void
+  G4Nucleus::SetParameters( const G4int A, const G4int Z )
+  {
+    theZ = Z;
+    theA = A;   
+    if( theA<1 || theZ<0 || theZ>theA )
     {
       throw G4HadronicException(__FILE__, __LINE__,
@@ -184,4 +226,11 @@
  G4double
   G4Nucleus::AtomicMass( const G4double A, const G4double Z ) const
+  {
+    // Now returns (atomic mass - electron masses) 
+    return G4NucleiProperties::GetNuclearMass(A, Z);
+  }
+ 
+ G4double
+  G4Nucleus::AtomicMass( const G4int A, const G4int Z ) const
   {
     // Now returns (atomic mass - electron masses) 
Index: trunk/source/processes/hadronic/util/src/G4ReactionDynamics.cc
===================================================================
--- trunk/source/processes/hadronic/util/src/G4ReactionDynamics.cc	(revision 1201)
+++ trunk/source/processes/hadronic/util/src/G4ReactionDynamics.cc	(revision 1315)
@@ -184,6 +184,6 @@
       veryForward = true;
     }
-    const G4double atomicWeight = targetNucleus.GetN();
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicWeight = G4double(targetNucleus.GetA_asInt());
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     const G4double protonMass = aProton->GetPDGMass()/MeV;
 
@@ -1124,7 +1124,7 @@
 
     G4int PinNucleus = std::max(0, 
-      G4int(targetNucleus.GetZ()) - protonsInFinalState);
+      targetNucleus.GetZ_asInt() - protonsInFinalState);
     G4int NinNucleus = std::max(0,
-      G4int(targetNucleus.GetN()-targetNucleus.GetZ()) - neutronsInFinalState);
+      targetNucleus.GetN_asInt() - neutronsInFinalState);
 
     pseudoParticle[3].SetMomentum( 0.0, 0.0, pOriginal*GeV );
@@ -1356,6 +1356,6 @@
     for (G4int i = 0; i < vecLen; i++) eAvailable -= vec[i]->GetMass()/GeV;
 
-    const G4double atomicWeight = targetNucleus.GetN();
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicWeight = G4double(targetNucleus.GetA_asInt());
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     const G4double pOriginal = modifiedOriginal.GetTotalMomentum()/GeV;
     
@@ -1502,6 +1502,6 @@
     }
 
-    const G4double atomicWeight = targetNucleus.GetN();
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicWeight = G4double(targetNucleus.GetA_asInt());
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     //
     // particles have been distributed in forward and backward hemispheres
@@ -2033,7 +2033,7 @@
 
     G4int PinNucleus = std::max(0, 
-      G4int(targetNucleus.GetZ()) - protonsInFinalState);
+      targetNucleus.GetZ_asInt() - protonsInFinalState);
     G4int NinNucleus = std::max(0,
-      G4int(targetNucleus.GetN()-targetNucleus.GetZ()) - neutronsInFinalState);
+      targetNucleus.GetN_asInt() - neutronsInFinalState);
     //
     //  for various reasons, the energy balance is not sufficient,
@@ -2270,5 +2270,5 @@
 
     targetMass = targetParticle.GetMass()/GeV;
-    const G4double atomicWeight = targetNucleus.GetN();
+    const G4double atomicWeight = G4double(targetNucleus.GetA_asInt());
     
     G4double etCurrent = currentParticle.GetTotalEnergy()/GeV;
@@ -2430,7 +2430,7 @@
 
     G4int PinNucleus = std::max(0, 
-      G4int(targetNucleus.GetZ()) - protonsInFinalState);
+      targetNucleus.GetZ_asInt() - protonsInFinalState);
     G4int NinNucleus = std::max(0,
-      G4int(targetNucleus.GetN()-targetNucleus.GetZ()) - neutronsInFinalState);
+      targetNucleus.GetN_asInt() - neutronsInFinalState);
 
       // DEBUGGING --> DumpFrames::DumpFrame(vec, vecLen);
@@ -2820,5 +2820,5 @@
     //    inclusive distributions, but it is necessary for momentum conservation
     //
-    const G4double atomicWeight = targetNucleus.GetN();
+    const G4double atomicWeight = G4double(targetNucleus.GetA_asInt());
     const G4double logWeight = std::log(atomicWeight);
     
@@ -3096,6 +3096,6 @@
     
     const G4double ekOriginal = modifiedOriginal.GetKineticEnergy()/MeV;
-    const G4double atomicWeight = targetNucleus.GetN();
-    const G4double atomicNumber = targetNucleus.GetZ();
+    const G4double atomicWeight = G4double(targetNucleus.GetA_asInt());
+    const G4double atomicNumber = G4double(targetNucleus.GetZ_asInt());
     
     const G4double ika1 = 3.6;
@@ -3836,5 +3836,5 @@
     if( currentParticle.GetDefinition() == aNeutron )
     {
-      const G4double A = targetNucleus.GetN();    // atomic weight
+      const G4double A = G4double(targetNucleus.GetA_asInt());    // atomic weight
       if( G4UniformRand() > ((A-1.0)/230.0)*((A-1.0)/230.0) )
         qval[0] = 0.0;
