Index: trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorptionAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorptionAtRest.cc	(revision 819)
+++ trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorptionAtRest.cc	(revision 962)
@@ -43,4 +43,5 @@
 #include "G4StopDeexcitationAlgorithm.hh"
 #include "G4ReactionKinematics.hh"
+#include "G4HadronicProcessStore.hh"
 
 G4KaonMinusAbsorptionAtRest::G4KaonMinusAbsorptionAtRest(const G4String& processName,
@@ -51,4 +52,5 @@
     G4cout << GetProcessName() << " is created "<< G4endl;
   }
+  SetProcessSubType(fHadronAtRest);
 
   // see Cohn et al, PLB27(1968) 527;
@@ -79,10 +81,23 @@
   sigmaMinusLambdaConversionRate = 0.55;
   sigmaZeroLambdaConversionRate = 0.55;
+
+  G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
 }
 
 
 G4KaonMinusAbsorptionAtRest::~G4KaonMinusAbsorptionAtRest()
-{ }
-
+{ 
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
+}
+
+void G4KaonMinusAbsorptionAtRest::PreparePhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->RegisterParticleForExtraProcess(this, &p);
+}
+
+void G4KaonMinusAbsorptionAtRest::BuildPhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->PrintInfo(&p);
+}
 
 G4VParticleChange* G4KaonMinusAbsorptionAtRest::AtRestDoIt
@@ -182,14 +197,11 @@
   G4double newA = nucleus->GetN();
 
-  G4double bDiff = G4NucleiPropertiesTable::GetBindingEnergy(static_cast<G4int>(Z),static_cast<G4int>(A)) - 
-    G4NucleiPropertiesTable::GetBindingEnergy(static_cast<G4int>(newZ), static_cast<G4int>(newA));
-
-  //  G4double mass = G4NucleiPropertiesTable::GetAtomicMass(static_cast<G4int>(newZ),static_cast<G4int>(newA));
+  G4double bDiff = G4NucleiProperties::GetBindingEnergy(static_cast<G4int>(A),static_cast<G4int>(Z)) - 
+    G4NucleiProperties::GetBindingEnergy(static_cast<G4int>(newA), static_cast<G4int>(newZ));
+
   G4double pNucleus = pProducts.mag();
   
   G4StopDeexcitationAlgorithm* nucleusAlgorithm = new G4StopTheoDeexcitation();
   G4StopDeexcitation stopDeexcitation(nucleusAlgorithm);
-
-  // G4double difference = G4KaonMinus::KaonMinus()->GetPDGMass() - productEnergy - bDiff;
 
   nucleus->AddExcitationEnergy(bDiff);
@@ -397,17 +409,10 @@
   // Modify the Kaon mass to take nuclear binding energy into account  
   // .. using mas formula ..
-  //   G4double nucleonBindingEnergy =  nucleus->AtomicMass(iniA,iniZ)
-  //                                  - nucleus->AtomicMass(newA,newZ)
-  //                                  - nucleonMass;
   // .. using mass table ..
-  //   G4double nucleonBindingEnergy =  
-  //            G4NucleiPropertiesTable::GetAtomicMass(iniZ,iniA)
-  //           -G4NucleiPropertiesTable::GetAtomicMass(newZ,newA)
-  //           -nucleonMass;
   // equivalent to -'initialBindingEnergy+nucleus.GetBindingEnergy' !
 
   G4double nucleonBindingEnergy = 
-    -G4NucleiPropertiesTable::GetBindingEnergy(static_cast<G4int>(iniZ), static_cast<G4int>(iniA) )
-    +G4NucleiPropertiesTable::GetBindingEnergy(static_cast<G4int>(newZ), static_cast<G4int>(newA) );
+    -G4NucleiProperties::GetBindingEnergy(static_cast<G4int>(iniA), static_cast<G4int>(iniZ) )
+    +G4NucleiProperties::GetBindingEnergy(static_cast<G4int>(newA), static_cast<G4int>(newZ) );
   
   G4DynamicParticle modifiedHadron = (*stoppedHadron);
@@ -523,20 +528,8 @@
   // ExcitationEnergy.
   // .. using mass formula ..
-  //   G4double massDifference =   nucleus->AtomicMass(A,Z)
-  //                           - nucleus->AtomicMass(A,newZ)
-  //                           - nucleonMassDifference;
   // .. using mass table ..
-  // G4double massDifference = 
-  //            G4NucleiPropertiesTable::GetAtomicMass(Z,A)
-  //           -G4NucleiPropertiesTable::GetAtomicMass(newZ,A)
-  //           -nucleonMass;
   // equivalent to -'initialBindingEnergy+nucleus.GetBindingEnergy' !
-  //G4double massDifference =
-  //  -G4NucleiPropertiesTable::GetBindingEnergy(Z,A)
-  //  +G4NucleiPropertiesTable::GetBindingEnergy(newZ,A);
-  
-  
+
   // Add energy and momentum to nucleus, change Z,A 
-  //  nucleus->AddExcitationEnergy(outNucleon->GetKineticEnergy()+massDifference);
   nucleus->AddExcitationEnergy(outNucleon.GetKineticEnergy());
   nucleus->AddMomentum(outNucleon.GetMomentum());
