Index: trunk/source/processes/hadronic/cross_sections/History
===================================================================
--- trunk/source/processes/hadronic/cross_sections/History	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/History	(revision 1055)
@@ -15,5 +15,34 @@
      ---------------------------------------------------------------
 
-01 December 2008 Vladimir Ivantchenko (hadr-cross-V09-01-07)
+21 March 2009 Vladimir Ivanchenko (hadr-cross-V09-02-04)
+------------------------------------------------------------
+- G4IonsKoxCrossSection, G4IonsShenCrossSection, G4TripathiCrossSection,
+  G4TripathiLightCrossSection - added protections against numerical 
+                                exceptions (V.Grichine)
+- G4GGNuclNuclCrossSection - Glauber-Gribov new cross section for ions 
+                             (V.Grichine)  
+
+25 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-03)
+------------------------------------------------------------
+- G4CrossSectionDataStore - added protection to the Clean method
+
+14 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-02)
+------------------------------------------------------------
+- G4CrossSectionDataStore - added Clean method
+
+06 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-01)
+------------------------------------------------------------
+
+24 January 2009 Vladimir Ivanchenko (hadr-cross-V09-02-00)
+------------------------------------------------------------
+- G4CrossSectionDataStore - moved constructor and destructor to source,
+                            added destruction of data sets, use STL
+                            vector instead of C-array
+- G4CrossSectionDataSetRegistry - new singleton to keep pointers to 
+                            cross section data sets
+- G4VCrossSectiondataSet - constructor and detructor moved to source and
+                           registration/deregistration added
+
+01 December 2008 Vladimir Ivanchenko (hadr-cross-V09-01-07)
 ------------------------------------------------------------
 G4BGGPionElasticXS, G4BGGPionInelasticXS, G4BGGNucleonInelasticXS,
Index: trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonElasticXS.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonElasticXS.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonElasticXS.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4BGGNucleonElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonInelasticXS.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonInelasticXS.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonInelasticXS.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4BGGNucleonInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/include/G4BGGPionElasticXS.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4BGGPionElasticXS.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4BGGPionElasticXS.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4BGGPionElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/include/G4BGGPionInelasticXS.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4BGGPionInelasticXS.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4BGGPionInelasticXS.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4BGGPionInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataSetRegistry.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataSetRegistry.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataSetRegistry.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4CrossSectionDataSetRegistry.hh,v 1.2 2009/02/14 19:22:19 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02-ref-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataStore.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataStore.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataStore.hh	(revision 1055)
@@ -24,4 +24,20 @@
 // ********************************************************************
 //
+// $Id: G4CrossSectionDataStore.hh,v 1.14 2009/01/24 11:54:47 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+//
+// File name:     G4CrossSectionDataStore
+//
+//
+// Modifications:
+// 23.01.2009 V.Ivanchenko move constructor and destructor to source,
+//                         use STL vector instead of C-array
+//
+
 // Class Description
 // This is the class to which cross section data sets may be registered. 
@@ -40,4 +56,5 @@
 #include "G4Material.hh"
 #include "G4VCrossSectionDataSet.hh"
+#include <vector>
 
 class G4Nucleus;
@@ -47,55 +64,50 @@
 public:
 
-   G4CrossSectionDataStore() :
-      NDataSetList(0), verboseLevel(0)
-   {}
+  G4CrossSectionDataStore();
 
-   ~G4CrossSectionDataStore()
-   {}
+  ~G4CrossSectionDataStore();
 
-   G4double GetCrossSection(const G4DynamicParticle*, 
-                            const G4Element*, G4double aTemperature);
+  G4double GetCrossSection(const G4DynamicParticle*, 
+			   const G4Element*, G4double aTemperature);
 
-   G4double GetCrossSection(const G4DynamicParticle*, 
-                            const G4Isotope*, G4double aTemperature);
+  G4double GetCrossSection(const G4DynamicParticle*, 
+			   const G4Isotope*, G4double aTemperature);
 
-   G4double GetCrossSection(const G4DynamicParticle*, 
-                            G4double Z, G4double A, G4double aTemperature);
+  G4double GetCrossSection(const G4DynamicParticle*, 
+			   G4double Z, G4double A, G4double aTemperature);
 
-   // to replace GetMicroscopicCrossSection
-   G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
+  // to replace GetMicroscopicCrossSection
+  G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
 
-   std::pair<G4double/*Z*/, G4double/*A*/> 
-   SelectRandomIsotope(const G4DynamicParticle*, const G4Material*);
+  //std::pair<G4double/*Z*/, G4double/*A*/> 
+  // SelectRandomIsotope(const G4DynamicParticle*, const G4Material*);
 
-   G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*,
-			  G4Nucleus& target);
+  G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*,
+			 G4Nucleus& target);
 
-   void AddDataSet(G4VCrossSectionDataSet*);
+  void AddDataSet(G4VCrossSectionDataSet*);
 
-   void BuildPhysicsTable(const G4ParticleDefinition&);
+  void BuildPhysicsTable(const G4ParticleDefinition&);
 
-   void DumpPhysicsTable(const G4ParticleDefinition&);
+  void DumpPhysicsTable(const G4ParticleDefinition&);
 
-   void SetVerboseLevel(G4int value)
-   {
-      verboseLevel = value;
-   }
+  inline void SetVerboseLevel(G4int value)
+  {
+    verboseLevel = value;
+  }
 
-   G4int GetVerboseLevel()
-   {
-      return verboseLevel;
-   }
+  inline G4int GetVerboseLevel()
+  {
+    return verboseLevel;
+  }
 
 private:
 
+  G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*, 
+					       const G4Element*);
 
-   G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*, 
-                            const G4Element*);
-
-   enum { NDataSetMax = 100 };
-   G4VCrossSectionDataSet* DataSetList[NDataSetMax];
-   G4int NDataSetList;
-   G4int verboseLevel;
+  std::vector<G4VCrossSectionDataSet*> DataSetList;
+  G4int NDataSetList;
+  G4int verboseLevel;
 };
 
Index: trunk/source/processes/hadronic/cross_sections/include/G4ElectroNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4ElectroNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4ElectroNuclearCrossSection.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/include/G4GGNuclNuclCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4GGNuclNuclCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4GGNuclNuclCrossSection.hh	(revision 1055)
@@ -71,4 +71,7 @@
 				G4double Z, G4double A, 
 				G4double aTemperature = 0.0);
+
+  G4double GetCoulombBarier(const G4DynamicParticle*, 
+				G4double Z, G4double A, G4double pR, G4double tR);
 
   virtual
Index: trunk/source/processes/hadronic/cross_sections/include/G4HadronCrossSections.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4HadronCrossSections.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4HadronCrossSections.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/include/G4PhotoNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4PhotoNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4PhotoNuclearCrossSection.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/include/G4VCrossSectionDataSet.hh
===================================================================
--- trunk/source/processes/hadronic/cross_sections/include/G4VCrossSectionDataSet.hh	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/include/G4VCrossSectionDataSet.hh	(revision 1055)
@@ -24,7 +24,20 @@
 // ********************************************************************
 //
+// $Id: G4VCrossSectionDataSet.hh,v 1.13 2009/01/24 11:54:47 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
-// GEANT4 physics abstract class: G4VCrossSectionData -- header file
-// F.W. Jones, TRIUMF, 20-JAN-97
+// -------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+//
+// File name:    G4VCrossSectionDataSet
+//
+// Author  F.W. Jones, TRIUMF, 20-JAN-97
+//
+// Modifications:
+// 23.01.2009 V.Ivanchenko move constructor and destructor to source
+//
+ 
 //
 // Class Description
@@ -43,56 +56,51 @@
 class G4VCrossSectionDataSet
 {
-public:
-
-   G4VCrossSectionDataSet() :
-      verboseLevel(0)
-   {}
-
-   virtual ~G4VCrossSectionDataSet()
-   {}
-
 public: //with description
 
-   // The following methods need to be implemented for each new data set.
-   virtual
-   G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0;
+  G4VCrossSectionDataSet();
 
-   virtual
-   G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/);
+  virtual ~G4VCrossSectionDataSet();
 
-   virtual
-   G4double GetCrossSection(const G4DynamicParticle*, 
-                            const G4Element*, 
-			    G4double aTemperature = 0.) = 0;
+  // The following methods need to be implemented for each new data set.
+  virtual
+  G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0;
 
-   virtual
-   G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*, 
-	         	       G4double aTemperature = 0.);
+  virtual
+  G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/);
 
-   virtual
-   G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
-                                 G4double /*A*/, G4double aTemperature = 0.);
+  virtual
+  G4double GetCrossSection(const G4DynamicParticle*, 
+			   const G4Element*, 
+			   G4double aTemperature = 0.) = 0;
 
-   virtual
-   void BuildPhysicsTable(const G4ParticleDefinition&) = 0;
+  virtual
+  G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*, 
+			      G4double aTemperature = 0.);
 
-   virtual
-   void DumpPhysicsTable(const G4ParticleDefinition&) = 0;
+  virtual
+  G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
+				G4double /*A*/, G4double aTemperature = 0.);
+
+  virtual
+  void BuildPhysicsTable(const G4ParticleDefinition&) = 0;
+
+  virtual
+  void DumpPhysicsTable(const G4ParticleDefinition&) = 0;
 
 public: // Without Description
 
-   void SetVerboseLevel(G4int value)
-   {
-      verboseLevel = value;
-   }
+  inline void SetVerboseLevel(G4int value)
+  {
+    verboseLevel = value;
+  }
 
-   G4int GetVerboseLevel()
-   {
-      return verboseLevel;
-   }
+  inline G4int GetVerboseLevel()
+  {
+    return verboseLevel;
+  }
 
 protected:
 
-   G4int verboseLevel;
+  G4int verboseLevel;
 };
 
Index: trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonElasticXS.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonElasticXS.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonElasticXS.cc	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4BGGNucleonElasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonInelasticXS.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonInelasticXS.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonInelasticXS.cc	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4BGGNucleonInelasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/src/G4BGGPionElasticXS.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4BGGPionElasticXS.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4BGGPionElasticXS.cc	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4BGGPionElasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/src/G4BGGPionInelasticXS.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4BGGPionInelasticXS.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4BGGPionInelasticXS.cc	(revision 1055)
@@ -25,5 +25,5 @@
 //
 // $Id: G4BGGPionInelasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataSetRegistry.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataSetRegistry.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataSetRegistry.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4CrossSectionDataSetRegistry.cc,v 1.3 2009/02/25 16:27:36 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02-ref-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataStore.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataStore.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataStore.cc	(revision 1055)
@@ -24,4 +24,18 @@
 // ********************************************************************
 //
+// $Id: G4CrossSectionDataStore.cc,v 1.16 2009/01/24 11:54:47 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4CrossSectionDataStore
+//
+//
+// Modifications:
+// 23.01.2009 V.Ivanchenko add destruction of data sets
+//
 //
 
@@ -33,4 +47,10 @@
 #include "G4Nucleus.hh" 
 
+G4CrossSectionDataStore::G4CrossSectionDataStore() :
+  NDataSetList(0), verboseLevel(0)
+{}
+
+G4CrossSectionDataStore::~G4CrossSectionDataStore()
+{}
 
 G4double
@@ -392,5 +412,4 @@
   return anElement;
 }
-*/
 
 std::pair<G4double, G4double> 
@@ -513,19 +532,12 @@
   return std::pair<G4double, G4double>(ZZ, AA);
 }
-
+*/
 
 void
 G4CrossSectionDataStore::AddDataSet(G4VCrossSectionDataSet* aDataSet)
 {
-   if (NDataSetList == NDataSetMax) {
-      G4cout << "WARNING: G4CrossSectionDataStore::AddDataSet: "<<G4endl;
-      G4cout << "         reached maximum number of data sets";
-      G4cout << "         data set not added !!!!!!!!!!!!!!!!";
-      return;
-   }
-   DataSetList[NDataSetList] = aDataSet;
-   NDataSetList++;
-}
-
+  DataSetList.push_back(aDataSet);
+  NDataSetList++;
+}
 
 void
@@ -533,13 +545,9 @@
 BuildPhysicsTable(const G4ParticleDefinition& aParticleType)
 {
-   if (NDataSetList == 0) 
-   {
-     G4Exception("G4CrossSectionDataStore", "007", FatalException,
-                 "BuildPhysicsTable: no data sets registered");
-     return;
-   }
-   for (G4int i = NDataSetList-1; i >= 0; i--) {
+  if(NDataSetList > 0) {
+    for (G4int i=0; i<NDataSetList; i++) {
       DataSetList[i]->BuildPhysicsTable(aParticleType);
-   }
+    } 
+  }
 }
 
@@ -549,10 +557,11 @@
 DumpPhysicsTable(const G4ParticleDefinition& aParticleType)
 {
-   if (NDataSetList == 0) {
-      G4cout << "WARNING - G4CrossSectionDataStore::DumpPhysicsTable: no data sets registered"<<G4endl;
-      return;
-   }
-   for (G4int i = NDataSetList-1; i >= 0; i--) {
-      DataSetList[i]->DumpPhysicsTable(aParticleType);
-   }
-}
+  if (NDataSetList == 0) {
+    G4cout << "WARNING - G4CrossSectionDataStore::DumpPhysicsTable: "
+	   << " no data sets registered"<<G4endl;
+    return;
+  }
+  for (G4int i = NDataSetList-1; i >= 0; i--) {
+    DataSetList[i]->DumpPhysicsTable(aParticleType);
+  }
+}
Index: trunk/source/processes/hadronic/cross_sections/src/G4ElectroNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4ElectroNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4ElectroNuclearCrossSection.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4ElectroNuclearCrossSection.cc,v 1.29 2008/10/24 19:15:17 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc	(revision 1055)
@@ -42,5 +42,5 @@
 G4GGNuclNuclCrossSection::G4GGNuclNuclCrossSection() 
 : fUpperLimit( 100000 * GeV ),
-  fLowerLimit( 0.1 * GeV ),
+  fLowerLimit( 0.1 * MeV ),
   fRadiusConst( 1.08*fermi )  // 1.1, 1.3 ?
 {
@@ -115,5 +115,5 @@
 GetIsoZACrossSection(const G4DynamicParticle* aParticle, G4double tZ, G4double tA, G4double)
 {
-  G4double xsection, sigma, cofInelastic = 2.4, cofTotal = 2.0, nucleusSquare, ratio;
+  G4double xsection, sigma, cofInelastic = 2.4, cofTotal = 2.0, nucleusSquare, cB, ratio;
 
   G4double pZ = aParticle->GetDefinition()->GetPDGCharge();
@@ -132,36 +132,94 @@
   G4double pR = GetNucleusRadius(pA); 
 
-  sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscNS(theProton, pTkin, theProton) +
+  cB = GetCoulombBarier(aParticle, tZ, tA, pR, tR);
+
+  if(cB > 0.)
+  {
+
+    sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscNS(theProton, pTkin, theProton) +
           (pZ*tN+pN*tZ)*GetHadronNucleonXscNS(theProton, pTkin, theNeutron);
 
-  nucleusSquare = cofTotal*pi*( pR*pR + tR*tR );   // basically 2piRR
-
-  ratio = sigma/nucleusSquare;
-
-  xsection =  nucleusSquare*std::log( 1. + ratio );
-
-  fTotalXsc = xsection;
-
-  fInelasticXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic;
-
-  fElasticXsc   = fTotalXsc - fInelasticXsc;
-    
-  G4double difratio = ratio/(1.+ratio);
-
-  fDiffractionXsc = 0.5*nucleusSquare*( difratio - std::log( 1. + difratio ) );
-
-  // production to be checked !!! edit MK xsc
-
-  sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscMK(theProton, pTkin, theProton) +
+    nucleusSquare = cofTotal*pi*( pR*pR + tR*tR );   // basically 2piRR
+
+    ratio = sigma/nucleusSquare;
+
+    xsection =  nucleusSquare*std::log( 1. + ratio );
+
+    fTotalXsc = xsection;
+
+    fTotalXsc *= cB;
+
+    fInelasticXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic;
+
+    fInelasticXsc *= cB;
+
+    fElasticXsc   = fTotalXsc - fInelasticXsc;
+
+    // if (fElasticXsc < DBL_MIN) fElasticXsc = DBL_MIN;
+    /*    
+    G4double difratio = ratio/(1.+ratio);
+
+    fDiffractionXsc = 0.5*nucleusSquare*( difratio - std::log( 1. + difratio ) );
+    */
+    // production to be checked !!! edit MK xsc
+
+    sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscMK(theProton, pTkin, theProton) +
           (pZ*tN+pN*tZ)*GetHadronNucleonXscMK(theProton, pTkin, theNeutron);
  
-  ratio = sigma/nucleusSquare;
-
-  fProductionXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic;
-
-  if (fElasticXsc < 0.) fElasticXsc = 0.;
-
-  return xsection; 
-}
+    ratio = sigma/nucleusSquare;
+
+    fProductionXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic;
+
+    if (fElasticXsc < 0.) fElasticXsc = 0.;
+  }
+  else
+  {
+    fInelasticXsc  = 0.;
+    fTotalXsc      = 0.;
+    fElasticXsc    = 0.;
+    fProductionXsc = 0.;
+  }
+  return fInelasticXsc;   // xsection; 
+}
+
+////////////////////////////////////////////////////////////////////////////////////////
+//
+//
+
+G4double G4GGNuclNuclCrossSection::
+GetCoulombBarier(const G4DynamicParticle* aParticle, G4double tZ, G4double tA, G4double pR, G4double tR)
+{
+  G4double ratio;
+  G4double pZ = aParticle->GetDefinition()->GetPDGCharge();
+
+
+  G4double pTkin = aParticle->GetKineticEnergy();
+  // G4double pPlab = aParticle->GetTotalMomentum();
+  G4double pM    = aParticle->GetDefinition()->GetPDGMass();
+  // G4double tM    = tZ*proton_mass_c2 + (tA-tZ)*neutron_mass_c2; // ~ 1% accuracy
+  G4double tM    = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( G4int(tZ), G4int(tA) );
+  G4double pElab = pTkin + pM;
+  G4double totEcm  = std::sqrt(pM*pM + tM*tM + 2.*pElab*tM);
+  // G4double pPcm  = pPlab*tM/totEcm;
+  // G4double pTcm  = std::sqrt(pM*pM + pPcm*pPcm) - pM;
+  G4double totTcm  = totEcm - pM -tM;
+
+  G4double bC    = fine_structure_const*hbarc*pZ*tZ;
+           bC   /= pR + tR;
+           bC   /= 2.;  // 4., 2. parametrisation cof ??? vmg
+
+	   // G4cout<<"pTkin = "<<pTkin/GeV<<"; pPlab = "
+	   // <<pPlab/GeV<<"; bC = "<<bC/GeV<<"; pTcm = "<<pTcm/GeV<<G4endl;
+
+  if( totTcm <= bC ) ratio = 0.;
+  else             ratio = 1. - bC/totTcm;
+
+  // if(ratio < DBL_MIN) ratio = DBL_MIN;
+  if( ratio < 0.) ratio = 0.;
+
+  // G4cout <<"ratio = "<<ratio<<G4endl;
+  return ratio;
+}
+
 
 //////////////////////////////////////////////////////////////////////////
Index: trunk/source/processes/hadronic/cross_sections/src/G4HadronCaptureDataSet.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4HadronCaptureDataSet.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4HadronCaptureDataSet.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HadronCaptureDataSet.cc,v 1.8 2006/06/29 19:57:35 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/src/G4HadronCrossSections.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4HadronCrossSections.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4HadronCrossSections.cc	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/src/G4HadronElasticDataSet.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4HadronElasticDataSet.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4HadronElasticDataSet.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HadronElasticDataSet.cc,v 1.8 2006/06/29 19:57:39 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/src/G4HadronFissionDataSet.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4HadronFissionDataSet.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4HadronFissionDataSet.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HadronFissionDataSet.cc,v 1.8 2006/06/29 19:57:41 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/src/G4HadronInelasticDataSet.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4HadronInelasticDataSet.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4HadronInelasticDataSet.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HadronInelasticDataSet.cc,v 1.8 2006/06/29 19:57:43 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/src/G4IonsKoxCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4IonsKoxCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4IonsKoxCrossSection.cc	(revision 1055)
@@ -44,6 +44,5 @@
 
 // Apply energy check, if less than lower limit then 0 value is returned
-   if (  ke_per_N < lowerLimit )
-      return xsection;
+   // if (  ke_per_N < lowerLimit ) return xsection;
 
    G4int At = int (AA + 0.5);
@@ -57,4 +56,10 @@
 
    G4double Bc = Zt * Zp / ( ( rc / fermi ) * (  cubicrAp + cubicrAt ) );   // rc divide fermi
+   G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At ); 
+   G4double proj_mass = aParticle->GetMass(); 
+   G4double proj_momentum = aParticle->GetMomentum().mag(); 
+
+   G4double Ecm = calEcm ( proj_mass , targ_mass , proj_momentum ); 
+   if( Ecm <= Bc) return xsection;
 
    G4double Rvol = r0 * (  cubicrAp + cubicrAt );
@@ -69,10 +74,4 @@
 
    G4double Rint = Rvol + Rsurf;
-
-   G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At ); 
-   G4double proj_mass = aParticle->GetMass(); 
-   G4double proj_momentum = aParticle->GetMomentum().mag(); 
-
-   G4double Ecm = calEcm ( proj_mass , targ_mass , proj_momentum ); 
 
    xsection = pi * Rint * Rint * ( 1 - Bc / ( Ecm / MeV ) );
Index: trunk/source/processes/hadronic/cross_sections/src/G4IonsShenCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4IonsShenCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4IonsShenCrossSection.cc	(revision 1055)
@@ -47,6 +47,5 @@
 
 // Apply energy check, if less than lower limit then 0 value is returned
-   if (  ke_per_N < lowerLimit )
-      return xsection;
+   // if (  ke_per_N < lowerLimit ) return xsection;
 
    G4int At = G4int(AA);
@@ -63,7 +62,12 @@
    G4double r = Rt + Rp + 3.2;   // in fm
    G4double b = 1.0;   // in MeV/fm
+   G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
+   G4double proj_mass = aParticle->GetMass();
+   G4double proj_momentum = aParticle->GetMomentum().mag();
+
+   G4double Ecm = calEcmValue ( proj_mass , targ_mass , proj_momentum ); 
 
    G4double B = 1.44 * Zt * Zp / r - b * Rt * Rp / ( Rt + Rp ); 
-
+   if(Ecm <= B) return xsection;
    //G4double ke_per_N = aParticle->GetKineticEnergy() / Ap; 
 
@@ -74,9 +78,4 @@
    G4double R2 = 1.0 * ( At - 2 * Zt ) * Zp / ( Ap * At );
 
-   G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
-   G4double proj_mass = aParticle->GetMass();
-   G4double proj_momentum = aParticle->GetMomentum().mag();
-
-   G4double Ecm = calEcmValue ( proj_mass , targ_mass , proj_momentum ); 
 
    G4double R3 = 0.176 / std::pow ( G4double(Ecm) , G4double(one_third) ) * cubicrAt * cubicrAp / ( cubicrAt + cubicrAp );
Index: trunk/source/processes/hadronic/cross_sections/src/G4PhotoNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4PhotoNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4PhotoNuclearCrossSection.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/cross_sections/src/G4PiData.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4PiData.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4PiData.cc	(revision 1055)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // --------------------------------------------------------------------
Index: trunk/source/processes/hadronic/cross_sections/src/G4TripathiCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4TripathiCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4TripathiCrossSection.cc	(revision 1055)
@@ -39,5 +39,5 @@
                 G4double /*temperature*/) 
 {
-  G4double result = 0;
+  G4double result = 0.;
   
   const G4double targetAtomicNumber = AA;
@@ -60,5 +60,5 @@
   pTarget = pTarget+pProjectile;
   G4double E_cm = (pTarget.mag()-targetMass-pProjectile.m())/MeV;
-  
+  if(E_cm <= DBL_MIN) return result;  
   // done
   G4double r_rms_p = 0.6 * myNuleonRadius * 
@@ -78,5 +78,5 @@
   //done
   G4double B = 1.44*nProjProtons*nTargetProtons/Radius;
-  
+  if(E_cm <= B) return result; 
   // done
   G4double Energy = kineticEnergy/projectileAtomicNumber;
@@ -133,5 +133,5 @@
                  (1-B/E_cm);
   
-  if(result < 0) result = 0;
+  if(result < 0.) result = 0.;
   return result*m2;
 
Index: trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.cc	(revision 1055)
@@ -153,4 +153,7 @@
   pT = pT + pP;
   G4double E_cm = (pT.mag()-mT-pP.m())/MeV;
+  if(E_cm <= DBL_MIN) return result;  
+
+
 //
 //
@@ -169,5 +172,6 @@
 
   G4double B = 1.44 * ZP * ZT / Radius;
-//
+  if(E_cm <= B) return result; 
+
 //
 // Now determine other parameters associated with the parametric
@@ -289,6 +293,5 @@
   if (!lowEnergyCheck)
   {
-    if (result < 0.0)
-      result = 0.0;
+    if (result < 0.0)  result = 0.0;
     else if (E < 6.0*MeV)
     {
Index: trunk/source/processes/hadronic/cross_sections/src/G4VCrossSectionDataSet.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4VCrossSectionDataSet.cc	(revision 1007)
+++ trunk/source/processes/hadronic/cross_sections/src/G4VCrossSectionDataSet.cc	(revision 1055)
@@ -24,8 +24,33 @@
 // ********************************************************************
 //
-// $Id: G4VCrossSectionDataSet.cc,v 1.7 2006/12/29 02:05:48 dennis Exp $
-// 
+// $Id: G4VCrossSectionDataSet.cc,v 1.8 2009/01/24 11:54:47 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:    G4VCrossSectionDataSet
+//
+// Author  F.W. Jones, TRIUMF, 20-JAN-97
+//
+// Modifications:
+// 23.01.2009 V.Ivanchenko move constructor and destructor to source
+//
 
 #include "G4VCrossSectionDataSet.hh"
+#include "G4CrossSectionDataSetRegistry.hh"
+
+G4VCrossSectionDataSet::G4VCrossSectionDataSet() :
+  verboseLevel(0)
+{
+  G4CrossSectionDataSetRegistry::Instance()->Register(this);
+}
+
+G4VCrossSectionDataSet::~G4VCrossSectionDataSet()
+{
+  G4CrossSectionDataSetRegistry::Instance()->DeRegister(this);
+}
 
 // Override this method to test for particle and isotope applicability
Index: trunk/source/processes/hadronic/management/History
===================================================================
--- trunk/source/processes/hadronic/management/History	(revision 1007)
+++ trunk/source/processes/hadronic/management/History	(revision 1055)
@@ -14,4 +14,23 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+25 February 2009 Vladimir Ivanchenko (hadr-man-V09-02-04)
+---------------------------------------------------------
+- G4HadronicProcessStore - added protection to the Clean method 
+
+22 February 2009 Vladimir Ivanchenko (hadr-man-V09-02-03)
+---------------------------------------------------------
+
+14 February 2009 Vladimir Ivanchenko (hadr-man-V09-02-02)
+---------------------------------------------------------
+- G4HadronicProcessStore - added Clean method and cleanup of model 
+                           and cross section stores
+
+06 February 2009 Vladimir Ivanchenko (hadr-man-V09-02-01)
+---------------------------------------------------------
+
+24 January 2009 Vladimir Ivanchenko (hadr-man-V09-02-00)
+-------------------------------------------------------
+- G4HadronicProcessStore - added destruction of processes
 
 01 December 2008 Dennis Wright (hadr-man-V09-01-10)
Index: trunk/source/processes/hadronic/management/include/G4HadronicProcessStore.hh
===================================================================
--- trunk/source/processes/hadronic/management/include/G4HadronicProcessStore.hh	(revision 1007)
+++ trunk/source/processes/hadronic/management/include/G4HadronicProcessStore.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4HadronicProcessStore.hh,v 1.3 2008/10/22 07:58:20 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4HadronicProcessStore.hh,v 1.5 2009/02/15 16:50:15 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -72,4 +72,6 @@
   ~G4HadronicProcessStore();
 
+  void Clean();
+
   G4double GetInelasticCrossSectionPerVolume(
     const G4ParticleDefinition *aParticle,
Index: trunk/source/processes/hadronic/management/src/G4HadronicProcessStore.cc
===================================================================
--- trunk/source/processes/hadronic/management/src/G4HadronicProcessStore.cc	(revision 1007)
+++ trunk/source/processes/hadronic/management/src/G4HadronicProcessStore.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4HadronicProcessStore.cc,v 1.7 2008/10/22 07:58:20 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4HadronicProcessStore.cc,v 1.12 2009/02/25 16:29:03 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -39,7 +39,9 @@
 //
 // Modifications:
-//
+// 23.01.2009 V.Ivanchenko add destruction of processes
 //
 // Class Description:
+// Singleton to store hadronic processes, to provide access to processes
+// and to printout information about processes
 //
 // -------------------------------------------------------------------
@@ -53,4 +55,6 @@
 #include "G4Electron.hh"
 #include "G4Proton.hh"
+#include "G4HadronicInteractionRegistry.hh"
+#include "G4CrossSectionDataSetRegistry.hh"
 
 G4HadronicProcessStore* G4HadronicProcessStore::theInstance = 0;
@@ -71,9 +75,40 @@
 G4HadronicProcessStore::~G4HadronicProcessStore()
 {
-  /*
-  for (G4int i=0; i<n_proc; i++) {
-    if( process[i] ) delete process[i];
-  }
-  */
+  Clean();
+  G4HadronicInteractionRegistry::Instance()->Clean();
+  G4CrossSectionDataSetRegistry::Instance()->Clean();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
+
+void G4HadronicProcessStore::Clean()
+{
+  G4int i;
+  //G4cout << "G4HadronicProcessStore::Clean() Nproc= " << n_proc
+  //	 << "  Nextra= " << n_extra << G4endl;
+  if(n_proc > 0) {
+    for (i=0; i<n_proc; i++) {
+      if( process[i] ) {
+        //G4cout << "G4HadronicProcessStore::Clean() delete hadronic " << i << G4endl;
+	//G4cout <<  process[i]->GetProcessName() << G4endl;
+	delete process[i];
+	process[i] = 0;
+      }
+    }
+  }
+  if(n_extra > 0) {
+    for(i=0; i<n_extra; i++) {
+      if(extraProcess[i]) {
+        //G4cout << "G4HadronicProcessStore::Clean() delete extra "  
+	//       << i << G4endl;
+	//G4cout << extraProcess[i]->GetProcessName() << G4endl;
+	delete extraProcess[i];
+        extraProcess[i] = 0;
+      }
+    }
+  }
+  //G4cout << "G4HadronicProcessStore::Clean() done" << G4endl; 
+  n_extra = 0;
+  n_proc = 0;
 }
 
@@ -325,6 +360,11 @@
 void G4HadronicProcessStore::Register(G4HadronicProcess* proc) 
 { 
-  for(G4int i=0; i<n_proc; i++) {if(process[i] == proc) return;}
-    
+  if(0 < n_proc) {
+    for(G4int i=0; i<n_proc; i++) {
+      if(process[i] == proc) return;
+    }
+  }
+  //G4cout << "G4HadronicProcessStore::Register hadronic " << n_proc
+  //	 << "  " << proc->GetProcessName() << G4endl;
   n_proc++;
   process.push_back(proc);
@@ -384,8 +424,9 @@
 void G4HadronicProcessStore::DeRegister(G4HadronicProcess* proc)
 {
+  if(0 == n_proc) return;
   for(G4int i=0; i<n_proc; i++) {
     if(process[i] == proc) {
       process[i] = 0;
-      break;
+      return;
     }
   }
@@ -396,5 +437,11 @@
 void G4HadronicProcessStore::RegisterExtraProcess(G4VProcess* proc)
 {
-  for(G4int i=0; i<n_extra; i++) {if(extraProcess[i] == proc) return;}
+  if(0 < n_extra) {
+    for(G4int i=0; i<n_extra; i++) {
+      if(extraProcess[i] == proc) return;
+    }
+  }
+  //G4cout << "Extra Process: " << n_extra << "  " <<  proc->GetProcessName() 
+  //	 << "  " << proc << G4endl;
     
   n_extra++;
@@ -437,8 +484,11 @@
 void G4HadronicProcessStore::DeRegisterExtraProcess(G4VProcess* proc)
 {
+  //G4cout << "Deregister Extra Process: " << proc << "   " << proc->GetProcessName() << G4endl;
+  if(0 == n_extra) return;
   for(G4int i=0; i<n_extra; i++) {
     if(extraProcess[i] == proc) {
       extraProcess[i] = 0;
-      break;
+      //G4cout << "Extra Process: " << i << " is deregisted " << G4endl;
+      return;
     }
   }
Index: trunk/source/processes/hadronic/models/cascade/History
===================================================================
--- trunk/source/processes/hadronic/models/cascade/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/cascade/History	(revision 1055)
@@ -14,4 +14,23 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+15 Apr 2009 Dennis Wright (hadr-casc-V09-02-02)
+-----------------------------------------------
+- previous tag no longer used.  Bring hadr-casc-V09-02-00 back to
+  HEAD and re-tag
+
+21 Feb 2009 Dennis Wright (hadr-casc-V09-02-01)
+-----------------------------------------------
+- add printCrossSection method to G4CascadSpecialFunctions
+- in GeElementaryParticleCollider, add high energy flag to distinguish
+  "string-like" behavior
+- G4IntraNucleiCascader.cc - allow secondaries from HE interaction to 
+  leave nucleus without interacting
+- G4NucleiModel - get high_energy_interaction flag value from G4ElementaryParticleCollider
+
+11 Feb 2009 V.Ivanchenko (hadr-casc-V09-02-00)
+-----------------------------------------------
+- set absorption coefficient 1.0 instead of 0.2 inside
+  G4CascadSpecialFunctions (D.Wright)
 
 25 Nov 2008 Dennis Wright (hadr-casc-V09-01-10)
Index: trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadSpecialFunctions.cc
===================================================================
--- trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadSpecialFunctions.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadSpecialFunctions.cc	(revision 1055)
@@ -113,5 +113,6 @@
   }
 
-  const G4double corr_fac = 0.2;
+  // was 0.2 since the beginning 
+  const G4double corr_fac = 1.0;
   G4double csec = 0.0;
   
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/History
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/History	(revision 1055)
@@ -4,37 +4,38 @@
        ==========================================================
 
-        History file for hadronic/models/chiral_inv_phase_space/interface 
+History file for  hadronic/models/chiral_inv_phase_space/body  directory.
 	
-This file should be used to summarize modifications introduced in the 
-code and to keep track of all tags.
+Summarize all code modifications & keep track of all tags in this file.
 
-     ---------------------------------------------------------------
-     * Please list in reverse chronological order (last date on top)
-     ---------------------------------------------------------------
+****************************************************************************
+*** Geant4 developers can not make changes in this directory or make the ***
+*** History records without permision of M.Kosov: Mikhail.Kossov@cern.ch ***
+****************************************************************************
 
-31-Mar-2008 Dennis Wright               (hadr-chips-body-V09-01-04)
--------------------------------------------------------------------
-- add more parentheses around && within || to satisfy gcc-4.3 compiler
-  files affected:
-    G4QChipolino.cc
-    G4QEnvironment.cc
-    G4QNucleus.cc
-    G4Quasmon.cc
+     -----------------------------------------------------------------
+     * Please list in reverse chronological order (last date on top) *
+     -----------------------------------------------------------------
 
-19-Mar-2008 Dennis Wright               (hadr-chips-body-V09-01-03)
--------------------------------------------------------------------
-- add parentheses around && within || to satisfy gcc-4.3 compiler
-  files affected:
-    G4QChipolino.cc
-    G4QContent.cc
-    G4QEnvironment.cc
-    G4QNucleus.cc
-    G4QPDGCode.cc
-    G4Quasmon.cc
 
-- add braces and ; for empty while blocks to satisfy gcc-4.3
-  files affected:
-    G4QHadron.cc
+26-May-2009 M.Kosov                              (hadr-chips-body-V09-02-06)
+----------------------------------------------------------------------------
+Safety check of nDelta in the hadronization probability calculations (G4Quasmon)
+to avoid /zero
 
-18-Mar-2008 Vladimir Ivanchenko         (hadr-chips-body-V09-01-02)
-- G4QNucleus - fixed compillation warnings at Windows for constructors
+26-May-2009 M.Kosov                              (hadr-chips-body-V09-02-05)
+----------------------------------------------------------------------------
+In low energy nHe and pHe reactions, when only elastic scattering is possible,
+the inelastic application makes a complain, while it is making the elastic
+scattering (with very low cross-section). *** The complain is closed ***
+
+15-May-2009 M.Kosov                              (hadr-chips-body-V09-02-04)
+----------------------------------------------------------------------------
+For rare cases of the output hadron mass below the GS mass instead of Exception
+in the G4QEnvironment class a fill As Is for the hadron is used with appropriate
+warning. If this case can be reproduced, it should be debugged in future.
+
+29-Apr-2009 M.Kosov                              (hadr-chips-body-V09-02-03)
+----------------------------------------------------------------------------
+The rare situation was Found by Alberto. It is improved in G4QEnvironment.
+When the Hypernucleus can not decay in the residual nucleus and pion, then
+now it is decayed in the residual nucleus and gamma. 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QBesIKJY.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QBesIKJY.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QBesIKJY.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QBesIKJY.hh,v 1.2 2006/06/29 20:05:55 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QBesIKJY.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QBesIKJY ----------------
@@ -32,5 +32,7 @@
 //  class header for Bessel I0/I1 and K0/K1 functions in CHIPS Model
 // --------------------------------------------------------------------
-
+// Short description: CHIPS bessel functions for mass and scattering
+// integrals.
+// --------------------------------------------------------------------
 #ifndef G4QBesIKJY_h
 #define G4QBesIKJY_h 1
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCHIPSWorld.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCHIPSWorld.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCHIPSWorld.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QCHIPSWorld.hh,v 1.25 2006/06/29 20:05:57 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCHIPSWorld.hh,v 1.26 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCHIPSWorld ----------------
@@ -32,4 +32,17 @@
 //  class header for CHIPS World of particles in CHIPS Model
 // ------------------------------------------------------------
+// Short description: The CHIPS World is a world of elementary particles
+// and nuclear fragments. This class is a singletone, but without fixed
+// limits. E.g. the nuclear fragments as possible G4Candidates can be
+// initialized in the CHIPS World only up to Be8 od C12 or other bigger
+// nuclear fragment. If one need the heavy fragment production then the
+// the CHIPS World must be initialized up to these fragments (see the
+// CHIPS Manual), but the price in performans will be big, because in
+// each act of the fragmentation competition these numerous candidates
+// take place in the competition and the hadronization probability is
+// calculated each time for each of them, so the Be8 limit (Be8->alpha+
+// alpha decays very fast and contribute to the alpha-spectrum) is the
+// most optimal.
+// -------------------------------------------------------------------
 
 #ifndef G4QCHIPSWorld_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCandidate.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCandidate.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCandidate.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QCandidate.hh,v 1.28 2006/06/29 20:05:59 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCandidate.hh,v 1.29 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidate ----------------
@@ -32,4 +32,8 @@
 //  class header for Quasmon initiated Candidates used by the CHIPS Model
 // ----------------------------------------------------------------------
+// Short description: A candidate for hadronization. The candidates
+// (hadrons or nuclear fragments) are competative, each quark of a
+// Quasmon select which candidate to use for hadronization
+// ------------------------------------------------------------------
 
 #ifndef G4QCandidate_h
@@ -81,5 +85,5 @@
   void SetNBMass(G4double newMass);         // Set mass bounded to Total Nucleus
 
-// Body  								   
+// Body             
 private:
   G4bool   possible;                // permission/forbiding preFlag to be a hadron/fragment
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCandidateVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCandidateVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCandidateVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QCandidateVector.hh,v 1.21 2006/06/29 20:06:01 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCandidateVector.hh,v 1.22 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -32,4 +32,8 @@
 // Type defenition for Quasmon initiated Candidates used by CHIPS model
 // -----------------------------------------------------------------
+// Short description: A candidate for hadronization. The candidates
+// (hadrons or nuclear fragments) are competative, each quark of a
+// Quasmon select which candidate to use for hadronization
+// ------------------------------------------------------------------
 
 #ifndef G4QCandidateVector_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QChipolino.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QChipolino.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QChipolino.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QChipolino.hh,v 1.23 2006/06/29 20:06:03 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QChipolino.hh,v 1.24 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QChipolino ----------------
@@ -32,4 +32,10 @@
 //  class header for Chipolino (Double Hadron) in CHIPS Model
 // ----------------------------------------------------------
+// Short description: In the CHIPS model not only hadrons are considered,
+// but the di-hadrons, which can not be convereged to the quark content
+// of only one hadron (e.g. pi+pi+, K+p, Delta++p etc). This kind of
+// hadronic states, which can be easily decayed in two hadrons, is called
+// Chipolino-particle in the model.
+// ---------------------------------------------------------------------- 
 
 #ifndef G4QChipolino_h
@@ -56,5 +62,5 @@
 
   // Selectors
-  G4double              GetMass();            // Get mass of the Chipolino (MinDoubleHadronMass)
+  G4double              GetMass();            // Get ChipolinoMass (MinDoubleHadronMass)
   G4double              GetMass2();           // Get mass^2 of the Chipolino
   G4QPDGCode            GetQPDG1();           // Get 1-st QPDG of the Chipolino
@@ -66,12 +72,12 @@
   // Modifiers
   void SetHadronQPDG(const G4QPDGCode& QPDG); // Set QPDG of 1-st Hadron of the Chipolino
-  void SetHadronPDGCode(const G4int& PDGCode);// Set PDGCode of 1-st Hadron of the Chipolino
-  void SetHadronQCont(const G4QContent& QC);  // Set QContent of 1-st Hadron of the Chipolino
+  void SetHadronPDGCode(const G4int& PDGCode);// Set PDGCode of 1st Hadron of the Chipolino
+  void SetHadronQCont(const G4QContent& QC);  // Set QContent of 1st Hadron of theChipolino
 
 private:  
   G4QPDGCode            theQPDG1;             // QPDG of the 1-st Hadron of the Chipolino
   G4QPDGCode            theQPDG2;             // QPDG of the 2-nd Hadron of the Chipolino
-  G4QContent            theQCont;             // Quark Content of the whole Chipolino
-  G4QContent            theQCont1;            // Quark Content of the 1-st Hadron of Chipolino
+  G4QContent            theQCont;             // QuarkContent of the whole Chipolino
+  G4QContent            theQCont1;            // QuarkCont. of the 1st Hadron of Chipolino
   G4double              minM;                 // Minimal Mass of Chipolino
 };
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QContent.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QContent.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QContent.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QContent.hh,v 1.28 2006/06/29 20:06:05 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QContent.hh,v 1.29 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QContent ----------------
@@ -32,4 +32,14 @@
 //  class header for Quasmon initiated Contents used by the CHIPS Model
 // ----------------------------------------------------------------------
+// Short description: This is the basic class of the CHIPS model. It
+// describes the quark content of the Quasmon, which is a generalized
+// hadronic state. All Quasmons are bags, characterized by the quark
+// Content (QContent), but the spin is not fixed and only light (u,d,s)
+// quarks are considered (SU(3)). The hadrons are the ground states for
+// the corresponding quasmons. The Chipolino (G4QChipolino) or nuclear
+// cluster are examples for another Quark Content.
+// --------------------------------------------------------------------
+// @@ In future total spin & c,b,t of the Hadron can be added @@ M.K.@@
+// --------------------------------------------------------------------
 
 #ifndef G4QContent_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QDecayChan.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QDecayChan.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QDecayChan.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QDecayChan.hh,v 1.23 2006/06/29 20:06:07 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDecayChan.hh,v 1.24 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QDecayChan ----------------
@@ -32,4 +32,11 @@
 //  class header for Decay Channel definition in CHIPS Model
 // ------------------------------------------------------------
+// Short description: In the CHIPS World the particles (G4QParticle)
+// are defined. For unstable particles there is a G4QDecayChannelVector
+// which describes different channels of decay for the particular
+// particle. So the G4QDecayChannel class is the class for the description
+// of such a decay channel in two or three particles (the secondaries can
+// be unstable too and have firther decay).
+// -------------------------------------------------------------------
 
 #ifndef G4QDecayChan_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QDecayChanVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QDecayChanVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QDecayChanVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QDecayChanVector.hh,v 1.19 2006/06/29 20:06:09 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDecayChanVector.hh,v 1.20 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -32,4 +32,11 @@
 // Type defenition for Decay Channel Vector in CHIPS model
 // --------------------------------------------------------------
+// Short description: In the CHIPS World the particles (G4QParticle)
+// are defined. For unstable particles there is a G4QDecayChannelVector
+// which describes different channels of decay for the particular
+// particle. So the G4QDecayChannel class is the class for the description
+// of such a decay channel in two or three particles (the secondaries can
+// be unstable too and have firther decay).
+// -------------------------------------------------------------------
 
 #ifndef G4QDecayChanVector_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QEnvironment.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QEnvironment.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QEnvironment.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QEnvironment.hh,v 1.32 2007/10/07 13:31:41 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QEnvironment.hh,v 1.33 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QEnvironment ----------------
@@ -32,4 +32,12 @@
 //      header for Multy Quasmon Environment in the CHIPS Model
 // ------------------------------------------------------------
+// Short description: The G4QEnvironment class corresponds to the nuclear
+// environment,  containing excited nucleons or nuclear clusters
+// (G4Quasmons). In the constructer the nucleus (G4QNucleus) is clusterized
+// and then the projectile hadron (or hadrons) can create one (or a few)
+// Quasmons, which are fragmented by the Fragment member function. As a
+// result a vector of G4QHadrons is created, which can include the residual
+// nucleus in the ground state.
+//---------------------------------------------------------------------
 
 #ifndef G4QEnvironment_h
@@ -82,4 +90,5 @@
   void             EvaporateResidual(G4QHadron* h);// Final Evaporation of a nucl. fragment
   void             DecayBaryon(G4QHadron* dB);     // Decay baryon (gamma+N or Delta->N+Pi)
+  void             DecayAntistrange(G4QHadron* aS);// Decay Antistrange nucleus
   G4bool           CheckGroundState(G4Quasmon* quasm,G4bool corFlag=false);//as G4Q for QHV
   G4bool           DecayInEnvQ(G4Quasmon* quasm);  // Use befor evaporation in PANIC case
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QException.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QException.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QException.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QException.hh,v 1.10 2006/06/29 20:06:13 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QException.hh,v 1.11 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QException ----------------
@@ -32,4 +32,6 @@
 //  header of the class for an Exception used by the CHIPS Model
 // ---------------------------------------------------------------
+// Short description: Just an internal CHIPS Exception Messenger
+// -------------------------------------------------------------
 
 #ifndef G4QException_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QFragmentation.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QFragmentation.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QFragmentation.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QFragmentation.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QFragmentation.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -----------------------------------------------------------------------------
@@ -38,4 +38,6 @@
 //     G4QGSModels
 //     G4ExcitedStringDecay
+// -----------------------------------------------------------------------------
+// Short description: CHIPS string fragmentation class
 // -----------------------------------------------------------------------------
 //
@@ -70,6 +72,6 @@
   void Init(G4double theZ, G4double theA)
   {
-	   if(!theNucleus) theNucleus = new G4QNucleus(G4int(theZ),G4int(theA-theZ+.0001));
-	   theNucleus->InitByPDG(90000000+G4int(theZ)*1000+G4int(theA-theZ+.0001));
+    if(!theNucleus) theNucleus = new G4QNucleus(G4int(theZ),G4int(theA-theZ+.0001));
+    theNucleus->InitByPDG(90000000+G4int(theZ)*1000+G4int(theA-theZ+.0001));
   }
      
@@ -116,9 +118,9 @@
   static G4double theNucleonRadius;
   // Parameters of diffractional fragmentation
-	 static G4double widthOfPtSquare;	  // width^2 of pt for string excitation
-	 static G4double minExtraMass;	     // minimum excitation mass 
-	 static G4double minmass;	          // mean pion transverse mass; used for Xmin 
+  static G4double widthOfPtSquare;   // width^2 of pt for string excitation
+  static G4double minExtraMass;      // minimum excitation mass 
+  static G4double minmass;           // mean pion transverse mass; used for Xmin 
 
-		// Body
+  // Body
   G4QInteractionVector theInteractions;
   G4QHadronVector      theTargets; 
@@ -134,4 +136,2 @@
 
 #endif
-
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadron.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadron.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadron.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QHadron.hh,v 1.36 2008/01/09 09:37:24 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QHadron.hh,v 1.37 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QHadron ----------------
@@ -32,4 +32,9 @@
 //  class header for Hadrons generated by the CHIPS Model
 // ------------------------------------------------------
+// Short description: In CHIPS all particles are G4QHadrons, while they
+// can be leptons, gammas or nuclei. The G4QPDGCode makes the difference.
+// In addition the 4-momentum is a basic value, so the mass can be
+// different from the GS mass (e.g. for the virtual gamma).
+// -------------------------------------------------------------------
 
 #ifndef G4QHadron_h
@@ -205,3 +210,2 @@
 }
 #endif
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadronBuilder.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadronBuilder.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadronBuilder.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QHadronBuilder.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QHadronBuilder.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -----------------------------------------------------------------------------
@@ -36,4 +36,10 @@
 //     For comparison mirror member functions are taken from G4 class:
 //     G4HadronBuilder
+// -----------------------------------------------------------------------------
+// Short description: A CHIPS class for the builder of the G4QHadron, which is a
+// resulting object for the string fragmentation. the G4QHadron has specific
+// parameters, which are not included in the G4QParticle from the CHIPS World,
+// but necessary for the string fragmentation. When the G4QHadron is created
+// (builded), it is converted to the CHIPS particle.
 // -----------------------------------------------------------------------------
 //
@@ -58,5 +64,5 @@
   G4QHadron* Meson(G4QParton* black, G4QParton* white, Spin spin);
   G4QHadron* Baryon(G4QParton* black,G4QParton* white, Spin spin);
-		// Body
+  // Body
   G4double mesonSpinMix;
   G4double baryonSpinMix;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadronVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadronVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadronVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QHadronVector.hh,v 1.22 2006/11/16 11:36:09 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QHadronVector.hh,v 1.23 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -32,10 +32,16 @@
 // Type defenition for a Vector of Hadrons - output of CHIPS model
 // ---------------------------------------------------------------
+// Short description: In CHIPS all particles are G4QHadrons, while they
+// can be leptons, gammas or nuclei. The G4QPDGCode makes the difference.
+// In addition the 4-momentum is a basic value, so the mass can be
+// different from the GS mass (e.g. for the virtual gamma). This class
+// is made for the output list of hadrons.
+// -------------------------------------------------------------------
 
 #ifndef G4QHadronVector_h
 #define G4QHadronVector_h 1
 //
-// $Id: G4QHadronVector.hh,v 1.22 2006/11/16 11:36:09 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QHadronVector.hh,v 1.23 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QInteraction.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QInteraction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QInteraction.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QInteraction.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QInteraction.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 
@@ -41,4 +41,7 @@
 //   G4InteractionContent
 // -------------------------------------------------------------------
+//  Short description: Classify the interaction in soft/hard/diffractive
+//  parts for firther treatment by the QGS algorithm.
+// ---------------------------------------------------------------------
 
 #include "globals.hh"
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QInteractionVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QInteractionVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QInteractionVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QInteractionVector.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QInteractionVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -37,6 +37,6 @@
 
 //
-// $Id: G4QInteractionVector.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QInteractionVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------------
@@ -47,4 +47,7 @@
 //   class for a storing colliding particles in PartonString Models
 // -------------------------------------------------------------------
+//  Short description: Classify the interaction in soft/hard/diffractive
+//  parts for firther treatment by the QGS algorithm.
+// ---------------------------------------------------------------------
 
 #include "G4QInteraction.hh"
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QIsotope.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QIsotope.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QIsotope.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QIsotope.hh,v 1.5 2006/06/29 20:06:19 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QIsotope.hh,v 1.6 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -33,8 +33,8 @@
 //  Header of the G4QIsotope class of the CHIPS Simulation Branch in GEANT4
 // ----------------------------------------------------------------------------
-//  It contains information about natural abundances of stable and long living 
-//  isotopes and a NEW "Element" can be initialised for any isotope set.
-//  Randomization of isotopes of the Natural Elements is hardwired and fast
-//  Randomization of isotopes of the user defined Elements is a bit slower
+//  Short descriptionIt contains information about natural abundances of stable
+//  and long living isotopes and a NEW "Element" can be initialised for any
+//  isotope set. Randomization of isotopes of the Natural Elements is hardwired and
+//  fast randomization of isotopes of the user defined Elements is a bit slower
 //  CrossSectionWeighted randomisation of isotopes is slow (same for Nat and New)
 // -------------------------------------------------------------------------------
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QNucleus.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QNucleus.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QNucleus.hh	(revision 1055)
@@ -25,11 +25,14 @@
 //
 //
-// $Id: G4QNucleus.hh,v 1.33 2007/10/31 13:23:07 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QNucleus.hh,v 1.34 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QNucleus ----------------
 //             by Mikhail Kossov, Sept 1999.
-//  class header for Quasmon initiated Candidates used by the CHIPS Model
-// ----------------------------------------------------------------------
+//  class header for the nuclei and nuclear environment of the CHIPS Model
+// -----------------------------------------------------------------------
+//  Short description: a class describing properties of nuclei, which
+//  are necessary for the CHIPS Model.
+// -----------------------------------------------------------------------
 
 #ifndef G4QNucleus_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGCode.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGCode.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGCode.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QPDGCode.hh,v 1.26 2006/06/29 20:06:23 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPDGCode.hh,v 1.27 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QPDGCode ----------------
@@ -32,4 +32,11 @@
 //  class header for Hadron definition in CHIPS Model
 // ------------------------------------------------------------
+// Short description: The PDG Code is made on the basis of the Quark
+// Content (G4QuarkContent) of the hadronic state (including nuclear
+// fragments). The PDG code of the ground state (e.g. pi, N, etc.) is
+// calculated. It includes a complicated algortithm of the G.S. mass
+// calculation for nuclear fragments (now it is synchronised with the
+// G4 nuclear massess).
+// -------------------------------------------------------------------
 
 #ifndef G4QPDGCode_h
@@ -265,5 +272,2 @@
 
 #endif
-
-
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGCodeVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGCodeVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGCodeVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QPDGCodeVector.hh,v 1.19 2006/06/29 20:06:25 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPDGCodeVector.hh,v 1.20 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -32,4 +32,11 @@
 // Type defenition for Hadron definition in CHIPS model
 // ---------------------------------------------------------------
+// Short description: The PDG Code is made on the basis of the Quark
+// Content (G4QuarkContent) of the hadronic state (including nuclear
+// fragments). The PDG code of the ground state (e.g. pi, N, etc.) is
+// calculated. It includes a complicated algortithm of the G.S. mass
+// calculation for nuclear fragments (now it is synchronised with the
+// G4 nuclear massess).
+// -------------------------------------------------------------------
 
 #ifndef G4QPDGCodeVector_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGToG4Particle.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGToG4Particle.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGToG4Particle.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QPDGToG4Particle.hh,v 1.4 2006/06/29 20:06:27 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPDGToG4Particle.hh,v 1.5 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QPDGToG4Particle header ----------------
@@ -35,4 +35,7 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: This is a helper class, which converts the PDG-defined
+// G4QHadrons of the CHIPS model to the G4 particles, defined by the singetones.
+// -----------------------------------------------------------------------------
 
 #ifndef G4QPDGToG4Particle_hh
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParentCluster.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParentCluster.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParentCluster.hh	(revision 1055)
@@ -25,11 +25,17 @@
 //
 //
-// $Id: G4QParentCluster.hh,v 1.23 2006/06/29 20:06:29 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QParentCluster.hh,v 1.24 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QParentCluster ----------------
 //             by Mikhail Kossov, Sept 1999.
 //  class header for a Parent nuclear cluster in the CHIPS Model
-// -------------------------------------------------------------
+// -------------------------------------------------------------------
+// Short description: The parent cluster is the cluster, which can be
+// used for the nuclear fragment production. Different clusters csn be
+// used as the parent cluser for the particular G4QCandidate (nuclear
+// fragment), e.g. t and He3 for the t-fragment production. So the
+// G4QParentClusterVector is needed.
+// -------------------------------------------------------------------
 
 #ifndef G4QParentCluster_h
@@ -57,26 +63,26 @@
 
   // Selectors
-  G4int      GetPDGCode()      const;   // Get PDG code of the Parent Cluster
-  G4double   GetProbability()  const;   // Get a probability of hadronization on it
-  G4int      GetNQPart2()      const;   // Get n-2 for the fragment
-  G4QContent GetTransQC()      const;   // Get QuarkCont of a Pseudo Exchange Meson
-  G4double   GetLow()          const;   // Get a low limit for randomization
-  G4double   GetHigh()         const;   // Get a high limit for randomization
-  G4double   GetEBMass()       const;   // Get a Nuclear Bounded mass of the parent cluster
-  G4double   GetEBind()        const;   // Get Environment Binding energy for the parent cluster
-  G4double   GetNBMass()       const;   // Get an Environmental bounded mass of the parent cluster
-  G4double   GetNBind()        const;   // Get Total Nucleus Binding energy for the parent cluster
+  G4int      GetPDGCode()     const; // Get PDG code of the Parent Cluster
+  G4double   GetProbability() const; // Get a probability of hadronization on it
+  G4int      GetNQPart2()     const; // Get n-2 for the fragment
+  G4QContent GetTransQC()     const; // Get QuarkCont of a Pseudo Exchange Meson
+  G4double   GetLow()         const; // Get a low limit for randomization
+  G4double   GetHigh()        const; // Get a high limit for randomization
+  G4double   GetEBMass()      const; // Get a Nuclear Bounded mass of the parent cluster
+  G4double   GetEBind()       const; // Get Environment BindingEnergy for the parentCluster
+  G4double   GetNBMass()      const; // Get Environmental BoundedMass of the parent Cluster
+  G4double   GetNBind()       const; // Get TotalNucleusBindingEnergy for the parentCluster
 
   // Modifiers
-  void  SetPDGCode(G4int newPDGCode);                // Set PDG code of the Parent Cluster
-  void  SetProbability(G4double probab);             // Set probab. to hadronize on this cluster
-  void  SetNQPart2(G4int nm2);                       // Get n-2 for the fragment
-  void  SetTransQC(G4QContent newTrans);             // Set QuarkCont of a Pseudo Exchange Meson
-  void  SetLow(G4double loLim);                      // Set a low limit for hadronization
-  void  SetHigh(G4double hiLim);                     // Set a high limit for hadronization
-  void  SetEBMass(G4double bMass);                   // Set a bounded mass of the parent cluster in E
-  void  SetEBind(G4double bEn);                      // Set binding energy of the parent cluster in E
-  void  SetNBMass(G4double bMass);                   // Set a bounded mass of the parent cluster in N
-  void  SetNBind(G4double bEn);                      // Set binding energy of the parent cluster in N
+  void  SetPDGCode(G4int newPDGCode);    // Set PDG code of the Parent Cluster
+  void  SetProbability(G4double probab); // Set probab. to hadronize on this cluster
+  void  SetNQPart2(G4int nm2);           // Get n-2 for the fragment
+  void  SetTransQC(G4QContent newTrans); // Set QuarkCont of a Pseudo Exchange Meson
+  void  SetLow(G4double loLim);          // Set a low limit for hadronization
+  void  SetHigh(G4double hiLim);         // Set a high limit for hadronization
+  void  SetEBMass(G4double bMass);       // Set a bounded mass of the parent cluster in E
+  void  SetEBind(G4double bEn);          // Set binding energy of the parent cluster in E
+  void  SetNBMass(G4double bMass);       // Set a bounded mass of the parent cluster in N
+  void  SetNBind(G4double bEn);          // Set binding energy of the parent cluster in N
 
   // General
@@ -91,5 +97,5 @@
   // Secondary
   G4int               nQPart2;
-  G4QContent          transQC;                         // Quark Content of pseudo exchange meson
+  G4QContent          transQC;           // Quark Content of the pseudo exchange meson
   G4double            lowLimit;
   G4double            highLimit;
@@ -104,6 +110,8 @@
 std::ostream&   operator<<(std::ostream& lhs, const G4QParentCluster& rhs);
 
-inline G4bool G4QParentCluster::operator==(const G4QParentCluster& rhs) const {return this==&rhs;}
-inline G4bool G4QParentCluster::operator!=(const G4QParentCluster& rhs) const {return this!=&rhs;}
+inline G4bool G4QParentCluster::operator==(const G4QParentCluster& rhs) const
+                                                                       {return this==&rhs;}
+inline G4bool G4QParentCluster::operator!=(const G4QParentCluster& rhs) const
+                                                                       {return this!=&rhs;}
  
 inline G4int      G4QParentCluster::GetPDGCode()     const {return thePDGCode;}
@@ -118,12 +126,12 @@
 inline G4double   G4QParentCluster::GetNBind()       const {return theNucBindingEnergy;}
 
-inline void  G4QParentCluster::SetPDGCode(G4int newPDGCode)    {thePDGCode      = newPDGCode;}
-inline void  G4QParentCluster::SetProbability(G4double prob)   {theProbability  = prob;}
-inline void  G4QParentCluster::SetNQPart2(G4int nm2)           {nQPart2         = nm2;}
-inline void  G4QParentCluster::SetTransQC(G4QContent newTrans) {transQC=newTrans;}
-inline void  G4QParentCluster::SetHigh(G4double hiLim)         {highLimit       = hiLim;}
-inline void  G4QParentCluster::SetLow(G4double loLim)          {lowLimit        = loLim;}
-inline void  G4QParentCluster::SetEBMass(G4double bMass)       {theEnvBoundedMass  = bMass;}
-inline void  G4QParentCluster::SetNBMass(G4double bMass)       {theNucBoundedMass  = bMass;}
+inline void  G4QParentCluster::SetPDGCode(G4int newPDGCode)    {thePDGCode   = newPDGCode;}
+inline void  G4QParentCluster::SetProbability(G4double prob)   {theProbability = prob;}
+inline void  G4QParentCluster::SetNQPart2(G4int nm2)           {nQPart2        = nm2;}
+inline void  G4QParentCluster::SetTransQC(G4QContent newTrans) {transQC        = newTrans;}
+inline void  G4QParentCluster::SetHigh(G4double hiLim)         {highLimit      = hiLim;}
+inline void  G4QParentCluster::SetLow(G4double loLim)          {lowLimit       = loLim;}
+inline void  G4QParentCluster::SetEBMass(G4double bMass)       {theEnvBoundedMass = bMass;}
+inline void  G4QParentCluster::SetNBMass(G4double bMass)       {theNucBoundedMass = bMass;}
 inline void  G4QParentCluster::SetEBind(G4double bEn)          {theEnvBindingEnergy= bEn;}
 inline void  G4QParentCluster::SetNBind(G4double bEn)          {theNucBindingEnergy= bEn;}
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParentClusterVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParentClusterVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParentClusterVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QParentClusterVector.hh,v 1.18 2006/06/29 20:06:31 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QParentClusterVector.hh,v 1.19 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -32,4 +32,10 @@
 // Type defenition of Parent nuclear cluster Vector in CHIPS model
 // ---------------------------------------------------------------
+// Short description: The parent cluster is the cluster, which can be
+// used for the nuclear fragment production. Different clusters csn be
+// used as the parent cluser for the particular G4QCandidate (nuclear
+// fragment), e.g. t and He3 for the t-fragment production. So the
+// G4QParentClusterVector is needed.
+// -------------------------------------------------------------------
 
 #ifndef G4QParentClusterVector_h
@@ -43,4 +49,2 @@
 
 #endif
-
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticle.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticle.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticle.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QParticle.hh,v 1.24 2006/06/29 20:06:33 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QParticle.hh,v 1.25 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QParticle ----------------
@@ -32,4 +32,8 @@
 //  class header for Particles in the CHIPS Model
 // ---------------------------------------------------
+// Short description: The G4QParticle is a part of the CHIPS World. It is
+// characterized by the quark content, spin, mass, width and a vector of
+// the decay channels (G4QDecayCannelVector).
+// -----------------------------------------------------------------------
 
 #ifndef G4QParticle_h
@@ -117,8 +121,8 @@
     min=aDecay[0]->GetMinMass();
     if(nCh>1) for(G4int j=1; j<nCh; j++)
-	{
+    {
       G4double next=aDecay[j]->GetMinMass();
       if(next<min) min=next;
-	}
+    }
   }
   G4double w=GetWidth();
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticleVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticleVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticleVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QParticleVector.hh,v 1.19 2006/06/29 20:06:35 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QParticleVector.hh,v 1.20 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -32,4 +32,8 @@
 // Type defenition for Decay Channel Vector in CHIPS model
 // ---------------------------------------------------------------
+// Short description: The G4QParticle is a part of the CHIPS World. It is
+// characterized by the quark content, spin, mass, width and a vector of
+// the decay channels (G4QDecayCannelVector).
+// -----------------------------------------------------------------------
 
 #ifndef G4QParticleVector_h
@@ -61,5 +65,5 @@
   {
     std::for_each(begin(),end(),DeleteQParticle());
-	clear();
+    clear();
   }
 };
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParton.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParton.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParton.hh	(revision 1055)
@@ -28,6 +28,6 @@
 #define G4QParton_h 1
 
-// $Id: G4QParton.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QParton.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
@@ -40,4 +40,7 @@
 //   G4Parton
 // -----------------------------------------------------------------
+// Short description: The Quark-Gluon String consists of the partons, which
+// are quarks and some times gluons.
+// ------------------------------------------------------------------------
 
 #include "globals.hh"
@@ -57,6 +60,6 @@
     // Random Flavor/Colour/Spin definition for default constructor (with .3 s-suppresion)
     PDGencoding=(G4int)(2.3*G4UniformRand())+1; //@@ What about antiquarks? (M.K.)
-   	theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding);
-   	// random colour (1,2,3)=(R,G,B) for quarks and (-1,-2,-3)=(aR,aG,aB) for anti-quarks
+    theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding);
+    // random colour (1,2,3)=(R,G,B) for quarks and (-1,-2,-3)=(aR,aG,aB) for anti-quarks
     theColour = (G4int)(3*G4UniformRand())+1;
     if(theColour>3) theColour = 3;
@@ -64,5 +67,5 @@
     theSpinZ = (G4int)(2*G4UniformRand()) - 0.5;
   }
-		G4QParton(G4int PDGencoding);                            // Collor/Spin are still random
+  G4QParton(G4int PDGencoding);                            // Collor/Spin are still random
   G4QParton(const G4QParton &right);
   G4QParton(const G4QParton* right);
@@ -73,6 +76,6 @@
   // Operators
   const G4QParton& operator=(const G4QParton &right);
-  G4int operator==(const G4QParton &right) const      {return this==&right;}	
-  G4int operator!=(const G4QParton &right) const      {return this!=&right;}	
+  G4int operator==(const G4QParton &right) const      {return this==&right;} 
+  G4int operator!=(const G4QParton &right) const      {return this!=&right;} 
 
   // Modifiers
@@ -97,5 +100,5 @@
   G4String GetParticleSubType()               {return theDefinition->GetParticleSubType();}
  private: 
-		// Body 
+  // Body 
   G4int                 PDGencoding;
   G4ParticleDefinition* theDefinition;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonPair.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonPair.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonPair.hh	(revision 1055)
@@ -27,6 +27,6 @@
 #define G4QPartonPair_h 1
 //
-// $Id: G4QPartonPair.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPartonPair.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
@@ -37,4 +37,10 @@
 // class for PartonPair (hadron) used by Parton String Models
 // ------------------------------------------------------------
+// Short description: Each Quasmon String has a pair of partons
+// (quark/diquark-partons) on its ends. During the hadronization
+// procedure the rapidity gap between partons shrinks, but the
+// parton pair still exists, while it is converted to the final
+// meson (quaek-antiquark) or baryon (quark-diquark).
+// --------------------------------------------------------------
 //
 #include "globals.hh"
@@ -53,11 +59,11 @@
   G4int operator==(const G4QPartonPair &right) const
   {
-    return (CollisionType == right.CollisionType && *Parton1 == *right.Parton1 &&
-                                                    *Parton2 == *right.Parton2) ? 1: 0;
+    return (CollisionType == right.CollisionType &&
+            *Parton1 == *right.Parton1 && *Parton2 == *right.Parton2) ? 1: 0;
   }
   G4int operator!=(const G4QPartonPair &right) const
   {
-    return (CollisionType == right.CollisionType && *Parton1 == *right.Parton1 &&
-                                                    *Parton2 == *right.Parton2) ? 0: 1;
+    return (CollisionType == right.CollisionType &&
+            *Parton1 == *right.Parton1 && *Parton2 == *right.Parton2) ? 0: 1;
   }
   // Modifiers
@@ -65,5 +71,5 @@
   void  SetCollisionType(G4int Type)             {CollisionType = Type;}
   // Selectors
-  G4int GetCollisionType()                       {return CollisionType;}
+  G4int      GetCollisionType()                  {return CollisionType;}
   G4QParton* GetParton1()                        {return Parton1;}
   G4QParton* GetParton2()                        {return Parton2;}
@@ -74,6 +80,6 @@
   G4QParton* Parton1;  
   G4QParton* Parton2;  
-  G4int     CollisionType;
-  G4int     Direction;
+  G4int      CollisionType;
+  G4int      Direction;
 };
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonPairVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonPairVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonPairVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QPartonPairVector.hh,v 1.1 2006/11/16 11:36:09 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPartonPairVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -32,4 +32,10 @@
 // Type defenition for a Vector of PartonPairs of CHIPS model
 // ---------------------------------------------------------------
+// Short description: Each Quasmon String has a pair of partons
+// (quark/diquark-partons) on its ends. During the hadronization
+// procedure the rapidity gap between partons shrinks, but the
+// parton pair still exists, while it is converted to the final
+// meson (quaek-antiquark) or baryon (quark-diquark).
+// --------------------------------------------------------------
 
 #ifndef G4QPartonPairVector_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QPartonVector.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPartonVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidateVector ----------------
@@ -32,10 +32,13 @@
 // Type defenition for a Vector of Partons - output of CHIPS model
 // ---------------------------------------------------------------
+// Short description: The Quark-Gluon String consists of the partons, which
+// are quarks and some times gluons.
+// ------------------------------------------------------------------------
 
 #ifndef G4QPartonVector_h
 #define G4QPartonVector_h 1
 //
-// $Id: G4QPartonVector.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPartonVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPomeron.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPomeron.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPomeron.hh	(revision 1055)
@@ -27,6 +27,6 @@
 #define G4QPomeron_h 1
 //
-// $Id: G4QPomeron.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPomeron.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
@@ -39,4 +39,11 @@
 //   G4PomeronCrossSection
 // ------------------------------------------------------------
+// Short description: Pomeron is one of the possible vacuum pole (the
+// second is Oderon, but they are identical in the present model), by
+// which particle exchang in the ellastic scattering process. Strings,
+// which appear as a cut of the Pomeron (optic theorem connects the
+// amplitude of scattering at zero angle with the total inelastic
+// cross-section), describe most of the processes at high energies.
+// ------------------------------------------------------------------
 
 #include "globals.hh"
@@ -64,8 +71,8 @@
   G4double GetTotalProbability(const G4double s, const G4double imp2)
         {return 2*(1-std::exp(-Eikonal(s,imp2)))/pomeron_C*(1-std::exp(-Eikonal(s,imp2)));}
-  G4double GetDiffractiveProbability(const G4double s,	const G4double imp2)
+  G4double GetDiffractiveProbability(const G4double s, const G4double imp2)
                   {return (pomeron_C-1.)/pomeron_C*(GetTotalProbability(s,imp2) -
                                                     GetNondiffractiveProbability(s,imp2));}
-  G4double GetNondiffractiveProbability(const G4double s,	const G4double imp2)
+  G4double GetNondiffractiveProbability(const G4double s, const G4double imp2)
                                       {return (1.-std::exp(-2*Eikonal(s,imp2)))/pomeron_C;}
   G4double GetElasticProbability(const G4double s, const G4double imp2)
@@ -94,10 +101,10 @@
   void InitForKaon();
   void InitForGamma();
-	
+ 
   G4double Expand(G4double z);
   G4double Z(const G4double Scms)    {return 2*pomeron_C*Power(s)/Lambda(Scms);}
   G4double SigP(const G4double Scms) {return 8*pi*hbarc_squared*Power(Scms);}
   G4double Power(const G4double Scms)
-                        {return pomeron_Gamma*std::pow(Scms/pomeron_S,pomeron_Alpha-1);}
+                           {return pomeron_Gamma*std::pow(Scms/pomeron_S,pomeron_Alpha-1);}
   G4double Lambda(const G4double s)
                          {return pomeron_Rsquare+pomeron_Alphaprime*std::log(s/pomeron_S);}
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QSplitter.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QSplitter.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QSplitter.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QSplitter.hh,v 1.2 2006/06/29 20:06:37 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QSplitter.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QSplitter ----------------
@@ -32,4 +32,14 @@
 // header for Hadron-Hadron Splitter in parton pairs of the CHIPS Model
 // --------------------------------------------------------------------
+// Short description: the hadron befor the interaction must be splitted
+// in partons: quark-antiquark (mesons) or quark-diquark (baryon) parts
+// (some time in more than two parts, e.g. baryon in three quarks or a
+// few quark-antiquark pairs can be added for the splitting). Then each
+// projectile parton can create a parton pair (G4QPartonPair) with the
+// target parton. This pair with the big rapidity difference on the ends
+// creates a planar Quark-Gluon String (a pole). A pair of the projectile
+// partons with a pair of the target partons can create a cylindrical
+// string (doubled string in the algorithm - a cut).  
+// -------------------------------------------------===------------------
 
 #ifndef G4QSplitter_h
@@ -47,10 +57,10 @@
   // projectile Hadron (probably as a part of proj Nucleus) colliding with nuclear Cluster
   G4QSplitter(G4QHadron projHadron, const G4bool projEnvFlag, const G4int targPDG,
-														const G4bool targEnvFlag);   // Cluster can have target nuclear environment
+              const G4bool targEnvFlag);   // Cluster can have target nuclear environment
   // projectile Cluster (probably as a part of proj Nucleus) colliding with nuclear target
   //G4QSplitter(G4QNucleus projCluster, const G4bool projEnvFlag, const G4int targPDG);
   // projectile Cluster (probably as a part of proj Nucleus) colliding with nuclear Cluster
   //G4QSplitter(G4QNucleus projCluster, const G4bool projEnvFlag, const G4int targPDG,
-		//												const G4bool targEnvFlag);   // Cluster can have target nuclear environment
+  //            const G4bool targEnvFlag);   // Cluster can have target nuclear environment
   G4QSplitter(const G4QSplitter& right);   // Copy the splitted system by value
   G4QSplitter(G4QSplitter* right);         // Copy the splitted system by pointer
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QString.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QString.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QString.hh	(revision 1055)
@@ -26,6 +26,6 @@
 //
 //
-// $Id: G4QString.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QString.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 
 #ifndef G4QString_h
@@ -43,4 +43,14 @@
 //
 // ------------------------------------------------------------
+// Short description: If partons from the G4QPartonPair are close in
+// rapidity, they create Quasmons, but if they are far in the rapidity
+// space, they can not interact directly. Say the bottom parton (quark)
+// has rapidity 0, and the top parton (antiquark) has rapidity 8, then
+// the top quark splits in two by radiating gluon, and each part has
+// rapidity 4, then the gluon splits in quark-antiquark pair (rapidity
+// 2 each), and then the quark gadiates anothe gluon and reachs rapidity
+// 1. Now it can interact with the bottom antiquark, creating a Quasmon
+// or a hadron. The intermediate partons is the string ladder.
+// ---------------------------------------------------------------------
 
 #include "G4ios.hh"
@@ -59,5 +69,5 @@
  public:
 
-		enum {PROJECTILE  = 1, TARGET  = -1}; // The same as in quark-pair (@@ ? M.K.)
+  enum {PROJECTILE  = 1, TARGET  = -1}; // The same as in quark-pair (@@ ? M.K.)
 
   G4QString(); // formal creation of the string with future excitation
@@ -154,20 +164,20 @@
   static G4double SmoothParam;       // QGS model parameter
   static G4double StrangeSuppress;   // Strangeness suppression parameter
-	 static G4double widthOfPtSquare;	  // width^2 of pt for string excitation
+  static G4double widthOfPtSquare;   // width^2 of pt for string excitation
   static G4int StringLoopInterrupt;  // String fragmentation LOOP limit 
   static G4int ClusterLoopInterrupt; // Cluster fragmentation LOOP limit 
 
   // Body
-  G4int         theDirection;  // must be 1 or -1 (PROJECTILE or TARGET)
-  G4ThreeVector thePosition;   // Defined by the first quark position
-  G4QPartonVector thePartons;  // would like initial capacity for 3 Partons (? M.K.)
-  G4QHadronBuilder* hadronizer;// Hadronizer of hodrons out of partons
-  G4ThreeVector Ptleft,Ptright;// Pt (px,py) for partons (pz ignored!)
-  G4double Pplus, Pminus;      // p-, p+ of string, Plus is assigned to Left!
-  G4QParton* theStableParton;  // Parton on the stable side of the string
-  G4QParton* theDecayParton;   // Parton on the decaying part of the string
-  enum DecaySide {None, Left, Right}; // @@ To have two         @@ Leav   :  1=Left
-  DecaySide decaying;                 // @@   it's too much     @@  only  :  0=Unknown
-  G4int     SideOfDecay;              // @@     of a good thing @@   one! : -1=Right
+  G4int         theDirection;        // must be 1 or -1 (PROJECTILE or TARGET)
+  G4ThreeVector thePosition;         // Defined by the first quark position
+  G4QPartonVector thePartons;        // would like initial capacity for 3 Partons (? M.K.)
+  G4QHadronBuilder* hadronizer;      // Hadronizer of hodrons out of partons
+  G4ThreeVector Ptleft,Ptright;      // Pt (px,py) for partons (pz ignored!)
+  G4double Pplus, Pminus;            // p-, p+ of string, Plus is assigned to Left!
+  G4QParton* theStableParton;        // Parton on the stable side of the string
+  G4QParton* theDecayParton;         // Parton on the decaying part of the string
+  enum DecaySide {None, Left, Right};// @@ To have two         @@ Leav   :  1=Left
+  DecaySide decaying;                // @@   it's too much     @@  only  :  0=Unknown
+  G4int     SideOfDecay;             // @@     of a good thing @@   one! : -1=Right
 };
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QStringVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QStringVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QStringVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QStringVector.hh,v 1.1 2006/10/30 10:40:35 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QStringVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QStringVector ----------------
@@ -32,4 +32,14 @@
 // Type definition for a Vector of QStrings - output of CHIPS model
 // ----------------------------------------------------------------
+// Short description: If partons from the G4QPartonPair are close in
+// rapidity, they create Quasmons, but if they are far in the rapidity
+// space, they can not interact directly. Say the bottom parton (quark)
+// has rapidity 0, and the top parton (antiquark) has rapidity 8, then
+// the top quark splits in two by radiating gluon, and each part has
+// rapidity 4, then the gluon splits in quark-antiquark pair (rapidity
+// 2 each), and then the quark gadiates anothe gluon and reachs rapidity
+// 1. Now it can interact with the bottom antiquark, creating a Quasmon
+// or a hadron. The intermediate partons is the string ladder.
+// ---------------------------------------------------------------------
 
 #ifndef G4QStringVector_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4Quasmon.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4Quasmon.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4Quasmon.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4Quasmon.hh,v 1.39 2007/08/09 13:07:47 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4Quasmon.hh,v 1.41 2009/03/23 14:14:35 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4Quasmon ----------------
@@ -32,4 +32,14 @@
 //      class for a Quasmon used by the CHIPS Model
 // ------------------------------------------------------------
+// Short description: If partons from the G4QPartonPair are close in
+// rapidity, they create Quasmons, but if they are far in the rapidity
+// space, they can not interact directly. Say the bottom parton (quark)
+// has rapidity 0, and the top parton (antiquark) has rapidity 8, then
+// the top quark splits in two by radiating gluon, and each part has
+// rapidity 4, then the gluon splits in quark-antiquark pair (rapidity
+// 2 each), and then the quark gadiates anothe gluon and reachs rapidity
+// 1. Now it can interact with the bottom antiquark, creating a Quasmon
+// or a hadron. The intermediate partons is the string ladder.
+// ---------------------------------------------------------------------
 
 #ifndef G4Quasmon_h
@@ -92,4 +102,5 @@
   void              InitQuasmon(const G4QContent& qQCont, const G4LorentzVector& q4M);
   void              IncreaseBy(const G4Quasmon* pQuasm); // as operator+= but by pointer
+  void              IncreaseBy(G4QContent& qQCont, const G4LorentzVector& q4M);
   void              ClearQuasmon();                   // Clear Quasmon (status=0)
   void              KillQuasmon();                    // Kill Quasmon (status=0)
@@ -170,4 +181,10 @@
   status= 3;
 }
+inline void G4Quasmon::IncreaseBy(G4QContent& qQCont, const G4LorentzVector& q4M)
+{
+  valQ  += qQCont;
+  q4Mom += q4M;
+  status= 3;
+}
 
 inline void G4Quasmon::InitQuasmon(const G4QContent& qQCont, const G4LorentzVector& q4M)
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QuasmonString.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QuasmonString.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QuasmonString.hh	(revision 1055)
@@ -25,10 +25,16 @@
 //
 //
-// $Id: G4QuasmonString.hh,v 1.4 2006/06/29 20:06:41 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QuasmonString.hh,v 1.5 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QuasmonString ----------------
 //             by Mikhail Kossov, October 2004.
 //      header for Hadron-Hadron String Interaction in the CHIPS Model
+// -------------------------------------------------------------------
+// Short description: The Quark-Gluon String can fragment in hadrons
+// (QGS), small hadronic clusters (HERWIG) or in unlimited in mass
+// Quasmons, defined by the G4QPartonPair. This class is made to
+// simulate the string fragmentation in Quasmons, which hadronize in
+// vacuuum or in nuclear environment.
 // -------------------------------------------------------------------
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QuasmonVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QuasmonVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QuasmonVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QuasmonVector.hh,v 1.19 2006/06/29 20:06:43 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QuasmonVector.hh,v 1.20 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QuasmonVector ----------------
@@ -32,4 +32,14 @@
 // Type definition for a Vector of Quasmons - output of CHIPS model
 // ----------------------------------------------------------------
+// Short description: If partons from the G4QPartonPair are close in
+// rapidity, they create Quasmons, but if they are far in the rapidity
+// space, they can not interact directly. Say the bottom parton (quark)
+// has rapidity 0, and the top parton (antiquark) has rapidity 8, then
+// the top quark splits in two by radiating gluon, and each part has
+// rapidity 4, then the gluon splits in quark-antiquark pair (rapidity
+// 2 each), and then the quark gadiates anothe gluon and reachs rapidity
+// 1. Now it can interact with the bottom antiquark, creating a Quasmon
+// or a hadron. The intermediate partons is the string ladder.
+// ---------------------------------------------------------------------
 
 #ifndef G4QuasmonVector_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QBesIKJY.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QBesIKJY.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QBesIKJY.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QBesIKJY.cc,v 1.2 2006/06/29 20:06:45 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QBesIKJY.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QBesIKJY ----------------
@@ -32,5 +32,6 @@
 //      class  for Bessel I0/I1 and K0/K1 functions in CHIPS Model
 // -------------------------------------------------------------------
-
+// Short description: Bessel functions class (can be substituted)
+// -------------------------------------------------------------------
 //#define debug
 //#define pdebug
@@ -43,69 +44,69 @@
   ex=false;
   switch (type)
-		{
-		  case BessI0:
+  {
+    case BessI0:
       nu=0;
       ik=true;
       ij=true;
-						break;
-		  case BessI1:
+      break;
+    case BessI1:
       nu=1;
       ik=true;
       ij=true;
-						break;
-		  case EBessI0:
+      break;
+    case EBessI0:
       nu=0;
       ex=true;
       ik=true;
       ij=true;
-						break;
-		  case EBessI1:
+      break;
+    case EBessI1:
       nu=1;
       ex=true;
       ik=true;
       ij=true;
-						break;
-		  case BessJ0:
+      break;
+    case BessJ0:
       nu=0;
       ik=true;
       ij=false;
-						break;
-		  case BessJ1:
+      break;
+    case BessJ1:
       nu=1;
       ik=true;
       ij=false;
-						break;
-		  case BessK0:
+      break;
+    case BessK0:
       nu=0;
       ik=false;
       ij=true;
-						break;
-		  case BessK1:
+      break;
+    case BessK1:
       nu=1;
       ik=false;
       ij=true;
-						break;
-		  case EBessK0:
+      break;
+    case EBessK0:
       nu=0;
       ex=true;
       ik=false;
       ij=true;
-						break;
-		  case EBessK1:
+      break;
+    case EBessK1:
       nu=1;
       ex=true;
       ik=false;
       ij=true;
-						break;
-		  case BessY0:
+      break;
+    case BessY0:
       nu=0;
       ik=false;
       ij=false;
-						break;
-		  case BessY1:
+      break;
+    case BessY1:
       nu=1;
       ik=false;
       ij=false;
-						break;
+      break;
   }
 }
@@ -126,7 +127,7 @@
   static const G4double EPS = 1.E-15;
   static const G4double Z1  = 1.;
-		static const G4double HF  = Z1/2;
-		static const G4double R8  = HF/4;
-		static const G4double R32 = R8/4;
+  static const G4double HF  = Z1/2;
+  static const G4double R8  = HF/4;
+  static const G4double R32 = R8/4;
   static const G4double PI  = 3.14159265358979324;
   static const G4double CE  = 0.57721566490153286;
@@ -139,11 +140,11 @@
   static const G4double CI0[npi]={+1.00829205458740032E0,
              +.00845122624920943E0,+.00012700630777567E0,+.00007247591099959E0,
-						       +.00000513587726878E0,+.00000056816965808E0,+.00000008513091223E0,
-						       +.00000001238425364E0,+.00000000029801672E0,-.00000000078956698E0,
-						       -.00000000033127128E0,-.00000000004497339E0,+.00000000001799790E0,
-						       +.00000000000965748E0,+.00000000000038604E0,-.00000000000104039E0,
-						       -.00000000000023950E0,+.00000000000009554E0,+.00000000000004443E0,
-						       -.00000000000000859E0,-.00000000000000709E0,+.00000000000000087E0,
-							      +.00000000000000112E0,-.00000000000000012E0,-.00000000000000018E0};
+             +.00000513587726878E0,+.00000056816965808E0,+.00000008513091223E0,
+             +.00000001238425364E0,+.00000000029801672E0,-.00000000078956698E0,
+             -.00000000033127128E0,-.00000000004497339E0,+.00000000001799790E0,
+             +.00000000000965748E0,+.00000000000038604E0,-.00000000000104039E0,
+             -.00000000000023950E0,+.00000000000009554E0,+.00000000000004443E0,
+             -.00000000000000859E0,-.00000000000000709E0,+.00000000000000087E0,
+             +.00000000000000112E0,-.00000000000000012E0,-.00000000000000018E0};
 
   static const G4double CI1[npi]={+.975800602326285926E0,
@@ -215,9 +216,9 @@
 
   static const G4double EE[npk]={-.040172946544414076E0,-.444447147630558063E0,
-				      -.022719244428417736E0,+.206644541017490520E0,-.086671697056948524E0,
-				      +.017636703003163134E0,-.002235619294485095E0,+.000197062302701541E0,
-				      -.000012885853299241E0,+.000000652847952359E0,-.000000026450737175E0,
-				      +.000000000878030117E0,-.000000000024343279E0,+.000000000000572612E0,
-				      -.000000000000011578E0,+.000000000000000203E0,-.000000000000000003E0};
+          -.022719244428417736E0,+.206644541017490520E0,-.086671697056948524E0,
+          +.017636703003163134E0,-.002235619294485095E0,+.000197062302701541E0,
+          -.000012885853299241E0,+.000000652847952359E0,-.000000026450737175E0,
+          +.000000000878030117E0,-.000000000024343279E0,+.000000000000572612E0,
+          -.000000000000011578E0,+.000000000000000203E0,-.000000000000000003E0};
 
   static const G4complex CF[npj]={
@@ -244,5 +245,5 @@
   // -------------------------------------------------------------------------------------
   G4double H=0.;                     // Prototype of the result
-		if (ij)                            // I/K Bessel functions
+  if (ij)                            // I/K Bessel functions
   {
     if (ik)                          // I0/I1/EI0/EI1 Bessel functions (symmetric)
@@ -263,11 +264,11 @@
         G4double A1=1.+DY/(XLI*V3);
         G4double A2=1.+Y*(4.+(DY+Y)/(XLD*XL))/(W1*V3);
-				    G4double B0=1.;
-				    G4double	B1=1.-Y/XLI;
+        G4double B0=1.;
+        G4double B1=1.-Y/XLI;
         G4double B2=1.-Y*(1.-Y/(XLD+XLD))/W1;
         G4int    V1=3-XL;
         G4double V2=V3+V3;
         G4double C=0.;
-				    for (G4int N=3; N<=30; N++)
+        for (G4int N=3; N<=30; N++)
         {
           G4double C0=C;
@@ -279,10 +280,10 @@
           G4int    W5=W4-1;
           G4int    W6=W5-1;
-						             V1=V1+1;
+                   V1=V1+1;
                    V2=V2+1;
                    V3=V3+1;
-						    G4double U1=FN*W4;
+          G4double U1=FN*W4;
           G4double E=V3/(U1*W3);
-						    G4double U2=E*Y;
+          G4double U2=E*Y;
           G4double F1=1.+Y*V1/(U1*W1);
           G4double F2=(1.+Y*V2/(V3*W2*W5))*U2;
@@ -290,7 +291,7 @@
           G4double A=F1*A2+F2*A1+F3*A0;
           G4double B=F1*B2+F2*B1+F3*B0;
-						             C=A/B;
-						    if (std::abs(C0-C) < EPS*std::abs(C)) break;
-						    A0=A1; A1=A2; A2=A; B0=B1; B1=B2; B2=B;
+                   C=A/B;
+          if (std::abs(C0-C) < EPS*std::abs(C)) break;
+          A0=A1; A1=A2; A2=A; B0=B1; B1=B2; B2=B;
         }
         H=C;
@@ -301,22 +302,22 @@
       {
         G4double P=16./V-1.;
-				    G4double ALFA=P+P;
-				    G4double B1=0.;
+        G4double ALFA=P+P;
+        G4double B1=0.;
         G4double B2=0.;
-						  for (G4int I=npil; I>=0; I--)
+        for (G4int I=npil; I>=0; I--)
         {
           if (!nu) CJ=CI0[I];
           else     CJ=CI1[I];
-						    G4double B0=CJ+ALFA*B1-B2;
-						             B2=B1;
-						             B1=B0;
-        }
-				    H=std::sqrt(RPI2/V)*(B1-P*B2);
-				    if (nu && X < 0.) H=-H;
-				    if (!ex) H*=std::exp(V);
-				  }
+          G4double B0=CJ+ALFA*B1-B2;
+                   B2=B1;
+                   B1=B0;
+        }
+        H=std::sqrt(RPI2/V)*(B1-P*B2);
+        if (nu && X < 0.) H=-H;
+        if (!ex) H*=std::exp(V);
+      }
     }
     else                             // K0/K1/EK0/EK1 Bessel functions
-		  {
+    {
 #ifdef debug
       G4cout<<"G4BesIKJY: >>>>>>>>>>>>>> K is called, X="<<X<<",n="<<nu<<",E="<<ex<<G4endl;
@@ -339,5 +340,5 @@
         G4double Q=HF;
         G4double C=1.;
-						  G4double D=B*B;
+        G4double D=B*B;
         G4double BK1=P;
         for (G4int N=1; N<=nat1; N++)  // @@ "nat" can be increased
@@ -349,8 +350,8 @@
                    C*=D/FN;
           G4double G=C*(P-FN*F);
-       			G4double R=C*F;
+          G4double R=C*F;
                    BK=BK+R;
                    BK1=BK1+G;
-								  if (BK1*R+std::abs(G)*BK < EPS*BK*BK1) break;
+          if (BK1*R+std::abs(G)*BK < EPS*BK*BK1) break;
         }
         if (nu==1) H=BK1/B;
@@ -358,5 +359,5 @@
         if (ex) H*=std::exp(X);
       }
-				  else if (X < 5.)
+      else if (X < 5.)
       {
 #ifdef debug
@@ -368,8 +369,8 @@
         G4double XN=DNUS+DNUS;
         G4double A=9.-XN;
-						  G4double B=25.-XN;
+        G4double B=25.-XN;
         G4double C=768*X*X;
-						  G4double HX=16*X;
-						  G4double C0=HX+HX+HX;;
+        G4double HX=16*X;
+        G4double C0=HX+HX+HX;;
         G4double A0=1.;
         G4double A1=(HX+7.+XN)/A;
@@ -378,6 +379,6 @@
         G4double B1=(HX+9.-XN)/A;
         G4double B2=(C+C0*B)/(A*B)+1.;
-						           C=0.;
-						  for (G4int N=3; N<=nat2; N++)
+                 C=0.;
+        for (G4int N=3; N<=nat2; N++)
         {
           C0=C;
@@ -389,18 +390,18 @@
           G4double FN3=FN1/(FN2-3.);
           G4double FN4=12*FN*FN-(1.-XN);
-								  G4double FN5=16*FN1*X;
+          G4double FN5=16*FN1*X;
           G4double RAN=1./(FNP*FNP-XN);
-								  G4double F1=FN3*(FN4-20*FN)+FN5;
+          G4double F1=FN3*(FN4-20*FN)+FN5;
           G4double F2=28*FN-FN4-8.+FN5;
           G4double F3=FN3*(FNM*FNM-XN);
-      				  							A=(F1*A2+F2*A1+F3*A0)*RAN;
+                   A=(F1*A2+F2*A1+F3*A0)*RAN;
                    B=(F1*B2+F2*B1+F3*B0)*RAN;
                    C=A/B;
-						    if (std::abs(C0-C) < EPS*std::abs(C)) break;
-								  A0=A1;	A1=A2;	A2=A;	B0=B1;	B1=B2;	B2=B;
-        }
-						  H=C/std::sqrt(RPIH*X);
+          if (std::abs(C0-C) < EPS*std::abs(C)) break;
+          A0=A1; A1=A2; A2=A; B0=B1; B1=B2; B2=B;
+        }
+        H=C/std::sqrt(RPIH*X);
         if (!ex) H*=std::exp(-X);
-				  }
+      }
       else
       {
@@ -410,10 +411,10 @@
         G4double P=10./X-1.;
         G4double ALFA=P+P;
-							 G4double B1=0.;
-							 G4double B2=0.;
+        G4double B1=0.;
+        G4double B2=0.;
 #ifdef debug
         G4cout<<"G4BesIKJY: >>> [ X >= 5 ] is called, X="<<X<<",n="<<nu<<",E="<<ex<<G4endl;
 #endif
-						  for (G4int I=npkl; I>=0; I--)
+        for (G4int I=npkl; I>=0; I--)
         {
           if (!nu) CK=CK0[I];
@@ -422,12 +423,12 @@
                    B2=B1;
                    B1=B0;
-						  }
+        }
         H=std::sqrt(PIH/X)*(B1-P*B2);
         if (!ex) H*=std::exp(-X);
       }
-		  }
+    }
   }
   else
-		{
+  {
     if (!ik && X < 0.)
     {
@@ -455,5 +456,5 @@
           B1=0.;
           B2=0.;
-										for (G4int JT=npkl; JT>=0; JT--)
+          for (G4int JT=npkl; JT>=0; JT--)
           {
             G4double B0=CB[JT]+ALFA*B1-B2;
@@ -463,21 +464,21 @@
           H=RPIH*(CE+std::log(HF*X))*H+B1-P*B2;
         }
-						}
+      }
       else
-						{
-								G4double P=10./V-1.;
-								G4double ALFA=P+P;
-								G4complex CB1(0.,0.);
-								G4complex CB2(0.,0.);
-							 for (G4int IT=npjl; IT>=0; IT--)
+      {
+        G4double P=10./V-1.;
+        G4double ALFA=P+P;
+        G4complex CB1(0.,0.);
+        G4complex CB2(0.,0.);
+        for (G4int IT=npjl; IT>=0; IT--)
         {
           G4complex CB0=CC[IT]+ALFA*CB1-CB2;
                     CB2=CB1;
                     CB1=CB0;
-								}
+        }
         CB1=std::sqrt(RPIH/V)*std::exp(CI*(V-PI4))*(CB1-P*CB2);
-								if (ik) H=real(CB1);
+        if (ik) H=real(CB1);
         else    H=real(-CI*CB1);
-						}
+      }
     }
     else                          // J1/Y1 Bessel functions
@@ -494,5 +495,5 @@
         {
           G4double B0=CD[IT]+ALFA*B1-B2;
-										         B2=B1;
+                   B2=B1;
                    B1=B0;
         }
@@ -510,7 +511,7 @@
           H=RPIH*((CE+std::log(HF*X))*H-1./X)+Y*(B1-B2);
         }
-						}
+      }
       else
-						{
+      {
         G4double P=10./V-1.;
         G4double ALFA=P+P;
@@ -520,5 +521,5 @@
         {
           G4complex CB0=CF[IT]+ALFA*CB1-CB2;
-										          CB2=CB1;
+                    CB2=CB1;
                     CB1=CB0;
         }
@@ -526,5 +527,5 @@
         if (ik) H=real(CB1);
         else    H=real(-CI*CB1);
-						}
+      }
       if (X < 0.) H=-H;
     }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QCHIPSWorld.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QCHIPSWorld.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QCHIPSWorld.cc	(revision 1055)
@@ -25,10 +25,23 @@
 //
 //
-// $Id: G4QCHIPSWorld.cc,v 1.32 2006/06/29 20:06:47 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCHIPSWorld.cc,v 1.33 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCHIPSWorld ----------------
 //             by Mikhail Kossov, Sept 1999.
 //      class for the CHIPS World definition in CHIPS Model
+// -------------------------------------------------------------------
+// Short description: The CHIPS World is a world of elementary particles
+// and nuclear fragments. This class is a singletone, but without fixed
+// limits. E.g. the nuclear fragments as possible G4Candidates can be
+// initialized in the CHIPS World only up to Be8 od C12 or other bigger
+// nuclear fragment. If one need the heavy fragment production then the
+// the CHIPS World must be initialized up to these fragments (see the
+// CHIPS Manual), but the price in performans will be big, because in
+// each act of the fragmentation competition these numerous candidates
+// take place in the competition and the hadronization probability is
+// calculated each time for each of them, so the Be8 limit (Be8->alpha+
+// alpha decays very fast and contribute to the alpha-spectrum) is the
+// most optimal.
 // -------------------------------------------------------------------
 
@@ -114,9 +127,9 @@
       {
 #ifdef debug
-		G4cout<<"G4QCHIPSWorld::GetParticles: Create particle QCode="<<i<<G4endl;
+        G4cout<<"G4QCHIPSWorld::GetParticles: Create particle QCode="<<i<<G4endl;
 #endif
         G4QParticle* curPart = new G4QParticle(cf,i); // Created with QCode=i
 #ifdef debug
-		G4cout<<"G4QCHIPSWorld::GetParticles: Particle QCode="<<i<<" is created."<<G4endl;
+        G4cout<<"G4QCHIPSWorld::GetParticles: Particle QCode="<<i<<" is created."<<G4endl;
 #endif
         //curPart->InitQParticle(i);             //
@@ -135,7 +148,2 @@
   return &GetQWorld();
 }
-
-
-
-
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QCandidate.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QCandidate.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QCandidate.cc	(revision 1055)
@@ -25,10 +25,14 @@
 //
 //
-// $Id: G4QCandidate.cc,v 1.34 2006/11/27 10:44:53 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCandidate.cc,v 1.35 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCandidate ----------------
 //             by Mikhail Kossov, Sept 1999.
 //      class for Quasmon initiated Candidates used by CHIPS Model
+// ------------------------------------------------------------------
+// Short description: A candidate for hadronization. The candidates
+// (hadrons or nuclear fragments) are competative, each quark of a
+// Quasmon select which candidate to use for hadronization
 // ------------------------------------------------------------------
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QChipolino.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QChipolino.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QChipolino.cc	(revision 1055)
@@ -25,11 +25,17 @@
 //
 //
-// $Id: G4QChipolino.cc,v 1.34 2008/03/31 20:29:33 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QChipolino.cc,v 1.35 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QChipolino ----------------
 //             by Mikhail Kossov, Sept 1999.
 //      class for Quasmon initiated Chipolinos generated by CHIPS Model
-// ------------------------------------------------------------------
+// --------------------------------------------------------------------
+// Short description: In the CHIPS model not only hadrons are considered,
+// but the di-hadrons, which can not be convereged to the quark content
+// of only one hadron (e.g. pi+pi+, K+p, Delta++p etc). This kind of
+// hadronic states, which can be easily decayed in two hadrons, is called
+// Chipolino-particle in the model.
+// ---------------------------------------------------------------------- 
 
 //#define debug
@@ -53,5 +59,5 @@
     QCont.IncQAQ(1,0.); // Add quark-pair
 
-  G4QContent rQC=QCont;       // Copy for possible reduction ("annihilation" of q-qbar pairs)
+  G4QContent rQC=QCont;       // Copy for possible reduction ("annihilation" of q-aq pairs)
   tot=rQC.GetTot();           // New total number of quarks in QC  (temporary)
   if   (tot%2)rQC.DecQAQ(-tban-2); // Reduce pairs, keep only 5 quarks  (baryon case)
@@ -92,5 +98,5 @@
       G4QContent oQC=rQC-cQC;
 #ifdef debug
-	  cout<<"G4QChipolino: aQC="<<aQC<<", cQC="<<cQC<<", oQC="<<oQC<<G4endl;
+   cout<<"G4QChipolino: aQC="<<aQC<<", cQC="<<cQC<<", oQC="<<oQC<<G4endl;
 #endif
       G4QPDGCode oQPDG(oQC);
@@ -99,5 +105,5 @@
       G4double m=M1+M2;
 #ifdef debug
-	  cout<<"G4QChipolino: c="<<cQPDG<<",cM="<<M1<<",o="<<oQPDG<<",oM="<<M2
+   cout<<"G4QChipolino: c="<<cQPDG<<",cM="<<M1<<",o="<<oQPDG<<",oM="<<M2
           <<",cM+0M="<<m<<", curMinM="<<minM<<G4endl;
 #endif
@@ -117,5 +123,5 @@
     G4bool fl=nA>nQ;               // Flag of antibaryon case
 #ifdef pdebug
-	cout<<"G4QChipolino: Baryon case nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC
+ cout<<"G4QChipolino: Baryon case nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC
         <<",fl="<<fl<<G4endl;
 #endif
@@ -145,5 +151,5 @@
     }
 #ifdef pdebug
-	cout<<"G4QChipolino: Baryon case minM="<<minM<<", M="<<theQCont1<<theQPDG1
+ cout<<"G4QChipolino: Baryon case minM="<<minM<<", M="<<theQCont1<<theQPDG1
         <<", B="<<theQPDG2<<G4endl;
 #endif
@@ -152,10 +158,10 @@
   {
     if(ban)
-	{
+    {
       G4int nQ=rQC.GetQ();
       G4int nA=rQC.GetAQ();
       G4bool fl=nA>nQ;             // Flag of anti-dibaryon case
 #ifdef debug
-	  cout<<"G4QChipolino: Di-Baryon case nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC<<",fl="<<fl<<G4endl;
+   cout<<"G4QChipolino: Di-Bar. case nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC<<",fl="<<fl<<G4endl;
 #endif
       for (int i=0; i<4; i++)
@@ -189,14 +195,14 @@
               theQPDG2  = oQPDG;
             }
-		  }
-	    }
+          }
+        }
       }
     }
     else                       // Baryon-AntiBaryon
-	{
+    {
       theQCont1 = rQC.IndQ(0)+rQC.IndQ(1)+rQC.IndQ(2);
       theQPDG1.InitByQCont(theQCont1);
       theQPDG2.InitByQCont(rQC.IndAQ(0)+rQC.IndAQ(1)+rQC.IndAQ(2));
-	}
+    }
   }
   else if(((rQC.GetU() )>(rQC.GetS() -4) && (rQC.GetD() )>(rQC.GetS() -4)) ||
@@ -213,262 +219,265 @@
     G4bool fl=nA>nQ;           // Flag of anti-fragment case
 #ifdef debug
-	cout<<"G4QChipolino: NucFragment case nQ="<<nQ<<",nAQ="<<nA<<", QC="<<rQC<<",fl="<<fl<<G4endl;
-#endif
-	if((fl&&kS>1)||(!fl&&mS>1))
+    G4cout<<"G4QChipolino: NucFragment case nQ="<<nQ<<",nAQ="<<nA<<", QC="<<rQC<<",fl="<<fl
+          <<G4endl;
+#endif
+ if((fl&&kS>1)||(!fl&&mS>1))
     {
       G4cerr<<"***G4QChipolino: ***Overfowed by strange quarks*** rQC="<<rQC<<G4endl;
-	  //throw G4QException("G4QChipolino: NuclearFragment is overflowed by the strange quarks");
+      //throw G4QException("G4QChipolino: NuclearFragment is overflowed by strangeQuarks");
     }
     else if(fl)                // ===> Anti-fragment
-	{
+    {
       //G4cerr<<"***G4QChipolino: ***Anti-nuclear fragments*** rQC="<<rQC<<G4endl;
-	  //throw G4QException("G4QChipolino: Antinuclear fragments are not yet supported");
-      if(!mS)                                                           // No strange quarks
-	  {
-        G4int nI=mU-mD;                                                 // Isotopic shift
+      //throw G4QException("G4QChipolino: Antinuclear fragments are not yet supported");
+      if(!mS)                                                      // No strange quarks
+      {
+        G4int nI=mU-mD;                                            // Isotopic shift
         G4int nN=(mU+mD-nI*3)/6;
-        if(!kS)                                                         // No kaons
-		{
-          if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))                           // Delta isn't necessary
-          {
-            if(nI>0)                                                    // Excess of antiprotons
-            {
-              theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN));     // A Fragment-AProton
-              theQPDG2 = G4QPDGCode(-2212);                             // An Anti-Proton
-            }
-            else                                                        // Excess of a-neutrons
-            {
-              theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI)+nN-1));     // A Fragment-ANeutron
-              theQPDG2 = G4QPDGCode(-2112);                             // An Anti-Neutron
-            }
-	      }
-          else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))                     // Delta can be a part
-		  {
-            if(nI>0)                                                    // Excess of au-quarks
-            {
-              theQPDG1=G4QPDGCode(-(90000000+1000*(nN+nI-2)+nN+1));     // A Fragment-AProton
-              theQPDG2=G4QPDGCode(-2224);                               // An Anti-Delta++
-            }
-            else                                                        // Excess of ad-quarks
-            {
-              theQPDG1=G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN-2));     // A Fragment-ANeutron
-              theQPDG2=G4QPDGCode(-1114);                               // An Anti-Delta-
-            }
-		  }
+        if(!kS)                                                    // No kaons
+        {
+          if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))                      // Delta isn't necessary
+          {
+            if(nI>0)                                               // Excess of antiprotons
+            {
+              theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN));// A Fragment-AProton
+              theQPDG2 = G4QPDGCode(-2212);                        // An Anti-Proton
+            }
+            else                                                   // Excess of a-neutrons
+            {
+              theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI)+nN-1));// A Fragment-ANeutron
+              theQPDG2 = G4QPDGCode(-2112);                        // An Anti-Neutron
+            }
+          }
+          else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))                // Delta can be a part
+          {
+            if(nI>0)                                               // Excess of au-quarks
+            {
+              theQPDG1=G4QPDGCode(-(90000000+1000*(nN+nI-2)+nN+1));// A Fragment-AProton
+              theQPDG2=G4QPDGCode(-2224);                          // An Anti-Delta++
+            }
+            else                                                   // Excess of ad-quarks
+            {
+              theQPDG1=G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN-2));// A Fragment-ANeutron
+              theQPDG2=G4QPDGCode(-1114);                          // An Anti-Delta-
+            }
+          }
           else
-		  {
-            G4cerr<<"***G4QChipolino: **A**Isotopic asymmetry (without S)*** rQC="<<rQC<<G4endl;
-	        //throw G4QException("G4QChipolino: IsotopicAsymmety of AntiMultyBaryon Quasmon");
-		  }
-        }
-        else if(kS<2)                                                   // NucFrag+K is possible
-		{
+          {
+            G4cerr<<"***G4QChipolino:**A**IsotopicAsymmetry (without S),rQC="<<rQC<<G4endl;
+            //throw G4QException("G4QChipolino: IsotopicAsymmety of AntiMultyBar Quasmon");
+          }
+        }
+        else if(kS<2)                                              // NucFrag+K is possible
+        {
           G4int    nN =(mU+mD-4-nI*3)/6;
-          if(nI>0)                                                      // Excess of au-quarks
+          if(nI>0)                                                 // Excess of au-quarks
           {
             nN+=1;
-            theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN));       // An Anti-Fragment
-            theQPDG2 = G4QPDGCode(-321);                                // A K- meson
-		  }
+            theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN));  // An Anti-Fragment
+            theQPDG2 = G4QPDGCode(-321);                           // A K- meson
+          }
           else
-		  {
-            theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN));       // An AntiFragment
-            theQPDG2 = G4QPDGCode(-311);                                // An Anti-K0 meson
-          }
-		}
+          {
+            theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN));  // An AntiFragment
+            theQPDG2 = G4QPDGCode(-311);                           // An Anti-K0 meson
+          }
+        }
         else
-	    {
+        {
           G4cerr<<"***G4QChipolino: ***Too many kaons are needed*** rQC="<<rQC<<G4endl;
-	      //throw G4QException("G4QChipolino: Too many Kaons are needed for the AntiNucFragm");
-		}
-	  }
+          //throw G4QException("G4QChipolino: Too Many Kaons are needed for AntiNucFragm");
+        }
+      }
       else                     // Fragment with strangeness
-	  {
+      {
         if(mS<=mU&&mS<=mD)     // Fragment consisting of Neutrons, Protons & Lambrdas only
-		{
-          G4int nI=mU-mD;                                               // Isotopic shift
+      {
+          G4int nI=mU-mD;                                          // Isotopic shift
           G4int nN=(mU+mD-mS-mS-nI*3)/6;
-          if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))                           // Delta isn't necessary
-          {
-            if(nI>0)                                                    // Excess of protons
-            {
-              theQPDG1 = G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-1)+nN));// A Fragment-AProton
-              theQPDG2 = G4QPDGCode(-2212);                             // An Anti-Proton
-            }
-            else                                                        // Excess of neutrons
-            {
-              theQPDG1 = G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI)+nN-1));//A Fragment-ANeutron
-              theQPDG2 = G4QPDGCode(-2112);                             // An Anti-Neutron
-            }
-		  }
-          else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))                     // Delta can be a part
-		  {
-            if(nI>0)                                                    // Excess of au-quarks
-            {
-              theQPDG1=G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-2)+nN+1));// A Fragment-AProton
-              theQPDG2=G4QPDGCode(-2224);                               // An Anti-Delta++
-            }
-            else                                                        // Excess of ad-quarks
-            {
-              theQPDG1=G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI+1)+nN-2));//A Fragment-ANeutron
-              theQPDG2=G4QPDGCode(-1114);                               // An Anti-Delta-
-            }
-		  }
+          if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))                      // Delta isn't necessary
+          {
+            if(nI>0)                                               // Excess of protons
+            {
+              theQPDG1 = G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-1)+nN));// Fragm-AProton
+              theQPDG2 = G4QPDGCode(-2212);                        // An Anti-Proton
+            }
+            else                                                   // Excess of neutrons
+            {
+              theQPDG1 = G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI)+nN-1));//Fragm-ANeutron
+              theQPDG2 = G4QPDGCode(-2112);                        // An Anti-Neutron
+            }
+          }
+          else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))                // Delta can be a part
+          {
+            if(nI>0)                                               // Excess of au-quarks
+            {
+              theQPDG1=G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-2)+nN+1));//Fragm-AProton
+              theQPDG2=G4QPDGCode(-2224);                          // An Anti-Delta++
+            }
+            else                                                   // Excess of ad-quarks
+            {
+              theQPDG1=G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI+1)+nN-2));//Fragm-ANeutron
+              theQPDG2=G4QPDGCode(-1114);                          // An Anti-Delta-
+            }
+          }
           else
-		  {
-            G4cerr<<"***G4QChipolino: **A**Isotopic assimetry (with S)*** rQC="<<rQC<<G4endl;
-	        //throw G4QException("G4QChipolino: Isotopics of Strange AntiMultyBaryon Quasmon");
-		  }
-		}
-        else                                                            // Excess of s-quarks
-		{
-          G4int       lam=mU;                                           // A#of Anti-Lambdas
+          {
+            G4cerr<<"***G4QChipolino:**A**IsotopicAssimetry (with S)*** rQC="<<rQC<<G4endl;
+            //throw G4QException("G4QChipolino: Isotopics of Strange AntiMultyBarQuasmon");
+          }
+        }
+        else                                                       // Excess of s-quarks
+        {
+          G4int       lam=mU;                                      // A#of Anti-Lambdas
           if (lam>mD) lam=mD;
-          G4int lD=mD-lam;                                              // Residual ad-quarks
-          G4int lU=mU-lam;                                              // Residual au-quarks
-          G4int lS=mS-lam;                                              // Residual as-quarks
+          G4int lD=mD-lam;                                         // Residual ad-quarks
+          G4int lU=mU-lam;                                         // Residual au-quarks
+          G4int lS=mS-lam;                                         // Residual as-quarks
           if(lD+lU+lS!=3||lD<0||lU<0||lS<0)
-		  {
-            G4cerr<<"***G4QChipolino:*AntiFragm* rQC="<<rQC<<",s="<<lS<<",u="<<lU<<",d"<<lD<<G4endl;
-	        //throw G4QException("G4QChipolino: Exotic superstrange AntiMultyBaryon");
-		  }
-          if     ( !lD && lU==2) theQPDG2=G4QPDGCode(-3222);            // Anti-Sigma+
-          else if( !lU && lD==2) theQPDG2=G4QPDGCode(-3112);            // Anti-Sigma-
-          else if( !lD && lU==1) theQPDG2=G4QPDGCode(-3322);            // Anti-Ksi0
-          else if( !lU && lD==1) theQPDG2=G4QPDGCode(-3312);            // Anti-Ksi-
-          else                   theQPDG2=G4QPDGCode(-3334);            // Anti-Omega-
-          theQPDG1=G4QPDGCode(-(90+lam)*1000000);                       // Anti Strange Matter
-		}
-        theQCont1  = rQC-theQPDG2.GetQuarkContent();                    // QCont of Fragment-H
-        theQCont   = rQC;                                               // QCont of Chipolino
-	  }
-	}
-	else                       // ===> Nuclear Fragment
-	{
-      if(!kS)                                                           // No strange quarks
-	  {
-        G4int nI=kU-kD;                                                 // Isotopic shift
+          {
+            G4cerr<<"***G4QChipolino:*AntiFragment* rQC="<<rQC<<",s="<<lS<<",u="<<lU<<",d"
+                  <<lD<<G4endl;
+            //throw G4QException("G4QChipolino: Exotic superstrange AntiMultyBaryon");
+          }
+          if     ( !lD && lU==2) theQPDG2=G4QPDGCode(-3222);       // Anti-Sigma+
+          else if( !lU && lD==2) theQPDG2=G4QPDGCode(-3112);       // Anti-Sigma-
+          else if( !lD && lU==1) theQPDG2=G4QPDGCode(-3322);       // Anti-Ksi0
+          else if( !lU && lD==1) theQPDG2=G4QPDGCode(-3312);       // Anti-Ksi-
+          else                   theQPDG2=G4QPDGCode(-3334);       // Anti-Omega-
+          theQPDG1=G4QPDGCode(-(90+lam)*1000000);                  // Anti Strange Matter
+        }
+        theQCont1  = rQC-theQPDG2.GetQuarkContent();               // QCont of Fragment-H
+        theQCont   = rQC;                                          // QCont of Chipolino
+      }
+    }
+    else                       // ===> Nuclear Fragment
+    {
+      if(!kS)                                                      // No strange quarks
+      {
+        G4int nI=kU-kD;                                            // Isotopic shift
         G4int nN=(kU+kD-nI*3)/6;
-        if(!mS)                                                         // No kaons
-		{
-          if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))                           // Delta isn't necessary
-          {
-            if(nI>0)                                                    // Excess of protons
-            {
-              theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI-1)+nN);        // A Fragment-Proton
-              theQPDG2 = G4QPDGCode(2212);                              // A Proton
-            }
-            else                                                        // Excess of neutrons
-            {
-              theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI)+nN-1);        // A Fragment-Neutron
-              theQPDG2 = G4QPDGCode(2112);                              // A Neutron
-            }
-	      }
-          else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))                     // Delta can be a part
-		  {
-            if(nI>0)                                                    // Excess of u-quarks
-            {
-              theQPDG1=G4QPDGCode(90000000+1000*(nN+nI-2)+nN+1);        // A Fragment-Proton
-              theQPDG2=G4QPDGCode(2224);                                // A Delta++
-            }
-            else                                                        // Excess of d-quarks
-            {
-              theQPDG1=G4QPDGCode(90000000+1000*(nN+nI+1)+nN-2);        // A Fragment-Neutron
-              theQPDG2=G4QPDGCode(1114);                                // A Delta-
-            }
-		  }
+        if(!mS)                                                    // No kaons
+        {
+          if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))                      // Delta isn't necessary
+          {
+            if(nI>0)                                               // Excess of protons
+            {
+              theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI-1)+nN);   // A Fragment-Proton
+              theQPDG2 = G4QPDGCode(2212);                         // A Proton
+            }
+            else                                                   // Excess of neutrons
+            {
+              theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI)+nN-1);   // A Fragment-Neutron
+              theQPDG2 = G4QPDGCode(2112);                         // A Neutron
+            }
+          }
+          else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))                // Delta can be a part
+          {
+            if(nI>0)                                               // Excess of u-quarks
+            {
+              theQPDG1=G4QPDGCode(90000000+1000*(nN+nI-2)+nN+1);   // A Fragment-Proton
+              theQPDG2=G4QPDGCode(2224);                           // A Delta++
+            }
+            else                                                   // Excess of d-quarks
+            {
+              theQPDG1=G4QPDGCode(90000000+1000*(nN+nI+1)+nN-2);   // A Fragment-Neutron
+              theQPDG2=G4QPDGCode(1114);                           // A Delta-
+            }
+          }
           else
-		  {
-            G4cerr<<"***G4QChipolino: ***Isotopic assimetry (without S)*** rQC="<<rQC<<G4endl;
-	        //throw G4QException("G4QChipolino: Exotic Isotopic assimety of MultyBaryon Quasmon");
-		  }
-        }
-        else if(mS<2)                                                   // NucFrag+K is possible
-		{
+          {
+            G4cerr<<"***G4QChipolino:***Isotopic assimetry (without S), rQC="<<rQC<<G4endl;
+            //throw G4QException("G4QChipolino:ExoticIsotopicAssimety of MultyBarQuasmon");
+          }
+        }
+        else if(mS<2)                                              // NucFrag+K is possible
+        {
           G4int    nN =(kU+kD-4-nI*3)/6;
-          if(nI>0)                                                      // Excess of u-quarks
+          if(nI>0)                                                 // Excess of u-quarks
           {
             nN+=1;
-            theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI-1)+nN);          // A Fragment
-            theQPDG2 = G4QPDGCode(321);                                 // A K+ meson
-		  }
+            theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI-1)+nN);     // A Fragment
+            theQPDG2 = G4QPDGCode(321);                            // A K+ meson
+          }
           else
-		  {
-            theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI+1)+nN);            // A Fragment
-            theQPDG2 = G4QPDGCode(311);                                 // A K0 meson
-          }
-		}
+          {
+            theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI+1)+nN);     // A Fragment
+            theQPDG2 = G4QPDGCode(311);                            // A K0 meson
+          }
+        }
         else
-	    {
+        {
           G4cerr<<"***G4QChipolino: ***Too many kaons are needed*** rQC="<<rQC<<G4endl;
-	      //throw G4QException("G4QChipolino: More than one Kaon is needed for the NuclFragm");
-		}
-	  }
+          //throw G4QException("G4QChipolino: More than one Kaon is needed for NuclFragm");
+        }
+      }
       else                     // Fragment with strangeness
-	  {
+      {
         if(kS<=kU&&kS<=kD)     // Fragment consisting of Neutrons, Protons & Lambrdas only
-		{
-          G4int nI=kU-kD;                                               // Isotopic shift
+        {
+          G4int nI=kU-kD;                                          // Isotopic shift
           G4int nN=(kU+kD-kS-kS-nI*3)/6;
-          if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))                           // Delta isn't necessary
-          {
-            if(nI>0)                                                    // Excess of protons
-            {
-              theQPDG1 = G4QPDGCode(90000000+1000*(kS*1000+nN+nI-1)+nN);// A Fragment-Proton
-              theQPDG2 = G4QPDGCode(2212);                              // A Proton
-            }
-            else                                                        // Excess of neutrons
-            {
-              theQPDG1 = G4QPDGCode(90000000+1000*(kS*1000+nN+nI)+nN-1);// A Fragment-Neutron
-              theQPDG2 = G4QPDGCode(2112);                              // A Neutron
-            }
-		  }
-          else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))                     // Delta can be a part
-		  {
-            if(nI>0)                                                    // Excess of u-quarks
-            {
-              theQPDG1=G4QPDGCode(90000000+1000*(kS*1000+nN+nI-2)+nN+1);// A Fragment-Proton
-              theQPDG2=G4QPDGCode(2224);                                // A Delta++
-            }
-            else                                                        // Excess of d-quarks
-            {
-              theQPDG1=G4QPDGCode(90000000+1000*(kS*1000+nN+nI+1)+nN-2);// A Fragment-Neutron
-              theQPDG2=G4QPDGCode(1114);                                // A Delta-
-            }
-		  }
+          if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI))                      // Delta isn't necessary
+          {
+            if(nI>0)                                               // Excess of protons
+            {
+              theQPDG1 = G4QPDGCode(90000000+1000*(kS*1000+nN+nI-1)+nN);// Fragment-Proton
+              theQPDG2 = G4QPDGCode(2212);                         // A Proton
+            }
+            else                                                   // Excess of neutrons
+            {
+              theQPDG1 = G4QPDGCode(90000000+1000*(kS*1000+nN+nI)+nN-1);// Fragment-Neutron
+              theQPDG2 = G4QPDGCode(2112);                         // A Neutron
+            }
+          }
+          else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2))                // Delta can be a part
+          {
+            if(nI>0)                                               // Excess of u-quarks
+            {
+              theQPDG1=G4QPDGCode(90000000+1000*(kS*1000+nN+nI-2)+nN+1);// Fragment-Proton
+              theQPDG2=G4QPDGCode(2224);                           // A Delta++
+            }
+            else                                                   // Excess of d-quarks
+            {
+              theQPDG1=G4QPDGCode(90000000+1000*(kS*1000+nN+nI+1)+nN-2);// Fragment-Neutron
+              theQPDG2=G4QPDGCode(1114);                           // A Delta-
+            }
+          }
           else
-		  {
+          {
             G4cerr<<"***G4QChipolino: ***Isotopic assimetry (with S)*** rQC="<<rQC<<G4endl;
-	        //throw G4QException("G4QChipolino: IsotopicAssimety of StrangeMultyBaryon Quasmon");
-		  }
-		}
-        else                                                            // Excess of s-quarks
-		{
-          G4int       lam=kU;                                           // A#of Lambda
+            //throw G4QException("G4QChipolino:IsotopicAssimety of StrangeMultyBar Quasm");
+          }
+        }
+        else                                                       // Excess of s-quarks
+        {
+          G4int       lam=kU;                                      // A#of Lambda
           if (lam>kD) lam=kD;
-          G4int lD=kD-lam;                                              // Residual d-quarks
-          G4int lU=kU-lam;                                              // Residual u-quarks
-          G4int lS=kS-lam;                                              // Residual s-quarks
+          G4int lD=kD-lam;                                         // Residual d-quarks
+          G4int lU=kU-lam;                                         // Residual u-quarks
+          G4int lS=kS-lam;                                         // Residual s-quarks
           if(lD+lU+lS!=3||lD<0||lU<0||lS<0)
-		  {
-            G4cerr<<"***G4QChipolino:*Fragment*rQC="<<rQC<<",s="<<lS<<",u="<<lU<<",d"<<lD<<G4endl;
-	        //throw G4QException("G4QChipolino: Exotic superstrange Multy Baryon");
-		  }
-          if     ( !lD && lU==2) theQPDG2=G4QPDGCode(3222);             // Sigma+
-          else if( !lU && lD==2) theQPDG2=G4QPDGCode(3112);             // Sigma-
-          else if( !lD && lU==1) theQPDG2=G4QPDGCode(3322);             // Ksi0
-          else if( !lU && lD==1) theQPDG2=G4QPDGCode(3312);             // Ksi-
-          else                   theQPDG2=G4QPDGCode(3334);             // Omega-
-          theQPDG1=G4QPDGCode((90+lam)*1000000);                        // A Strange Matter
-		}
-        theQCont1  = rQC-theQPDG2.GetQuarkContent();                    // QCont of Fragment-H
-        theQCont   = rQC;                                               // QCont of Chipolino
-	  }
-	}
+          {
+            G4cerr<<"***G4QChipolino:*Fragment*rQC="<<rQC<<",s="<<lS<<",u="<<lU<<",d"
+                  <<lD<<G4endl;
+            //throw G4QException("G4QChipolino: Exotic superstrange Multy Baryon");
+          }
+          if     ( !lD && lU==2) theQPDG2=G4QPDGCode(3222);        // Sigma+
+          else if( !lU && lD==2) theQPDG2=G4QPDGCode(3112);        // Sigma-
+          else if( !lD && lU==1) theQPDG2=G4QPDGCode(3322);        // Ksi0
+          else if( !lU && lD==1) theQPDG2=G4QPDGCode(3312);        // Ksi-
+          else                   theQPDG2=G4QPDGCode(3334);        // Omega-
+          theQPDG1=G4QPDGCode((90+lam)*1000000);                   // Strange Matter
+        }
+        theQCont1  = rQC-theQPDG2.GetQuarkContent();               // QCont of Fragment-H
+        theQCont   = rQC;                                          // QCont of Chipolino
+      }
+    }
   }
   else
   {
     G4cerr<<"***G4QChipolino: ***Exotics*** rQC="<<rQC<<G4endl;
-	//throw G4QException("G4QChipolino: can not be constructed for the exotic baryon or meson");
+    //throw G4QException("G4QChipolino: can't be constructed for exotic baryon or meson");
   }
 }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QContent.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QContent.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QContent.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QContent.cc,v 1.44 2008/03/20 20:11:37 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QContent.cc,v 1.45 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QContent ----------------
@@ -32,5 +32,14 @@
 //      class for Quasmon initiated Contents used by CHIPS Model
 // --------------------------------------------------------------------
+// Short description: This is the basic class of the CHIPS model. It
+// describes the quark content of the Quasmon, which is a generalized
+// hadronic state. All Quasmons are bags, characterized by the quark
+// Content (QContent), but the spin is not fixed and only light (u,d,s)
+// quarks are considered (SU(3)). The hadrons are the ground states for
+// the corresponding quasmons. The Chipolino (G4QChipolino) or nuclear
+// cluster are examples for another Quark Content.
+// --------------------------------------------------------------------
 // @@ In future total spin & c,b,t of the Hadron can be added @@ M.K.@@
+// --------------------------------------------------------------------
 
 //#define debug
@@ -93,5 +102,5 @@
     nAD = right.nAD;
     nAS = right.nAS;
-		}
+  }
   return *this;
 }
@@ -135,5 +144,5 @@
     G4int dAU=rAU-nAU;
     if(dU>0||dAU>0)
-   	{
+    {
       G4int kU=dU;
       if(kU<dAU) kU=dAU;                  // Get biggest difference
@@ -141,5 +150,5 @@
       if(rAU<mU) mU=rAU;                  // Get a#of possible SS pairs
       if(kU<=mU)                          // Total compensation
-	     {
+      {
         rU-=kU;
         rAU-=kU;
@@ -158,5 +167,5 @@
     G4int dAD=rAD-nAD;
     if(dD>0||dAD>0)
-	   {
+    {
       G4int kD=dD;
       if(kD<dAD) kD=dAD;                  // Get biggest difference
@@ -164,5 +173,5 @@
       if(rAD<mD) mD=rAD;                  // Get a#of possible SS pairs
       if(kD<=mD)                          // Total compensation
-	     {
+      {
         rD-=kD;
         rAD-=kD;
@@ -190,10 +199,10 @@
       rU +=1;
       rAU+=1;
-	   }
+    }
     else
     {
       rD +=1;
       rAD+=1;
-	   }
+    }
   }
   nD -= rD;
@@ -258,5 +267,5 @@
     G4int dAU=rAU-nAU;
     if(dU>0||dAU>0)
-	   {
+    {
       G4int kU=dU;
       if(kU<dAU) kU=dAU;                  // Get biggest difference
@@ -264,5 +273,5 @@
       if(rAU<mU) mU=rAU;                  // Get a#of possible SS pairs
       if(kU<=mU)                          // Total compensation
-	     {
+      {
         rU-=kU;
         rAU-=kU;
@@ -281,5 +290,5 @@
     G4int dAD=rAD-nAD;
     if(dD>0||dAD>0)
-	   {
+    {
       G4int kD=dD;
       if(kD<dAD) kD=dAD;                  // Get biggest difference
@@ -287,5 +296,5 @@
       if(rAD<mD) mD=rAD;                  // Get a#of possible SS pairs
       if(kD<=mD)                          // Total compensation
-	     {
+      {
         rD-=kD;
         rAD-=kD;
@@ -310,10 +319,10 @@
       rU +=1;
       rAU+=1;
-	   }
+    }
     else
     {
       rD +=1;
       rAD+=1;
-	   }
+    }
   }
   nD -= rD;
@@ -507,7 +516,7 @@
   if((tot!=4||q!=2) && (tot!=5||(q!=1&&aq!=1)) && (tot!=6||abs(b)!=2))
   {
-	   //#ifdef erdebug
+    //#ifdef erdebug
     G4cerr<<"***G4QCont::SplitChipo: QC="<<GetThis()<<G4endl;
-	   //#endif
+    //#endif
   }
   else if(tot==4)      // Mesonic (eight possibilities)
@@ -519,7 +528,7 @@
     else
     {
-	     //#ifdef debug
+      //#ifdef debug
       G4cerr<<"***G4QCont::SplitChipo:MesTot="<<tot<<",b="<<b<<",q="<<q<<",a="<<aq<<G4endl;
-	     //#endif
+      //#endif
     }
   }
@@ -527,35 +536,35 @@
   {
     if(nU==3)
-	   {
+    {
       r.SetU(1);
       r+=IndAQ();
     }
     else if(nD==3)
-	   {
+    {
       r.SetD(1);
       r+=IndAQ();
     }
     else if(nS==3)
-	   {
+    {
       r.SetS(1);
       r+=IndAQ();
     }
     else if(nAU==3)
-	   {
+    {
       r.SetAU(1);
       r+=IndQ();
     }
     else if(nAD==3)
-	   {
+    {
       r.SetAD(1);
       r+=IndQ();
     }
     else if(nAS==3)
-	   {
+    {
       r.SetAS(1);
       r+=IndQ();
     }
     else if(q==1&&nU)
-	   {
+    {
       r.SetU(1);
       if(nAU) r.SetAU(1);
@@ -563,5 +572,5 @@
     }
     else if(q==1&&nD)
-	   {
+    {
       r.SetD(1);
       if(nAD) r.SetAD(1);
@@ -569,5 +578,5 @@
     }
     else if(q==1&&nS)
-	   {
+    {
       r.SetS(1);
       if(nAS) r.SetAS(1);
@@ -575,5 +584,5 @@
     }
     else if(aq==1&&nAU)
-	   {
+    {
       r.SetAU(1);
       if(nU) r.SetU(1);
@@ -581,5 +590,5 @@
     }
     else if(aq==1&&nAD)
-	   {
+    {
       r.SetAD(1);
       if(nD) r.SetD(1);
@@ -587,5 +596,5 @@
     }
     else if(aq==1&&nAS)
-	   {
+    {
       r.SetAS(1);
       if(nS) r.SetS(1);
@@ -594,5 +603,5 @@
     else
     {
-	     //#ifdef erdebug
+      //#ifdef erdebug
       G4cerr<<"***G4QCont::SplitChipo: Baryonic tot=5,b=1,qCont="<<GetThis()<<G4endl;
       //#endif
@@ -603,5 +612,5 @@
     r=GetThis();
     if (bn>0)                // baryonium
-	   {
+    {
       G4QContent la(1,1,1,0,0,0);
       G4QContent nt(2,1,0,0,0,0);
@@ -621,5 +630,5 @@
         else
         {
-       	  //#ifdef erdebug
+          //#ifdef erdebug
           G4cerr<<"***G4QCont::SplitChipo:Dibar (1) tot=6, b=2, qCont="<<GetThis()<<G4endl;
           //#endif
@@ -635,5 +644,5 @@
         else
         {
-     	    //#ifdef erdebug
+          //#ifdef erdebug
           G4cerr<<"***G4QContent::SplitChipo:Dib(2) tot=6, b=2, qCont="<<GetThis()<<G4endl;
           //#endif
@@ -649,12 +658,12 @@
         else
         {
-     	    //#ifdef erdebug
+          //#ifdef erdebug
           G4cerr<<"***G4QContent::SplitChipo:Dib(3) tot=6, b=2, qCont="<<GetThis()<<G4endl;
           //#endif
         }
       }
-	   }
+    }
     else                     // Anti-baryonium
-	   {
+    {
       G4QContent la(0,0,0,1,1,1);
       G4QContent pr(0,0,0,1,2,0);
@@ -674,5 +683,5 @@
         else
         {
-     	    //#ifdef erdebug
+          //#ifdef erdebug
           G4cerr<<"***G4QContent::SplitChipo:ADib(1) tot=6,b=2, qCont="<<GetThis()<<G4endl;
           //#endif
@@ -688,5 +697,5 @@
         else
         {
-     	    //#ifdef erdebug
+          //#ifdef erdebug
           G4cerr<<"***G4QContent::SplitChipo:ADib(2) tot=6,b=2, qCont="<<GetThis()<<G4endl;
           //#endif
@@ -702,10 +711,10 @@
         else
         {
-     	    //#ifdef erdebug
+          //#ifdef erdebug
           G4cerr<<"***G4QContent::SplitChipo:ADib(3) tot=6,b=2, qCont="<<GetThis()<<G4endl;
           //#endif
         }
       }
-	   }
+    }
   }
   else // More than Dibaryon (@@ can use the same algorithm as for dibaryon)
@@ -779,5 +788,5 @@
     G4int res=tot+nQAQ;
 #ifdef pdebug
-	G4cout<<"G4QC::DecQC: tot="<<tot<<", nTP="<<nTotP<<", res="<<res<<G4endl;
+ G4cout<<"G4QC::DecQC: tot="<<tot<<", nTP="<<nTotP<<", res="<<res<<G4endl;
 #endif
     if(res<0)
@@ -810,5 +819,5 @@
     G4int j = static_cast<int>(base*G4UniformRand());       // Random integer "SortOfQuark"
     if (nUP && j<nUP && (nRet>2 || nUP>1 || (nD<2 && nS<2)))// --- U-Ubar pair
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4QC::DecQC: decrementing UAU pair UP="<<nUP<<", QC="<<GetThis()<<G4endl;
@@ -819,7 +828,7 @@
       nLP--;
       nTotP--;
-	   } 
+    } 
     else if (nDP && j<nLP && (nRet>2 || nDP>1 || (nU<2 && nS<2)))// --- D-Ubar pair
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4QC::DecQC: decrementing DAD pair DP="<<nDP<<", QC="<<GetThis()<<G4endl;
@@ -830,7 +839,7 @@
       nLP--;
       nTotP--;
-	   } 
+    } 
     else if (nSP&& (nRet>2 || nSP>1 || (nU<2 && nD<2)))          // --- S-Sbar pair
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4QC::DecQC: decrementing SAS pair SP="<<nSP<<", QC="<<GetThis()<<G4endl;
@@ -840,7 +849,7 @@
       nSP--;
       nTotP--;
-	   }
+    }
     else if (nUP)                                  // --- U-Ubar pair cancelation (final)
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4QC::DecQC:Decrement UAU pair (final) UP="<<nUP<<",QC="<<GetThis()<<G4endl;
@@ -851,7 +860,7 @@
       nLP--;
       nTotP--;
-	   } 
+    } 
     else if (nDP)                                 // --- D-Ubar pair cancelation (final)
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4QC::DecQC:Decrement DAD pair (final) DP="<<nDP<<",QC="<<GetThis()<<G4endl;
@@ -862,7 +871,7 @@
       nLP--;
       nTotP--;
-	   } 
+    } 
     else if (nSP)                                 // --- S-Sbar pair cancelation (final)
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4QC::DecQC: decrementing SAS pair SP="<<nSP<<", QC="<<GetThis()<<G4endl;
@@ -872,5 +881,5 @@
       nSP--;
       nTotP--;
-	   }
+    }
     else G4cout<<"***G4QC::DecQC:i="<<i<<",j="<<j<<",D="<<nDP<<",U="<<nUP<<",S="<<nSP
                <<",T="<<nTotP<<",nRet="<<nRet<<", QC="<<GetThis()<<G4endl;
@@ -894,32 +903,32 @@
 #endif
     //if      (!j)
-	   if      ( !j && (nU<=nD || nU<=nS))
+    if      ( !j && (nU<=nD || nU<=nS))
     {
       nU++;
       nAU++;
       tot+=2;
-	   }
+    }
     //else if (j==1)
-	   else if (j==1 && (nD<=nU || nD<=nS))
-	   {
+    else if (j==1 && (nD<=nU || nD<=nS))
+    {
       nD++;
       nAD++;
       tot+=2;
-	   }
+    }
     //else
-	   else if (j>1&& (nS<=nU || nS<=nD))
+    else if (j>1&& (nS<=nU || nS<=nD))
     {
       nS++;
       nAS++;
       tot+=2;
-	   }
+    }
     else if (!j)
-	   {
+    {
       nD++;
       nAD++;
       tot+=2;
-	   }
+    }
     else if (j==1)
-	   {
+    {
       nU++;
       nAU++;
@@ -931,13 +940,13 @@
       nAS++;
       tot+=2;
-	   }
+    }
     //else if (nD<=nU)
-	   //{
+    //{
     //  nD++;
     //  nAD++;
     //  tot+=2;
-	   //}
+    //}
     //else
-	   //{
+    //{
     //  nU++;
     //  nAU++;
@@ -1086,13 +1095,13 @@
     G4int dD=nD+nD;
     if(n>dD)
- 	  {
+    {
       mD=0;
       n-=dD;
-	   }
+    }
     else if (n==dD)
- 	  {
+    {
       mD=2;
       n=2;
-	   }
+    }
     else
     {
@@ -1107,13 +1116,13 @@
     G4int dU=nU+nU;
     if(n>dU)
-	   {
+    {
       mU=0;
       n-=dU;
-	   }
+    }
     else if (n==dU)
- 	  {
+    {
       mU=2;
       n=2;
-	   }
+    }
     else
     {
@@ -1128,13 +1137,13 @@
     G4int dS=nS+nS;
     if(n>dS)
-	   {
+    {
       mS=0;
       n-=dS;
-	   }
+    }
     else if (n==dS)
- 	  {
+    {
       mS=2;
       n=2;
-	   }
+    }
     else
     {
@@ -1156,5 +1165,5 @@
     G4int ab=abs(b);
     if(ab>=2 && n>=6)                            // Multi-Baryonium (NuclearFragment)
-	   {
+    {
       G4int mI=nU-nAU-nD+nAD;
       //if     (abs(mI)>3||mS>3||(b>0&&s<-1)||(b<0&&s>1)) return  0;
@@ -1165,17 +1174,17 @@
                            || (b < 0 && s > 0)) return GetZNSPDGCode();
       else if(mU>=mS&&mD>=mS&&mU+mD+mS==3*b)     // Possible Unary Nuclear Cluster
-	     {
+      {
         G4int mZ=(mU+mD-mS-mS+3*mI)/6;
         p = 90000000+1000*(1000*mS+mZ)+mZ-mI;
         if(b>0) return  p;
         else    return -p;
-	     }
+      }
       else return 10;
-	   }
+    }
     // Normal One Baryon States: Heavy quark should come first
     if(n>5) return GetZNSPDGCode();            //B+M+M Tripolino etc
     if(n==5) return 10;                        //B+M Chipolino
     if(mS>0)                                   // Strange Baryons
-	   {
+    {
       p=3002;
       if      (mS==3)            p+=332;       // Decuplet
@@ -1185,5 +1194,5 @@
         else if (mU==0 && mD==1) p+=310;
         else
-		      {
+        {
 #ifdef debug
           G4cout<<"**G4QC::SPDG:ExoticBSS,U="<<mU<<",D="<<mD<<",S="<<mS<<GetThis()<<G4endl;
@@ -1191,5 +1200,5 @@
           return GetZNSPDGCode();
         }
-	     }
+      }
       else if (mS==1)
       {
@@ -1204,5 +1213,5 @@
           return GetZNSPDGCode();
         }
-	     }
+      }
       else                                     // Superstrange case
       {
@@ -1212,7 +1221,7 @@
         return GetZNSPDGCode();
       }
-	   }
+    }
     else if (mU>0)                               // Not Strange Baryons
-	   {
+    {
       p=2002;
       if      (mU==3 && mD==0) p+=222;           // Decuplet
@@ -1226,5 +1235,5 @@
         return GetZNSPDGCode();
       }
-	   }
+    }
     else if (mD==3) p=1114;                      // Decuplet
     else
@@ -1234,5 +1243,5 @@
 #endif
       return GetZNSPDGCode();
-	   }
+    }
     if (b<0) p=-p;
   }
@@ -1248,16 +1257,16 @@
 #endif
       return 0;
-	   }
+    }
     if(n==4) return 10;                          // M+M Chipolino
     if(abs(s)>1)
-	   {
+    {
 #ifdef debug
       G4cout<<"**G4QC::SPDG:Stran="<<s<<",QC="<<GetThis()<<" - Superstrange Meson"<<G4endl;
 #endif
       return 0;
-	   }
+    }
     // Heavy quark should come first
     if(mS>0)                                     // Strange Mesons
-	   {
+    {
       p=301;
       if      (mS==2)
@@ -1276,7 +1285,7 @@
         return 0;
       }
-	   }
+    }
     else if (mU>0)                               // Isotopic Mesons
-	   {
+    {
       p=201;
       //if      (mU==2 && mD==0) p=221; // Performance problems
@@ -1284,5 +1293,5 @@
       else if (mU==1 && mD==1) p+=10;
       else
-	     {
+      {
 #ifdef debug
         G4cout<<"*G4QC::SPDG:ExMU U="<<mU<<",D="<<mD<<",S="<<mS<<",QC="<<GetThis()<<G4endl;
@@ -1290,5 +1299,5 @@
         return 0;
       }
-	   }
+    }
     else if (mD==2) p=111;
     else
@@ -1330,10 +1339,10 @@
     if (j<=0) return 0;
     if(mD>1||j>1) for (int i=1; i<=mD; i++)
-	   {
+    {
       if(!j) return 0;
       c*=j/i;
       j--;
     }
-  };
+  }
   if(mU>0)
   {
@@ -1341,10 +1350,10 @@
     if (j<=0) return 0;
     if(mU>1||j>1) for (int i=1; i<=mU; i++)
-	   {
+    {
       if(!j) return 0;
       c*=j/i;
       j--;
     }
-  };
+  }
   if(mS>0)
   {
@@ -1352,10 +1361,10 @@
     if (j<=0) return 0;
     if(mS>1||j>1) for (int i=1; i<=mS; i++)
-	   {
+    {
       if(!j) return 0;
       c*=j/i;
       j--;
     }
-  };
+  }
   if(mAD>0)
   {
@@ -1363,10 +1372,10 @@
     if (j<=0) return 0;
     if(mAD>1||j>1) for (int i=1; i<=mAD; i++)
-	   {
+    {
       if(!j) return 0;
       c*=j/i;
       j--;
     }
-  };
+  }
   if(mAU>0)
   {
@@ -1374,10 +1383,10 @@
     if (j<=0) return 0;
     if(mAU>1||j>1) for (int i=1; i<=mAU; i++)
-	   {
+    {
       if(!j) return 0;
       c*=j/i;
       j--;
     }
-  };
+  }
   if(mAS>0)
   {
@@ -1385,11 +1394,10 @@
     if (j<=0) return 0;
     if(mAS>1||j>1) for (int i=1; i<=mAS; i++)
-	   {
+    {
       if(!j) return 0;
       c*=j/i;
       j--;
     }
-  };
-  
+  } 
   return c;
 } 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QDecayChan.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QDecayChan.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QDecayChan.cc	(revision 1055)
@@ -25,10 +25,17 @@
 //
 //
-// $Id: G4QDecayChan.cc,v 1.27 2006/11/27 10:44:54 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDecayChan.cc,v 1.28 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QDecayChan ----------------
 //             by Mikhail Kossov, Sept 1999.
 //      class for Decay Channels of Hadrons in CHIPS Model
+// -------------------------------------------------------------------
+// Short description: In the CHIPS World the particles (G4QParticle)
+// are defined. For unstable particles there is a G4QDecayChannelVector
+// which describes different channels of decay for the particular
+// particle. So the G4QDecayChannel class is the class for the description
+// of such a decay channel in two or three particles (the secondaries can
+// be unstable too and have firther decay).
 // -------------------------------------------------------------------
  
@@ -58,6 +65,6 @@
   }
 #ifdef debug
-  cout<<"G4QDecayChan is defined with pL="<<pLev<<",1="<<PDG1<<",2="<<PDG2<<",3="<<PDG3
-      <<",m1="<<firstPDG->GetMass()<<",m2="<<secondPDG->GetMass()<<",minM="<<theMinMass<<endl;
+  G4cout<<"G4QDecayChan is defined with pL="<<pLev<<",1="<<PDG1<<",2="<<PDG2<<",3="<<PDG3
+      <<",m1="<<firstPDG->GetMass()<<",m2="<<secondPDG->GetMass()<<",minM="<<theMinMass<<G4endl;
 #endif
 }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QEnvironment.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QEnvironment.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QEnvironment.cc	(revision 1055)
@@ -28,6 +28,6 @@
 //
 //
-// $Id: G4QEnvironment.cc,v 1.137 2008/03/31 20:30:00 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QEnvironment.cc,v 1.144 2009/05/26 14:40:20 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QEnvironment ----------------
@@ -35,4 +35,12 @@
 //  class for Multy Quasmon Environment used by the CHIPS Model
 // ------------------------------------------------------------
+// Short description: The G4QEnvironment class corresponds to the nuclear
+// environment,  containing excited nucleons or nuclear clusters
+// (G4Quasmons). In the constructer the nucleus (G4QNucleus) is clusterized
+// and then the projectile hadron (or hadrons) can create one (or a few)
+// Quasmons, which are fragmented by the Fragment member function. As a
+// result a vector of G4QHadrons is created, which can include the residual
+// nucleus in the ground state.
+//---------------------------------------------------------------------
  
 //#define debug
@@ -66,5 +74,5 @@
   tot4Mom=G4LorentzVector(0.,0.,0.,envM);
 #ifdef debug
-		G4cout<<"G4QEnviron::Const: t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;
+  G4cout<<"G4QEnviron::Const: t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;
 #endif
 }
@@ -88,5 +96,5 @@
     //throw G4QException("***G4QEnvironment: There is no one projectile or vacuum target");
     if(nHadrons)                             // The projectiles are copied to the output
-	   {
+    {
       for(G4int ih=0; ih<nHadrons; ih++)
       {
@@ -99,5 +107,5 @@
         theProjectiles.push_back(curQH);      // Remenber it for the error message
       }
-	   }
+    }
     else if(targPDG!=90000000)               // No projHadrons,fill targetNucleus to output
     {
@@ -165,5 +173,5 @@
 #endif
     if(nHadrons==1)
-	   {
+    {
       G4QHadron* opHad=projHadrons[0];
       G4int opPDG=opHad->GetPDGCode();
@@ -172,5 +180,5 @@
 #endif
       if(opPDG==22)                           // *** Check photon's NuclearSplitThreshold
-	     {
+      {
         G4double exMass=tot4Mom.m();
 #ifdef pdebug
@@ -178,9 +186,9 @@
 #endif      
         if(exMass<targM+135.977) // Nucleus is below the pion production threshold
-	       {
+        {
           G4QNucleus exEnviron(tot4Mom,targPDG);
           // @@ One can put here the pbpt= (M.K.) @@ What about d,t,alpha splitting?
           if(targM>999.&&!exEnviron.SplitBaryon())//Nucleus is below SplitFragmentThreshold
-		        {
+          {
 #ifdef pdebug
             G4cout<<"G4QEnv::Const:Photon's added to Output, Env="<<theEnvironment<<G4endl;
@@ -192,7 +200,7 @@
             theQHadrons.push_back(photon);      // (delete equivalent)
             return;
-		        }
+          }
           else if(targM<=999.)                  // Target is a nucleon
-	         {
+          {
             G4LorentzVector prot4m(0.,0.,0.,targM); // Prototype of secondary proton 4mom
             G4LorentzVector gam4m(0.,0.,0.,0.);     // Prototype for secondary gamma 4mom
@@ -222,8 +230,8 @@
       }
       else if(opPDG==13 || opPDG==15)
-	     {
+      {
         G4int         nuPDG=14;
         if(opPDG==15) nuPDG=16;
-		      G4LorentzVector mu4m=opHad->Get4Momentum();
+        G4LorentzVector mu4m=opHad->Get4Momentum();
         //G4double qpen=-180.*log(G4UniformRand()); // Energy of target-quark-parton(T=180)
         G4double qpen=465.*sqrt(sqrt(G4UniformRand())); // UniformDistr for 3-q nucleon
@@ -268,6 +276,6 @@
           G4cout<<"--G4QEnv::Const:M="<<tm<<",GSM=="<<fnm<<G4endl;
 #endif
-		      }
-		      fnN.Set4Momentum(fn4m);
+        }
+        fnN.Set4Momentum(fn4m);
         // (mu,q->nu,q) reaction succeded and Neutrino can be pushed to Output
         G4QHadron* neutrino = 0;              // NeutrinoPrototype to be filled to Output
@@ -276,5 +284,5 @@
 #endif      
         if(tm<fnm)                            // Final Nucleus is below the GS threshold
-		      {
+        {
           qf4m=G4LorentzVector(0.,0.,0.,fnm); // Final nucleus 4M for the final decay
           qt4m=tg4m+mu4m;
@@ -303,7 +311,7 @@
         theQHadrons.push_back(neutrino);      // (delete equivalent)
         if(tm<fnm+135.98)                     // FinalNucleus is below thePionThreshold(HE)
-	       {
+        {
           if(!fnN.SplitBaryon()) // Final Nucleus is below the splittingFragmentThreshold
-		        {
+          {
 #ifdef mudebug
             G4cout<<"G4QEnv::Const: impossible to split nucleon after mu->nu"<<G4endl;
@@ -331,6 +339,6 @@
             theEnvironment.InitByPDG(90000000);// Create nuclear environment
             return;
-										}
-	       }
+          }
+        }
         // At this poin it is possible to convert mu- to pi-
         fn4m=qf4m-qi4m;
@@ -351,5 +359,5 @@
 #endif
       if(!hNFrag&&ch4M.e()>0.)                // => "Final hadron" case
-	     {
+      {
         G4int envPDG=theEnvironment.GetPDG();
         if(envPDG==90000000||(theEnvironment.Get4Momentum().m2())<1.) // ==>"Vacuum"
@@ -367,8 +375,8 @@
             G4int hQ = curHadr->GetQCode();  // One more check for valid of the QHadron
             if(hQ<0)
-	           {
+            {
               //G4cerr<<"--Warning--G4QEnv::Constructor:Q<0, PDG=("<<ih<<")"<<hPDG<<G4endl;
               //throw G4QException("***G4QEnvironment::Constructor:theInputHadron is bad");
-	           }
+            }
             else
             {
@@ -393,5 +401,5 @@
         }
         else                                  // Nuclear Environment still exists
-		      {
+        {
           G4QContent      hQC   = curHadr->GetQC();
 #ifdef pdebug
@@ -400,6 +408,6 @@
 #endif
           CreateQuasmon(hQC, ch4M,fake);
-		      } // End of Existing Nuclear Environment case
-	     } // End of final hadron case
+        } // End of Existing Nuclear Environment case
+      } // End of final hadron case
     } // End of the LOOP over input hadrons
   } // End of nuclear target case (including neutron=90000001 & proton=90001000)
@@ -419,8 +427,8 @@
       G4int hQ = curHadr->GetQCode();         // One more check for valid of the QHadron
       if(hQ<0)
-	     {
+      {
         G4cout<<"---Warning---G4QEnviron::Constructor:Vacuum,Q<0, 1st HPDG="<<hPDG<<G4endl;
         //throw G4QException("***G4QEnvironment::Constructor:theFirstInputHadron's wrong");
-	     }
+      }
       else                                // Now we can get 4Mom &  QC of incedent particle
       {
@@ -431,10 +439,10 @@
         G4int           tQ    = tQPDG.GetQCode();
         if(tQ<0||targPDG==10)
-		      {
+        {
           G4cout<<"---Warning---G4QEnv::Constructor:TrgQC<0, Chipo?,PDG="<<targPDG<<G4endl;
           //throw G4QException("***G4QEnvironment::Constructor: Target is wrong");
-		      }
+        }
         else                                 // Now we can create a unique Quasmon
-		      {
+        {
           h4Mom+=G4LorentzVector(0.,0.,0.,tQPDG.GetMass()); //Projectile + TargetHadron
           hQC+=tQPDG.GetQuarkContent();
@@ -444,9 +452,9 @@
           G4Quasmon* curQuasmon = new G4Quasmon(hQC, h4Mom);
           theQuasmons.push_back(curQuasmon); // Insert Quasmon or hadron/gamma (del. eq.)
-		      }
+        }
       } // End of Q-Code check
     } // End of proper PDG for i-th Hadron
     if(nHadrons>1) for(G4int ih=0; ih<nHadrons; ih++) // fill other Hadrons to Output
-	   {
+    {
       G4QHadron* newHadr = new G4QHadron(curHadr);
 #ifdef pdebug
@@ -454,5 +462,5 @@
 #endif
       theQHadrons.push_back(newHadr);        // Fill existing hadron (delete equivalent)
-	   }
+    }
   } // End of Unique Hadron target treatment
 #ifdef chdebug
@@ -684,6 +692,8 @@
 {//=======================================================================================
   static const G4double third=1./3.;
-  //static const G4double mNeut= G4QPDGCode(2112).GetMass();
-  //static const G4double mProt= G4QPDGCode(2212).GetMass();
+  static const G4double mNeut= G4QPDGCode(2112).GetMass();
+  static const G4double mNeu2 = mNeut*mNeut;
+  static const G4double mProt= G4QPDGCode(2212).GetMass();
+  static const G4double mPro2 = mProt*mProt;
   //static const G4double mLamb= G4QPDGCode(3122).GetMass();
   static const G4double mPi  = G4QPDGCode(211).GetMass();
@@ -704,5 +714,5 @@
   G4LorentzVector proj4M=pro4M;             // Fake equivalence to avoid & const
   G4double  projE=proj4M.e();               // energy of the projectile
-  G4int projPDG=projQC.GetSPDGCode();     // Minimum hadron for the projectile QC
+  G4int projPDG=projQC.GetSPDGCode();       // Minimum hadron for the projectile QC
   if(projE<0.)
   {
@@ -712,4 +722,6 @@
   }
   G4double  projM2=proj4M.m2();             // projectile's squared mass (print & v.gamma)
+  G4bool Pr1 = theProjectiles.size() == 1;  // A#ofHadronsInTheInputVector = 1 condition
+  if(Pr1 && std::fabs(G4QPDGCode(projPDG).GetMass2()-projM2) > .1 ) Pr1=false; // MassShell
   G4int     targPDG=theEnvironment.GetPDG();// PDG Code of the target nucleus
   if(targPDG>80000000&&targPDG!=90000000&&(theEnvironment.Get4Momentum().m2())>1.)//Nucleus
@@ -730,5 +742,5 @@
     else if(nCl<9) nBarClust=2;
     else
-	   {
+    {
       G4int v=nCl-9;
       G4int d=v/15;
@@ -738,5 +750,5 @@
     }
 #ifdef pdebug
-	   G4cout<<"G4QE::CrQ:TNuc:Z="<<envZ<<",N="<<envN<<",nC="<<nBarClust<<",tC="
+    G4cout<<"G4QE::CrQ:TNuc:Z="<<envZ<<",N="<<envN<<",nC="<<nBarClust<<",tC="
           <<totCharge<<", tB="<<totBaryoN<<G4endl;
 #endif
@@ -751,5 +763,5 @@
     nBarClust=theEnvironment.UpdateClusters(din); // Cluster Probabilities upto maxClust
 #ifdef pdebug
-	   G4cout<<"G4QEnv::CreateQ: Nucleus("<<targPDG<<") is created ("<<nBarClust<<" clast's)";
+    G4cout<<"G4QEnv::CreateQ: Nucleus("<<targPDG<<") is created ("<<nBarClust<<" clast's)";
     for(G4int ic=0;ic<nBarClust;ic++)
       G4cout<<" #"<<ic<<"("<<theEnvironment.GetProbability(ic)<<")";
@@ -759,5 +771,5 @@
     G4QNucleus memEnviron=theEnvironment;
 #ifdef pdebug
-	   G4cout<<"G4QE::CrQ:ClusterProbabCalculation tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;
+    G4cout<<"G4QE::CrQ:ClusterProbabCalculation tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;
 #endif
     G4bool efFlag=false;                    // EnergyFlowFlag=FALSE (@@=DEFOLT=@@ make par)
@@ -767,9 +779,9 @@
     G4LorentzVector ef4Mom(0.,0.,0.,0.);    // Summed 4-momentum of Energy Flux
     G4double proj3M=proj4M.rho();
-    //   ---   Pbar     ---    Nbar  -------  LAMBDAbar  ----  SIGMA-bar  ---  SIGMA0bar
+    // --- P-antibar ---  N-antibar  -- LAMBDA-antibar - SIGMA-antibar - SIGMA0-antibar
     if((projPDG==-2212||projPDG==-2112||projPDG==-3122||projPDG==-3112||projPDG==-3212||
         projPDG==-3222) && envBN>1 && proj3M<10.) // OnlyForAtRestReactions(@@to Interface)
-	   //  ^^^^^  SIGMA+bar
-	   {
+    // ^ SIGMA+ antibar
+    {
       // @@ Annihilation on one baryon is implemented (no annihilation on clusters! @@?) @@
 #ifdef pdebug
@@ -787,21 +799,21 @@
         targNPDG = 90000001;
         targQC   = neutQC;
-	     }
+      }
       else
-						//     if(rnd<=zpn)                      // Proton is a Periferal Target
+      //     if(rnd<=zpn)                      // Proton is a Periferal Target
       {
         targNPDG = 90001000;
         targQC   = protQC;
-	     }
+      }
       //else                                  // Deuteron as a Periferal Target
       //{
       //  targNPDG = 90001001;
       //  targQC   = deutQC;
-	     //}
+      //}
       //else                                  // Lambda is a Periferal Target (?)
       //{
       //  targNPDG = 91000000;
       //  targQC   = lambQC;
-	     //}
+      //}
       theEnvironment.Reduce(targNPDG);      // Subtract periferal baryon from Nucleus
 #ifdef pdebug
@@ -832,5 +844,5 @@
       G4Quasmon::OpenElectromagneticDecays();  // Parameter for multihadronFragmentatation^
 #ifdef pdebug
-	     G4cout<<"G4QE::CrQ:>>AnnihilationIsDone,C="<<totCharge<<",B="<<totBaryoN<<G4endl;// ^
+      G4cout<<"G4QE::CrQ:>>AnnihilationIsDone,C="<<totCharge<<",B="<<totBaryoN<<G4endl;// ^
 #endif
       delete pan;                              // The N-NbarQuasmon is deleted A.S.A.P.   ^
@@ -842,5 +854,5 @@
       G4double ra=std::pow(G4double(totBaryoN),third);  //                              ^ ^
 #ifdef pdebug
-	     G4cout<<"G4QE::CQ:N="<<tNH<<",T="<<totCharge<<","<<totBaryoN<<",A="<<ra<<G4endl;//^ ^
+      G4cout<<"G4QE::CQ:N="<<tNH<<",T="<<totCharge<<","<<totBaryoN<<",A="<<ra<<G4endl;//^ ^
 #endif
       for (G4int ind=0; ind<tNH; ind++)        // Loop over annihilation  QHadrons      ^ ^
@@ -855,5 +867,5 @@
         G4double        shMOM= sh4m.rho();              // Momentum of the projectile   ^ ^
 #ifdef pdebug
-		      G4cout<<"G4QE::CrQ:"<<ind<<","<<shDFL<<",PDG="<<shPDG<<",4M="<<sh4m<<G4endl; // ^ ^
+        G4cout<<"G4QE::CrQ:"<<ind<<","<<shDFL<<",PDG="<<shPDG<<",4M="<<sh4m<<G4endl; // ^ ^
 #endif
         G4double solAnCut=SolidAngle;                   // Proto ChargeDependantSolAngle^ ^
@@ -867,20 +879,20 @@
         //G4double solAnCut=SolidAngle+20*shCHG*sqrt(1.*envZ)/shMOM;//ChargeDepSolAngle ^ ^
 #ifdef pdebug
-		      G4cout<<"G4QE::CrQ: PDG="<<shPDG<<", p="<<shMOM<<", r="<<ra<<G4endl; //         ^ ^
+        G4cout<<"G4QE::CrQ: PDG="<<shPDG<<", p="<<shMOM<<", r="<<ra<<G4endl; //         ^ ^
 #endif
         if(!shDFL)                                      // Final(notDecayed) hadrons    ^ ^
-		      {
-#ifdef pdebug
-		        G4cout<<"G4QE::CQ:>H="<<shPDG<<":"<<dir.dot(shDIR)<<">"<<solAnCut<<G4endl; // ^ ^
-#endif
-		        //if((dir.dot(shDIR)>solAnCut||shMOM<120.) && abs(shPDG)>99) // Absorb mesons ^ ^
-		        if(dir.dot(shDIR)>solAnCut && abs(shPDG)>99) // Absorb mesons                 ^ ^
-		        {
-#ifdef pdebug
-												G4cout<<"G4QE::CQ:>H="<<shPDG<<":"<<dir.dot(shDIR)<<">"<<solAnCut<<", P="// ^ ^
-																		<<shMOM<<" < 120"<<G4endl;                           //               ^ ^
+        {
+#ifdef pdebug
+          G4cout<<"G4QE::CQ:>H="<<shPDG<<":"<<dir.dot(shDIR)<<">"<<solAnCut<<G4endl; // ^ ^
+#endif
+          //if((dir.dot(shDIR)>solAnCut||shMOM<120.) && abs(shPDG)>99) // Absorb mesons ^ ^
+          if(dir.dot(shDIR)>solAnCut && abs(shPDG)>99) // Absorb mesons                 ^ ^
+          {
+#ifdef pdebug
+            G4cout<<"G4QE::CQ:>H="<<shPDG<<":"<<dir.dot(shDIR)<<">"<<solAnCut<<", P="// ^ ^
+                  <<shMOM<<" < 120"<<G4endl;                           //               ^ ^
 #endif
             if(efFlag)                           // => Case of "Energy Flux approach"   ^ ^
-		          {
+            {
               G4QContent shQC = curHadr->GetQC();// QuarkContent of the Current Hadron  ^ ^
               ef4Mom+=sh4m;
@@ -890,9 +902,9 @@
               G4int hPDG=curHadr->GetPDGCode();    // Only for gebug printing           ^ ^
               G4LorentzVector h4M = curHadr->Get4Momentum();  // Only for gebug printing^ ^
-			           G4cout<<"G4QE::CrQ:#"<<efCounter<<", PDG="<<hPDG<<", h4M="<<h4M<<G4endl;//^ ^
-#endif
-		          }
-		          else                                   //=>"MultyQuasFragmentation"(!efFlag)^ ^
-		          {
+              G4cout<<"G4QE::CrQ:#"<<efCounter<<", PDG="<<hPDG<<", h4M="<<h4M<<G4endl;//^ ^
+#endif
+            }
+            else                                   //=>"MultyQuasFragmentation"(!efFlag)^ ^
+            {
               G4QHadron* mqHadron = new G4QHadron(curHadr);
               input.push_back(mqHadron);           // Fill hadron-copy (del equiv)  <...^ ^
@@ -900,14 +912,14 @@
               G4int hPDG=curHadr->GetPDGCode();    // Only for debug printing           ^ ^
               G4LorentzVector h4M = curHadr->Get4Momentum(); // Only for gebug printing ^ ^
-		            G4cout<<"G4QE::CrQ:Absorb#"<<ind<<", PDG="<<hPDG<<", h4M="<<h4M<<G4endl;//^ ^
-#endif
-		          }                                      //                                   ^ ^
-		        }                                        //                                   ^ ^
-		        else                                     // DirectFilling of the output vector^ ^
-		        {                                        //                                   ^ ^
+              G4cout<<"G4QE::CrQ:Absorb#"<<ind<<", PDG="<<hPDG<<", h4M="<<h4M<<G4endl;//^ ^
+#endif
+            }                                      //                                   ^ ^
+          }                                        //                                   ^ ^
+          else                                     // DirectFilling of the output vector^ ^
+          {                                        //                                   ^ ^
 #ifdef pdebug
             G4int hPDG=curHadr->GetPDGCode();      // Only for gebug printing           ^ ^
             G4LorentzVector h4M = curHadr->Get4Momentum(); // Only for gebug printing   ^ ^
-		          G4cout<<"G4QE::CrQ: Fill OUT #"<<ind<<",PDG="<<hPDG<<",h4M="<<h4M<<G4endl;//^ ^
+            G4cout<<"G4QE::CrQ: Fill OUT #"<<ind<<",PDG="<<hPDG<<",h4M="<<h4M<<G4endl;//^ ^
 #endif
             // Just fill a hadron to the output stack (One should make EM decays elsewhere)
@@ -915,14 +927,14 @@
             theQHadrons.push_back(curHadron);      // TheQHadrs are filled as new Hadrs ^ ^
           }
-		      } // End of the IF over projectiles                                             ^ ^
-	     } // End of LOOP over "output" of annihilation                                    ^ ^
+        } // End of the IF over projectiles                                             ^ ^
+      } // End of LOOP over "output" of annihilation                                    ^ ^
       for_each(output->begin(), output->end(), DeleteQHadron());     //DESTRUCT output>-^-^
       output->clear();                             //                                   ^ ^
       delete output;                               // ==================================^=^
       if(!efFlag)                                  // =>NotEnergyFlux=MultyQuasmon Case ^
-	     {
+      {
         G4int noh = theQHadrons.size();            // a#oh hadrons in Output UpToNow    ^
         if(noh) for(G4int kh=0; kh<noh; kh++)      // One can escape it but...          ^
-								{                                          //                                   ^
+        {                                          //                                   ^
 #ifdef pdebug
           G4cout<<"G4QE::CreateQ:H#"<<kh<<", QC="<<theQHadrons[kh]->GetQC() //          ^
@@ -935,19 +947,19 @@
           tmpQHadVec->clear();                     //                                 ^ ^
           delete tmpQHadVec;           // who calls DecayQHadron must clear & delete  ^ ^
-		      }                                          //                                 ^ ^
+        }                                          //                                 ^ ^
         theQHadrons.clear(); // deletedWhenDecayed // Now theQHadrons is EmptyVector->^ ^
 #ifdef pdebug
         G4int nInH=intQHadrons.size();             // Resulting #of hadrons after decay ^
-	       G4cout<<"G4QE::CrQ:nH="<<nInH<<",C="<<totCharge<<",B="<<totBaryoN<<G4endl;//    ^
+        G4cout<<"G4QE::CrQ:nH="<<nInH<<",C="<<totCharge<<",B="<<totBaryoN<<G4endl;//    ^
 #endif
         if(!(input.size()))                        // *RETURN* Without Quasmon creation-^
-		      {                                          //                                   ^
-#ifdef pdebug
-	         G4cout<<"*G4QEnv::CrQ:AnnihStack tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;//^
-#endif
-		        return;                                  // Do not clear and delete objects --^
+        {                                          //                                   ^
+#ifdef pdebug
+          G4cout<<"*G4QEnv::CrQ:AnnihStack tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;//^
+#endif
+          return;                                  // Do not clear and delete objects --^
         }                                          //                                   ^
 #ifdef pdebug
-	       G4cout<<"G4QE::CrQ:fakeQ, restPars tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;//^
+        G4cout<<"G4QE::CrQ:fakeQ, restPars tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;//^
 #endif
         G4Quasmon::SetParameters(QTemper,QSOverU,QEtaSup);//RecoverQParam's after anihil^
@@ -956,5 +968,5 @@
         G4QEnvironment* muq = new G4QEnvironment(input,theEnvironment.GetPDG());//<--+  ^
 #ifdef pdebug
-	       G4cout<<"G4QE::CrQ:befCl&Dest tC="<<totCharge<<", tB="<<totBaryoN<<G4endl; //^  ^
+        G4cout<<"G4QE::CrQ:befCl&Dest tC="<<totCharge<<", tB="<<totBaryoN<<G4endl; //^  ^
 #endif
         for_each(input.begin(), input.end(), DeleteQHadron());     //DESTROING inp >-^--^
@@ -969,5 +981,5 @@
 #endif
         if(noh) for(G4int nh=0; nh<noh; nh++)      // One can escape it but...          ^ ^
-								{                                          //                                   ^ ^
+        {                                          //                                   ^ ^
 #ifdef pdebug
           G4cout<<"G4QE::CreateQ: NotIntQH#"<<nh<<", QC="<<(*outH)[nh]->GetQC()  //     ^ ^
@@ -980,24 +992,24 @@
           tmpQHadVec->clear();                     //                                 ^ ^ ^
           delete tmpQHadVec;           // who calls DecayQHadron must clear & delete->+ ^ ^
-		      }                                          //                                   ^ ^
+        }                                          //                                   ^ ^
         outH->clear();                             //                                   ^ ^
         delete outH;                               // >---->---->---->---->---->---->---^-+
-	       G4int nMQ = outQ->size();                  // A#ofQuasmons in MultyQuasmonOutput^
+        G4int nMQ = outQ->size();                  // A#ofQuasmons in MultyQuasmonOutput^
 #ifdef pdebug
         G4LorentzVector eLorV=theEnvironment.Get4Momentum(); //                         ^
-	       G4cout<<"G4QE::CrQ:nMQ="<<nMQ<<",tC="<<totCharge<<", tB="<<totBaryoN<<G4endl;// ^
-	       G4cout<<"G4QE::CrQ:Env4M="<<eLorV<<G4endl; //                                   ^
+        G4cout<<"G4QE::CrQ:nMQ="<<nMQ<<",tC="<<totCharge<<", tB="<<totBaryoN<<G4endl;// ^
+        G4cout<<"G4QE::CrQ:Env4M="<<eLorV<<G4endl; //                                   ^
         G4LorentzVector contr4M=eLorV; //                                               ^
 #endif
         if(nMQ) for(G4int mh=0; mh<nMQ; mh++)      // Can escape CreationDistruct but...^
-								{                                          //                                   ^
+        {                                          //                                   ^
           G4Quasmon* curQ = new G4Quasmon((*outQ)[mh]);// Copy to destroy TMP(?)        ^
 #ifdef pdebug
           G4LorentzVector qLorV=curQ->Get4Momentum(); //                                ^
-	         G4cout<<"G4QE::CrQ:Q#"<<mh<<",4M="<<qLorV<<curQ->GetQC()<<G4endl; //          ^
+          G4cout<<"G4QE::CrQ:Q#"<<mh<<",4M="<<qLorV<<curQ->GetQC()<<G4endl; //          ^
           contr4M+=qLorV; //                                                            ^
 #endif
           theQuasmons.push_back(curQ);             // Fill QuasmonCopies in theQuasmons ^
-	       }                                          //                                   ^
+        }                                          //                                   ^
         for_each(outQ->begin(), outQ->end(), DeleteQuasmon()); // >---------------------^
         outQ->clear();                             //                                   ^
@@ -1005,13 +1017,13 @@
 #ifdef pdebug
         G4int nsHadr  = theQHadrons.size();      // Update the value of OUTPUT entries
-	       G4cout<<"G4QEnvironment::CreateQ: before return nH="<<nsHadr<<G4endl;
+        G4cout<<"G4QEnvironment::CreateQ: before return nH="<<nsHadr<<G4endl;
         if(nsHadr) for(G4int jso=0; jso<nsHadr; jso++)// LOOP over output hadrons 
         {
           G4int hsNF  = theQHadrons[jso]->GetNFragments(); // A#of secondary fragments
           if(!hsNF)                                        // Add only final hadrons
-										{
+          {
             G4LorentzVector hLorV=theQHadrons[jso]->Get4Momentum();
             G4int           hPDGC=theQHadrons[jso]->GetPDGCode();
-          		G4cout<<"G4QE::CrQ: H#"<<jso<<",4M="<<hLorV<<hPDGC<<G4endl;
+            G4cout<<"G4QE::CrQ: H#"<<jso<<",4M="<<hLorV<<hPDGC<<G4endl;
             contr4M+=hLorV;
           }
@@ -1019,13 +1031,13 @@
             G4cout<<"G4Q::CrQ:"<<jso<<"NF=0,4M="<<theQHadrons[jso]->Get4Momentum()<<G4endl;
         }
-	       G4cout<<"G4QEnvironment::CreateQ: before return tot4M="<<contr4M<<G4endl;
+        G4cout<<"G4QEnvironment::CreateQ: before return tot4M="<<contr4M<<G4endl;
 #endif
         return;                                    // *** RETURN *** 
       }
       else                                         // ==> Energy Flux case
-	     {
+      {
         if (!efCounter) return;                    // ***RETURN*** Without Quasmon creation
-	     }
-	   }                                              // End of Hyperon annihilation case
+      }
+    }                                              // End of Hyperon annihilation case
     else EnFlQC=projQC;                            // For notAntiBar, don't use EnergyFlux
     G4double EnFlP=ef4Mom.rho();                   // Mom. of EnergyFlow forClusterCreation
@@ -1033,5 +1045,5 @@
     G4int nCandid = theQCandidates.size();
 #ifdef pdebug
-	   G4cout<<"G4QEnvironment::CrQ: InteractionProbabilities are done, nC="<<nCandid<<G4endl;
+    G4cout<<"G4QEnvironment::CrQ: InteractionProbabilities are done, nC="<<nCandid<<G4endl;
 #endif
     G4double maxP = theQCandidates[nCandid-1]->GetIntegProbability();
@@ -1039,13 +1051,13 @@
     G4QContent    curQC;                           // Quark Content of the selected cluster
     if(nCandid<=0)
-	   {
-	     G4cout<<"---Warning---G4QEnv::CreaQ:nC="<<nCandid<<",maxP="<<maxP<<",E="
+    {
+      G4cout<<"---Warning---G4QEnv::CreaQ:nC="<<nCandid<<",maxP="<<maxP<<",E="
             <<theEnvironment<<G4endl;
       //throw G4QException("G4QEnvironment::CreateQ: Can not select a cluster");
-	   }
+    }
     if(nCandid==1||maxP==0.)
-	   {
-#ifdef pdebug
-	     G4cout<<"***G4QEnv::CrQ:MaxP=0||nCand=1: Use all Env., Env="<<theEnvironment<<G4endl;
+    {
+#ifdef pdebug
+      G4cout<<"***G4QEnv::CrQ:MaxP=0||nCand=1: Use all Env., Env="<<theEnvironment<<G4endl;
 #endif
       curQC=theEnvironment.GetQCZNS();
@@ -1056,5 +1068,5 @@
       G4double totP = maxP * G4UniformRand();
 #ifdef pdebug
-	     G4cout<<"G4QEnvironment::CrQ:nC="<<nCandid<<", maxP="<<maxP<<", totP="<<totP<<G4endl;
+      G4cout<<"G4QEnvironment::CrQ:nC="<<nCandid<<", maxP="<<maxP<<", totP="<<totP<<G4endl;
 #endif
       while(theQCandidates[i]->GetIntegProbability()<totP) i++;
@@ -1064,22 +1076,22 @@
       G4double clMass=targClust.GetGSMass();    // Mass of residual nuclear environment
 #ifdef cldebug
-	     G4cout<<"G4QEnv::CrQ:Cl#"<<i<<"(of "<<nCandid<<"),QC="<<curQC<<",M="<<clMass<<G4endl;
+      G4cout<<"G4QEnv::CrQ:Cl#"<<i<<"(of "<<nCandid<<"),QC="<<curQC<<",M="<<clMass<<G4endl;
 #endif
       G4LorentzVector pq4M=proj4M+G4LorentzVector(0.,0.,0.,clMass); 
       if(pq4M.m()>=clMass)
-	     {
-#ifdef pdebug
-	       G4cout<<"G4QEnv::CQ:#"<<i<<"("<<targClust<<curQC<<") Env="<<theEnvironment<<G4endl;
+      {
+#ifdef pdebug
+        G4cout<<"G4QEnv::CQ:#"<<i<<"("<<targClust<<curQC<<") Env="<<theEnvironment<<G4endl;
 #endif
         theEnvironment.Reduce(targClust.GetPDG());// Subtract selected cluster from Nucleus
-	     }
+      }
       else
-	     {
+      {
         G4double teMass=theEnvironment.GetGSMass(); //Mass of theResidualNuclearEnvironment
         G4LorentzVector te4M=proj4M+G4LorentzVector(0.,0.,0.,teMass);
         if(te4M.m()>=teMass)
-	       {
-#ifdef pdebug
-	         G4cout<<"***G4QEnv::CrQ: Deep virtual, use all Env,Env="<<theEnvironment<<G4endl;
+        {
+#ifdef pdebug
+          G4cout<<"***G4QEnv::CrQ: Deep virtual, use all Env,Env="<<theEnvironment<<G4endl;
 #endif
           curQC=theEnvironment.GetQCZNS();
@@ -1087,16 +1099,17 @@
         }
         else
-		      {
+        {
           G4QHadron* projH = new G4QHadron(projQC,proj4M);
           theQHadrons.push_back(projH);
-	         G4cout<<"---Warning---G4QE::CrQ:Fill Proj asItIs QC/4m="<<projQC<<proj4M<<G4endl;
+          G4cout<<"---Warning---G4QE::CrQ:Fill Proj asItIs QC/4m="<<projQC<<proj4M<<G4endl;
           return;
         }
-	     }
-	   }
+      }
+    }
     G4double envMass=theEnvironment.GetGSMass();   // Mass of residual nuclear environment
-    if(projPDG==22&&projE<PiPrThresh+(M2ShiftVir+projM2)/DiNuclMass) // Gam+quark Interact
+    // @@ Pr1 condition (individual particle) can be taken out of brackets for all if's
+    if(Pr1&&projPDG==22&&projE<PiPrThresh+(M2ShiftVir+projM2)/DiNuclMass) // ==> Gamma+q
     //if(2>3)                                      //@@ TMP:PhotoAbsorbtion by q is closed
-	   {
+    {
       q4Mom=G4LorentzVector(0.,0.,0.,tgMass-envMass);// PhotoInteracts with BoundedCluster
       valQ=curQC;
@@ -1106,8 +1119,8 @@
       G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom, proj4M);//Interaction gam+q inside
       theQuasmons.push_back(curQuasmon);  // Insert Quasmon without incid. gamma (del.eq.)
-	   }
-    else if((projM2-mPi2<.00001&&projE-mPi<0.1)&&projPDG==-211&&!fake)
+    }
+    else if(Pr1&&(std::fabs(projM2-mPi2)<.00001 && projE-mPi<0.1) && projPDG==-211 &&!fake)
     //if(2>3)                                //@@ ***TMP*** PionAbsorbAtRest by q is closed
-	   {
+    {
       q4Mom=proj4M+G4LorentzVector(0.,0.,0.,tgMass-envMass);// PION + BoundCluster
       valQ=EnFlQC+curQC;
@@ -1118,11 +1131,116 @@
       G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom, -proj4M);//Interact gam+q inside
       theQuasmons.push_back(curQuasmon);  // Insert Quasmon without incid. gamma (del.eq.)
-	   }
-    else if(projPDG==2212 && G4UniformRand()>.5) // Bad for ions! Only for baryons !
-    //else if(2>3)                          // free flying proton is closed
-	   {
-      q4Mom=proj4M;       // 4M: QUASMON=Projectile
-      valQ=EnFlQC;        // qc: QUASMON=Projectile
+    }
+    //else if(Pr1&&projPDG==2212&&G4UniformRand()<.6+.4*std::exp(-envMass/8192))// keepProj
+    else if(2>3)                          // free flying projectile is closed
+    {
+      q4Mom=proj4M;                       // 4M: QUASMON=Projectile
+      valQ=EnFlQC;                        // qc: QUASMON=Projectile
       theEnvironment=memEnviron;
+#ifdef pdebug
+      G4cout<<"G4QEnv::CreQAll: Q="<<q4Mom<<valQ<<", QEnv="<<theEnvironment<<G4endl;
+#endif
+      G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom);
+      theQuasmons.push_back(curQuasmon);  // Insert Quasmon (even hadron/gamma) (del.eq.)
+    }
+    else if(Pr1&&projPDG==2212&&G4UniformRand()>15./(proj4M.e()-mProt))//ExcitatedCluster
+    //else if(2>3)                          // No excitation of a cluster by projScattering
+    {
+      G4double prM=mProt;                 // mass of the projectile (M) (for future gener.)
+      G4double prM2=mPro2;                // squared mass of the projectile (M^2)
+      G4double scM=mProt;                 // mass of the scattered projectile (M')
+      G4double scM2=mPro2;                // squared mass of the scatteredProjectile (M'^2)
+      G4QContent scQC=projQC;             // QC of the scattered projectile
+      G4QContent chQC(0,0,0,0,0,0);       // Change of the Quasmon QC
+      if(G4UniformRand()<.5*envN/envBN)   // (u->u,d, d->d)? in future make it universal
+      {
+        scM=mNeut;                        // Charge exchange reaction
+        scM2=mNeu2;
+        scQC=neutQC;
+        chQC=projQC-scQC;                 // Charge of the created Quasmon must be changed
+      }
+      G4double tnM=tgMass-envMass;        // minimal mass of the target cluster (m)
+      G4double tnM2=tnM*tnM;              // squared mass of the target cluster (m^2)
+      G4double dtnM=tnM+tnM;              // doubled mass of the target cluster (2*m)
+      G4double prE=proj4M.e();            // enrgy of the projectile (E)
+      G4double mu2=tnM2+dtnM*(prE-scM);   // max squared mass of the excited cluster (mu^2)
+      //G4double mu=std::sqrt(mu2);         // max mass of the excited cluster (mu)
+      G4double B=.00001;                  // (parameter) slope of the diffraction cone
+      G4double rmu2=0.;                   // Chosen sqMass of excitedClust (Prototype)
+      G4double tmax=0.;                   // max -t for scattering (Prototype)
+      G4double rt=0.;                     // Chosen -t (Prototype)
+      G4double om=0.;                     // Energy of the excited cluster (Prototype)
+      G4double ep=0.;                     // Energy of the scattered projectile (eps Proto)
+      if (prE<prM)G4cout<<"-Warn-G4QEnv::CreQAll:(scat w ex)E="<<prE<<" < M="<<prM<<G4endl;
+      G4double Pi=std::sqrt(prE*prE-prM2); // Proj momentum (P)
+      G4double po=0.;                      // Scat momentum (p) (Prototype)
+      G4double cost=2.;                    // cos(theta) for the scattered proj (Prototype)
+      G4int cct=0;                         // Counter of cost attempts (@@ can be limited)
+      while ( std::fabs(cost) > 1. )
+      {
+        cct++;
+#ifdef debug
+        G4cout<<"-Warning-G4QEnv::CreQAll: c="<<cct<<" (scat w ex) cost="<<cost<<G4endl;
+#endif
+        rmu2=tnM2*pow(mu2/tnM2,G4UniformRand()); // Chosen SqMass of excitedClust (MMA)
+        tmax=mu2-rmu2;                    // max -t for scattering
+        rt=-std::log(1.-G4UniformRand()*(1.-std::exp(-B*tmax)))/B; // Chosem -t
+        om=(tnM2+rmu2+rt)/dtnM;           // Energy of the excited cluster
+        ep=prE+tnM-om;                    // Energy of the scattered projectile (epsilon)
+#ifdef pdebug
+        G4cout<<"G4QEnv::CreQAll: m2="<<tnM2<<" < mu2="<<rmu2<<" < "<<mu2<<"=Max2"<<G4endl;
+        G4cout<<"G4QEnv::CreQAll: -t="<<rt<<" < "<<tmax<<"=tmax"<<G4endl;
+        G4cout<<"G4QEnv::CreQAl: om="<<om<<" > m="<<tnM<<", ep="<<ep<<" > M="<<prM<<G4endl;
+#endif
+        if(ep<scM)G4cout<<"+Warn-G4QEnv::CreQAl:(scat w ex)Eo="<<prE<<" < M="<<prM<<G4endl;
+        po=std::sqrt(ep*ep-scM2);   // Scat momentum (p)
+        cost=(prE*ep-0.5*(rt+prM2+scM2))/Pi/po; // cos(theta) for the scattered
+      }
+      G4double om2=om*om;
+      if(om2<rmu2)G4cout<<"-Warn-G4QEnv::CreQA:(scat w ex)e2="<<om<<" < mu2="<<tnM<<G4endl;
+#ifdef pdebug
+      G4cout<<"G4QEnv::CreQAll: ct="<<cost<<",pio="<<Pi*po<<",()="<<cost*Pi*po<<G4endl;
+      G4double ps=std::sqrt(om2-rmu2);    // Momentum of the excited cluster (p)
+#endif
+      G4double pfc=po*cost;               // Longitudinal projection of the scattered proj
+      G4double pfs=po*std::sqrt(1.-cost*cost); // Transversal projection of scattered proj
+      // ---- @@ From here can be a MF for QF nucleon extraction (if used by others)
+      G4ThreeVector vdir = proj4M.vect(); // 3-Vector in the projectile direction
+      G4ThreeVector vx(0.,0.,1.);         // ProtoOrt in the direction of the projectile
+      G4ThreeVector vy(0.,1.,0.);         // First ProtoOrt orthogonal to the direction
+      G4ThreeVector vz(1.,0.,0.);         // Second ProtoOrt orthoganal to the direction
+      if(vdir.mag2() > 0.)                // the projectile isn't at rest
+      {
+        vx = vdir.unit();                 // Ort in the direction of the projectile
+        G4ThreeVector vv= vx.orthogonal();// Not normed orthogonal vector (!)
+        vy = vv.unit();                   // First ort orthogonal to the proj. direction
+        vz = vx.cross(vy);                // Second ort orthoganal to the proj. direction
+      }
+      // ---- @@ End of possible MF (Similar is in G4QCollision)
+      G4double phi=twopi*G4UniformRand(); // Phi of the Fermi-Mom
+      G4ThreeVector fp=pfc*vx+pfs*(std::sin(phi)*vy+std::cos(phi)*vz);
+      G4LorentzVector s4M(fp,ep);
+#ifdef pdebug
+      G4cout<<"G4QEnv::CreQA:ps="<<po<<"="<<fp.mag()<<",sM="<<prM<<"="<<s4M.m()<<G4endl;
+      G4cout<<"G4QEnv::CreQA:Ee="<<prE*ep<<" =? "<<(prM2+rt/2-Pi*po*cost)<<G4endl;
+#endif
+      if(std::fabs(s4M.m()-scM)>.001)G4cout<<"-W-G4QE::CQA:M="<<prM<<"#"<<s4M.m()<<G4endl;
+      G4LorentzVector c4M=proj4M+G4LorentzVector(0.,0.,0.,tnM)-s4M;
+#ifdef pdebug
+      G4cout<<"G4QEnv::CreQA: ec="<<om<<" = "<<c4M.e()<<", pc="<<ps<<" = "
+            <<c4M.rho()<<", mc2="<<rmu2<<" = "<<c4M.m2()<<G4endl;
+      G4cout<<"G4QEnv::CQA:ht="<<(tnM2+rmu2)/2-tnM*om<<"="<<prM2-prE*ep+Pi*po*cost<<G4endl;
+#endif
+      if(std::fabs(c4M.m2()-rmu2)>.1)
+        G4cout<<"-W-G4QE::CrQ:m2="<<rmu2<<"#"<<c4M.m2()<<",P="<<proj4M<<",M="<<tnM<<G4endl;
+      G4QHadron* projH = new G4QHadron(scQC,s4M); // Create scattered Projectile Hadron
+      theQHadrons.push_back(projH);       // Fill it to the output vector
+      G4Quasmon* curQuasmon = new G4Quasmon(curQC+chQC, c4M); // Q=ExcitedCluster
+      theQuasmons.push_back(curQuasmon); // Insert Quasmon (even hadron/gamma) (del.eq.)
+    }
+    else
+    {
+      q4Mom=proj4M+G4LorentzVector(0.,0.,0.,tgMass-envMass); // Projectile + BoundCluster
+      valQ=EnFlQC+curQC;
 #ifdef pdebug
       G4cout<<"G4QEnv::CreQAll: Q="<<q4Mom<<valQ<<", QEnv="<<theEnvironment<<G4endl;
@@ -1130,15 +1248,5 @@
       G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom);
       theQuasmons.push_back(curQuasmon); // Insert Quasmon (even hadron/gamma) (del.eq.)
-	   }
-    else
-	   {
-      q4Mom=proj4M+G4LorentzVector(0.,0.,0.,tgMass-envMass);//Projectile + BoundCluster
-      valQ=EnFlQC+curQC;
-#ifdef pdebug
-      G4cout<<"G4QEnv::CreQAll: Q="<<q4Mom<<valQ<<", QEnv="<<theEnvironment<<G4endl;
-#endif
-      G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom);
-      theQuasmons.push_back(curQuasmon); // Insert Quasmon (even hadron/gamma) (del.eq.)
-	   }
+    }
   }
   else
@@ -1167,8 +1275,8 @@
     G4int cCH  = curCand->GetCharge();             // Charge of the candidate
 #ifdef sdebug
-	   G4cout<<"G4QE::PIP:=====> #"<<index<<", cPDG="<<cPDG<<",S="<<cST<<G4endl;
+    G4cout<<"G4QE::PIP:=====> #"<<index<<", cPDG="<<cPDG<<",S="<<cST<<G4endl;
 #endif
     if(cPDG>80000000&&cPDG!=90000000&&!cST&&cCH>0&&cBN>0&&cCH<=cBN) // ===> Nuclear cluster
-	   {
+    {
       G4int zc = cCH;                              // "Z" of the cluster
       G4int nc = cBN-cCH;                          // "N" of the cluster
@@ -1176,11 +1284,11 @@
       G4double dOfCl=curCand->GetDenseProbability();// A number of clusters in dense region
 #ifdef sdebug
-						G4cout<<"G4QE::PIP:Z="<<zc<<",N="<<nc<<",nC="<<nOfCl<<",dC="<<dOfCl<<G4endl;
+      G4cout<<"G4QE::PIP:Z="<<zc<<",N="<<nc<<",nC="<<nOfCl<<",dC="<<dOfCl<<G4endl;
 #endif
       if(cPDG==91000000||cPDG==90001000||cPDG==90000001)
-	     {
+      {
         allB+=nOfCl;
         denseB+=dOfCl;
-	     }
+      }
       G4QContent pQC=curCand->GetQC();             // Quark Content of the candidate
       ////////////G4int pC   = projQC.GetCharge();   // Charge of the projectile
@@ -1220,8 +1328,8 @@
       G4double charge= qQC.GetCharge();
       G4double dq= abs(baryn-charge-charge);
-	     G4cout<<"G4QE::PIP:P="<<probab<<",ac="<<cBN<<",dq="<<dq<<",f="<<fact<<",qC="
+      G4cout<<"G4QE::PIP:P="<<probab<<",ac="<<cBN<<",dq="<<dq<<",f="<<fact<<",qC="
             <<qC<<",rPDG="<<rPDG<<",pPDG="<<pPDG<<",nCP="<<nOfCl<<",dCP="<<dOfCl<<G4endl;
 #endif
-	   }
+    }
     else probab=0.;
     sum+=probab;
@@ -1243,5 +1351,5 @@
     G4int clustQCode = i+90; // Q-code of the cluster in the CHIPS World "IsoNuclei"
 #ifdef sdebug
-	   G4cout<<"G4QEnvironment::InitClustersVector: Before Init Q ="<<clustQCode<<G4endl;
+    G4cout<<"G4QEnvironment::InitClustersVector: Before Init Q ="<<clustQCode<<G4endl;
 #endif
     G4QPDGCode clustQPDG(true,clustQCode);
@@ -1250,8 +1358,8 @@
     G4int clustB=clustQPDG.GetBaryNum();
 #ifdef sdebug
-	   G4cout<<"G4QEnvironment::InitClustersVector: Before insert ="<<clusterPDG<<G4endl;
-#endif
-	   //theQCandidates.push_back(new G4QCandidate(clusterPDG)); // (delete equivalent)
-	   if(clustB<=maxA) theQCandidates.push_back(new G4QCandidate(clusterPDG)); // (del.eq.)
+    G4cout<<"G4QEnvironment::InitClustersVector: Before insert ="<<clusterPDG<<G4endl;
+#endif
+    //theQCandidates.push_back(new G4QCandidate(clusterPDG)); // (delete equivalent)
+    if(clustB<=maxA) theQCandidates.push_back(new G4QCandidate(clusterPDG)); // (del.eq.)
 #ifdef sdebug
     G4cout<<"G4QEnvironment::InitClustersVector: Cluster # "<<i<<" with code = "
@@ -1272,4 +1380,6 @@
   static const G4QContent SiPQC(0,2,1,0,0,0);
   static const G4QContent SiMQC(2,0,1,0,0,0);
+  static const G4QContent protQC(1,2,0,0,0,0);
+  static const G4QContent neutQC(2,1,0,0,0,0);
   //static const G4QContent alQC(6,6,0,0,0,0);
   static const G4QPDGCode nQPDG(2112);
@@ -1328,15 +1438,15 @@
     G4int nPDG = theEnvironment.GetPDG();    // PDG code of the residual Nucl.Environ.
 #ifdef pdebug
-	   G4cout<<"G4QE::HQE:***NO QUASMONS***Env="<<nPDG<<theEnvironment.Get4Momentum()<<G4endl;
+    G4cout<<"G4QE::HQE:***NO QUASMONS***Env="<<nPDG<<theEnvironment.Get4Momentum()<<G4endl;
 #endif
     if(nPDG==90000000) return theQHadrons;
     if(nPDG>80000000)
-	   {
+    {
       G4QHadron* rNucleus = new G4QHadron(theEnvironment); // Create HadronEnvironment
       theQHadrons.push_back(rNucleus);       // Fill GS - no further decay (del. equiv.)
 #ifdef fdebug
-	     G4cout<<"G4QEnv::HadrQE: >>>> Fill Environment="<<theEnvironment<<G4endl;
-#endif
-	   }
+      G4cout<<"G4QEnv::HadrQE: >>>> Fill Environment="<<theEnvironment<<G4endl;
+#endif
+    }
     return theQHadrons;
   }
@@ -1347,11 +1457,11 @@
     G4int totInC=0;
     G4LorentzVector totIn4M(0.,0.,0.,0.);
-	   for (G4int is=0; is<nQuasmons; is++)     // Sum4mom's of Quasmons for the comparison
-	   {
-	     G4Quasmon*      pQ = theQuasmons[is];
+    for (G4int is=0; is<nQuasmons; is++)     // Sum4mom's of Quasmons for the comparison
+    {
+      G4Quasmon*      pQ = theQuasmons[is];
       G4LorentzVector Q4M= pQ->Get4Momentum();
       totIn4M           += Q4M;
       totInC            += pQ->GetQC().GetCharge();
-	   } // End of TotInitial4Momentum summation LOOP over Quasmons
+    } // End of TotInitial4Momentum summation LOOP over Quasmons
     G4int nsHadr  = theQHadrons.size();      // Update the value of OUTPUT entries
     if(nsHadr) for(G4int jso=0; jso<nsHadr; jso++)// LOOP over output hadrons 
@@ -1368,7 +1478,7 @@
     G4QNucleus vE(90000000);
     G4int     nlq = 0;                       // Prototype of a#of Living Quasmons
-	   if(nQuasmons) for(G4int lq=0; lq<nQuasmons; lq++)if(theQuasmons[lq]->GetStatus())nlq++;
-	   if(nQuasmons) for(G4int iq=0; iq<nQuasmons; iq++)
-	   {
+    if(nQuasmons) for(G4int lq=0; lq<nQuasmons; lq++)if(theQuasmons[lq]->GetStatus())nlq++;
+    if(nQuasmons) for(G4int iq=0; iq<nQuasmons; iq++)
+    {
 #ifdef chdebug
       G4int f1Charge=theEnvironment.GetCharge();
@@ -1404,5 +1514,5 @@
       G4int ist=theQuasmons[iq]->GetStatus();// Status of the Quasmon before fragmentation
       if(ist)
-	     {
+      {
         G4QHadronVector* output=theQuasmons[iq]->Fragment(vE,1);//!!!DESTROY!!! <---------+
         G4int ast=theQuasmons[iq]->GetStatus();  // Quasmon's Status after fragmentation  ^
@@ -1413,6 +1523,6 @@
 #endif
         if(nHadrons>0)                           // Copy QHadrons-Quasmon to Output       ^
-	       {
-    	     for (G4int ih=0; ih<nHadrons; ih++)    // LOOP over QHadrons of the Quasmon     ^
+        {
+          for (G4int ih=0; ih<nHadrons; ih++)    // LOOP over QHadrons of the Quasmon     ^
           {
             //G4QHadron* curH=new G4QHadron(output->operator[](ih));// (Del 7 lines below)^
@@ -1424,7 +1534,7 @@
             theQHadrons.push_back(curH);         // Fill hadron-copy (delete equivalent)  ^
           }
-	       }                                        //                                       ^
+        }                                        //                                       ^
         else                                     // => "Quasmon can't decay" case         ^
-								{                                        //                                       ^
+        {                                        //                                       ^
           G4QContent totQC=theQuasmons[iq]->GetQC();//                                    ^
           G4int     tQBN=totQC.GetBaryonNumber();// Baryon Number of not decayed Quasmon  ^
@@ -1434,5 +1544,5 @@
           G4double totQM=tot4M.m();              // Real Mass of Quasmon                  ^
           if(tQBN>0&&totQM>gsM)                  // => "Try Quasmon evaporation" case     ^
-										{                                      //                                       ^
+          {                                      //                                       ^
             G4QHadron* nuclQ = new G4QHadron(totQC,tot4M); //                             ^
 #ifdef fdebug
@@ -1442,25 +1552,25 @@
             theQuasmons[iq]->KillQuasmon();      // Kill evaporated Quasmon               ^
             nlq--;                               //                                       ^
-		        }
+          }
           else if(iq+1<nQuasmons&&nlq>1)         // => "Try to merge with next" case      ^
-		        {
+          {
             G4int s=theQuasmons[iq+1]->GetStatus();//Status of the next Quasmon           ^
             theQuasmons[iq+1]->IncreaseBy(theQuasmons[iq]);// Merge with the next Quasmon ^
             theQuasmons[iq]->KillQuasmon();      // Kill the week Quasmon                 ^
             if(s) nlq--;                         // Reduce a number of "living Quasmons"  ^
-		        }
+          }
           else if(iq+1==nQuasmons&&iq&&nlq>1)    // => "Quasmon stack is exhosted" case   ^
-		        {
+          {
             G4int s=theQuasmons[0]->GetStatus(); // Status of the first Quasmon           ^
             theQuasmons[0]->IncreaseBy(theQuasmons[iq]);// Merge with the first Quasmon   ^
             theQuasmons[iq]->KillQuasmon();      // Kill the week Quasmon                 ^
             if(s) nlq--;                         // Reduce a number of "living Quasmons"  ^
-		        }
-		        else                                   // "Have a chance to recover" case       ^
-		        {                                      //                                       ^
-#ifdef pdebug
-		          G4cout<<"***G4QE::HQE:"<<iq<<",n="<<nHadrons<<",Tot="<<totQC<<totQM<<G4endl;//^
-		          for (G4int kq=0; kq<nQuasmons; kq++) // LOOP over Quasmons for DEBUG PRINTING ^
-														G4cout<<kq<<",St/QC="<<theQuasmons[kq]->GetStatus()<<theQuasmons[kq] //     ^
+          }
+          else                                   // "Have a chance to recover" case       ^
+          {                                      //                                       ^
+#ifdef pdebug
+            G4cout<<"***G4QE::HQE:"<<iq<<",n="<<nHadrons<<",Tot="<<totQC<<totQM<<G4endl;//^
+            for (G4int kq=0; kq<nQuasmons; kq++) // LOOP over Quasmons for DEBUG PRINTING ^
+              G4cout<<kq<<",St/QC="<<theQuasmons[kq]->GetStatus()<<theQuasmons[kq] //     ^
                     ->GetQC()<<",M="<<theQuasmons[kq]->Get4Momentum().m()<<G4endl; //     ^
 #endif
@@ -1469,5 +1579,5 @@
             G4bool corrf = true;                 // False when corrected & needs to quit  ^
             while(nOfOUT && corrf)               // LOOP over all existing QHadrons       ^
-			         {                                    //                                       ^
+            {                                    //                                       ^
               G4QHadron*     theLast = theQHadrons[nOfOUT-1];     //  Remember            ^
               G4LorentzVector last4M = theLast->Get4Momentum();   //  all                 ^
@@ -1477,5 +1587,5 @@
               G4int           nFr    = theLast->GetNFragments();  //  Last  // if()       ^
               G4int           gam    = theLast->GetPDGCode();     //        //            ^
-			           if(gam!=22&&!nFr&&lastS<0&&lastS+totS<0&&nOfOUT>1)//=> Skip K,gam & decayed ^
+              if(gam!=22&&!nFr&&lastS<0&&lastS+totS<0&&nOfOUT>1)//=> Skip K,gam & decayed ^
               {                                  //                                       ^
                 G4QHadron* thePrev = theQHadrons[nOfOUT-2];// Kill Prev & make Last->Prev ^
@@ -1487,10 +1597,10 @@
                 last4M = theLast->Get4Momentum();// 4Mom of the previouse Quasmon         ^
                 lastQC = theLast->GetQC();       // Quark Content of the previouse Quasmon^
-			           }                                  //                                       ^
+              }                                  //                                       ^
               else                               // Just Clear and destroy theLast        ^
-			           {                                  //                                       ^
+              {                                  //                                       ^
                 theQHadrons.pop_back();          // theLastQHadron is excluded from OUTPUT^
                 delete         theLast;          // theLastQHadron is deleated as instance^
-			           }                                  //                                       ^
+              }                                  //                                       ^
               totQC+=lastQC;                     // Update (increase) the total QC        ^
               tot4M+=last4M;                     // Update (increase) the total 4-momentum^
@@ -1500,5 +1610,5 @@
               dM = totQM-gsM;                    // Escitation energy for the Quasmon     ^
               if(dM>0)                           // "Mass of Q is big enough" case        ^
-			           {                                  //                                       ^
+              {                                  //                                       ^
                 theQuasmons[iq]->InitQuasmon(totQC,tot4M);// Update the week Quasmon      ^
                 G4QHadronVector* curout=theQuasmons[iq]->Fragment(vE,1);//!DESTROY! <---+ ^
@@ -1510,7 +1620,7 @@
 #endif
                 if(nHadrons>0)                   // => "QHadrons from Quasmon to Output"^ ^
-				            {                                //                                     ^ ^
-    	             for (G4int ih=0; ih<nHadrons; ih++) // LOOP over Hadrons of theQuasmon^ ^
-				              {                              //                                     ^ ^
+                {                                //                                     ^ ^
+                  for (G4int ih=0; ih<nHadrons; ih++) // LOOP over Hadrons of theQuasmon^ ^
+                  {                              //                                     ^ ^
                     //G4QHadron* curH = new G4QHadron(curout->operator[](ih)); //       ^ ^
                     G4QHadron* curH = new G4QHadron((*curout)[ih]); //                  ^ ^
@@ -1520,5 +1630,5 @@
 #endif
                     totQC-=curH->GetQC();        // totQC recalculation                 ^ ^
-					               tot4M-=curH->Get4Momentum(); // tot4M recalculation                 ^ ^
+                    tot4M-=curH->Get4Momentum(); // tot4M recalculation                 ^ ^
                     theQHadrons.push_back(curH); // Fill hadron-copy (delete equivalent)^ ^
                     //delete curout->operator[](ih);//>-Necessary to delete instances*>-^ ^
@@ -1529,21 +1639,21 @@
                   corrf = false;                 // Corrected: go out of the while loop ^ ^
                   //break;                       // @@ ??                               ^ ^
-	               } // End of check for existing output Hadrons in the Quasmon            ^ ^
+                } // End of check for existing output Hadrons in the Quasmon            ^ ^
                 else                             //                                     ^ ^
-				            {                                //                                     ^ ^
+                {                                //                                     ^ ^
                   for_each(curout->begin(), curout->end(), DeleteQHadron()); // >-------^ ^
                   curout->clear();               //                                     ^ ^
                   delete curout;                 //>*Necessary to delete VectPointers>--^ ^
-				            }                                //                                       ^
-			           }                                  //                                       ^
+                }                                //                                       ^
+              }                                  //                                       ^
               nOfOUT  = theQHadrons.size();      // Update the value of OUTPUT entries    ^
 #ifdef rdebug
               G4int tC=totInC;                   // Vacuum: No ResidualEnvironCharge      ^
               G4LorentzVector t4M=totIn4M;       // Vacuum: No ResidualEnvironment 4-Mom  ^
-	             for (G4int js=0; js<nQuasmons; js++) // Subtract 4mom's of Quasmons from dif^
-			           {                                  //                                       ^
-	               G4Quasmon*      pQ = theQuasmons[js]; //                                  ^
+              for (G4int js=0; js<nQuasmons; js++) // Subtract 4mom's of Quasmons from dif^
+              {                                  //                                       ^
+                G4Quasmon*      pQ = theQuasmons[js]; //                                  ^
                 if(pQ->GetStatus())              // Subtract only if Quasmon is alive     ^
-				            {                                //                                       ^
+                {                                //                                       ^
                   G4LorentzVector Q4M= pQ->Get4Momentum(); //                             ^
                   t4M               -= Q4M;                //                             ^
@@ -1551,7 +1661,7 @@
                 }                                //                                       ^
                 else G4cout<<"G4QE::HQ:SUM-4-Mom s("<<js<<")="<<pQ->GetStatus()<<G4endl;//^
-	             } // End of Quasmons4Momentum subtractions                                  ^
+              } // End of Quasmons4Momentum subtractions                                  ^
               if(nOfOUT) for(G4int jpo=0; jpo<nOfOUT; jpo++)// LOOP over output hadrons   ^
-			           {                                  //                                       ^
+              {                                  //                                       ^
                 G4int hsNF  = theQHadrons[jpo]->GetNFragments();//A#of secondary fragments^
                 if(!hsNF)                                   // Subtract only final hadrons^
@@ -1564,8 +1674,8 @@
               G4cout<<"G4QE::HQ:|||Vacuum|||4-MomCHECK|||d4M="<<t4M<<",dC="<<tC<<G4endl;//^
 #endif
-		          }                                    // End of the WHILE LOOP                 ^
-		          //if(!nOfOUT&&nQuasmons==1)          // TRY TO EVAPORATE THE TOTAL SYSTEM     ^
-		          if((!nOfOUT&&nQuasmons==1)||theEnvironment.GetPDGCode()==NUCPDG)//EvaporTotal ^
-			         {                                    //                                       ^
+            }                                    // End of the WHILE LOOP                 ^
+            //if(!nOfOUT&&nQuasmons==1)          // TRY TO EVAPORATE THE TOTAL SYSTEM     ^
+            if((!nOfOUT&&nQuasmons==1)||theEnvironment.GetPDGCode()==NUCPDG)//EvaporTotal ^
+            {                                    //                                       ^
               G4int totS=totQC.GetStrangeness(); //  Total Strangeness                    ^
               //G4int totBN=totQC.GetBaryonNumber();// Total Baryon Number                ^
@@ -1573,5 +1683,5 @@
               if(totS) totPDG-=totS*999999;      // @@ ??                                 ^
 #ifdef fdebug
-		            G4cout<<"G4QE::HQE: totPDG="<<totPDG<<",totM="<<totQM<<G4endl; //           ^
+              G4cout<<"G4QE::HQE: totPDG="<<totPDG<<",totM="<<totQM<<G4endl; //           ^
 #endif
               G4QHadron* evH = new G4QHadron(totQC,tot4M); // Create a Hadron-ResidualNucl^
@@ -1583,17 +1693,17 @@
               return theQHadrons;                //                                       ^
             }                                    //                                       ^
-		          else if(!nOfOUT)                     // Still remain not used Quasmons        ^
-			         {                                    //                                       ^
-		            G4cerr<<"***G4QE::HQ:T="<<tot4M<<totQC<<",M="<<totQM<<"< gsM=" //           ^
+            else if(!nOfOUT)                     // Still remain not used Quasmons        ^
+            {                                    //                                       ^
+              G4cerr<<"***G4QE::HQ:T="<<tot4M<<totQC<<",M="<<totQM<<"< gsM=" //           ^
                     <<gsM<<",d="<<dM<<",Env="<<theEnvironment<<G4endl; //                 ^
               throw G4QException("G4QEnvironment::HadronizeQEnv: Can't decay Quasmon");// ^
-	           }                                    //                                       ^
-		        } // End of PANIC treatment                                                     ^
-		      } // End of trouble handling with Quasmon decay in Vacuum                         ^
+            }                                    //                                       ^
+          } // End of PANIC treatment                                                     ^
+        } // End of trouble handling with Quasmon decay in Vacuum                         ^
         for_each(output->begin(), output->end(), DeleteQHadron());  // >------------------^
         output->clear();                         //                                       ^
         delete output;                           // >=====================================^
-	     } // End of check for the already decayed Quasmon
-	   } // End of the LOOP over Quasmons
+      } // End of check for the already decayed Quasmon
+    } // End of the LOOP over Quasmons
   }
   else                                           // ==> "Nuclear environment" case
@@ -1603,11 +1713,11 @@
     G4int totInC=theEnvironment.GetZ();
     G4LorentzVector totIn4M=theEnvironment.Get4Momentum();
-	   for (G4int is=0; is<nQuasmons; is++) // Sum 4mom's of Quasmons for comparison
-	   {
-	     G4Quasmon*      pQ = theQuasmons[is];
+    for (G4int is=0; is<nQuasmons; is++) // Sum 4mom's of Quasmons for comparison
+    {
+      G4Quasmon*      pQ = theQuasmons[is];
       G4LorentzVector Q4M= pQ->Get4Momentum();
       totIn4M           += Q4M;
       totInC            += pQ->GetQC().GetCharge();
-	   } // End of TotInitial4Momentum summation LOOP over Quasmons
+    } // End of TotInitial4Momentum summation LOOP over Quasmons
     G4int nsHadr  = theQHadrons.size();        // Update the value of OUTPUT entries
     if(nsHadr) for(G4int jso=0; jso<nsHadr; jso++)// LOOP over output hadrons 
@@ -1649,6 +1759,8 @@
     //G4int nCnMax = 9;                      // MaxCounterOfHadrFolts for shortCutSolutions
     G4bool first=true;                     // Flag of the first interaction (only NucMedia)
+    G4int cAN=0;                           // Counter of the nucleon absorptions
+    G4int mcAN=3;                          // Max for the counter of nucleon absorptions
     while (sumstat||totC<totCM)            // ===***=== The MAIN "FOREVER" LOOP ===***===
-	   {
+    {
 #ifdef chdebug
       G4int f2Charge=0;
@@ -1688,5 +1800,5 @@
 #endif
       totC++;
-      if(nQuasmons==1&&sumstat==3) cbR++;
+      if( nQuasmons==1 && sumstat==3 ) cbR++;    // Counter of dead solutions for nQ=1
       else cbR=0;
       G4QContent envQC=theEnvironment.GetQCZNS();// QuarkCont of current NuclearEnvironment
@@ -1699,8 +1811,8 @@
       G4int     nCount=0;                        // Counter of notsuccessful fragmentations
       G4int     fCount=0;                        // Counter of successful(notFinal) fragm's
-	     G4int     eCount=0;                        // Counter of not yet decayed Quasmons
-	     for (G4int iq=0; iq<nQuasmons; iq++)       // Sum up Quasmons for making a decision
-	     {
-	       G4Quasmon*      pQ = theQuasmons[iq];
+      G4int     eCount=0;                        // Counter of not yet decayed Quasmons
+      for (G4int iq=0; iq<nQuasmons; iq++)       // Sum up Quasmons for making a decision
+      {
+        G4Quasmon*      pQ = theQuasmons[iq];
         G4QContent      QQC= pQ->GetQC();
         totQC             += QQC;
@@ -1712,5 +1824,5 @@
         sumstat           += Qst;
 #ifdef pdebug
-	       G4cout<<"G4QEnv::HadrQE:#"<<iq<<", Qst="<<Qst<<", Q="<<Q4M<<Q4M.m()<<QQC<<", Env="
+        G4cout<<"G4QEnv::HadrQE:#"<<iq<<", Qst="<<Qst<<", Q="<<Q4M<<Q4M.m()<<QQC<<", Env="
               <<theEnvironment<<G4endl;
 #endif
@@ -1721,11 +1833,11 @@
         }
         if(Qst>0)                  eCount++;     // Incr. counter of existing Quasmons 
-	     } // End of summation LOOP over Quasmons
+      } // End of summation LOOP over Quasmons
       G4int      totS  =totQC.GetStrangeness();  // Total Strangeness of the Total System
       G4int      totBN =totQC.GetBaryonNumber(); // Total Baryon Number of the Total System
       G4int      totPDG=0;                       // Total PDG Code for the Current compound
       G4double   totM  =0.;                      // min(GroundSt)Mass of theResidualSystem
-      if(totBN<2)  
-	     {
+      if(totBN < 2)                              // Solution for the light nucleus  
+      {
         totPDG=totQC.GetSPDGCode();              // Min totPDGCode for theCurrentCompound
         if(totPDG) totM=G4QPDGCode(totPDG).GetMass(); // min Mass of the Residual System
@@ -1733,13 +1845,13 @@
       }
       else
-	     {
+      {
         G4QNucleus totN(totQC,tot4M);            // Excited nucleus for theResidualSystem
         totM=totN.GetMZNS();                     // min(GroundSt)Mass of theResidualSystem
         totPDG=totN.GetPDG();                    // Total PDG Code for the Current compound
-	     }
+      }
 #ifdef fdebug
-	     G4cout<<"G4QEnv::HadrQE:totC="<<totC<<"<totCM="<<totCM<<",ss="<<sumstat<<G4endl;
-#endif
-      if(totC>=totCM||cbR>cbRM)
+      G4cout<<"G4QEnv::HadrQE:totC="<<totC<<"<totCM="<<totCM<<",ss="<<sumstat<<G4endl;
+#endif
+      if ( totC >= totCM || cbR > cbRM)
       {
         CleanUp();
@@ -1747,14 +1859,14 @@
         EvaporateResidual(evH);             // Try to evaporate residual (del. equiv.)
         return theQHadrons;
-	     }
+      }
       // === Now we should be prepared for evaporation ===
       G4int      totChg=totQC.GetCharge();    // Total Electric Charge of the Total System
 #ifdef pdebug
       if(totPDG==90999999||totPDG==90999000||totPDG==90000999||totPDG==89999001)
-		    G4cout<<"***G4QEnv::HadrQEnv: Meson (1) PDG="<<totPDG<<", M="<<tot4M.m()<<G4endl;
+      G4cout<<"***G4QEnv::HadrQEnv: Meson (1) PDG="<<totPDG<<", M="<<tot4M.m()<<G4endl;
       G4int           nOH=theQHadrons.size(); // A#of output hadrons
       G4LorentzVector s4M=tot4M;              // Total 4-momentum (@@ only for checking)
       if(nOH) for(G4int ih=0; ih<nOH; ih++) s4M+=theQHadrons[ih]->Get4Momentum();     
-	     G4cout<<"G4QEnv::HadrQE:tBN="<<totBN<<",s="<<sumstat<<",fC="<<fCount<<",eC="<<eCount
+      G4cout<<"G4QEnv::HadrQE:tBN="<<totBN<<",s="<<sumstat<<",fC="<<fCount<<",eC="<<eCount
             <<",En="<<theEnvironment<<",nH="<<nOH<<",tLV="<<s4M<<totQC<<nCount<<G4endl;
 #endif
@@ -1767,26 +1879,26 @@
         else if(totPDG==2224) totM=mProt+mPi;
         else if(totPDG==10)
-		      {
+        {
           G4QChipolino totChip(totQC);        // define the residual as a Chipolino
           totM  =totChip.GetQPDG1().GetMass()+totChip.GetQPDG2().GetMass();
-		      }
+        }
         else
-		      {
+        {
           G4cerr<<"***G4QEnv::HadrQE:totPDG="<<totPDG<<", totQC="<<totQC<<G4endl;
           throw G4QException("G4QEnvironment::HadronizeQEnvir: ImpossibleHadron in CHIPS");
-		      }
-	     }
+        }
+      }
       G4double totMass = tot4M.m();           // Total effective Mass
-      G4bool   Premium = eCount&&premC&&envM; // Premium condition
-      G4int    count3  =0;
-      if(sumstat&&(fCount||Premium)&&!force&&count3<c3Max)//=>"Still try to decay Quasmons"
-	     {
+      G4bool   Premium = eCount && premC && envM; // Premium condition
+      G4int    count3  = 0;
+      if(sumstat && (fCount||Premium) && !force && count3<c3Max)//=>"Force Quasmons decay"
+      {
         if(!fCount) premC--;                  // Reduce premium efforts counter
-	       if(nQuasmons) for (G4int jq=0; jq<nQuasmons; jq++)//FragmentationLOOP over Quasmons
-	       {
-	         G4Quasmon* pQ     = theQuasmons[jq];// Pointer to the CurrentQuasmon <--<--<--+
+        if(nQuasmons) for (G4int jq=0; jq<nQuasmons; jq++)//FragmentationLOOP over Quasmons
+        {
+          G4Quasmon* pQ     = theQuasmons[jq];// Pointer to the CurrentQuasmon <--<--<--+
           G4int      status = pQ->GetStatus();// Old status of the Quasmon              ^
 #ifdef pdebug
-	         G4cout<<"G4QE::HQE:Status of Q#"<<jq<<" (before Fragment)="<<status<<G4endl;//^
+          G4cout<<"G4QE::HQE:Status of Q#"<<jq<<" (before Fragment)="<<status<<G4endl;//^
 #endif
           if(status)                          // Skip dead Quasmons                     ^
@@ -1794,7 +1906,7 @@
             G4int nQuas=eCount;
             if(nQuas==1&&first) nQuas=-nQuas;
- 	          G4QHadronVector* output=pQ->Fragment(theEnvironment,nQuas);//<DESTRUCT<--<--^-+
-#ifdef pdebug
-	           G4cout<<"G4QE::HQE:Q#"<<jq<<",*afterFragm* Env="<<theEnvironment<<G4endl;// ^ ^
+            G4QHadronVector* output=pQ->Fragment(theEnvironment,nQuas);//<DESTRUCT<--<--^-+
+#ifdef pdebug
+            G4cout<<"G4QE::HQE:Q#"<<jq<<",*afterFragm* Env="<<theEnvironment<<G4endl;// ^ ^
 #endif
             envM =theEnvironment.GetMass();   // new mass of Nuclear Environment        ^ ^
@@ -1803,15 +1915,15 @@
             G4int nHadrons = output->size();  //                                        ^ ^
 #ifdef rdebug
-	           G4cout<<"G4QE::HQE:**AfterFragmAttempt**#"<<jq<<",stat="<<status<<", Q4M="//^ ^
+            G4cout<<"G4QE::HQE:**AfterFragmAttempt**#"<<jq<<",stat="<<status<<", Q4M="//^ ^
                   <<pQ->Get4Momentum()<<", Env="<<theEnvironment<<",nH="<<nHadrons //   ^ ^
                   <<",c3="<<count3<<" < "<<c3Max<<",eC="<<eCount<<G4endl;          //   ^ ^
             G4int tC=totInC-theEnvironment.GetZ(); // Subtract theResidualEnvironCharge ^ ^
             G4LorentzVector t4M=totIn4M;      // Compare with the total                 ^ ^
-			         G4LorentzVector theEnv4m=theEnvironment.Get4Momentum(); // Environment 4Mom ^ ^
-			         t4M-=theEnv4m;                    // Subtract the Environment 4-momentum    ^ ^
+            G4LorentzVector theEnv4m=theEnvironment.Get4Momentum(); // Environment 4Mom ^ ^
+            t4M-=theEnv4m;                    // Subtract the Environment 4-momentum    ^ ^
             G4cout<<"G4QEnv::HadrQE:SUM-4Mom e4M="<<theEnv4m<<theEnvironment<<G4endl;// ^ ^
-	           for (G4int js=0; js<nQuasmons; js++)// Subtract 4mom's of Quasmons (compare)^ ^
+            for (G4int js=0; js<nQuasmons; js++)// Subtract 4mom's of Quasmons (compare)^ ^
             {                                 //                                        ^ ^
-	             G4Quasmon*      prQ = theQuasmons[js];//                                  ^ ^
+              G4Quasmon*      prQ = theQuasmons[js];//                                  ^ ^
               if(prQ->GetStatus())            // Subtract only if Quasmon is alive      ^ ^
               {                               //                                        ^ ^
@@ -1821,10 +1933,10 @@
                 t4M          -= Q4M;          //                                        ^ ^
                 tC           -= prQ->GetQC().GetCharge(); //                            ^ ^
-			           }                               //                                        ^ ^
+              }                               //                                        ^ ^
               else G4cout<<"G4QE::HQE:SUM-4M,st("<<js<<")="<<prQ->GetStatus()<<G4endl;//^ ^
-	           } // End of Quasmons4Momentum subtractions                                  ^ ^
+            } // End of Quasmons4Momentum subtractions                                  ^ ^
             G4int nsbHadr=theQHadrons.size(); // Update the value of OUTPUT entries     ^ ^
             if(nsbHadr) for(G4int jpo=0; jpo<nsbHadr; jpo++)// LOOP over output hadrons ^ ^
-			         {                                 //                                        ^ ^
+            {                                 //                                        ^ ^
               G4int hsNF  = theQHadrons[jpo]->GetNFragments();// A#of out fragments     ^ ^
               if(!hsNF)                       // Subtract only final hadrons            ^ ^
@@ -1835,13 +1947,13 @@
                 t4M          -= hs4Mom;       //                                        ^ ^
                 tC           -= theQHadrons[jpo]->GetCharge(); //                       ^ ^
-	  		         }                               // End of the "FinalHadron" IF            ^ ^
+              }                               // End of the "FinalHadron" IF            ^ ^
             }                                 // End of the LOOP over output hadrons    ^ ^
             if(nHadrons) for(G4int kpo=0; kpo<nHadrons; kpo++)//LOOP over out QHadrons  ^ ^
             {                                 //                                        ^ ^
-	  		         //G4QHadron* insH =output->operator[](kpo);// Pointer to theOutputQHadron ^ ^
-	  		         G4QHadron* insH = (*output)[kpo];// Pointer to the Output QHadron         ^ ^
+              //G4QHadron* insH =output->operator[](kpo);// Pointer to theOutputQHadron ^ ^
+              G4QHadron* insH = (*output)[kpo];// Pointer to the Output QHadron         ^ ^
               G4int qhsNF  = insH->GetNFragments(); // A#of secondary fragments         ^ ^
               if(!qhsNF)                      // Subtract only final hadrons            ^ ^
-			           {                               //                                        ^ ^
+              {                               //                                        ^ ^
                 G4LorentzVector qhs4Mom = insH->Get4Momentum();// 4M of theOutputQHadron^ ^
                 G4int hPDG = insH->GetPDGCode(); //  PDG Code of the Q-output Hadron    ^ ^
@@ -1849,5 +1961,5 @@
                 t4M          -= qhs4Mom;      //                                        ^ ^
                 tC           -= insH->GetCharge(); //                                   ^ ^
-			           }                               //                                        ^ ^
+              }                               //                                        ^ ^
             }                                 // End of the LOOP over output QHadrons   ^ ^
             G4cout<<"G4QEnv::HadrQE:|||||4-MomCHECK||||d4M="<<t4M<<",dC="<<tC<<G4endl;//^ ^
@@ -1858,8 +1970,8 @@
               if(nHadrons>0)                  // Transfer QHadrons from Quasm to Output ^ ^
               {                               //                                        ^ ^
-    	           for (G4int ih=0; ih<nHadrons; ih++) // LOOP over Q-output QHadrons      ^ ^
+                for (G4int ih=0; ih<nHadrons; ih++) // LOOP over Q-output QHadrons      ^ ^
                 {                             //                                        ^ ^
-				              //G4QHadron* inpH = output->operator[](ih); //                        ^ ^
-				              G4QHadron* inpH = (*output)[ih]; //                                   ^ ^
+                  //G4QHadron* inpH = output->operator[](ih); //                        ^ ^
+                  G4QHadron* inpH = (*output)[ih]; //                                   ^ ^
                   G4int hC=inpH->GetCharge(); // Charge of the Hadron                   ^ ^
                   G4int hF=inpH->GetNFragments();// Number of fragments                 ^ ^
@@ -1877,8 +1989,8 @@
                     hCB=theEnvironment.CoulombBarrier(hC,hB); //                        ^ ^
                     hKE=hLV.e()-hLV.m();      //                                        ^ ^
-				              }                           //                                        ^ ^
-                  if(can&&hKE<hCB)            // => "Suck Hadron in Quasm or Env" case  ^ ^
-				              {                           //                                        ^ ^
-                    if(status)                // => "Suck in the existing Quasmon" case ^ ^
+                  }                           //                                        ^ ^
+                  if(can&&hKE<hCB)            // => "Suck Hadron into Quas or Env" case ^ ^
+                  {                           //                                        ^ ^
+                    if(status)                // => "Suck into existing Quasmon" case   ^ ^
                     {                         //                                        ^ ^
                       G4QContent tQC=inpH->GetQC()+pQ->GetQC();  //                     ^ ^
@@ -1886,8 +1998,8 @@
                       pQ->InitQuasmon(tQC,tLV); // Reinitialize the current Quasmon     ^ ^
 #ifdef pdebug
-	                     G4cout<<"G4QE::HQE:Medium, H#"<<ih<<", QPDG="<<inpH->GetQPDG() // ^ ^
+                      G4cout<<"G4QE::HQE:Medium, H#"<<ih<<", QPDG="<<inpH->GetQPDG() // ^ ^
                             <<",4M="<<inpH->Get4Momentum()<<" is suckedInQ"<<G4endl; // ^ ^
 #endif
-				                }                         //                                        ^ ^
+                    }                         //                                        ^ ^
                     else                      // => "Suck in the existing Quasmon" case ^ ^
                     {                         //                                        ^ ^
@@ -1896,9 +2008,9 @@
                       theEnvironment=G4QNucleus(tQC,tLV); // Reinit currentEnvironment  ^ ^
 #ifdef pdebug
-	                     G4cout<<"G4QE::HQE:Med,H#"<<ih<<",PDG="<<inpH->GetQPDG()<<",4M="//^ ^
+                      G4cout<<"G4QE::HQE:Med,H#"<<ih<<",PDG="<<inpH->GetQPDG()<<",4M="//^ ^
                             <<inpH->Get4Momentum()<<" is suckedInEnvironment"<<G4endl;//^ ^
 #endif
-				                }                         // End of the STATUS IF                   ^ ^
-				              }                           // End of the E/Q suck Hdron IF           ^ ^
+                    }                         // End of the STATUS IF                   ^ ^
+                  }                           // End of the E/Q suck Hdron IF           ^ ^
                   else if(!hF)                // => "Hadron can go out" case            ^ ^
                   {                           //                                        ^ ^
@@ -1910,5 +2022,5 @@
                     G4double phZ=ph4M.z();    // p_x of the hadron                      ^ ^
                     G4double phCost=phZ/sqrt(phX*phX+phY*phY+phZ*phZ);// Hadr cos(theta)^ ^
-	                   G4cout<<"G4QEnv::HadrQE:Medium, H#"<<ih<<",QPDG="<<curH->GetQPDG()//^ ^
+                    G4cout<<"G4QEnv::HadrQE:Medium, H#"<<ih<<",QPDG="<<curH->GetQPDG()//^ ^
                           <<", 4M="<<ph4M<<", ct="<<phCost<<G4endl; //                  ^ ^
 #endif
@@ -1916,19 +2028,19 @@
                     totQC-=curH->GetQC();     //                                        ^ ^
                     tot4M-=curH->Get4Momentum(); //                                     ^ ^
-				              }                           //                                        ^ ^
-				            }                             // ==> End of the LOOP over outQHadrons   ^ ^
+                  }                           //                                        ^ ^
+                }                             // ==> End of the LOOP over outQHadrons   ^ ^
                 pQ->ClearOutput();            // Hadrons are filled, Clear Frag-out <-<-^ ^
                 count3=0;                     // Reset counter of empty hadronizations    ^
                 //c3Max=1;                    // Reduce repetition Max to accelerate      ^
                 first=false;                  // First hadronization is for sure is over  ^
-	             }                               //                                          ^
+              }                               //                                          ^
               else count3++;                  // Increment counter of empty hadronizations^
-			         }                                 //                                          ^
+            }                                 //                                          ^
             else if(status<0||status==2)      // => "PANIC or NOTHING was done" case      ^
             {                                 //                                          ^
 #ifdef pdebug
-	             G4cout<<"G4QE::HQE:***PANIC***,status="<<status<<",nC="<<nCount<<G4endl; // ^
-#endif
-														nCount++;                       //                                          ^
+              G4cout<<"G4QE::HQE:***PANIC***,status="<<status<<",nC="<<nCount<<G4endl; // ^
+#endif
+              nCount++;                       //                                          ^
               if(eCount==1 && status<0 && CheckGroundState(pQ,true))// Correct & Finish   ^
               {                               //                                          ^
@@ -1943,12 +2055,52 @@
               else if(status<0&&nHadrons)     // This is just a confusion in the status...^
               {                               //                                          ^
-		              G4cerr<<"***G4QEnv::HadrQE: nH="<<nHadrons<<"< status="<<status<<G4endl;//^
+                G4cerr<<"***G4QEnv::HadrQE: nH="<<nHadrons<<"< status="<<status<<G4endl;//^
                 for_each(output->begin(), output->end(), DeleteQHadron()); // -->-->-->---^
                 output->clear();              //                                          ^
                 delete output;                // >========================================^
                 throw G4QException("G4QEnvironment::HadronizeQEnvironment:DoNothingEr");//^
-			           }                               //                                          ^
+              }                               //                                          ^
+              else if(status==2 && eCount==1 && cAN<mcAN && envM>500.)// Add N from E to Q^
+              {                               //                                          ^
+#ifdef pdebug
+		    G4cout<<"G4QE::HQE:E="<<theEnvironment<<",M="<<envM<<",c="<<cAN<<G4endl;//^
+#endif
+                cAN++;                        // Increment the counter of absorptions     ^
+                G4int envPDG = theEnvironment.GetPDG(); // PDGCode of the NuclQEnvironment^
+                G4LorentzVector env4M=theEnvironment.Get4Momentum(); // 4mom of the NucEnv^
+                G4int envN=theEnvironment.GetN();                    // N of Env          ^
+                G4int envZ=theEnvironment.GetZ();                    // Z of Env          ^
+                G4int resPDG=envPDG-1;        // Residual for the neutron (prototype)     ^
+                G4QContent nucQC=neutQC;      // Nucleon Quark Content                    ^
+                if ( envN && (envN+envZ)*G4UniformRand() > envZ ) // Change to a proton   ^
+                {                             //                                          ^
+                  resPDG=envPDG-1000;         // new PDG for the Environment              ^
+                  nucQC=protQC;               // proton QContent                          ^
+                }                             //                                          ^
+#ifdef pdebug
+		    G4cout<<"G4QE::HQE:P,eZ="<<envZ<<",eN="<<envN<<",rPDG="<<resPDG<<G4endl;//^
+#endif
+                G4QNucleus resNuc(resPDG);    // Create the residual nucleus (future Env) ^
+                G4double resM=resNuc.GetGSMass();       // Mass of the residual nucleus   ^
+                G4double eM=theEnvironment.GetGSMass(); // Mass of the current environment^
+                G4double nucM=eM-resM;                  // Effective mass of theNucleon   ^
+                G4LorentzVector res4M(0.,0.,0.,resM);   // Prototype of newEnv4M (at rest)^
+                G4LorentzVector nuc4M(0.,0.,0.,nucM);   // Prototype of newEnv4M (at rest)^
+                if(std::fabs(env4M.e()-eM) > 0.001)     // the Environment is not at rest ^
+                {                                       //                                ^
+                  res4M=(resM/eM)*env4M;                // Proportional 4M for residEnv   ^
+                  nuc4M=(nucM/eM)*env4M;                // Proportional 4M for effNucleon ^
+                }                                       //                                ^
+                theEnvironment=G4QNucleus(res4M,resPDG);// Update the Environment         ^
+                theQuasmons[0]->IncreaseBy(nucQC,nuc4M);// Update the Only Quasmon        ^
+#ifdef pdebug
+		    G4cout<<"G4QE::HQE:P,Q="<<nucQC<<nuc4M<<",env="<<theEnvironment<<G4endl;//^
+#endif
+              }                                         //                                ^
               else if(status==2&&nCount>nCnMax)// Treat PANIC for stat=2 (NothingWasDone) ^
               {                               //                                          ^
+#ifdef pdebug
+		    G4cout<<"G4QE::HQE:PANIC,nC="<<nCount<<">"<<nCnMax<<G4endl; //            ^
+#endif
                 G4QContent qQC=pQ->GetQC();   // QuarkContent of the Quasmon              ^
                 G4int      pqC=qQC.GetCharge(); // Charge (nP) of the Current Quasmon     ^
@@ -1959,15 +2111,15 @@
                 G4double fqMass=G4QPDGCode(22).GetNuclMass(pqC,pqB-pqC-pqS,pqS);//CQ FreeM^
 #ifdef edebug
-    		          G4cout<<"G4QEnv::HQE:M="<<cqMass<<">fM="<<fqMass<<",S="<<pqS<<",C="<<pqC//^
+                G4cout<<"G4QEnv::HQE:M="<<cqMass<<">fM="<<fqMass<<",S="<<pqS<<",C="<<pqC//^
                       <<",ePDG="<<theEnvironment.GetPDG()<<",qQC="<<qQC<<",eC="<<eCount //^
                       <<G4endl;                                                     //    ^
 #endif
                 if(pqB>0&&pqS<0&&cqMass>fqMass)// "AntiStrangeNucleus-Chipolino" case     ^
-				            {                             //                                          ^
+                {                             //                                          ^
                   G4QHadron* nuclQ = new G4QHadron(qQC,cq4M);// Hadron for AntiStrangeNuc.^
                   theEnvironment.DecayAntiStrange(nuclQ,&theQHadrons);// AntiStrange(D.E.)^
                   pQ->KillQuasmon();          // If BackFusion succeeded, kill theQuasmon ^
 #ifdef edebug
-     		           G4cout<<"G4QEnv::HQE:Status after kill (#"<<jq<<")="<<pQ->GetStatus()// ^
+                  G4cout<<"G4QEnv::HQE:Status after kill (#"<<jq<<")="<<pQ->GetStatus()// ^
                         <<", nH="<<theQHadrons.size()<<G4endl;                         // ^
 #endif
@@ -1977,9 +2129,9 @@
                 }                             //                                          ^
                 else if(theEnvironment.GetPDG()!=NUCPDG) // ==> "NuclearEnvironment" case ^
-				            {                             //                                          ^
+                {                             //                                          ^
                   if(eCount>1)                //                                          ^
-																		{                           //                                          ^
+                  {                           //                                          ^
 #ifdef fdebug
-		                  G4cout<<"G4QE::HQE:TOTEVAP tPDG="<<totPDG<<",t4M="<<tot4M<<G4endl; // ^
+                    G4cout<<"G4QE::HQE:TOTEVAP tPDG="<<totPDG<<",t4M="<<tot4M<<G4endl; // ^
 #endif
                     G4QHadron* evH = new G4QHadron(totQC,tot4M); // Create Hadron-ResidNuc^
@@ -1998,5 +2150,5 @@
                   G4double   curM=curE.GetGSMass();// min mass of the Total System        ^
 #ifdef edebug
-    		            G4cout<<"G4QEnv::HQE:Q#"<<jq<<",tM="<<tM<<">gsM="<<curM<<curE<<G4endl;//^
+                  G4cout<<"G4QEnv::HQE:Q#"<<jq<<",tM="<<tM<<">gsM="<<curM<<curE<<G4endl;//^
 #endif
                   if(tM<curM)                 //                                          ^
@@ -2005,18 +2157,18 @@
                     G4double qMass=G4QPDGCode(qPDG).GetMass(); // GroundStM of theQuasmon ^
 #ifdef edebug
-    		              G4cout<<"G4QE::HQE:nQ="<<nQuasmons<<",eC="<<eCount<<",qPDG="<<qPDG // ^
+                    G4cout<<"G4QE::HQE:nQ="<<nQuasmons<<",eC="<<eCount<<",qPDG="<<qPDG // ^
                           <<",qM="<<qMass<<",eM="<<envM<<",tM="<<tM<<",Q+E="<<qMass+envM//^
                           <<G4endl;           //                                          ^
 #endif
                     if(eCount==1&&qPDG&&qMass&&tM>qMass+envM)//==> Q+E decay for one Quasm^
-					               //if(nQuasmons==1 && qPDG && qMass && tM>qMass+envM) // ==> Q+E decay ^
+                    //if(nQuasmons==1 && qPDG && qMass && tM>qMass+envM) // ==> Q+E decay ^
                     {                         //                                          ^
                       G4int envPDG = theEnvironment.GetPDG(); // PDGCode of the NuclQEnv. ^
 #ifdef edebug
-		                    G4cout<<"G4QEnv::HadrQEnv: Q+E decay, nQ=1, qPDG=="<<qPDG<<G4endl;//^
+                      G4cout<<"G4QEnv::HadrQEnv: Q+E decay, nQ=1, qPDG=="<<qPDG<<G4endl;//^
 #endif
                       // => "Quasmon-Chipolino or Environment-Dibaryon" case              ^
                       if(qPDG==10 || qPDG==92000000 || qPDG==90002000 || qPDG==90000002)//^
-																						{                          //                                       ^
+                      {                          //                                       ^
                         G4QPDGCode h1QPDG=nQPDG; // QPDG of the first hadron              ^
                         G4double   h1M   =mNeut; // Mass of the first hadron              ^
@@ -2024,5 +2176,5 @@
                         G4double   h2M   =mNeut; // Mass of the second hadron             ^
                         if(qPDG==10)             // CHIPOLINO decay case                  ^
-						                  {                     //                                          ^
+                        {                     //                                          ^
                           G4QChipolino QChip(qQC);// define the Quasmon as a Chipolino    ^
                           h1QPDG=QChip.GetQPDG1();// QPDG of the first hadron             ^
@@ -2030,6 +2182,6 @@
                           h2QPDG=QChip.GetQPDG2();// QPDG of the second hadron            ^
                           h2M   =h2QPDG.GetMass();// Mass of the second hadron            ^
-			                     }                     //                                          ^
-			                     else if(qPDG==90002000) // DiProton decay case                    ^
+                        }                     //                                          ^
+                        else if(qPDG==90002000) // DiProton decay case                    ^
                         {                     //                                          ^
                           h1QPDG=pQPDG;       // QPDG of the first hadron                 ^
@@ -2037,6 +2189,6 @@
                           h2QPDG=h1QPDG;      // QPDG of the second hadron                ^
                           h2M   =mProt;       // Mass of the second hadron                ^
-			                     }                     //                                          ^
-			                     else if(qPDG==92000000) // Two lambdas case                       ^
+                        }                     //                                          ^
+                        else if(qPDG==92000000) // Two lambdas case                       ^
                         {                     //                                          ^
                           h1QPDG=lQPDG;       // QPDG of the first hadron                 ^
@@ -2046,5 +2198,5 @@
                           G4double ddMass=totMass-envM; // Free CM energy                 ^
                           if(ddMass>mSigZ+mSigZ) // Sigma0+Sigma0 is possible             ^
-						                    {                   // @@ Only two particles PS is used         ^
+                          {                   // @@ Only two particles PS is used         ^
                             G4double dd2=ddMass*ddMass; // Squared free energy            ^
                             G4double sma=mLamb+mLamb; // Lambda+Lambda sum                ^
@@ -2054,6 +2206,6 @@
                             G4double smi=mSigZ-mLamb; // Sigma0-Lambda difference         ^
                             G4double pr2=pr1;         // Prototype of +L+S0 PS            ^
-																												if(ddMass>sma&&ddMass>smi) //                                 ^
-																													 pr2+=sqrt((dd2-sma*sma)*(dd2-smi*smi)); //                  ^
+                            if(ddMass>sma&&ddMass>smi) //                                 ^
+                              pr2+=sqrt((dd2-sma*sma)*(dd2-smi*smi)); //                  ^
                             sma=mSigZ+mSigZ;          // Sigma0+Sigma0 sum                ^
                             G4double pr3=pr2;         // Prototype of +Sigma0+Sigma0 PS   ^
@@ -2074,5 +2226,5 @@
                           }                   //                                          ^
                           else if(ddMass>mSigZ+mLamb) // Lambda+Sigma0 is possible        ^
-						                    {                   // @@ Only two particles PS is used         ^
+                          {                   // @@ Only two particles PS is used         ^
                             G4double dd2=ddMass*ddMass; // Squared free energy            ^
                             G4double sma=mLamb+mLamb; // Lambda+Lambda sum                ^
@@ -2083,5 +2235,5 @@
                             G4double pr2=pr1;         //+L+S0 PS                          ^
                             if(ddMass>sma && ddMass>smi) //                               ^
-																														pr2+=sqrt((dd2-sma*sma)*(dd2-smi*smi)); //                  ^
+                              pr2+=sqrt((dd2-sma*sma)*(dd2-smi*smi)); //                  ^
                             if(pr2*G4UniformRand()>pr1) // --> "ENnv+Sigma0+Lambda" case  ^
                             {                 //                                          ^
@@ -2090,5 +2242,5 @@
                             }                 //                                          ^
                           }                   //                                          ^
-			                     }                     //                                          ^
+                        }                     //                                          ^
                         if(h1M+h2M+envM<totMass) // => "Three parts decay" case           ^
                         {                     //                                          ^
@@ -2098,13 +2250,13 @@
                           if(!G4QHadron(tot4M).DecayIn3(h14M,h24M,e4M)) //                ^
                           {                   //                                          ^
-				                        G4cerr<<"***G4QE::HQE:(0)tM="<<tot4M.m()<<"->h1="<<h1QPDG //  ^
+                            G4cerr<<"***G4QE::HQE:(0)tM="<<tot4M.m()<<"->h1="<<h1QPDG //  ^
                                   <<"("<<h1M<<")+h2="<<h1QPDG<<"("<<h2M<<")+envM="<<envM//^
                                   <<"=="<<h1M+h2M+envM<<G4endl; //                        ^
-				                        throw G4QException("**G4QE::HadrQEnv:QChip+E DecIn3 error");//^
-			                       }                   //                                          ^
+                            throw G4QException("**G4QE::HadrQEnv:QChip+E DecIn3 error");//^
+                          }                   //                                          ^
                           G4QHadron* h1H = new G4QHadron(h1QPDG.GetPDGCode(),h14M); //    ^
                           theQHadrons.push_back(h1H);        // (delete equivalent)       ^
 #ifdef pdebug
-						                    G4cout<<"G4QE::HQE:(1) H1="<<h1QPDG<<h14M<<G4endl;        //    ^
+                          G4cout<<"G4QE::HQE:(1) H1="<<h1QPDG<<h14M<<G4endl;        //    ^
 #endif
                           G4QHadron* h2H = new G4QHadron(h2QPDG.GetPDGCode(),h24M); //    ^
@@ -2118,10 +2270,10 @@
                           G4cout<<"G4QE::HQE:(1) QEnv="<<envPDG<<e4M<<G4endl;       //    ^
 #endif
-			                     }                     //                                          ^
-			                     else                  // Try to recover                           ^
+                        }                     //                                          ^
+                        else                  // Try to recover                           ^
                         {                     //                                          ^
                           //if(eCount==1&&CheckGroundState(pQ,true)) // @@ BackFusion     ^
                           if(eCount==1&&CheckGroundState(pQ))// BackFusion attempt        ^
-						                    {                   //                                          ^
+                          {                   //                                          ^
                             pQ->KillQuasmon();// ??                                       ^
                             eCount--;         // Reduce a#of theLivingQuasmons            ^
@@ -2138,5 +2290,5 @@
                                 <<"(M="<<h1M<<")+h2="<<h1QPDG<<"(M="<<h2M<<")+EM="<<envM//^
                                 <<"="<<h1M+h2M+envM<<G4endl; //                           ^
-			                       //throw G4QException("G4QEnv::HQE:(0)Chi+Env mass > totMass");//^
+                          //throw G4QException("G4QEnv::HQE:(0)Chi+Env mass > totMass");//^
 #endif
                           CleanUp();          //                                          ^
@@ -2144,6 +2296,6 @@
                           EvaporateResidual(evH);  // Evaporate residual (del. equiv.)    ^
                           return theQHadrons; //                                          ^
-			                     }                     //                                          ^
-		                    }                       //                                          ^
+                        }                     //                                          ^
+                      }                       //                                          ^
                       else                    // => "Two particles decay" case            ^
                       {                       //                                          ^
@@ -2157,19 +2309,19 @@
                           output->clear();    // -->-->-->-->-->-->-->-->-->-->-->-->-->--^
                           delete output;      // >========================================^
-				                      throw G4QException("***G4QEnv::HadrQEnv: Q+Env DecIn2 error");//^
-			                     }                     //                                          ^
+                          throw G4QException("***G4QEnv::HadrQEnv: Q+Env DecIn2 error");//^
+                        }                     //                                          ^
                         G4QHadron* qH = new G4QHadron(qPDG,fq4M);// the out going Quasmon ^
                         theQHadrons.push_back(qH); // (delete equivalent)                 ^
 #ifdef pdebug
-						                  G4cout<<"G4QE::HQE:QuasmH="<<qPDG<<fq4M<<G4endl;         //       ^
+                        G4cout<<"G4QE::HQE:QuasmH="<<qPDG<<fq4M<<G4endl;         //       ^
 #endif
                         G4QHadron* qeH = new G4QHadron(envPDG,qe4M);//theRecoilEnvironment^
 #ifdef pdebug
-						                  G4cout<<"G4QE::HQE:EnvironH="<<envPDG<<qe4M<<G4endl;     //       ^
+                        G4cout<<"G4QE::HQE:EnvironH="<<envPDG<<qe4M<<G4endl;     //       ^
 #endif
                         if(envPDG==92000000||envPDG==90002000||envPDG==90000002) //       ^
                           theEnvironment.DecayDibaryon(qeH,&theQHadrons);        //       ^
                         else theQHadrons.push_back(qeH);// (del.equiv.) *** this too ***  ^
-		                    }                       //                                          ^
+                      }                       //                                          ^
                       for_each(output->begin(),output->end(),DeleteQHadron());//-->-->-->-^
                       output->clear();        //                                          ^
@@ -2181,8 +2333,8 @@
                   }                           //                                          ^
                   else if(eCount>1&&(nCount>nCnMax||theEnvironment.GetA()<2))// 2Quasmons ^
-																		{                                  //                                   ^
+                  {                                  //                                   ^
                     theEnvironment.InitByPDG(NUCPDG);// KillEnvironment(@@ Q's? CleanUp)) ^
 #ifdef fdebug
-					               G4cout<<"G4QEnv::HQE:Evaporate Env+Quasm Env="<<curE<<G4endl;//       ^
+                    G4cout<<"G4QEnv::HQE:Evaporate Env+Quasm Env="<<curE<<G4endl;//       ^
 #endif
                     G4QHadron* nucQE = new G4QHadron(curQC,t4M);// Hadron for Quasm+Envir.^
@@ -2190,5 +2342,5 @@
                     pQ->KillQuasmon();        // If BackFusion succeeded, kill theQuasmon ^
 #ifdef edebug
-     		             G4cout<<"G4QEnv::HQE:StatusAfterKill (#"<<jq<<")="<<pQ->GetStatus()// ^
+                    G4cout<<"G4QEnv::HQE:StatusAfterKill (#"<<jq<<")="<<pQ->GetStatus()// ^
                           <<", nH="<<theQHadrons.size()<<G4endl;                       // ^
 #endif
@@ -2199,5 +2351,5 @@
                   if(eCount==1 && tM>=curM)   //==>for one Quasmon evaporate ResTotN      ^
                   {                           //                                          ^
-                    theEnvironment.InitByPDG(NUCPDG); // Cancele the Environment          ^
+                    theEnvironment.InitByPDG(NUCPDG);// Cancele the Environment           ^
                     G4int ttPDG=totQC.GetSPDGCode(); // Total PDG Code (10 - Chipolino)   ^
 #ifdef pcdebug
@@ -2210,5 +2362,5 @@
                     G4int ttBN=totQC.GetBaryonNumber(); //                                ^
                     if(ttPDG==10&&ttBN<2)     // Chipolino case                           ^
-					               {                         //                                          ^
+                    {                         //                                          ^
                       G4QChipolino QCh(totQC);// define the TotalResidual as a Chipolino  ^
                       G4QPDGCode   h1QPDG=QCh.GetQPDG1();  // QPDG of the first hadron    ^
@@ -2223,12 +2375,12 @@
                         if(!G4QHadron(tot4M).DecayIn2(h14M,h24M)) //                      ^
                         {                     //                                          ^
-				                      G4cerr<<"***G4QE::HQE:tM="<<ttM<<"->h1="<<h1QPDG<<"("<<h1M //   ^
+                          G4cerr<<"***G4QE::HQE:tM="<<ttM<<"->h1="<<h1QPDG<<"("<<h1M //   ^
                                 <<")+h2="<<h1QPDG<<"("<<h2M<<"="<<h1M+h2M<<G4endl;   //   ^
-				                      throw G4QException("**G4QE::HadrQEnv:QChip (1) DecIn2 error");//^
-			                     }                     //                                          ^
+                          throw G4QException("**G4QE::HadrQEnv:QChip (1) DecIn2 error");//^
+                        }                     //                                          ^
                         G4QHadron* h1H = new G4QHadron(h1QPDG.GetPDGCode(),h14M);    //   ^
                         theQHadrons.push_back(h1H);               // (delete equivalent)  ^
 #ifdef pdebug
-						                  G4cout<<"G4QE::HQE: QCip-> H1="<<h1QPDG<<h14M<<G4endl;       //   ^
+                        G4cout<<"G4QE::HQE: QCip-> H1="<<h1QPDG<<h14M<<G4endl;       //   ^
 #endif
                         G4QHadron* h2H = new G4QHadron(h2QPDG.GetPDGCode(),h24M);    //   ^
@@ -2240,11 +2392,11 @@
                       else                    //                                          ^
                       {                       //                                          ^
-				                    G4cerr<<"***G4QE::HQE:tM="<<ttM<<totQC<<"->h1="<<h1QPDG<<"(" //   ^
+                        G4cerr<<"***G4QE::HQE:tM="<<ttM<<totQC<<"->h1="<<h1QPDG<<"(" //   ^
                               <<h1M<<")+h2="<<h1QPDG<<"("<<h2M<<"="<<h1M+h2M<<G4endl;//   ^
-				                    throw G4QException("***G4QE::HadrQEnv:QChip (2) DecIn2 error");// ^
-			                   }                       //                                          ^
+                        throw G4QException("***G4QE::HadrQEnv:QChip (2) DecIn2 error");// ^
+                      }                       //                                          ^
                     }                         //                                          ^
                     else                      //                                          ^
-					               {                         //                                          ^
+                    {                         //                                          ^
 #ifdef edebug
                       if(ttPDG<80000000&&ttBN<1) //                                       ^
@@ -2272,5 +2424,5 @@
                   G4int PDGQ=QPDGQ.GetPDGCode();  // PDG Code of the QUASMON              ^
 #ifdef edebug
-				              G4cout<<"G4QEnv::HadrQEnv: vacuum PDGQ="<<PDGQ<<G4endl; //              ^
+                  G4cout<<"G4QEnv::HadrQEnv: vacuum PDGQ="<<PDGQ<<G4endl; //              ^
 #endif
                   if(!PDGQ) status=-1;        // Unknown Quasmon in Vaquum - PANIC        ^
@@ -2279,5 +2431,5 @@
                   {                           //                                          ^
 #ifdef edebug
-				                G4cout<<"G4QEnv::HadrQEnv:Sigma Mass="<<cqMass<<G4endl;      //       ^
+                    G4cout<<"G4QEnv::HadrQEnv:Sigma Mass="<<cqMass<<G4endl;      //       ^
 #endif
                     G4double hyM=mNeut;       // Prototype of the hyperon mass            ^
@@ -2286,23 +2438,23 @@
                     G4int    pigPDG=-211;     // Prototype of the gamma/pion PDG Code     ^
                     if(PDGQ==3112||PDGQ==90999001) // --> "Sigma-" case                   ^
-					               { //                                                                  ^
+                    { //                                                                  ^
                       if(cqMass>mPi+mLamb)    // "Lambda + Pi- is possible" case          ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         hyM   = mLamb;        // Lambda mass                              ^
                         hyPDG = 3122;         // Lambda PDG Code                          ^
-					                 } //                                                                ^
+                      } //                                                                ^
                       else if(cqMass>mSigM)   // "Sigma- gamma decay" case                ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         hyM=mSigM;            // Sigma- mass                              ^
                         hyPDG=3112;           // Sigma- PDG Code                          ^
                         pigM=0.;              // Gamma mass                               ^
                         pigPDG=22;            // Gamma PDG Code                           ^
-					                 } //                                                                ^
+                      } //                                                                ^
                     } //                                                                  ^
                     else if(PDGQ==3222||PDGQ==91000999) // --> "Sigma+" case              ^
-					               { //                                                                  ^
+                    { //                                                                  ^
                       pigPDG= 211;            // Pi+ PDG Code                             ^
                       if(cqMass>mPi+mLamb)    // --- "Lambda + Pi+ is possible" case      ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         hyM   = mLamb;        // Lambda mass                              ^
                         hyPDG = 3122;         // Lambda PDG Code                          ^
@@ -2311,24 +2463,24 @@
                       } //                                                                ^
                       else if(cqMass>mSigP)   // "Sigma- gamma decay" case                ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         hyM=mSigP;            // Sigma+ mass                              ^
                         hyPDG=3222;           // Sigma+ PDG Code                          ^
                         pigM=0.;              // Gamma mass                               ^
                         pigPDG=22;            // Gamma PDG Code                           ^
-					                 } //                                                                ^
+                      } //                                                                ^
                       else if(cqMass>mPi0+mProt&&G4UniformRand()>.5) // "P + Pi0" case    ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         hyM   = mProt;        // Proton mass                              ^
                         hyPDG = 2212;         // Proton PDG Code                          ^
                         pigM  = mPi0;         // Pi0 mass                                 ^
                         pigPDG= 111;          // Pi0 PDG Code                             ^
-					                 } //                                                                ^
+                      } //                                                                ^
                       else if(cqMass<mPi+mNeut)// "P+gamma" case as "N+Pi+" is impossible ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         hyM   = mProt;        // Proton mass                              ^
                         hyPDG = 2212;         // Proton PDG Code                          ^
                         pigM=0.;              // Gamma mass                               ^
                         pigPDG=22;            // Gamma PDG Code                           ^
-					                 } //                                                                ^
+                      } //                                                                ^
                       // othing should be done for "N + P+" case                          ^
                     } //                                                                  ^
@@ -2336,11 +2488,11 @@
                     G4LorentzVector m4Mom(0.,0.,0.,pigM);// pion/gamma mass               ^
                     if(!G4QHadron(cq4M).DecayIn2(b4Mom, m4Mom)) // "DecayIn2 failed" case ^
-					               { //                                                                  ^
+                    { //                                                                  ^
                       G4cout<<"---Warning---G4QE::HQE:H="<<hyPDG<<"(m="<<hyM<<")+G/Pi=" //^
-							                     <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^
+                            <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^
                       G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC             ^
                       CleanUp();              //                                          ^
-		                    if(!CheckGroundState(quasH,true)) // Last posibility to correct     ^
-					                 { //                                                                ^
+                      if(!CheckGroundState(quasH,true)) // Last posibility to correct     ^
+                      { //                                                                ^
                         G4QHadron* hadr = new G4QHadron(totQC,tot4M); //                  ^
                         theQHadrons.push_back(hadr);    // Cor or fill as It Is           ^
@@ -2348,5 +2500,5 @@
                         G4cout<<"-Warn-G4QE::HQE:Sig,QC="<<totQC<<",4M="<<tot4M<<G4endl;//^
 #endif
-    	                   //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^
+                        //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^
                       } //                                                                ^
                       delete quasH;          // Delete the temporary fake Quasmon         ^
@@ -2354,5 +2506,5 @@
                     } //                                                                  ^
 #ifdef pdebug
-	                   G4cout<<"G4QEnv::HadronizeQEnv: Sigma="<<PDGQ<<cq4M<<" -> Hyperon="// ^
+                    G4cout<<"G4QEnv::HadronizeQEnv: Sigma="<<PDGQ<<cq4M<<" -> Hyperon="// ^
                           <<hyPDG<<b4Mom<<" + Gamma/Pi="<<pigPDG<<m4Mom<<G4endl; //       ^
 #endif
@@ -2365,9 +2517,9 @@
                     totQC-=qQC;               // Update total residual QC of HadrPr.      ^
                     eCount--;                 // Reduce a#of the living Quasmons          ^
-				              }                           //                                          ^
+                  }                           //                                          ^
                   else if(PDGQ==90999002||PDGQ==91001999) // pS+/nS-                      ^
                   {                           //                                          ^
 #ifdef edebug
-				                G4cout<<"G4QEnv::HadrQEnv: Nucleon+Sigma Mass="<<cqMass<<G4endl; //   ^
+                    G4cout<<"G4QEnv::HadrQEnv: Nucleon+Sigma Mass="<<cqMass<<G4endl; //   ^
 #endif
                     G4bool dinFlag = false;   // Di-nucleon flag                          ^
@@ -2377,7 +2529,7 @@
                     G4int    pigPDG=2112;     // Prototype of the nucleon PDG Code        ^
                     if     (PDGQ==90999002)   // --> "n+Sigma-" case                      ^
-					               {                         //                                          ^
+                    {                         //                                          ^
                       if(cqMass<mNeut+mSigM)  // ----> "DiNeutron+Pi-" case               ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         dinFlag = true;       // For the final decay                      ^
                         hyM=mNeut+mNeut;      // Di-neutron                               ^
@@ -2385,8 +2537,8 @@
                         pigM=mPi;             // Pi- mass                                 ^
                         pigPDG=-211;          // Pi- PDG Code                             ^
-					                 } //                                                                ^
+                      } //                                                                ^
                     } //                                                                  ^
                     else if(PDGQ==91001999)   // --> "p+Sigma+" case                      ^
-					               { //                                                                  ^
+                    { //                                                                  ^
                       hyM=mSigP;              // Sigma+                                   ^
                       hyPDG=3222;             // PDG Code of Sigma+                       ^
@@ -2394,21 +2546,21 @@
                       pigPDG=2212;            // PDG Code of proton                       ^
                       if(cqMass<mProt+mSigP)  // ----> "Proton+Proton" case               ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         hyM=mProt;            // Proton mass                              ^
                         hyPDG=2212;           // Proton PDG Code                          ^
                         pigM=mProt;           // Proton mass                              ^
                         pigPDG=2212;          // Proton PDG Code                          ^
-					                 } //                                                                ^
+                      } //                                                                ^
                     } //                                                                  ^
                     G4LorentzVector b4Mom(0.,0.,0.,hyM); // Hyperon (di-nucleon) mass     ^
                     G4LorentzVector m4Mom(0.,0.,0.,pigM);// Nucleon (pion) mass           ^
                     if(!G4QHadron(cq4M).DecayIn2(b4Mom, m4Mom)) // "DecayIn2 failed" case ^
-					               { //                                                                  ^
+                    { //                                                                  ^
                       G4cout<<"--Warning--G4QE::HQE:S/D="<<hyPDG<<"(m="<<hyM<<")+N/Pi=" //^
-							                     <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^
+                            <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^
                       G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC             ^
                       CleanUp();              //                                          ^
-		                    if(!CheckGroundState(quasH,true)) // Last posibility to correct     ^
-					                 { //                                                                ^
+                      if(!CheckGroundState(quasH,true)) // Last posibility to correct     ^
+                      { //                                                                ^
                         G4QHadron* hadr = new G4QHadron(totQC,tot4M); //                  ^
                         theQHadrons.push_back(hadr);    // Cor or fill as It Is           ^
@@ -2416,5 +2568,5 @@
                         G4cout<<"-Warn-G4QE::HQE:Sig,QC="<<totQC<<",4M="<<tot4M<<G4endl;//^
 #endif
-    	                   //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^
+                        //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^
                       } //                                                                ^
                       delete quasH;          // Delete the temporary fake Quasmon         ^
@@ -2422,5 +2574,5 @@
                     } //                                                                  ^
 #ifdef pdebug
-	                   G4cout<<"G4QEnv::HadronizeQEnv: NSigma="<<PDGQ<<cq4M<<"-> Sigma/dN="//^
+                    G4cout<<"G4QEnv::HadronizeQEnv: NSigma="<<PDGQ<<cq4M<<"-> Sigma/dN="//^
                           <<hyPDG<<b4Mom<<" + N/Pi="<<pigPDG<<m4Mom<<G4endl; //           ^
 #endif
@@ -2429,5 +2581,5 @@
                     theQHadrons.push_back(curBar); // Fill the Hyperon (delete equivalent)^
                     if(dinFlag)               //                                          ^
-					               {                         //                                          ^
+                    {                         //                                          ^
                       G4QHadron* secBar = new G4QHadron(hyPDG,b4Mom);// Cre. 2-nd nucleon ^
                       theQHadrons.push_back(secBar);// Fill 2-nd nucleon (delete equiv.)  ^
@@ -2439,9 +2591,9 @@
                     totQC-=qQC;               // Update total residual QC of HadrPr.      ^
                     eCount--;                 // Reduce a#of the living Quasmons          ^
-				              }                           //                                          ^
+                  }                           //                                          ^
                   else if(PDGQ==90999003||PDGQ==91002999) // ppS+/nnS-                    ^
                   {                           //                                          ^
 #ifdef edebug
-				                G4cout<<"G4QEnv::HadrQEnv: DiNucleon+Sigma Mass="<<cqMass<<G4endl; // ^
+                    G4cout<<"G4QEnv::HadrQEnv: DiNucleon+Sigma Mass="<<cqMass<<G4endl; // ^
 #endif
                     G4bool dinFlag = false;   // Di-nucleon flag                          ^
@@ -2451,7 +2603,7 @@
                     G4int    pigPDG=2112;     // Prototype of the nucleon PDG Code        ^
                     if     (PDGQ==90999003)   // --> "n+Sigma-" case                      ^
-					               {                         //                                          ^
+                    {                         //                                          ^
                       if(cqMass<pigM+mSigM)   // ----> "DiNeutron+Pi-" case               ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         dinFlag = true;       // For the final decay                      ^
                         pigM=mNeut+mNeut+mNeut;// Tri-neutron                             ^
@@ -2459,8 +2611,8 @@
                         hyM=mPi;              // Pi- mass                                 ^
                         hyPDG=-211;           // Pi- PDG Code                             ^
-					                 } //                                                                ^
+                      } //                                                                ^
                     } //                                                                  ^
                     else if(PDGQ==91002999)   // --> "p+Sigma+" case                      ^
-					               { //                                                                  ^
+                    { //                                                                  ^
                       hyM=mSigP;              // Sigma+                                   ^
                       hyPDG=3222;             // PDG Code of Sigma+                       ^
@@ -2468,5 +2620,5 @@
                       pigPDG=2212;            // PDG Code of proton                       ^
                       if(cqMass<pigM+mSigP)   // ----> "DiProton+Pi+" case                ^
-					                 { //                                                                ^
+                      { //                                                                ^
                         dinFlag = true;       // For the final decay                      ^
                         pigM=mProt+mProt+mProt;// Tri-proton                              ^
@@ -2474,16 +2626,16 @@
                         hyM=mPi;             // Pi+ mass                                  ^
                         hyPDG=211;           // Pi+ PDG Code                              ^
-					                 } //                                                                ^
+                      } //                                                                ^
                     } //                                                                  ^
                     G4LorentzVector b4Mom(0.,0.,0.,hyM); // Hyperon (di-nucleon) mass     ^
                     G4LorentzVector m4Mom(0.,0.,0.,pigM);// Nucleon (pion) mass           ^
                     if(!G4QHadron(cq4M).DecayIn2(b4Mom, m4Mom)) // "DecayIn2 failed" case ^
-					               { //                                                                  ^
+                    { //                                                                  ^
                       G4cout<<"--Warning--G4QE::HQE:S/Pi="<<hyPDG<<"(m="<<hyM<<")+D/T=" //^
-							                     <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^
+                            <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^
                       G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC             ^
                       CleanUp();              //                                          ^
-		                    if(!CheckGroundState(quasH,true)) // Last posibility to correct     ^
-					                 { //                                                                ^
+                      if(!CheckGroundState(quasH,true)) // Last posibility to correct     ^
+                      { //                                                                ^
                         G4QHadron* hadr = new G4QHadron(totQC,tot4M); //                  ^
                         theQHadrons.push_back(hadr);    // Cor or fill as It Is           ^
@@ -2491,5 +2643,5 @@
                         G4cout<<"-Warn-G4QE::HQE:Sig,QC="<<totQC<<",4M="<<tot4M<<G4endl;//^
 #endif
-    	                   //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^
+                        //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^
                       } //                                                                ^
                       delete quasH;          // Delete the temporary fake Quasmon         ^
@@ -2497,5 +2649,5 @@
                     } //                                                                  ^
 #ifdef pdebug
-	                   G4cout<<"G4QEnv::HadronizeQEnv:2NSigma="<<PDGQ<<cq4M<<"-> Sigma/Pi="//^
+                    G4cout<<"G4QEnv::HadronizeQEnv:2NSigma="<<PDGQ<<cq4M<<"-> Sigma/Pi="//^
                           <<hyPDG<<b4Mom<<" + 2N/3N="<<pigPDG<<m4Mom<<dinFlag<<G4endl; // ^
 #endif
@@ -2509,5 +2661,5 @@
                     theQHadrons.push_back(secBar); // Fill the gam/pi (delete equivalent) ^
                     if(dinFlag)               //                                          ^
-					               {                         //                                          ^
+                    {                         //                                          ^
                       G4QHadron* triBar = new G4QHadron(pigPDG,m4Mom);// Cre. 3-d nucleon ^
                       theQHadrons.push_back(triBar);// Fill 3-d nucleon (delete equival.) ^
@@ -2517,5 +2669,5 @@
                     totQC-=qQC;               // Update total residual QC of HadrPr.      ^
                     eCount--;                 // Reduce a#of the living Quasmons          ^
-				              }                           //                                          ^
+                  }                           //                                          ^
                   else if (PDGQ!=10)          // @@ Chipolino can wait @@                 ^
                   {                           //                                          ^
@@ -2523,11 +2675,11 @@
                     G4double gsM=QPDGQ.GetMass(); // GSmass of the Quasmon                ^
 #ifdef edebug
-    		              G4cout<<"G4QEnv::HadrQEnv:#"<<jq<<",qM="<<qM<<">gsM="<<gsM<<G4endl;// ^
-#endif
-					               if(fabs(qM-gsM)<0.0001)    // "Fill & Kill" Case                       ^
+                    G4cout<<"G4QEnv::HadrQEnv:#"<<jq<<",qM="<<qM<<">gsM="<<gsM<<G4endl;// ^
+#endif
+                    if(fabs(qM-gsM)<0.0001)   // "Fill & Kill" Case                       ^
                     {                         //                                          ^
                       G4QHadron* resQ = new G4QHadron(PDGQ,cq4M); // GSM hadron for CurQ  ^
 #ifdef pdebug
-					                 G4cout<<"G4QEnv::HadrQEnv:ResQ="<<PDGQ<<cq4M<<G4endl;         //    ^
+                      G4cout<<"G4QEnv::HadrQEnv:ResQ="<<PDGQ<<cq4M<<G4endl;         //    ^
 #endif
                       theQHadrons.push_back(resQ); // @@ Check Dibarions @@ (del.equiv.)  ^
@@ -2536,9 +2688,9 @@
                       totQC-=qQC;             // Update total residual QC of HadrPr.      ^
                       eCount--;               // Reduce a#of the living Quasmons          ^
-					               }                         //                                          ^
-					               else if(eCount==1 && qM<gsM && CheckGroundState(pQ,true))// Cor.& Fin.^
+                    }                         //                                          ^
+                    else if(eCount==1 && qM<gsM && CheckGroundState(pQ,true))// Cor.& Fin.^
                     {                         //                                          ^
 #ifdef edebug
-					                 G4cout<<"G4QEnv::HadrQEnv:**>>** CGS Correction **>>**"<<G4endl; // ^
+                      G4cout<<"G4QEnv::HadrQEnv:**>>** CGS Correction **>>**"<<G4endl; // ^
 #endif
                       for_each(output->begin(), output->end(), DeleteQHadron()); //-->-->-^
@@ -2549,10 +2701,10 @@
                       return theQHadrons;     //                                          ^
                     }                         //                                          ^
-				                else if(qM<gsM&&(pQ->GetQC().GetSPDGCode()==1114     //               ^
-									                            || pQ->GetQC().GetSPDGCode()==2224) //               ^
+                    else if(qM<gsM&&(pQ->GetQC().GetSPDGCode()==1114     //               ^
+                                     || pQ->GetQC().GetSPDGCode()==2224) //               ^
                           &&qM>theWorld->GetQParticle(QPDGQ)->MinMassOfFragm())//Del&Kill ^
                     {                         //                                          ^
 #ifdef edebug
-					                 G4cout<<"G4QEnv::HadrQEnv:**||** Copy&Decay **||**"<<G4endl; //     ^
+                      G4cout<<"G4QEnv::HadrQEnv:**||** Copy&Decay **||**"<<G4endl; //     ^
 #endif
                       G4QHadronVector* decHV=pQ->DecayQuasmon();//Dec.Quasm & fill decHV=*^
@@ -2562,8 +2714,8 @@
                       pQ->KillQuasmon();      // Make done the current Quasmon            ^
                       eCount--;               // Reduce a#of the living Quasmons          ^
-					               }                         //                                          ^
-				              }                           //                                          ^
-				            }                             // End of the Medium/Vacuum IF              ^
-			           }                               // End of the status ELSE IF                ^
+                    }                         //                                          ^
+                  }                           //                                          ^
+                }                             // End of the Medium/Vacuum IF              ^
+              }                               // End of the status ELSE IF                ^
               else if(status==3) count3++;    //                                          ^
               if(status<0)                    // Panic: Quasmon is below theMassShell     ^
@@ -2581,20 +2733,20 @@
                 G4int    nRQ=0;                 // Prot. of a#of additionalRealQuasmons   ^
 #ifdef edebug
-    		          G4cout<<"G4QEnv::HadrQEnv: ***PANIC*** for jq="<<jq<<G4endl; //           ^
+                G4cout<<"G4QEnv::HadrQEnv: ***PANIC*** for jq="<<jq<<G4endl; //           ^
 #endif
                 G4ThreeVector vp= pQ->Get4Momentum().vect(); // PANICQuasmon momentum     ^
                 G4double dpm=1.e+30;            // Big number (dot product of momenta)    ^
-	               if(nQuasmons>1) for(G4int ir=0; ir<nQuasmons; ir++)// Search for partner  ^
+                if(nQuasmons>1) for(G4int ir=0; ir<nQuasmons; ir++)// Search for partner  ^
                 {                               //                                        ^
                   if(ir!=jq)                    // Skip the current (PANIC) Quasmon itself^
                   {                             //                                        ^
-	                   G4Quasmon* rQ = theQuasmons[ir]; //                                   ^
+                    G4Quasmon* rQ = theQuasmons[ir]; //                                   ^
                     G4int Qst = rQ->GetStatus();// Status of a Quasmon                    ^
 #ifdef edebug
-					               G4cout<<"G4QEnv::HadrQEnv: ir="<<ir<<",Qstatus="<<Qst<<G4endl; //     ^
+                    G4cout<<"G4QEnv::HadrQEnv: ir="<<ir<<",Qstatus="<<Qst<<G4endl; //     ^
 #endif
                     if(Qst>0)                   // Skip the dead Quasmon                  ^
-				                {
-					                 nRQ++;                    // Increment real-Quasmon-counter         ^
+                    {
+                      nRQ++;                    // Increment real-Quasmon-counter         ^
                       G4double dp=vp.dot(rQ->Get4Momentum().vect()); //                   ^
                       if(dp<dpm)                // Search for the "moving in thesameDir"  ^
@@ -2602,11 +2754,11 @@
                         ppm=ir;                 // Remember the index of MinProj Quasmon  ^
                         dpm=dp;                 // Remember the value of theMinProjection ^
-					                 }                         //                                        ^
-				                }                           //                                        ^
-				              } // End of the Quasmon LOOP 
+                      }                         //                                        ^
+                    }                           //                                        ^
+                  } // End of the Quasmon LOOP 
                 } // End of the partner-search-for-the-PANIC-Quasmon LOOP                 ^
                 if(nRQ)                         // Merge with theBestPartnerQuasmonCandid ^
                 {                               //                                        ^
-	                 G4Quasmon*      rQ = theQuasmons[ppm];   //                             ^
+                  G4Quasmon*      rQ = theQuasmons[ppm];   //                             ^
                   G4QContent      rQC= rQ->GetQC();        //                             ^
                   G4LorentzVector r4M= rQ->Get4Momentum(); //                             ^
@@ -2615,13 +2767,13 @@
                   rQ->InitQuasmon(rQC, r4M);    // Make new Quasmon                       ^
 #ifdef edebug
-		                G4cout<<"G4QE::HQE:"<<pQ->GetQC()<<"+"<<rQ->GetQC()<<"="<<rQC<<G4endl;//^
+                  G4cout<<"G4QE::HQE:"<<pQ->GetQC()<<"+"<<rQ->GetQC()<<"="<<rQC<<G4endl;//^
 #endif
                   pQ->KillQuasmon();            // Delete old Quasmon                     ^
                   eCount--;                     // Decrement counter of living Quasmons   ^
-			             }                               //                                        ^
+                }                               //                                        ^
                 else // No candidate to resolve PANIC was found                           ^
                 {                               //                                        ^
 #ifdef edebug
-		                G4cout<<"G4QEnv::HQE: No Q-cand. nRQ="<<nRQ<<",eC="<<eCount<<G4endl; // ^
+                  G4cout<<"G4QEnv::HQE: No Q-cand. nRQ="<<nRQ<<",eC="<<eCount<<G4endl; // ^
 #endif
                   //if(eCount==1 && CheckGroundState(pQ,true)) //  BackFusion attempt     ^
@@ -2633,17 +2785,17 @@
                     pQ->KillQuasmon();          //                                        ^
                     eCount--;                   // Reduce a#of the living Quasmons        ^
-					               return theQHadrons;         //                                        ^
+                    return theQHadrons;         //                                        ^
                   }                             //                                        ^
 #ifdef fdebug
-		                G4cout<<"G4QEnv::HadrQEnv:NO PANICsolution,t="<<tot4M<<totQC<<G4endl;// ^
+                  G4cout<<"G4QEnv::HadrQEnv:NO PANICsolution,t="<<tot4M<<totQC<<G4endl;// ^
 #endif
                   totQC=theEnvironment.GetQC(); //                                        ^
                   tot4M=theEnvironment.Get4Momentum(); //                                 ^
-	                 if(nQuasmons) for(G4int jr=0; jr<nQuasmons; jr++) // Search for partner ^
+                  if(nQuasmons) for(G4int jr=0; jr<nQuasmons; jr++) // Search for partner ^
                   {                             //                                        ^
-	                   G4Quasmon* rQ = theQuasmons[jr]; // Pointer to the Quasmon            ^
+                    G4Quasmon* rQ = theQuasmons[jr]; // Pointer to the Quasmon            ^
                     G4int Qst = rQ->GetStatus();// Status of a Quasmon                    ^
                     if(jr==jq)                  //                                        ^
-					               {                           //                                        ^
+                    {                           //                                        ^
                       totQC+=rQ->GetQC();       // QuarkContent of the Quasmon            ^
                       tot4M+=rQ->Get4Momentum();// QuarkContent of the Quasmon            ^
@@ -2653,5 +2805,5 @@
                       totQC+=rQ->GetQC();       // QuarkContent of the Quasmon            ^
                       tot4M+=rQ->Get4Momentum();// QuarkContent of the Quasmon            ^
-					               }                           //                                        ^
+                    }                           //                                        ^
                   } // End of the "No candidate to resolve PANIC" ELSE                    ^
                   pQ->KillQuasmon();            // Kill the only Quasmon                  ^
@@ -2665,25 +2817,26 @@
                   force=true;                   // Make the force decision                ^
                   break;                        // Out of the fragmentation loop >->+     ^
-			             }                               //                                  |     ^
-			           }                                 //                                  |     ^
-			         }                                   //                                  |     ^
+                }                               //                                  |     ^
+              }                                 //                                  |     ^
+            }                                   //                                  |     ^
             for_each(output->begin(), output->end(), DeleteQHadron()); // ->-->-->--|-----^
             output->clear();                    //                                  |     ^
             delete output;                      // >================================|=====^
-		        } // End of skip of the dead Quasmons                                     |
-#ifdef pdebug
-	         G4cout<<"G4QE::HQE:QStat("<<jq<<"="<<status<<pQ->Get4Momentum()<<G4endl;//|
-#endif
-	       } // End of fragmentation LOOP over Quasmons (jq) <--------<----------<-----+
+          } // End of skip of the dead Quasmons                                     |
+#ifdef pdebug
+          G4cout<<"G4QE::HQE:QStat("<<jq<<"="<<status<<pQ->Get4Momentum()<<G4endl;//|
+#endif
+        } // End of fragmentation LOOP over Quasmons (jq) <--------<----------<-----+
+        cAN=0;
       }
       else if(totMass>totM+.001)                // ==> "Try Evaporate or decay" case
-	     {
+      {
 #ifdef edebug
-		      G4cout<<"G4QEnv::HadrQE: NQ="<<nQuasmons<<",tM="<<totMass<<",tPDG="<<totPDG<<",tB="
+        G4cout<<"G4QEnv::HadrQE: NQ="<<nQuasmons<<",tM="<<totMass<<",tPDG="<<totPDG<<",tB="
               <<totBN<<",GSM="<<totM<<",dM="<<totMass-totM<<",totQC="<<totQC<<G4endl;
 #endif
-		      //if(nQuasmons==1)
+        //if(nQuasmons==1)
         if(2>3)                                 // ** closed, because doesn't make a diff
-		      {
+        {
           G4QContent quasQC=totQC-envQC;        // Total QuarkContent of the Only Quasmon
           G4int resQPDG=quasQC.GetSPDGCode();   // GS mass for the Only Quasmon-hadron
@@ -2696,5 +2849,5 @@
           G4double de=totMass-envM-resQM-qCB;
 #ifdef debug
-		        G4cout<<"G4QEnv::HadrQE:NQ==1,tM="<<totMass<<",qM="<<resQM<<",eM="<<envM<<",CB="
+          G4cout<<"G4QEnv::HadrQE:NQ==1,tM="<<totMass<<",qM="<<resQM<<",eM="<<envM<<",CB="
                 <<qCB<<",dE="<<totMass-envM-resQM-qCB<<G4endl;
 #endif
@@ -2704,5 +2857,5 @@
             G4LorentzVector fe4M=env4M;         // Prototype for outEnvironment
             G4LorentzVector dir4M=tot4M-env4M;  // Internall quasmon 4-momentum
-	           if(!G4QHadron(tot4M).RelDecayIn2(fe4M,fq4M,dir4M,1.,1.))
+            if(!G4QHadron(tot4M).RelDecayIn2(fe4M,fq4M,dir4M,1.,1.))
             {
               G4cerr<<"***G4QEnv::HadrQE: Can't decay Q+E, t4M="<<tot4M<<",d="<<de<<G4endl;
@@ -2715,5 +2868,5 @@
               theQHadrons.push_back(hEnv);      // Fill the hadron-environ (delete equiv.)
 #ifdef debug
-			           G4cout<<"G4QEnv::HadrQEnv:fQ="<<resQPDG<<fq4M<<", fE="<<envPDG<<fe4M<<G4endl;
+              G4cout<<"G4QEnv::HadrQEnv:fQ="<<resQPDG<<fq4M<<", fE="<<envPDG<<fe4M<<G4endl;
 #endif
               return theQHadrons;
@@ -2721,31 +2874,31 @@
         }
 #ifdef debug
-		      G4cout<<"G4QEnv::HadrQE: M="<<totMass<<",PDG="<<totPDG<<",B="<<totBN<<",GSM="<<totM
+        G4cout<<"G4QEnv::HadrQE: M="<<totMass<<",PDG="<<totPDG<<",B="<<totBN<<",GSM="<<totM
               <<",dM="<<totMass-totM<<",totQC="<<totQC<<G4endl;
 #endif
         if(totBN<2)                             // ==> "Baryon/Meson residual Quasmon" case
-		      {
+        {
           if(totPDG==90999999||totPDG==90999000||totPDG==90000999||totPDG==89999001)//"M"ca
-		        {
-		          G4cout<<"---Warning---G4QE::HQE:Meson(2) PDG="<<totPDG<<",M="<<totMass<<G4endl;
-		        }
+          {
+            G4cout<<"---Warning---G4QE::HQE:Meson(2) PDG="<<totPDG<<",M="<<totMass<<G4endl;
+          }
           else if(totPDG==1114||totPDG==2224)   //==> "DELTA- or DELTA++" case (?antiDELTA)
-		        {
+          {
             G4double   mBar=mProt;
-			         G4int      bPDG=2212;
+            G4int      bPDG=2212;
             G4double   mMes=mPi;
-			         G4int      mPDG=211;
+            G4int      mPDG=211;
             if(totPDG==1114)                    // "DELTA-" case
-			         {
+            {
               mBar=mNeut;
               bPDG=2112;
               mPDG=-211;
-		          }
+            }
             if(totMass<mBar+mMes)
-			         {
-		            G4cout<<"--Warning--G4QE::HQE:tM="<<totMass<<"<GSM+mPi0="<<totM+mPi0<<G4endl;
+            {
+              G4cout<<"--Warning--G4QE::HQE:tM="<<totMass<<"<GSM+mPi0="<<totM+mPi0<<G4endl;
               G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
               CleanUp();
-		            if(!CheckGroundState(quasH,true))
+              if(!CheckGroundState(quasH,true))
               {
                 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -2758,7 +2911,7 @@
               delete quasH;  
               return theQHadrons;
-			         }
+            }
             else
-			         {
+            {
               //G4QHadron* delta = new G4QHadron(totQC,tot4M);
               //delta->SetNFragments(2);           // Put a#of Fragments=2
@@ -2772,8 +2925,8 @@
               {
                 G4cout<<"---Warning---G4QEnv::HadronizeQE:B="<<bPDG<<"(m="<<mBar<<") + M="
-					                 <<mPDG<<"(m="<<mMes<<")="<<mBar+mMes<<" > mDel="<<totMass<<G4endl;
+                      <<mPDG<<"(m="<<mMes<<")="<<mBar+mMes<<" > mDel="<<totMass<<G4endl;
                 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                 CleanUp();
-		              if(!CheckGroundState(quasH,true))
+                if(!CheckGroundState(quasH,true))
                 {
                   G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -2782,5 +2935,5 @@
                   G4cout<<"***G4QE::HQE:FillAsIs(-3),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-    	             //throw G4QException("G4QEnvironment::HadronizeQEnv:Del->Bar+Mes error");
+                  //throw G4QException("G4QEnvironment::HadronizeQEnv:Del->Bar+Mes error");
                 }
                 delete quasH;  
@@ -2788,5 +2941,5 @@
               }
 #ifdef pdebug
-	             G4cout<<"G4QEnv::HadronizeQEnv: DELTA="<<totPDG<<tot4M<<" -> Bar="
+              G4cout<<"G4QEnv::HadronizeQEnv: DELTA="<<totPDG<<tot4M<<" -> Bar="
                     <<bPDG<<b4Mom<<" + Mes="<<mPDG<<m4Mom<<G4endl;
 #endif
@@ -2794,16 +2947,16 @@
               theQHadrons.push_back(curBar);     // Fill the baryon (delete equivalent)
 #ifdef edebug
-			           G4cout<<"G4QEnv::HadrQEnv:BaryonH="<<bPDG<<b4Mom<<G4endl;
+              G4cout<<"G4QEnv::HadrQEnv:BaryonH="<<bPDG<<b4Mom<<G4endl;
 #endif
               G4QHadron* curMes = new G4QHadron(mPDG,m4Mom);
               theQHadrons.push_back(curMes);     // Fill the meson (delete equivalent)
 #ifdef edebug
-			           G4cout<<"G4QEnv::HadrQEnv:MesonH="<<mPDG<<m4Mom<<G4endl;
+              G4cout<<"G4QEnv::HadrQEnv:MesonH="<<mPDG<<m4Mom<<G4endl;
 #endif
               return theQHadrons;
-			         }
-		        }
+            }
+          }
           else if(totPDG==10)                    // ==> "Chipolino" case
-		        {
+          {
             G4QChipolino resChip(totQC);         // define Residual as Chipolino
             G4QPDGCode h1QPDG=resChip.GetQPDG1();// QPDG of the first hadron
@@ -2818,8 +2971,8 @@
             {
               G4cout<<"---Warning---G4QEnv::HadronizeQE:h1="<<h1PDG<<"(m="<<h1M<<") + h2="
-				                <<h2PDG<<"(m="<<h2M<<")="<<h1M+h2M<<" > mChipo="<<totMass<<G4endl;
+                    <<h2PDG<<"(m="<<h2M<<")="<<h1M+h2M<<" > mChipo="<<totMass<<G4endl;
               G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
               CleanUp();
-		            if(!CheckGroundState(quasH,true))
+              if(!CheckGroundState(quasH,true))
               {
                 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -2828,5 +2981,5 @@
                 G4cout<<"***G4QE::HQE:FillAsIs(-2),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-    	           //throw G4QException("G4QEnvironment::HadrQEnv: Chipo->1+2 decay failed");
+                //throw G4QException("G4QEnvironment::HadrQEnv: Chipo->1+2 decay failed");
               }
               delete quasH;  
@@ -2834,5 +2987,5 @@
             }
 #ifdef pdebug
-	           G4cout<<"G4QEnv::HadronizeQEnv: Chipo="<<tot4M<<" -> h1="
+            G4cout<<"G4QEnv::HadronizeQEnv: Chipo="<<tot4M<<" -> h1="
                   <<h1PDG<<h14Mom<<" + Mes="<<h2PDG<<h24Mom<<G4endl;
 #endif
@@ -2840,15 +2993,15 @@
             theQHadrons.push_back(curH1);        // Fill the curH1 (delete equivalent)
 #ifdef edebug
-			         G4cout<<"G4QEnv::HadrQEnv:HadronH="<<h1PDG<<h14Mom<<G4endl;
+            G4cout<<"G4QEnv::HadrQEnv:HadronH="<<h1PDG<<h14Mom<<G4endl;
 #endif
             G4QHadron* curH2 = new G4QHadron(h2PDG,h24Mom);
             theQHadrons.push_back(curH2);        // Fill the curH2 (delete equivalent)
 #ifdef edebug
-			         G4cout<<"G4QEnv::HadrQEnv:MesAsHadrPartnerH="<<h2PDG<<h24Mom<<G4endl;
+            G4cout<<"G4QEnv::HadrQEnv:MesAsHadrPartnerH="<<h2PDG<<h24Mom<<G4endl;
 #endif
             return theQHadrons;
-		        }
+          }
           else if(totBN<2&&totPDG&&totMass<totM+mPi0+.001)// ==> "Meson/Baryon+gamma" case
-		        {
+          {
             G4LorentzVector h4Mom(0.,0.,0.,totM);
             G4LorentzVector g4Mom(0.,0.,0.,0.);
@@ -2859,5 +3012,5 @@
               G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
               CleanUp();
-		            if(!CheckGroundState(quasH,true))
+              if(!CheckGroundState(quasH,true))
               {
                 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -2866,5 +3019,5 @@
                 G4cout<<"***G4QE::HQE:FillAsIs(-1),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-       	        //throw G4QException("G4QEnvironment::HadronizeQEnv:Gamma Decay failed");
+                //throw G4QException("G4QEnvironment::HadronizeQEnv:Gamma Decay failed");
               }
               delete quasH;  
@@ -2872,14 +3025,14 @@
             }
 #ifdef pdebug
-	           G4cout<<"G4QE::HQE:"<<tot4M<<"->h="<<totPDG<<h4Mom<<" + gamma="<<g4Mom<<G4endl;
+            G4cout<<"G4QE::HQE:"<<tot4M<<"->h="<<totPDG<<h4Mom<<" + gamma="<<g4Mom<<G4endl;
 #endif
             G4QHadron* curG = new G4QHadron(22,g4Mom);
             theQHadrons.push_back(curG);         // Fill the gamma (delete equivalent)
 #ifdef edebug
-			         G4cout<<"G4QEnv::HadrQEnv:PhotonH="<<g4Mom<<G4endl;
+            G4cout<<"G4QEnv::HadrQEnv:PhotonH="<<g4Mom<<G4endl;
 #endif
             G4QHadron* curH = new G4QHadron(totPDG,h4Mom);
 #ifdef edebug
-			         G4cout<<"G4QEnv::HadrQEnv:GamPartnerH="<<totPDG<<h4Mom<<G4endl;
+            G4cout<<"G4QEnv::HadrQEnv:GamPartnerH="<<totPDG<<h4Mom<<G4endl;
 #endif
             if(totPDG==92000000||totPDG==90002000||totPDG==90000002)
@@ -2887,7 +3040,7 @@
             else theQHadrons.push_back(curH);    // Fill the baryon (delete equivalent)
             return theQHadrons;
-		        }
+          }
           else if(totBN<2&&totPDG)               // ==> "Meson/Baryon+pi" case
-		        {
+          {
             G4int piPDG=111;
             G4double mpi=mPi0;
@@ -2895,6 +3048,6 @@
             G4double mbm=totM;
             if(totPDG==1114)
-			         {
-			           piPDG=-211;
+            {
+              piPDG=-211;
               mpi=mPi;
               mbPDG=2112;
@@ -2902,6 +3055,6 @@
             }
             else if(totPDG==2224)
-			         {
-			           piPDG=211;
+            {
+              piPDG=211;
               mpi=mPi;
               mbPDG=2212;
@@ -2909,6 +3062,6 @@
             }
             else if(totPDG==113)
-			         {
-			           piPDG=-211;
+            {
+              piPDG=-211;
               mpi=mPi;
               mbPDG=211;
@@ -2923,5 +3076,5 @@
               G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
               CleanUp();
-		            if(!CheckGroundState(quasH,true))
+              if(!CheckGroundState(quasH,true))
               {
                 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -2930,5 +3083,5 @@
                 G4cout<<"***G4QE::HQE:FillAsIs(0),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-       	        //throw G4QException("G4QEnvironment::HadronizeQE: DecIn2 mB+nPi failed");
+                //throw G4QException("G4QEnvironment::HadronizeQE: DecIn2 mB+nPi failed");
               }
               delete quasH;  
@@ -2936,5 +3089,5 @@
             }
 #ifdef pdebug
-	           G4cout<<"G4QE::HQE:"<<tot4M<<"->h="<<mbPDG<<h4Mom<<"+p="<<piPDG<<g4Mom<<G4endl;
+            G4cout<<"G4QE::HQE:"<<tot4M<<"->h="<<mbPDG<<h4Mom<<"+p="<<piPDG<<g4Mom<<G4endl;
 #endif
             G4QHadron* curH = new G4QHadron(mbPDG,h4Mom);
@@ -2944,14 +3097,14 @@
             G4QHadron* curG = new G4QHadron(piPDG,g4Mom);
 #ifdef edebug
-			         G4cout<<"G4QEnv::HadrQEnv:Gamma/Pi0H="<<piPDG<<g4Mom<<G4endl;
+            G4cout<<"G4QEnv::HadrQEnv:Gamma/Pi0H="<<piPDG<<g4Mom<<G4endl;
 #endif
             theQHadrons.push_back(curG);         // Fill the pi0 (delete equivalent)
             return theQHadrons;
-		        }
+          }
           else                                   // ==> "|B|<2 new Quasmon" case
-		        {
+          {
             G4Quasmon* resid = new G4Quasmon(totQC,tot4M); // delete is 3 lines below <-+
             G4QNucleus vacuum(90000000);         //                                     ^
- 	          G4QHadronVector* curout=resid->Fragment(vacuum,1);//**!!DESTROY!!** <-<-+   ^
+            G4QHadronVector* curout=resid->Fragment(vacuum,1);//**!!DESTROY!!** <-<-+   ^
             G4int rest = resid->GetStatus();     // New status after fragm attempt  ^   ^
             if(!rest) eCount--;                  // Dec ExistingQuasmonsCounter     ^   ^
@@ -2959,9 +3112,9 @@
             G4int nHadrons = curout->size();     // a#of Hadrons in the outHV       ^
             if(nHadrons>0)                       // Transfer QHadrons to Output     ^
-	           {
-    	         for (G4int ih=0; ih<nHadrons; ih++)// LOOP over output QHadrons       ^
-			           {                                  //                                 ^
-#ifdef pdebug
-				            G4cout<<"G4QEnv::HadrQE:NewB<2, H#"<<ih //                          ^
+            {
+              for (G4int ih=0; ih<nHadrons; ih++)// LOOP over output QHadrons       ^
+              {                                  //                                 ^
+#ifdef pdebug
+                G4cout<<"G4QEnv::HadrQE:NewB<2, H#"<<ih //                          ^
                       <<", QPDG="<<(*curout)[ih]->GetQPDG() //                      ^
                       <<", 4M="<<(*curout)[ih]->Get4Momentum()<<G4endl; //          ^
@@ -2969,18 +3122,18 @@
                 //theQHadrons.push_back(curout->operator[](ih));//(delete equ.) <-<-^
                 theQHadrons.push_back((*curout)[ih]);          // (delete equ.) <-<-^
-			           }                                  //                                 ^
-	           }                                    //                                 ^
-			         else                                 //                                 ^
-												{                                    //                                 ^
+              }                                  //                                 ^
+            }                                    //                                 ^
+            else                                 //                                 ^
+            {                                    //                                 ^
               G4cerr<<"***G4QEnv::HadrQEnv:MQ="<<tot4M.m()<<",QC="<<totQC<<G4endl;//^
-			           throw G4QException("G4QEnvironment::HadronizeQEnv: Quasmon decay?");//^
-			         }                                    // *** Do not destroy instances ***^
+              throw G4QException("G4QEnvironment::HadronizeQEnv: Quasmon decay?");//^
+            }                                    // *** Do not destroy instances ***^
             curout->clear();                     // The instances are filled above  ^
             delete curout;                       // >===============================^
             return theQHadrons;
-		        }
-		      }
+          }
+        }
         else
-		      {
+        {
           G4QContent tQC    =totQC;              // Not subtracted copy for error prints
           G4int      NSi    =0;                  // a#of additional Sigma
@@ -2994,5 +3147,5 @@
           G4double   MPi    =0.;                 // Total Mass of additional pions
           if    (totBN>0&&totS<0&&totChg+totChg>=totBN)// => "additional K+" case
-	         {
+          {
             aKPDG=321;
             NaK=-totS;
@@ -3001,7 +3154,7 @@
             totChg+=totS;                        // Charge reduction (totS<0!)
             totS=0;                              // Anti-strangness goes to anti-Kaons
-	         }
+          }
           else if (totBN>0&&totS<0)              // => "additional aK0" case
-	         {
+          {
             aKPDG=311;
             NaK=-totS;
@@ -3009,10 +3162,10 @@
             tQC+=totS*K0QC;
             totS=0;                              // Anti-strangness goes to anti-Kaons
-	         }
+          }
           else if (totBN>1&&totS>0&&(totChg<0||totChg>totBN-totS))//=>"additional Sigma"
-	         {
+          {
             NSi=totS;                            // Prototype of a#of Sigmas
             if(totChg<0)                         // Negative Sigmas
-			         {
+            {
               SiPDG=3112;
               if(-totChg<NSi) NSi=-totChg;       // A#of Sigma- is restricted by charge
@@ -3022,5 +3175,5 @@
             }
             else
-			         {
+            {
               SiPDG=3222;                        // Positive Sigmas
               G4int exChg=totChg-totBN+totS;     // Excesive positive charge
@@ -3032,7 +3185,7 @@
             totS-=NSi;                           // Reduce the TotalResidualStrangeness
             totBN-=NSi;                          // A#of excessive pions is added below
-	         }
+          }
           else if (totBN>0&&totS>totBN&&totBN<totS+totChg)// => "additional K0" case
-	         {// @@ Here Ksi0 check should be added totS=2>totBN=1&&totBN=1<totS=2+totChg=0
+          {// @@ Here Ksi0 check should be added totS=2>totBN=1&&totBN=1<totS=2+totChg=0
             aKPDG=-311;
             NaK=totS-totBN;
@@ -3040,7 +3193,7 @@
             tQC+=NaK*K0QC;
             totS-=NaK;                           // Reduce residualstrangeness
-	         }
+          }
           else if (totBN>0&&totS>totBN&&totChg<0)// => "additional K-" case
-	         {// @@ Here Ksi- check should be added totS=2>totBN=1&&totChg=-1<0
+          {// @@ Here Ksi- check should be added totS=2>totBN=1&&totChg=-1<0
             aKPDG=-321;
             NaK=totS-totBN;
@@ -3049,8 +3202,8 @@
             totChg+=NaK;                         // Increase residual charge
             totS-=NaK;                           // Reduce residual strangeness
-	         }
+          }
           // === Now residual DELTAS should be subtracted === 
           if      (totBN>0&&totChg>totBN-totS)   // => "additional PI+" case
-	         {// @@ Here Sigma+ check should be added totChg=1>totBn=1-totS=1
+          {// @@ Here Sigma+ check should be added totChg=1>totBn=1-totS=1
             PiPDG=211;
             NPi=totChg-totBN+totS;
@@ -3058,7 +3211,7 @@
             tQC-=NPi*PiQC;
             totChg-=NPi;
-	         }
+          }
           else if (totBN>0&&totChg<0)            // => "additional PI-" case
-	         {// @@ Here Sigma- check should be added totChg<0
+          {// @@ Here Sigma- check should be added totChg<0
             PiPDG=-211;
             NPi=-totChg;
@@ -3066,7 +3219,7 @@
             tQC+=NPi*PiQC;                       // Now anti-Pions must be subtracted
             totChg+=NPi;
-	         }
+          }
           else if (!totBN&&totChg>1-totS)        // => "additional PI+" case
-	         {// @@ Here Sigma+ check should be added totChg=1>totBn=1-totS=1
+          {// @@ Here Sigma+ check should be added totChg=1>totBn=1-totS=1
             PiPDG=211;
             NPi=totChg+totS-1;
@@ -3074,7 +3227,7 @@
             tQC-=NPi*PiQC;
             totChg-=NPi;
-	         }
+          }
           else if (!totBN&&totChg<-1-totS)       // => "additional PI-" case
-	         {// @@ Here Sigma- check should be added totChg<0
+          {// @@ Here Sigma- check should be added totChg<0
             PiPDG=-211;
             NPi-=totChg+totS+1;
@@ -3082,8 +3235,8 @@
             tQC+=NPi*PiQC;                       // Now anti-Pions must be subtracted
             totChg+=NPi;
-	         }
+          }
           G4double      totRM=0.;                // min (GS) Mass of the Residual System
           if(totBN<2)                            // Calculate totPDG & totRM
-	         {
+          {
             totPDG=tQC.GetSPDGCode();            // MinPDGCode for the Residual compound
             if(totPDG==10&&tQC.GetBaryonNumber()>0) totPDG=tQC.GetZNSPDGCode();
@@ -3096,18 +3249,18 @@
           }
           else
-	         {
+          {
             G4QNucleus totN(tQC,tot4M);          // Excited nucleus for the Residual System
             totRM=totN.GetMZNS();                // min (GS) Mass of the Residual System
             totPDG=totN.GetPDG();                // Total PDG Code for the Current compound
-	         }
+          }
           if(NaK)                                // ==> "Decay in K0 or K+ + NPi" case
-	         {//@@ Can (must) be moved to EvaporateResidual ??
+          {//@@ Can (must) be moved to EvaporateResidual ??
             if(!NPi)                             // ==> "Only anti-strange K" case
-		          {
+            {
               G4LorentzVector m4Mom(0.,0.,0.,MaK);
               G4LorentzVector n4Mom(0.,0.,0.,totRM);
               G4double sum=MaK+totRM;
               if(fabs(totMass-sum)<eps)
-			           {
+              {
                 m4Mom=tot4M*(MaK/sum);
                 n4Mom=tot4M*(totRM/sum);
@@ -3121,5 +3274,5 @@
                 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                 CleanUp();
-		              if(!CheckGroundState(quasH,true))
+                if(!CheckGroundState(quasH,true))
                 {
                   G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3134,5 +3287,5 @@
               }
 #ifdef pdebug
-	             G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> M="
+              G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> M="
                     <<aKPDG<<m4Mom<<" + N="<<totPDG<<n4Mom<<totQC<<G4endl;
 #endif
@@ -3140,5 +3293,5 @@
               if(NaK>1) oneK = m4Mom/NaK;        // 4-mom of one kaon  
               for (G4int jp=0; jp<NaK; jp++)
-			           {
+              {
                 G4QHadron* curK = new G4QHadron(aKPDG,oneK);
                 theQHadrons.push_back(curK);     // Fill the curK (delete equivalent)
@@ -3146,7 +3299,7 @@
               G4QHadron* curN = new G4QHadron(totPDG,n4Mom); // @@ Use DecayDib then Evap
               EvaporateResidual(curN);           // Try to evaporate residual (del.eq.)
-		          }
+            }
             else                                 // ==> "Anti-strange K's + DELTA's" case
-		          {
+            {
               G4LorentzVector m4Mom(0.,0.,0.,MPi);
               G4LorentzVector k4Mom(0.,0.,0.,MaK);
@@ -3158,5 +3311,5 @@
                 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                 CleanUp();
-		              if(!CheckGroundState(quasH,true))
+                if(!CheckGroundState(quasH,true))
                 {
                   G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3165,5 +3318,5 @@
                   G4cout<<"***G4QEnv::HQE:FillAsItIs(2),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-      	           //throw G4QException("G4QEnvironment::HadronizeQE:2AntiS-Nucl(1) error");
+                  //throw G4QException("G4QEnvironment::HadronizeQE:2AntiS-Nucl(1) error");
                 }
                 delete quasH;  
@@ -3171,5 +3324,5 @@
               }
 #ifdef fdebug
-	             G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> nK="<<aKPDG<<k4Mom
+              G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> nK="<<aKPDG<<k4Mom
                     <<" + nPi="<<PiPDG<<m4Mom<<" + N="<<totPDG<<n4Mom<<G4endl;
 #endif
@@ -3177,35 +3330,35 @@
               if(NPi>1) onePi = m4Mom/NPi;       // 4-mom of one pion  
               for (G4int ip=0; ip<NPi; ip++)
-			           {
+              {
                 G4QHadron* curP = new G4QHadron(PiPDG,onePi);
 #ifdef pdebug
-			             G4cout<<"G4QEnv::HadrQEnv:SPion#"<<ip<<",H="<<PiPDG<<onePi<<G4endl;
+                G4cout<<"G4QEnv::HadrQEnv:SPion#"<<ip<<",H="<<PiPDG<<onePi<<G4endl;
 #endif
                 theQHadrons.push_back(curP);     // Fill the curM (delete equivalent)
-	 		          }
+              }
               G4LorentzVector oneK=k4Mom;        // 4-mom of one kaon  
               if(NaK>1) oneK = k4Mom/NaK;        // 4-mom of one kaon  
               for (G4int jp=0; jp<NaK; jp++)
-			           {
+              {
                 G4QHadron* curP = new G4QHadron(aKPDG,oneK);
 #ifdef pdebug
-			             G4cout<<"G4QEnv::HadrQEnv:Kaon#"<<jp<<",H="<<aKPDG<<oneK<<G4endl;
+                G4cout<<"G4QEnv::HadrQEnv:Kaon#"<<jp<<",H="<<aKPDG<<oneK<<G4endl;
 #endif
                 theQHadrons.push_back(curP);     // Fill the curM (delete equivalent)
-	 		          }
+              }
               G4QHadron* curN = new G4QHadron(totPDG,n4Mom);
               EvaporateResidual(curN);           // Try to evaporate residual (del.equiv.)
-		          }
+            }
             return theQHadrons;
           }
           else if(NSi)                           // ==> "Decay in Sig+ or Sig- + NPi" case
-	         {//@@ Can (must) be moved to EvaporateResidual ??
+          {//@@ Can (must) be moved to EvaporateResidual ??
             if(!NPi)                             // ==> "Only Sigma's" case
-		          {
+            {
               G4LorentzVector m4Mom(0.,0.,0.,MSi);
               G4LorentzVector n4Mom(0.,0.,0.,totRM);
               G4double sum=MSi+totRM;
               if(fabs(totMass-sum)<eps)
-			           {
+              {
                 m4Mom=tot4M*(MSi/sum);
                 n4Mom=tot4M*(totRM/sum);
@@ -3219,5 +3372,5 @@
                 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                 CleanUp();
-		              if(!CheckGroundState(quasH,true))
+                if(!CheckGroundState(quasH,true))
                 {
                   G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3232,5 +3385,5 @@
               }
 #ifdef pdebug
-	             G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> Sig="
+              G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> Sig="
                     <<SiPDG<<m4Mom<<" + N="<<totPDG<<n4Mom<<totQC<<G4endl;
 #endif
@@ -3238,5 +3391,5 @@
               if(NSi>1) oneS = m4Mom/NSi;        // 4-mom of one sigma  
               for (G4int jp=0; jp<NSi; jp++)
-			           {
+              {
                 G4QHadron* curS = new G4QHadron(SiPDG,oneS);
                 theQHadrons.push_back(curS);     // Fill the curS (delete equivalent)
@@ -3244,7 +3397,7 @@
               G4QHadron* curN = new G4QHadron(totPDG,n4Mom); // @@ Use DecayDib then Evap
               EvaporateResidual(curN);           // Try to evaporate residual (del.eq.)
-		          }
+            }
             else                                 // ==> "Sigma's + DELTA's" case
-		          {
+            {
               G4LorentzVector m4Mom(0.,0.,0.,MPi);
               G4LorentzVector k4Mom(0.,0.,0.,MSi);
@@ -3256,5 +3409,5 @@
                 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                 CleanUp();
-		              if(!CheckGroundState(quasH,true))
+                if(!CheckGroundState(quasH,true))
                 {
                   G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3263,5 +3416,5 @@
                   G4cout<<"***G4QEnv::HQE:FillAsItIs(3),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-       	          //throw G4QException("G4QEnvironment::HadronizeQE:2Sigma-Nucl(1) error");
+                  //throw G4QException("G4QEnvironment::HadronizeQE:2Sigma-Nucl(1) error");
                 }
                 delete quasH;  
@@ -3269,5 +3422,5 @@
               }
 #ifdef fdebug
-	             G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> nS="<<SiPDG<<k4Mom
+              G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> nS="<<SiPDG<<k4Mom
                     <<" + nPi="<<PiPDG<<m4Mom<<" + N="<<totPDG<<n4Mom<<G4endl;
 #endif
@@ -3275,30 +3428,30 @@
               if(NPi>1) onePi = m4Mom/NPi;       // 4-mom of one pion  
               for (G4int ip=0; ip<NPi; ip++)
-			           {
+              {
                 G4QHadron* curP = new G4QHadron(PiPDG,onePi);
 #ifdef pdebug
-			             G4cout<<"G4QEnv::HadrQEnv:SPion#"<<ip<<",H="<<PiPDG<<onePi<<G4endl;
+                G4cout<<"G4QEnv::HadrQEnv:SPion#"<<ip<<",H="<<PiPDG<<onePi<<G4endl;
 #endif
                 theQHadrons.push_back(curP);     // Fill the curM (delete equivalent)
-	 		          }
+              }
               G4LorentzVector oneS=k4Mom;        // 4-mom of the only kaon  
               if(NSi>1) oneS = k4Mom/NSi;        // 4-mom of one kaon  
               for (G4int jp=0; jp<NSi; jp++)
-			           {
+              {
                 G4QHadron* curP = new G4QHadron(SiPDG,oneS);
 #ifdef pdebug
-			             G4cout<<"G4QEnv::HadrQEnv:Sigma#"<<jp<<",H="<<SiPDG<<oneS<<G4endl;
+                G4cout<<"G4QEnv::HadrQEnv:Sigma#"<<jp<<",H="<<SiPDG<<oneS<<G4endl;
 #endif
                 theQHadrons.push_back(curP);     // Fill the curM (delete equivalent)
-	 		          }
+              }
               G4QHadron* curN = new G4QHadron(totPDG,n4Mom);
               EvaporateResidual(curN);           // Try to evaporate residual (del.equiv.)
-		          }
+            }
             return theQHadrons;
-		        }
+          }
           else if(NPi)                           // ==> "Decay in Pi+ or Pi-" case
-	         {
+          {
             if(NPi==1)                           // ==> "One isobar" case
-		          {
+            {
               G4LorentzVector m4Mom(0.,0.,0.,MPi);
               G4LorentzVector n4Mom(0.,0.,0.,totRM);
@@ -3306,8 +3459,8 @@
               {
                 G4cout<<"---Warning---G4QEnv::HadronizeQEnv:M="<<PiPDG<<"(m="<<MPi<<")+N="
-				                  <<totPDG<<"(m="<<totRM<<")="<<MPi+totRM<<" > mSN="<<totMass<<G4endl;
+                      <<totPDG<<"(m="<<totRM<<")="<<MPi+totRM<<" > mSN="<<totMass<<G4endl;
                 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                 CleanUp();
-		              if(!CheckGroundState(quasH,true))
+                if(!CheckGroundState(quasH,true))
                 {
                   G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3316,5 +3469,5 @@
                   G4cout<<"***G4QEnv::HQE:FillAsItIs(5),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-    	             //throw G4QException("G4QEnvironment::HadronizeQEnv:Iso-Nucleus error");
+                  //throw G4QException("G4QEnvironment::HadronizeQEnv:Iso-Nucleus error");
                 }
                 delete quasH;  
@@ -3322,5 +3475,5 @@
               }
 #ifdef pdebug
-	             G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> M="<<PiPDG<<m4Mom<<" + N="
+              G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> M="<<PiPDG<<m4Mom<<" + N="
                     <<totPDG<<n4Mom<<totQC<<G4endl;
 #endif
@@ -3329,7 +3482,7 @@
               G4QHadron* curN = new G4QHadron(totPDG,n4Mom);
               EvaporateResidual(curN);           // Evaporate residual (delete equivalent)
-		          }
-		          else                                 // ==> "Many Isobars" case
-		          {
+            }
+            else                                 // ==> "Many Isobars" case
+            {
               G4int N1Pi = NPi/2;                // First pion cluster
               G4int N2Pi = NPi-N1Pi;             // Second pion cluster
@@ -3346,5 +3499,5 @@
                 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                 CleanUp();
-		              if(!CheckGroundState(quasH,true))
+                if(!CheckGroundState(quasH,true))
                 {
                   G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3353,5 +3506,5 @@
                   G4cout<<"***G4QEnv::HQE:FillAsItIs(5),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-       	          //throw G4QException("G4QEnvironment::HadronizeQE:ManyIsoNucleus error");
+                  //throw G4QException("G4QEnvironment::HadronizeQE:ManyIsoNucleus error");
                 }
                 delete quasH;  
@@ -3359,5 +3512,5 @@
               }
 #ifdef pdebug
-	             G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> N*PI="<<PiPDG
+              G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> N*PI="<<PiPDG
                     <<" (4M1="<<m4Mom<<" + 4M2="<<k4Mom<<") + N="<<totPDG<<n4Mom<<G4endl;
 #endif
@@ -3365,23 +3518,23 @@
               if(N1Pi>1) one1=m4Mom/N1Pi;        // 4-mom of the 1st cluster one pion  
               for (G4int ip=0; ip<N1Pi; ip++)
-			           {
+              {
                 G4QHadron* curP = new G4QHadron(PiPDG,one1);
                 theQHadrons.push_back(curP);     // Fill the curP (delete equivalent)
-	 		          }
+              }
               G4LorentzVector one2=k4Mom;        // 4-mom of the 2nd cluster only pion  
               if(N2Pi>1) one2=k4Mom/N2Pi;        // 4-mom of the 2nd cluster one pion  
               for (G4int jp=0; jp<N2Pi; jp++)
-			           {
+              {
                 G4QHadron* curP = new G4QHadron(PiPDG,one2);
                 theQHadrons.push_back(curP);     // Fill the curP (delete equivalent)
-	 		          }
+              }
               G4QHadron* curN = new G4QHadron(totPDG,n4Mom);
               EvaporateResidual(curN);           // Try to evaporate residual (del.equiv.)
-		          }
+            }
             return theQHadrons;
-		        }
-		      }
+          }
+        }
 #ifdef fdebug
-		      G4cout<<"G4QE::HadrQEnv: Try FinalEvaporation t4M="<<tot4M<<",tQC="<<totQC<<G4endl;
+        G4cout<<"G4QE::HadrQEnv: Try FinalEvaporation t4M="<<tot4M<<",tQC="<<totQC<<G4endl;
 #endif
         CleanUp();
@@ -3389,18 +3542,18 @@
         EvaporateResidual(evH);                  // Try to evaporate residual (del.equiv.)
         return theQHadrons;
-	     }
+      }
       else                                       // ==> "Only GSEnvironment exists" case
       { 
         if(totPDG==90000000 || fabs(totMass)<0.000001)
-		      {
+        {
           CleanUp();
           return theQHadrons;
-		      }
+        }
         G4double dM=totMass-totM;
 #ifdef pdebug
-		      G4cout<<"G4QEnv::HadrQEnv:GroundState tM-GSM="<<dM<<",GSM="<<totM<<",tPDG="<<totPDG
+        G4cout<<"G4QEnv::HadrQEnv:GroundState tM-GSM="<<dM<<",GSM="<<totM<<",tPDG="<<totPDG
               <<",nQ="<<nQuasmons<<G4endl;
 #endif
-	       G4Quasmon*       pQ = theQuasmons[0];    // Pointer to the first Quasmon          
+        G4Quasmon*       pQ = theQuasmons[0];    // Pointer to the first Quasmon          
         G4QPDGCode    QQPDG = pQ->GetQPDG();     // QPDG of the Quasmon
         G4int          QPDG = QQPDG.GetPDGCode();
@@ -3408,26 +3561,26 @@
         G4int          spbRN=totRN.SplitBaryon();// PossibilityToSplit baryon from Residual
         if(dM>-0.001)
-		      {
+        {
 #ifdef fdebug
-		        G4cout<<"G4QE::HadrQE:ExcitedNucleus, dM="<<dM<<">0,tBN="<<totBN<<",nQ="<<G4endl;
+          G4cout<<"G4QE::HadrQE:ExcitedNucleus, dM="<<dM<<">0,tBN="<<totBN<<",nQ="<<G4endl;
 #endif
           CleanUp();
           G4QHadron* evH = new G4QHadron(totQC,tot4M);// Create a Hadron for ResidualNucl
           EvaporateResidual(evH);                // Try to evaporate residual (del. equiv.)
-		      }
+        }
         else if(nQuasmons==1&&QPDG!=22&&QPDG!=111)// => "Decay Quasmon or Q+Environ" case
-		      {
+        {
           G4int envPDG = theEnvironment.GetPDG();// PDGCode of the NuclQEnvironment
 #ifdef pdebug
-		        G4cout<<"G4QEnv::HadrQEnv: nQ=1, QPDG=="<<QPDG<<G4endl;
+          G4cout<<"G4QEnv::HadrQEnv: nQ=1, QPDG=="<<QPDG<<G4endl;
 #endif
           if(!QPDG)
-		        {
-			         G4cerr<<"***G4QEnv::HadrQE: Quasmon is an unknown QHadron: PDG="<<QPDG<<G4endl;
-			         throw G4QException("G4QEnvironment::HadronizeQEnvironment:(2)Cann'tDecayQEnv");
-		        }
+          {
+            G4cerr<<"***G4QEnv::HadrQE: Quasmon is an unknown QHadron: PDG="<<QPDG<<G4endl;
+            throw G4QException("G4QEnvironment::HadronizeQEnvironment:(2)Cann'tDecayQEnv");
+          }
           // => "Quasmon-Chipolino or Environment-Dibaryon" case
           else if(QPDG==10||QPDG==92000000||QPDG==90002000||QPDG==90000002)
-		        {
+          {
             G4QContent QQC = pQ->GetQC();        // Quark Content of the Quasmon
             G4QPDGCode h1QPDG=nQPDG;             // QPDG of the first hadron
@@ -3442,14 +3595,14 @@
               h2QPDG=QChip.GetQPDG2();           // QPDG of the second hadron
               h2M   =h2QPDG.GetMass();           // Mass of the second hadron
-			         }
-			         else if(QPDG==90002000)
-			         {
+            }
+            else if(QPDG==90002000)
+            {
               h1QPDG=pQPDG;                      // QPDG of the first hadron
               h1M   =mProt;                      // Mass of the first hadron
               h2QPDG=h1QPDG;                     // QPDG of the second hadron
               h2M   =mProt;                      // Mass of the second hadron
-			         }
-			         else if(QPDG==92000000)
-			         {
+            }
+            else if(QPDG==92000000)
+            {
               h1QPDG=lQPDG;                      // QPDG of the first hadron
               h1M   =mLamb;                      // Mass of the first hadron
@@ -3458,5 +3611,5 @@
               G4double ddMass=totMass-envM;      // Free CM energy
               if(ddMass>mSigZ+mSigZ)             // Sigma0+Sigma0 is possible
-			           {                                  // @@ Only two particles PS is used
+              {                                  // @@ Only two particles PS is used
                 G4double dd2=ddMass*ddMass;      // Squared free energy
                 G4double sma=mLamb+mLamb;        // Lambda+Lambda sum
@@ -3485,5 +3638,5 @@
               }                                  //
               else if(ddMass>mSigZ+mLamb)        // Lambda+Sigma0 is possible
-			           {                                  // @@ Only two particles PS is used
+              {                                  // @@ Only two particles PS is used
                 G4double dd2=ddMass*ddMass;      // Squared free energy
                 G4double sma=mLamb+mLamb;        // Lambda+Lambda sum
@@ -3500,17 +3653,17 @@
                 }                                //
               }                                  //
-			         }                                    //
+            }                                    //
             if(h1M+h2M+envM<totMass)             // => "Three parts decay" case
-			         {
+            {
               G4LorentzVector h14M(0.,0.,0.,h1M);
               G4LorentzVector h24M(0.,0.,0.,h2M);
               G4LorentzVector e4M(0.,0.,0.,envM);
               if(!G4QHadron(tot4M).DecayIn3(h14M,h24M,e4M))
-			           {
-				            G4cout<<"Warning->G4QE::HQE:M="<<tot4M.m()<<","<<totMass<<"->"<<h1QPDG<<"("
-					                 <<h1M<<")+"<<h1QPDG<<"("<<h2M<<")+"<<envM<<"="<<h1M+h2M+envM<<G4endl;
+              {
+                G4cout<<"Warning->G4QE::HQE:M="<<tot4M.m()<<","<<totMass<<"->"<<h1QPDG<<"("
+                      <<h1M<<")+"<<h1QPDG<<"("<<h2M<<")+"<<envM<<"="<<h1M+h2M+envM<<G4endl;
                 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                 CleanUp();
-		              if(!CheckGroundState(quasH,true))
+                if(!CheckGroundState(quasH,true))
                 {
                   G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3519,14 +3672,14 @@
                   G4cout<<"***G4QEnv::HQE:FillAsItIs(6),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-				              //throw G4QException("G4QEnv::HadrQEnv:QChipo+Environment DecIn3 Error");
+                  //throw G4QException("G4QEnv::HadrQEnv:QChipo+Environment DecIn3 Error");
                 }
                 delete quasH;  
                 return theQHadrons;
 
-			           }
+              }
               G4QHadron* h1H = new G4QHadron(h1QPDG.GetPDGCode(),h14M);
               theQHadrons.push_back(h1H);        // (delete equivalent)
 #ifdef pdebug
-			           G4cout<<"G4QE::HQE:(2) H1="<<h1QPDG<<h14M<<G4endl;
+              G4cout<<"G4QE::HQE:(2) H1="<<h1QPDG<<h14M<<G4endl;
 #endif
               G4QHadron* h2H = new G4QHadron(h2QPDG.GetPDGCode(),h24M);
@@ -3540,9 +3693,9 @@
               G4cout<<"G4QE::HQE:(2) QEenv="<<envPDG<<e4M<<G4endl;
 #endif
-			         }
+            }
 #ifdef fdebug
             G4cout<<"***G4QEnv::HadQEnv:tM="<<tot4M.m()<<totQC<<"< h1="<<h1QPDG<<"(M="<<h1M
                   <<")+h2="<<h1QPDG<<"(M="<<h2M<<")+eM="<<envM<<"="<<h1M+h2M+envM<<G4endl;
-			         //throw G4QException("G4QEnv::HadrQEnv:QChipo+Env mass > than decaying mass");
+            //throw G4QException("G4QEnv::HadrQEnv:QChipo+Env mass > than decaying mass");
 #endif
             CleanUp();
@@ -3550,8 +3703,8 @@
             EvaporateResidual(evH);            // Try to evaporate residual (del. equiv.)
             return theQHadrons;
-		        }
+          }
         }
         else if(spbRN)// => "Join all quasmons to the residual compound and evaporate" case
-		      {
+        {
 #ifdef fdebug
           G4cout<<"***G4QEnv::HadQEnv: Evaporate the total residual tRN="<<totRN<<G4endl;
@@ -3561,10 +3714,10 @@
           EvaporateResidual(evH);               // Try to evaporate residual (del.equiv.)
           return theQHadrons;
-		      }
+        }
         //else if(nQuasmons<3||theQHadrons.size()<12)//"Try to correct" case (change cond)
         else if(2>3)  // "Try to correct" case (change condition)
-		      {
-#ifdef pdebug
-		        G4cout<<"***G4QEnv::HadrQE: M="<<totMass<<",dM="<<dM<<",nQ="<<nQuasmons<<G4endl;
+        {
+#ifdef pdebug
+          G4cout<<"***G4QEnv::HadrQE: M="<<totMass<<",dM="<<dM<<",nQ="<<nQuasmons<<G4endl;
 #endif
           G4int          nOfOUT  = theQHadrons.size();
@@ -3578,6 +3731,6 @@
             G4int           nFr    = theLast->GetNFragments();
             G4int           gam    = theLast->GetPDGCode();
-		          if(gam!=22&&!nFr&&lastS<0&&lastS+totS<0&&nOfOUT>1) // => "Skip K,gam & decayed"
-		          {
+            if(gam!=22&&!nFr&&lastS<0&&lastS+totS<0&&nOfOUT>1) // => "Skip K,gam & decayed"
+            {
               G4QHadron* thePrev = theQHadrons[nOfOUT-2];
               theQHadrons.pop_back();         // the last QHadron is excluded from OUTPUT
@@ -3588,5 +3741,5 @@
               last4M = theLast->Get4Momentum();
               lastQC = theLast->GetQC();
-		          }
+            }
             else
             {
@@ -3601,14 +3754,14 @@
             if(totPDG==10&&totQC.GetBaryonNumber()>0) totPDG=totQC.GetZNSPDGCode();
             if(bn>1)
-		          {
+            {
               totS  =totQC.GetStrangeness();  // Total Strangeness of this System
               if(totS>=0)                     // => "This is a normal nucleus" case
-			           {
+              {
                 G4QNucleus newN(totQC,tot4M);
                 totPDG=newN.GetPDG();
                 totM  =newN.GetMZNS();           // Calculate new minimum (GS) mass
-			           }
+              }
               else if(totS==-1)                  // => "Try to decay in K+/aK0 and finish"
-			           {
+              {
                 G4double m1=mK;         
                 G4int  PDG1=321;
@@ -3619,10 +3772,10 @@
                 G4double m3=newN0.GetMZNS();
                 if (m3+mK0<m2+mK)                // => "aK0+ResA is better" case
-	               {
+                {
                   m1  =mK0;
                   PDG1=311;
                   m2  =m3;
                   PDG2=newN0.GetPDG();
-	               }
+                }
                 if(totMass>m1+m2)                // => "can decay" case
                 {
@@ -3630,10 +3783,10 @@
                   G4LorentzVector qe4M(0.,0.,0.,m2);
                   if(!G4QHadron(tot4M).DecayIn2(fq4M,qe4M))
-			               {
+                  {
                     G4cout<<"---Warning---G4QE::HadQE:tM="<<tot4M.m()<<"->aK="<<PDG1<<"(M="
                           <<m1<<")+ResA="<<PDG2<<"(M="<<m2<<")="<<m1+m2<<G4endl;
                     G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                     CleanUp();
-		                  if(!CheckGroundState(quasH,true))
+                    if(!CheckGroundState(quasH,true))
                     {
                       G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3642,9 +3795,9 @@
                       G4cout<<"***G4QE::HQE:FillAsIs(7),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-		  		                //throw G4QException("G4QEnv::HadrQEnv: aK+ResA DecayIn2 error");
+                      //throw G4QException("G4QEnv::HadrQEnv: aK+ResA DecayIn2 error");
                     }
                     delete quasH;  
                     return theQHadrons;
-			               }
+                  }
                   G4QHadron* H1 = new G4QHadron(PDG1,fq4M);
 #ifdef pdebug
@@ -3658,9 +3811,9 @@
                   theQHadrons.push_back(H2);     // (delete equivalent)
                   break;
-			             }
+                }
                 else totM=250000.;               // => "Continue reversion" case
-			           }
+              }
               else if(totS==-2)                  //=>"Try to decay in 2(K+/aK0) and finish"
-		  	         {
+              {
                 G4double m1=mK;         
                 G4int  PDG1=321;
@@ -3675,17 +3828,17 @@
                 G4double m5=newNpp.GetMZNS();    // M-2*K^+
                 if (m4+mK0+mK0<m3+mK+mK0 && m4+mK0+mK0<=m5+mK+mK) //=>"2K0+ResA is theBest"
-	               {
+                {
                   m1  =mK0;
                   PDG1=311;
                   m3  =m4;
                   PDG3=newN00.GetPDG();
-	               }
+                }
                 else if(m5+mK+mK<m3+mK+mK0 && m5+mK+mK<=m4+mK0+mK0)//=>"2Kp+ResA isTheBest"
-	               {
+                {
                   m2  =mK;
                   PDG1=321;
                   m3  =m5;
                   PDG3=newNpp.GetPDG();
-	               }
+                }
                 if(totMass>m1+m2+m3)             // => "can decay" case
                 {
@@ -3694,10 +3847,10 @@
                   G4LorentzVector ra4M(0.,0.,0.,m3);
                   if(!G4QHadron(tot4M).DecayIn3(k14M,k24M,ra4M))
-			               {
+                  {
                     G4cout<<"--Warning--G4QE::HQE:tM="<<tot4M.m()<<"->aK="<<PDG1<<"(M="<<m1
                           <<")+K2="<<PDG2<<"(M="<<m2<<")+A="<<PDG3<<"(M="<<m3<<")"<<G4endl;
                     G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                     CleanUp();
-		                  if(!CheckGroundState(quasH,true))
+                    if(!CheckGroundState(quasH,true))
                     {
                       G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3706,9 +3859,9 @@
                       G4cout<<"***G4QE::HQE:FillAsIs(8),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-				                  //throw G4QException("G4QEnv::HadrQE:2K+ResidNucleus DecIn3 Error");
+                      //throw G4QException("G4QEnv::HadrQE:2K+ResidNucleus DecIn3 Error");
                     }
                     delete quasH;  
                     return theQHadrons;
-			               }
+                  }
                   G4QHadron* H1 = new G4QHadron(PDG1,k14M);
                   theQHadrons.push_back(H1);     // (delete equivalent)
@@ -3727,26 +3880,26 @@
 #endif
                   break;
-			             }
+                }
                 else totM=270000.;               // => "Continue reversion" case
-			           }
+              }
               else totM=300000.;                 // => "Continue reversion" case
-			         }
+            }
             else
-			         {
+            {
               if     (totPDG==1114||totPDG==2224||totPDG==10) // Decay right now and finish
-			           {
+              {
                 G4double m1=mNeut;
                 G4int  PDG1=2112;
                 G4double m2=mPi;
                 G4int  PDG2=-211;
-				            if(totPDG==2224)
-				            {
+                if(totPDG==2224)
+                {
                   m1=mProt;
                   PDG1=2212;
                   m2=mPi;
                   PDG2=211;
-				            }
+                }
                 else if(totPDG==10)              // "Chipolino" case
-				            {
+                {
                   G4QChipolino resChip(totQC);   // define the residual as a Chipolino
                   G4QPDGCode h1=resChip.GetQPDG1();
@@ -3756,16 +3909,16 @@
                   PDG2=h2.GetPDGCode();          // PDG code of the second hadron
                   m2  =h2.GetMass();             // Mass of the second hadron
-				            }
+                }
                 if(totMass>m1+m2)
-				            {
+                {
                   G4LorentzVector fq4M(0.,0.,0.,m1);
                   G4LorentzVector qe4M(0.,0.,0.,m2);
                   if(!G4QHadron(tot4M).DecayIn2(fq4M,qe4M))
-			               {
+                  {
                     G4cout<<"---Warning---G4QE::HaQE:tM="<<tot4M.m()<<"-> h1="<<PDG1<<"(M="
-					                     <<m1<<") + h2="<<PDG2<<"(M="<<m2<<")="<<m1+m2<<G4endl;
+                          <<m1<<") + h2="<<PDG2<<"(M="<<m2<<")="<<m1+m2<<G4endl;
                     G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC!
                     CleanUp();
-		                  if(!CheckGroundState(quasH,true))
+                    if(!CheckGroundState(quasH,true))
                     {
                       G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC!
@@ -3774,9 +3927,9 @@
                       G4cout<<"***G4QE::HQE:FillAsIs(9),QC="<<totQC<<",4M="<<tot4M<<G4endl;
 #endif
-				                  //throw G4QException("G4QEnv::HadrQEnv: h1+h2 DecayIn2 Error");
+                      //throw G4QException("G4QEnv::HadrQEnv: h1+h2 DecayIn2 Error");
                     }
                     delete quasH;  
                     return theQHadrons;
-			               }
+                  }
                   G4QHadron* H1 = new G4QHadron(PDG1,fq4M);
                   theQHadrons.push_back(H1);     // (delete equivalent)
@@ -3790,45 +3943,45 @@
                   theQHadrons.push_back(H2);     // (delete equivalent)
                   break;
-				            }
+                }
                 else totM=350000.;
-			           }
-			           else if(totPDG) totM=G4QPDGCode(totPDG).GetMass();
+              }
+              else if(totPDG) totM=G4QPDGCode(totPDG).GetMass();
               else totM=400000.;
-			         }
+            }
             totBN=totQC.GetBaryonNumber();      // The BaryNum after addition
             totS=totQC.GetStrangeness();        // The Strangeness after addition
             G4double dM=totMass-totM;
 #ifdef fdebug
-		          G4cout<<"G4QEnv::HadrQE: Add H="<<last4M<<lastQC<<",tM="<<tot4M<<totM<<totQC
+            G4cout<<"G4QEnv::HadrQE: Add H="<<last4M<<lastQC<<",tM="<<tot4M<<totM<<totQC
                   <<",dM="<<dM<<", tB="<<totBN<<", tS="<<totS<<G4endl;
 #endif
             if(dM>-0.001&&totPDG)
-		          {
+            {
               CleanUp();
               G4QHadron* evH = new G4QHadron(totPDG,tot4M);//Create Hadron for ResidNucleus
               EvaporateResidual(evH);           // Evaporate ResNuc (del.equiv)
               break;
-		          }
+            }
             nOfOUT  = theQHadrons.size();       // Update the value of OUTPUT entries
-		        } // End of WHILE(nOfOUT)
+          } // End of WHILE(nOfOUT)
           nOfOUT  = theQHadrons.size();         // Update the value of OUTPUT entries
-		        if(!nOfOUT)
-		        {
-		          G4cout<<"---Warning---G4QEnv::HadrQE:M="<<totMass<<"<gsM="<<totM<<",dM="<<dM
+          if(!nOfOUT)
+          {
+            G4cout<<"---Warning---G4QEnv::HadrQE:M="<<totMass<<"<gsM="<<totM<<",dM="<<dM
                   <<", tPDG="<<totPDG<<", t4M="<<tot4M<<G4endl;
-			         // throw G4QException("G4QEnvironment::HadronizeQEnv:Can't decayExhostedQEnv");
+            // throw G4QException("G4QEnvironment::HadronizeQEnv:Can't decayExhostedQEnv");
             CleanUp();
             G4QHadron* evH = new G4QHadron(totPDG,tot4M);// Create Hadron for ResidNucleus
             EvaporateResidual(evH);             // Evaporate ResidNucl (del.equiv)
-	         }
-		      }
+          }
+        }
         else                                    // "Last decay was fatal" case @@ buggy ?MK
-		      {
-#ifdef pdebug
-		        G4cout<<"***G4QEnv::HadrQE: M="<<totMass<<",dM="<<dM<<",nQ="<<nQuasmons<<G4endl;
+        {
+#ifdef pdebug
+          G4cout<<"***G4QEnv::HadrQE: M="<<totMass<<",dM="<<dM<<",nQ="<<nQuasmons<<G4endl;
 #endif
           G4Quasmon* quasH = new G4Quasmon(totQC,tot4M);
           CleanUp();
-		        if(!CheckGroundState(quasH,true))
+          if(!CheckGroundState(quasH,true))
           {
             G4QHadron* hadr = new G4QHadron(totQC,tot4M);
@@ -3841,6 +3994,6 @@
         }
         CleanUp();
-	     }
-	   } // End of "infinit" WHILE LOOP
+      }
+    } // End of "infinit" WHILE LOOP
   } // End of the "Nuclear Environment" case
   return theQHadrons;
@@ -3872,16 +4025,23 @@
   G4int thePDG = qH->GetPDGCode();           // Get PDG code of the Residual Nucleus
   G4int theBN  = qH->GetBaryonNumber();      // A (Baryon number of the nucleus)
+  G4QContent  theQC  = qH->GetQC();          // Quark Content of the hadron
+  G4int theS=theQC.GetStrangeness();         // S (Strangeness of the nucleus)
 #ifdef pdebug
   G4cout<<"G4QE::EvaporateRes:Called for PDG="<<thePDG<<",4M="<<qH->Get4Momentum()<<G4endl;
 #endif
-  if(theBN==1)
+  if(theS<0)                                 // Antistrange nucleus
+  {
+#ifdef pdebug
+    G4cout<<"G4QE::EvaporateRes: AntistrangeNucleus="<<thePDG<<qH->Get4Momentum()<<G4endl;
+#endif
+    DecayAntistrange(qH);                    // (delete equivalent)
+    return;
+  }
+  else if(theBN==1)
   {
 #ifdef pdebug
     G4cout<<"G4QE::EvaporateRes: Baryon="<<thePDG<<qH->Get4Momentum()<<G4endl;
 #endif
-    DecayBaryon(qH);                     // (delete equivalent)
-#ifdef qdebug
-    qH=0;
-#endif
+    DecayBaryon(qH);                         // (delete equivalent)
     return;
   }
@@ -3895,12 +4055,7 @@
     //DecayMeson(qH);                        // @@
     theQHadrons.push_back(qH);
-#ifdef qdebug
-    qH=0;
-#endif
     return;
   }
-  G4QContent  theQC  = qH->GetQC();          // Quark Content of the hadron
   G4int theC=theQC.GetCharge();              // P
-  G4int theS=theQC.GetStrangeness();         // S
   if(!thePDG) thePDG = theQC.GetSPDGCode();  // If there is no PDG code, get it from QC
   if(thePDG==10&&theQC.GetBaryonNumber()>0) thePDG=theQC.GetZNSPDGCode();
@@ -3925,7 +4080,4 @@
   {
     theQHadrons.push_back(qH);               // fill As It Is
-#ifdef qdebug
-     qH=0;
-#endif
   }
   else if(totMass>totGSM)
@@ -3972,5 +4124,5 @@
 } // End of EvaporateResidual
 
-//The public Hadronisation function with the Exception treatment (del respons. of User !)
+//Public Hadronisation function with Exception treatment (del is responsibility of User!)
 G4QHadronVector* G4QEnvironment::Fragment()
 {//              ==========================
@@ -4039,5 +4191,5 @@
     {
       RepFlag=false;                      // If OK - go out of the while
-      theFragments = FSInteraction();     //InterClass creation. User must delet QHadrons.
+      theFragments = FSInteraction();     // InterClass creation. User must delet QHadrons.
     }
     catch (G4QException& error)
@@ -4055,5 +4207,5 @@
         G4QHadron* cH = theQHadrons[ph];
         dif-=cH->Get4Momentum();
-		      G4cout<<"***G4QEnvir::Fr:H"<<ph<<"="<<cH->Get4Momentum()<<cH->GetPDGCode()<<G4endl;
+        G4cout<<"***G4QEnvir::Fr:H"<<ph<<"="<<cH->Get4Momentum()<<cH->GetPDGCode()<<G4endl;
       }
       for(G4int pq=0; pq<nQp; pq++)
@@ -4110,9 +4262,9 @@
     G4int nProj=theProjectiles.size();
     if(nProj) for(G4int ipr=0; ipr<nProj; ipr++)
-	   {
+    {
       G4QHadron* prH = theProjectiles[ipr];
       G4cerr<<"G4QE::F:#"<<ipr<<",PDG/4M="<<prH->GetPDGCode()<<prH->Get4Momentum()<<G4endl;
     }
-	   throw G4QException("G4QEnvironment::Fragment:This reaction caused the CHIPSException");
+    throw G4QException("G4QEnvironment::Fragment:This reaction caused the CHIPSException");
     //G4Exception("G4QEnvironment::Fragment","027",FatalException,"GeneralCHIPSException");
   }
@@ -4121,10 +4273,16 @@
   if(tmpS)
   {
-    tmpS=theFragments->size();
-    intQHadrons.resize(tmpS+intQHadrons.size()); // Resize intQHadrons
-    copy(theFragments->begin(), theFragments->end(), intQHadrons.end()-tmpS);
-    tmpS=intQHadrons.size();
-    theFragments->resize(tmpS); // Resize theFragments
-    copy(intQHadrons.begin(), intQHadrons.end(), theFragments->begin());
+    //tmpS=theFragments->size();
+    //intQHadrons.resize(tmpS+intQHadrons.size());
+    //copy(theFragments->begin(), theFragments->end(), intQHadrons.end()-tmpS);
+    //tmpS=intQHadrons.size();
+    //theFragments->resize(tmpS);  // Resize theFragments
+    //copy(intQHadrons.begin(), intQHadrons.end(), theFragments->begin());
+    // Can be like this, but by performance it is closer to FNAL (but better than it)
+    //copy(theFragments->begin(), theFragments->end(), back_inserter(intQHadrons));
+    //theFragments->resize(intQHadrons.size());  // Resize theFragments
+    //copy(intQHadrons.begin(), intQHadrons.end(), theFragments->begin());
+    // The following (istead of all above) has worse performance !
+    theFragments->insert(theFragments->begin(), intQHadrons.begin(), intQHadrons.end() );
     intQHadrons.clear();
   }
@@ -4200,5 +4358,5 @@
   for (G4int is=0; is<nQuasmons; is++) // Sum 4mom's of Quasmons for comparison
   {
-	   G4Quasmon*      pQ = theQuasmons[is];
+    G4Quasmon*      pQ = theQuasmons[is];
     G4LorentzVector Q4M= pQ->Get4Momentum();
     G4cout<<"G4QE::FSI: Quasmon ("<<is<<") is added, 4M="<<Q4M<<G4endl;
@@ -4262,5 +4420,5 @@
   for (G4int js=0; js<nQuasmons; js++)    // Subtract 4mom's of Quasmons (compare)
   {                                       //                                        
-	   G4Quasmon*      prQ = theQuasmons[js];//                                  
+    G4Quasmon*      prQ = theQuasmons[js];//                                  
     if(prQ->GetStatus())                  // Subtract only if Quasmon is alive      
     {                                     //                                        
@@ -4270,5 +4428,5 @@
       t4M          -= Q4M;                // Subtract 4-momentum of the Quasmon        
       tC           -= prQ->GetQC().GetCharge(); //                            
-	   }                                     //                                        
+    }                                     //                                        
     else G4cout<<"G4QE::FSI:Dead Quasmon("<<js<<")="<<prQ->GetStatus()<<G4endl;
   } // End of Quasmons4Momentum subtractions                                  
@@ -4284,5 +4442,5 @@
       t4M          -= hs4Mom;           //                                        
       tC           -= theQHadrons[jpo]->GetCharge(); // Subtract charge of the OutHadron
-	   }                                   // End of the "FinalHadron" IF            
+    }                                   // End of the "FinalHadron" IF            
   }                                     // End of the LOOP over output hadrons    
   G4cout<<"G4QEnv::FSI:|||||4-MomCHECK||||d4M="<<t4M<<",dCharge="<<tC<<G4endl;
@@ -4292,5 +4450,5 @@
   {
     G4cout<<"---Warning---G4QEnvironment::FSInteraction: nHadrons="<<nHadr<<G4endl;
-   	//throw G4QException("G4QEnvironment::FSInteraction: No hadrons in the output");
+    //throw G4QException("G4QEnvironment::FSInteraction: No hadrons in the output");
     return theFragments;
   }
@@ -4327,7 +4485,10 @@
       if(!CheckGroundState(quasH,true))// Try to correct with other hadrons
       {
+#ifdef pdebug
+        // M.K. Fake complain in the low energy nHe/pHe reactions, while everything is OK
         G4cout<<"---Warning---G4QEnv::FSI:Correction error LeaveAsItIs h4m="<<lh4M<<G4endl;
+#endif
         theQHadrons.push_back(curHadr);// Fill theResidualNucleus asItIs(delete equivalent)
-	       //throw G4QException("G4QEnv::FSI: STOP at Correction Error");
+        //throw G4QException("G4QEnv::FSI: STOP at Correction Error");
       }
       else
@@ -4386,5 +4547,5 @@
 #endif
     if(hBN>lHadr) // Current Hadron is the Biggest fragment -> Swap with theLast Hadron
-	   {
+    {
       G4QHadron* theLast = theCurr;          // Prototype of the pointer to the Last Hadron
       G4QHadron* curHadr = new G4QHadron(theCurr);// Remember CurrentHadron for evaporation
@@ -4406,5 +4567,5 @@
       sBN  = theCurr->GetStrangeness();
       hPDG = theCurr->GetPDGCode();
-	   }
+    }
     if(hPDG==89002000||hPDG==89001001||hPDG==89000002)// 2pt dec. of anti-strange (3pt dec)
     {
@@ -4421,9 +4582,9 @@
       G4double tM = 0.;
       if(hPDG==89002000)                     // Use the prototypes above
-	     {
+      {
         if(hMi<mKmP)
-		      {
+        {
           if(hMi>mProt+mPi+mPi0)
-		        {
+          {
             sPDG=211;
             sM  =mPi;
@@ -4432,5 +4593,5 @@
           }
           else if(hMi>mProt+mPi) // @@ Does not conserve strangeness (Week decay)
-		        {
+          {
 #ifdef pdebug
             G4cout<<"**G4QE::FSI:ANTISTRANGE*++*STRANGENESS,PDG="<<hPDG<<",M="<<hM<<G4endl;
@@ -4442,6 +4603,6 @@
         }
       }
-	     else if(hPDG==89001001)
-	     {
+      else if(hPDG==89001001)
+      {
         fQPDG= nQPDG;
         fM   = mNeut;
@@ -4455,8 +4616,8 @@
           sM   = mK0;
         }
-		      else if(hMi<mKmN)
-		      {
+        else if(hMi<mKmN)
+        {
           if(hMi>mProt+mPi0+mPi0)
-		        {
+          {
             fQPDG= pQPDG;
             fM   = mProt;
@@ -4466,5 +4627,5 @@
             tM   = mPi0;
             if(hMi>mNeut+mPi+mPi0&&G4UniformRand()>.67)
-		          {
+            {
               fQPDG= nQPDG;
               fM   = mNeut;
@@ -4473,5 +4634,5 @@
             }
             if(hMi>mProt+mPi+mPi&&G4UniformRand()>.5)
-		          {
+            {
               sPDG = 211;
               sM   = mPi;
@@ -4481,5 +4642,5 @@
           }
           else if(hMi>mProt+mPi0) // @@ Does not conserve strangeness (Week decay)
-		        {
+          {
 #ifdef pdebug
             G4cout<<"**G4QE::FSI:*ANTISTRANGE*+*STRANGENESS*PDG="<<hPDG<<",M="<<hM<<G4endl;
@@ -4493,6 +4654,6 @@
         }
       }
-	     else if(hPDG==89000002)
-	     {
+      else if(hPDG==89000002)
+      {
         fQPDG= nQPDG;
         fM   = mNeut;
@@ -4500,7 +4661,7 @@
         sM   = mK0;
         if(hMi<mK0mN)
-		      {
+        {
           if(hMi>mNeut+mPi+mPi)
-		        {
+          {
             sPDG = 211;
             sM   = mPi;
@@ -4509,5 +4670,5 @@
           }
           if(hMi>mProt+mPi+mPi0)
-		        {
+          {
             fQPDG= pQPDG;
             fM   = mProt;
@@ -4518,5 +4679,5 @@
           }
           else if(hMi>mProt+mPi) // @@ Does not conserve strangeness (Week decay)
-		        {
+          {
 #ifdef pdebug
             G4cout<<"**G4QE::FSI:**ANTISTRANGE*0*STRANGENE**PDG="<<hPDG<<",M="<<hM<<G4endl;
@@ -4529,7 +4690,7 @@
           else sPDG=0;      // @@ Still can try to decay in gamma+neutron (electromagnetic)
         }
-	     }
+      }
       if(!sPDG)
-	     {
+      {
 #ifdef pdebug
         G4cout<<"***G4QE::FSI:***ANTISTRANGE***CANN'T DECAY,PDG="<<hPDG<<",M="<<hM<<G4endl;
@@ -4543,10 +4704,10 @@
         G4double sum=fM+sM;
         if(fabs(hM-sum)<=eps)
-		      {
+        {
           f4M=h4Mom*(fM/sum);
           s4M=h4Mom*(sM/sum);
-		      }
+        }
         else if(hM<sum || !G4QHadron(h4Mom).DecayIn2(f4M,s4M))
-	       {
+        {
           G4cout<<"---Warning---G4QE::FSI: Still try(2),M="<<hM<<"->"<<fM<<"("<<fQPDG<<")+"
                 <<sM<<"("<<sPDG<<")="<<sum<<G4endl;
@@ -4588,11 +4749,11 @@
             //           7. Forbid the decay
             fOK=false;
-		        }
+          }
           else
           {
             G4cerr<<"***G4QEnv::FSI: No recovery (1) Env="<<theEnvironment<<G4endl;
-	           throw G4QException("G4QEnv::FSI:ANTISTRANGE DecayIn2 did not succeed");
+            throw G4QException("G4QEnv::FSI:ANTISTRANGE DecayIn2 did not succeed");
           }
-	       }
+        }
         if(fOK)
         {
@@ -4602,5 +4763,5 @@
           theQHadrons.push_back(sH);               // (delete equivalent)
         }
-	     }
+      }
       else
       {
@@ -4611,11 +4772,11 @@
         G4double sum=fM+sM+tM;
         if(fabs(hM-sum)<=eps)
-		      {
+        {
           f4M=h4Mom*(fM/sum);
           s4M=h4Mom*(sM/sum);
           t4M=h4Mom*(tM/sum);
-		      }
+        }
         else if(hM<sum || !G4QHadron(h4Mom).DecayIn3(f4M,s4M,t4M))
-	       {
+        {
           G4cout<<"---Warning---G4QE::FSI: Still try(3), M"<<hM<<"->"<<fM<<"("<<fQPDG<<")+"
                 <<sM<<"("<<sPDG<<")+"<<tM<<"("<<tPDG<<")="<<sum<<G4endl;
@@ -4649,11 +4810,11 @@
             delete quasH;
             fOK=false;
-		        }
+          }
           else
           {
             G4cout<<"***G4QEnv::FSI: No recovery (2) Env="<<theEnvironment<<G4endl;
-	           throw G4QException("G4QEnv::FSI:ANTISTRANGE DecayIn3 did not succeed");
+            throw G4QException("G4QEnv::FSI:ANTISTRANGE DecayIn3 did not succeed");
           }
-	       }
+        }
         if(fOK)
         {
@@ -4665,7 +4826,7 @@
           theQHadrons.push_back(tH);               // (delete equivalent)
         }
-	     }
+      }
       nHadr=theQHadrons.size();
-	   }
+    }
     else if(hPDG==89999003||hPDG==90002999||hPDG==90000003||hPDG==90003000||
             hPDG==90999002||hPDG==91001999) // "3-particles decays of dibaryons and 3N"
@@ -4682,5 +4843,5 @@
       G4double tM   = mPi;
       if(hPDG==90002999)       // p,p,pi+
-	     {
+      {
         nuQPDG = pQPDG;        // Substitute p for the first n
         nucM   = mProt;
@@ -4688,7 +4849,7 @@
         barM   = mProt;
         tPDG   = 211;          // Substitute pi+ for the first pi-
-	     }
+      }
       else if(hPDG==90003000)  // 3p
-	     {
+      {
         nuQPDG = pQPDG;        // Substitute p for the first n
         nucM   = mProt;
@@ -4697,9 +4858,9 @@
         tPDG   = 2212;         // Substitute p for pi-
         tM     = mProt;
-	     }
+      }
       else if(hPDG==90999002)  // n,Lambda,pi-/n,Sigma0,pi-/n,Sigma-,gamma(@@)
-	     {
+      {
         if(hM>mSigZ+mNeut+mPi)
-		      {
+        {
           G4double ddMass=hM-mPi;          // Free CM energy
           G4double dd2=ddMass*ddMass;      // Squared free energy
@@ -4720,5 +4881,5 @@
             barPDG = 3122;     // Substitute Lambda for the second n
             barM   = mLamb;
-		        }
+          }
         }
         else if(hM>mLamb+mNeut+mPi)
@@ -4734,12 +4895,12 @@
           tM     = 0;
         }
-	     }
+      }
       else if(hPDG==91001999)  // p,Lambda,pi+/p,Sigma0,pi+/p,Sigma+,gamma(@@)
-	     {
+      {
         nuQPDG = pQPDG;        // Substitute p for the first n
         nucM   = mProt;
         tPDG   = 211;          // Substitute pi+ for the first pi-
         if(hM>mSigZ+mProt+mPi)
-		      {
+        {
           G4double ddMass=hM-mPi;          // Free CM energy
           G4double dd2=ddMass*ddMass;      // Squared free energy
@@ -4760,5 +4921,5 @@
             barPDG = 3122;     // Substitute Lambda for the second n
             barM   = mLamb;
-		        }
+          }
         }
         if(hM>mLamb+mProt+mPi)
@@ -4774,10 +4935,10 @@
           tM     = 0;
         }
-	     }
+      }
       else if(hPDG==90000003)  // 3n
-	     {
+      {
         tPDG   = 2112;         // Substitute n for pi-
         tM     = mNeut;
-	     }
+      }
       G4bool fOK=true;
       G4LorentzVector nu4M(0.,0.,0.,nucM);
@@ -4786,11 +4947,11 @@
       G4double sum=nucM+barM+tM;
       if(fabs(hM-sum)<=eps)
-	     {
+      {
         nu4M=h4Mom*(nucM/sum);
         ba4M=h4Mom*(barM/sum);
         pi4M=h4Mom*(tM/sum);
-	     }
+      }
       if(hM<sum || !G4QHadron(h4Mom).DecayIn3(nu4M,ba4M,pi4M))
-	     {
+      {
 #ifdef pdebug
         G4int eA=theEnvironment.GetA();
@@ -4814,5 +4975,5 @@
             else theCurr->SetQC(theLast->GetQC());// CurHadrPDG instead of LastHadrPDG
 #ifdef pdebug
-			         G4cout<<"---Warning---G4QE::FSI:l#"<<nhd1<<",4M="<<l4M<<",PDG="<<lQP<<G4endl;
+            G4cout<<"---Warning---G4QE::FSI:l#"<<nhd1<<",4M="<<l4M<<",PDG="<<lQP<<G4endl;
 #endif
             theCurr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution
@@ -4838,11 +4999,11 @@
           delete quasH;
           fOK=false;
-		      //}
-		      //else
-		      //{
+        //}
+        //else
+        //{
         //  G4cerr<<"***G4QEnv::FSI:NoRec(3)E="<<theEnvironment<<eA<<",PDG="<<hPDG<<G4endl;
-	       //  throw G4QException("G4QEnv::FSI:ISO-dibaryon or 3n/3p DecayIn3 error");
-		    //}
-	     }
+        //  throw G4QException("G4QEnv::FSI:ISO-dibaryon or 3n/3p DecayIn3 error");
+      //}
+      }
       if(fOK)
       {
@@ -4855,5 +5016,5 @@
         nHadr=theQHadrons.size();
       }
-	   }
+    }
     else if(hBN>1 && !sBN && (cBN<0 || cBN>hBN)) // "nN+mD- or nP+mD++ decay"
     {
@@ -4871,5 +5032,5 @@
       G4int    nPi  = -cBN;    // a#of Pi-'s
       if( cBN>hBN)             // reinitialization for the "(n+m)*P,m*pi+" case
-	     {
+      {
         nuQPDG = pQPDG;        // Substitute p for the first n
         nucM   = mProt;
@@ -4887,11 +5048,11 @@
       G4double sum=nucM+barM+tM;
       if(fabs(hM-sum)<=eps)
-	     {
+      {
         nu4M=h4Mom*(nucM/sum);
         ba4M=h4Mom*(barM/sum);
         pi4M=h4Mom*(tM/sum);
-	     }
+      }
       if(hM<sum || !G4QHadron(h4Mom).DecayIn3(nu4M,ba4M,pi4M))
-	     {
+      {
 #ifdef pdebug
         G4cout<<"***G4QEnv::FSI:IsN M="<<hM<<","<<hPDG<<"->N="<<nuQPDG<<"(M="<<nucM<<")+"
@@ -4930,11 +5091,11 @@
           delete quasH;
           fOK=false;
-		      }
+        }
         else
         {
           G4cout<<"***G4QEnv::FSI:IN,NoRec(4) Env="<<theEnvironment<<",PDG="<<hPDG<<G4endl;
-	         throw G4QException("G4QEnv::FSI:IN Multy ISO-dibaryon DecayIn3 did not succeed");
-        }
-	     }
+          throw G4QException("G4QEnv::FSI:IN Multy ISO-dibaryon DecayIn3 did not succeed");
+        }
+      }
       if(fOK)
       {
@@ -5027,5 +5188,5 @@
         G4double     tM =mPi;
         if(hPDG==90002999)
-		      {
+        {
           fQPDG=pQPDG;
           fM   =mProt;
@@ -5040,11 +5201,11 @@
         G4double sum=fM+sM+tM;
         if(fabs(hM-sum)<=eps)
-		      {
+        {
           f4M=h4Mom*(fM/sum);
           s4M=h4Mom*(sM/sum);
           t4M=h4Mom*(tM/sum);
-		      }
+        }
         else if(hM<sum || !G4QHadron(h4Mom).DecayIn3(f4M,s4M,t4M))
-	       {
+        {
           G4cout<<"---WARNING---G4QE::FSI: Still trying, NDM="<<hM<<"->"<<fM<<"("<<fQPDG
                 <<")+"<<sM<<"("<<sPDG<<")+"<<tM<<"("<<tPDG<<")="<<sum<<G4endl;
@@ -5076,11 +5237,11 @@
             delete quasH;
             fOK=false;
-		        }
+          }
           else
           {
             G4cout<<"***G4QEnv::FSI: No ND recovery Env="<<theEnvironment<<G4endl;
-	           throw G4QException("G4QEnv::FSI:ND DecayIn3 did not succeed");
+            throw G4QException("G4QEnv::FSI:ND DecayIn3 did not succeed");
           }
-	       }
+        }
         if(fOK)
         {
@@ -5095,5 +5256,5 @@
         hQPDG= G4QPDGCode(hPDG);
         hGSM = hQPDG.GetMass();                  // Change GroundStateMass of theFirstFragm
-	     }
+      }
       nHadr=theQHadrons.size();
       if(hPDG==89001001||hPDG==89002000||hPDG==89000002)
@@ -5107,5 +5268,5 @@
         G4double     sM =mK0;
         if(hPDG==89000002)
-		      {
+        {
           fQPDG=pQPDG;
           fM   =mProt;
@@ -5114,5 +5275,5 @@
         }
         if(hPDG==89001001)
-		      {
+        {
           if(hM<mK0+mProt || G4UniformRand()>.5)
           {
@@ -5131,10 +5292,10 @@
         G4double sum=fM+sM;
         if(fabs(hM-sum)<=eps)
-		      {
+        {
           f4M=h4Mom*(fM/sum);
           s4M=h4Mom*(sM/sum);
-		      }
+        }
         else if(hM<sum || !G4QHadron(h4Mom).DecayIn2(f4M,s4M))
-	       {
+        {
           G4cout<<"---WARNING---G4QE::FSI: Still trying (2),NDM="<<hM<<"->"<<fM<<"("<<fQPDG
                 <<")+"<<sM<<"("<<sPDG<<")="<<sum<<G4endl;
@@ -5166,11 +5327,11 @@
             delete quasH;
             fOK=false;
-		        }
+          }
           else
           {
             G4cerr<<"***G4QEnv::FSI: No KN recovery Env="<<theEnvironment<<G4endl;
-	           throw G4QException("G4QEnv::FSI:KN DecayIn2 did not succeed");
+            throw G4QException("G4QEnv::FSI:KN DecayIn2 did not succeed");
           }
-	       }
+        }
         if(fOK)
         {
@@ -5183,5 +5344,5 @@
         hQPDG= G4QPDGCode(hPDG);
         hGSM = hQPDG.GetMass();                  // Change GroundStateMass of theFirstFragm
-	     }
+      }
       nHadr=theQHadrons.size();
       G4int           hS = curHadr->GetStrangeness();
@@ -5199,10 +5360,10 @@
       G4cout<<"G4QE::FSI:h="<<hPDG<<",S="<<hS<<",B="<<hB<<",#"<<hadron<<"<"<<nHadr<<G4endl;
 #endif
-	     //if(hadron&&!hF&&hB>0&&!hS&&(nHadr>3||hB<2)) // ThermoBackFus (VIMP for gamA TotCS)
-	     //if(hadron&&!hF&&hB>0&&!hS&&(nHadr>2||hB<4)) // ThermoBackFus (VIMP for gamA TotCS)
-	     if(hadron&&!hF&&hB>0&&!hS) // ThermoBackFusion cond. (VIMP for gamA TotCS)
-	     //if(hadron&&!hF&&hB>0&&hB<4&&!hS) // ThermoBackFusion cond. (VIMP for gamA TotCS)
-	     //if(hadron&&!hF&&hB>0&&!hS&&nHadr>2)//ThermoBackFusion MAX condition (VIMP for gamA)
-	     //if(2>3)                         // Close the ThermoBackFusion (VIMP for gamA TotCS)
+      //if(hadron&&!hF&&hB>0&&!hS&&(nHadr>3||hB<2)) // ThermoBackFus (VIMP for gamA TotCS)
+      //if(hadron&&!hF&&hB>0&&!hS&&(nHadr>2||hB<4)) // ThermoBackFus (VIMP for gamA TotCS)
+      if(hadron&&!hF&&hB>0&&!hS) // ThermoBackFusion cond. (VIMP for gamA TotCS)
+      //if(hadron&&!hF&&hB>0&&hB<4&&!hS) // ThermoBackFusion cond. (VIMP for gamA TotCS)
+      //if(hadron&&!hF&&hB>0&&!hS&&nHadr>2)//ThermoBackFusion MAX condition (VIMP for gamA)
+      //if(2>3)                         // Close the ThermoBackFusion (VIMP for gamA TotCS)
       {
 #ifdef pdebug
@@ -5212,5 +5373,5 @@
         G4QContent hQC = curHadr->GetQC();
         if(hadron&&!hF&&hB>0) for(unsigned pt=0; pt<hadron; pt++)
-	       {
+        {
           G4QHadron* backH = theQHadrons[pt];   // Get pointer to one of thePreviousHadrons
           G4int   bF = backH->GetNFragments();
@@ -5238,27 +5399,27 @@
 #ifdef pdebug
           //if(nHadr==3)
-		        G4cout<<"G4QE::FSI:"<<pt<<",B="<<bB<<",S="<<bS<<",p="<<pCM2<<"<"<<p2cut<<",hB="
+          G4cout<<"G4QE::FSI:"<<pt<<",B="<<bB<<",S="<<bS<<",p="<<pCM2<<"<"<<p2cut<<",hB="
                 <<hB<<",bM+hM="<<bM+hM<<">tM="<<tM<<",tQC="<<sQC<<G4endl;
 #endif
           //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&pCM2<p2cut)      // Only baryons == pcut
-		        //if(!bF&&!bS&&(bB==1&&hB>0||hB==1&&bB>0)&&bM+hM>tM+.00001
+          //if(!bF&&!bS&&(bB==1&&hB>0||hB==1&&bB>0)&&bM+hM>tM+.00001
           //   && (pCM2<p2cut&&nHadr>3||pCM2<p2cut2&&nHadr==3))
-		        //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&(pCM2<p2cut&&nHadr>3 ||
-		        //   pCM2<p2cut2&&nHadr==3&&bPDG>90000000))
+          //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&(pCM2<p2cut&&nHadr>3 ||
+          //   pCM2<p2cut2&&nHadr==3&&bPDG>90000000))
           //if(!bF&&bB<4&&bM+hM>tM+.001&&pCM2<p2cut)
           if(!bF&&!bS&&bB>0&&bM+hM>tM+.001&&pCM2<p2cut)
           //if(!bF&&bB<4&&bM+hM>tM+.001&&(pCM2<p2cut || bB+hB==4&&pCM2<p2cut2))
-		        //if(!bF&&(bB==1||hB==1)&&(nHadr>3||bPDG>90000000)&&bM+hM>tM+.001&&pCM2<p2cut)
-		        //if(!bF&&(bB==1&&!bC||hB==1&&!hC)&&bM+hM>tM+.001&&pCM2<p2cut)// Only n == pcut
-		        //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&sM-bM-hM<cut)  // Only baryons == ecut
-		        //if(!bF&&bB&&bB<fL&&bM+hM>tM+.001&&sM-bM-hM<cut)    // Light fragments == ecut
-	         {
+          //if(!bF&&(bB==1||hB==1)&&(nHadr>3||bPDG>90000000)&&bM+hM>tM+.001&&pCM2<p2cut)
+          //if(!bF&&(bB==1&&!bC||hB==1&&!hC)&&bM+hM>tM+.001&&pCM2<p2cut)// Only n == pcut
+          //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&sM-bM-hM<cut)  // Only baryons == ecut
+          //if(!bF&&bB&&bB<fL&&bM+hM>tM+.001&&sM-bM-hM<cut)    // Light fragments == ecut
+          {
 #ifdef fdebug
             G4int bPDG = backH->GetPDGCode();
-			         if(sPDG==89999003||sPDG==90002999||sPDG==89999002||sPDG==90001999)
+            if(sPDG==89999003||sPDG==90002999||sPDG==89999002||sPDG==90001999)
               G4cout<<"G4QE::FSI:**nD-/pD++**,h="<<hPDG<<",hB="<<hB<<",b="<<bPDG<<",bB="
                     <<bB<<G4endl;
             //if(nHadr==3)
-	           G4cout<<"G4QE::FSI:*FUSION*#"<<hadron<<"["<<hPDG<<"]"<<hM<<"+#"<<pt<<"["<<bPDG
+            G4cout<<"G4QE::FSI:*FUSION*#"<<hadron<<"["<<hPDG<<"]"<<hM<<"+#"<<pt<<"["<<bPDG
                   <<"]"<<bM<<"="<<bM+hM<<", sM="<<sM<<">["<<sPDG<<"]"<<tM<<",p2="<<pCM2
                   <<"<"<<p2cut<<G4endl;
@@ -5274,33 +5435,33 @@
             G4LorentzVector t4Mom(0.,0.,0.,0.);
             if(sPDG==89999002)                               // A=1
-		          {
+            {
               fQPDG=nQPDG;
               rQPDG=pimQPDG;
               f4Mom=G4LorentzVector(0.,0.,0.,mNeut);
               g4Mom=G4LorentzVector(0.,0.,0.,mPi);
-		          }
+            }
             else if(sPDG==90001999)
-		          {
+            {
               fQPDG=pQPDG;
               rQPDG=pipQPDG;
               f4Mom=G4LorentzVector(0.,0.,0.,mProt);
               g4Mom=G4LorentzVector(0.,0.,0.,mPi);
-		          }
+            }
             else if(sPDG==90000002)                        // A=2
-		          {
+            {
               fQPDG=nQPDG;
               rQPDG=nQPDG;
               f4Mom=G4LorentzVector(0.,0.,0.,mNeut);
               g4Mom=f4Mom;
-		          }
+            }
             else if(sPDG==90002000)
-		          {
+            {
               fQPDG=pQPDG;
               rQPDG=pQPDG;
               f4Mom=G4LorentzVector(0.,0.,0.,mProt);
               g4Mom=f4Mom;
-		          }
+            }
             else if(sPDG==92000000)
-		          {
+            {
               fQPDG=lQPDG;
               rQPDG=lQPDG;
@@ -5308,5 +5469,5 @@
               g4Mom=f4Mom;
               if(sM>mSigZ+mSigZ)             // Sigma0+Sigma0 is possible
-			           {                                  // @@ Only two particles PS is used
+              {                                  // @@ Only two particles PS is used
                 G4double sma=mLamb+mLamb;        // Lambda+Lambda sum
                 G4double pr1=0.;                 // Prototype to avoid sqrt(-)
@@ -5334,5 +5495,5 @@
               }
               else if(sM>mSigZ+mLamb)            // Lambda+Sigma0 is possible
-			           {                                  // @@ Only two particles PS is used
+              {                                  // @@ Only two particles PS is used
                 G4double sma=mLamb+mLamb;        // Lambda+Lambda sum
                 G4double pr1=0.;                 // Prototype to avoid sqrt(-)
@@ -5348,7 +5509,7 @@
                 }                                //
               }                                  //
-		          }
+            }
             else if(sPDG==89999003)                       // A=2
-		          {
+            {
               hQPDG=nQPDG;
               rQPDG=nQPDG;
@@ -5358,7 +5519,7 @@
               f4Mom=G4LorentzVector(0.,0.,0.,mPi);
               three=true;
-		          }
+            }
             else if(sPDG==90002999)
-		          {
+            {
               hQPDG=pQPDG;
               rQPDG=pQPDG;
@@ -5368,7 +5529,7 @@
               f4Mom=G4LorentzVector(0.,0.,0.,mPi);
               three=true;
-		          }
+            }
             else if(sPDG==90000003)                        // A=3
-		          {
+            {
               hQPDG=nQPDG;
               rQPDG=nQPDG;
@@ -5378,7 +5539,7 @@
               f4Mom=G4LorentzVector(0.,0.,0.,mNeut);
               three=true;
-		          }
+            }
             else if(sPDG==90003000)
-		          {
+            {
               hQPDG=pQPDG;
               rQPDG=pQPDG;
@@ -5388,35 +5549,35 @@
               f4Mom=G4LorentzVector(0.,0.,0.,mProt);
               three=true;
-		          }
+            }
             else if(sPDG==90001003)                     // A=4
-		          {
+            {
               rQPDG=nQPDG;
               fQPDG=tQPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mNeut);
               f4Mom=G4LorentzVector(0.,0.,0.,mTrit);
-		          }
+            }
             else if(sPDG==90003001)
-		          {
+            {
               rQPDG=pQPDG;
               fQPDG=he3QPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mProt);
               f4Mom=G4LorentzVector(0.,0.,0.,mHe3);
-		          }
+            }
             else if(sPDG==90002003)                     // A=5
-		          {
+            {
               rQPDG=nQPDG;
               fQPDG=aQPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mNeut);
               f4Mom=G4LorentzVector(0.,0.,0.,mAlph);
-		          }
+            }
             else if(sPDG==90003002)
-		          {
+            {
               rQPDG=pQPDG;
               fQPDG=aQPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mProt);
               f4Mom=G4LorentzVector(0.,0.,0.,mAlph);
-		          }
+            }
             else if(sPDG==90004002)                          // A=6
-		          {
+            {
               hQPDG=pQPDG;
               rQPDG=pQPDG;
@@ -5426,28 +5587,28 @@
               f4Mom=G4LorentzVector(0.,0.,0.,mAlph);
               three=true;
-		          }
+            }
             else if(sPDG==90002005)                        // A=7
-		          {
+            {
               rQPDG=nQPDG;
               fQPDG=a6QPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mNeut);
               f4Mom=G4LorentzVector(0.,0.,0.,mHe6);
-		          }
+            }
             else if(sPDG==90005002)
-		          {
+            {
               rQPDG=pQPDG;
               fQPDG=be6QPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mProt);
               f4Mom=G4LorentzVector(0.,0.,0.,mBe6);
-		          }
+            }
             else if(sPDG==90004004)                        // A=8
-		          {
+            {
               fQPDG=aQPDG;
               rQPDG=aQPDG;
               f4Mom=G4LorentzVector(0.,0.,0.,mAlph);
               g4Mom=f4Mom;
-		          }
+            }
             //else if(sPDG==90006002)
-		          //{
+            //{
             //  hQPDG=pQPDG;
             //  rQPDG=pQPDG;
@@ -5457,7 +5618,7 @@
             //  f4Mom=G4LorentzVector(0.,0.,0.,mBe6);
             //  three=true;
-		          //}
+            //}
             //else if(sPDG==90002006)
-		          //{
+            //{
             //  hQPDG=nQPDG;
             //  rQPDG=nQPDG;
@@ -5467,14 +5628,14 @@
             //  f4Mom=G4LorentzVector(0.,0.,0.,mHe6);
             //  three=true;
-		          //}
+            //}
             else if(sPDG==90002007)                      // A=9
-		          {
+            {
               rQPDG=nQPDG;
               fQPDG=a8QPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mNeut);
               f4Mom=G4LorentzVector(0.,0.,0.,mHe8);
-		          }
+            }
             else if(sPDG==90005004)                      // A=9
-		          {
+            {
               rQPDG=pQPDG;
               fQPDG=aQPDG;
@@ -5484,14 +5645,14 @@
               t4Mom=G4LorentzVector(0.,0.,0.,mAlph);
               three=true;
-		          }
+            }
             else if(sPDG==90007002)                      // A=9
-		          {
+            {
               rQPDG=pQPDG;
               fQPDG=c8QPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mProt);
               f4Mom=G4LorentzVector(0.,0.,0.,mC8);
-		          }
+            }
             else if(sPDG==90008004)                      // A=12
-		          {
+            {
               hQPDG=pQPDG;
               rQPDG=pQPDG;
@@ -5501,21 +5662,21 @@
               f4Mom=G4LorentzVector(0.,0.,0.,mC10);
               three=true;
-		          }
+            }
             else if(sPDG==90009006)                     // A=15
-		          {
+            {
               rQPDG=pQPDG;
               fQPDG=o14QPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mProt);
               f4Mom=G4LorentzVector(0.,0.,0.,mO14);
-		          }
+            }
             else if(sPDG==90009007)                     // A=16
-		          {
+            {
               rQPDG=pQPDG;
               fQPDG=o15QPDG;
               g4Mom=G4LorentzVector(0.,0.,0.,mProt);
               f4Mom=G4LorentzVector(0.,0.,0.,mO15);
-		          }
+            }
             else if(sPDG==90010006)                     // A=16
-		          {
+            {
               hQPDG=pQPDG;
               rQPDG=pQPDG;
@@ -5525,5 +5686,5 @@
               f4Mom=G4LorentzVector(0.,0.,0.,mO14);
               three=true;
-		          }
+            }
 #ifdef pdebug
             G4cout<<"G4QE::FSI: "<<three<<",r="<<rQPDG<<",f="<<fQPDG<<",t="<<hQPDG<<G4endl;
@@ -5538,5 +5699,5 @@
               }
               else
-			           {
+              {
 #ifdef pdebug
                 G4cout<<"G4QE::FSI:*FUSION IS DONE*,fPDG="<<sPDG<<",PDG1="<<hPDG<<",PDG2="
@@ -5552,5 +5713,5 @@
 #endif
               }
-		          }
+            }
             else
             {
@@ -5562,5 +5723,5 @@
               }
               else
-			           {
+              {
 #ifdef pdebug
                 G4cout<<"G4QE::FSI:DONE,n="<<nHadr<<",PDG="<<sPDG<<",1="<<hPDG<<",2="<<bPDG
@@ -5582,5 +5743,5 @@
 #endif
               }
-		          }
+            }
             tot4Mom+=b4m;                       // Instead of the fused hadron
             tot4Mom-=g4Mom;                     // subtract from the total the new hadron
@@ -5593,5 +5754,5 @@
             hB=hQC.GetBaryonNumber();
             hGSM = hQPDG.GetMass();
-		          h4m=f4Mom;
+            h4m=f4Mom;
             hM=h4m.m();
             // End of Instead ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -5599,7 +5760,7 @@
             G4cout<<"G4QE::FSI:cH4M="<<curHadr->Get4Momentum()<<G4endl;
 #endif
-		        } // End of the fusion check
-	       } // End of the LOOP over previous hadrons
-	     } // End of the FUSION check
+          } // End of the fusion check
+        } // End of the LOOP over previous hadrons
+      } // End of the FUSION check
 #ifdef chdebug
       // *** (2) Charge Control Sum Calculation for the Charge Conservation Check ***
@@ -5628,5 +5789,5 @@
       tot4Mom-=cH4Mom;                          // Reduce theTotal 4mom by theCurrent 4mom
       if(hadron+1==nHadr)                       // The Last Hadron in the set
-	     {
+      {
         G4double re =tot4Mom.e();
         G4double rpx=tot4Mom.px();
@@ -5638,7 +5799,7 @@
         G4cout<<"G4QE::FSI: Is Energy&Mom conserved? t4M="<<tot4Mom<<",d2="<<dem<<G4endl;
 #endif
-		      //if(2>3)                                 //@@En/Mom conservation check is closed
+        //if(2>3)                                 //@@En/Mom conservation check is closed
         if(dem>0.0001)                          // Energy or momentum is not conserved
-	       {
+        {
 #ifdef pdebug
           if(dem>.1)
@@ -5647,7 +5808,7 @@
             G4LorentzVector cor4M(0.,0.,0.,mNeut);  // Prototype for the neutron
             if(dmo<0.0001 && re>900.)               // MomentumIsConserved - recoverMissing
-			         {
+            {
               if(fabs(re-mNeut)<.01)
-			           {
+              {
                 G4cout<<"...G4QE::FSI:E/M conservation is corrected by neutron"<<G4endl;
                 //cor4M=G4LorentzVector(0.,0.,0.,mNeut); // Made as a prototype
@@ -5655,6 +5816,6 @@
                 theQHadrons.push_back(theH);  // (delete equivalent for the proton)
               }
-			           else if(fabs(re-mProt)<.01)
-			           {
+              else if(fabs(re-mProt)<.01)
+              {
                 G4cout<<"...G4QE::FSI:E/M conservation is corrected by proton"<<G4endl;
                 cor4M=G4LorentzVector(0.,0.,0.,mProt);
@@ -5662,6 +5823,6 @@
                 theQHadrons.push_back(theH);  // (delete equivalent for the proton)
               }
-			           else if(fabs(re-mDeut)<.01)
-			           {
+              else if(fabs(re-mDeut)<.01)
+              {
                 G4cout<<"...G4QE::FSI:E/M conservation is corrected by deuteron"<<G4endl;
                 cor4M=G4LorentzVector(0.,0.,0.,mDeut);
@@ -5669,6 +5830,6 @@
                 theQHadrons.push_back(theH);  // (delete equivalent for the proton)
               }
-			           else if(fabs(re-mTrit)<.01)
-			           {
+              else if(fabs(re-mTrit)<.01)
+              {
                 G4cout<<"...G4QE::FSI:E/M conservation is corrected by tritium"<<G4endl;
                 cor4M=G4LorentzVector(0.,0.,0.,mTrit);
@@ -5676,6 +5837,6 @@
                 theQHadrons.push_back(theH);  // (delete equivalent for the proton)
               }
-			           else if(fabs(re-mHe3)<.01)
-			           {
+              else if(fabs(re-mHe3)<.01)
+              {
                 G4cout<<"...G4QE::FSI:E/M conservation is corrected by He3"<<G4endl;
                 cor4M=G4LorentzVector(0.,0.,0.,mHe3);
@@ -5683,6 +5844,6 @@
                 theQHadrons.push_back(theH);  // (delete equivalent for the proton)
               }
-			           else if(fabs(re-mAlph)<.01)
-			           {
+              else if(fabs(re-mAlph)<.01)
+              {
                 G4cout<<"...G4QE::FSI:E/M conservation is corrected by alpha"<<G4endl;
                 cor4M=G4LorentzVector(0.,0.,0.,mAlph);
@@ -5690,6 +5851,6 @@
                 theQHadrons.push_back(theH);  // (delete equivalent for the proton)
               }
-			           else if(fabs(re-mNeut-mNeut)<.01)
-			           {
+              else if(fabs(re-mNeut-mNeut)<.01)
+              {
                 cor4M=G4LorentzVector(0.,0.,0.,mNeut+mNeut);
                 G4cout<<"...G4QE::FSI:E/M conservation is corrected by 2 neutrons"<<G4endl;
@@ -5699,6 +5860,6 @@
                 theQHadrons.push_back(theH2); // (delete equivalent for the proton)
               }
-			           else if(fabs(re-mProt-mProt)<.01)
-			           {
+              else if(fabs(re-mProt-mProt)<.01)
+              {
                 G4cout<<"...G4QE::FSI:E/M conservation is corrected by 2 protons"<<G4endl;
                 cor4M=G4LorentzVector(0.,0.,0.,mProt+mProt);
@@ -5708,6 +5869,6 @@
                 theQHadrons.push_back(theH2); // (delete equivalent for the proton)
               }
-			           else throw G4QException("***G4QEnv::FSInteract: Increase theCorrectionEps");
-			         }
+              else throw G4QException("***G4QEnv::FSInteract: Increase theCorrectionEps");
+            }
             else
             {
@@ -5735,5 +5896,5 @@
           G4double totRM=tot4Mom.m();
           if(cHM+pHM<=totRM)                  // *** Make the final correction ***
-		        {
+          {
             if(!G4QHadron(tot4Mom).DecayIn2(pH4Mom,cH4Mom))
             {
@@ -5801,5 +5962,5 @@
     G4cout<<"G4QE::FSI:===Before Gamma Compression===, nH="<<nHadr<<",frag="<<frag<<G4endl;
 #endif
-	   if(nHadr>2 && frag) for(G4int h=nHadr-1; h>=0; h--)//Collect gammas & kill DecayedHadrs
+    if(nHadr>2 && frag) for(G4int h=nHadr-1; h>=0; h--)//Collect gammas & kill DecayedHadrs
     {
       G4QHadron* curHadr = theQHadrons[h];    // Get a pointer to the current Hadron
@@ -5809,8 +5970,8 @@
         G4cout<<"---Warning---G4QEnv::FSI:nD-/pD++(1)="<<hPDG<<G4endl;
 #ifdef pdebug
-	     G4cout<<"G4QE::FSI: h#"<<h<<", hPDG="<<hPDG<<", hNFrag="<<hF<<G4endl;
-#endif
-	     if(hF||hPDG==22)                        // It should be compressed
-	     {
+      G4cout<<"G4QE::FSI: h#"<<h<<", hPDG="<<hPDG<<", hNFrag="<<hF<<G4endl;
+#endif
+      if(hF||hPDG==22)                        // It should be compressed
+      {
         G4QHadron* theLast = theQHadrons[theQHadrons.size()-1];//Get Ptr to the Last Hadron
         if(hPDG==22)
@@ -5820,5 +5981,5 @@
         }
         if(h<static_cast<G4int>(theQHadrons.size())-1) // Need swap with the Last
-	       {
+        {
           curHadr->SetNFragments(0);
           curHadr->Set4Momentum(theLast->Get4Momentum());
@@ -5827,12 +5988,12 @@
           else curHadr->SetQC(theLast->GetQC());// CurHadrPDG instead of LastHadrPDG
 #ifdef pdebug
-	         G4cout<<"G4QE::FSI: Exchange with the last is done"<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QE::FSI: Exchange with the last is done"<<G4endl;
+#endif
+        }
         theQHadrons.pop_back();               // theLastQHadron is excluded from QHadrons
         delete theLast;//!!When kill,DON'T forget to delete theLastQHadron as an instance!!
         nHadr--;
 #ifdef pdebug
-	       G4cout<<"G4QE::FSI: The last is compessed"<<G4endl;
+        G4cout<<"G4QE::FSI: The last is compessed"<<G4endl;
 #endif
       }
@@ -5849,5 +6010,5 @@
         ccContSum+=theQHadrons[ic4]->GetCharge();
         cbContSum+=theQHadrons[ic4]->GetBaryonNumber();
-	   }
+    }
     if(ccContSum-chContSum || cbContSum-bnContSum)
     {
@@ -5872,5 +6033,5 @@
 #endif
       if(lB<hB)                               // Must be swapped
-	     {
+      {
         G4QPDGCode   hQPDG = curHadr->GetQPDG();
         G4LorentzVector h4m= curHadr->Get4Momentum();
@@ -5881,5 +6042,5 @@
         theLast->Set4Momentum(h4m);
         theLast->SetQPDG(hQPDG);
-	     }
+      }
     }
     nHadr=theQHadrons.size();
@@ -5922,7 +6083,7 @@
         //G4double mGamEva=2700.;             // @@Threshold for the evaporation
         G4double mGamEva=1700.;               // @@Threshold for the evaporation
-	       if(exResidN.SplitBaryon())
-	       //if(2>3)                             //CloseTheFirstPriorityResN+gamSumEvaporation
-	       {
+        if(exResidN.SplitBaryon())
+        //if(2>3)                             //CloseTheFirstPriorityResN+gamSumEvaporation
+        {
           theNew->Set4Momentum(exRes4M);      // Icrease 4Mom of theLast by "sum" to Evapor
 #ifdef ffdebug
@@ -5932,5 +6093,5 @@
         }
         else if(theNew->GetPDGCode()==90002002&&exRes4M.m()>mHe3+mNeut&&G4UniformRand()>.5)
-	       {
+        {
           theNew->Set4Momentum(exRes4M);      // Icrease 4Mom of theLast by "sum" to Evapor
           G4LorentzVector n4M(0.,0.,0.,mNeut);
@@ -5950,7 +6111,7 @@
           theQHadrons.push_back(theHe3);      // (delete equivalent for the proton)
         }
-	       else if(nHadr)                        // Get LastHadrBefResNuc, absorb gam & decay
-	       //else if(2>3)                        // Close the pair absorbtion of gamma
-	       {
+        else if(nHadr)                        // Get LastHadrBefResNuc, absorb gam & decay
+        //else if(2>3)                        // Close the pair absorbtion of gamma
+        {
           if(nHadr>1)for(unsigned sh=0; sh<theQHadrons.size()-1; sh++)//Ord:MinE is TheLast
           {
@@ -5970,5 +6131,5 @@
 #endif
             if(hM>mGamEva&&lT>hT)             // Must be swapped as the current is smaller
-	           {
+            {
               G4QPDGCode   hQPDG = curHadr->GetQPDG();
               curHadr->Set4Momentum(l4M);
@@ -5978,5 +6139,5 @@
               thePrev->Set4Momentum(h4M);
               thePrev->SetQPDG(hQPDG);
-	           }
+            }
           }
           nHadr=theQHadrons.size();
@@ -5996,5 +6157,5 @@
             G4double dhM=dh4M.m();            // M of LH+PH+sum(gammas) for theDecay
             if(theHad->GetPDGCode()==90001001&&dhM>n4M.m()+mProt+mNeut&&G4UniformRand()>.5)
-		          //if(2>3)                           // Close Possibility toSplitDeuteron
+            //if(2>3)                           // Close Possibility toSplitDeuteron
             {
               G4double nuM=n4M.m();
@@ -6039,7 +6200,7 @@
               EvaporateResidual(theNew);      // Try to evaporate theResNuc (del.eq.)
             }
-	         }
+          }
           else
-	         {
+          {
             theNew->Set4Momentum(exRes4M);    // Icrease 4MomOfTheLast by "sum" for Evapor
 #ifdef ffdebug
@@ -6049,6 +6210,6 @@
           }
         }
-	       else                            // Absorb gammas to theResidNucleus and evaporateIt
-	       {
+        else                            // Absorb gammas to theResidNucleus and evaporateIt
+        {
           theNew->Set4Momentum(exRes4M);// Icrease 4Mom of the Last by the "sum" for Evap
           EvaporateResidual(theNew);    // Try to evaporate the Nucl.(@@DecDib)(delete eq.)
@@ -6058,5 +6219,5 @@
           G4cout<<"G4QE::FSI:AfterEvaporation: nNew="<<nHN<<G4endl;
           if(nHN>nHadr)for(unsigned idp=nHadr; idp<nHN; idp++)
-		        G4cout<<"G4QE::FSI: h#"<<idp<<", PDG="<<theQHadrons[idp]->GetPDGCode()<<G4endl;
+          G4cout<<"G4QE::FSI: h#"<<idp<<", PDG="<<theQHadrons[idp]->GetPDGCode()<<G4endl;
 #endif
         }
@@ -6108,5 +6269,5 @@
         maxB=ipo;
       }                                           // the current biggest nuclear fragment
-	   }
+    }
   }
 #ifdef pdebug
@@ -6157,10 +6318,10 @@
 #endif
       if(hPDG==22)                                // Photon is foun on the "gp" position
-	     {
+      {
         gamSum=gamSum+theCurr->Get4Momentum();    // Accumulate the 4Momenta of the photon
         unsigned nLast=nHadr-1;                   // position of theLastHadron (gp<nHadr-1)
         G4QHadron* theLast = theQHadrons[nLast];  // Pointer to the Last Hadron
         while(nLast>gp && theLast->GetPDGCode()==22) // "TheLast is a photon too" LOOP
-								{
+        {
           gamSum=gamSum+theLast->Get4Momentum();  // Accumulate 4-momentum of theLastPhoton
           theQHadrons.pop_back();                 // Pnt to theLastHadr.is excluded from HV
@@ -6183,10 +6344,10 @@
 #endif
         }
-	     }
+      }
     }
     // @@ Now it is necessary to try to emit alpha or evaporate the residual nucleus
     G4QHadron* theLast = theQHadrons[nHadr-1];   // Pointer to the Last Hadron
     if(theLast->GetPDGCode()==22)
-	   {
+    {
       gamSum=gamSum+theLast->Get4Momentum();     // Accumulate 4-momentum of the LastPhoton
       theQHadrons.pop_back();                    // Pnt to theLastHadr.is excluded from HV
@@ -6197,8 +6358,8 @@
 #endif
       theLast = theQHadrons[nHadr-1];
-	   }
+    }
     G4int nEx=nHadr-2;                           // position to be exchanged with theLast
     while(theLast->GetBaryonNumber()<1 && nEx>=0)// theLastHadron must be a nucleus (A>0)
-				{
+    {
       G4QHadron* theEx=theQHadrons[nEx];         // A hadron to be exchanged with theLast
       G4LorentzVector ex4Mom=theEx->Get4Momentum();
@@ -6221,10 +6382,10 @@
     G4double tRM=tR4M.m();                       // TotMass of theResidualNucleus to decay
     if(theLB>4)
-	   {
-	     G4QContent lrQC=curHadr->GetQC()-G4QContent(6,6,0,0,0,0);
+    {
+      G4QContent lrQC=curHadr->GetQC()-G4QContent(6,6,0,0,0,0);
       G4QNucleus lrN(lrQC);
       G4double lrM=lrN.GetMZNS();
       if(tRM>lrM+mAlph)
-	     {
+      {
         G4LorentzVector lr4M(0.,0.,0.,lrM);
         G4LorentzVector al4M(0.,0.,0.,mAlph);
@@ -6236,8 +6397,8 @@
           G4cout<<"G4QE::FSI: After Evap (1) nH="<<theQHadrons.size()<<G4endl;
 #endif
-	       }
+        }
         else
         {
-		        delete curHadr;
+          delete curHadr;
           G4int APDG=lrN.GetPDG();
 #ifdef pdebug
@@ -6257,5 +6418,5 @@
         G4cout<<"G4QE::FSI: After Evap (2) nH="<<theQHadrons.size()<<G4endl;
 #endif
-	     }
+      }
     }
     else
@@ -6266,5 +6427,5 @@
       G4cout<<"G4QE::FSI: After Evap (5) nH="<<theQHadrons.size()<<G4endl;
 #endif
-	   }
+    }
   }
   //Now just fill the output theFravment vector (User is responsible to ClearAndDestroy it)
@@ -6342,5 +6503,5 @@
       G4double sum=mNucl+mPion+mSi;
       if(hPDG==90998003&&reM<sum)                      // Default -- values
-	     {
+      {
         PDGsi=2112;
         mSi=mNeut;
@@ -6350,5 +6511,5 @@
       }
       if(hPDG==91002998)                      // Change -- default values to +++ values
-	     {
+      {
         mNucl=mProt;
         PDGnu=2212;
@@ -6358,5 +6519,5 @@
         sum=mNucl+mPion+mSi;
         if(reM<sum)
-	       {
+        {
           PDGsi=2212;
           mSi=mProt;
@@ -6368,5 +6529,5 @@
       G4LorentzVector k4M(0.,0.,0.,mSi);
       if(fabs(reM-sum)<eps)
-	     {
+      {
         //G4cout<<"G4QE::FSI:*TMP* PiDelta split PDG="<<hPDG<<G4endl;//To find out why?
         n4M=r4M*(mNucl/sum);
@@ -6387,5 +6548,5 @@
             G4QPDGCode lQP=theLast->GetQPDG();         // The QPDG of the last
             if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); //CurHadr instead of PrevHadr
-            else curHadr->SetQC(theLast->GetQC());       // CurHadrPDG instead of LastHadrPDG
+            else curHadr->SetQC(theLast->GetQC());     // CurHadrPDG instead of LastHadrPDG
             curHadr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution
           }
@@ -6407,5 +6568,5 @@
               G4int hpPDG=cpHadr->GetPDGCode();
               G4LorentzVector hpLV=cpHadr->Get4Momentum();
-		      G4cout<<"G4QE::FSI:h#"<<hp<<": hPDG="<<hpPDG<<", h4M="<<hpLV<<G4endl;
+        G4cout<<"G4QE::FSI:h#"<<hp<<": hPDG="<<hpPDG<<", h4M="<<hpLV<<G4endl;
             }
 #endif
@@ -6415,5 +6576,5 @@
           delete quasH;
           fOK=false;
-		      }
+        }
         else
         {
@@ -6434,5 +6595,5 @@
         curHadr->SetQPDG(G4QPDGCode(PDGnu));// At least one nucleun always exists
         if(dub)
-		      {
+        {
           p4M/=2.;
           G4QHadron* Pid = new G4QHadron(PDGpi,p4M); // Create a Hadron for the pion
@@ -6449,5 +6610,5 @@
     }
     else if(hPDG==89998003||hPDG==90002998)   // Isonucleus (pi- + DEL- or pi+ + DEL++)
-	   {                                         // @@ can be converted here to B>1
+    {                                         // @@ can be converted here to B>1
       //G4cout<<"G4QE::FSI:*TMP* PiDelta decay PDG="<<hPDG<<G4endl;//To find out why?
       G4double mNucl=mNeut;
@@ -6455,5 +6616,5 @@
       G4int PDGpi=-211;
       if(hPDG==90002998)                      // Change DEL- default values to DEL++ values
-	     {
+      {
         mNucl=mProt;
         PDGnu=2212;
@@ -6468,5 +6629,5 @@
       G4double sum=mNucl+mPi+mPi;
       if(fabs(reM-sum)<eps)
-	     {
+      {
         //G4cout<<"G4QE::FSI:*TMP* PiDelta split PDG="<<hPDG<<G4endl;//To find out why?
         n4M=r4M*(mNucl/sum);
@@ -6487,5 +6648,5 @@
             G4QPDGCode lQP=theLast->GetQPDG();         // The QPDG of the last
             if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); //CurHadr instead of PrevHadr
-            else curHadr->SetQC(theLast->GetQC());       // CurHadrPDG instead of LastHadrPDG
+            else curHadr->SetQC(theLast->GetQC());     // CurHadrPDG instead of LastHadrPDG
             curHadr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution
           }
@@ -6506,5 +6667,5 @@
           delete quasH;
           fOK=false;
-		      }
+        }
         else
         {
@@ -6534,5 +6695,5 @@
     }
     else if(hBN>0 && !hST && (hCG<0||hCG>hBN)) // Isonucleus (n*N+k*DEL- or n*P+k*DEL++)
-	   {
+    {
       G4double mNucl=mNeut;
       G4int PDGnu=2112;
@@ -6540,5 +6701,5 @@
       G4int nPi=-hCG;                         // Prototype of the minimum number of pions
       if(hCG>0)                               // Change DEL- default values to DEL++ values
-	     {
+      {
         mNucl=mProt;
         PDGnu=2212;
@@ -6554,5 +6715,5 @@
       G4double sum=nucM+pioM;
       if(fabs(reM-sum)<eps)
-	     {
+      {
         n4M=r4M*(nucM/sum);
         k4M=r4M*(pioM/sum);
@@ -6575,5 +6736,5 @@
             G4QPDGCode lQP=theLast->GetQPDG();         // The QPDG of the last
             if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); //CurHadr instead of PrevHadr
-            else curHadr->SetQC(theLast->GetQC());       // CurHadrPDG instead of LastHadrPDG
+            else curHadr->SetQC(theLast->GetQC());     // CurHadrPDG instead of LastHadrPDG
             curHadr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution
           }
@@ -6596,5 +6757,5 @@
               G4int hpPDG=cpHadr->GetPDGCode();
               G4LorentzVector hpLV=cpHadr->Get4Momentum();
-		            G4cout<<"G4QE::FSI:h#"<<hp<<": hPDG="<<hpPDG<<", h4M="<<hpLV<<G4endl;
+              G4cout<<"G4QE::FSI:h#"<<hp<<": hPDG="<<hpPDG<<", h4M="<<hpLV<<G4endl;
             }
 #endif
@@ -6604,5 +6765,5 @@
           delete quasH;                          // TemporaryQuasmon is used for recovery
           fOK=false;
-		      }
+        }
         else
         {
@@ -6619,5 +6780,5 @@
         G4cout<<"G4QE::FSI:IsoN==>"<<r4M<<"->N="<<PDGnu<<n4M<<"+Pi="<<PDGpi<<k4M<<G4endl;
 #endif
-		      if(hBN>1) n4M/=hBN;                    // Calculate the 4mom per one nucleon
+        if(hBN>1) n4M/=hBN;                    // Calculate the 4mom per one nucleon
         curHadr->Set4Momentum(n4M);
         curHadr->SetQPDG(G4QPDGCode(PDGnu));   // At least one nucleun always exists
@@ -6666,5 +6827,5 @@
       }
     else if(hST<0 && hBN>0) // AntistrangeNucleus (@@ see above, already done)
-	   {
+    {
       G4LorentzVector r4M=curHadr->Get4Momentum(); // Real 4-mom of theAntiStrangeNucleus
       G4double reM=r4M.m();              // Real mass of the antiStrange nucleus
@@ -6686,15 +6847,15 @@
       G4double sum=mR+mKaon;
       if(sum>reM)                        // for GEANT4 (Can not decay in kaon and residual)
-	     {
+      {
         if(kPDG==321)                    // *** Very seldom *** "K+->pi+ conversion"
-		      {
+        {
           kPDG=211;
           mKaon=mPi;
-		      }
+        }
         else                             // *** Very seldom *** "K0(S=-1)->pi- conversion"
-		      {
+        {
           kPDG=111;
           mKaon=mPi0;
-		      }
+        }
         sum=mR+mKaon;
       }
@@ -6702,5 +6863,5 @@
       G4LorentzVector k4M(0.,0.,0.,mKaon);
       if(fabs(reM-sum)<eps)
-	     {
+      {
         n4M=r4M*(mR/sum);
         k4M=r4M*(mKaon/sum);
@@ -6719,5 +6880,5 @@
             G4QPDGCode lQP=theLast->GetQPDG();         // The QPDG of the last
             if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); //CurHadr instead of PrevHadr
-            else curHadr->SetQC(theLast->GetQC());       // CurHadrPDG instead of LastHadrPDG
+            else curHadr->SetQC(theLast->GetQC());     // CurHadrPDG instead of LastHadrPDG
             curHadr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution
           }
@@ -6738,5 +6899,5 @@
           delete quasH;
           fOK=false;
-		      }
+        }
         else
         {
@@ -6757,6 +6918,6 @@
     }
     else if(hPDG>90500000&&hPDG!=91000000&&hPDG!=91000999&&hPDG!=90999001) // Only for G4
-	// @@ Xi & Omega- can be added here ^^^, if show up below
-	   {
+ // @@ Xi & Omega- can be added here ^^^, if show up below
+    {
 #ifdef pdebug
       G4cout<<"***G4QEnvironment::FSI:*G4* Hypernucleus PDG="<<hPDG<<" must decay"<<G4endl;
@@ -6768,12 +6929,12 @@
       G4int nSP=0;                             // A#0f unavoidable Sigma+
       if(nC<0)                                 // Negative hypernucleus
-	     {
+      {
         if(-nC<=nL)
-		      {
+        {
           nSM=-nC;                             // Can be compensated by Sigma-
           nL+=nC;                              // Reduce the residual strangeness
         }
         else
-		      {
+        {
           nSM=nL;                              // The maximum number of Sigma-
           nL=0;                                // Kill the residual strangeness
@@ -6781,7 +6942,7 @@
       }
       else if(nC>nB-nL)                        // Extra positive hypernucleus
-	     {
+      {
         if(nC<=nB)
-		      {
+        {
           G4int dH=nB-nC;
           nSP=nL-dH;                           // Can be compensated by Sigma+
@@ -6789,5 +6950,5 @@
         }
         else
-		      {
+        {
           nSP=nL;                              // The maximum number of Sigma+
           nL=0;                                // Kill the residual strangeness
@@ -6803,5 +6964,5 @@
 #endif
       if(nSP||nSM)
-	     {
+      {
         if(nL)
         {
@@ -6813,5 +6974,5 @@
         }
         if(nSP)
-		      {
+        {
           nL=nSP;
           sPDG=3222;
@@ -6819,5 +6980,5 @@
         }
         else
-		      {
+        {
           nL=nSM;
           sPDG=3112;
@@ -6831,5 +6992,5 @@
       G4double rlM=G4QNucleus(rlPDG).GetMZNS();// Mass of the new residualNonstrangeNucleus
       if(!nSP&&!nSM&&nL==1&&reM>rlM+mSigZ&&G4UniformRand()>.5) // Sigma0 @@ AddToHadroniz.?
-	     {
+      {
         sPDG=3212;
         MLa=mSigZ;
@@ -6840,5 +7001,5 @@
       // @@ Take into account that there can be Iso-Hypernucleus (Add PI+,R & Pi-,R decays)
       if(rlPDG==90000000)                      // Multy Hyperon (HyperNuc of only hyperons)
-	     {
+      {
         if(nL>1) r4M=r4M/nL;                   // split the 4-mom for the MultyLambda
         for(G4int il=0; il<nL; il++)           // loop over Lambdas
@@ -6848,11 +7009,11 @@
         }
       }
-	     else if(reM>rlM+MLa-eps)                  // Lambda(or Sigma) can be split
-	     {
+      else if(reM>rlM+MLa-eps)                  // Lambda(or Sigma) can be split
+      {
         G4LorentzVector n4M(0.,0.,0.,rlM);
         G4LorentzVector h4M(0.,0.,0.,MLa);
         G4double sum=rlM+MLa;
         if(fabs(reM-sum)<eps)
-	       {
+        {
           n4M=r4M*(rlM/sum);
           h4M=r4M*(MLa/sum);
@@ -6869,5 +7030,5 @@
         curHadr->SetQPDG(G4QPDGCode(rlPDG));   // converted hypernucleus
         if(rlPDG==90000002)                    // Additional action with curHadr change
-	       {
+        {
           G4LorentzVector newLV=n4M/2.;
           curHadr->Set4Momentum(newLV);
@@ -6877,5 +7038,5 @@
         }
         else if(rlPDG==90002000)               // Additional action with curHadr change
-	       {
+        {
           G4LorentzVector newLV=n4M/2.;
           curHadr->Set4Momentum(newLV);
@@ -6895,6 +7056,6 @@
         }
       }
-	     else if(reM>rnM+mPi0-eps&&!nSP&&!nSM)    // Lambda->N only if Sigmas are absent
-	     {
+      else if(reM>rnM+mPi0-eps&&!nSP&&!nSM)    // Lambda->N only if Sigmas are absent
+      {
         G4int nPi=static_cast<G4int>((reM-rnM)/mPi0);
         if (nPi>nL) nPi=nL;
@@ -6904,5 +7065,5 @@
         G4double sum=rnM+npiM;
         if(fabs(reM-sum)<eps)
-	       {
+        {
           n4M=r4M*(rnM/sum);
           h4M=r4M*(npiM/sum);
@@ -6926,5 +7087,5 @@
         }
         if(rnPDG==90000002)                    // Additional action with curHadr change
-	       {
+        {
           G4LorentzVector newLV=n4M/2.;
           curHadr->Set4Momentum(newLV);
@@ -6935,5 +7096,5 @@
         }
         else if(rnPDG==90002000)               // Additional action with curHadr change
-	       {
+        {
           G4LorentzVector newLV=n4M/2.;
           curHadr->Set4Momentum(newLV);
@@ -6945,18 +7106,56 @@
         // @@ Add multybaryon decays if necessary
       }
-      else // If this Excepton shows up (lowProbable appearance) => include gamma decay
-	     {
+      else if(reM>rnM-eps)    // Decay in nonstange and gamma
+      {
+        G4LorentzVector n4M(0.,0.,0.,rnM);
+        G4LorentzVector h4M(0.,0.,0.,0.);
+        G4double sum=rnM;
+        if(fabs(reM-sum)<eps) n4M=r4M;
+        else if(reM<sum || !G4QHadron(r4M).DecayIn2(n4M,h4M))
+        {
+          G4cerr<<"***G4QE::FSI:Hypern, M="<<reM<<"<A+n*Pi0="<<sum<<",d="<<sum-reM<<G4endl;
+          throw G4QException("***G4QEnvironment::FSInter: Hypernuclear gamma decay error");
+        }
+        curHadr->Set4Momentum(n4M);
+        curHadr->SetQPDG(G4QPDGCode(rnPDG));   // converted hypernucleus
+#ifdef fdebug
+        G4cout<<"*G4QE::FSI:HypNg "<<r4M<<"->A="<<rnPDG<<n4M<<",gamma="<<h4M<<G4endl;
+#endif
+        G4QHadron* theGamma = new G4QHadron(22,h4M);// Make a New Hadr for the gamma
+        theQHadrons.push_back(theGamma);      // (del.eq.- user is responsible for del)
+        if(rnPDG==90000002)                   // Additional action with curHadr change
+        {
+          G4LorentzVector newLV=n4M/2.;
+          curHadr->Set4Momentum(newLV);
+          curHadr->SetQPDG(G4QPDGCode(90000001));
+          G4QHadron* secHadr = new G4QHadron(curHadr);
+          theQHadrons.push_back(secHadr);     // (del.eq.- user is responsible for del)
+          //theFragments->push_back(secHadr);   // (del.eq.- user is responsible for del)
+        }
+        else if(rnPDG==90002000)              // Additional action with curHadr change
+        {
+          G4LorentzVector newLV=n4M/2.;
+          curHadr->Set4Momentum(newLV);
+          curHadr->SetQPDG(G4QPDGCode(90001000));
+          G4QHadron* secHadr = new G4QHadron(curHadr);
+          theQHadrons.push_back(secHadr);    // (del.eq.- user is responsible for del)
+          //theFragments->push_back(secHadr);    // (del.eq.- user is responsible for del)
+        }
+        // @@ Add multybaryon decays if necessary
+      }
+      else // If this Error shows up (lowProbable appearance) => now it is left as is
+      {
         G4double d=rlM+MLa-reM;
-		G4cerr<<"G4QE::FSI:R="<<rlM<<",S+="<<nSP<<",S-="<<nSM<<",L="<<nL<<",d="<<d<<G4endl;
+        G4cerr<<"G4QE::FSI:R="<<rlM<<",S+="<<nSP<<",S-="<<nSM<<",L="<<nL<<",d="<<d<<G4endl;
         d=rnM+mPi0-reM;
-		G4cerr<<"***G4QE::FSI: HypN="<<hPDG<<", M="<<reM<<"<"<<rnM+mPi0<<",d="<<d<<G4endl;
-        throw G4QException("G4QEnvironment::FSInteract: Hypernuclear conversion");
+        G4cerr<<"***G4QE::FSI: HypN="<<hPDG<<", M="<<reM<<"<"<<rnM+mPi0<<",d="<<d<<G4endl;
+        //throw G4QException("G4QEnvironment::FSInteract: Hypernuclear conversion");
       }
     }
     //unsigned nHd=theQHadrons.size()-1;
     //if(hd==nHd && !fOK)
-	//{
+    //{
     //  G4cout<<"---Warning---G4QE::FSI: The Last #"<<hd<<" hadron must be filled"<<G4endl;
-	//  fOK=true;
+    //  fOK=true;
     //  curHadr = new G4QHadron(theQHadrons[hd]);
     //}
@@ -6997,5 +7196,5 @@
         curHadr->SetQPDG(G4QPDGCode(bPDG)); // Substitute Multibaryon by a baryon
         for (G4int ib=1; ib<brn; ib++)
-		      {
+        {
           G4QHadron* bH = new G4QHadron(bPDG, sp4m);
          theFragments->push_back(bH);     //(del eq. - user is responsible for deleting)
@@ -7163,9 +7362,9 @@
   {
     if(!theLC)                  // Neutron like: n+gam, n+Pi0, p+Pi- are possible
-				{
+    {
       if(qM<mNPi0)              // Only n+gamma decay is possible
-						{
+      {
         if(fabs(qM-mNeut)<eps)
-								{
+        {
 #ifdef pdebug
           G4cout<<"G4QEnv::DecayBaryon: Fill Neutron AsIs"<<G4endl;
@@ -7180,5 +7379,5 @@
       }
       else if(qM>mPPi)          // Both n+pi0 (p=2/3) & p+Pi- (p=1/3) are possible
-						{
+      {
         if(G4UniformRand()>.333333333) // Clebsh value for the Isobar decay
         {
@@ -7192,5 +7391,5 @@
         }
       }
-						else                      // Only n+Pi0 decay is possible
+      else                      // Only n+Pi0 decay is possible
       {
         fQPDG=nQPDG;            // Baryon is neutron
@@ -7199,9 +7398,9 @@
     }
     else if(theLC==1)           // Proton like: p+gam, p+Pi0, n+Pi+ are possible
-				{
+    {
       if(qM<mPPi0)              // Only p+gamma decay is possible
-						{
+      {
         if(fabs(qM-mProt)<eps)
-								{
+        {
 #ifdef pdebug
           G4cout<<"G4QEnv::DecayBaryon: Fill Proton AsIs"<<G4endl;
@@ -7214,5 +7413,5 @@
       }
       else if(qM>mNPi)          // Both p+pi0 (p=2/3) & n+Pi+ (p=1/3) are possible
-						{
+      {
         if(G4UniformRand()<.333333333) // Clebsh value for the Isobar decay
         {
@@ -7227,12 +7426,12 @@
     }
     else if(theLC==2)           // Delta++ like: only p+PiP is possible
-				{
+    {
       if(qM>mPPi)               // Only p+gamma decay is possible
-						{
+      {
         sQPDG=pipQPDG;          // Meson is Pi+ (baryon is proton)
         sMass=mPi;
       }
       else                      // @@ Can be aReason to search for anError in Fragmentation
-						{
+      {
 #ifdef pdebug
         G4cout<<"-Warning-G4QE::DecBary:*AsIs* DEL++ M="<<qM<<"<"<<mPPi<<G4endl;
@@ -7243,7 +7442,7 @@
     }
     else if(theLC==-1)          // Delta- like: only n+PiM is possible
-				{
+    {
       if(qM+eps>mNPi)           // Only p+gamma decay is possible
-						{
+      {
         fQPDG=nQPDG;            // Baryon is neutron
         fMass=mNeut;
@@ -7252,5 +7451,5 @@
       }
       else                      // @@ Can be aReason to search for anError in Fragmentation
-						{
+      {
 #ifdef pdebug
         G4cout<<"-Warning-G4QE::DecBary:*AsIs* DEL++ M="<<qM<<"<"<<mNPi<<G4endl;
@@ -7272,9 +7471,9 @@
   {
     if(!theLC)                  // -->> Lambda/Sz: L+g,L+Pi0,Sz+Pi0,Sm+Pip,Sp+Pim,p+Km,n+Kz
-				{
+    {
       if(qM<mLPi0)              // Only Lambda+gamma decay is possible
-						{
+      {
         if(fabs(qM-mLamb)<eps)
-								{
+        {
 #ifdef pdebug
           G4cout<<"G4QEnv::DecayBaryon: Fill Lambda AsIs"<<G4endl;
@@ -7289,10 +7488,10 @@
       }
       else if(qM<mSzPi0)        // Only Lambda+Pi0 is possible
-						{
+      {
         fQPDG=lQPDG;            // Baryon is Lambda
         fMass=mLamb;
       }
       else if(qM<mSpPi)         // Both Lambda+Pi0 & Sigma0+Pi0 are possible
-						{
+      {
         if(G4UniformRand()>.6)  // @@ Relative probability (take into account Phase Space)
         {
@@ -7307,5 +7506,5 @@
       }
       else if(qM<mSmPi)         // Lambda+Pi0, Sigma0+Pi0, & SigmaP+PiM are possible
-						{
+      {
         G4double ra=G4UniformRand();
         if(ra<.4)               // @@ Rel. probab. (take into account Phase Space)
@@ -7328,5 +7527,5 @@
       }
       else if(qM<mPK)           // Lambda+Pi0, Sig0+Pi0, SigP+PiM, SigM+PiP are possible
-						{
+      {
         G4double ra=G4UniformRand();
         if(ra<.35)              // @@ Rel. probab. (take into account Phase Space)
@@ -7356,5 +7555,5 @@
       }
       else if(qM<mNKZ)          // Lambda+Pi0, Sig0+Pi0, SigP+PiM, SigM+PiP are possible
-						{
+      {
         G4double ra=G4UniformRand();
         if(ra<.3)               // @@ Rel. probab. (take into account Phase Space)
@@ -7390,5 +7589,5 @@
         }
       }
-						else                      // Only n+Pi0 decay is possible
+      else                      // Only n+Pi0 decay is possible
       {
         G4double ra=G4UniformRand();
@@ -7434,9 +7633,9 @@
     }
     else if(theLC==1)           // SigmaP: SigP+gam,SigP+Pi0,Sp+PiP,L+Pi0,p+K0 are possible
-				{
+    {
       if(qM<mLPi)               // Only SigmaPlus+gamma decay is possible
-						{
+      {
         if(fabs(qM-mSigP)<eps)
-								{
+        {
 #ifdef pdebug
           G4cout<<"G4QEnv::DecayBaryon: Fill SigmaPlus AsIs"<<G4endl;
@@ -7451,5 +7650,5 @@
       }
       else if(qM<mSpPi0)        // Only Lambda+PiP is possible
-						{
+      {
         fQPDG=lQPDG;            // Baryon is Lambda
         fMass=mLamb;
@@ -7458,5 +7657,5 @@
       }
       else if(qM<mSzPi)         // Both Lambda+PiP & Sigma0+Pi0 are possible
-						{
+      {
         if(G4UniformRand()<.6)  // @@ Relative probability (take into account Phase Space)
         {
@@ -7473,5 +7672,5 @@
       }
       else if(qM<mPKZ)          // Lambda+PiP, SigmaP+Pi0, & Sigma0+PiP are possible
-						{
+      {
         G4double ra=G4UniformRand();
         if(ra<.4)               // @@ Rel. probab. (take into account Phase Space)
@@ -7496,5 +7695,5 @@
       }
       else                      // Lambda+PiP, SigmaP+Pi0, Sigma0+PiP, p+K0 are possible
-						{
+      {
         G4double ra=G4UniformRand();
         if(ra<.35)              // @@ Rel. probab. (take into account Phase Space)
@@ -7527,9 +7726,9 @@
     }
     else if(theLC==-1)          // SigmaM: SigM+gam,SigM+Pi0,S0+PiM,L+Pi-,n+KM are possible
-				{
+    {
       if(qM<mLPi)               // Only SigmaMinus + gamma decay is possible
-						{
+      {
         if(fabs(qM-mSigM)<eps)
-								{
+        {
 #ifdef pdebug
           G4cout<<"G4QEnv::DecayBaryon: Fill SigmaMinus AsIs"<<G4endl;
@@ -7544,5 +7743,5 @@
       }
       else if(qM<mSzPi)         // Only Lambda+PiM is possible
-						{
+      {
         fQPDG=lQPDG;            // Baryon is Lambda
         fMass=mLamb;
@@ -7551,5 +7750,5 @@
       }
       else if(qM<mSzPi)         // Both Lambda+PiM & Sigma0+PiM are possible
-						{
+      {
         if(G4UniformRand()<.6)  // @@ Relative probability (take into account Phase Space)
         {
@@ -7568,5 +7767,5 @@
       }
       else if(qM<mPKZ)          // Lambda+PiM, Sigma0+PiM, & SigmaM+Pi0 are possible
-						{
+      {
         G4double ra=G4UniformRand();
         if(ra<.4)               // @@ Rel. probab. (take into account Phase Space)
@@ -7591,5 +7790,5 @@
       }
       else                      // Lambda+PiM, Sig0+PiM, SigM+Pi0, n+KM are possible
-						{
+      {
         G4double ra=G4UniformRand();
         if(ra<.35)              // @@ Rel. probab. (take into account Phase Space)
@@ -7634,5 +7833,5 @@
   {
 #ifdef pdebug
-    G4cout<<"---Warning---G4QE::DecBary:*AsIso* UnknBaryon(AntiS) QC="<<qH->GetQC()<<G4endl;
+    G4cout<<"---Warning---G4QE::DecBary:*AsIso*UnknBaryon(AntiS),QC="<<qH->GetQC()<<G4endl;
 #endif
     theQHadrons.push_back(qH);                 // Fill AsIs (delete equivalent)
@@ -7643,5 +7842,5 @@
   G4double sum=fMass+sMass;
   if(fabs(qM-sum)<eps)
-	 {
+  {
     f4Mom=q4M*(fMass/sum);
     s4Mom=q4M*(sMass/sum);
@@ -7656,5 +7855,5 @@
     {
       G4Quasmon* quasH = new G4Quasmon(qH->GetQC(),qH->Get4Momentum());
-	     if(!CheckGroundState(quasH,true)) theQHadrons.push_back(qH); // Cor or fill asItIs
+      if(!CheckGroundState(quasH,true)) theQHadrons.push_back(qH); // Cor or fill asItIs
       else delete qH;  
       delete quasH;
@@ -7679,4 +7878,100 @@
   theQHadrons.push_back(H2);                  // Fill "H2" (delete equivalent)
 } // End of DecayBaryon
+
+//Decay of the Antistrange Nucleus in nucleus & K+/antiK0 (at present only S=-1)
+void G4QEnvironment::DecayAntistrange(G4QHadron* qH)
+{//  ===============================================
+  static const G4QPDGCode kpQPDG(321);          // QPDG for Antistrange positive kaon
+  static const G4QPDGCode kzQPDG(311);          // QPDG for Antistrange neutral anti-kaon
+  static const G4double mK =G4QPDGCode(321).GetMass(); // Mass of antistrange positive Kaon
+  static const G4double mK0=G4QPDGCode(311).GetMass(); // Mass of antistrange neutral aK0
+  static const G4double eps=0.003;
+  //static const G4QNucleus vacuum(90000000);
+  G4int theLS= qH->GetStrangeness();           // Strangness of the Nucleus
+  if(theLS>=0)
+  {
+    G4cerr<<"***G4QEnvironment::DecayAntistrange: S="<<theLS<<", but must be <0"<<G4endl;
+    //#ifdef ppdebug
+    throw G4QException("G4QEnv::DecayAntistrange: Not Antistrange nucleus");
+    //#endif
+    //theQHadrons.push_back(qH);                 // Fill AsIs (delete equivalent)
+    return;
+  }
+  else if(theLS<-1)
+  {
+    G4cout<<"*Warning*G4QEnvironment::DecayAntistrange: S="<<theLS<<",AsIsImprove"<<G4endl;
+    theQHadrons.push_back(qH);                 // Fill AsIs (delete equivalent)
+    return;
+  }
+  G4int theLB= qH->GetBaryonNumber();          // Baryon number of the Nucleus
+  G4int theLC= qH->GetCharge();                // Chsrge of the Nucleus
+  G4int qPDG = qH->GetPDGCode();               // PDG Code of the decaying Nucleus
+  G4int K0PDG= qPDG+999999;                    // Residual nonStrange nucleus for antiK0
+  G4QPDGCode K0QPDG(K0PDG);                    // QPDG of the nuclear residual for antiK0
+  G4double rK0M=K0QPDG.GetMass();              // Mass of the nuclear residual for antiK0
+  G4int KpPDG= qPDG+999000;                    // Residual nonStrange nucleus for K+
+  G4QPDGCode KpQPDG(KpPDG);                    // QPDG of the nuclear residual for K+
+  G4double rKpM=KpQPDG.GetMass();              // Mass of the nuclear residual for K+
+  G4LorentzVector q4M = qH->Get4Momentum();    // Get 4-momentum of the Nucleus
+  G4double         qM = q4M.m();               // Mass of the Nucleus
+#ifdef pdebug
+  G4cout<<"G4QE::DecayAntistrang:S="<<theLS<<",C="<<theLC<<",B="<<theLB<<",M="<<qM<<G4endl;
+#endif
+  // Select a chanel of the decay
+  G4QPDGCode     fQPDG = kzQPDG;               // Prototype for Kaon (anti-K0)
+  G4double       fMass= mK0;
+  G4QPDGCode     sQPDG = K0QPDG;               // Prototype for residual nucleus to Kaon
+  G4double       sMass= rK0M;
+  if(mK0+rK0M>qM)                              // Can not be K0
+  {
+    if(mK+rKpM>qM)                             // Can not be K+ too
+    {
+      G4cout<<"*Warning*G4QEnvironment::DecayAntistrange: Too low mass, keep AsIs"<<G4endl;
+      theQHadrons.push_back(qH);               // Fill AsIs (delete equivalent)
+      return;
+    }
+    else                                       // Switch to K+
+    {
+      fQPDG = kpQPDG;                          // Positive Kaon
+      fMass= mK;
+      sQPDG = KpQPDG;                          // Residual nucleus to K+
+      sMass= rKpM;
+    }
+  }
+  else if(mK+rKpM<qM && theLC>theLB-theLC)     // Switch to K+ if Z>N
+  {
+    fQPDG = kpQPDG;                            // Positive Kaon
+    fMass= mK;
+    sQPDG = KpQPDG;                            // Residual nucleus to K+
+    sMass= rKpM;
+  }
+  G4LorentzVector f4Mom(0.,0.,0.,fMass);
+  G4LorentzVector s4Mom(0.,0.,0.,sMass);
+  G4double sum=fMass+sMass;
+  if(fabs(qM-sum)<eps)
+  {
+    f4Mom=q4M*(fMass/sum);
+    s4Mom=q4M*(sMass/sum);
+  }
+  else if(qM<sum || !G4QHadron(q4M).DecayIn2(f4Mom, s4Mom))
+  {
+#ifdef pdebug
+    G4cout<<"--Warning--G4QE::DecAntistrange: fPDG="<<fQPDG<<"(M="<<fMass<<")+sPDG="<<sQPDG
+          <<"(M="<<sMass<<") > TotM="<<q4M.m()<<G4endl;
+#endif
+    G4cerr<<"***G4QEnv::DecayAntistrange: M="<<qM<<", sum="<<sum<<G4endl;
+    throw G4QException("G4QEnv::DecayAntistrange: Nucleus DecayIn2 error");
+  }
+#ifdef pdebug
+  G4cout<<"G4QEnv::DecayAntistrange: *Done* f4M="<<f4Mom<<",fPDG="<<fQPDG<<", s4M="<<s4Mom
+        <<",sPDG="<<sQPDG<<G4endl;
+#endif
+  delete qH;
+  //
+  G4QHadron* H1 = new G4QHadron(fQPDG,f4Mom); // Create a Hadron for the 1-st baryon
+  theQHadrons.push_back(H1);                  // Fill "H1" (delete equivalent)
+  G4QHadron* H2 = new G4QHadron(sQPDG,s4Mom); // Create a Hadron for the 2-nd baryon
+  theQHadrons.push_back(H2);                  // Fill "H2" (delete equivalent)
+} // End of DecayAntistrange
 
 // Check that it's possible to decay the TotalResidualNucleus in Quasmon+Environ & correct
@@ -7714,6 +8009,10 @@
 
   if ( resB > 1 && 
-       ( (!resS && ((resC == resB && reTM > resC*mProt) || (!resC && reTM > resB*mNeut) ) ) ||
-          (resS == resB && reTM > resS*mLamb) ) ) // Immediate Split(@@Decay) MultiBaryon
+       ( ( !resS && 
+           ( (resC == resB && reTM > resC*mProt) || (!resC && reTM > resB*mNeut) )
+         ) ||
+         (resS == resB && reTM > resS*mLamb)
+       )
+     ) // Immediate Split(@@Decay) MultiBaryon
   {
 #ifdef chdebug
@@ -7728,5 +8027,5 @@
       reTLV=G4LorentzVector(0.,0.,0.,resQMa);   // GSM of the Quasmon
       if(G4QHadron(toLV).DecayIn2(reTLV,enva4M))
-	     {
+      {
 #ifdef pdebug
         G4cout<<"G4QE::CGS: fill EnvPDG="<<envPDG<<",4M="<<enva4M<<" and continue"<<G4endl;
@@ -7756,5 +8055,5 @@
     resEMa=theEnvironment.GetMZNS();            // GSMass of the Residual Environment
 #ifdef cdebug
-	   G4cout<<"G4QE::CGS:EnvironmentExists,gsM="<<resEMa<<",4M="<<enva4M<<enva4M.m()<<G4endl;
+    G4cout<<"G4QE::CGS:EnvironmentExists,gsM="<<resEMa<<",4M="<<enva4M<<enva4M.m()<<G4endl;
 #endif
     reTQC+=theEnvironment.GetQCZNS();           // Quark content of the Residual Nucleus
@@ -7768,7 +8067,7 @@
     G4int    baryn=valQ.GetBaryonNumber();      // Baryon Number of the Residual vacQuasmon
     if(baryn>1)                                 // => "Can split baryon?"
-	   {
+    {
       if(valQ.GetN())                           // ===> "Can split neutron?"
-	     {
+      {
         G4QContent resQC=valQ-neutQC;           // QC of Residual for the Neutron
         G4int    resPDG=resQC.GetSPDGCode();    // PDG of Residual for the Neutron
@@ -7776,7 +8075,7 @@
         G4double resMas=G4QPDGCode(resPDG).GetMass(); // GS Mass of the Residual
         if(resMas+mNeut<resQM) bsCond=true;
-	     }
+      }
       else if(valQ.GetP())                      // ===> "Can split proton?"
-	     {
+      {
         G4QContent resQC=valQ-protQC;           // QC of Residual for the Proton
         G4int    resPDG=resQC.GetSPDGCode();    // PDG of Residual for the Proton
@@ -7784,7 +8083,7 @@
         G4double resMas=G4QPDGCode(resPDG).GetMass(); // GS Mass of the Residual
         if(resMas+mProt<resQM) bsCond=true;
-	     }
+      }
       else if(valQ.GetL())                      // ===> "Can split Lambda?"
-	     {
+      {
         G4QContent resQC=valQ-lambQC;           // QC of Residual for the Lambda
         G4int    resPDG=resQC.GetSPDGCode();    // PDG of Residual for the Lambda
@@ -7792,6 +8091,6 @@
         G4double resMas=G4QPDGCode(resPDG).GetMass(); // GS Mass of the Residual
         if(resMas+mLamb<resQM) bsCond=true;
-	     }
-	   }
+      }
+    }
   }
   G4double resTMa=reTLV.m();                    // CM Mass of the ResidualNucleus (Q+Env)
@@ -7805,5 +8104,5 @@
         <<" then the correction must be done for PDG="<<reTPDG<<G4endl;
 #endif
-  if ( (resTMa < resSMa || (!resEMa && !bsCond) ) && nOfOUT > 0 && corFlag) // *** CORRECTION ***
+  if ( (resTMa < resSMa || (!resEMa && !bsCond) ) && nOfOUT > 0 && corFlag)//**CORRECTION**
   {
     G4QHadron*  theLast = theQHadrons[nOfOUT-1];
@@ -7811,5 +8110,5 @@
     G4int crPDG=theLast->GetPDGCode();
 #ifdef cdebug
-	   G4cout<<"G4QE::CGS: **Correction** lNF="<<cNf<<",lPDG="<<crPDG<<",Q4M="<<reTLV<<G4endl;
+    G4cout<<"G4QE::CGS: **Correction** lNF="<<cNf<<",lPDG="<<crPDG<<",Q4M="<<reTLV<<G4endl;
 #endif
     G4LorentzVector hadr4M = theLast->Get4Momentum();
@@ -7817,5 +8116,5 @@
     G4LorentzVector tmpTLV=reTLV+hadr4M;        // Tot (ResidNucl+LastHadron) 4-Mom
 #ifdef cdebug
-	   G4cout<<"G4QE::CGS:YES, s4M/M="<<tmpTLV<<tmpTLV.m()<<">rSM+hM="<<resSMa+hadrMa<<G4endl;
+    G4cout<<"G4QE::CGS:YES, s4M/M="<<tmpTLV<<tmpTLV.m()<<">rSM+hM="<<resSMa+hadrMa<<G4endl;
 #endif
     G4double tmpTM=tmpTLV.m();
@@ -7848,5 +8147,5 @@
           // Kill environment as it is already included in the decay
           theEnvironment=G4QNucleus(G4QContent(0,0,0,0,0,0), G4LorentzVector(0.,0.,0.,0.));
-		      }
+        }
         else
         {
@@ -7856,5 +8155,5 @@
           return false;
         }
-	     }
+      }
       else                                      // => "Environ is vacuum" case (DecayIn2)
       {
@@ -7873,5 +8172,5 @@
 #endif
           EvaporateResidual(quasH);     // Try to evaporate residual (del.eq.)
-		      }
+        }
         else
         {
@@ -7882,13 +8181,13 @@
           return false;
         }
-	     }
+      }
     }
     else                                        // *** Try Last+Previous CORRECTION ***
     {
 #ifdef cdebug
-	     G4cout<<"G4QEnv::CheckGS: the Last did not help, nH="<<nOfOUT<<G4endl;
+      G4cout<<"G4QEnv::CheckGS: the Last did not help, nH="<<nOfOUT<<G4endl;
 #endif
       if(nOfOUT>1)                              // Cor with Last&Previous can be tryed
-	     {
+      {
         G4QHadron*  thePrev = theQHadrons[nOfOUT-2]; // Get pointer to Prev before Last
         if(thePrev->GetNFragments()||thePrev->GetNFragments()) return false;// Dec H/g
@@ -7900,5 +8199,5 @@
         G4double   tQMa=G4QPDGCode(totPDG).GetMass(); // GS Mass of the Residual Nucleus
 #ifdef cdebug
-	       G4cout<<"G4QE::CGS:T3="<<tmpTLV<<tmpTLV.m()<<">t+h+p="<<tQMa+hadrMa+prevMa<<G4endl;
+        G4cout<<"G4QE::CGS:T3="<<tmpTLV<<tmpTLV.m()<<">t+h+p="<<tQMa+hadrMa+prevMa<<G4endl;
 #endif
         if(tmpTLV.m()>tQMa+hadrMa+prevMa)
@@ -7918,5 +8217,5 @@
             nucH->Set4Momentum(nuc4M);
 #ifdef cdebug
-	           G4cout<<"G4QE::CGS:*SUCCESS**>CHECK, D4M="<<tmpTLV-hadr4M-prev4M-nuc4M<<G4endl;
+            G4cout<<"G4QE::CGS:*SUCCESS**>CHECK, D4M="<<tmpTLV-hadr4M-prev4M-nuc4M<<G4endl;
 #endif
 #ifdef pdebug
@@ -7924,12 +8223,12 @@
 #endif
             EvaporateResidual(nucH);     // Try to evaporate residual (del.eq.)
-	         }
-		      }
+          }
+        }
         else                                  // ===> Try to use any hadron from the output
         {
 #ifdef cdebug
-		        G4cout<<"G4QE::CGS:Prev&Last didn't help,nH="<<nOfOUT<<">2, MQ="<<resQMa<<G4endl;
-#endif
-										G4int nphot=-1;                     // #of photons
+          G4cout<<"G4QE::CGS:Prev&Last didn't help,nH="<<nOfOUT<<">2, MQ="<<resQMa<<G4endl;
+#endif
+          G4int nphot=-1;                     // #of photons
           G4int npip=-1;                      // #of Pi+
           G4int npiz=-1;                      // #of Pi0
@@ -7937,5 +8236,5 @@
           G4double emaz=0.;                   // The maximum energy for pi0 (to sel high E)
           for(G4int id=nOfOUT-1; id>=0; id--) // Search for photons and pi+, and pi-
-  			     {
+          {
             G4QHadron* curHadr = theQHadrons[id];
             G4int hPDG=curHadr->GetPDGCode();
@@ -7944,5 +8243,5 @@
             else if(hPDG==111)
             {
-				          G4double piE=curHadr->Get4Momentum().e();
+              G4double piE=curHadr->Get4Momentum().e();
 #ifdef chdebug
               G4cout<<"G4QE::CheckGroundState:"<<id<<",Epi0="<<piE<<">"<<emaz<<G4endl;
@@ -7957,5 +8256,5 @@
           }
           if(nphot>=0)                 // Photon is found, try to use it to resolve PANIC
-			       {
+          {
             G4QHadron* curHadr = theQHadrons[nphot];      // Pointer to the photon
             G4LorentzVector ch4M=curHadr->Get4Momentum(); // 4-Mom of the Photon
@@ -7963,5 +8262,5 @@
             G4double ttM=tt4M.m();          // Mass of the Phot+ResidQm compaund system
             if(resQMa<ttM)                  // PANIC can be resolved with this Photon
-			         {
+            {
               G4LorentzVector quas4M = G4LorentzVector(0.,0.,0.,resSMa);//GSMass of Quasm
               G4QHadron* rqH = new G4QHadron(reTQC,quas4M); // Prototype of outputResidQ
@@ -7987,5 +8286,5 @@
                                                           G4LorentzVector(0.,0.,0.,0.));
                 return true;
-		            }
+              }
             } // End of the KINEMATIC CHECK FOR THE PHOTON if
           } // End of nphot IF
@@ -7997,5 +8296,5 @@
           if (envPDG == 90000000 && !resS && resB > 1 && 
               ((npip >= 0 && resC == -2) || (npim >= 0 && resC-resB == 2)) )
-	  {
+   {
             G4int npi=npip;               // (Delta-)+(Delta-)+k*n+(pi+)->(k+2)*n+(pi-)
             G4int piPD=-211;
@@ -8023,5 +8322,5 @@
 #endif
             if(suM<ttM)                    // PANIC can be resolved with this Pion
-			         {
+            {
               G4LorentzVector fn4M = G4LorentzVector(0.,0.,0.,suB);//First nucleon(s)
               G4LorentzVector sn4M = G4LorentzVector(0.,0.,0.,nuM);//Second nucleon
@@ -8057,9 +8356,9 @@
 #endif
                 return true;
-		            }
+              }
             } // End of the KINEMATIC CHECK FOR THE PI+/PI- if
           } // End of npip/pin Isonucleus IF
           if(envPDG==90000000&&!resS&&resB>1&&npiz>=0&&(resC<-1||resC-resB>1))
-			       {
+          {
 #ifdef chdebug
             G4cout<<"***G4QE::CGS:Pi0, rPDG="<<resQPDG<<",rC="<<resC<<",rB="<<resB<<G4endl;
@@ -8089,5 +8388,5 @@
 #endif
             if(sum<ttM)                     // PANIC can be resolved with this Pi0
-			         {
+            {
               G4LorentzVector fn4M = G4LorentzVector(0.,0.,0.,suB); // Nucleon(s)
               G4LorentzVector pi4M = G4LorentzVector(0.,0.,0.,suM); // Pion(s)
@@ -8115,16 +8414,16 @@
                 }
 #ifdef chdebug
-					           G4cout<<"G4QE::CGS: nucl="<<nuPD<<fn4M<<resB<<", pion="<<pi4M<<npi<<G4endl;
+                G4cout<<"G4QE::CGS: nucl="<<nuPD<<fn4M<<resB<<", pion="<<pi4M<<npi<<G4endl;
 #endif
 
                 return true;
-		            }
+              }
 #ifdef chdebug
               else G4cout<<"***G4QEnv::CheckGS:DecayIn3:*Pi0* tM="<<ttM<<","<<sum<<G4endl;
 #endif
             } // End of the KINEMATIC CHECK FOR THE PI0 if
-										} // End of npiz Isonucleus IF
+          } // End of npiz Isonucleus IF
 #ifdef cdebug
-		        G4cout<<"G4QE::CGS: Photons can't help nP="<<nphot<<". TryChangeCharge."<<G4endl;
+          G4cout<<"G4QE::CGS: Photons can't help nP="<<nphot<<". TryChangeCharge."<<G4endl;
 #endif
           // > Photons did not help, try to find an appropriate partner to join and decay
@@ -8139,9 +8438,9 @@
           if((!nnPDG||nnPDG==10)&&nnQC.GetBaryonNumber()>0) nnPDG=nnQC.GetZNSPDGCode();
 #ifdef cdebug
-		        G4cout<<"G4QE::CGS: nnPDR="<<nnPDG<<". TryChangeCharge nOUT="<<nOfOUT<<",Iso="
+          G4cout<<"G4QE::CGS: nnPDR="<<nnPDG<<". TryChangeCharge nOUT="<<nOfOUT<<",Iso="
                 <<isoN<<",Nor="<<norN<<",C="<<reTCH<<",B="<<reTBN<<G4endl;
 #endif
           if(isoN)                           // Calculations for the Isonuclear Residual
-			       {
+          {
             if(reTCH<0)                      // "at least one Delta-" isostate (chngPort)
             {
@@ -8150,5 +8449,5 @@
               nnPDG=nnQC.GetSPDGCode();      // Change PDGCode of theResidNormalNucleus
               if(nnPDG==10&&nnQC.GetBaryonNumber()>0) nnPDG=nnQC.GetZNSPDGCode();
-			         }
+            }
             G4QPDGCode nnQPDG(nnPDG);        // Now can even have Q-code !
             if(nnPDG<80000000) nnM=nnQPDG.GetMass(); // Mass for the Fundamental Hadron
@@ -8161,5 +8460,5 @@
             if(force) chx2g=false;
             for(G4int hd=nOfOUT-1; hd>=0; hd--)// Try to use any hadron to resolve PANIC
-  			       {
+            {
               G4QHadron* curHadr = theQHadrons[hd];
               G4int chNF=curHadr->GetNFragments();
@@ -8169,5 +8468,5 @@
               G4LorentzVector ch4M=curHadr->Get4Momentum(); // 4Mom of the Current Hadron
 #ifdef cdebug
-			           G4cout<<"G4QE::CGS:#"<<hd<<",ch="<<chCH<<",b="<<chBN<<",4M="<<ch4M<<G4endl;
+              G4cout<<"G4QE::CGS:#"<<hd<<",ch="<<chCH<<",b="<<chBN<<",4M="<<ch4M<<G4endl;
 #endif
               if(!chNF)
@@ -8177,7 +8476,7 @@
                 G4double ttM=tt4M.m();          // TotalMass of CurHadr+Residual compaund
                 if(isoN)                        // "1 Delta Isonucleus" case
-		              {
+                {
                   if(nnM+mPi+chM<ttM)           // PANIC can be resolved with thisCurHadron
-			               {
+                  {
 #ifdef cdebug
                       G4cout<<"G4QE::CGS:CurH+ResQ+Pion t="<<tt4M<<ttM<<",cM="<<chM<<",rM="
@@ -8209,11 +8508,11 @@
                                                         ,G4LorentzVector(0.,0.,0.,0.));
                       return true;
-		                  }
+                    }
 #ifdef cdebug
-																				else G4cout<<"***G4QE::CGS:DecIn3 CurH+ResQ+Pion dM="<<ttM-chM<<G4endl;
+                    else G4cout<<"***G4QE::CGS:DecIn3 CurH+ResQ+Pion dM="<<ttM-chM<<G4endl;
 #endif
                   }
-                  if ( (reTCH < 0 && chCH > 0) || (reTCH > reTBN && chCH < chBN) ) // Isoexchange can help
-		  {
+                  if ( (reTCH < 0 && chCH > 0) || (reTCH > reTBN && chCH < chBN) ) //IsoEx?
+                  {
                     G4QContent chQC=curHadr->GetQC(); // QuarkCont of the CurrentHadron
                     if(reTCH<0)chQC+=pimQC;           // Add the negativPion QC to CurHadr
@@ -8247,5 +8546,5 @@
                         {
                           if(chCH+reTCH-chQC.GetCharge()-nnQC.GetCharge())
-						                      G4cout<<"**G4QE::CGS:ChEx CH+2G i="<<reTCH<<"+h="<<chCH<<", f="
+                            G4cout<<"**G4QE::CGS:ChEx CH+2G i="<<reTCH<<"+h="<<chCH<<", f="
                                   <<nnQC.GetCharge()<<"+o="<<chQC.GetCharge()<<G4endl;
                           curHadr->Set4Momentum(ch4M);// Change 4M of the Current Hadron
@@ -8268,5 +8567,5 @@
                           G4QNucleus(G4QContent(0,0,0,0,0,0),G4LorentzVector(0.,0.,0.,0.));
                           return true;
-		                      }
+                        }
                       } // End of "the Normal decay without 2 gammas"
                       else                        // Normal decay (without "Pi0"->2 gammas)
@@ -8282,5 +8581,5 @@
                         {
                           if(chCH+reTCH-chQC.GetCharge()-nnQC.GetCharge())
-						                      G4cout<<"**G4QE::CGS:ChEx CH+RQ i="<<reTCH<<"+h="<<chCH<<", f="
+                            G4cout<<"**G4QE::CGS:ChEx CH+RQ i="<<reTCH<<"+h="<<chCH<<", f="
                                   <<nnQC.GetCharge()<<"+o="<<chQC.GetCharge()<<G4endl;
                           curHadr->Set4Momentum(ch4M);// Change 4M of the Current Hadron
@@ -8297,9 +8596,9 @@
                           G4QNucleus(G4QContent(0,0,0,0,0,0),G4LorentzVector(0.,0.,0.,0.));
                           return true;
-		                      }
+                        }
                       } // End of "the Normal decay without 2 gammas"
                     }
                     else
-																		  {
+                    {
 #ifdef cdebug
                       G4cout<<"**G4QE::CGS:rM+hB="<<nnM+chM<<">"<<ttM<<",B="<<chBN<<G4endl;
@@ -8314,5 +8613,6 @@
                         G4int tcC=tcQC.GetCharge();                 // Total Charge
                         G4int tcBN=tcQC.GetBaryonNumber();          // Total Baryon Number
-                        if ( tcBN == 2 || (!tcS && !tcC) || tcS == tcBN || tcC == tcBN ) //dec DiBar or MulBar
+                        //Try to decay in DiBaryon or MultyBaryon
+                        if ( tcBN == 2 || (!tcS && !tcC) || tcS == tcBN || tcC == tcBN )
                         {
                           if(tcBN==2) theEnvironment.DecayDibaryon(tcH,&theQHadrons); // DB
@@ -8327,5 +8627,5 @@
                         }
                         else if(tcM<ttM)// @@ Can't evaporate here, can only radiate gamma
-																						  {
+                        {
                           G4LorentzVector tc4M=G4LorentzVector(0.,0.,0.,tcM);//4M of TotCom
                           G4LorentzVector gc4M=G4LorentzVector(0.,0.,0.,0.); //4M of gamma
@@ -8351,8 +8651,8 @@
 #endif
                             EvaporateResidual(tcH); // Try to evaporate(d.e.)
-		                        }
+                          }
                         }
-																						  else // @@ Fill the TotalCompound instead of the CurrentHadron @@
-																						  {
+                        else // @@ Fill the TotalCompound instead of the CurrentHadron @@
+                        {
 #ifdef cdebug
                           G4cout<<"G4QE::CGS:**CEF,M="<<tcM<<">"<<ttM<<",B="<<chBN<<G4endl;
@@ -8368,7 +8668,7 @@
                 } // End of the IF: KINEMATIC CHECK FOR THE CURRENT HADRON(Isonuclear Case)
                 else if(norN)
-		              {
+                {
                   if(resSMa+chM<ttM)          // PANIC can be resolved with this CurHadron
-			               {
+                  {
                     G4LorentzVector quas4M = G4LorentzVector(0.,0.,0.,resSMa);// GSMass ofQ
                     G4QHadron* rqH = new G4QHadron(reTQC,quas4M);// Prototype OutputResidQ
@@ -8395,9 +8695,9 @@
                                                             ,G4LorentzVector(0.,0.,0.,0.));
                       return true;
-		                  }
+                    }
                   } // End of the KINEMATIC CHECK FOR THE CURRENT HADRON if (NormNuclCase)
                 } // End of IsoNucleus/NormalNucleus choice
               } // End of the NumberOfFragments=0 (NOT DECAYED PARTICLE) if
-			         } // End of the LOOP over hadrons and all attempts to resolve PANIC
+            } // End of the LOOP over hadrons and all attempts to resolve PANIC
 #ifdef cdebug
             G4cout<<"G4QEnv::CheckGS:***Any hadron from the OUTPUT did not help"<<G4endl;
@@ -8410,10 +8710,10 @@
             if(npiz>-1) hind=npiz;
             else
-												{
+            {
               if(resC+resC>resB && npim>-1) hind=npim;
               else                          hind=npip;
             }
             if(hind>-1)
-												{
+            {
               G4QHadron* curHadr = theQHadrons[hind];
               G4int chNF=curHadr->GetNFragments();
@@ -8446,5 +8746,5 @@
                   if(!G4QHadron(tt4M).DecayIn3(quas4M,fgam4M,sgam4M))G4cout<<"*3*"<<G4endl;
                   else
-																		{
+                  {
                     curHadr->Set4Momentum(fgam4M); // Change 4M of the Pion to Gamma
                     curHadr->SetQPDG(gamQPDG);      // Change QPDG of the Pion to Gamma
@@ -8462,5 +8762,5 @@
           return false;
         } // End of the KINEMATIC LIMIT FOR THE L&P CORRECTION if/else (try any hadron)
-	     } // End of the POSSIBILITY OF PREV+LAST (OR MORE) CORRECTION if
+      } // End of the POSSIBILITY OF PREV+LAST (OR MORE) CORRECTION if
       else return false;
     } // End of the CORRECTION WITH THE LAST if/else
@@ -8484,5 +8784,5 @@
       {
 #ifdef pdebug
-	       G4cout<<"G4QEnv::Copy&DeleteHV:#"<<ih<<", hPDG="<<inH->GetPDGCode()<<G4endl;
+        G4cout<<"G4QEnv::Copy&DeleteHV:#"<<ih<<", hPDG="<<inH->GetPDGCode()<<G4endl;
 #endif
         G4QHadron* curH = new G4QHadron(inH);      // will be deleted with allQHadronVector
@@ -8517,7 +8817,7 @@
     resSMa+=resEMa;                               // Minimal Split Mass of Residual Nucleus
     G4double resTMa=reTLV.m();                    // CM Mass of theResidNucleus (Quasm+Env)
-	//#ifdef pdebug
+ //#ifdef pdebug
     G4cout<<"G4QEnv::DecayInEnvQ: totM="<<reTLV<<resTMa<<" > rQM+rEM="<<resSMa<<G4endl;
-	//#endif
+ //#endif
     if(resTMa>resSMa)
     {
@@ -8538,5 +8838,5 @@
         envaH->Set4Momentum(enva4M);
         EvaporateResidual(envaH);                // Try to evaporate residual (del. equiv.)
-	     }
+      }
     }
     else return false;
@@ -8554,5 +8854,5 @@
   tot4Mom  +=Q->Get4Momentum();
 #ifdef debug
-		G4cout<<"G4QEnv::AddQuasmon:t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;
+  G4cout<<"G4QEnv::AddQuasmon:t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;
 #endif
 }
@@ -8574,10 +8874,10 @@
       if(quad>0.875)    return G4ThreeVector(-x/r,-y/r,-z/r);
       else              return G4ThreeVector(-x/r,-y/r, z/r);
-	   }
+    }
     else
     {
       if(quad>0.625)    return G4ThreeVector(-x/r, y/r,-z/r);
       else              return G4ThreeVector(-x/r, y/r, z/r);
-	   }
+    }
   }
   else
@@ -8587,5 +8887,5 @@
       if(quad>0.375)    return G4ThreeVector( x/r,-y/r,-z/r);
       else              return G4ThreeVector( x/r,-y/r, z/r);
-	   }
+    }
     else if(quad>0.125) return G4ThreeVector( x/r, y/r,-z/r);
   }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QException.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QException.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QException.cc	(revision 1055)
@@ -25,11 +25,13 @@
 //
 //
-// $Id: G4QException.cc,v 1.9 2006/06/29 20:06:59 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QException.cc,v 1.10 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QException ----------------
 //           by Mikhail Kossov, November 2003.
 //      class for an Exception used by the CHIPS Model
-// ------------------------------------------------------------
+// -------------------------------------------------------------
+// Short description: Just an internal CHIPS Exception Messenger
+// -------------------------------------------------------------
 
 #include "G4QException.hh"
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QFragmentation.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QFragmentation.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QFragmentation.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QFragmentation.cc,v 1.3 2007/05/02 14:59:55 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QFragmentation.cc,v 1.5 2009/04/29 07:53:18 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -----------------------------------------------------------------------------
@@ -39,5 +39,6 @@
 //     G4ExcitedStringDecay
 // -----------------------------------------------------------------------------
-//
+// Short description: CHIPS string fragmentation class
+// -----------------------------------------------------------------------------
 
 //#define debug
@@ -60,11 +61,11 @@
 G4double G4QFragmentation::widthOfPtSquare=-0.72*GeV*GeV; // pt -width2 forStringExcitation
 G4double G4QFragmentation::minExtraMass=250.*MeV;// minimum excitation mass 
-G4double G4QFragmentation::minmass=250.*MeV;	    // mean pion transverse mass for Xmin 
+G4double G4QFragmentation::minmass=250.*MeV;     // mean pion transverse mass for Xmin 
 
 G4QFragmentation::G4QFragmentation() : theNucleus(0)
 {
   // Construct Shortlived particles (needed after the 2006 Particles revolution)
-	 G4ShortLivedConstructor ShortLived;
-	 ShortLived.ConstructParticle();
+  G4ShortLivedConstructor ShortLived;
+  ShortLived.ConstructParticle();
 }
 
@@ -88,12 +89,12 @@
   while(!strings)
   {
-  	 if (attempts++ > maxAttempts ) 
-  	 {
-				 	G4cerr<<"***G4QFragmentation::Scatter: "<<attempts<<" to create a string ( > max="
+    if (attempts++ > maxAttempts ) 
+    {
+      G4cerr<<"***G4QFragmentation::Scatter: "<<attempts<<" to create a string ( > max="
             <<maxAttempts<<") --> try to increase maxAttempts"<<G4endl;
       G4Exception("G4QFragmentation::Scatter:","72",FatalException,"StringCreation");
-  	 }
-	   InitModel(aNucleus,thePrimary);
-  	 strings = GetStrings();
+    }
+    InitModel(aNucleus,thePrimary);
+    strings = GetStrings();
   }
   
@@ -119,5 +120,5 @@
 void G4QFragmentation::InitModel(const G4QNucleus& aNucleus,const G4QHadron& aProjectile)
 {
-  static const G4double 	mProt = G4Proton::Proton()->GetPDGMass(); // Mass of proton
+  static const G4double  mProt = G4Proton::Proton()->GetPDGMass(); // Mass of proton
   Init(aNucleus.GetN(),aNucleus.GetZ());
   theCurrentVelocity.setX(0);    
@@ -133,9 +134,9 @@
   //e_per_projectile += proj4M.vect()*proj4M.vect();
   //e_per_projectile /=nCons*nCons;
-	 //e_per_projectile = std::sqrt(e_per_projectile);
-	 //e_per_projectile += G4Proton::Proton()->GetPDGMass();//@@Add mass of TargetProtonAtRest
+  //e_per_projectile = std::sqrt(e_per_projectile);
+  //e_per_projectile += G4Proton::Proton()->GetPDGMass();//@@Add mass of TargetProtonAtRest
   G4double vz = pz_per_projectile/e_per_projectile;
 #ifdef debug
-		G4cout<<"G4QFragmentation::Init: Projectile4M="<<proj4M<<", vz="<<vz<<G4endl;
+  G4cout<<"G4QFragmentation::Init: Projectile4M="<<proj4M<<", vz="<<vz<<G4endl;
 #endif
   theCurrentVelocity.setZ(vz);
@@ -278,22 +279,22 @@
         G4QHadron* aTarget = new G4QHadron(*pNucleon);
         //G4QFragmentation_NPart ++;                       // ? M.K.
-	       theTargets.push_back(aTarget);
- 	      pNucleon=aTarget;
+        theTargets.push_back(aTarget);
+        pNucleon=aTarget;
         if((theProbability.GetDiffractiveProbability(s,Distance2)/Probability >
             G4UniformRand() && (ModelMode==SOFT)) || ModelMode==DIFFRACTIVE)
-	       { 
-	         // diffractive interaction occurs
-	         if(IsSingleDiffractive()) ExciteSingDiffParticipants(aProjectile, aTarget);
-	         else                          ExciteDiffParticipants(aProjectile, aTarget);
+        { 
+          // diffractive interaction occurs
+          if(IsSingleDiffractive()) ExciteSingDiffParticipants(aProjectile, aTarget);
+          else                          ExciteDiffParticipants(aProjectile, aTarget);
           G4QInteraction* aInteraction = new G4QInteraction(aProjectile);
           aInteraction->SetTarget(aTarget); 
           theInteractions.push_back(aInteraction);
-	         aInteraction->SetNumberOfDiffractiveCollisions(1);
+          aInteraction->SetNumberOfDiffractiveCollisions(1);
           totalCuts += 1;
-	       }
-	       else
-	       {
-	         // nondiffractive soft interaction occurs
-	         // sample nCut+1 (cut Pomerons) pairs of strings can be produced
+        }
+        else
+        {
+          // nondiffractive soft interaction occurs
+          // sample nCut+1 (cut Pomerons) pairs of strings can be produced
           G4int nCut;
           G4double* running = new G4double[nCutMax];
@@ -301,8 +302,8 @@
           for(nCut = 0; nCut < nCutMax; nCut++)
           {
-	           running[nCut] = theProbability.GetCutPomeronProbability(s, Distance2, nCut+1);
+            running[nCut] = theProbability.GetCutPomeronProbability(s, Distance2, nCut+1);
             if(nCut!=0) running[nCut] += running[nCut-1];
           }
-	         G4double random = running[nCutMax-1]*G4UniformRand();
+          G4double random = running[nCutMax-1]*G4UniformRand();
           for(nCut = 0; nCut < nCutMax; nCut++) {if(running[nCut] > random) break;}
           delete [] running;
@@ -416,23 +417,23 @@
     else
     {
-	     //generatedHadrons = new G4QHadronVector;
-	     //generatedHadrons->push_back((*theStrings)[astring]->GetAsQHadron()); //@@ NotImplem
+      //generatedHadrons = new G4QHadronVector;
+      //generatedHadrons->push_back((*theStrings)[astring]->GetAsQHadron()); //@@ NotImplem
     }    
-	   if (!generatedHadrons) 
-	   {
-		    G4cerr<<"G4QFragmentation::FragmentStrings: No Hadrons produced" << G4endl;
-		    continue;
-	   }
+    if (!generatedHadrons) 
+    {
+      G4cerr<<"G4QFragmentation::FragmentStrings: No Hadrons produced" << G4endl;
+      continue;
+    }
     G4LorentzVector KTsum1(0.,0.,0.,0.);
     for(unsigned aTrack=0; aTrack<generatedHadrons->size(); aTrack++)
-	   {
-		    theResult->push_back((*generatedHadrons)[aTrack]);
-		    KTsum1+= (*generatedHadrons)[aTrack]->Get4Momentum();
-	   }
-	
-	   if(std::abs((KTsum1.e()-(*theStrings)[astring]->Get4Momentum().e())/KTsum1.e())
+    {
+      theResult->push_back((*generatedHadrons)[aTrack]);
+      KTsum1+= (*generatedHadrons)[aTrack]->Get4Momentum();
+    }
+ 
+    if(std::abs((KTsum1.e()-(*theStrings)[astring]->Get4Momentum().e())/KTsum1.e())
        > perMillion) NeedEnergyCorrector=true;
     //      clean up
-	   delete generatedHadrons;
+    delete generatedHadrons;
   }
 #ifdef debug
@@ -472,5 +473,5 @@
       G4cerr<<"***G4QFragmentation::EnergyAndMomentumCorrector: SumMass="<<SumMass<<G4endl;
       G4Exception("G4QFragmentation::EnergyAndMomentumCor:","72",FatalException,"NANMass");
-	   }
+    }
   }
   // Cannot correct a single particle
@@ -508,16 +509,18 @@
       break;
     }
-#ifdef debug 
+#ifdef debug
     G4cout<<"G4QFragmentation::EnergyAndMomentumCorrector: Scale-1="<<Scale-1<<", TotM="
           <<TotalCollisionMass<<", Sum="<<Sum<<G4endl;
-#endif     
-  }   
+#endif
+  }
+#ifdef debug
   if(!success)
   {
     G4cout<<"***G4QFragmentation::EnergyAndMomentumCorrector: Scale #1 at end of loop M="
           <<TotalCollisionMass<<", S"<<Sum<<", Sc="<<Scale
-          <<" Increase number of attempts or increase ERRLIMIT"<<G4endl;
-    G4Exception("G4QFragmentation::SelectInteractions:","72",FatalException,"NotCorrect");
-  }
+          <<" Increase number of attempts or increase the ErrLimit parameter"<<G4endl;
+    //G4Exception("G4QFragmentation::EnergyAndMomCor:","72",FatalException,"NoCorrection");
+  }
+#endif
   // Compute c.m.s. interaction velocity and KTV back boost
   Beta = TotalCollisionMom.boostVector(); 
@@ -531,49 +534,49 @@
                                                 G4QHadron* target) const
 {
-	 G4LorentzVector Pprojectile=projectile->Get4Momentum();
-	 G4double Mprojectile=projectile->GetMass() + minExtraMass;
-	 G4double Mprojectile2=Mprojectile*Mprojectile;
+  G4LorentzVector Pprojectile=projectile->Get4Momentum();
+  G4double Mprojectile=projectile->GetMass() + minExtraMass;
+  G4double Mprojectile2=Mprojectile*Mprojectile;
   G4LorentzVector Ptarget=target->Get4Momentum();
   G4double Mtarget=target->GetMass() + minExtraMass;
   G4double Mtarget2=Mtarget*Mtarget;
 #ifdef debug
-	 G4cout<<"G4QFragm::ExciteDiffPartici:Ep="<<Pprojectile.e()<<",Et="<<Ptarget.e()<<G4endl;
+  G4cout<<"G4QFragm::ExciteDiffPartici:Ep="<<Pprojectile.e()<<",Et="<<Ptarget.e()<<G4endl;
 #endif
   // Transform momenta to cms and then rotate parallel to z axis;
-	 G4LorentzVector Psum=Pprojectile+Ptarget;
-	 G4LorentzRotation toCms(-Psum.boostVector()); // Boost Rotation to CMS
-	 G4LorentzVector Ptmp=toCms*Pprojectile;
-	 if(Ptmp.pz()<=0.) // "String" moving backwards in CMS, abort collision !! ? M.K.
-	 {
-#ifdef debug
-	   G4cout<<"G4QFragmentation::ExciteDiffParticipants: *1* abort Collision!! *1*"<<G4endl;
-#endif
-		  return false; 
-	 }	   		   
-	 toCms.rotateZ(-Ptmp.phi());
-	 toCms.rotateY(-Ptmp.theta());
+  G4LorentzVector Psum=Pprojectile+Ptarget;
+  G4LorentzRotation toCms(-Psum.boostVector()); // Boost Rotation to CMS
+  G4LorentzVector Ptmp=toCms*Pprojectile;
+  if(Ptmp.pz()<=0.) // "String" moving backwards in CMS, abort collision !! ? M.K.
+  {
+#ifdef debug
+    G4cout<<"G4QFragmentation::ExciteDiffParticipants: *1* abort Collision!! *1*"<<G4endl;
+#endif
+    return false; 
+  }         
+  toCms.rotateZ(-Ptmp.phi());
+  toCms.rotateY(-Ptmp.theta());
 #ifdef debug
   G4cout<<"G4QFragment::ExciteDiffParticipantts: Be4Boost Pproj="<<Pprojectile<<", Ptarg="
         <<Ptarget<<G4endl;
 #endif
-	 G4LorentzRotation toLab(toCms.inverse()); // Boost Rotation to LabSys (LS)
-	 Pprojectile.transform(toCms);
-	 Ptarget.transform(toCms);
-#ifdef debug
-	 G4cout<< "G4QFragment::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<"Ptarg="
+  G4LorentzRotation toLab(toCms.inverse()); // Boost Rotation to LabSys (LS)
+  Pprojectile.transform(toCms);
+  Ptarget.transform(toCms);
+#ifdef debug
+  G4cout<< "G4QFragment::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<"Ptarg="
         <<Ptarget<<", cms4M="<<Pprojectile+Ptarget<<G4endl;
-	 G4cout<<"G4QFragment::ExciteDiffParticipantts: ProjX+="<<Pprojectile.plus()<<", ProjX-="
+  G4cout<<"G4QFragment::ExciteDiffParticipantts: ProjX+="<<Pprojectile.plus()<<", ProjX-="
         <<Pprojectile.minus()<<", TargX+="<< Ptarget.plus()<<", TargX-="<<Ptarget.minus()
         <<G4endl;
 #endif
-	 G4LorentzVector Qmomentum(0.,0.,0.,0.);
-	 G4int whilecount=0;
-	 do
-  {
-    //  Generate pt		
-	   G4double maxPtSquare=sqr(Ptarget.pz());
-	   if(whilecount++>=500 && whilecount%100==0) // @@ M.K. Hardwired limits 
-#ifdef debug
-	 	 G4cout<<"G4QFragmentation::ExciteDiffParticipantts: can loop, loopCount="<<whilecount
+  G4LorentzVector Qmomentum(0.,0.,0.,0.);
+  G4int whilecount=0;
+  do
+  {
+    //  Generate pt  
+    G4double maxPtSquare=sqr(Ptarget.pz());
+    if(whilecount++>=500 && whilecount%100==0) // @@ M.K. Hardwired limits 
+#ifdef debug
+    G4cout<<"G4QFragmentation::ExciteDiffParticipantts: can loop, loopCount="<<whilecount
           <<", maxPtSquare="<<maxPtSquare<<G4endl;
 #endif
@@ -583,7 +586,7 @@
       G4cout<<"G4QFragmentation::ExciteDiffParticipants: *2* abort Loop!! *2*"<<G4endl;
 #endif
-	 	   return false; 	  //  Ignore this interaction 
-    }
-	   Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
+      return false;    //  Ignore this interaction 
+    }
+    Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
 #ifdef debug
     G4cout<<"G4QFragment::ExciteDiffParticipants: generated Pt="<<Qmomentum<<", ProjPt="
@@ -591,41 +594,41 @@
 #endif
     //  Momentum transfer
-	   G4double Xmin = minmass/(Pprojectile.e() + Ptarget.e());
-	   G4double Xmax=1.;
-	   G4double Xplus =ChooseX(Xmin,Xmax);
-	   G4double Xminus=ChooseX(Xmin,Xmax);
-#ifdef debug
-	   G4cout<<"G4QFragment::ExciteDiffParticip: X-plus="<<Xplus<<",X-minus="<<Xminus<<G4endl;
-#endif
-	   G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
-	   G4double Qplus =-pt2/Xminus/Ptarget.minus();
-	   G4double Qminus= pt2/Xplus /Pprojectile.plus();
-	   Qmomentum.setPz((Qplus-Qminus)/2);
-	   Qmomentum.setE( (Qplus+Qminus)/2);
-#ifdef debug
-	   G4cout<<"G4QFragment::ExciteDiffParticip: Qplus="<<Qplus<<", Qminus="<<Qminus<<", pt2="
+    G4double Xmin = minmass/(Pprojectile.e() + Ptarget.e());
+    G4double Xmax=1.;
+    G4double Xplus =ChooseX(Xmin,Xmax);
+    G4double Xminus=ChooseX(Xmin,Xmax);
+#ifdef debug
+    G4cout<<"G4QFragment::ExciteDiffParticip: X-plus="<<Xplus<<",X-minus="<<Xminus<<G4endl;
+#endif
+    G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
+    G4double Qplus =-pt2/Xminus/Ptarget.minus();
+    G4double Qminus= pt2/Xplus /Pprojectile.plus();
+    Qmomentum.setPz((Qplus-Qminus)/2);
+    Qmomentum.setE( (Qplus+Qminus)/2);
+#ifdef debug
+    G4cout<<"G4QFragment::ExciteDiffParticip: Qplus="<<Qplus<<", Qminus="<<Qminus<<", pt2="
           <<pt2<<", Qmomentum="<<Qmomentum<<", ProjM="<<(Pprojectile+Qmomentum).mag()
           <<", TargM="<<(Ptarget-Qmomentum).mag()<<G4endl;
 #endif
-	 } while((Pprojectile+Qmomentum).mag2()<=Mprojectile2 ||
+  } while((Pprojectile+Qmomentum).mag2()<=Mprojectile2 ||
           (Ptarget-Qmomentum).mag2()<=Mtarget2);
-	 Pprojectile += Qmomentum;
-	 Ptarget     -= Qmomentum;
-#ifdef debug
-	 G4cout<<"G4QFragment::ExciteDiffParticipan: Proj(Q)="<<Pprojectile<<", Targ(Q)="<<Ptarget
-	       <<", Proj(back)="<<toLab*Pprojectile<<", Targ(bac)="<< toLab*Ptarget << G4endl;
+  Pprojectile += Qmomentum;
+  Ptarget     -= Qmomentum;
+#ifdef debug
+  G4cout<<"G4QFragment::ExciteDiffParticipan: Proj(Q)="<<Pprojectile<<", Targ(Q)="<<Ptarget
+        <<", Proj(back)="<<toLab*Pprojectile<<", Targ(bac)="<< toLab*Ptarget << G4endl;
 #endif
   // Transform back and update SplitableHadron Participant.
-	 Pprojectile.transform(toLab);
-	 Ptarget.transform(toLab);
-#ifdef debug
-	 G4cout<< "G4QFragmentation::ExciteDiffParticipants: TargetMass="<<Ptarget.mag()<<G4endl;
-#endif
-	 target->Set4Momentum(Ptarget); 	
-#ifdef debug
-	 G4cout<<"G4QFragment::ExciteDiffParticipants:ProjectileMass="<<Pprojectile.mag()<<G4endl;
-#endif
-	 projectile->Set4Momentum(Pprojectile);
-	 return true;
+  Pprojectile.transform(toLab);
+  Ptarget.transform(toLab);
+#ifdef debug
+  G4cout<< "G4QFragmentation::ExciteDiffParticipants: TargetMass="<<Ptarget.mag()<<G4endl;
+#endif
+  target->Set4Momentum(Ptarget);  
+#ifdef debug
+  G4cout<<"G4QFragment::ExciteDiffParticipants:ProjectileMass="<<Pprojectile.mag()<<G4endl;
+#endif
+  projectile->Set4Momentum(Pprojectile);
+  return true;
 } // End of ExciteDiffParticipants
 
@@ -635,22 +638,22 @@
                                                     G4QHadron* target) const
 {
-	 G4LorentzVector Pprojectile=projectile->Get4Momentum();
-	 G4double Mprojectile=projectile->GetMass() + minExtraMass;
-	 G4double Mprojectile2=Mprojectile*Mprojectile;
+  G4LorentzVector Pprojectile=projectile->Get4Momentum();
+  G4double Mprojectile=projectile->GetMass() + minExtraMass;
+  G4double Mprojectile2=Mprojectile*Mprojectile;
   G4LorentzVector Ptarget=target->Get4Momentum();
   G4double Mtarget=target->GetMass() + minExtraMass;
   G4double Mtarget2=Mtarget*Mtarget;
 #ifdef debug
-	 G4cout<<"G4QFragm::ExSingDiffPartici:Ep="<<Pprojectile.e()<<",Et="<<Ptarget.e()<<G4endl;
-#endif
-	 G4bool KeepProjectile= G4UniformRand() > 0.5;
+  G4cout<<"G4QFragm::ExSingDiffPartici:Ep="<<Pprojectile.e()<<",Et="<<Ptarget.e()<<G4endl;
+#endif
+  G4bool KeepProjectile= G4UniformRand() > 0.5;
   // Reset minMass of the non diffractive particle to its value, (minus for rounding...)
-	 if(KeepProjectile ) 
-	 {
+  if(KeepProjectile ) 
+  {
 #ifdef debug
     G4cout<<"--1/2--G4QFragmentation::ExSingDiffParticipants: Projectile is fixed"<<G4endl;
 #endif
-	   Mprojectile2 = projectile->GetMass2()*(1.-perCent); // Isn't it too big reduction? M.K.
-	 }
+    Mprojectile2 = projectile->GetMass2()*(1.-perCent); // Isn't it too big reduction? M.K.
+  }
   else
   {
@@ -658,44 +661,44 @@
     G4cout<<"---1/2---G4QFragmentation::ExSingDiffParticipants: Target is fixed"<<G4endl;
 #endif
-	   Mtarget2 = target->GetMass2()*(1.-perCent); // @@ Isn't it too big reduction? M.K.
-	 }
+    Mtarget2 = target->GetMass2()*(1.-perCent); // @@ Isn't it too big reduction? M.K.
+  }
   // @@ From this point it repeats the Diffractional excitation (? Use flag ?)
   // Transform momenta to cms and then rotate parallel to z axis;
-	 G4LorentzVector Psum=Pprojectile+Ptarget;
-	 G4LorentzRotation toCms(-Psum.boostVector()); // Boost Rotation to CMS
-	 G4LorentzVector Ptmp=toCms*Pprojectile;
-	 if(Ptmp.pz()<=0.) // "String" moving backwards in CMS, abort collision !! ? M.K.
-	 {
-#ifdef debug
-	   G4cout<<"G4QFragment::ExciteSingDiffParticipants: *1* abort Collision!! *1*"<<G4endl;
-#endif
-		  return false; 
-	 }	   		   
-	 toCms.rotateZ(-Ptmp.phi());
-	 toCms.rotateY(-Ptmp.theta());
+  G4LorentzVector Psum=Pprojectile+Ptarget;
+  G4LorentzRotation toCms(-Psum.boostVector()); // Boost Rotation to CMS
+  G4LorentzVector Ptmp=toCms*Pprojectile;
+  if(Ptmp.pz()<=0.) // "String" moving backwards in CMS, abort collision !! ? M.K.
+  {
+#ifdef debug
+    G4cout<<"G4QFragment::ExciteSingDiffParticipants: *1* abort Collision!! *1*"<<G4endl;
+#endif
+    return false; 
+  }         
+  toCms.rotateZ(-Ptmp.phi());
+  toCms.rotateY(-Ptmp.theta());
 #ifdef debug
   G4cout<<"G4QFragm::ExciteSingDiffParticipantts: Be4Boost Pproj="<<Pprojectile<<",Ptarg="
         <<Ptarget<<G4endl;
 #endif
-	 G4LorentzRotation toLab(toCms.inverse()); // Boost Rotation to LabSys (LS)
-	 Pprojectile.transform(toCms);
-	 Ptarget.transform(toCms);
-#ifdef debug
-	 G4cout<< "G4QFragment::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<"Ptarg="
+  G4LorentzRotation toLab(toCms.inverse()); // Boost Rotation to LabSys (LS)
+  Pprojectile.transform(toCms);
+  Ptarget.transform(toCms);
+#ifdef debug
+  G4cout<< "G4QFragment::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<"Ptarg="
         <<Ptarget<<", cms4M="<<Pprojectile+Ptarget<<G4endl;
 
-	 G4cout<<"G4QFragment::ExciteDiffParticipantts: ProjX+="<<Pprojectile.plus()<<", ProjX-="
+  G4cout<<"G4QFragment::ExciteDiffParticipantts: ProjX+="<<Pprojectile.plus()<<", ProjX-="
         <<Pprojectile.minus()<<", TargX+="<< Ptarget.plus()<<", TargX-="<<Ptarget.minus()
         <<G4endl;
 #endif
-	 G4LorentzVector Qmomentum(0.,0.,0.,0.);
-	 G4int whilecount=0;
-	 do
-  {
-    //  Generate pt		
-	   G4double maxPtSquare=sqr(Ptarget.pz());
-	   if(whilecount++>=500 && whilecount%100==0) // @@ M.K. Hardwired limits 
-#ifdef debug
-	 	 G4cout<<"G4QFragment::ExciteSingDiffParticipantts: can loop, loopCount="<<whilecount
+  G4LorentzVector Qmomentum(0.,0.,0.,0.);
+  G4int whilecount=0;
+  do
+  {
+    //  Generate pt  
+    G4double maxPtSquare=sqr(Ptarget.pz());
+    if(whilecount++>=500 && whilecount%100==0) // @@ M.K. Hardwired limits 
+#ifdef debug
+    G4cout<<"G4QFragment::ExciteSingDiffParticipantts: can loop, loopCount="<<whilecount
           <<", maxPtSquare="<<maxPtSquare<<G4endl;
 #endif
@@ -705,7 +708,7 @@
       G4cout<<"G4QFragmentation::ExciteSingDiffParticipants: *2* abort Loop!! *2*"<<G4endl;
 #endif
-	 	   return false; 	  //  Ignore this interaction 
-    }
-	   Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
+      return false;    //  Ignore this interaction 
+    }
+    Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
 #ifdef debug
     G4cout<<"G4QFragm::ExciteSingDiffParticipants: generated Pt="<<Qmomentum<<", ProjPt="
@@ -713,49 +716,49 @@
 #endif
     //  Momentum transfer
-	   G4double Xmin = minmass/(Pprojectile.e() + Ptarget.e());
-	   G4double Xmax=1.;
-	   G4double Xplus =ChooseX(Xmin,Xmax);
-	   G4double Xminus=ChooseX(Xmin,Xmax);
-#ifdef debug
-	   G4cout<<"G4QFragm::ExciteSingDiffPartici:X-plus="<<Xplus<<",X-minus="<<Xminus<<G4endl;
-#endif
-	   G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
-	   G4double Qplus =-pt2/Xminus/Ptarget.minus();
-	   G4double Qminus= pt2/Xplus /Pprojectile.plus();
-	   if (KeepProjectile)
-	     Qminus=(projectile->GetMass2()+pt2)/(Pprojectile.plus()+Qplus) - Pprojectile.minus();
-	   else Qplus=Ptarget.plus() - (target->GetMass2()+pt2)/(Ptarget.minus()-Qminus);		
-	   Qmomentum.setPz((Qplus-Qminus)/2);
-	   Qmomentum.setE( (Qplus+Qminus)/2);
-#ifdef debug
-	   G4cout<<"G4QFragm::ExciteDiffParticip: Qplus="<<Qplus<<", Qminus="<<Qminus<<", pt2="
+    G4double Xmin = minmass/(Pprojectile.e() + Ptarget.e());
+    G4double Xmax=1.;
+    G4double Xplus =ChooseX(Xmin,Xmax);
+    G4double Xminus=ChooseX(Xmin,Xmax);
+#ifdef debug
+    G4cout<<"G4QFragm::ExciteSingDiffPartici:X-plus="<<Xplus<<",X-minus="<<Xminus<<G4endl;
+#endif
+    G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
+    G4double Qplus =-pt2/Xminus/Ptarget.minus();
+    G4double Qminus= pt2/Xplus /Pprojectile.plus();
+    if (KeepProjectile)
+      Qminus=(projectile->GetMass2()+pt2)/(Pprojectile.plus()+Qplus) - Pprojectile.minus();
+    else Qplus=Ptarget.plus() - (target->GetMass2()+pt2)/(Ptarget.minus()-Qminus);  
+    Qmomentum.setPz((Qplus-Qminus)/2);
+    Qmomentum.setE( (Qplus+Qminus)/2);
+#ifdef debug
+    G4cout<<"G4QFragm::ExciteDiffParticip: Qplus="<<Qplus<<", Qminus="<<Qminus<<", pt2="
           <<pt2<<", Qmomentum="<<Qmomentum<<", ProjM="<<(Pprojectile+Qmomentum).mag()
           <<", TargM="<<(Ptarget-Qmomentum).mag()<<G4endl;
 #endif
     // while is different from the Double Diffractive Excitation (@@ !)
-		  //} while((Pprojectile+Qmomentum).mag2()<= Mprojectile2 ||
+    //} while((Pprojectile+Qmomentum).mag2()<= Mprojectile2 ||
     //        (Ptarget-Qmomentum).mag2()<=Mtarget2);
-	 } while((Ptarget-Qmomentum).mag2()<=Mtarget2 ||
+  } while((Ptarget-Qmomentum).mag2()<=Mtarget2 ||
           (Pprojectile+Qmomentum).mag2()<=Mprojectile2 ||
           (Ptarget-Qmomentum).e() < 0. || (Pprojectile+Qmomentum).e() < 0.);
-	 Pprojectile += Qmomentum;
-	 Ptarget     -= Qmomentum;
-#ifdef debug
-	 G4cout<<"G4QFragmentation::ExciteSingDiffParticipan: Proj(Q)="<<Pprojectile<<"(E="
+  Pprojectile += Qmomentum;
+  Ptarget     -= Qmomentum;
+#ifdef debug
+  G4cout<<"G4QFragmentation::ExciteSingDiffParticipan: Proj(Q)="<<Pprojectile<<"(E="
         <<Pprojectile.e()<<"), Targ(Q)="<<Ptarget<<"(E="<<Ptarget.e()
-	       <<"), Proj(back)="<<toLab*Pprojectile<<", Targ(bac)="<< toLab*Ptarget << G4endl;
+        <<"), Proj(back)="<<toLab*Pprojectile<<", Targ(bac)="<< toLab*Ptarget << G4endl;
 #endif
   // Transform back and update SplitableHadron Participant.
-	 Pprojectile.transform(toLab);
-	 Ptarget.transform(toLab);
-#ifdef debug
-	 G4cout<< "G4QFragm::ExciteSingDiffParticipants: TargetMass="<<Ptarget.mag()<<G4endl;
-#endif
-	 target->Set4Momentum(Ptarget); 	
-#ifdef debug
-	 G4cout<<"G4QFragm::ExciteDiffParticipants:ProjectileMass="<<Pprojectile.mag()<<G4endl;
-#endif
-	 projectile->Set4Momentum(Pprojectile);
-	 return true;
+  Pprojectile.transform(toLab);
+  Ptarget.transform(toLab);
+#ifdef debug
+  G4cout<< "G4QFragm::ExciteSingDiffParticipants: TargetMass="<<Ptarget.mag()<<G4endl;
+#endif
+  target->Set4Momentum(Ptarget);  
+#ifdef debug
+  G4cout<<"G4QFragm::ExciteDiffParticipants:ProjectileMass="<<Pprojectile.mag()<<G4endl;
+#endif
+  projectile->Set4Momentum(Pprojectile);
+  return true;
 } // End of ExciteSingleDiffParticipants
 
@@ -767,7 +770,7 @@
   QGSMThershold      = QGSMth;         // QGSM threshold
   theNucleonRadius   = radNuc;         // effective radius of the nucleon inside Nucleus
-	 widthOfPtSquare    = -2*SigPt*SigPt;	// width^2 of pt for string excitation
-	 minExtraMass       = extraM;	        // minimum excitation mass 
-	 minmass            = minM;	          // mean pion transverse mass; used for Xmin 
+  widthOfPtSquare    = -2*SigPt*SigPt; // width^2 of pt for string excitation
+  minExtraMass       = extraM;         // minimum excitation mass 
+  minmass            = minM;           // mean pion transverse mass; used for Xmin 
 }
 
@@ -776,16 +779,16 @@
 // choose an x between Xmin and Xmax with P(x) ~ 1/x
 //  to be improved...
-	 G4double range=Xmax-Xmin;
-	 if( Xmin<= 0. || range <=0.) 
-	 {
-		  G4cerr<<"***G4QFragmentation::ChooseX: Xmin="<<Xmin<<", Xmax="<<Xmax<< G4endl;
+  G4double range=Xmax-Xmin;
+  if( Xmin<= 0. || range <=0.) 
+  {
+    G4cerr<<"***G4QFragmentation::ChooseX: Xmin="<<Xmin<<", Xmax="<<Xmax<< G4endl;
     G4Exception("G4QFragmentation::ChooseX:","72",FatalException,"BadXRange");
-	 }
-	 G4double x;
-	 do {x=Xmin+G4UniformRand()*range;} while ( Xmin/x < G4UniformRand() );
+  }
+  G4double x;
+  do {x=Xmin+G4UniformRand()*range;} while ( Xmin/x < G4UniformRand() );
 #ifdef debug
   G4cout<<"G4QFragmentation::ChooseX: DiffractiveX="<<x<<G4endl;
 #endif
-	 return x;
+  return x;
 } // End of ChooseX
 
@@ -793,7 +796,7 @@
 G4ThreeVector G4QFragmentation::GaussianPt(G4double widthSq, G4double maxPtSquare) const
 {
-	 G4double pt2; do{pt2=widthSq*std::log(G4UniformRand());} while (pt2>maxPtSquare);
-		pt2=std::sqrt(pt2);
-	 G4double phi=G4UniformRand()*twopi;
-	 return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.);    
+  G4double pt2; do{pt2=widthSq*std::log(G4UniformRand());} while (pt2>maxPtSquare);
+  pt2=std::sqrt(pt2);
+  G4double phi=G4UniformRand()*twopi;
+  return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.);    
 } // End of GaussianPt
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QHadron.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QHadron.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QHadron.cc	(revision 1055)
@@ -25,11 +25,16 @@
 //
 //
-// $Id: G4QHadron.cc,v 1.53 2008/03/20 20:11:38 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QHadron.cc,v 1.54 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QHadron ----------------
 //             by Mikhail Kossov, Sept 1999.
 //      class for Quasmon initiated Hadrons generated by CHIPS Model
-// ------------------------------------------------------------------
+// -------------------------------------------------------------------
+// Short description: In CHIPS all particles are G4QHadrons, while they
+// can be leptons, gammas or nuclei. The G4QPDGCode makes the difference.
+// In addition the 4-momentum is a basic value, so the mass can be
+// different from the GS mass (e.g. for the virtual gamma).
+// -------------------------------------------------------------------
 //
 //#define debug
@@ -92,5 +97,5 @@
     G4int cPDG=theQPDG.GetPDGCode();
     if(cPDG>80000000) DefineQC(cPDG);
-	   else G4cerr<<"***G4QHadr:(QP) PDG="<<cPDG<<" use other constructor"<<G4endl;
+    else G4cerr<<"***G4QHadr:(QP) PDG="<<cPDG<<" use other constructor"<<G4endl;
   }
 }
@@ -99,5 +104,5 @@
 G4QHadron::G4QHadron(G4QContent QC, G4LorentzVector p): theQPDG(0),theMomentum(p),valQ(QC),
   nFragm(0),thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true),
-		Color(),AntiColor(),bindE(0.),formTime(0.)
+  Color(),AntiColor(),bindE(0.),formTime(0.)
 {
   G4int curPDG=valQ.GetSPDGCode();
@@ -156,5 +161,5 @@
   Direction           = right.Direction;
   bindE               = right.bindE;
-		formTime            = right.formTime;
+  formTime            = right.formTime;
 }
 
@@ -170,5 +175,5 @@
   Direction           = right->Direction;
   bindE               = right->bindE;
-		formTime            = right->formTime;
+  formTime            = right->formTime;
 }
 
@@ -184,5 +189,5 @@
   Direction           = right->Direction;
   bindE               = right->bindE;
-		formTime            = right->formTime;
+  formTime            = right->formTime;
 }
 
@@ -306,8 +311,8 @@
     G4double emodif=std::fabs(dE-vP);
     //if(emodif<accuracy)
-				//{
+    //{
       G4cerr<<"G4QHadron::RelDecIn2: *Boost* E-p shift is corrected to "<<emodif<<G4endl;
       theMomentum.setE(vP+emodif+.01*accuracy);
-				//}
+    //}
   }
   G4ThreeVector ltb = theMomentum.boostVector();// Boost vector for backward Lorentz Trans.
@@ -429,5 +434,5 @@
     cosp=-cosp;
     neg=true;
-		}
+  }
   if(dE<vP)
   {
@@ -436,8 +441,8 @@
     G4double emodif=std::fabs(dE-vP);
     //if(emodif<accuracy)
-				//{
+    //{
       G4cerr<<"G4QHadron::CopDecIn2: *Boost* E-p shift is corrected to "<<emodif<<G4endl;
       theMomentum.setE(vP+emodif+.01*accuracy);
-				//}
+    //}
   }
   G4ThreeVector ltb = theMomentum.boostVector();// Boost vector for backward Lorentz Trans.
@@ -594,7 +599,7 @@
   if(theMomentum.e()<theMomentum.rho())
   {
-	   G4cerr<<"*G4QH::DecIn2:*Boost* 4M="<<theMomentum<<",e-p="
+    G4cerr<<"*G4QH::DecIn2:*Boost* 4M="<<theMomentum<<",e-p="
           <<theMomentum.e()-theMomentum.rho()<<G4endl;
-	   //throw G4QException("G4QHadron::DecayIn2: Decay of particle with zero mass")
+    //throw G4QException("G4QHadron::DecayIn2: Decay of particle with zero mass")
     theMomentum.setE(1.0000001*theMomentum.rho());
   }
@@ -607,5 +612,5 @@
     G4double emodif=std::fabs(dE-vP);
     if(emodif<accuracy)
-				{
+    {
       G4cerr<<"G4QHadron::DecayIn2: *Boost* E-p shift is corrected to "<<emodif<<G4endl;
       theMomentum.setE(vP+emodif+.01*accuracy);
@@ -822,5 +827,5 @@
     G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2);
     if(dif<0.)
-	   {
+    {
 #ifdef debug
       if(dif<-.01) G4cerr<<"*G4QHadron::DecayIn3:iM="<<iM<<",tM="<<tM<<",sM="<<sM<<",fM="
@@ -841,5 +846,5 @@
   {
     G4cerr<<"***G4QHadron::DecayIn3: Exception1"<<G4endl;
-	   //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
+    //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
     return false;
   }
@@ -850,5 +855,5 @@
   {
     G4cerr<<"***G4QHadron::DecayIn3: Error in DecayIn2 -> Exception2"<<G4endl;
-	   //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
+    //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
     return false;
   }
@@ -907,5 +912,5 @@
     G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2);
     if(dif<0.)
-	   {
+    {
 #ifdef debug
       if(dif<-.01) G4cerr<<"G4QHadron::RelDecayIn3:iM="<<iM<<",tM="<<tM<<",sM="<<sM<<",fM="
@@ -926,5 +931,5 @@
   {
     G4cerr<<"***G4QHadron::RelDecayIn3: Exception1"<<G4endl;
-	   //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
+    //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
     return false;
   }
@@ -935,5 +940,5 @@
   {
     G4cerr<<"***G4QHadron::RelDecayIn3: Error in DecayIn2 -> Exception2"<<G4endl;
-	   //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
+    //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
     return false;
   }
@@ -991,5 +996,5 @@
     G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2);
     if(dif<0.)
-	   {
+    {
 #ifdef debug
       if(dif<-.01) G4cerr<<"G4QHadron::CopDecayIn3:iM="<<iM<<",tM="<<tM<<",sM="<<sM<<",fM="
@@ -1010,5 +1015,5 @@
   {
     G4cerr<<"***G4QHadron::CopDecayIn3: Exception1"<<G4endl;
-	   //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
+    //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
     return false;
   }
@@ -1019,5 +1024,5 @@
   {
     G4cerr<<"***G4QHadron::CopDecayIn3: Error in DecayIn2 -> Exception2"<<G4endl;
-	   //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
+    //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
     return false;
   }
@@ -1045,5 +1050,5 @@
   {
 #ifdef debug
-	   if(meanM>maxM) G4cerr<<"***G4QHadron::RandM:Stable m="<<meanM<<">maxM="<<maxM<<G4endl;
+    if(meanM>maxM) G4cerr<<"***G4QHadron::RandM:Stable m="<<meanM<<">maxM="<<maxM<<G4endl;
 #endif
     return meanM;
@@ -1052,6 +1057,6 @@
   else if(width<0.)
   {
-	   G4cerr<<"***G4QHadron::RandM: width="<<width<<"<0,PDGC="<<theQPDG.GetPDGCode()<<G4endl;
-	   throw G4QException("G4QHadron::RandomizeMass: with the width of the Hadron < 0.");
+    G4cerr<<"***G4QHadron::RandM: width="<<width<<"<0,PDGC="<<theQPDG.GetPDGCode()<<G4endl;
+    throw G4QException("G4QHadron::RandomizeMass: with the width of the Hadron < 0.");
   }
   G4double minM = pPart->MinMassOfFragm();
@@ -1059,5 +1064,5 @@
   {
 #ifdef debug
-	   G4cout<<"***G4QHadron::RandomizeMass:for PDG="<<theQPDG.GetPDGCode()<<" minM="<<minM
+    G4cout<<"***G4QHadron::RandomizeMass:for PDG="<<theQPDG.GetPDGCode()<<" minM="<<minM
           <<" > maxM="<<maxM<<G4endl;
 #endif
@@ -1107,6 +1112,8 @@
     //G4cout<<"DSU 2: Right4M="<<RightMom<<", Left4M= "<<LeftMom<<G4endl;
 
-    G4double Local1 = HadronMom.minus() + (RightMom.perp2() - LeftMom.perp2())/HadronMom.plus();
-    G4double Local2 = std::sqrt(std::max(0., sqr(Local1) - 4.*RightMom.perp2()*HadronMom.minus()/HadronMom.plus()));
+    G4double Local1 = HadronMom.minus() +
+                      (RightMom.perp2() - LeftMom.perp2()) / HadronMom.plus();
+    G4double Local2 = std::sqrt(std::max(0., Local1*Local1 -
+                                4*RightMom.perp2()*HadronMom.minus() / HadronMom.plus()));
     //G4cout<<"DSU 3: L1="<< Local1 <<", L2="<<Local2<<G4endl;
 
@@ -1140,6 +1147,6 @@
     // here the condition,to ensure viability of splitting, also in cases
     // where difractive excitation occured together with soft scattering.
-    //   G4double LightConeMomentum = (Direction)? Get4Momentum().plus() : Get4Momentum().minus();
-    //   G4double Xmin = theMinPz/LightConeMomentum;
+    //G4double LightConeMomentum=(Direction)? Get4Momentum().plus():Get4Momentum().minus();
+    //G4double Xmin = theMinPz/LightConeMomentum;
     G4double Xmin = theMinPz/( Get4Momentum().e() - GetMass() );
     while(Xmin>=1-(2*nSeaPair+1)*Xmin) Xmin*=0.95;
@@ -1155,12 +1162,12 @@
       G4QParton* aParton = BuildSeaQuark(false, aPDGCode);
 
-      //		G4cout << "G4QGSMSplitableHadron::SoftSplitUp()" << G4endl;
-
-      //		G4cout << "Parton 1: " 
-      //		       << " PDGcode: "  << aPDGCode
-      //		       << " - Name: "   << aParton->GetDefinition()->GetParticleName()
-      //		       << " - Type: "   << aParton->GetDefinition()->GetParticleType() 
-      //		       << " - Spin-3: " << aParton->GetSpinZ() 
-      //		       << " - Colour: " << aParton->GetColour() << G4endl;
+      //  G4cout << "G4QGSMSplitableHadron::SoftSplitUp()" << G4endl;
+
+      //  G4cout << "Parton 1: " 
+      //         << " PDGcode: "  << aPDGCode
+      //         << " - Name: "   << aParton->GetDefinition()->GetParticleName()
+      //         << " - Type: "   << aParton->GetDefinition()->GetParticleType() 
+      //         << " - Spin-3: " << aParton->GetSpinZ() 
+      //         << " - Colour: " << aParton->GetColour() << G4endl;
 
       // save colour a spin-3 for anti-quark
@@ -1177,11 +1184,11 @@
       aParton->SetColour(-firstPartonColour);
 
-      //		G4cout << "Parton 2: " 
-      //		       << " PDGcode: "  << -aPDGCode
-      //		       << " - Name: "   << aParton->GetDefinition()->GetParticleName()
-      //		       << " - Type: "   << aParton->GetDefinition()->GetParticleType() 
-      //		       << " - Spin-3: " << aParton->GetSpinZ() 
-      //		       << " - Colour: " << aParton->GetColour() << G4endl;
-      //		G4cerr << "------------" << G4endl;
+      //  G4cout << "Parton 2: " 
+      //         << " PDGcode: "  << -aPDGCode
+      //         << " - Name: "   << aParton->GetDefinition()->GetParticleName()
+      //         << " - Type: "   << aParton->GetDefinition()->GetParticleType() 
+      //         << " - Spin-3: " << aParton->GetSpinZ() 
+      //         << " - Colour: " << aParton->GetColour() << G4endl;
+      //  G4cerr << "------------" << G4endl;
 
       SumPx += aParton->Get4Momentum().px();
@@ -1239,8 +1246,8 @@
       ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
       HPWtest = ColorX;
-      while (ColorX < Xmin || ColorX > 1.|| 1. -  ColorX <= Xmin) {
-        ;  // Possible dead loop?  Don't know why this loop is here - DHW
-      } 
-      Color.back()->SetX(SumX = ColorX);// this is the valenz quark.
+      //while (ColorX < Xmin || ColorX > 1. || 1. -  ColorX <= Xmin)
+      //{
+      //} 
+      Color.back()->SetX(SumX = ColorX); // this is the valenz quark.
 
       std::list<G4QParton*>::iterator icolor = Color.begin();
@@ -1263,5 +1270,6 @@
     AntiColor.back()->SetX(1.0 - SumX); // the di-quark takes the rest, then go to momentum
     // and here is the bug ;-) @@@@@@@@@@@@@
-    if(getenv("debug_QGSMSplitableHadron") )G4cout << "particle energy at split = "<<Get4Momentum().t()<<G4endl;
+    if(getenv("debug_QGSMSplitableHadron"))
+                         G4cout<<"particle energy at split = "<<Get4Momentum().t()<<G4endl;
     G4double lightCone = ((!Direction) ? Get4Momentum().minus() : Get4Momentum().plus());
     // lightCone -= 0.5*Get4Momentum().m();
@@ -1320,5 +1328,5 @@
   if(anXmin > xMax) 
   {
-				G4cerr<<"***G4QHadron::SampleX: anXmin="<<anXmin<<" > xMax="<<xMax<<", nSea="<<nSea
+    G4cerr<<"***G4QHadron::SampleX: anXmin="<<anXmin<<" > xMax="<<xMax<<", nSea="<<nSea
           <<", totSea="<<totalSea<<G4endl;
     G4Exception("G4QHadron::SampleX:","72",FatalException,"TooBigXValue");
@@ -1349,22 +1357,22 @@
   Parton1->SetPosition(GetPosition());
 
-//	G4cerr << "G4QGSMSplitableHadron::GetValenceQuarkFlavors()" << G4endl;
-//	G4cerr << "Parton 1: " 
-//	       << " PDGcode: "  << aEnd
-//	       << " - Name: "   << Parton1->GetDefinition()->GetParticleName()
-//	       << " - Type: "   << Parton1->GetDefinition()->GetParticleType() 
-//	       << " - Spin-3: " << Parton1->GetSpinZ() 
-//	       << " - Colour: " << Parton1->GetColour() << G4endl;
+// G4cerr << "G4QGSMSplitableHadron::GetValenceQuarkFlavors()" << G4endl;
+// G4cerr << "Parton 1: " 
+//        << " PDGcode: "  << aEnd
+//        << " - Name: "   << Parton1->GetDefinition()->GetParticleName()
+//        << " - Type: "   << Parton1->GetDefinition()->GetParticleType() 
+//        << " - Spin-3: " << Parton1->GetSpinZ() 
+//        << " - Colour: " << Parton1->GetColour() << G4endl;
 
   Parton2 = new G4QParton(bEnd);
   Parton2->SetPosition(GetPosition());
 
-//	G4cerr << "Parton 2: " 
-//	       << " PDGcode: "  << bEnd
-//	       << " - Name: "   << Parton2->GetDefinition()->GetParticleName()
-//	       << " - Type: "   << Parton2->GetDefinition()->GetParticleType() 
-//	       << " - Spin-3: " << Parton2->GetSpinZ() 
-//	       << " - Colour: " << Parton2->GetColour() << G4endl;
-//	G4cerr << "... now checking for color and spin conservation - yielding: " << G4endl;
+// G4cerr << "Parton 2: " 
+//        << " PDGcode: "  << bEnd
+//        << " - Name: "   << Parton2->GetDefinition()->GetParticleName()
+//        << " - Type: "   << Parton2->GetDefinition()->GetParticleType() 
+//        << " - Spin-3: " << Parton2->GetSpinZ() 
+//        << " - Colour: " << Parton2->GetColour() << G4endl;
+// G4cerr << "... now checking for color and spin conservation - yielding: " << G4endl;
 
   // colour of parton 1 choosen at random by G4QParton(aEnd)
@@ -1373,21 +1381,19 @@
   Parton2->SetColour(-(Parton1->GetColour()));
 
-	// isospin-3 of both partons is handled by G4Parton(PDGCode)
-
-	// spin-3 of parton 1 and 2 choosen at random by G4QParton(aEnd)
-	// spin-3 of parton 2 may be constrained by spin of original particle:
+ // isospin-3 of both partons is handled by G4Parton(PDGCode)
+
+ // spin-3 of parton 1 and 2 choosen at random by G4QParton(aEnd)
+ // spin-3 of parton 2 may be constrained by spin of original particle:
 
   if ( std::abs(Parton1->GetSpinZ() + Parton2->GetSpinZ()) > GetSpin()) 
-  {
-		Parton2->SetSpinZ(-(Parton2->GetSpinZ()));    
-  } 
-
-//	G4cerr << "Parton 2: " 
-//	       << " PDGcode: "  << bEnd
-//	       << " - Name: "   << Parton2->GetDefinition()->GetParticleName()
-//	       << " - Type: "   << Parton2->GetDefinition()->GetParticleType() 
-//	       << " - Spin-3: " << Parton2->GetSpinZ() 
-//	       << " - Colour: " << Parton2->GetColour() << G4endl;
-//	G4cerr << "------------" << G4endl;
+                                                 Parton2->SetSpinZ(-(Parton2->GetSpinZ()));
+
+// G4cerr << "Parton 2: " 
+//        << " PDGcode: "  << bEnd
+//        << " - Name: "   << Parton2->GetDefinition()->GetParticleName()
+//        << " - Type: "   << Parton2->GetDefinition()->GetParticleType() 
+//        << " - Spin-3: " << Parton2->GetSpinZ() 
+//        << " - Colour: " << Parton2->GetColour() << G4endl;
+// G4cerr << "------------" << G4endl;
 
 } // End of GetValenceQuarkFlavors
@@ -1429,5 +1435,5 @@
   static const G4double r12=1./12.;
   //
-		std::pair<G4int,G4int> qdq[5];
+  std::pair<G4int,G4int> qdq[5];
   G4double               prb[5];
   G4int                  nc=0;
@@ -1447,6 +1453,6 @@
     qdq[2]=make_pair(1103, 2); prb[2]=r3;    // dd_1, u
   }
-		else if(aPDGcode%10<3)                     // ==> Spin 1/2 Hyperons
-		{
+  else if(aPDGcode%10<3)                     // ==> Spin 1/2 Hyperons
+  {
     if(aPDGcode==3122)
     {
@@ -1585,7 +1591,5 @@
 {
   G4double R=0.;
-  while ((R = -widthSquare*std::log(G4UniformRand())) > maxPtSquare) {
-    ;
-  }
+  while ((R = -widthSquare*std::log(G4UniformRand())) > maxPtSquare){}
   R = std::sqrt(R);
   G4double phi = twopi*G4UniformRand();
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QHadronBuilder.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QHadronBuilder.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QHadronBuilder.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QHadronBuilder.cc,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QHadronBuilder.cc,v 1.4 2009/04/29 07:53:18 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -----------------------------------------------------------------------------
@@ -36,4 +36,11 @@
 //      G4HadronBuilder
 // -----------------------------------------------------------------------------
+// Short description: A CHIPS class for the builder of the G4QHadron, which is a
+// resulting object for the string fragmentation. the G4QHadron has specific
+// parameters, which are not included in the G4QParticle from the CHIPS World,
+// but necessary for the string fragmentation. When the G4QHadron is created
+// (builded), it is converted to the CHIPS particle.
+// -----------------------------------------------------------------------------
+
 
 //#define debug
@@ -45,6 +52,6 @@
 G4QHadronBuilder::G4QHadronBuilder()
 {
-	 mesonSpinMix = 0.5;	                    // probability to create vector meson 
-	 baryonSpinMix= 0.5;                     // probability to create 3/2 baryon 
+  mesonSpinMix = 0.5;                     // probability to create vector meson 
+  baryonSpinMix= 0.5;                     // probability to create 3/2 baryon 
   scalarMesonMixings.resize(6);
   scalarMesonMixings[0] = 0.5; 
@@ -65,31 +72,31 @@
 G4QHadron* G4QHadronBuilder::Build(G4QParton* black, G4QParton* white)
 {
-	 if(black->GetParticleSubType()=="di_quark" || white->GetParticleSubType()=="di_quark")
+  if(black->GetParticleSubType()=="di_quark" || white->GetParticleSubType()=="di_quark")
   {
     // Baryon consists of quark and at least one di-quark
-	   Spin spin = (G4UniformRand() < baryonSpinMix) ? SpinHalf : SpinThreeHalf;
-	   return Baryon(black,white,spin);
-	 }
+    Spin spin = (G4UniformRand() < baryonSpinMix) ? SpinHalf : SpinThreeHalf;
+    return Baryon(black,white,spin);
+  }
   else
-  {	
+  { 
     // Meson consists of quark and abnti-quark
-	   Spin spin = (G4UniformRand() < mesonSpinMix) ? SpinZero : SpinOne;
-	   return Meson(black,white,spin);
-	 }
+    Spin spin = (G4UniformRand() < mesonSpinMix) ? SpinZero : SpinOne;
+    return Meson(black,white,spin);
+  }
 }
 
 G4QHadron* G4QHadronBuilder::BuildLowSpin(G4QParton* black, G4QParton* white)
 {
-	 if(black->GetParticleSubType() == "quark" && white->GetParticleSubType() == "quark")
-		      return Meson(black,white, SpinZero);
-  //	returns a SpinThreeHalf Baryon if all quarks are the same
-	 else		return Baryon(black,white, SpinHalf);
+  if(black->GetParticleSubType() == "quark" && white->GetParticleSubType() == "quark")
+        return Meson(black,white, SpinZero);
+  // returns a SpinThreeHalf Baryon if all quarks are the same
+  else  return Baryon(black,white, SpinHalf);
 }
 
 G4QHadron* G4QHadronBuilder::BuildHighSpin(G4QParton* black, G4QParton* white)
 {
- 	if(black->GetParticleSubType() == "quark" && white->GetParticleSubType() == "quark")
-		     return Meson(black,white, SpinOne);
-	 else return Baryon(black,white,SpinThreeHalf);
+  if(black->GetParticleSubType() == "quark" && white->GetParticleSubType() == "quark")
+       return Meson(black,white, SpinOne);
+  else return Baryon(black,white,SpinThreeHalf);
 }
 
@@ -98,52 +105,56 @@
 #ifdef debug
   //  Verify Input Charge
-  G4double charge =  black->GetPDGCharge() + white->GetPDGCharge();	 
+  G4double charge =  black->GetPDGCharge() + white->GetPDGCharge();  
   if (std::abs(charge)>2 || std::abs(3*(charge-G4int(charge*1.001))) > perCent)
-	   G4cerr<<"-Warning-G4QHadronBuilder::Meson: invalid TotalCharge="<<charge<<", PDG_q1=" 
+    G4cerr<<"-Warning-G4QHadronBuilder::Meson: invalid TotalCharge="<<charge<<", PDG_q1=" 
           <<black->GetPDGEncoding()<< ", PDG_q2="<<white->GetPDGEncoding()<<G4endl;
-#endif	
-	
-	 G4int id1= black->GetPDGCode();
-	 G4int id2= white->GetPDGCode();
-	 if (std::abs(id1) < std::abs(id2))     // exchange black and white
-	 {
-	   G4int xchg = id1; 
-	   id1 = id2;  
-	   id2 = xchg;
-	 }
-	 if(std::abs(id1)>3) 
-	 {
-				G4cerr<<"***G4QHadronBuilder::Meson: q1="<<id1<<", q2="<<id2
+#endif 
+ 
+  G4int id1= black->GetPDGCode();
+  G4int id2= white->GetPDGCode();
+  if (std::abs(id1) < std::abs(id2))     // exchange black and white
+  {
+    G4int xchg = id1; 
+    id1 = id2;  
+    id2 = xchg;
+  }
+  if(std::abs(id1)>3) 
+  {
+    G4cerr<<"***G4QHadronBuilder::Meson: q1="<<id1<<", q2="<<id2
           <<" while CHIPS is only SU(3)"<<G4endl;
     G4Exception("G4QHadronBuilder::Meson:","72",FatalException,"HeavyQuarkFound");
-  }	
+  } 
   G4int PDGEncoding=0;
-	 if(!(id1+id2))                      // annihilation case (neutral)
+  if(!(id1+id2))                      // annihilation case (neutral)
   {     
-	   G4double rmix = G4UniformRand();
-	   G4int    imix = 2*std::abs(id1) - 1;
-	   if(theSpin == SpinZero)
-	      PDGEncoding = 110*(1 + G4int(rmix + scalarMesonMixings[imix - 1])
-        	                   + G4int(rmix + scalarMesonMixings[imix]    ) ) +  theSpin;
-		  else
-	      PDGEncoding = 110*(1 + G4int(rmix + vectorMesonMixings[imix - 1])
-                    				    + G4int(rmix + vectorMesonMixings[imix]    ) ) +  theSpin;
-	 }
+    G4double rmix = G4UniformRand();
+    G4int    imix = 2*std::abs(id1) - 1;
+    if(theSpin == SpinZero)
+       PDGEncoding = 110*(1 + G4int(rmix + scalarMesonMixings[imix - 1])
+                            + G4int(rmix + scalarMesonMixings[imix]    ) ) +  theSpin;
+    else
+       PDGEncoding = 110*(1 + G4int(rmix + vectorMesonMixings[imix - 1])
+                            + G4int(rmix + vectorMesonMixings[imix]    ) ) +  theSpin;
+  }
   else
   {
-	   PDGEncoding = 100 * std::abs(id1) + 10 * std::abs(id2) +  theSpin;  
-	   G4bool IsUp = (std::abs(id1)&1) == 0;	// quark 1 is up type quark (u or c?)
-	   G4bool IsAnti = id1 < 0; 		           // quark 1 is an antiquark?
-	   if( (IsUp && IsAnti) || (!IsUp && !IsAnti) )  PDGEncoding = - PDGEncoding;
-	 }
-	 G4QHadron* Meson= new G4QHadron(PDGEncoding);
-#ifdef debug
-	 if(std::abs(black->GetPDGCharge() + white->GetPDGCharge() - Meson->GetCharge()) > .001)
-	   G4cout<<"-Warning-G4QHadronBuilder::Meson:wrongCharge, q1="<<black->GetPDGCharge()<<"("
+    PDGEncoding = 100 * std::abs(id1) + 10 * std::abs(id2) +  theSpin;  
+    G4bool IsUp = (std::abs(id1)&1) == 0; // quark 1 is up type quark (u or c?)
+    G4bool IsAnti = id1 < 0;              // quark 1 is an antiquark?
+    if( (IsUp && IsAnti) || (!IsUp && !IsAnti) )  PDGEncoding = - PDGEncoding;
+    // Correction for the true neutral mesons
+    if( PDGEncoding == -111 || PDGEncoding == -113 || PDGEncoding == -223 || 
+        PDGEncoding == -221 || PDGEncoding == -331 || PDGEncoding == -333 )
+                                                               PDGEncoding = - PDGEncoding;
+  }
+  G4QHadron* Meson= new G4QHadron(PDGEncoding);
+#ifdef debug
+  if(std::abs(black->GetPDGCharge() + white->GetPDGCharge() - Meson->GetCharge()) > .001)
+    G4cout<<"-Warning-G4QHadronBuilder::Meson:wrongCharge, q1="<<black->GetPDGCharge()<<"("
           <<black->->GetParticleName()<<"), q2="<<white->GetPDGCharge()<<"("
           <<white->->GetParticleName()<<"), qM="<<Meson->GetCharge()<<"/"<<PDGEncoding
           <<G4endl;
 #endif
-	return Meson;
+  return Meson;
 }
 
@@ -152,42 +163,42 @@
 #ifdef debug
   //  Verify Input Charge
-  G4double charge =  black->GetPDGCharge() + white->GetPDGCharge();	 
+  G4double charge =  black->GetPDGCharge() + white->GetPDGCharge();  
   if(std::abs(charge) > 2 || std::abs(3*(charge - G4int(charge*1.001))) > perCent )
-	   G4cerr<<"-Warning-G4QHadronBuilder::Baryon: invalid TotalCharge="<<charge<<", PDG_q1=" 
+    G4cerr<<"-Warning-G4QHadronBuilder::Baryon: invalid TotalCharge="<<charge<<", PDG_q1=" 
           <<black->GetPDGEncoding()<< ", PDG_q2="<<white->GetPDGEncoding()<<G4endl;
-#endif	
-	 G4int id1= black->GetPDGCode();
-	 G4int id2= white->GetPDGCode();
-	 if(std::abs(id1) < std::abs(id2))
-	 {
-	   G4int xchg = id1; 
-	   id1 = id2;  
-	   id2 = xchg;
-	 }
-	 if(std::abs(id1)<1000 || std::abs(id2)> 3) 
-	 {
-				G4cerr<<"***G4QHadronBuilder::Baryon: q1="<<id1<<", q2="<<id2
+#endif 
+  G4int id1= black->GetPDGCode();
+  G4int id2= white->GetPDGCode();
+  if(std::abs(id1) < std::abs(id2))
+  {
+    G4int xchg = id1; 
+    id1 = id2;  
+    id2 = xchg;
+  }
+  if(std::abs(id1)<1000 || std::abs(id2)> 3) 
+  {
+    G4cerr<<"***G4QHadronBuilder::Baryon: q1="<<id1<<", q2="<<id2
           <<" can't create a Baryon"<<G4endl;
     G4Exception("G4QHadronBuilder::Baryon:","72",FatalException,"WrongQdQSequence");
   }
-	 G4int ifl1= std::abs(id1)/1000;
-	 G4int ifl2 = (std::abs(id1) - ifl1 * 1000)/100;
-	 G4int diquarkSpin = std::abs(id1)%10; 
-	 G4int ifl3 = id2;
-	 if (id1 < 0) {ifl1 = - ifl1; ifl2 = - ifl2;}
-	 //... Construct baryon, distinguish Lambda and Sigma baryons.
-	 G4int kfla = std::abs(ifl1);
-	 G4int kflb = std::abs(ifl2);
-	 G4int kflc = std::abs(ifl3);
-	 G4int kfld = std::max(kfla,kflb);
-	       kfld = std::max(kfld,kflc);
-	 G4int kflf = std::min(kfla,kflb);
-	       kflf = std::min(kflf,kflc);
-	 G4int kfle = kfla + kflb + kflc - kfld - kflf;
-	 //... baryon with content uuu or ddd or sss has always spin = 3/2
-	 if(kfla==kflb && kflb==kflc) theSpin=SpinThreeHalf;   
-
-	 G4int kfll = 0;
-	 if(theSpin == SpinHalf && kfld > kfle && kfle > kflf)
+  G4int ifl1= std::abs(id1)/1000;
+  G4int ifl2 = (std::abs(id1) - ifl1 * 1000)/100;
+  G4int diquarkSpin = std::abs(id1)%10; 
+  G4int ifl3 = id2;
+  if (id1 < 0) {ifl1 = - ifl1; ifl2 = - ifl2;}
+  //... Construct baryon, distinguish Lambda and Sigma baryons.
+  G4int kfla = std::abs(ifl1);
+  G4int kflb = std::abs(ifl2);
+  G4int kflc = std::abs(ifl3);
+  G4int kfld = std::max(kfla,kflb);
+        kfld = std::max(kfld,kflc);
+  G4int kflf = std::min(kfla,kflb);
+        kflf = std::min(kflf,kflc);
+  G4int kfle = kfla + kflb + kflc - kfld - kflf;
+  //... baryon with content uuu or ddd or sss has always spin = 3/2
+  if(kfla==kflb && kflb==kflc) theSpin=SpinThreeHalf;   
+
+  G4int kfll = 0;
+  if(theSpin == SpinHalf && kfld > kfle && kfle > kflf)
   { 
     // Spin J=1/2 and all three quarks different
@@ -195,23 +206,23 @@
     //   -  lambda: s(ud)0 s : 3122; ie. reverse the two lighter quarks
     //   -  sigma0: s(ud)1 s : 3212
-	   if(diquarkSpin == 1 )
+    if(diquarkSpin == 1 )
     {
-	      if ( kfla == kfld) kfll = 1; // heaviest quark in diquark
-	      else kfll = G4int(0.25 + G4UniformRand());
-	   }   
-	   if(diquarkSpin==3 && kfla!=kfld) kfll = G4int(0.75+G4UniformRand());
-	 }
-	 G4int PDGEncoding=0;
-	 if (kfll == 1) PDGEncoding = 1000 * kfld + 100 * kflf + 10 * kfle + theSpin;
-	 else           PDGEncoding = 1000 * kfld + 100 * kfle + 10 * kflf + theSpin;
- 	if (id1 < 0) PDGEncoding = -PDGEncoding;
-	 G4QHadron* Baryon= new G4QHadron(PDGEncoding);
-#ifdef debug
-	 if(std::abs(black->GetPDGCharge() + white->GetPDGCharge()- Baryon->GetCharge()) > .001)
-	   G4cout<<"-Warning-G4QHadronBuilder::Baryon:wrongCharge,dq="<<black->GetPDGCharge()<<"("
+       if ( kfla == kfld) kfll = 1; // heaviest quark in diquark
+       else kfll = G4int(0.25 + G4UniformRand());
+    }   
+    if(diquarkSpin==3 && kfla!=kfld) kfll = G4int(0.75+G4UniformRand());
+  }
+  G4int PDGEncoding=0;
+  if (kfll == 1) PDGEncoding = 1000 * kfld + 100 * kflf + 10 * kfle + theSpin;
+  else           PDGEncoding = 1000 * kfld + 100 * kfle + 10 * kflf + theSpin;
+  if (id1 < 0) PDGEncoding = -PDGEncoding;
+  G4QHadron* Baryon= new G4QHadron(PDGEncoding);
+#ifdef debug
+  if(std::abs(black->GetPDGCharge() + white->GetPDGCharge()- Baryon->GetCharge()) > .001)
+    G4cout<<"-Warning-G4QHadronBuilder::Baryon:wrongCharge,dq="<<black->GetPDGCharge()<<"("
           <<black->->GetParticleName()<<"), q="<<white->GetPDGCharge()<<"("
           <<white->->GetParticleName()<<"), qB="<<Baryon->GetCharge()<<"/"<<PDGEncoding
           <<G4endl;
 #endif
-	return Baryon;
-}
+  return Baryon;
+}
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QInteraction.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QInteraction.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QInteraction.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QInteraction.cc,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QInteraction.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------------
@@ -33,8 +33,11 @@
 //      ---------------- G4QInteraction----------------
 //            Created by Mikhail Kossov Oct, 2006
-//   class for a storing colliding particles in PartonString Models
+//   class for colliding particles (hadrons) in Parton String Models
 //   For comparison mirror member functions are taken from G4 class:
 //   G4InteractionContent
-// -------------------------------------------------------------------
+// ---------------------------------------------------------------------
+//  Short description: Classify the interaction in soft/hard/diffractive
+//  parts for firther treatment by the QGS algorithm.
+// ---------------------------------------------------------------------
 
 #include "G4QInteraction.hh"
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QIsotope.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QIsotope.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QIsotope.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QIsotope.cc,v 1.10 2007/11/28 14:14:36 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QIsotope.cc,v 1.11 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QIsotope class ----------------
@@ -39,4 +39,11 @@
 //       1         2         3         4         5         6         7         8         9
 //34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
+// ------------------------------------------------------------------------------
+// Short description: containes the natural abundance DB for isotops and permits
+// new artificial materials with unnatural abundance (e.g. enreached Deuterium).
+// Uses isotope cross-sections for calculation of the mean cross-sections for the
+// Element (fixed Z).
+// ------------------------------------------------------------------------------
+
 
 //#define debug
@@ -636,5 +643,5 @@
       s->push_back(sP);
 #ifdef cdebug
-	     G4cout<<"G4QIsotope::Constructor:Element# "<<i<<", Pair # "<<j<<" is filled"<<G4endl;
+      G4cout<<"G4QIsotope::Constructor:Element# "<<i<<", Pair # "<<j<<" is filled"<<G4endl;
 #endif
     }
@@ -650,5 +657,5 @@
       c->push_back(cP);
 #ifdef cdebug
-	     G4cout<<"G4QIsotope::Constructor:CrosSecPair i="<<i<<", j="<<j<<" is filled"<<G4endl;
+      G4cout<<"G4QIsotope::Constructor:CrosSecPair i="<<i<<", j="<<j<<" is filled"<<G4endl;
 #endif
     }
@@ -877,7 +884,7 @@
         }
         else return 3;
-	     }
+      }
       else return 2;
-	   }
+    }
     else return 1;
   }
@@ -894,17 +901,17 @@
   {
  //   n              Be                   F              Al       P
-	     1, -1, -1, -1,  5, -1, -1, -1, -1, 10, -1, 12, -1, 14, -1, 16, -1, -1, -1, -1,
+      1, -1, -1, -1,  5, -1, -1, -1, -1, 10, -1, 12, -1, 14, -1, 16, -1, -1, -1, -1,
  //      Sc              Mn      Co                      As                       Y
-	    -1, 24, -1, -1, -1, 30, -1, 32, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, 50,
-	//      Nb      Tc      Rh                               I      Cs              Pr
+     -1, 24, -1, -1, -1, 30, -1, 32, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, 50,
+ //      Nb      Tc      Rh                               I      Cs              Pr
      -1, 52, -1, 55, -1, 58, -1, -1, -1, -1, -1, -1, -1, 74, -1, 78, -1, -1, -1, 82,
-	//      Pm              Tb      Ho      Tm                                      Au
+ //      Pm              Tb      Ho      Tm                                      Au
      -1,-85, -1, -1, -1, 94, -1, 98, -1,100, -1, -1, -1, -1, -1, -1, -1, -1, -1,118,
-	//                      Po   At   Rn   Fr   Ra   Ac
-	    -1,  -1,  -1, 126,-125,-136,-136,-138,-138,-142,
-	//  Th   Pa    U   Np   Pu   Am   Cm   Bk   Cf   Es
+ //                      Po   At   Rn   Fr   Ra   Ac
+     -1,  -1,  -1, 126,-125,-136,-136,-138,-138,-142,
+ //  Th   Pa    U   Np   Pu   Am   Cm   Bk   Cf   Es
     142,-140,  -1,-144,-150,-148,-151,-150,-153,-153
-	//  Fm   Md   No   Lr   Rf   Db   Sg   Bh   Hs   Mt
-	  -157,-157,-157,-157,-157,-157,-157,-155,-157,-157
+ //  Fm   Md   No   Lr   Rf   Db   Sg   Bh   Hs   Mt
+   -157,-157,-157,-157,-157,-157,-157,-155,-157,-157
   };
 #ifdef debug
@@ -915,37 +922,37 @@
   {
     G4double rnd=G4UniformRand();
-	   if          (i<44)        // ====== H - Mo
-	   {
+    if          (i<44)        // ====== H - Mo
+    {
       if        (i<23)        // ------ H - Ti
-	     {
+      {
         if      (i<12)        // ______ H - Ne
-	       {
+        {
           if     (i<6)        // ...... H - B
-	         {
+          {
             if   (i<3)
-	           {
+            {
               if(i==1)        // H
-	             {
+              {
                 if(rnd>.00015)       N=0;
                 else                 N=1;
-	             }
+              }
               else            // He (2)
-	             {
+              {
                 if(rnd>1.37e-6)      N=2;
                 else                 N=1;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==3)        // Li
-	             {
+              {
                 if(rnd>.075)         N=4;
                 else                 N=3;
-	             }
+              }
               else            // B (5)
-	             {
+              {
                 if(rnd>.199)         N=6;
                 else                 N=5;
-	             }
+              }
             }
           }
@@ -953,30 +960,30 @@
           {
             if   (i<8)
-	           {
+            {
               if(i==6)        // C
-	             {
+              {
                 if(rnd>.011)         N=6;
                 else                 N=7;
-	             }
+              }
               else            // N (7)
-	             {
+              {
                 if(rnd>.0037)        N=7;
                 else                 N=8;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==8)        // O
-	             {
+              {
                 if     (rnd<.9976)   N=8;
                 else if(rnd<.9996)   N=10;
                 else                 N=9;
-	             }
+              }
               else            // Ne (10)
-	             {
+              {
                 if     (rnd<.9948)   N=10;
                 else if(rnd<.9975)   N=11;
                 else                 N=12;
-	             }
+              }
             }
           }
@@ -985,34 +992,34 @@
         {
           if     (i<18)       // ...... Mg - Cl
-	         {
+          {
             if   (i<16)
-	           {
+            {
               if(i==12)       // Mg
-	             {
+              {
                 if     (rnd<.7899)   N=12;
                 else if(rnd<.8899)   N=13;
                 else                 N=14;
-	             }
+              }
               else            // Si (14)
-	             {
+              {
                 if    (rnd<.9223)    N=14;
                 else if(rnd<.969)    N=15;
                 else                 N=16;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==16)       // S
-	             {
+              {
                 if     (rnd<.9502)   N=16;
                 else if(rnd<.9923)   N=18;
                 else if(rnd<.9998)   N=17;
                 else                 N=20;
-	             }
+              }
               else            // Cl (17)
-	             {
+              {
                 if     (rnd>.7577)   N=18;
                 else                 N=20;
-	             }
+              }
             }
           }
@@ -1020,22 +1027,22 @@
           {
             if   (i<20)
-	           {
+            {
               if(i==18)       // Ar
-	             {
+              {
                 if     (rnd<.996)    N=22;
                 else if(rnd<.99937)  N=18;
                 else                 N=20;
-	             }
+              }
               else            // K (19)
-	             {
+              {
                 if     (rnd<.932581) N=20;
                 else if(rnd<.999883) N=22;
                 else                 N=21;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==20)       // Ca
-	             {
+              {
                 if     (rnd<.96941)  N=20;
                 else if(rnd<.99027)  N=24;
@@ -1044,7 +1051,7 @@
                 else if(rnd<.99996)  N=23;
                 else                 N=26;
-	             }
+              }
               else            // Ti (22)
-	             {
+              {
                 if     (rnd<.738)    N=26;
                 else if(rnd<.818)    N=24;
@@ -1052,32 +1059,32 @@
                 else if(rnd<.946)    N=27;
                 else                 N=28;
-	             }
+              }
             }
           }
-		      }
-	     }
-	     else                    // ------ V - Mo
-	     {
+        }
+      }
+      else                    // ------ V - Mo
+      {
         if     (i<32)         // ______ V - Ga
-	       {
+        {
           if     (i<28)       // ...... H - Fe
-	         {
+          {
             if   (i<26)
-	           {
+            {
               if(i==23)       // V
-	             {
+              {
                 if     (rnd<.9975)   N=28;
                 else                 N=27;
-	             }
+              }
               else            // Cr (24)
-	             {
+              {
                 if     (rnd<.8379)   N=28;
                 else if(rnd<.9329)   N=29;
                 else if(rnd<.97635)  N=26;
                 else                 N=30;
-	             }
-	           }
+              }
+            }
             else              // Fe (26)
-	           {
+            {
                 if     (rnd<.9172)   N=30;
                 else if(rnd<.9762)   N=28;
@@ -1089,7 +1096,7 @@
           {
             if   (i<30)
-	           {
+            {
               if(i==28)       // Ni
-	             {
+              {
                 if     (rnd<.68077)  N=30;
                 else if(rnd<.943)    N=32;
@@ -1097,15 +1104,15 @@
                 else if(rnd<.99074)  N=33;
                 else                 N=36;
-	             }
+              }
               else            // Cu (29)
-	             {
+              {
                 if     (rnd<.6917)   N=34;
                 else                 N=36;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==30)       // Zn
-	             {
+              {
                 if     (rnd<.486)    N=34;
                 else if(rnd<.765)    N=36;
@@ -1113,10 +1120,10 @@
                 else if(rnd<.994)    N=37;
                 else                 N=40;
-	             }
+              }
               else            // Ga (31)
-	             {
+              {
                 if     (rnd<.60108)  N=38;
                 else                 N=40;
-	             }
+              }
             }
           }
@@ -1125,9 +1132,9 @@
         {
           if     (i<37)       // ...... H - B
-	         {
+          {
             if   (i<35)
-	           {
+            {
               if(i==32)       // Ge
-	             {
+              {
                 if     (rnd<.3594)  N=42;
                 else if(rnd<.6360)  N=40;
@@ -1135,7 +1142,7 @@
                 else if(rnd<.9256)  N=41;
                 else                N=44;
-	             }
+              }
               else            // Se (34)
-	             {
+              {
                 if     (rnd>.4961)  N=46;
                 else if(rnd<.7378)  N=44;
@@ -1144,15 +1151,15 @@
                 else if(rnd<.9911)  N=43;
                 else                N=40;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==35)       // Br
-	             {
+              {
                 if     (rnd<.5069)  N=44;
                 else                N=46;
-	             }
+              }
               else            // Kr (36)
-	             {
+              {
                 if     (rnd<.57)    N=48;
                 else if(rnd<.743)   N=50;
@@ -1161,5 +1168,5 @@
                 else if(rnd<.9965)  N=44;
                 else                N=42;
-	             }
+              }
             }
           }
@@ -1167,22 +1174,22 @@
           {
             if     (i<40)
-	           {
+            {
               if(i==37)       // Rb
-	             {
+              {
                 if     (rnd<.7217)  N=48;
                 else                N=50;
-	             }
+              }
               else            // SR (38)
-	             {
+              {
                 if     (rnd<.8258)  N=50;
                 else if(rnd<.9244)  N=48;
                 else if(rnd<.9944)  N=49;
                 else                N=46;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==40)       // Zr
-	             {
+              {
                 if     (rnd<.5145)  N=50;
                 else if(rnd<.6883)  N=54;
@@ -1190,7 +1197,7 @@
                 else if(rnd<.972)   N=51;
                 else                N=56;
-	             }
+              }
               else            // Mo (42)
-	             {
+              {
                 if     (rnd<.2413)  N=56;
                 else if(rnd<.4081)  N=54;
@@ -1200,22 +1207,22 @@
                 else if(rnd<.9075)  N=55;
                 else                N=52;
-	             }
+              }
             }
           }
         }
-	     }
+      }
     }
-	   else                      // ====== Ru - U
-	   {
+    else                      // ====== Ru - U
+    {
       if         (i<66)       // ------ Ru - Gd
-	     {
+      {
         if       (i<54)       // ______ Ru - Te
-	       {
+        {
           if     (i<49)       // ...... Ru - Cd
-	         {
+          {
             if   (i<47)
-	           {
+            {
               if(i==44)       // Ru
-	             {
+              {
                 if     (rnd<.316)   N=58;
                 else if(rnd<.502)   N=60;
@@ -1225,7 +1232,7 @@
                 else if(rnd<.9814)  N=52;
                 else                N=54;
-	             }
+              }
               else            // Pd (46)
-	             {
+              {
                 if     (rnd<.2733)  N=60;
                 else if(rnd<.5379)  N=62;
@@ -1234,15 +1241,15 @@
                 else if(rnd<.9898)  N=58;
                 else                N=56;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==47)       // Ag
-	             {
+              {
                 if(rnd<.51839)      N=60;
                 else                N=62;
-	             }
+              }
               else            // Cd (48)
-	             {
+              {
                 if     (rnd<.2873)  N=66;
                 else if(rnd<.5286)  N=64;
@@ -1253,5 +1260,5 @@
                 else if(rnd<.9911)  N=58;
                 else                N=60;
-	             }
+              }
             }
           }
@@ -1259,12 +1266,12 @@
           {
             if   (i<51)
-	           {
+            {
               if(i==49)       // In
-	             {
+              {
                 if     (rnd<.9577)  N=66;
                 else                N=64;
-	             }
+              }
               else            // Sn (50)
-	             {
+              {
                 if     (rnd<.3259)  N=70;
                 else if(rnd<.5681)  N=68;
@@ -1278,15 +1285,15 @@
                 //else if(rnd<.9964)  N=64;
                 //else                N=65;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==51)       // Sb
-	             {
+              {
                 if     (rnd<.5736)  N=70;
                 else                N=72;
-	             }
+              }
               else            // Te (52)
-	             {
+              {
                 if     (rnd<.3387)  N=78;
                 else if(rnd<.6557)  N=76;
@@ -1297,5 +1304,5 @@
                 else if(rnd<.99905) N=71;
                 else                N=68;
-	             }
+              }
             }
           }
@@ -1304,9 +1311,9 @@
         {
           if     (i<60)     // ...... Xe - B
-	         {
+          {
             if   (i<57)
-	           {
+            {
               if(i==54)       // Xe
-	             {
+              {
                 if     (rnd<.269)   N=78;
                 else if(rnd<.533)   N=75;
@@ -1318,7 +1325,7 @@
                 else if(rnd<.9991)  N=70;
                 else                N=72;
-	             }
+              }
               else            // Ba (56)
-	             {
+              {
                 if     (rnd<.717)   N=82;
                 else if(rnd<.8293)  N=81;
@@ -1328,20 +1335,20 @@
                 else if(rnd<.99899) N=74;
                 else                N=76;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==57)       // La
-	             {
+              {
                 if     (rnd<.999098)N=82;
                 else                N=81;
-	             }
+              }
               else            // Ce (58)
-	             {
+              {
                 if     (rnd<.8843)  N=82;
                 else if(rnd<.9956)  N=84;
                 else if(rnd<.9981)  N=80;
                 else                N=78;
-	             }
+              }
             }
           }
@@ -1349,7 +1356,7 @@
           {
             if   (i<63)
-	           {
+            {
               if(i==60)       // Nd
-	             {
+              {
                 if     (rnd<.2713)  N=82;
                 else if(rnd<.5093)  N=84;
@@ -1359,7 +1366,7 @@
                 else if(rnd<.9436)  N=88;
                 else                N=90;
-	             }
+              }
               else            // Sm (62)
-	             {
+              {
                 if     (rnd<.267)   N=90;
                 else if(rnd<.494)   N=92;
@@ -1369,15 +1376,15 @@
                 else if(rnd<.969)   N=88;
                 else                N=82;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==63)       // Eu
-	             {
+              {
                 if     (rnd<.522)   N=90;
                 else                N=89;
-	             }
+              }
               else            // Gd (64)
-	             {
+              {
                 if     (rnd<.2484)  N=94;
                 else if(rnd<.4670)  N=96;
@@ -1387,19 +1394,19 @@
                 else if(rnd<.9980)  N=90;
                 else                N=88;
-	             }
+              }
             }
           }
         }
-	     }
-	     else                    // ------ Dy - U
-	     {
+      }
+      else                    // ------ Dy - U
+      {
         if       (i<76)       // ______ Dy - Re
-	       {
+        {
           if     (i<72)       // ...... Dy - Lu
-	         {
+          {
             if   (i<70)
-	           {
+            {
               if(i==66)       // Dy
-	             {
+              {
                 if     (rnd<.282)   N=98;
                 else if(rnd<.537)   N=96;
@@ -1409,7 +1416,7 @@
                 else if(rnd<.9994)  N=92;
                 else                N=90;
-	             }
+              }
               else            // Er (68)
-	             {
+              {
                 if     (rnd<.3360)  N= 98;
                 else if(rnd<.6040)  N=100;
@@ -1418,10 +1425,10 @@
                 else if(rnd<.9986)  N= 96;
                 else                N= 94;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==70)       // Yb
-	             {
+              {
                 if     (rnd<.3180)  N=104;
                 else if(rnd<.5370)  N=102;
@@ -1431,10 +1438,10 @@
                 else if(rnd<.9987)  N=100;
                 else                N= 98;
-	             }
+              }
               else            // Lu (71)
-	             {
+              {
                 if     (rnd<.9741)  N=104;
                 else                N=105;
-	             }
+              }
             }
           }
@@ -1442,7 +1449,7 @@
           {
             if   (i<74)
-	           {
+            {
               if(i==72)       // Hf
-	             {
+              {
                 if     (rnd<.35100) N=108;
                 else if(rnd<.62397) N=106;
@@ -1451,15 +1458,15 @@
                 else if(rnd<.99838) N=104;
                 else                N=102;
-	             }
+              }
               else            // Ta (73)
-	             {
+              {
                 if(rnd<.99988) N=108;
                 else           N=107;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==74)       // W
-	             {
+              {
                 if     (rnd<.307)   N=110;
                 else if(rnd<.593)   N=112;
@@ -1467,10 +1474,10 @@
                 else if(rnd<.9988)  N=109;
                 else                N=106;
-	             }
+              }
               else            // Re (75)
-	             {
+              {
                 if     (rnd<.626)   N=112;
                 else                N=110;
-	             }
+              }
             }
           }
@@ -1479,9 +1486,9 @@
         {
           if     (i<81)       // ...... Os - Hg
-	         {
+          {
             if     (i<78)
-	           {
+            {
               if(i==76)       // Os
-	             {
+              {
                 if     (rnd<.410)   N=116;
                 else if(rnd<.674)   N=114;
@@ -1491,15 +1498,15 @@
                 else if(rnd<.9998)  N=110;
                 else                N=108;
-	             }
+              }
               else            // Ir (77)
-	             {
+              {
                 if     (rnd<.627)   N=116;
                 else                N=114;
-	             }
-	           }
+              }
+            }
             else
-	           {
+            {
               if(i==78)       // Pt
-	             {
+              {
                 if     (rnd<.338)   N=117;
                 else if(rnd<.667)   N=116;
@@ -1508,7 +1515,7 @@
                 else if(rnd<.9999)  N=114;
                 else                N=112;
-	             }
+              }
               else            // Hg (80)
-	             {
+              {
                 if     (rnd<.2986)  N=122;
                 else if(rnd<.5296)  N=120;
@@ -1518,5 +1525,5 @@
                 else if(rnd<.9985)  N=124;
                 else                N=116;
-	             }
+              }
             }
           }
@@ -1524,27 +1531,27 @@
           {
             if        (i<92)
-	           {
+            {
               if     (i==81)  // Tl
-	             {
+              {
                 if     (rnd<.70476) N=124;
                 else                N=122;
-	             }
+              }
               else            // Pb (82)
-	             {
+              {
                 if     (rnd<.524)   N=126;
                 else if(rnd<.765)   N=124;
                 else if(rnd<.986)   N=125;
                 else                N=122;
-			           }
-	           }
+              }
+            }
             else              // U (92)
-	           {
+            {
                 if     (rnd<.992745)N=146;
                 else if(rnd<.999945)N=143;
                 else                N=142;
-	           }
+            }
           }
         }
-	     }
+      }
     }
   }
@@ -1597,5 +1604,5 @@
     if(j==I-1.)
     {
-	     if(fabs(sumAbu-1.)>.00001)
+      if(fabs(sumAbu-1.)>.00001)
       {
         G4cerr<<"--Worning--G4QIsotope::InitEl:maxSum="<<sumAbu<<" is fixed to 1."<<G4endl;
@@ -1604,5 +1611,5 @@
       }
       else if(sumAbu-abu>1.)
-	     {
+      {
         G4cerr<<"--Worning--G4QIsotope::InitEl:(-2)WrongAbund,Z="<<Z<<",i="<<index<<G4endl;
         for(G4int k=0; k<I-1; k++)
@@ -1632,11 +1639,11 @@
   }
   pair<G4int,vector<pair<G4int,G4double>*>*>* newAP=
-	                                   new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,A);
+                                    new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,A);
   newElems.push_back(newAP);
   pair<G4int,vector<pair<G4int,G4double>*>*>* newSA=
-	                                   new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,S);
+                                    new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,S);
   newSumAb.push_back(newSA);
   pair<G4int,vector<pair<G4int,G4double>*>*>* newCP=
-	                                   new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,C);
+                                    new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,C);
   newIsoCS.push_back(newCP);
 #ifdef debug
@@ -1869,5 +1876,5 @@
   {
 #ifdef ppdebug
-				G4cout<<"G4QIsotope::GetMeanCrossSection: Nat Abundance, Z="<<Z<<G4endl;
+    G4cout<<"G4QIsotope::GetMeanCrossSection: Nat Abundance, Z="<<Z<<G4endl;
 #endif
     ab=natElements[Z];
@@ -1877,5 +1884,5 @@
   {
 #ifdef ppdebug
-				G4cout<<"G4QIsotope::GetMeanCrossSection: Art Abund, Z="<<Z<<",ind="<<index<<G4endl;
+    G4cout<<"G4QIsotope::GetMeanCrossSection: Art Abund, Z="<<Z<<",ind="<<index<<G4endl;
 #endif
     // For the positive index tries to find the newUserDefinedElement
@@ -1913,10 +1920,10 @@
     G4double sum=0.;
     for(G4int j=0; j<nis; j++)
-	   {
+    {
       G4double cur=(*ab)[j]->second;
       //G4double abunda=cur-last;
       //last=cur;
 #ifdef ppdebug
-						G4cout<<"G4QIsot::GetMeanCS:j="<<j<<",ab="<<cur<<",CS="<<(*cs)[j]->second<<G4endl;
+      G4cout<<"G4QIsot::GetMeanCS:j="<<j<<",ab="<<cur<<",CS="<<(*cs)[j]->second<<G4endl;
 #endif
       //sum+=abunda * (*cs)[j]->second;
@@ -1983,5 +1990,5 @@
     vector<G4double> scs(nis);
     for(G4int j=0; j<nis; j++)
-	   {
+    {
       G4double cur=(*ab)[j]->second;
       G4double abunda=cur-last;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QNucleus.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QNucleus.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QNucleus.cc	(revision 1055)
@@ -25,11 +25,15 @@
 //
 //
-// $Id: G4QNucleus.cc,v 1.95 2008/03/31 20:30:17 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QNucleus.cc,v 1.96 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QNucleus ----------------
 //             by Mikhail Kossov, Sept 1999.
 //      class for Nuclei/Nuclear Environment used by CHIPS Model
-// ------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// Short description: a class describing properties of nuclei, which
+// are necessary for the CHIPS Model.
+// ---------------------------------------------------------------------
+
 
 //#define debug
@@ -56,6 +60,6 @@
 
 G4QNucleus::G4QNucleus(): G4QHadron(),Z(0),N(0),S(0),dZ(0),dN(0),dS(0),maxClust(0),
-			  currentNucleon(-1),rho0(0),radius(0)
-  //  probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
+     currentNucleon(-1),rho0(0),radius(0)
+   //probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
 {
   //Tb = new std::vector<G4double>;
@@ -115,5 +119,5 @@
 G4QNucleus::G4QNucleus(G4LorentzVector p, G4int nucPDG): G4QHadron(nucPDG,p),maxClust(0),
   currentNucleon(-1),rho0(0),radius(0)
-  //  probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
+  //probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
 {
   //Tb = new std::vector<G4double>;
@@ -324,5 +328,5 @@
   clustProb=c;
   mediRatio=d;
-		nucleonDistance=e;
+  nucleonDistance=e;
 }
 
@@ -353,4 +357,5 @@
   probVect[0]=mediRatio;                        // init Vacuum/Medium probability
   for(G4int i=1; i<256; i++) {probVect[i] = 0.;}
+  //std::uninitialized_fill( probVect+1, probVect+256, 0.0 ); // Worse in performance!
   if(nucPDG<80000000) nucPDG=HadrToNucPDG(nucPDG); // Convert HadrPDGCode to NucPDGCode
   G4int s=0;
@@ -375,5 +380,5 @@
     SetNFragments(0);
 #ifdef debug
-	   G4cout<<"G4QNucleus::InitByPDG:->QPDG="<<nPDG<<": 4M="<<p<<G4endl;
+    G4cout<<"G4QNucleus::InitByPDG:->QPDG="<<nPDG<<": 4M="<<p<<G4endl;
 #endif
   }
@@ -426,5 +431,5 @@
   if (din && dA<2 && a>2)
   {
-	   dA=2;
+    dA=2;
     sA=a-2;
   }
@@ -480,5 +485,5 @@
     sum =prb;
 #ifdef pdebug
-	  G4cout<<"G4QNucl::UpdateCl:sud="<<sud<<",v[1]=s="<<sum<<",dA="<<dA<<",uA="<<uA<<G4endl;
+   G4cout<<"G4QNucl::UpdateCl:sud="<<sud<<",v[1]=s="<<sum<<",dA="<<dA<<",uA="<<uA<<G4endl;
 #endif
     //probVect[1]= prb/comb;                   // a#of quasi-free nucleons (correct)
@@ -494,5 +499,5 @@
     sum+=prb+prb;
 #ifdef pdebug
-	G4cout<<"G4QNucl::UpdateCl:sud="<<sud<<",v[2]="<<prb<<",s="<<sum<<",pA="<<pA<<G4endl;
+    G4cout<<"G4QNucl::UpdateCl:sud="<<sud<<",v[2]="<<prb<<",s="<<sum<<",pA="<<pA<<G4endl;
 #endif
     //probVect[2]= prb/comb;                   // a#of quasi-free "dibaryons" (correct)
@@ -504,5 +509,5 @@
     maxi=3;
 #ifdef debug
-	G4cout<<"G4QNucleus::UpdateClusters:p1="<<probVect[1]<<", p2="<<probVect[2]<<",sA="<<sA
+    G4cout<<"G4QNucleus::UpdateClusters:p1="<<probVect[1]<<", p2="<<probVect[2]<<",sA="<<sA
           <<",uA="<<uA<<",pA="<<pA<<",wrd="<<wrd<<",sud="<<sud<<G4endl;
 #endif
@@ -518,5 +523,5 @@
         sum+=rd*i;
 #ifdef pdebug
-	    G4cout<<"G4QNucleus::UpdateCl:sud="<<sud<<", v["<<i<<"]="<<rd<<", s="<<sum<<G4endl;
+     G4cout<<"G4QNucleus::UpdateCl:sud="<<sud<<", v["<<i<<"]="<<rd<<", s="<<sum<<G4endl;
 #endif
         //comb*=(itA-i)/i;
@@ -529,5 +534,5 @@
 #endif
       }
-	   }
+    }
     dS = S;                                  // @@ Lambdas are always in the dense region
     dZ = static_cast<int>(static_cast<double>((dA-dS)*Z)/(Z+N) + 0.5);
@@ -555,5 +560,5 @@
   //          <<G4endl;
   //#endif
-  //	G4int m=RandomizeBinom(prob,jmax);     // A#of clusters of this type
+  // G4int m=RandomizeBinom(prob,jmax);     // A#of clusters of this type
   //    if(m)
   //    {
@@ -595,11 +600,11 @@
     {
       //if(abs(newPDG)<NUCPDG)
-	  //{
+      //{
       //  G4cerr<<"***G4QNucleus::Reduce:iPDG="<<curPDG<<"=newPDG="<<newPDG<<"+cPDG="<<cPDG
       //        <<G4endl;
       //  throw G4QException("*E*:::G4QNucleus::Reduce: Abnormal Nuclear Reduction");
-	  //}
+      //}
       InitByPDG(newPDG);                         // Reinit the Nucleus
-	}
+ }
   }
   else if(cPDG!=NUCPDG) G4cerr<<"***G4QN::Reduce:Subtract not nuclear PDGC="<<cPDG<<G4endl;
@@ -946,5 +951,5 @@
         {
           G4cerr<<"***G4QNucl::EvapBary: tM="<<totMass<<"-> 2N="<<nucPDG<<"(M="
-		        <<nucM<<") + pi="<<piPDG<<"(M="<<mPi<<")"<<G4endl;
+          <<nucM<<") + pi="<<piPDG<<"(M="<<mPi<<")"<<G4endl;
           //throw G4QException("G4QNucl::EvapBary:ISO-dibaryon DecayIn3 did not succeed");
           return false;
@@ -1131,22 +1136,22 @@
       pp2m=(tM2-mpls*mpls)*(tM2-mmin*mmin)/qtM2;
       if(pp2m>=0.000001)
-	     {
+      {
         pFlag=true;
         pBnd=mProt-GSMass+GSResNp;             // Binding energy for proton
         G4double eMax=sqrt(mP2+pp2m);
 #ifdef pdebug
-	       G4cout<<"G4QNuc::EvapBaryon:pm="<<eMax+sqrt(pp2m+GSResNp*GSResNp)<<" = M="<<totMass
+        G4cout<<"G4QNuc::EvapBaryon:pm="<<eMax+sqrt(pp2m+GSResNp*GSResNp)<<" = M="<<totMass
               <<", sm="<<GSResNp+mProt+PBarr<<",pp2="<<pp2m<<",pB="<<pBnd<<G4endl;
 #endif
         pExcess=eMax-mProt+pBnd;               // Max Kin Energy from bottom
-	     }
+      }
       else pExcess=pBnd;
       if(Z>1)
-	     {
+      {
         ppQPDG=G4QPDGCode(90000000+1000*(1000*S+Z-2)+N);
         GSResPP=ppQPDG.GetMass();
 #ifdef pdebug
         G4double sm=GSResPP+mProt+mProt+SPPBarr;
-	       G4cout<<"G4QNucl::EvapBaryon: ppM="<<GSResPP<<",T="<<sm-GSMass<<",E="<<totMass-sm
+        G4cout<<"G4QNucl::EvapBaryon: ppM="<<GSResPP<<",T="<<sm-GSMass<<",E="<<totMass-sm
               <<",C="<<PBarr<<G4endl;
 #endif
@@ -1162,8 +1167,8 @@
 #ifdef pdebug
             G4double s=GSResPA+mAlph+mProt+SAPBarr;
-	           G4cout<<"G4QN::EB:paM="<<GSResPA<<",T="<<s-GSMass<<",E="<<totMass-s<<G4endl;
+            G4cout<<"G4QN::EB:paM="<<GSResPA<<",T="<<s-GSMass<<",E="<<totMass-s<<G4endl;
 #endif
             if(GSResPA+mProt+SAPBarr+mAlph<totMass) paFlag=true;
-		        }
+          }
         }
         if(N>0&&a>3)
@@ -1171,10 +1176,10 @@
           GSReNPP=G4QPDGCode().GetNuclMass(Z-2,N-1,S);
           if(GSReNPP+mProt+mProt+SPPBarr+mNeut<totMass) nppF=true;
-		      }
+        }
         if(S>0&&a>3)
         {
           GSRePPL=G4QPDGCode().GetNuclMass(Z-2,N,S-1);
           if(GSRePPL+mProt+mProt+SPPBarr+mLamb<totMass) pplF=true;
-		      }
+        }
         if(N>1&&a>4)
         {
@@ -1185,30 +1190,30 @@
               GSReLLA=G4QPDGCode().GetNuclMass(Z-2,N-2,S-2);
               if(GSReLLA+mAlph+ABarr+mLamb+mLamb<totMass) llaF=true;
-		          }
+            }
             if(N>2&&S>0)
             {
               GSReNLA=G4QPDGCode().GetNuclMass(Z-2,N-3,S-1);
               if(GSReNLA+mAlph+ABarr+mNeut+mLamb<totMass) nlaF=true;
-		          }
+            }
             if(Z>2&&S>0)
             {
               GSRePLA=G4QPDGCode().GetNuclMass(Z-3,N-2,S-1);
               if(GSRePLA+mAlph+SAPBarr+mProt+mLamb<totMass) plaF=true;
-		          }
+            }
             if(N>3)
             {
               GSReNNA=G4QPDGCode().GetNuclMass(Z-2,N-4,S);
               if(GSReNNA+mAlph+ABarr+mNeut+mNeut<totMass) nnaF=true;
-		          }
+            }
             if(Z>2&&N>2)
             {
               GSReNPA=G4QPDGCode().GetNuclMass(Z-3,N-3,S);
               if(GSReNPA+mAlph+SAPBarr+mProt+mNeut<totMass) npaF=true;
-		          }
+            }
             if(N>3)
             {
               GSRePPA=G4QPDGCode().GetNuclMass(Z-4,N-2,S);
               if(GSRePPA+mAlph+SPPABarr+mProt+mProt<totMass) ppaF=true;
-		          }
+            }
             if(a>9)
             {
@@ -1233,6 +1238,6 @@
                 if(GSReAAA+mAlph+mAlph+mAlph+SAAABarr<totMass) aaaF=true;
               }
-			         }
-		        }
+            }
+          }
           if(N>3&&Z>3&&a>8)
           {
@@ -1241,9 +1246,9 @@
 #ifdef pdebug
             G4double s=GSResAA+mAlph+mAlph+SAABarr;
-	           G4cout<<"G4QNucl::EvapBaryon: a="<<GSResNP<<",T="<<s-GSMass<<",E="<<totMass-s
+            G4cout<<"G4QNucl::EvapBaryon: a="<<GSResNP<<",T="<<s-GSMass<<",E="<<totMass-s
                   <<",A="<<SAABarr<<G4endl;
 #endif
             if(GSResAA+mAlph+mAlph+SAABarr<totMass) aaFlag=true;
-		        }
+          }
           if(N>2&&a>5)
           {
@@ -1252,9 +1257,9 @@
 #ifdef pdebug
             G4double s=GSResNA+mAlph+mNeut;
-	           G4cout<<"G4QNucl::EvapBary: M="<<GSResNA<<",T="<<s-GSMass<<",E="<<totMass-s
+            G4cout<<"G4QNucl::EvapBary: M="<<GSResNA<<",T="<<s-GSMass<<",E="<<totMass-s
                   <<",C="<<ABarr<<G4endl;
 #endif
             if(GSResNA+mNeut+mAlph+ABarr<totMass) naFlag=true;
-		        }
+          }
           if(S>0&&a>5)
           {
@@ -1262,5 +1267,5 @@
             GSResLA=laQPDG.GetMass();
             if(GSResLA+mLamb+mAlph+ABarr<totMass) laFlag=true;
-		        }
+          }
           AQPDG =G4QPDGCode(90000000+1000*(1000*S+Z-2)+N-2);
           GSResNa=AQPDG.GetMass();
@@ -1269,19 +1274,19 @@
           ap2m=(tM2-mpls*mpls)*(tM2-mmin*mmin)/qtM2;
           if(ap2m>=0.000001)
-	         {
+          {
             aFlag=true;
             aBnd=mAlph-GSMass+GSResNa;           // Binding energy for ALPHA
             G4double eMax=sqrt(mA2+ap2m);
 #ifdef pdebug
-	           G4cout<<"G4QNuc::EvapBar:m="<<eMax+sqrt(ap2m+GSResNa*GSResNa)<<" = M="<<totMass
+            G4cout<<"G4QNuc::EvapBar:m="<<eMax+sqrt(ap2m+GSResNa*GSResNa)<<" = M="<<totMass
                   <<", sm="<<GSResNp+mProt+PBarr<<",pp2="<<pp2m<<",pB="<<pBnd<<G4endl;
 #endif
             aExcess=eMax-mAlph+aBnd;             // Max Kin Energy from bottom
-	         }
+          }
           else aExcess=pBnd;
-		      }
-	     }
+        }
+      }
       if(N>0)
-	     {
+      {
         if(Z>0)
         {
@@ -1290,22 +1295,22 @@
 #ifdef pdebug
           G4double s=GSResNP+mNeut+mProt;
-	         G4cout<<"G4QNucl::EvapBaryon: npM="<<GSResNP<<",T="<<s-GSMass<<",E="<<totMass-s
+          G4cout<<"G4QNucl::EvapBaryon: npM="<<GSResNP<<",T="<<s-GSMass<<",E="<<totMass-s
                 <<",C="<<PBarr<<G4endl;
 #endif
           if(GSResNP+mNeut+mProt+PBarr<totMass) npFlag=true;
-		      }
+        }
         if(N>1)
         {
           GSReNNP=G4QPDGCode().GetNuclMass(Z-1,N-2,S);
           if(GSReNNP+mProt+PBarr+mNeut+mNeut<totMass) nnpF=true;
-		      }
+        }
         if(S>0)
         {
           GSReNPL=G4QPDGCode().GetNuclMass(Z-1,N-1,S-1);
           if(GSReNPL+mProt+PBarr+mNeut+mLamb<totMass) nplF=true;
-		      }
-	     }
+        }
+      }
       if(S>0)
-	     {
+      {
         if(Z>0)
         {
@@ -1313,12 +1318,12 @@
           GSResPL=plQPDG.GetMass();
           if(GSResPL+mProt+PBarr+mLamb<totMass) plFlag=true;
-		      }
+        }
         if(S>1)
         {
           GSRePLL=G4QPDGCode().GetNuclMass(Z-1,N,S-2);
           if(GSRePLL+mProt+PBarr+mLamb+mLamb<totMass) pllF=true;
-		      }
-	     }
-	   }
+        }
+      }
+    }
     G4double GSResNn= GSMass;         // Prototype of Residual Nuclear Mass for neutron
     G4double nExcess= 0.;             // Prototype of excess energy for neutron
@@ -1330,5 +1335,5 @@
       GSResNn=NQPDG.GetMass();
 #ifdef pdebug
-	     G4cout<<"G4QNucleus::EvapBaryon: M(A-N)="<<GSResNn<<",Z="<<Z
+      G4cout<<"G4QNucleus::EvapBaryon: M(A-N)="<<GSResNn<<",Z="<<Z
             <<",N="<<N<<",S="<<S<<G4endl;
 #endif
@@ -1346,8 +1351,8 @@
 #endif
         nExcess=eMax-mNeut+nBnd;
-	     }
+      }
       else nExcess=nBnd;
       if(N>1)
-	     {
+      {
         nnQPDG=G4QPDGCode(90000000+1000*(1000*S+Z)+N-2);
         GSResNN=nnQPDG.GetMass();
@@ -1357,13 +1362,13 @@
           GSReNNN=G4QPDGCode().GetNuclMass(Z,N-3,S);
           if(GSReNNN+mNeut*3<totMass) nnnF=true;
-		      }
+        }
         if(S>0)
         {
           GSReNNL=G4QPDGCode().GetNuclMass(Z,N-2,S-1);
           if(GSReNNL+mNeut+mNeut+mLamb<totMass) nnlF=true;
-		      }
-	     }
+        }
+      }
       if(S>0)
-	     {
+      {
         nlQPDG=G4QPDGCode(90000000+1000*(1000*(S-1)+Z)+N-1);
         GSResNL=nlQPDG.GetMass();
@@ -1373,7 +1378,7 @@
           GSReNLL=G4QPDGCode().GetNuclMass(Z,N-1,S-2);
           if(GSReNLL+mNeut+mLamb+mLamb<totMass) nllF=true;
-		      }
-	     }
-	   }
+        }
+      }
+    }
     G4double GSResNl= GSMass;         // Prototype of Residual Nuclear Mass for Lambda
     G4double lExcess= 0.;             // Prototype of excess energy for Lambda
@@ -1397,8 +1402,8 @@
 #endif
         lExcess=eMax-mLamb+lBnd;
-	     }
+      }
       else lExcess=lBnd;
       if(S>1)
-	     {
+      {
         llQPDG=G4QPDGCode(90000000+1000*(1000*(S-2)+Z)+N);
         GSResLL=llQPDG.GetMass();
@@ -1408,7 +1413,7 @@
           GSReLLL=G4QPDGCode().GetNuclMass(Z,N,S-3);
           if(GSReLLL+mLamb*3<totMass) lllF=true;
-		      }
-	     }
-	   }
+        }
+      }
+    }
     G4bool nSecF = nnFlag||npFlag||nlFlag||naFlag; // Pos of second radiation after neutron
     G4bool pSecF = npFlag||ppFlag||plFlag||paFlag; // Pos of second radiation after proton
@@ -1422,5 +1427,5 @@
     //G4bool thdB  = nTrF||pTrF||lTrF||aTrF||naaF||paaF||laaF||aaaF;// Pos to radiate three
 #ifdef pdebug
-	   G4cout<<"G4QNucl::EvapBary:n="<<nSecF<<",p="<<pSecF<<",l="<<lSecF<<",a="<<aSecF<<",nn="
+    G4cout<<"G4QNucl::EvapBary:n="<<nSecF<<",p="<<pSecF<<",l="<<lSecF<<",a="<<aSecF<<",nn="
           <<nnFlag<<", np="<<npFlag<<",pp="<<ppFlag<<",pa="<<paFlag<<",na="<<naFlag<<",aa="
           <<aaFlag<<G4endl;
@@ -1428,6 +1433,6 @@
     G4QPDGCode bQPDG;
     G4QPDGCode rQPDG;
-	   if(secB)                            // Decay in two baryons is possible
-	   //if(thdB)                            //@@CHECK@@ Decay in three baryons is possible
+    if(secB)                            // Decay in two baryons is possible
+    //if(thdB)                            //@@CHECK@@ Decay in three baryons is possible
     {
       if(!nSecF) nFlag=false;
@@ -1436,5 +1441,5 @@
       if(!aSecF) aFlag=false;
 #ifdef pdebug
-	     G4cout<<"G4QNuc::EB:nF="<<nFlag<<",pF="<<pFlag<<",lF="<<lFlag<<",aF="<<aFlag<<G4endl;
+      G4cout<<"G4QNuc::EB:nF="<<nFlag<<",pF="<<pFlag<<",lF="<<lFlag<<",aF="<<aFlag<<G4endl;
 #endif
       G4double maxE=0.;                          // Prototype for maximum energy
@@ -1475,9 +1480,9 @@
         G4double ma=uWell*a+maxE;        // Total Kinetic Energy of baryons (@@alphas?)
         if(mi<0.)
-	       {
+        {
           uW-=mi;
           mm-=mi;
           mi=0.;
-	       }
+        }
         G4bool good=true;
         if(ma<mm)
@@ -1487,5 +1492,5 @@
         }
 #ifdef pdebug
-	       G4cout<<"G4QNuc::EvapBary:iE="<<minE<<",aE="<<maxE<<",mi="<<mi<<",mm="<<mm<<",ma="
+        G4cout<<"G4QNuc::EvapBary:iE="<<minE<<",aE="<<maxE<<",mi="<<mi<<",mm="<<mm<<",ma="
               <<ma<<G4endl;
 #endif
@@ -1500,5 +1505,5 @@
         if(xMi>xMa)
         {
-	         G4cerr<<"***G4QNucleus::EvapBaryon: M="<<mm/ma<<",xi="<<xMi<<",xa="<<xMa<<G4endl;
+          G4cerr<<"***G4QNucleus::EvapBaryon: M="<<mm/ma<<",xi="<<xMi<<",xa="<<xMa<<G4endl;
           return false;
         }
@@ -1506,5 +1511,5 @@
         xMa=sqrt(xMa);                          // @@ ?
 #ifdef pdebug
-	       G4cout<<"G4QNuc:EvapBaryon:mi="<<mi<<",ma="<<ma<<", xi="<<xMi<<",xa="<<xMa<<G4endl;
+        G4cout<<"G4QNuc:EvapBaryon:mi="<<mi<<",ma="<<ma<<", xi="<<xMi<<",xa="<<xMa<<G4endl;
 #endif
         G4double powr=1.5*a1;                   // Power for low & up limits
@@ -1528,5 +1533,5 @@
           G4double x = sqrt(x2);
           if(x<xMi||x>xMa)
-		        {
+          {
 #ifdef pdebug
             G4cerr<<"**G4QNucl::EvapB:R="<<R<<",xi="<<xMi<<" < "<<x<<" < xa="<<xMa<<G4endl;
@@ -1535,5 +1540,5 @@
             else      x=xMa;
             x2 = x*x;
-		        }
+          }
           G4double rn=G4UniformRand();
           //if(rn<x/xMa||!good)
@@ -1544,5 +1549,5 @@
             G4double zCBPP=0.;                         // Probabylity for a proton
 #ifdef pdebug
-			         G4cout<<"G4QNuc::EvapB:t="<<tk<<",pM="<<pMin<<",pB="<<pBnd<<",n="<<nMin<<",a="
+            G4cout<<"G4QNuc::EvapB:t="<<tk<<",pM="<<pMin<<",pB="<<pBnd<<",n="<<nMin<<",a="
                   <<aMin<<G4endl;
 #endif
@@ -1552,9 +1557,9 @@
               //if(barf) kin-=PBarr; //@@ This is a mistake
 #ifdef pdebug
-			           G4cout<<"G4QN::EB:Proton="<<kin<<",CB="<<PBarr<<",B="<<pBnd<<",M="<<pMin
+              G4cout<<"G4QN::EB:Proton="<<kin<<",CB="<<PBarr<<",B="<<pBnd<<",M="<<pMin
                     <<",p="<<CoulBarPenProb(PBarr,kin,1,1)<<G4endl;
 #endif
               zCBPP=Z*CoulBarPenProb(PBarr,kin,1,1)*sqrt(kin);
-			         }
+            }
             psum+=zCBPP;
             G4double nCBPP=0.;                       // Probability for a neutron (=> p+n)
@@ -1563,5 +1568,5 @@
               G4double kin=tk-nBnd;
 #ifdef pdebug
-			           G4cout<<"G4QN::EB:Neutron="<<kin<<",p="<<CoulBarPenProb(0.,kin,0,1)<<G4endl;
+              G4cout<<"G4QN::EB:Neutron="<<kin<<",p="<<CoulBarPenProb(0.,kin,0,1)<<G4endl;
 #endif
               nCBPP=N*CoulBarPenProb(0.,kin,0,1)*sqrt(kin);
@@ -1574,57 +1579,57 @@
               G4double kin=tk-lBnd;
 #ifdef pdebug
-			           G4cout<<"G4QN::EB:Lambda="<<kin<<",p="<<CoulBarPenProb(0,kin,0,1)<<G4endl;
+              G4cout<<"G4QN::EB:Lambda="<<kin<<",p="<<CoulBarPenProb(0,kin,0,1)<<G4endl;
 #endif
               lCBPP=S*CoulBarPenProb(0.,kin,0,1)*sqrt(kin);
-			         }
+            }
             psum+=lCBPP;
             lCBPP+=nCBPP;
-			         if(evalph&&aFlag&&tk>aMin)
+            if(evalph&&aFlag&&tk>aMin)
             {
               G4double kin=tk-aBnd;
               //if(barf) kin-=ABarr; //@@ This is a mistake
 #ifdef pdebug
-			           G4cout<<"G4QN::EB:Alpha="<<kin<<",CB="<<ABarr<<",p="
+              G4cout<<"G4QN::EB:Alpha="<<kin<<",CB="<<ABarr<<",p="
                     <<CoulBarPenProb(ABarr,kin,2,4)<<G4endl;
 #endif
               psum+=CoulBarPenProb(ABarr,kin,2,4)*sqrt(kin)*evalph*Z*(Z-1)*N*(N-1)
                                                  *6/a1/(a-2)/(a-3);
-			         }
+            }
             G4double r = psum*G4UniformRand();
 #ifdef pdebug
-			         G4cout<<"G4QNuc::EvapB:"<<r<<",p="<<zCBPP<<",pn="<<nCBPP<<",pnl="<<lCBPP<<",t="
+            G4cout<<"G4QNuc::EvapB:"<<r<<",p="<<zCBPP<<",pn="<<nCBPP<<",pnl="<<lCBPP<<",t="
                   <<psum<<G4endl;
 #endif
             cond = false;
             if     (r&&r>lCBPP)
-		          {
-#ifdef pdebug
-			           G4cout<<"G4QNuc::EvaB:ALPHA is selected for evap, r="<<r<<">"<<lCBPP<<G4endl;
+            {
+#ifdef pdebug
+              G4cout<<"G4QNuc::EvaB:ALPHA is selected for evap, r="<<r<<">"<<lCBPP<<G4endl;
 #endif
               PDG=aPDG;
-		          }
+            }
             else if(r&&r>nCBPP&&r<=lCBPP)
             {
 #ifdef pdebug
-			           G4cout<<"G4QNuc::EvaB:LAMBDA is selected for evap,r="<<r<<"<"<<lCBPP<<G4endl;
+              G4cout<<"G4QNuc::EvaB:LAMBDA is selected for evap,r="<<r<<"<"<<lCBPP<<G4endl;
 #endif
               PDG=lPDG;
-			         }
+            }
             else if(r&&r>zCBPP&&r<=nCBPP)
             {
 #ifdef pdebug
-			           G4cout<<"G4QNuc::EvaBar: N is selected for evapor,r="<<r<<"<"<<nCBPP<<G4endl;
+              G4cout<<"G4QNuc::EvaBar: N is selected for evapor,r="<<r<<"<"<<nCBPP<<G4endl;
 #endif
               PDG=nPDG;
-			         }
+            }
             else if(r&&r<=zCBPP)
             {
 #ifdef pdebug
-			           G4cout<<"G4QNuc::EvaBar: P is selected for evapor,r="<<r<<"<"<<zCBPP<<G4endl;
+              G4cout<<"G4QNuc::EvaBar: P is selected for evapor,r="<<r<<"<"<<zCBPP<<G4endl;
 #endif
               PDG=pPDG;
-			         }
+            }
             else cond=true;
-		        }
+          }
 #ifdef pdebug
           G4cout<<"G4QNuc::EvapBar:c="<<cond<<",x="<<x<<",cnt="<<cntr<<",R="<<R<<",ma="<<ma
@@ -1632,7 +1637,7 @@
 #endif
           cntr++;
-	       }
+        }
         if(cntr<cntm)                       // => Succeeded to find the evaporation channel
-	       {
+        {
           G4double p2=0.;
           if     (PDG==aPDG)
@@ -1644,9 +1649,9 @@
               p2=ap2m;
               tk=sqrt(p2+mA2);
-		          }
+            }
             eMass=mAlph;
             bQPDG=aQPDG;
             rQPDG=AQPDG;
-	         }
+          }
           else if(PDG==pPDG)
           {
@@ -1657,9 +1662,9 @@
               p2=pp2m;
               tk=sqrt(p2+mP2);
-		          }
+            }
             eMass=mProt;
             bQPDG=pQPDG;
             rQPDG=PQPDG;
-	         }
+          }
           else if(PDG==nPDG)
           {
@@ -1673,9 +1678,9 @@
               p2=np2m;
               tk=sqrt(p2+mN2);
-		          }
+            }
             eMass=mNeut;
             bQPDG=nQPDG;
             rQPDG=NQPDG;
-	         }
+          }
           else if(PDG==lPDG)
           {
@@ -1686,9 +1691,9 @@
               p2=lp2m;
               tk=sqrt(p2+mL2);
-		          }
+            }
             eMass=mLamb;
             bQPDG=lQPDG;
             rQPDG=LQPDG;
-	         }
+          }
           else G4cerr<<"***G4QNucleus::EvaporateBaryon: PDG="<<PDG<<G4endl;
           G4double rEn=totMass-tk;
@@ -1721,5 +1726,5 @@
           if(barf) aaCond = !aaFlag || (aaFlag && GSResAA+mAlph+SAABarr > rMass);
 #ifdef pdebug
-		        G4cout<<"G4QNucl::EvaB:"<<PDG<<", E="<<tk<<", rM="<<rMass<<", ";
+          G4cout<<"G4QNucl::EvaB:"<<PDG<<", E="<<tk<<", rM="<<rMass<<", ";
           if(PDG==pPDG)      G4cout<<"PN="<<GSResNP+mNeut<<"("<<pnCond<<"),PP="
                                    <<GSResPP+mProt+PPBarr<<"("<<ppCond<<"),PL="
@@ -1743,8 +1748,8 @@
           //if(3>2)three=false;                        // @@@@@@@@@@@@@@@@@@
           //else if(PDG==pPDG&&(pnCond&&ppCond&&plCond&&paCond)) // @@@@@@@@@@@@@@@@@@@
-		        if(PDG==pPDG&&(pnCond&&ppCond&&plCond&&paCond))//p+RN decay, p+b+RN dec is closed
-		        {
-#ifdef pdebug
-			         G4cout<<"G4QN::EB:*p*: n="<<pnCond<<",p="<<ppCond<<",l="<<plCond<<",a="<<paCond
+          if(PDG==pPDG&&(pnCond&&ppCond&&plCond&&paCond))//p+RN decay, p+b+RN dec is closed
+          {
+#ifdef pdebug
+            G4cout<<"G4QN::EB:*p*: n="<<pnCond<<",p="<<ppCond<<",l="<<plCond<<",a="<<paCond
                   <<G4endl;
 #endif
@@ -1753,31 +1758,31 @@
             G4double nLim=0.;
             if(N&&GSResNP!=GSMass&&fMass+PBarr+mNeut+GSResNP<totMass)
-			         {
-			           if(barf) nLim+=(N+N)*pow(totMass-mNeut-mProt-PBarr-GSResNP,2);
+            {
+              if(barf) nLim+=(N+N)*pow(totMass-mNeut-mProt-PBarr-GSResNP,2);
               else     nLim+=(N+N)*pow(totMass-mNeut-mProt-GSResNP,2);
-			         }
+            }
             G4double zLim=nLim;
             if(Z>1&&GSResPP!=GSMass&&fMass+mProt+SPPBarr+GSResPP<totMass)
-			         {
-			           if(barf) zLim+=(Z-1)*pow(totMass-mProt-mProt-SPPBarr-GSResPP,2);
+            {
+              if(barf) zLim+=(Z-1)*pow(totMass-mProt-mProt-SPPBarr-GSResPP,2);
               else     zLim+=(Z-1)*pow(totMass-mProt-mProt-GSResPP,2);
-			         }
+            }
             G4double sLim=zLim;
             if(S&&GSResPL!=GSMass&&fMass+PBarr+mLamb+GSResPL<totMass)
-			         {
-			           if(barf) sLim+=(S+S)*pow(totMass-mProt-mLamb-PBarr-GSResPL,2);
+            {
+              if(barf) sLim+=(S+S)*pow(totMass-mProt-mLamb-PBarr-GSResPL,2);
               else     sLim+=(S+S)*pow(totMass-mProt-mLamb-GSResPL,2);
-			         }
+            }
             G4double aLim=sLim;
             if(evalph&&Z>2&&N>1&&a>4&&GSResPL!=GSMass&&fMass+SAPBarr+mAlph+GSResPA<totMass)
-			         {
-			           if(barf) aLim+=pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2)*evalph*
+            {
+              if(barf) aLim+=pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2)*evalph*
                              (Z-1)*(Z-2)*N*(N-1)*12/(a-2)/(a-3)/(a-4);
               else     aLim+=pow(totMass-mProt-mAlph-GSResPA,2)*evalph*(Z-1)*(Z-2)*N*(N-1)
                              *12/(a-2)/(a-3)/(a-4);
-			         }
+            }
             G4double r = aLim*G4UniformRand();
 #ifdef pdebug
-			         G4cout<<"G4QNuc::EvaB:p, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="
+            G4cout<<"G4QNuc::EvaB:p, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="
                   <<aLim<<G4endl;
 #endif
@@ -1785,5 +1790,5 @@
             if(!aLim) three=false;
             else if(r>sLim)
-		          {
+            {
               eMass = mAlph;
               dbQPDG= PAQPDG;
@@ -1791,9 +1796,9 @@
               rQPDG = paQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: P+A"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: P+A"<<G4endl;
+#endif
+            }
             else if(zLim<sLim&&r>zLim&&r<=sLim)
-		          {
+            {
               eMass = mLamb;
               dbQPDG= PLQPDG;
@@ -1801,9 +1806,9 @@
               rQPDG = plQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: P+L"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: P+L"<<G4endl;
+#endif
+            }
             else if(nLim<zLim&&r>nLim&&r<=zLim)
-	           {
+            {
               eMass = mProt;
               dbQPDG= PPQPDG;
@@ -1811,9 +1816,9 @@
               rQPDG = ppQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: P+P"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: P+P"<<G4endl;
+#endif
+            }
             else if(r<=nLim)
-	           {
+            {
               eMass = mNeut;
               dbQPDG= NPQPDG;
@@ -1821,13 +1826,13 @@
               rQPDG = npQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: P+N"<<G4endl;
-#endif
-   	        }
+              G4cout<<"G4QNucleus::EvaporateBary: P+N"<<G4endl;
+#endif
+            }
             else three=false;
-		        }
+          }
           else if(PDG==nPDG&&(nnCond&&npCond&&nlCond&&naCond)) // n+b+RN decay can't happen
-		        { //@@ Take into account Coulomb Barier Penetration Probability
-#ifdef pdebug
-			         G4cout<<"G4QN::EB:*n*: n="<<nnCond<<",p="<<npCond<<",l="<<nlCond<<",a="<<naCond
+          { //@@ Take into account Coulomb Barier Penetration Probability
+#ifdef pdebug
+            G4cout<<"G4QN::EB:*n*: n="<<nnCond<<",p="<<npCond<<",l="<<nlCond<<",a="<<naCond
                   <<G4endl;
 #endif
@@ -1839,8 +1844,8 @@
             G4double zLim=nLim;
             if(Z&&GSResNP!=GSMass&&fMass+mProt+PBarr+GSResNP<totMass)
-			         {
-			           if(barf) zLim+=(Z+Z)*pow(totMass-mNeut-mProt-PBarr-GSResNP,2);
+            {
+              if(barf) zLim+=(Z+Z)*pow(totMass-mNeut-mProt-PBarr-GSResNP,2);
               else     zLim+=(Z+Z)*pow(totMass-mNeut-mProt-GSResNP,2);
-			         }
+            }
             G4double sLim=zLim;
             if(S&&GSResNL!=GSMass&&fMass+mLamb+GSResNL<totMass)
@@ -1848,13 +1853,13 @@
             G4double aLim=sLim;
             if(evalph&&Z>1&&N>2&&a>4&&GSResNA!=GSMass&&fMass+mAlph+ABarr+GSResNA<totMass)
-			         {
-			           if(barf) aLim+=pow(totMass-mNeut-mAlph-ABarr-GSResNA,2)*
+            {
+              if(barf) aLim+=pow(totMass-mNeut-mAlph-ABarr-GSResNA,2)*
                              evalph*Z*(Z-1)*(N-1)*(N-2)*12/(a-2)/(a-3)/(a-4);
               else     aLim+=pow(totMass-mNeut-mAlph-GSResNA,2)*
                              evalph*Z*(Z-1)*(N-1)*(N-2)*12/(a-2)/(a-3)/(a-4);
-			         }
+            }
             G4double r = aLim*G4UniformRand();
 #ifdef pdebug
-			         G4cout<<"G4QN::EB:n, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim
+            G4cout<<"G4QN::EB:n, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim
                   <<G4endl;
 #endif
@@ -1862,5 +1867,5 @@
             if(!aLim) three=false;
             else if(r>sLim)
-		          {
+            {
               eMass = mAlph;
               dbQPDG= NAQPDG;
@@ -1868,9 +1873,9 @@
               rQPDG = naQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: N+A"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: N+A"<<G4endl;
+#endif
+            }
             else if(zLim<sLim&&r>zLim&&r<=sLim)
-		          {
+            {
               eMass = mLamb;
               dbQPDG= NLQPDG;
@@ -1878,9 +1883,9 @@
               rQPDG = nlQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: N+L"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: N+L"<<G4endl;
+#endif
+            }
             else if(nLim<zLim&&r>nLim&&r<=zLim)
-	           {
+            {
               eMass = mProt;
               dbQPDG= NPQPDG;
@@ -1888,9 +1893,9 @@
               rQPDG = npQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: N+P"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: N+P"<<G4endl;
+#endif
+            }
             else if(r<=nLim)
-	           {
+            {
               eMass = mNeut;
               dbQPDG= NNQPDG;
@@ -1898,13 +1903,13 @@
               rQPDG = nnQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: N+N"<<G4endl;
-#endif
-   	        }     
+              G4cout<<"G4QNucleus::EvaporateBary: N+N"<<G4endl;
+#endif
+            }     
             else three=false;
-		        }
+          }
           else if(PDG==lPDG&&(lnCond&&lpCond&&llCond&&laCond)) // l+b+RN decay can't happen
-		        { //@@ Take into account Coulomb Barier Penetration Probability
+          { //@@ Take into account Coulomb Barier Penetration Probability
 #ifdef ppdebug
-			         G4cout<<"G4QN::EB:*l*: n="<<lnCond<<",p="<<lpCond<<",l="<<llCond<<",a="<<laCond
+            G4cout<<"G4QN::EB:*l*: n="<<lnCond<<",p="<<lpCond<<",l="<<llCond<<",a="<<laCond
                   <<G4endl;
 #endif
@@ -1916,8 +1921,8 @@
             G4double zLim=nLim;
             if(Z&&GSResPL!=GSMass&&fMass+mProt+PBarr+GSResPL<totMass)
-			         {
-			           if(barf) zLim+=(Z+Z)*pow(totMass-mProt-mLamb-PBarr-GSResPL,2);
+            {
+              if(barf) zLim+=(Z+Z)*pow(totMass-mProt-mLamb-PBarr-GSResPL,2);
               else zLim+=(Z+Z)*pow(totMass-mProt-mLamb-GSResPL,2);
-			         }
+            }
             G4double sLim=zLim;
             if(S>1&&GSResLL!=GSMass&&fMass+mLamb+GSResLL<totMass)
@@ -1925,13 +1930,13 @@
             G4double aLim=sLim;
             if(evalph&&Z>1&&N>1&&a>4&&GSResLA!=GSMass&&fMass+mAlph+ABarr+GSResLA<totMass)
-			         {
-			           if(barf) aLim+=pow(totMass-mLamb-mAlph-ABarr-GSResLA,2)*
+            {
+              if(barf) aLim+=pow(totMass-mLamb-mAlph-ABarr-GSResLA,2)*
                              evalph*Z*(Z-1)*N*(N-1)*12/(a-2)/(a-3)/(a-4);
               else     aLim+=pow(totMass-mLamb-mAlph-GSResLA,2)*
                              evalph*Z*(Z-1)*N*(N-1)*12/(a-2)/(a-3)/(a-4);
-			         }
+            }
             G4double r = aLim*G4UniformRand();
 #ifdef pdebug
-			         G4cout<<"G4QN::EB:l, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim
+            G4cout<<"G4QN::EB:l, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim
                   <<G4endl;
 #endif
@@ -1939,5 +1944,5 @@
             if(!aLim) three=false;
             else if(r>sLim)
-		          {
+            {
               eMass = mAlph;
               dbQPDG= LAQPDG;
@@ -1945,9 +1950,9 @@
               rQPDG = laQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: L+A"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: L+A"<<G4endl;
+#endif
+            }
             else if(zLim<sLim&&r>zLim&&r<=sLim)
-		          {
+            {
               eMass = mLamb;
               dbQPDG= LLQPDG;
@@ -1955,9 +1960,9 @@
               rQPDG = llQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: L+L"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: L+L"<<G4endl;
+#endif
+            }
             else if(nLim<zLim&&r>nLim&&r<=zLim)
-	           {
+            {
               eMass = mProt;
               dbQPDG= PLQPDG;
@@ -1965,9 +1970,9 @@
               rQPDG = plQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: L+P"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: L+P"<<G4endl;
+#endif
+            }
             else if(r<=nLim)
-	           {
+            {
               eMass = mNeut;
               dbQPDG= NLQPDG;
@@ -1975,13 +1980,13 @@
               rQPDG = nlQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: L+N"<<G4endl;
-#endif
-   	        }
+              G4cout<<"G4QNucleus::EvaporateBary: L+N"<<G4endl;
+#endif
+            }
             else three=false;
-		        }
+          }
           else if(PDG==aPDG&&(anCond&&apCond&&alCond&&aaCond)) // a+b+RN decay can't happen
-		        { //@@ Take into account Coulomb Barier Penetration Probability
-#ifdef pdebug
-			         G4cout<<"G4QN::EB:*a*: n="<<anCond<<",p="<<apCond<<",l="<<alCond<<",a="<<aaCond
+          { //@@ Take into account Coulomb Barier Penetration Probability
+#ifdef pdebug
+            G4cout<<"G4QN::EB:*a*: n="<<anCond<<",p="<<apCond<<",l="<<alCond<<",a="<<aaCond
                   <<G4endl;
 #endif
@@ -1990,31 +1995,31 @@
             G4double nLim=0.;
             if(N>2&&GSResNA!=GSMass&&fMass+mNeut+ABarr+GSResNA<totMass)
-			         {
-			           if(barf) nLim+=(N-2)*pow(totMass-mNeut-mAlph-ABarr-GSResNA,2);
+            {
+              if(barf) nLim+=(N-2)*pow(totMass-mNeut-mAlph-ABarr-GSResNA,2);
               else     nLim+=(N-2)*pow(totMass-mNeut-mAlph-GSResNA,2);
-			         }
+            }
             G4double zLim=nLim;
             if(Z>2&&GSResPA!=GSMass&&fMass+mProt+SAPBarr+GSResPA<totMass)
-			         {
-			           if(barf) zLim+=(Z-2)*pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2);
+            {
+              if(barf) zLim+=(Z-2)*pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2);
               else     zLim+=(Z-2)*pow(totMass-mProt-mAlph-GSResPA,2);
-			         }
+            }
             G4double sLim=zLim;
             if(S&&GSResLA!=GSMass&&fMass+mLamb+ABarr+GSResLA<totMass)
-			         {
-			           if(barf) sLim+=S*pow(totMass-mLamb-mAlph-ABarr-GSResLA,2);
+            {
+              if(barf) sLim+=S*pow(totMass-mLamb-mAlph-ABarr-GSResLA,2);
               else     sLim+=S*pow(totMass-mLamb-mAlph-GSResLA,2);
-			         }
+            }
             G4double aLim=sLim;
             if(evalph&&Z>3&&N>3&&a>7&&GSResAA!=GSMass&&fMass+mAlph+SAABarr+GSResAA<totMass)
-			         {
-			           if(barf) aLim+=pow(totMass-mAlph-mAlph-SAABarr-GSResAA,2)*
+            {
+              if(barf) aLim+=pow(totMass-mAlph-mAlph-SAABarr-GSResAA,2)*
                              evalph*(Z-2)*(Z-3)*(N-2)*(N-3)*12/(a-5)/(a-6)/(a-7);
               else     aLim+=pow(totMass-mAlph-mAlph-GSResAA,2)*
                              evalph*(Z-2)*(Z-3)*(N-2)*(N-3)*12/(a-5)/(a-6)/(a-7);
-			         }
+            }
             G4double r = aLim*G4UniformRand();
 #ifdef pdebug
-			         G4cout<<"G4QN::EB:a, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim
+            G4cout<<"G4QN::EB:a, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim
                   <<G4endl;
 #endif
@@ -2022,5 +2027,5 @@
             if(!aLim) three=false;
             else if(r>sLim)
-		          {
+            {
               eMass = mAlph;
               dbQPDG= AAQPDG;
@@ -2028,9 +2033,9 @@
               rQPDG = aaQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: A+A"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: A+A"<<G4endl;
+#endif
+            }
             else if(zLim<sLim&&r>zLim&&r<=sLim)
-		          {
+            {
               eMass = mLamb;
               dbQPDG= LAQPDG;
@@ -2038,9 +2043,9 @@
               rQPDG = laQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: A+L"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: A+L"<<G4endl;
+#endif
+            }
             else if(nLim<zLim&&r>nLim&&r<=zLim)
-	           {
+            {
               eMass = mProt;
               dbQPDG= PAQPDG;
@@ -2048,9 +2053,9 @@
               rQPDG = paQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: A+P"<<G4endl;
-#endif
-		          }
+              G4cout<<"G4QNucleus::EvaporateBary: A+P"<<G4endl;
+#endif
+            }
             else if(r<=nLim)
-	           {
+            {
               eMass = mNeut;
               dbQPDG= NAQPDG;
@@ -2058,24 +2063,24 @@
               rQPDG = naQPDG;
 #ifdef pdebug
-			           G4cout<<"G4QNucleus::EvaporateBary: A+N"<<G4endl;
-#endif
-   	        }
+              G4cout<<"G4QNucleus::EvaporateBary: A+N"<<G4endl;
+#endif
+            }
             else three=false;
-		        }
+          }
           else three=false;
           if(rMass<1600.)
-		        {
+          {
             if     (rQPDG==pQPDG)rMass=mProt;
             else if(rQPDG==nQPDG)rMass=mNeut;
             else if(rQPDG==lQPDG)rMass=mLamb;
-		        }
+          }
 #ifdef pdebug
           G4cout<<"G4QNucleus::EvaporateBary:evaBar="<<eMass<<bQPDG<<",resN="<<rMass<<rQPDG
                 <<",secB="<<fMass<<",three="<<three<<G4endl;
 #endif
-	       }
-	     }
+        }
+      }
       else // ==============> Just decay in a baryon and a residual (to avoid gamma-decay)
-	     { //@@ Take into account Coulomb Barier Penetration Probability (?? - Emergency)
+      { //@@ Take into account Coulomb Barier Penetration Probability (?? - Emergency)
         G4double nLim=0.;
         if(nFlag&&mNeut+GSResNn<totMass)
@@ -2083,5 +2088,5 @@
           G4double ken=totMass-mNeut-GSResNn;
           nLim+=N*CoulBarPenProb(0.,ken,0,1)*sqrt(ken);
-		      }
+        }
         G4double zLim=nLim;
         if(pFlag&&mProt+PBarr+GSResNp<totMass)
@@ -2090,5 +2095,5 @@
           if(barf) ken-=PBarr;
           zLim+=Z*CoulBarPenProb(PBarr,ken,1,1)*sqrt(ken);
-		      }
+        }
         G4double sLim=zLim;
         if(lFlag&&mLamb+GSResNl<totMass)
@@ -2096,5 +2101,5 @@
           G4double ken=totMass-mLamb-GSResNl;
           sLim+=S*CoulBarPenProb(0.,ken,0,1)*sqrt(ken);
-		      }
+        }
         G4double aLim=sLim;
         if(evalph&&aFlag&&mAlph+GSResNa<totMass)
@@ -2104,5 +2109,5 @@
           aLim+=CoulBarPenProb(ABarr,ken,2,4)*sqrt(ken)*evalph*Z*(Z-1)*N*(N-1)
                 *6/a1/(a-2)/(a-3);
-		      }
+        }
         G4double r = aLim*G4UniformRand();
 #ifdef pdebug
@@ -2111,33 +2116,33 @@
 #endif
         if     (aFlag&&r>sLim)
-		      {
+        {
           bQPDG=aQPDG;
           eMass=mAlph;
           rQPDG=AQPDG;
           rMass=GSResNa;
-		      }
+        }
         else if(lFlag&&r>=zLim&&r<=sLim&&zLim<sLim)
-		      {
+        {
           bQPDG=lQPDG;
           eMass=mLamb;
           rQPDG=LQPDG;
           rMass=GSResNl;
-		      }
+        }
         else if(nFlag&&r>=nLim&&r<=zLim&&nLim<zLim)
-	       {
+        {
           bQPDG=pQPDG;
           eMass=mProt;
           rQPDG=PQPDG;
           rMass=GSResNp;
-		      }
+        }
         else if(pFlag&&r<nLim)
-	       {
+        {
           bQPDG=nQPDG;
           eMass=mNeut;
           rQPDG=NQPDG;
           rMass=GSResNn;
-   	    }
+        }
         else
-	       {
+        {
 #ifdef pdebug
           G4cout<<"G4QNucleus::EvaporateBaryon: Photon #2-B#, dM="<<totMass-GSMass<<G4endl;
@@ -2147,5 +2152,5 @@
           eMass=0.;
           rMass=GSMass;
-	       }
+        }
 #ifdef pdebug
         G4cout<<"G4QNucl::EvaporateBaryon: b="<<eMass<<bQPDG<<",r="<<rMass<<rQPDG<<G4endl;
@@ -2153,5 +2158,5 @@
       }
       if(three)           // Decay in two baryons + Residual Nucleus
-	     {
+      {
 #ifdef pdebug
           G4cout<<"G4QNucl::EvaporateBaryon:Decay in 3 particles"<<G4endl;
@@ -2160,17 +2165,17 @@
         h2mom=G4LorentzVector(0.,0.,0.,rMass);
         h3mom=G4LorentzVector(0.,0.,0.,fMass);
-	       if(!DecayIn3(h1mom,h2mom,h3mom))
+        if(!DecayIn3(h1mom,h2mom,h3mom))
         {
 #ifdef ppdebug
           G4cout<<"*G4QNucl::EvaporateBaryon:Decay M="<<totMass<<",b="<<eMass<<bQPDG
-		        <<",f="<<fMass<<fQPDG<<",r="<<rMass<<rQPDG<<G4endl;
+          <<",f="<<fMass<<fQPDG<<",r="<<rMass<<rQPDG<<G4endl;
 #endif
           return false;
-	       }
+        }
         h1mom+=h3mom;
         bQPDG=dbQPDG;
-	     }
+      }
       else
-	     {
+      {
         if(eMass+rMass<totMass&&cntr<cntm)
         {
@@ -2180,16 +2185,16 @@
 #endif
           if(rMass<1600.)
-		        {
+          {
             if     (rQPDG==pQPDG)rMass=mProt;
             else if(rQPDG==nQPDG)rMass=mNeut;
             else if(rQPDG==lQPDG)rMass=mLamb;
-		        }
+          }
           h1mom=G4LorentzVector(0.,0.,0.,eMass);
           h2mom=G4LorentzVector(0.,0.,0.,rMass);
         }
         else if(totMass>mNeut+GSResNn)               // Neutron if 2-Decay failed
-	       {
-#ifdef pdebug
-		        G4cout<<"G4QNucl::EvaporateBaryon: Neutron , dM="<<totMass-GSResNn-mNeut<<G4endl;
+        {
+#ifdef pdebug
+          G4cout<<"G4QNucl::EvaporateBaryon: Neutron , dM="<<totMass-GSResNn-mNeut<<G4endl;
 #endif
           bQPDG=nQPDG;
@@ -2197,9 +2202,9 @@
           h1mom=G4LorentzVector(0.,0.,0.,mNeut);
           h2mom=G4LorentzVector(0.,0.,0.,GSResNn);      
-	       }
+        }
         else if(totMass>mProt+PBarr+GSResNp)               // Proton if 2-Decay failed
-	       {
-#ifdef pdebug
-		        G4cout<<"G4QNucl::EvaporateBaryon: Proton , dM="<<totMass-GSResNp-mProt<<G4endl;
+        {
+#ifdef pdebug
+          G4cout<<"G4QNucl::EvaporateBaryon: Proton , dM="<<totMass-GSResNp-mProt<<G4endl;
 #endif
           bQPDG=pQPDG;
@@ -2207,9 +2212,9 @@
           h1mom=G4LorentzVector(0.,0.,0.,mProt);
           h2mom=G4LorentzVector(0.,0.,0.,GSResNp);      
-	       }
+        }
         else if(totMass>mAlph+ABarr+GSResNa)               // Alpha if 2-Decay failed
-	       {
-#ifdef pdebug
-		        G4cout<<"G4QNucl::EvaporateBaryon: Alpha , dM="<<totMass-GSResNa-mAlph<<G4endl;
+        {
+#ifdef pdebug
+          G4cout<<"G4QNucl::EvaporateBaryon: Alpha , dM="<<totMass-GSResNa-mAlph<<G4endl;
 #endif
           bQPDG=aQPDG;
@@ -2217,9 +2222,9 @@
           h1mom=G4LorentzVector(0.,0.,0.,mAlph);
           h2mom=G4LorentzVector(0.,0.,0.,GSResNa);      
-	       }
+        }
         else if(totMass>GSMass)               // Photon if 2-Decay failed
-	       {
-#ifdef pdebug
-		        G4cout<<"G4QNucl::EvaporateBaryon:Photon ### 2 ###, dM="<<totMass-GSMass<<G4endl;
+        {
+#ifdef pdebug
+          G4cout<<"G4QNucl::EvaporateBaryon:Photon ### 2 ###, dM="<<totMass-GSMass<<G4endl;
 #endif
           bQPDG=gQPDG;
@@ -2227,17 +2232,17 @@
           h1mom=G4LorentzVector(0.,0.,0.,0.);
           h2mom=G4LorentzVector(0.,0.,0.,GSMass);      
-	       }
+        }
         else
         {
-	         G4cerr<<"***G4QNucl::EvaporateBaryon: Cann't evaporate even gamma (1)"<<G4endl;
+          G4cerr<<"***G4QNucl::EvaporateBaryon: Cann't evaporate even gamma (1)"<<G4endl;
           return false;
         }
       }
-	   }
+    }
     else // ==> Decay in 3 Baryons + Residual is impossible at this point
-	   {
-	     if(secB)                        // Decay in 2Baryons(2a,a+bary)+ResidN is possible
-	     //if(2>3)
-	     {
+    {
+      if(secB)                        // Decay in 2Baryons(2a,a+bary)+ResidN is possible
+      //if(2>3)
+      {
 #ifdef pdebug
         G4cout<<"G4QNucleus::EvaporateBaryon: Decay in 2 baryons"<<G4endl;
@@ -2246,5 +2251,5 @@
         //@@ Coulomb Barrier penetration can be added
         G4double alp=0.;
-		      if(aSecF)alp=evalph*Z*(Z-1)*N*(N-1)*10/(a-2)/(a-3)/(a-4);
+        if(aSecF)alp=evalph*Z*(Z-1)*N*(N-1)*10/(a-2)/(a-3)/(a-4);
         G4double  nnLim=0.;
         if(nnFlag&&totMass>mNeut+mNeut+GSResNN)
@@ -2252,14 +2257,14 @@
         G4double  nzLim=nnLim;
         if(npFlag&&totMass>mNeut+mProt+PBarr+GSResNP)
-		      {
+        {
           if(barf) nzLim+=2*N*Z*pow(totMass-mNeut-mProt-PBarr-GSResNP,2);
           else     nzLim+=2*N*Z*pow(totMass-mNeut-mProt-GSResNP,2);
-		      }
+        }
         G4double  zzLim=nzLim;
         if(ppFlag&&totMass>mProt+mProt+SPPBarr+GSResPP)
-		      {
+        {
           if(barf) zzLim+=Z*(Z-1)*pow(totMass-mProt-mProt-SPPBarr-GSResPP,2);
           else     zzLim+=Z*(Z-1)*pow(totMass-mProt-mProt-GSResPP,2);
-		      }
+        }
         G4double  nlLim=zzLim;
         if(nlFlag&&totMass>mNeut+mLamb+GSResNL)
@@ -2267,8 +2272,8 @@
         G4double  zlLim=nlLim;
         if(plFlag&&totMass>mProt+PBarr+mLamb+GSResPL)
-		      {
+        {
           if(barf) zlLim+=2*Z*S*pow(totMass-mProt-mLamb-PBarr-GSResPL,2);
           else     zlLim+=2*Z*S*pow(totMass-mProt-mLamb-GSResPL,2);
-		      }
+        }
         G4double  llLim=zlLim;
         if(llFlag&&totMass>mLamb+mLamb+GSResLL)
@@ -2276,31 +2281,31 @@
         G4double  naLim=llLim;
         if(naFlag&&totMass>mNeut+mAlph+ABarr+GSResNA)
-		      {
+        {
           if(barf) naLim+=(N-3)*alp*pow(totMass-mNeut-mAlph-ABarr-GSResNA,2);
           else     naLim+=(N-3)*alp*pow(totMass-mNeut-mAlph-GSResNA,2);
-		      }
+        }
         G4double  zaLim=naLim;
         if(paFlag&&totMass>mProt+SAPBarr+mAlph+GSResPA)
-		      {
+        {
           if(barf) zaLim+=(Z-3)*alp*pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2);
           else     zaLim+=(Z-3)*alp*pow(totMass-mProt-mAlph-GSResPA,2);
-		      }
+        }
         G4double  laLim=zaLim;
         if(laFlag&&totMass>mLamb+mAlph+ABarr+GSResLA)
-		      {
+        {
           if(barf) laLim+=S*alp*pow(totMass-mLamb-mAlph-ABarr-GSResLA,2);
           else     laLim+=S*alp*pow(totMass-mLamb-mAlph-GSResLA,2);
-		      }
+        }
         G4double  aaLim=laLim;
         if(evalph&&aaFlag&&totMass>mAlph+mAlph+SAABarr+GSResAA)
-		      {
+        {
           if(barf) aaLim+=alp*pow(totMass-mAlph-mAlph-SAABarr-GSResAA,2)*
                           evalph*(Z-2)*(Z-3)*(N-2)*(N-3)*7/(a-5)/(a-6)/(a-7);
           else     aaLim+=alp*pow(totMass-mAlph-mAlph-GSResAA,2)*
                           evalph*(Z-2)*(Z-3)*(N-2)*(N-3)*7/(a-5)/(a-6)/(a-7);
-		      }
+        }
         G4double r = aaLim*G4UniformRand();
         if     (aaLim&&laLim<r)
-	       {
+        {
           dbQPDG= AAQPDG;
           eMass=mAlph;
@@ -2309,9 +2314,9 @@
           rMass=GSResAA;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: A+A, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: A+A, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         else if(aaLim&&zaLim<r&&r<laLim)
-	       {
+        {
           dbQPDG= LAQPDG;
           eMass=mAlph;
@@ -2320,9 +2325,9 @@
           rMass=GSResLA;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: A+L, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: A+L, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         else if(aaLim&&naLim<r&&r<zaLim)
-	       {
+        {
           dbQPDG= PAQPDG;
           eMass=mAlph;
@@ -2331,9 +2336,9 @@
           rMass=GSResPA;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: A+P, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: A+P, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         else if(aaLim&&llLim<r&&r<naLim)
-	       {
+        {
           dbQPDG= NAQPDG;
           eMass=mAlph;
@@ -2342,9 +2347,9 @@
           rMass=GSResNA;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: A+N, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: A+N, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         else if(aaLim&&zlLim<r&&r<llLim)
-	       {
+        {
           dbQPDG= LLQPDG;
           eMass=mLamb;
@@ -2353,9 +2358,9 @@
           rMass=GSResLL;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: L+L, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: L+L, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         else if(aaLim&&nlLim<r&&r<zlLim)
-	       {
+        {
           dbQPDG= PLQPDG;
           eMass=mLamb;
@@ -2364,9 +2369,9 @@
           rMass=GSResPL;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: L+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: L+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         else if(aaLim&&zzLim<r&&r<nlLim)
-	       {
+        {
           dbQPDG= NLQPDG;
           eMass=mLamb;
@@ -2375,10 +2380,10 @@
           rMass=GSResNL;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: L+n, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: L+n, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+
+        }
         else if(aaLim&&nzLim<r&&r<zzLim)
-	       {
+        {
           dbQPDG= PPQPDG;
           eMass=mProt;
@@ -2387,9 +2392,9 @@
           rMass=GSResPP;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: p+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: p+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         else if(aaLim&&nnLim<r&&r<nzLim)
-	       {
+        {
           dbQPDG= NPQPDG;
           eMass=mNeut;
@@ -2398,9 +2403,9 @@
           rMass=GSResNP;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: n+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-	       }
+          G4cout<<"G4QNuc::EvapBaryon: n+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         else if(aaLim&&r<nnLim)
-	       {
+        {
           dbQPDG= NNQPDG;
           eMass=mNeut;
@@ -2409,10 +2414,10 @@
           rMass=GSResNN;
 #ifdef pdebug
-		        G4cout<<"G4QNuc::EvapBaryon: n+n, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
-#endif
-   	    }
+          G4cout<<"G4QNuc::EvapBaryon: n+n, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;
+#endif
+        }
         //Two particle decay only possible (not frequent event!)
         else if(nFlag)
-		      {
+        {
 #ifdef pdebug
           G4cout<<"G4QNucleus::EvaporateBaryon:Photon ### Decay in neutron ###"<<G4endl;
@@ -2423,7 +2428,7 @@
           eMass=mNeut;
           rMass=GSResNn;
-		      }
+        }
         else if(pFlag)
-		      {
+        {
 #ifdef pdebug
           G4cout<<"G4QNucleus::EvaporateBaryon:Photon ### Decay in proton ###"<<G4endl;
@@ -2434,7 +2439,7 @@
           eMass=mProt;
           rMass=GSResNp;
-		      }
+        }
         else if(aFlag)
-		      {
+        {
 #ifdef pdebug
           G4cout<<"G4QNucleus::EvaporateBaryon:Photon ### Decay in alpha ###"<<G4endl;
@@ -2445,7 +2450,7 @@
           eMass=mAlph;
           rMass=GSResNa;
-		      }
+        }
         else if(lFlag)
-		      {
+        {
 #ifdef pdebug
           G4cout<<"G4QNucleus::EvaporateBaryon:Photon ### Decay in Lambda ###"<<G4endl;
@@ -2456,7 +2461,7 @@
           eMass=mLamb;
           rMass=GSResNl;
-		      }
+        }
         else
-		      {
+        {
 #ifdef pdebug
           G4cout<<"G4QNuc::EvaporBaryon: Photon ### 3-Big ###,dM="<<totMass-GSMass<<G4endl;
@@ -2467,5 +2472,5 @@
           eMass=0.;
           rMass=GSMass;
-		      }
+        }
         if(tpd)
         {
@@ -2473,12 +2478,12 @@
           h2mom=G4LorentzVector(0.,0.,0.,rMass);
           h3mom=G4LorentzVector(0.,0.,0.,fMass);
-	         if(!DecayIn3(h1mom,h2mom,h3mom))
+          if(!DecayIn3(h1mom,h2mom,h3mom))
           {
 #ifdef pdebug
             G4cout<<"*G4QNucl::EvaporateBaryon:Decay M="<<totMass<<",b="<<eMass<<bQPDG
-		          <<",f="<<fMass<<fQPDG<<",r="<<rMass<<rQPDG<<G4endl;
+            <<",f="<<fMass<<fQPDG<<",r="<<rMass<<rQPDG<<G4endl;
 #endif
             return false;
-	         }
+          }
           h1mom+=h3mom;
           bQPDG=dbQPDG;
@@ -2486,19 +2491,19 @@
           G4double sma=h1mom.m();
           G4double dma=sma-eMass-fMass;
-		        G4cout<<"G4QNuc::EvapBar:s="<<sma<<",e="<<eMass<<",f="<<fMass<<",d="<<dma<<",rM="
+          G4cout<<"G4QNuc::EvapBar:s="<<sma<<",e="<<eMass<<",f="<<fMass<<",d="<<dma<<",rM="
                 <<rMass<<G4endl;
 #endif
-		      }
+        }
         else
-		      {
+        {
           if(rMass<1600.)
-		        {
+          {
             if     (rQPDG==pQPDG)rMass=mProt;
             else if(rQPDG==nQPDG)rMass=mNeut;
             else if(rQPDG==lQPDG)rMass=mLamb;
-		        }
+          }
           h1mom=G4LorentzVector(0.,0.,0.,eMass);
           h2mom=G4LorentzVector(0.,0.,0.,rMass);      
-	         if(!DecayIn2(h1mom,h2mom))
+          if(!DecayIn2(h1mom,h2mom))
           {
 #ifdef pdebug
@@ -2507,5 +2512,5 @@
 #endif
             return false;
-	         }
+          }
           h1->SetQPDG(bQPDG);
           h2->SetQPDG(rQPDG);
@@ -2514,9 +2519,9 @@
 #ifdef pdebug
           G4cout<<"G4QNuc::EvapBaryon: Emergency decay is done for b="<<bQPDG<<h1->GetQC()
-	               <<h1mom<<h1mom.m()<<", r="<<rQPDG<<h2->GetQC()<<h2mom<<h2mom.m()<<G4endl;
+                <<h1mom<<h1mom.m()<<", r="<<rQPDG<<h2->GetQC()<<h2mom<<h2mom.m()<<G4endl;
 #endif
           return true;
-		      }
-	     }
+        }
+      }
       else                                     // Only decay in Baryon+Residual is possible
       {
@@ -2530,5 +2535,5 @@
           G4double ken=totMass-mNeut-GSResNn;
           nLim+=N*CoulBarPenProb(0.,ken,0,1)*sqrt(ken);
-		      }
+        }
         G4double zLim=nLim;
         if(pFlag&&mProt+PBarr+GSResNp<totMass)
@@ -2537,5 +2542,5 @@
           if(barf) ken-=PBarr;
           zLim+=Z*CoulBarPenProb(PBarr,ken,1,1)*sqrt(ken);
-		      }
+        }
         G4double sLim=zLim;
         if(lFlag&&mLamb+GSResNl<totMass)
@@ -2543,7 +2548,7 @@
           G4double ken=totMass-mLamb-GSResNl;
           sLim+=S*CoulBarPenProb(0.,ken,0,1)*sqrt(ken);
-		      }
+        }
         G4double aLim=sLim;
-		      if(aFlag&&mAlph+GSResNa+ABarr<totMass)
+        if(aFlag&&mAlph+GSResNa+ABarr<totMass)
         {
           G4double ken=totMass-mAlph-GSResNa;
@@ -2555,5 +2560,5 @@
                 <<CoulBarPenProb(ABarr,ken,2,4)<<G4endl;
 #endif
-		      }
+        }
         G4double r = aLim*G4UniformRand();
 #ifdef pdebug
@@ -2562,5 +2567,5 @@
 #endif
         if     (aFlag&&r>sLim)
-	       {
+        {
           bQPDG=aQPDG;
           eMass=mAlph;
@@ -2570,7 +2575,7 @@
           G4cout<<"G4QNucleus::EvaporateBaryon: Decay in A + rA="<<GSResNa+mAlph<<G4endl;
 #endif
-	       }
+        }
         else if(lFlag&&r>zLim&&r<sLim)
-	       {
+        {
           bQPDG=lQPDG;
           eMass=mLamb;
@@ -2580,7 +2585,7 @@
           G4cout<<"G4QNucleus::EvaporateBaryon: Decay in L + rA="<<GSResNl+mLamb<<G4endl;
 #endif
-	       }
+        }
         else if(pFlag&&r>nLim&&r<zLim)
-	       {
+        {
           bQPDG=pQPDG;
           eMass=mProt;
@@ -2590,7 +2595,7 @@
           G4cout<<"G4QNucleus::EvaporateBaryon: Decay in P + rA="<<GSResNp+mProt<<G4endl;
 #endif
-	       }
+        }
         else if(nFlag&&r<nLim)
-	       {
+        {
           bQPDG=nQPDG;
           eMass=mNeut;
@@ -2600,7 +2605,7 @@
           G4cout<<"G4QNucleus::EvaporateBaryon: Decay in N + rA="<<GSResNn+mNeut<<G4endl;
 #endif
-   	    }
+        }
         else if(mProt+GSResNp<totMass)
-	       {
+        {
 #ifdef pdebug
           G4cout<<"G4QNucl::EvapBar: Emergency Proton, dM="<<totMass-GSResNp-mProt<<G4endl;
@@ -2610,7 +2615,7 @@
           eMass=mProt;
           rMass=GSResNp;
-	       }
+        }
         else if(mAlph+GSResNa<totMass)
-	       {
+        {
 #ifdef pdebug
           G4cout<<"G4QNucl::EvapBar: Emergency Alpha, dM="<<totMass-GSResNa-mAlph<<G4endl;
@@ -2620,7 +2625,7 @@
           eMass=mAlph;
           rMass=GSResNa;
-	       }
+        }
         else
-	       {
+        {
 #ifdef pdebug
           G4cout<<"G4QNuc::EvapBaryon: Photon ### 4-Big ###, dM="<<totMass-GSMass<<G4endl;
@@ -2630,25 +2635,25 @@
           eMass=0.;
           rMass=GSMass;
-	       }
+        }
         if(rMass<1600.)
-		      {
+        {
           if     (rQPDG==pQPDG)rMass=mProt;
           else if(rQPDG==nQPDG)rMass=mNeut;
           else if(rQPDG==lQPDG)rMass=mLamb;
-	       }
+        }
         h1mom=G4LorentzVector(0.,0.,0.,eMass);
         h2mom=G4LorentzVector(0.,0.,0.,rMass);      
       }
-	   }
-	   if(!DecayIn2(h1mom,h2mom))
+    }
+    if(!DecayIn2(h1mom,h2mom))
     {
 #ifdef pdebug
       G4cout<<"*G4QNucleus::EvaporateBaryon: Decay M="<<totMass<<",b="<<bQPDG<<h1->GetQC()
-		    <<eMass<<",r="<<rQPDG<<h2->GetQC()<<rMass<<G4endl;
+      <<eMass<<",r="<<rQPDG<<h2->GetQC()<<rMass<<G4endl;
 #endif
       return false;
-	   }
-#ifdef pdebug
-	   G4cout<<"G4QN::EvaB: **RESULT** b="<<bQPDG<<h1mom<<", r="<<rQPDG<<h2mom<<G4endl;
+    }
+#ifdef pdebug
+    G4cout<<"G4QN::EvaB: **RESULT** b="<<bQPDG<<h1mom<<", r="<<rQPDG<<h2mom<<G4endl;
 #endif
     h1->SetQPDG(bQPDG);
@@ -2658,7 +2663,7 @@
 #ifdef pdebug
     G4cout<<"G4QNucleus::EvaporateBaryon: Evaporation is done for b="<<bQPDG<<h1->GetQC()
-	      <<h1mom<<h1mom.m()<<", r="<<rQPDG<<h2->GetQC()<<h2mom<<h2mom.m()<<G4endl;
-#endif
-	   return true;
+       <<h1mom<<h1mom.m()<<", r="<<rQPDG<<h2->GetQC()<<h2mom<<h2mom.m()<<G4endl;
+#endif
+    return true;
   }
   else if(a==1)
@@ -2707,6 +2712,6 @@
   {
     j--;
-	   i++;
-	   v*=j*f/i;
+    i++;
+    v*=j*f/i;
     s+=v;
   }
@@ -2724,27 +2729,27 @@
   static G4int mesonPDG[nOfMesons]  =  {221,111,211,-211,311,321,-311,-321,331,    //  0- 8
   // Vector resonances   (1):           omega,Rh0,Rh+,Rho-,K0*,K+*,AK0*,AK-*,Phi
-																																								223,113,213,-213,313,323,-313,-323,333,    //  9-18
+                                        223,113,213,-213,313,323,-313,-323,333,    //  9-18
   // Tensor D-resonances (2):           f2 ,a20,a2+, a2-,K20,K2+,AK20,AK2-,f2'
-																																								225,115,215,-215,315,325,-315,-325,335,    // 19-27
+                                        225,115,215,-215,315,325,-315,-325,335,    // 19-27
   // Tensor F-resonances (3):           om3,ro3,r3+,rh3-,K30,K3+,AK30,AK3-,Phi3
                                         227,117,217,-217,317,327,-317,-327,337,    // 28-35
   // Tensor G-resonances (4):           f4 ,a40,a4+, a4-,K40,K4+,AK40,AK4-,f4'
-								                                229,119,219,-219,319,329,-319,-329,339};   // 36-44
+                                        229,119,219,-219,319,329,-319,-329,339};   // 36-44
   // Baryon octet      (1/2):          n  , an  , p  , ap  ,lamb,alamb, sig-,asig-
   static G4int baryonPDG[nOfBaryons]={2112,-2112,2212,-2212,3122,-3122,3112,-3112, // 45-52
-		// Hyperon octet     (1/2):         sig0,asig0,sig+,asig+,ksi-,aksi-,ksi0,aksi0
-																																						3212,-3212,3222,-3222,3312,-3312,3322,-3322, // 53-60
+  // Hyperon octet     (1/2):         sig0,asig0,sig+,asig+,ksi-,aksi-,ksi0,aksi0
+                                      3212,-3212,3222,-3222,3312,-3312,3322,-3322, // 53-60
   // Baryon decuplet   (3/2):   del-,adel-,del0,adel0,del+,adel+,dl++,adl++,sis-,asis-
-																																1114,-1114,2114,-2114,2214,-2214,2224,-2224,3114,-3114,//70
-		//                            sis0,asis0,sis+,asis+,kss-,akss-,kss0,akss0,omeg,aomeg
-																																3214,-3214,3224,-3224,3314,-3314,3324,-3324,3334,-3334,//80
+                                1114,-1114,2114,-2114,2214,-2214,2224,-2224,3114,-3114,//70
+  //                            sis0,asis0,sis+,asis+,kss-,akss-,kss0,akss0,omeg,aomeg
+                                3214,-3214,3224,-3224,3314,-3314,3324,-3324,3334,-3334,//80
   // Baryon octet      (5/2):         n5/2,an5/2,p5/2,ap5/2,l5/2,al5/2,si5-,asi5-
-																																						2116,-2116,2216,-2216,3126,-3126,3116,-3116, // 81-88
-		//                                  si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50
+                                      2116,-2116,2216,-2216,3126,-3126,3116,-3116, // 81-88
+  //                                  si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50
                                       3216,-3216,3226,-3226,3316,-3316,3326,-3326, // 89-96
   // Baryon decuplet   (7/2):  dl5-,adl5-,dl50,adl50,dl5+,adl5+,d5++,ad5++,si5-,asi5-
-																														1118,-1118,2118,-2118,2218,-2218,2228,-2228,3118,-3118, //106
-		//                          si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50,ome5,aome5
-																														3218,-3218,3228,-3228,3318,-3318,3328,-3328,3338,-3338};//116
+                              1118,-1118,2118,-2118,2218,-2218,2228,-2228,3118,-3118, //106
+  //                          si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50,ome5,aome5
+                              3218,-3218,3228,-3228,3318,-3318,3328,-3328,3338,-3338};//116
   G4int i=0;
 #ifdef debug
@@ -2837,49 +2842,49 @@
     //static G4int mesonPDG[45]  =  {221,111,211,-211,311,321,-311,-321,331,       //  0- 8
     // Vector resonances   (1):    omega,Rh0,Rh+,Rho-,K0*,K+*,AK0*,AK-*,Phi
-		  //																							 						223,113,213,-213,313,323,-313,-323,333,        //  9-18
+    //                              223,113,213,-213,313,323,-313,-323,333,        //  9-18
     // Tensor D-resonances (2):     f2 ,a20,a2+, a2-,K20,K2+,AK20,AK2-,f2'
-		  //																						 							225,115,215,-215,315,325,-315,-325,335,        // 19-27
+    //                              225,115,215,-215,315,325,-315,-325,335,        // 19-27
     // Tensor F-resonances (3):     om3,ro3,r3+,rh3-,K30,K3+,AK30,AK3-,Phi3
     //                              227,117,217,-217,317,327,-317,-327,337,        // 28-35
     // Tensor G-resonances (4):     f4 ,a40,a4+, a4-,K40,K4+,AK40,AK4-,f4'
-		  //						                        229,119,219,-219,319,329,-319,-329,339};       // 36-44
+    //                              229,119,219,-219,319,329,-319,-329,339};       // 36-44
     // Baryon octet       (1/2):    n  , an  , p  , ap  ,lamb,alamb, sig-,asig-
     //static G4int baryonPDG[72]={2112,-2112,2212,-2212,3122,-3122,3112,-3112,     // 45-52
-		  // Hyperon octet     (1/2): sig0,asig0,sig+,asig+,ksi-,aksi-,ksi0,aksi0
-		  //																												3212,-3212,3222,-3222,3312,-3312,3322,-3322,     // 53-60
+    // Hyperon octet     (1/2): sig0,asig0,sig+,asig+,ksi-,aksi-,ksi0,aksi0
+    //                            3212,-3212,3222,-3222,3312,-3312,3322,-3322,     // 53-60
     // Baryon decuplet   (3/2): del-,adel-,del0,adel0,del+,adel+,dl++,adl++,sis-,asis-
-		  //																										1114,-1114,2114,-2114,2214,-2214,2224,-2224,3114,-3114,//70
-		  //                          sis0,asis0,sis+,asis+,kss-,akss-,kss0,akss0,omeg,aomeg
-		  //																										3214,-3214,3224,-3224,3314,-3314,3324,-3324,3334,-3334,//80
+    //                          1114,-1114,2114,-2114,2214,-2214,2224,-2224,3114,-3114,//70
+    //                          sis0,asis0,sis+,asis+,kss-,akss-,kss0,akss0,omeg,aomeg
+    //                          3214,-3214,3224,-3224,3314,-3314,3324,-3324,3334,-3334,//80
     // Baryon octet      (5/2): n5/2,an5/2,p5/2,ap5/2,l5/2,al5/2,si5-,asi5-
-		  //																										2116,-2116,2216,-2216,3126,-3126,3116,-3116,       // 81-88
-		  //                          si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50
+    //                          2116,-2116,2216,-2216,3126,-3126,3116,-3116,       // 81-88
+    //                          si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50
     //                          3216,-3216,3226,-3226,3316,-3316,3326,-3326,       // 89-96
     // Baryon decuplet  (7/2): dl5-,adl5-,dl50,adl50,dl5+,adl5+,d5++,ad5++,si5-,asi5-
-				//																								1118,-1118,2118,-2118,2218,-2218,2228,-2228,3118,-3118, //106
-		  //                        si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50,ome5,aome5
-				//																						  3218,-3218,3228,-3228,3318,-3318,3328,-3328,3338,-3338};//116
+    //                        1118,-1118,2118,-2118,2218,-2218,2228,-2228,3118,-3118, //106
+    //                        si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50,ome5,aome5
+    //                        3218,-3218,3228,-3228,3318,-3318,3328,-3328,3338,-3338};//116
     // One should take into account, that #of mesons & baryons can be cut in G4Quas::HadrQE
-				//G4int nP= theWorld->GetQPEntries(); // A#of initialized particles in CHIPS World
-				////@@ Make special parametyer to cut high resonances for nuclear fragmentation !!
-				//G4int          nMesons  = 45;
-				//if     (nP<34) nMesons  =  9;
-				//else if(nP<51) nMesons  = 18;
-				//else if(nP<65) nMesons  = 27;
-				//else if(nP<82) nMesons  = 36;
-				//G4int          nBaryons = 72;
-				//if     (nP<45) nBaryons = 16;
-				//else if(nP<59) nBaryons = 36;
-				//else if(nP<76) nBaryons = 52;
+    //G4int nP= theWorld->GetQPEntries(); // A#of initialized particles in CHIPS World
+    ////@@ Make special parametyer to cut high resonances for nuclear fragmentation !!
+    //G4int          nMesons  = 45;
+    //if     (nP<34) nMesons  =  9;
+    //else if(nP<51) nMesons  = 18;
+    //else if(nP<65) nMesons  = 27;
+    //else if(nP<82) nMesons  = 36;
+    //G4int          nBaryons = 72;
+    //if     (nP<45) nBaryons = 16;
+    //else if(nP<59) nBaryons = 36;
+    //else if(nP<76) nBaryons = 52;
     // **********************************************************************************
     //G4int cS    = curCand->GetStrangeness();
-	   //if(piF&&gaF&&cPDG!=90000001&&cPDG!=90001000) // Both flags, in case of pi-first-int
-	   //if(piF&&gaF&&cBN!=1&&cBN!=3) // Both flags, which is in case of pi-first-int
-	   if(piF&&gaF&&cBN!=1)// @@ Should be both, which is in case of pi-first-interaction @@ ?
-	   //if(piF&&gaF&&cBN!=1&&cBN!=4) // Should be both, in case of pi-first-interaction
+    //if(piF&&gaF&&cPDG!=90000001&&cPDG!=90001000) // Both flags, in case of pi-first-int
+    //if(piF&&gaF&&cBN!=1&&cBN!=3) // Both flags, which is in case of pi-first-int
+    if(piF&&gaF&&cBN!=1)// @@ Should be both, which is in case of pi-first-interaction @@ ?
+    //if(piF&&gaF&&cBN!=1&&cBN!=4) // Should be both, in case of pi-first-interaction
     {
       curCand->SetPreProbability(0.);  
       curCand->SetDenseProbability(0.); 
-	     curCand->SetPossibility(false);    
+      curCand->SetPossibility(false);    
 #ifdef cldebug
       if(cPDG==90001001) G4cout<<"G4QNuc::PrepCand: piF/gaF fragments are blocked"<<G4endl;
@@ -2887,15 +2892,15 @@
     }
     // @@ in case of the Ksi or Omega- capture it can disturb the simulation
-	   else if(cPDG<80000000&&(abs(cPDG)%10>4||cST>2))// @@ PreClosed HighSpin/Strange hadrons
+    else if(cPDG<80000000&&(abs(cPDG)%10>4||cST>2))// @@ PreClosed HighSpin/Strange hadrons
     {
       curCand->SetPreProbability(0.);  
       curCand->SetDenseProbability(0.); 
-	     curCand->SetPossibility(false);    
+      curCand->SetPossibility(false);    
     }
     else
-	   {
+    {
       G4double tnM=GetQPDG().GetMass();          // Total mass of this nucleus
       if(cPDG>80000000&&cPDG!=90000000)          // ===> Cluster case
-	     {
+      {
         G4int sc = cST;                          // "S" of the cluster
         G4int zc = curCand->GetCharge();         // "Z" of the cluster
@@ -2906,5 +2911,5 @@
         pos      = probVect[ac];                 // Cluster Probability NormalizationFactor
         if(ac<=maxClust&&pos>0.&&(pLV==zeroLV||intLV.m()>.00001+cM))
-	       {
+        {
 
 #ifdef cldebug
@@ -2913,5 +2918,5 @@
           G4int dac=ac+ac;
           if(ac && (piF || gaF))                 // zc>=0
-										{
+          {
             if     (piF&&!gaF&&zc+ac) pos*=(zc+ac)/ac;  // piF interaction (#of u-quarks)
             else if(gaF&&!piF&&zc+dac) pos*=(zc+dac)/ac; // gaF interaction (sum of Q_q^2)
@@ -2921,10 +2926,10 @@
           else if(ac==2&&pos>0.)dense=probVect[255]/pos;
 #ifdef cldebug
-	         G4cout<<"G4QNucleus::PrepC: cPDG="<<cPDG<<",norm="<<pos<<",zc="<<zc<<",nc="<<nc
+          G4cout<<"G4QNucleus::PrepC: cPDG="<<cPDG<<",norm="<<pos<<",zc="<<zc<<",nc="<<nc
                 <<",sc="<<sc<<",ac="<<ac<<",ze1="<<ze1<<",ne1="<<ne1<<",se1="<<se1<<G4endl;
           G4double mp=pos;
 #endif
           if     (ac==1 && ae)                   // ae=0 protection (since here no /pos)
-	         {
+          {
             if     (zc) pos*=ze/ae;
             else if(nc) pos*=ne/ae;
@@ -2936,5 +2941,5 @@
 #ifdef cldebug
             if(pos)
-			         G4cout<<"G4QN::PrC:mp="<<mp<<",pos="<<pos<<",ae="<<ae
+            G4cout<<"G4QN::PrC:mp="<<mp<<",pos="<<pos<<",ae="<<ae
                   <<",Z="<<zc<<",N="<<nc<<",mac="<<mac<<G4endl;
             sZ+=pos*zc;
@@ -2943,8 +2948,8 @@
           }
           else if(ac==2)
-	         {
+          {
             if(ze<zc||ne<nc||se<sc) pos=0.;
             else if(aea)                         // Protection against aea=0.
-		          {
+            {
               if     (zc==2) pos*=ze*(ze-1)/aea;
               else if(nc==2) pos*=ne*(ne-1)/aea;
@@ -2960,10 +2965,10 @@
               //else if(sc==1&&nc==1) pos*=se*ne;
               else G4cout<<"***G4QNucl::PrepCand: z="<<zc<<", n="<<nc<<", s="<<sc<<G4endl;
-		            // Normalization for only not strange matter
-		          }
+              // Normalization for only not strange matter
+            }
             acm=2;
 #ifdef cldebug
             if(pos)
-		          G4cout<<"G4QN::PrC:mp="<<mp<<",p="<<pos<<",A=2,(Z="<<zc<<",N="<<nc<<"),m="
+            G4cout<<"G4QN::PrC:mp="<<mp<<",p="<<pos<<",A=2,(Z="<<zc<<",N="<<nc<<"),m="
                   <<mac<<G4endl;
             sZ+=pos*zc;
@@ -2972,7 +2977,7 @@
           }
           else                                     // ac>2
-	         {
+          {
             if(acm<ac)                             // first time that big cluster
-		          {
+            {
               if(ac<ae1 && ac>0) comb*=(ae1-ac)/ac;
               acm=ac;
@@ -2980,5 +2985,5 @@
               cca=0;
               if(ac%2) mac=7;                      // @@Change it if cluster set is changed
-		            else     mac=8;                      // @@ It is not yet automatic
+              else     mac=8;                      // @@ It is not yet automatic
 #ifdef cldebug
               G4cout<<"G4QNuc::PrepCl:c="<<comb<<",ac="<<ac<<"("<<index<<"),m="<<mac<<",a="
@@ -2989,14 +2994,14 @@
             if(ze1<=zc||ne1<=nc||se1<=sc) prod=0.;
             else
-		          {
+            {
               if(zc>0) for(int iz=1; iz<=zc; iz++) prod*=(ze1-iz)/iz;
               if(nc>0) for(int in=1; in<=nc; in++) prod*=(ne1-in)/in;
               if(sc>0) for(int is=1; is<=sc; is++) prod*=(se1-is)/is;
-		          }
+            }
             s+=prod;
             pos*=prod;
             pos/=comb;
 #ifdef cldebug
-		          if(pos) G4cout<<"G4QN::PreC:c="<<cPDG<<",p="<<pos<<",i="<<index<<",m="<<mac
+            if(pos) G4cout<<"G4QN::PreC:c="<<cPDG<<",p="<<pos<<",i="<<index<<",m="<<mac
                           <<",pr="<<prod<<",c="<<cca<<G4endl;
             sZ+=pos*zc;
@@ -3004,24 +3009,24 @@
 #endif
             cca++;
-	         }
+          }
           curCand->SetPreProbability(pos);
           curCand->SetDenseProbability(pos*dense);
 #ifdef cldebug
-	         G4cout<<"G4QN::PrepC: ClusterPDG="<<cPDG<<",preProb="<<pos<<",d="<<dense<<G4endl;
-#endif
-        }
-	       else                                       // => "Cluster is too big" case
+          G4cout<<"G4QN::PrepC: ClusterPDG="<<cPDG<<",preProb="<<pos<<",d="<<dense<<G4endl;
+#endif
+        }
+        else                                       // => "Cluster is too big" case
         {
           curCand->SetPreProbability(0.);     
           curCand->SetDenseProbability(0.);
-	         curCand->SetPossibility(false);          // This candidate is not possible 
-        }
-	     }
-	     else
+          curCand->SetPossibility(false);          // This candidate is not possible 
+        }
+      }
+      else
       {
         curCand->SetPreProbability(pos);           // ===> Hadronic case in Vacuum     
         curCand->SetDenseProbability(0.);          // ===> Hadronic case in Vacuum
       }
-	     curCand->SetPossibility(true);           // All candidates are possible at this point
+      curCand->SetPossibility(true);           // All candidates are possible at this point
     }
   } // End of the LOOP over Candidates
@@ -3059,5 +3064,5 @@
   // @@ --- Temporary "Lambda/Delta barrier for mesons"
   //if(!cA) cb+=40.;
-		// --- End of Temporary ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // --- End of Temporary ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   return cb;
 } // End of "CoulombBarier"
@@ -3148,10 +3153,10 @@
   G4double GSM=GetGSMass();
 #ifdef debug
-		G4cout<<"G4QNucl::CBPenProb:GSM="<<GSM<<",Z="<<Z<<",N="<<N<<",C="<<C<<",B="<<B<<G4endl;
+  G4cout<<"G4QNucl::CBPenProb:GSM="<<GSM<<",Z="<<Z<<",N="<<N<<",C="<<C<<",B="<<B<<G4endl;
 #endif
   if(2>3);
   // @@ Temporary "Mass Barrier for mesons" @@ __________________
   //else if(!B) wD=40.;
-		// @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ////else if(nA<7&&B>0)  wD=0.;    // Only Coulomb Barrier can reflect !!!
   ////else if((nA<12||nA>16)&&B>0) wD=0.;// Only CoulombB can reflect !!! O16 E-dep of gamA
@@ -3174,5 +3179,5 @@
     wD=80.; // 40 MeV per each nucleon
     //wD=wD/2;
-			 // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   }
   ////else if(B>2)  wD=0.;
@@ -3190,18 +3195,18 @@
   if(wD<0.) wD=0.;
 #ifdef debug
-		G4cout<<"G4QNucl::CBPenProb: wD="<<wD<<",E="<<E<<",CB="<<CB<<G4endl;
+  G4cout<<"G4QNucl::CBPenProb: wD="<<wD<<",E="<<E<<",CB="<<CB<<G4endl;
 #endif
   // @@ Temporary "Virial factor" @@ __________________
   wD=wD+wD;
-		// @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   G4double sR=0.;
   G4double CBD=CB+wD;
   G4double ED=E+wD;
   if(CBD<0.) return 1.;
-  if(ED<0.)  return 0.;
-  //if(nA<27) sR=sqrt(wD/(E+wD));
-  //else      sR=sqrt((CB+wD)/(E+wD));
-  sR=sqrt((CB+wD)/(E+wD));
-  //sR=sqrt(wD/(E+wD));
+  if(ED<=0.)  return 0.;
+  //if(nA<27) sR=sqrt(wD/ED);
+  //else      sR=sqrt(CBD/ED);
+  sR=sqrt(CBD/ED);
+  //sR=sqrt(wD/ED);
 #ifdef pdebug
   G4cout<<"G4QN::CBPP:s="<<sR<<",E="<<E<<",w="<<wD<<",CB="<<CB<<",B="<<B<<",C="<<C<<G4endl;
@@ -3232,25 +3237,25 @@
 void G4QNucleus::ChooseNucleons()
 {
-	 G4int protons =0;
-	 G4int nucleons=0;
+  G4int protons =0;
+  G4int nucleons=0;
   G4int myA=GetA();
-	 while (nucleons < myA)
-	 {
-	   if(protons<Z && G4UniformRand() < G4double(Z-protons)/G4double(myA-nucleons) )
-	   {
-	     protons++;
+  while (nucleons < myA)
+  {
+    if(protons<Z && G4UniformRand() < G4double(Z-protons)/G4double(myA-nucleons) )
+    {
+      protons++;
       nucleons++;
       G4QHadron* proton = new G4QHadron(2212);
-	     theNucleons.push_back(proton);
-	   }
-	   else if ( (nucleons-protons) < (myA-Z) )
-	   {
+      theNucleons.push_back(proton);
+    }
+    else if ( (nucleons-protons) < (myA-Z) )
+    {
       nucleons++;
       G4QHadron* neutron = new G4QHadron(2112);
-	     theNucleons.push_back(neutron);
-	   }
-	   else G4cout<<"G4QNucleus::ChooseNucleons not efficient"<<G4endl;
-	 }
-	 return;
+      theNucleons.push_back(neutron);
+    }
+    else G4cout<<"G4QNucleus::ChooseNucleons not efficient"<<G4endl;
+  }
+  return;
 } // End of ChooseNucleons
 
@@ -3260,43 +3265,43 @@
   static const G4double mProt= G4QPDGCode(2212).GetMass();
   static const G4double mProt2= mProt*mProt;
-	 G4int i=0;                                  // general index
+  G4int i=0;                                  // general index
   G4int myA=GetA();                           // cashed value of A
-	 G4ThreeVector	aPos;                         // Prototype of nucleon position
-	 G4ThreeVector	delta;                        // Prototype of distance between nucleons
+  G4ThreeVector aPos;                         // Prototype of nucleon position
+  G4ThreeVector delta;                        // Prototype of distance between nucleons
   G4ThreeVector* places = new G4ThreeVector[myA]; // Vector of 3D positions
   G4double*      placeM = new G4double[myA];  // Vector of radii
-	 G4bool		freeplace;                          // flag of free space available
-	 G4double nucDist2 = nucleonDistance*nucleonDistance; // @@ can be a common static
-	 G4double maxR=GetRadius(0.01);              // there are no nucleons at this density
-	 while(i<myA)                                // LOOP over all nucleons
-	 {
-	   aPos = maxR*RandomUnitSphere();           // Get random position of nucleon iside maxR
-	   G4double density=GetRelativeDensity(aPos);
-	   if(G4UniformRand()<density)               // Try this position with frequency ~Density
-	   {
-	     freeplace = true;                       // Imply that there is a free space
-	     for(G4int j=0; j<i && freeplace; j++)   // Check that there is no overlap with others
-	     {
-	       delta = places[j] - aPos;             // Distance to nucleon j
+  G4bool  freeplace;                          // flag of free space available
+  G4double nucDist2 = nucleonDistance*nucleonDistance; // @@ can be a common static
+  G4double maxR=GetRadius(0.01);              // there are no nucleons at this density
+  while(i<myA)                                // LOOP over all nucleons
+  {
+    aPos = maxR*RandomUnitSphere();           // Get random position of nucleon iside maxR
+    G4double density=GetRelativeDensity(aPos);
+    if(G4UniformRand()<density)               // Try this position with frequency ~Density
+    {
+      freeplace = true;                       // Imply that there is a free space
+      for(G4int j=0; j<i && freeplace; j++)   // Check that there is no overlap with others
+      {
+        delta = places[j] - aPos;             // Distance to nucleon j
         freeplace= delta.mag2()>nucDist2;     // If false break the LOOP (M.K.)
         if(!freeplace) break;                 // M.K. acceleration
-	     }
-		    //  protons must at least have binding energy of CoulombBarrier (@@ ? M.K.), so
-		    //  assuming Fermi Energy corresponds to Potential, we must place protons such
-		    //  that the Fermi Energy > CoulombBarrier (?)
-	     if(freeplace && theNucleons[i]->GetPDGCode() == 2212) // Free Space Protons
-	     {
-  		    G4double pFermi=GetFermiMomentum(GetDensity(aPos));
-	       G4double eFermi= sqrt(pFermi*pFermi+mProt2)-mProt; // Kinetic energy
-	       if (eFermi <= CoulombBarrier()) freeplace=false;
-	     }
-	     if(freeplace)
-	     {
-		      places[i]=aPos;
-		      ++i;
-	     }
-	   }
-	 }
-	 ReduceSum(places,placeM);                    // Reduce center of mass shift (equalWeight)
+      }
+      //  protons must at least have binding energy of CoulombBarrier (@@ ? M.K.), so
+      //  assuming Fermi Energy corresponds to Potential, we must place protons such
+      //  that the Fermi Energy > CoulombBarrier (?)
+      if(freeplace && theNucleons[i]->GetPDGCode() == 2212) // Free Space Protons
+      {
+        G4double pFermi=GetFermiMomentum(GetDensity(aPos));
+        G4double eFermi= sqrt(pFermi*pFermi+mProt2)-mProt; // Kinetic energy
+        if (eFermi <= CoulombBarrier()) freeplace=false;
+      }
+      if(freeplace)
+      {
+        places[i]=aPos;
+        ++i;
+      }
+    }
+  }
+  ReduceSum(places,placeM);                    // Reduce center of mass shift (equalWeight)
   for(i=0; i<myA; i++) theNucleons[i]->SetPosition(places[i]);
   delete [] places;
@@ -3318,10 +3323,10 @@
   G4double At2= At*At;
   if(iA<17)                                         // Gaussian density distribution
-		{
+  {
     radius = r0sq*At2;                              // Mean Squared Radius (fm^2)
     rho0   = pow(pi*radius, -1.5);                  // Central Density
   }
   else                                              // Wood-Saxon density distribution
-		{
+  {
     G4double r0=1.16*(1.-1.16/At2)*fermi;           // Base for A-dependent radius
     G4double rd=deld/r0;                            // Relative thickness of the surface
@@ -3384,31 +3389,31 @@
   G4ThreeVector* momentum = new G4ThreeVector[myA];
   G4double*      fermiM   = new G4double[myA];
-	 for(i=0; i<myA; i++) // momenta for all, including the last, in case we swap nucleons
-	 {
-	   density=GetDensity(theNucleons[i]->GetPosition());// density around nucleon i
-	   G4double ferm = GetFermiMomentum(density);        // module of momentun for nucleon i
-	   fermiM[i] = ferm;                                 // module of momentun for nucleon i
-	   G4ThreeVector mom=ferm*RandomUnitSphere();        // 3-vector for nucleon mpomentum
-	   if(theNucleons[i]->GetPDGCode() == 2212)           // the nucleon is proton
-	   {
-	     G4double eMax = sqrt(ferm*ferm+mProt2)-CoulombBarrier();
-	     if(eMax>mProt)
-	     {
-	       G4double pmax2= eMax*eMax - mProt2;
-		      fermiM[i] = sqrt(pmax2);                      // modify proton momentum
-		      while(mom.mag2() > pmax2) mom=Get3DFermiMomentum(density, fermiM[i]);
-	     }
+  for(i=0; i<myA; i++) // momenta for all, including the last, in case we swap nucleons
+  {
+    density=GetDensity(theNucleons[i]->GetPosition());// density around nucleon i
+    G4double ferm = GetFermiMomentum(density);        // module of momentun for nucleon i
+    fermiM[i] = ferm;                                 // module of momentun for nucleon i
+    G4ThreeVector mom=ferm*RandomUnitSphere();        // 3-vector for nucleon mpomentum
+    if(theNucleons[i]->GetPDGCode() == 2212)           // the nucleon is proton
+    {
+      G4double eMax = sqrt(ferm*ferm+mProt2)-CoulombBarrier();
+      if(eMax>mProt)
+      {
+        G4double pmax2= eMax*eMax - mProt2;
+        fermiM[i] = sqrt(pmax2);                      // modify proton momentum
+        while(mom.mag2() > pmax2) mom=Get3DFermiMomentum(density, fermiM[i]);
+      }
       else
-	     {
-	       G4cerr<<"G4QNucleus: difficulty finding proton momentum -> mom=0"<<G4endl;
-		      mom=0;
-	     }
-	   }
-	   momentum[i]= mom;
-	 }
-	 ReduceSum(momentum,fermiM);                    // Reduse momentum nonconservation
+      {
+        G4cerr<<"G4QNucleus: difficulty finding proton momentum -> mom=0"<<G4endl;
+        mom=0;
+      }
+    }
+    momentum[i]= mom;
+  }
+  ReduceSum(momentum,fermiM);                    // Reduse momentum nonconservation
   for(i=0; i< myA ; i++ )
   {
-				G4double mN=mNeut;
+    G4double mN=mNeut;
     if(theNucleons[i]->GetPDGCode() == 2212) mN=mProt;
     G4double energy = mN - BindingEnergy()/myA;
@@ -3430,9 +3435,9 @@
   }
   G4int i=0;                                          // To avoid declaration in j-LOOP
-	 G4ThreeVector sum(0.,0.,0.);                        // The sum which must be reduced
+  G4ThreeVector sum(0.,0.,0.);                        // The sum which must be reduced
   G4double minV=DBL_MAX;                              // Min value of Fermi Momentum
   G4double maxV=0.;                                   // Max value of Fermi Momentum
   G4int    maxI=-1;                                   // Index of maximum Fermi Momentum
-	 for(i=0; i<myA; i++)
+  for(i=0; i<myA; i++)
   {
     sum+=momentum[i];                                 // Make sum of 3D Momenta
@@ -3453,5 +3458,5 @@
   }
   G4double* fm2   = new G4double[myA];                // collect temporary squared FermiMom
-	 for(i=0; i<myA; i++) fm2[i]=pFermiM[i]*pFermiM[i];  // calculate squared Fermi Momenta
+  for(i=0; i<myA; i++) fm2[i]=pFermiM[i]*pFermiM[i];  // calculate squared Fermi Momenta
   G4int myA1=myA-1;                                   // to avoid calculation in the j-LOOP
   for(G4int j=0; j<myA; j++)                          // Not more than myA attempts
@@ -3459,9 +3464,9 @@
     G4double minP=DBL_MAX;                            // Minimal progection value
     G4int    minI=-1;                                 // Minimal projection index
-	   for(i=0; i<myA; i++)                              // Sirch for minimum projection
+    for(i=0; i<myA; i++)                              // Sirch for minimum projection
     {
       G4double proj=fabs(sum.dot(momentum[i])/fm2[i]);// abs value of |sum|*cos(theta)
       if(proj<minP)
-				  {
+      {
         minP=proj;
         minI=i;
@@ -3484,5 +3489,5 @@
     }
   }
- 	return true;
+  return true;
 } // End of ReduceSum
 
@@ -3498,5 +3503,5 @@
   G4cout<<"G4QNucleus::Init3D: A="<<myA<<", Z="<<Z<<G4endl;
 #endif
-		InitDensity();
+  InitDensity();
   ChooseNucleons();  
   ChoosePositions();
@@ -3504,5 +3509,5 @@
   G4double Ebind= BindingEnergy()/myA;
   for (G4int i=0; i<myA; i++) theNucleons[i]->SetBindingEnergy(Ebind); // @@ ? M.K.
- 	currentNucleon=0;                                   // Automatically starts the LOOP
+  currentNucleon=0;                                   // Automatically starts the LOOP
   return;  
 } // End of Init3D
@@ -3511,12 +3516,12 @@
 G4double G4QNucleus::GetOuterRadius()
 {
-	 G4double maxradius2=0;
+  G4double maxradius2=0;
   G4int myA=theNucleons.size();
-	 if(myA) for(G4int i=0; i<myA; i++)
-	 {
-		 	G4double nucr2=theNucleons[i]->GetPosition().mag2();
-	   if(nucr2 > maxradius2) maxradius2=nucr2;
-	 }
-	 return sqrt(maxradius2)+nucleonDistance;
+  if(myA) for(G4int i=0; i<myA; i++)
+  {
+    G4double nucr2=theNucleons[i]->GetPosition().mag2();
+    if(nucr2 > maxradius2) maxradius2=nucr2;
+  }
+  return sqrt(maxradius2)+nucleonDistance;
 } // End of GetOuterRadius
 
@@ -3525,5 +3530,5 @@
 {
   G4int myA=theNucleons.size();
- 	if(myA) for(G4int i=0; i<myA; i++) theNucleons[i]->Boost(theBoost);
+  if(myA) for(G4int i=0; i<myA; i++) theNucleons[i]->Boost(theBoost);
 } // End of DoLorentzBoost(G4LorentzVector)
 
@@ -3532,5 +3537,5 @@
 {
   G4int myA=theNucleons.size();
- 	if(myA) for(G4int i=0; i<myA; i++) theNucleons[i]->Boost(theBoost);
+  if(myA) for(G4int i=0; i<myA; i++) theNucleons[i]->Boost(theBoost);
 } // End of DoLorentzBoost(G4ThreeVector)
 
@@ -3539,12 +3544,12 @@
 {
   G4double bet2=theBeta.mag2();
-	 G4double factor=(1.-sqrt(1.-bet2))/bet2;         // 1./(beta2*gamma2)
+  G4double factor=(1.-sqrt(1.-bet2))/bet2;         // 1./(beta2*gamma2)
   G4int myA=theNucleons.size();
- 	if(myA) for (G4int i=0; i< myA; i++)
-	 {
-	   G4ThreeVector pos=theNucleons[i]->GetPosition(); 
-	   pos -= factor*(theBeta*pos)*theBeta;  
-	   theNucleons[i]->SetPosition(pos);
-	 }    
+  if(myA) for (G4int i=0; i< myA; i++)
+  {
+    G4ThreeVector pos=theNucleons[i]->GetPosition(); 
+    pos -= factor*(theBeta*pos)*theBeta;  
+    theNucleons[i]->SetPosition(pos);
+  }    
 } // End of DoLorentzContraction(G4ThreeVector)
 
@@ -3553,5 +3558,5 @@
 {
   G4int myA=theNucleons.size();
- 	if(myA)	for(G4int i=0; i<myA; i++)
+  if(myA) for(G4int i=0; i<myA; i++)
     theNucleons[i]->SetPosition(theNucleons[i]->GetPosition() + theShift);
 } // End of DoTranslation
@@ -3562,6 +3567,6 @@
   G4int myA=theNucleons.size();
   if(myA) currentNucleon=0;
-		else G4cout<<"-Warning-G4QNucleus::StartLoop: LOOP starts for uninited nucleons"<<G4endl;
-	 return myA;
+  else G4cout<<"-Warning-G4QNucleus::StartLoop: LOOP starts for uninited nucleons"<<G4endl;
+  return myA;
 } // End of StartLoop
 
@@ -3580,5 +3585,5 @@
   G4double mT= C*B/(1+B);                   // Max (b=0) b-thickness
   G4double T = mT;                          // Current b-thickness
-		mT/=1000.;                                // Min b-thickness (@@ make 1000 a parameter)
+  mT/=1000.;                                // Min b-thickness (@@ make 1000 a parameter)
   G4double b = 0.;
   while(T>mT)
@@ -3803,9 +3808,9 @@
     G4double gsM=mNeut;
     if(thePDG==90001000)      gsM=mProt;
-	   else if(thePDG==91000000) gsM=mLamb;
+    else if(thePDG==91000000) gsM=mLamb;
     if(fabs(totMass-gsM)<.001)
     {
 #ifdef pdebug
-	     G4cout<<"G4QNu::EvaporateNucl:GSM="<<gsM<<", H="<<thePDG<<qH->Get4Momentum()<<G4endl;
+      G4cout<<"G4QNu::EvaporateNucl:GSM="<<gsM<<", H="<<thePDG<<qH->Get4Momentum()<<G4endl;
 #endif
       evaHV->push_back(qH); // (delete equivalent)
@@ -3816,5 +3821,5 @@
     }
     else if(totMass<gsM)
-	   {
+    {
 #ifdef qdebug
       if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (2) qH="<<G4endl;
@@ -3832,12 +3837,12 @@
       G4double d=totMass-gsM;
 #ifdef pdebug
-	     G4cout<<"G4QN::EvaporNucl: PDG="<<thePDG<<",M="<<totMass<<">"<<gsM<<",d="<<d<<G4endl;
+      G4cout<<"G4QN::EvaporNucl: PDG="<<thePDG<<",M="<<totMass<<">"<<gsM<<",d="<<d<<G4endl;
 #endif
       G4int decPDG=22;
       G4double decM=0.;
       if(d>142.)                           // @@ to avoid more precise calculations
-						{
+      {
         if(thePDG==90001000)               // D+ -> n + pi+
-								{
+        {
           gsM=mNeut;
           thePDG=90000001;
@@ -3846,5 +3851,5 @@
         }
         else if(thePDG==90000001)          // D+ -> n + pi+
-								{
+        {
           gsM=mProt;
           thePDG=90001000;
@@ -3853,5 +3858,5 @@
         }
         else
-								{
+        {
           decPDG=111;
           decM=mPi0;
@@ -3874,5 +3879,5 @@
       }
 #ifdef pdebug
-	     G4cout<<"G4QNucl::EvaNuc:"<<totMass<<q4M<<"->"<<thePDG<<h4Mom<<"+g="<<g4Mom<<",n="
+      G4cout<<"G4QNucl::EvaNuc:"<<totMass<<q4M<<"->"<<thePDG<<h4Mom<<"+g="<<g4Mom<<",n="
             <<evaHV->size()<<G4endl;
 #endif
@@ -3912,5 +3917,5 @@
     {
 #ifdef pdebug
-	     G4cout<<"G4QN::EvaporateNuc:(D)GSM="<<gsM<<",H="<<thePDG<<qH->Get4Momentum()<<G4endl;
+      G4cout<<"G4QN::EvaporateNuc:(D)GSM="<<gsM<<",H="<<thePDG<<qH->Get4Momentum()<<G4endl;
 #endif
       G4LorentzVector h4Mom=q4M*(gsM/totMass);           // At rest in CM
@@ -3931,5 +3936,5 @@
     }
     else if(totMass<gsM+mPi)
-	   {
+    {
 #ifdef qdebug
       if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (6) qH="<<G4endl;
@@ -3961,5 +3966,5 @@
       }
 #ifdef pdebug
-	     G4cout<<"G4QNuc::EvaNuc:"<<totMass<<q4M<<"->"<<thePDG<<h4Mom<<"+pi="<<g4Mom<<", nH="
+      G4cout<<"G4QNuc::EvaNuc:"<<totMass<<q4M<<"->"<<thePDG<<h4Mom<<"+pi="<<g4Mom<<", nH="
             <<evaHV->size()<<G4endl;
 #endif
@@ -4012,11 +4017,11 @@
     G4int   piPDG = -211;
     if(thePDG==90002999)
-	   {
+    {
       nucPDG = 2212;
       nucM   = mProt;
       piPDG  = 211;
-	   }
+    }
     if(totMass>mPi+nucM+nucM)
-	   {
+    {
       G4LorentzVector n14M(0.,0.,0.,nucM);
       G4LorentzVector n24M(0.,0.,0.,nucM);
@@ -4034,5 +4039,5 @@
         G4cerr<<"***G4QNucleus::EvaporateNucleus: tM="<<totMass<<"-> 2N="<<nucPDG<<"(M="
               <<nucM<<") + pi="<<piPDG<<"(M="<<mPi<<")"<<G4endl;
-		      throw G4QException("G4QNucleus::EvaporateNucleus: ISO-Dibaryon DecayIn3 error");
+        throw G4QException("G4QNucleus::EvaporateNucleus: ISO-Dibaryon DecayIn3 error");
       }
 #ifdef qdebug
@@ -4059,7 +4064,7 @@
 #endif
       evaHV->push_back(piH);                // (delete equivalent)
-	   }
-	   else
-	   {
+    }
+    else
+    {
 #ifdef qdebug
       if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (11) qH="<<G4endl;
@@ -4073,5 +4078,5 @@
             <<" < M_2N+Pi, d="<<totMass-2*nucM-mPi<<G4endl;
       throw G4QException("G4QNucleus::EvaporateNucleus:ISO-DiBaryon is under MassShell");
-	   }
+    }
   }
   else if((thePDG==90000002||thePDG==90001001||thePDG==90002000)&&totMass>2020.) //=> IsoDB
@@ -4088,5 +4093,5 @@
     {
       if(G4UniformRand()>.5)
-						{
+      {
         n1PDG=2112;
         n1M=mNeut;
@@ -4094,5 +4099,5 @@
       }
       else
-						{
+      {
         n2PDG=2212;
         n2M=mProt;
@@ -4101,14 +4106,14 @@
     }
     if(totMass>mPi+n1M+n2M)
-	   {
+    {
       G4LorentzVector n14M(0.,0.,0.,n1M);
       G4LorentzVector n24M(0.,0.,0.,n2M);
       G4LorentzVector pi4M(0.,0.,0.,mPi);
       if(!G4QHadron(q4M).DecayIn3(n14M,n24M,pi4M))
-	     {
+      {
         G4cerr<<"***G4QNucl::EvapNucleus:IsoDN, tM="<<totMass<<"-> N1="<<n1PDG<<"(M="<<n1M
               <<") + N2="<<n2PDG<<"(M="<<n2M<<") + pi="<<piPDG<<" (Mpi="<<mPi<<")"<<G4endl;
-		      throw G4QException("G4QNucl::EvaporateNucleus:ISO-dibaryon excit. DecayIn3 error");
-	     }
+        throw G4QException("G4QNucl::EvaporateNucleus:ISO-dibaryon excit. DecayIn3 error");
+      }
 #ifdef qdebug
       if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (12) qH="<<G4endl;
@@ -4134,7 +4139,7 @@
 #endif
       evaHV->push_back(piH);                // (delete equivalent)
-	   }
-	   else
-	   {
+    }
+    else
+    {
 #ifdef qdebug
       if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (13) qH="<<G4endl;
@@ -4148,5 +4153,5 @@
             <<" < M1+M2+Pi, d="<<totMass-n1M-n2M-mPi<<G4endl;
       throw G4QException("G4QNucleus::EvaporateNucleus:IsoDiBarState is under MassShell");
-	   }
+    }
   }
   else if(fabs(totMass-totGSM)<.001)  // Fill as it is or decay Be8, He5, Li5 (@@ add more)
@@ -4221,5 +4226,5 @@
     G4LorentzVector k24M(0.,0.,0.,mK2);
     if(!G4QHadron(q4M).DecayIn3(n4M,k14M,k24M))
-	   {
+    {
 #ifdef qdebug
       if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (14) qH="<<G4endl;
@@ -4232,6 +4237,6 @@
       G4cout<<"***G4QNucleus::EvaNuc:tM="<<totMass<<"-> N="<<nucPDG<<"(M="<<nucM<<") + k1="
             <<k1PDG<<"(M="<<mK1<<") + k2="<<k2PDG<<"(M="<<mK2<<")"<<G4endl;
-	     throw G4QException("G4QNucleus::EvaporateNucleus: Nucleus+2antiK DecayIn3 error");
-	   }
+      throw G4QException("G4QNucleus::EvaporateNucleus: Nucleus+2antiK DecayIn3 error");
+    }
 #ifdef qdebug
     if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (15) qH="<<G4endl;
@@ -4260,5 +4265,5 @@
   // **>>> From here the EVA code starts (baryons/hyperons can be excited) <<<**
   else if ( (thePDG > 80000000 && thePDG != 90000000) || 
-	    thePDG == 2112 || thePDG == 2212 || thePDG == 3122)
+     thePDG == 2112 || thePDG == 2212 || thePDG == 3122)
   { // @@ Improve for Sigma+, Sigma-, Ksi0 & Ksi- content in the Total Np/Nn Nuclei
     if(thePDG<80000000)                        // Switch from QHadronCode to QNuclearCode
@@ -4267,5 +4272,5 @@
       else if(thePDG==2212) thePDG=90001000;   // p
       else if(thePDG==3122) thePDG=91000000;   // lambda
-	   }
+    }
     G4QNucleus qNuc(q4M,thePDG);               // Make a Nucleus for theTotalResidNucleus
     G4double GSMass =qNuc.GetGSMass();         // GSMass of the Total Residual Nucleus
@@ -4277,9 +4282,9 @@
 #ifdef pdebug
     if(bZ==2&&bN==5)G4cout<<"G4QNucleus::EvaNucl: (2,5) GSM="<<GSMass<<" > "
-						                    <<G4QPDGCode(2112).GetNuclMass(2,4,0)+mNeut<<G4endl;
+                          <<G4QPDGCode(2112).GetNuclMass(2,4,0)+mNeut<<G4endl;
     if(bZ==1&&bN==3)G4cout<<"G4QNucl::EvaNucl: (1,3) GSM="<<GSMass<<" > "
-						                    <<G4QPDGCode(2112).GetNuclMass(1,2,0)+mNeut<<G4endl;
+                          <<G4QPDGCode(2112).GetNuclMass(1,2,0)+mNeut<<G4endl;
     G4double dM=totMass-GSMass;
-	   G4cout<<"G4QNucl::EvaNuc:"<<qNuc<<",PDG="<<thePDG<<",M="<<totMass<<",dM="<<dM<<G4endl;
+    G4cout<<"G4QNucl::EvaNuc:"<<qNuc<<",PDG="<<thePDG<<",M="<<totMass<<",dM="<<dM<<G4endl;
     ////////if(dM>7.) throw G4QException("G4QNucleus::EvaporateNucleus: Big Excitation");
 #endif
@@ -4287,5 +4292,5 @@
     G4bool  dbsCond=qNuc.Split2Baryons();      // (Two Baryons)SeparCond for TotResidNucl
 #ifdef pdebug
-	   G4cout<<"G4QNucleus::EvaporateNuc: bs="<<bsCond<<", dbs="<<dbsCond<<", A="<<bA<<G4endl;
+    G4cout<<"G4QNucleus::EvaporateNuc: bs="<<bsCond<<", dbs="<<dbsCond<<", A="<<bA<<G4endl;
 #endif
     if(fabs(totMass-GSMass)<.003&&!bsCond&&!dbsCond) // GS or can't split 1(2)B FillAsItIs
@@ -4300,14 +4305,14 @@
       return;
     }
-    else if ( ( bA == 1 || (!bsCond && !dbsCond) ) && totMass > GSMass+.003 )  //==>Fuse&DecayTech(noGamDec)
-	   //else if(2>3)                                // Close "Fuse&Decay Technology" ***@@@***
-    {
-#ifdef pdebug
-	     G4cout<<"G4QN::EvaN:SplitBar, s="<<bsCond<<",M="<<totMass<<" > GSM="<<GSMass<<G4endl;
+    else if ( ( bA == 1 || (!bsCond && !dbsCond) ) && totMass > GSMass+.003 )//=>Fuse&Decay
+    //else if(2>3)                                // Close "Fuse&Decay Technology"***@@@***
+    {
+#ifdef pdebug
+      G4cout<<"G4QN::EvaN:SplitBar, s="<<bsCond<<",M="<<totMass<<" > GSM="<<GSMass<<G4endl;
 #endif
       G4int nOfOUT = evaHV->size();            // Total#of QHadrons in Vector at this point
       G4bool bnfound=true;                     // Cure "back fusion fragment not found"
       while(nOfOUT)                            // Try BackFusionDecays till something is in
-	     {
+      {
         G4QHadron*     theLast = (*evaHV)[nOfOUT-1];
         G4int          lastBN = theLast->GetBaryonNumber();
@@ -4315,8 +4320,8 @@
         //////////////////G4int          gam    = theLast->GetPDGCode();
 #ifdef pdebug
-		      G4cout<<"G4QN::EvaNuc:*BackFus*,BN="<<lastBN<<",nF="<<nFrag<<",n="<<nOfOUT<<G4endl;
-#endif
-		      while(nFrag)                       // => "Delete Last Decayed Hadron" case
-		      {
+        G4cout<<"G4QN::EvaNuc:*BackFus*,BN="<<lastBN<<",nF="<<nFrag<<",n="<<nOfOUT<<G4endl;
+#endif
+        while(nFrag)                       // => "Delete Last Decayed Hadron" case
+        {
           G4QHadron* thePrev = (*evaHV)[nOfOUT-2];
           nFrag  = thePrev->GetNFragments();
@@ -4324,5 +4329,5 @@
 #ifdef pdebug
           G4int     prevPDG = thePrev->GetPDGCode();
-		        G4cout<<"G4QNucl::EvaNucl: DelTheLast, nFr="<<nFrag<<", pPDG="<<prevPDG<<G4endl;
+          G4cout<<"G4QNucl::EvaNucl: DelTheLast, nFr="<<nFrag<<", pPDG="<<prevPDG<<G4endl;
 #endif
           evaHV->pop_back();               // the prev QHadron is excluded from OUTPUT
@@ -4330,10 +4335,10 @@
           theLast = thePrev;               // Update theLastPntr(Prev instead of Last)
           lastBN=prevBN;
-		        nOfOUT--;                        // Reduce the stack for the Last decayed hadron
-		      }
+          nOfOUT--;                        // Reduce the stack for the Last decayed hadron
+        }
         if(nOfOUT)
-		      {
+        {
           if(lastBN<1&&nOfOUT>1)           // Try Once To Skip Mesons/Gammas & Antibaryons
-		        {
+          {
             G4QHadron* thePrev = (*evaHV)[nOfOUT-2];//***Exchange between Last & Prev***
             evaHV->pop_back();             // the last QHadron is excluded from OUTPUT
@@ -4342,5 +4347,5 @@
             evaHV->push_back(thePrev);     // the Prev becomes the Last (2nd part of exch)
             theLast = thePrev;             // Update theLastPointer (Prev instead of Last)
-		        }
+          }
           G4LorentzVector last4M = theLast->Get4Momentum(); // Selected the last 4-Mom
           G4QContent  lastQC = theLast->GetQC();
@@ -4354,9 +4359,9 @@
           G4double dM=totMass-GSMass-lastM;
 #ifdef pdebug
-		        G4cout<<"G4QN::EvaNuc: tM="<<totMass<<"-LM="<<lastM<<lastQC<<"-GSM="<<GSMass<<"="
+          G4cout<<"G4QN::EvaNuc: tM="<<totMass<<"-LM="<<lastM<<lastQC<<"-GSM="<<GSMass<<"="
                 <<dM<<G4endl;
 #endif
           if(dM>-0.001)                    // Decay in the qH and the last is impossible
-		        {
+          {
             G4QHadron* evH = new G4QHadron(totPDG,q4M); // Create QHadron for CompResidNuc
             if(dM<=0.)
@@ -4377,7 +4382,7 @@
               if(totBN==2)DecayDibaryon(evH,evaHV); // Fill dibaryon (with decay products)
               else evaHV->push_back(evH);// Fill TRN to HVect asIs (delete equivalent)
-		          }
+            }
             else                        // Decay TotalResidualNucleus in GSM+Last
-		          {
+            {
               G4LorentzVector r4Mom(0.,0.,0.,GSMass);
               if(!G4QHadron(q4M).DecayIn2(last4M,r4Mom)) // Decay failed
@@ -4400,5 +4405,5 @@
                 G4cout<<"***G4QN::EvaN:DecayIn L"<<lastQC<<"+RN"<<totQC<<" failed"<<G4endl;
 #endif
-	             }
+              }
               else                        // Decay in GSM+theLast succeeded
               {
@@ -4422,15 +4427,15 @@
                 else evaHV->push_back(nucH);// Fill the Residual Nucleus (del.eq.)
               }
-		          }
+            }
             bnfound=false;
             break;
-		        }
+          }
           thePDG=totPDG;                   // Make ResidualNucleus outOf theTotResidualNucl
-		        GSMass=G4QPDGCode(thePDG).GetMass();// Update the Total Residual Nucleus mass
+          GSMass=G4QPDGCode(thePDG).GetMass();// Update the Total Residual Nucleus mass
           evaHV->pop_back();               // the last QHadron is excluded from OUTPUT
           delete theLast;//!!When kill,DON'T forget to delete theLastQHadron asAnInstance!!
           nOfOUT--;                        // Update the value of OUTPUT entries
-		      }
-	     }
+        }
+      }
       if(bnfound)
       {
@@ -4451,5 +4456,5 @@
         }
 #ifdef pdebug
-	       G4cout<<"G4QNuc::EvaNuc: "<<q4M<<"->totResN="<<thePDG<<h4Mom<<"+g="<<g4Mom<<G4endl;
+        G4cout<<"G4QNuc::EvaNuc: "<<q4M<<"->totResN="<<thePDG<<h4Mom<<"+g="<<g4Mom<<G4endl;
 #endif
         G4QHadron* curH = new G4QHadron(thePDG,h4Mom);
@@ -4473,5 +4478,5 @@
 #endif
       }
-	   }
+    }
     else if(bA==2)
     {
@@ -4491,17 +4496,17 @@
     {
 #ifdef pdebug
-	     G4cout<<"G4QN::EvN:2B="<<dbsCond<<",B="<<bsCond<<",M="<<totMass<<"<"<<GSMass<<G4endl;
+      G4cout<<"G4QN::EvN:2B="<<dbsCond<<",B="<<bsCond<<",M="<<totMass<<"<"<<GSMass<<G4endl;
 #endif
       G4double gResM  =1000000.;           // Prototype of mass of residual for a gamma
       G4int    gResPDG=0;                  // Prototype of residualPDGCode for a gamma
       if(bN==4&&bZ==2&&!bS)                // It's He6 nucleus
-	     {
+      {
         gResPDG= thePDG;                   // PDG of the Residual Nucleus
         gResM  = mHel6;                    // min mass of the Residual Nucleus
-	     }
+      }
       G4double nResM  =1000000.;           // Prototype of mass of residual for a neutron
       G4int    nResPDG=0;                  // Prototype of ResidualPDGCode for a neutron
       if(bsCond==2112&&bN>0&&bA>1)         // There's aNeutr in theNucl, which can be split
-	     {
+      {
         G4QContent resQC=totQC-neutQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4511,9 +4516,9 @@
         else if(nResPDG==91000000) nResM=mLamb;
         else nResM=resN.GetMZNS();         // min mass of the Residual Nucleus
-	     }
+      }
       G4double pResM  =1000000.;           // Prototype of mass of residual for a proton
       G4int    pResPDG=0;                  // Prototype of PDGCode of residual for a proton
       if(bsCond==2212&&bZ>0&&bA>1)         // There's aProton in Nucl, which can be split
-	     {
+      {
         G4QContent resQC=totQC-protQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4523,9 +4528,9 @@
         else if(pResPDG==91000000) pResM=mLamb;
         else pResM  =resN.GetMZNS();       // min mass of the Residual Nucleus
-	     }
+      }
       G4double lResM  =1000000.;           // Prototype of mass of residual for a Lambda
       G4int    lResPDG=0;                  // Prototype of PDGCode of residual for a Lambda
       if(bsCond==3122&&bS>0&&bA>1)         // There's aLambd in theNucl, which can be split
-	     {
+      {
         G4QContent resQC=totQC-lambQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4535,9 +4540,9 @@
         else if(lResPDG==91000000) lResM=mLamb;
         else lResM  =resN.GetMZNS();       // min mass of the Residual Nucleus
-	     }
+      }
       G4double dResM  =1000000.;           // Prototype of mass of residual for a Alpha
       G4int    dResPDG=0;                  // Prototype of PDGCode of residual for a Alpha
       if(bsCond==90001001&&bN>0&&bZ>0&&bA>2)// There's aDeuter in Nucl, which canBeRadiated
-	     {
+      {
         G4QContent resQC=totQC-deutQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4547,9 +4552,9 @@
         else if(dResPDG==91000000) dResM=mLamb;
         else dResM  =resN.GetMZNS();       // minMass of the Residual Nucleus
-	     }
+      }
       G4double aResM  =1000000.;           // Prototype of mass of residual for a Alpha
       G4int    aResPDG=0;                  // Prototype of PDGCode of residual for a Alpha
       if(bsCond==90002002&&bN>1&&bZ>1&&bA>4)// There's Alpha in theNucl, which can be split
-	     {
+      {
         G4QContent resQC=totQC-alphQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4559,9 +4564,9 @@
         else if(aResPDG==91000000) aResM=mLamb;
         else aResM  =resN.GetMZNS();       // minMass of the Residual Nucleus
-	     }
+      }
       G4double nnResM  =1000000.;          // Prototype of mass of residual for a dineutron
       G4int    nnResPDG=0;                 // Prototype of ResidualPDGCode for a dineutron
       if(dbsCond&&bN>1&&bA>2)              // It's nucleus and there is a dineutron
-	     {
+      {
         G4QContent resQC=totQC-neutQC-neutQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4571,9 +4576,9 @@
         else if(nnResPDG==91000000) nnResM=mLamb;
         else nnResM  =resN.GetMZNS();      // min mass of the Residual Nucleus
-	     }
+      }
       G4double ppResM  =1000000.;          // Prototype of mass of residual for a diproton
       G4int    ppResPDG=0;                 // Prototype of ResidualPDGCode for a diproton
       if(dbsCond&&bZ>1&&bA>2)              // It's nucleus and there is a diproton
-	     {
+      {
         G4QContent resQC=totQC-protQC-protQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4583,9 +4588,9 @@
         else if(ppResPDG==91000000) ppResM=mLamb;
         else ppResM  =resN.GetMZNS();      // min mass of the Residual Nucleus
-	     }
+      }
       G4double npResM  =1000000.;          // Prototype of ResidualMass for proton+neutron
       G4int    npResPDG=0;                 // Prototype of ResidualPDGCode for a prot+neut
       if(dbsCond&&bN>0&&bZ>0&&bA>2)        // It's nucleus and there is aProton & aNeutron
-	     {
+      {
         G4QContent resQC=totQC-neutQC-protQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4595,9 +4600,9 @@
         else if(npResPDG==91000000) npResM=mLamb;
         else npResM  =resN.GetMZNS();      // min mass of the Residual Nucleus
-	     }
+      }
       G4double lnResM  =1000000.;          // Prototype of residualMass for lambda+neutron
       G4int    lnResPDG=0;                 // Prototype of ResidualPDGCode for aLambda+Neut
       if(dbsCond&&bN>0&&bS>0&&bA>2)        // It's nucleus and there is aLambda & aNeutron
-	     {
+      {
         G4QContent resQC=totQC-lambQC-protQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4607,9 +4612,9 @@
         else if(lnResPDG==91000000) lnResM=mLamb;
         else lnResM  =resN.GetMZNS();      // min mass of the Residual Nucleus
-	     }
+      }
       G4double lpResM  =1000000.;          // Prototype of residualMass for a proton+lambda
       G4int    lpResPDG=0;                 // Prototype of ResidualPDGCode for theProt+lamb
       if(dbsCond&&bS>0&&bZ>0&&bA>2)        // It's nucleus and there is aProton and aLambda
-	     {
+      {
         G4QContent resQC=totQC-neutQC-protQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4619,9 +4624,9 @@
         else if(lpResPDG==91000000) lpResM=mLamb;
         else lpResM  =resN.GetMZNS();      // minMass of the Residual Nucleus
-	     }
+      }
       G4double llResM  =1000000.;          // Prototype of mass of residual for a di-lambda
       G4int    llResPDG=0;                 // Prototype of ResidPDGCode for the di-lambda
       if(dbsCond&&bS>1&&bA>2)              // It's nucleus and there is a di-lambda
-	     {
+      {
         G4QContent resQC=totQC-neutQC-protQC;
         G4QNucleus resN(resQC);            // Pseudo nucleus for the Residual Nucleus
@@ -4631,5 +4636,5 @@
         else if(llResPDG==91000000) llResM=mLamb;
         else llResM  =resN.GetMZNS();      // min mass of the Residual Nucleus
-	     }
+      }
 #ifdef pdebug
       G4cout<<"G4QNucleus::EvaNucl: rP="<<pResPDG<<",rN="<<nResPDG<<",rL="<<lResPDG<<",N="
@@ -4642,18 +4647,22 @@
           (thePDG == 90002004 && totMass > mHel6+.003) ||
 
-	  (bA > 4 && bsCond && bN > 1 && bZ > 1 && totMass > aResM+mAlph) ||
+          (bA > 4 && bsCond && bN > 1 && bZ > 1 && totMass > aResM+mAlph) ||
 
           (bA > 1 && bsCond && ( (bN > 0 && totMass > nResM+mNeut) || 
                                  (bZ > 0 && totMass > pResM+mProt) || 
-                                 (bS > 0 && totMass > lResM+mLamb) ) )      ||
+                                 (bS > 0 && totMass > lResM+mLamb) ) )    ||
           (bA > 2 && 
-            ( ( bN > 0 && bZ > 0 && 
-	        ((bsCond && totMass > dResM+mDeut) || (dbsCond && totMass > dResM+mDeut) ) ) ||
-
-	      ( dbsCond && ( (bN > 1 && totMass > nnResM+mNeut+mNeut) ||
-                             (bZ > 1 && totMass > ppResM+mProt+mProt) ||
-                             (bS > 1 && totMass > llResM+mLamb+mLamb) ||
-                             (bN && bS && totMass > lnResM+mLamb+mNeut) ||
-			     (bZ && bS && totMass > lpResM+mLamb+mProt) ) ) ) ) )
+           (( bN > 0 && bZ > 0 && 
+              ( (bsCond && totMass > dResM+mDeut) || (dbsCond && totMass > dResM+mDeut) )
+            ) || ( dbsCond && ( (bN > 1   && totMass > nnResM+mNeut+mNeut) ||
+                                (bZ > 1   && totMass > ppResM+mProt+mProt) ||
+                                (bS > 1   && totMass > llResM+mLamb+mLamb) ||
+                                (bN && bS && totMass > lnResM+mLamb+mNeut) ||
+                                (bZ && bS && totMass > lpResM+mLamb+mProt)
+                              )
+                 )
+           )
+          )
+         )
       {
         G4int barPDG = 90002002;           // Just for the default case of Be8->alpha+alpha
@@ -4664,48 +4673,48 @@
         G4double thdM= mNeut;              // This default value is used in the IF
         G4double tMC=totMass+.0002;
-		      if(gResPDG&&tMC>mHel6+.003)        // Can make radiative decay of He6 (priority 0)
-		      {
+        if(gResPDG&&tMC>mHel6+.003)        // Can make radiative decay of He6 (priority 0)
+        {
           barPDG=90002004;
           resPDG=22;
           barM  =mHel6;
           resM  =0.;
-		      }
-		      else if(nResPDG&&tMC>nResM+mNeut)  // Can radiate a neutron (priority 1)
-		      {
+        }
+        else if(nResPDG&&tMC>nResM+mNeut)  // Can radiate a neutron (priority 1)
+        {
           barPDG=90000001;
           resPDG=nResPDG;
           barM  =mNeut;
           resM  =nResM;
-		      }
-		      else if(pResPDG&&totMass+.001>pResM+mProt)   // Can radiate a proton (priority 2)
-		      {
+        }
+        else if(pResPDG&&totMass+.001>pResM+mProt)   // Can radiate a proton (priority 2)
+        {
           barPDG=90001000;
           resPDG=pResPDG;
           barM  =mProt;
           resM  =pResM;
-		      }
-		      else if(lResPDG&&tMC>lResM+mLamb)  // Can radiate a Lambda (priority 3) @@ Sigma0
-		      {
+        }
+        else if(lResPDG&&tMC>lResM+mLamb)  // Can radiate a Lambda (priority 3) @@ Sigma0
+        {
           barPDG=91000000;
           resPDG=lResPDG;
           barM  =mLamb;
           resM  =lResM;
-		      }
+        }
         else if(thePDG!=90004004&&bN>1&&bZ>1&&bA>4&&tMC>aResM+mAlph)// Decay in alpha (p4)
-		      {
+        {
           barPDG=90002002;
           resPDG=aResPDG;
           barM  =mAlph;
           resM  =aResM;
-		      }
-		      else if(dResPDG&&tMC>dResM+mDeut)  // Can radiate a Deuteron (priority 5)
-		      {
+        }
+        else if(dResPDG&&tMC>dResM+mDeut)  // Can radiate a Deuteron (priority 5)
+        {
           barPDG=90001001;
           resPDG=dResPDG;
           barM  =mDeut;
           resM  =dResM;
-		      }
-		      else if(ppResPDG&&tMC>ppResM+mProt+mProt)// Can radiate a DiProton (priority 6)
-		      {
+        }
+        else if(ppResPDG&&tMC>ppResM+mProt+mProt)// Can radiate a DiProton (priority 6)
+        {
           barPDG=90001000;
           resPDG=ppResPDG;
@@ -4714,7 +4723,7 @@
           resM  =ppResM;
           thdM  =mProt;
-		      }
-		      else if(nnResPDG&&tMC>nnResM+mNeut+mNeut)// Can radiate a DiNeutron (priority 7)
-		      {
+        }
+        else if(nnResPDG&&tMC>nnResM+mNeut+mNeut)// Can radiate a DiNeutron (priority 7)
+        {
           barPDG=90000001;
           resPDG=nnResPDG;
@@ -4722,7 +4731,7 @@
           barM  =mNeut;
           resM  =nnResM;
-		      }
-		      else if(npResPDG&&tMC>npResM+mProt+mNeut)// Can radiate a neutron+proton (prior 8)
-		      {
+        }
+        else if(npResPDG&&tMC>npResM+mProt+mNeut)// Can radiate a neutron+proton (prior 8)
+        {
           barPDG=90001000;
           resPDG=npResPDG;
@@ -4730,7 +4739,7 @@
           barM  =mProt;
           resM  =npResM;
-		      }
-		      else if(lnResPDG&&tMC>lnResM+mLamb+mNeut)// Can radiate a Lambda+neutron (prior 9)
-		      {
+        }
+        else if(lnResPDG&&tMC>lnResM+mLamb+mNeut)// Can radiate a Lambda+neutron (prior 9)
+        {
           barPDG=91000000; // @@ Sigma0
           resPDG=lnResPDG;
@@ -4738,7 +4747,7 @@
           barM  =mLamb;
           resM  =lnResM;
-		      }
-		      else if(lpResPDG&&tMC>lpResM+mLamb+mProt)// Can radiate a Lambda+proton (prior 10)
-		      {
+        }
+        else if(lpResPDG&&tMC>lpResM+mLamb+mProt)// Can radiate a Lambda+proton (prior 10)
+        {
           barPDG=91000000; // @@ Sigma0
           resPDG=lpResPDG;
@@ -4747,7 +4756,7 @@
           resM  =lpResM;
           thdM  =mProt;
-		      }
-		      else if(llResPDG&&tMC>llResM+mLamb+mLamb)// Can radiate a DiLambda (priority 11)
-		      {
+        }
+        else if(llResPDG&&tMC>llResM+mLamb+mLamb)// Can radiate a DiLambda (priority 11)
+        {
           barPDG=91000000; // @@ Sigma0
           resPDG=llResPDG;
@@ -4756,17 +4765,17 @@
           resM  =llResM;
           thdM  =mLamb;
-		      }
+        }
         else if(thePDG!=90004004&&tMC>GSMass)// If it's not Be8 decay in gamma & GSM
-		      {
+        {
           barPDG=thePDG;
           resPDG=22;
           barM  =GSMass;
           resM  =0.;
-		      }
+        }
         else if(thePDG!=90004004)
-		      {
+        {
           G4cerr<<"***G4QNuc::EvaN:PDG="<<thePDG<<",M="<<totMass<<"< GSM="<<GSMass<<G4endl;
           throw G4QException("G4QNucleus::EvaporateNucleus: M<GSM & can't decayInPNL");
-		      }
+        }
         G4LorentzVector a4Mom(0.,0.,0.,barM);
         G4LorentzVector b4Mom(0.,0.,0.,resM);
@@ -4785,5 +4794,5 @@
             G4cout<<"---Warning---G4QN::EvN:DecIn2Error b="<<barPDG<<",r="<<resPDG<<G4endl;
             return;
-	         }
+          }
           else
           {
@@ -4825,5 +4834,5 @@
             G4cout<<"---Warning---G4QN::EvN:DecIn2Error,b="<<barPDG<<",r="<<resPDG<<G4endl;
             return;
-	         }
+          }
           else
           {
@@ -4855,5 +4864,5 @@
           }
         }
-	     }
+      }
       else if (fabs(totMass-GSMass)<.003) // @@ Looks like a duplication of the prev. check
       {
@@ -4868,5 +4877,5 @@
       }
       else                             // "System is below mass shell and can't decay" case
-	     {
+      {
 #ifdef pdebug
         G4cout<<"***G4QNucl::EvaNuc: tM="<<totMass<<"("<<thePDG<<") < GSM="<<GSMass<<", d="
@@ -4881,5 +4890,5 @@
     }
     else                                        // ===> Evaporation of excited system
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4QN::EvaNuc:***EVA***tPDG="<<thePDG<<",M="<<totMass<<">GSM="<<GSMass<<",d="
@@ -4906,5 +4915,5 @@
         evcn++;
         if(!qNuc.EvaporateBaryon(bHadron,rHadron)) // Evaporation did not succeed
-	       {
+        {
 #ifdef pdebug
           G4cout<<"***G4QNuc::EvaNuc:***EVA Failed***PDG="<<thePDG<<",M="<<totMass<<G4endl;
@@ -4920,5 +4929,5 @@
 #endif
           return;
-	       }
+        }
         evC=false;
         b4M=bHadron->Get4Momentum();
@@ -4939,5 +4948,5 @@
 #endif
         //if(b4M.e()-b4M.m()<bCB&&evcn<evcm) evC=true;
-	     }  // End of while
+      }  // End of while
 #ifdef pdebug
       G4cout<<"G4QNucl::EvaNuc:*** EVA IS DONE *** F="<<bPDG<<b4M<<",bB="<<bB<<", ResNuc="
@@ -4959,30 +4968,30 @@
       else if(bPDG==90004004) DecayAlphaAlpha(bHadron,evaHV);// Alph+Alph Decay (del.eq.)
       else
-	     {
+      {
         delete bHadron;
         G4cerr<<"***G4QNuc::EvaNuc:bB="<<bB<<">2 - unexpected evaporated fragment"<<G4endl;
         throw G4QException("G4QNucleus::EvaporateNucleus: Wrong evaporation act");
-	     }
+      }
       if(rB>2) EvaporateNucleus(rHadron,evaHV);    // Continue evaporation (@@ Self-call)
       else if(rB==2)                   // => "Dibaryon" case needs decay @@ DecayDibaryon
-	     {
+      {
         G4double rGSM = rHadron->GetQPDG().GetMass(); // Ground State mass of the dibaryon
 #ifdef pdebug
-		      G4cout<<"G4QNuc::EvaNuc:ResidDibM="<<rM<<",GSM="<<rGSM<<",M-GSM="<<rM-rGSM<<G4endl;
+        G4cout<<"G4QNuc::EvaNuc:ResidDibM="<<rM<<",GSM="<<rGSM<<",M-GSM="<<rM-rGSM<<G4endl;
 #endif
         if(rM<=rGSM-0.01)
-		      {
+        {
           delete rHadron;
           G4cerr<<"***G4QNucleus::EvaporNucl: <residual> M="<<rM<<" < GSM="<<rGSM<<G4endl;
           throw G4QException("G4QNucleus::EvaporateNucleus: Evaporation below MassShell");
-		      }
+        }
         else if(fabs(rM-rGSM)<0.01&&rPDG==90001001) evaHV->push_back(rHadron); // (DE)
         else DecayDibaryon(rHadron,evaHV);   // => "Dibaryon Decay" case (del.equivalent)
-	     }
+      }
       else if(rB==5) DecayAlphaBar(rHadron,evaHV);// "Alpha+Baryon Decay" case (del.equiv.)
       else if(rPDG==90004002) DecayAlphaDiN(rHadron,evaHV);//alph+2p (alph+2n is stable)
       else if(rPDG==90004004) DecayAlphaAlpha(rHadron,evaHV);//Alpha+Alpha Decay (delEq)
-      else evaHV->push_back(rHadron);         // Fill ResidNucl=Baryon to OutputHadronVector
-	   } // End of Evaporation of excited system
+      else evaHV->push_back(rHadron);        // Fill ResidNucl=Baryon to OutputHadronVector
+    } // End of Evaporation of excited system
 #ifdef pdebug
     G4cout<<"G4QNucleus::EvaporateNucleus: === End of the evaporation attempt"<<G4endl;
@@ -4997,5 +5006,5 @@
     {
       if(thePDG==10)                            // "Chipolino decay" case 
-	     {
+      {
         G4QContent totQC = qH->GetQC();         // Quark content of the hadron
         G4QChipolino resChip(totQC);            // define the Residual as a Chipolino
@@ -5017,8 +5026,8 @@
           G4LorentzVector qe4M(0.,0.,0.,m2);
           if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M))
-		        {
+          {
             G4cerr<<"***G4QNuc::EvaNuc:tM="<<totMass<<"-> h1M="<<m1<<" + h2M="<<m2<<G4endl;
-		          throw G4QException("G4QNucleus::EvaporateNucleus: Chipol->h1+h2 DecIn2 error");
-	         }
+            throw G4QException("G4QNucleus::EvaporateNucleus: Chipol->h1+h2 DecIn2 error");
+          }
           G4QHadron* H2 = new G4QHadron(h2.GetPDGCode(),qe4M);
 #ifdef pdebug
@@ -5031,7 +5040,7 @@
 #endif
           evaHV->push_back(H1);            // (delete equivalent)
-		      }
+        }
         else
-	       {
+        {
 #ifdef qdebug
           if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (25) qH="<<G4endl;
@@ -5044,11 +5053,11 @@
           G4cerr<<"**G4QN::EN:M="<<totMass<<"<"<<m1<<"+"<<m2<<",d="<<m1+m2-totMass<<G4endl;
           throw G4QException("G4QNucleus::EvaporateNucleus: Chipolino is under MassShell");
-	       }
-	     }
+        }
+      }
       else                                      // "Hadron" case
-	     {
+      {
         G4double totM=G4QPDGCode(thePDG).GetMass();
         if(fabs(totMass-totM)<0.001||abs(thePDG)-10*(abs(thePDG)/10)>2)
-								{
+        {
 #ifdef pdebug
           G4cout<<"**G4QNuc::EvaNuc:EmerFill(2) "<<qH->GetQC()<<qH->Get4Momentum()<<G4endl;
@@ -5060,5 +5069,5 @@
         }
         else if ((thePDG==221||thePDG==331)&&totMass>mPi+mPi) // "Decay in pipi" case
-	       {
+        {
 #ifdef qdebug
           if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (26) qH="<<G4endl;
@@ -5072,8 +5081,8 @@
           G4LorentzVector qe4M(0.,0.,0.,mPi);
           if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M))
-		        {
+          {
             G4cerr<<"***G4QNucleus::EvaporateNucleus:tM="<<totMass<<"-> pi+ + pi-"<<G4endl;
-		          throw G4QException("G4QNucleus::EvaporateNucleus: H->Pi+Pi DecayIn2 error");
-	         }
+            throw G4QException("G4QNucleus::EvaporateNucleus: H->Pi+Pi DecayIn2 error");
+          }
           G4QHadron* H1 = new G4QHadron(211,fq4M);
 #ifdef pdebug
@@ -5086,7 +5095,7 @@
 #endif
           evaHV->push_back(H2);            // (delete equivalent)
-	       }
+        }
         else if ((thePDG==221||thePDG==331)&&totMass>mPi0+mPi0) // "Decay in 2pi0" case
-	       {
+        {
 #ifdef qdebug
           if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (27) qH="<<G4endl;
@@ -5100,8 +5109,8 @@
           G4LorentzVector qe4M(0.,0.,0.,mPi0);
           if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M))
-		        {
+          {
             G4cerr<<"***G4QNucleus::EvaporateNucleus:tM="<<totMass<<"-> pi0 + pi0"<<G4endl;
-		          throw G4QException("G4QNucleus::EvaporateNucleus: H->Pi+Pi DecayIn2 error");
-	         }
+            throw G4QException("G4QNucleus::EvaporateNucleus: H->Pi+Pi DecayIn2 error");
+          }
           G4QHadron* H1 = new G4QHadron(111,fq4M);
 #ifdef pdebug
@@ -5114,7 +5123,7 @@
 #endif
           evaHV->push_back(H2);            // (delete equivalent)
-	       }
+        }
         else if (totMass>totM)                  // "Radiative Hadron decay" case
-	       {
+        {
 #ifdef qdebug
           if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (28) qH="<<G4endl;
@@ -5128,8 +5137,8 @@
           G4LorentzVector qe4M(0.,0.,0.,totM);
           if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M))
-		        {
+          {
             G4cerr<<"***G4QNuc::EvaporateNuc:tM="<<totMass<<"->h1M="<<totM<<"+gam"<<G4endl;
-		          throw G4QException("G4QNucleus::EvaporateNucleus: H*->H+gamma DecIn2 error");
-	         }
+            throw G4QException("G4QNucleus::EvaporateNucleus: H*->H+gamma DecIn2 error");
+          }
           G4QHadron* H2 = new G4QHadron(thePDG,qe4M);
 #ifdef pdebug
@@ -5142,7 +5151,7 @@
 #endif
           evaHV->push_back(H1);            // (delete equivalent)
-	       }
+        }
         else if (thePDG==111||thePDG==221||thePDG==331) // "Gamma+Gamma decay" case
-	       {
+        {
 #ifdef qdebug
           if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (29) qH="<<G4endl;
@@ -5156,8 +5165,8 @@
           G4LorentzVector qe4M(0.,0.,0.,0.);
           if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M))
-		        {
+          {
             G4cerr<<"***G4QNucl::EvaporateNucleus:tM="<<totMass<<"->gamma + gamma"<<G4endl;
-		          throw G4QException("G4QNucleus::EvaporateNucleus: pi/eta->g+g DecIn2 error");
-	         }
+            throw G4QException("G4QNucleus::EvaporateNucleus: pi/eta->g+g DecIn2 error");
+          }
           G4QHadron* H2 = new G4QHadron(22,qe4M);
 #ifdef pdebug
@@ -5170,7 +5179,7 @@
 #endif
           evaHV->push_back(H1);            // (delete equivalent)
-	       }
+        }
         else
-	       {
+        {
 #ifdef qdebug
           if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (30) qH="<<G4endl;
@@ -5184,7 +5193,7 @@
                 <<" < GSM="<<totM<<", 2Pi="<<mPi+mPi<<", 2Pi0="<<mPi0+mPi0<<G4endl;
           throw G4QException("G4QNucleus::EvaporateNucleus: Hadron is under MassShell");
-	       }
-	     }
-	   }
+        }
+      }
+    }
     else
     {
@@ -5261,5 +5270,5 @@
       {
         if(fabs(qM-mSigM)<eps)
-		      {
+        {
           evaHV->push_back(qH);                  // Fill Sigma- as it is
           return;
@@ -5339,5 +5348,5 @@
     }
     else                                          //(2) n*N+m*(Pi-)   (qS=0)
-	   {
+    {
       sPDG = -211;
       qPN  = -qC;
@@ -5389,5 +5398,5 @@
       qBN  = qC;
       fMass= mProt;
-	   }
+    }
     else if(qS  && qC<qBN-qS)                     //(3)n*L+m*P+k*N ***Should not be here***
     {
@@ -5404,5 +5413,5 @@
       {
         if(fabs(qM-mSigP)<eps)                    // Fill Sigma+ as it is
-		      {
+        {
           evaHV->push_back(qH);
           return;
@@ -5659,8 +5668,8 @@
   {
     if(fabs(qM-mDeut)<eps)
-	   {
+    {
       evaHV->push_back(qH);               // Fill as it is (delete equivalent)
       return;
-	   }
+    }
     else if(mProt+mNeut<rM)
     {
@@ -5775,5 +5784,5 @@
     G4double sum=fMass+sMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(fMass/sum);
       s4Mom=q4M*(sMass/sum);
@@ -5810,5 +5819,5 @@
     G4double sum=fMass+sMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(fMass/sum);
       s4Mom=q4M*(sMass/sum);
@@ -5836,5 +5845,5 @@
     // Now the second pair mus be decayed
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(fMass/sum);
       s4Mom=q4M*(sMass/sum);
@@ -5868,5 +5877,5 @@
     G4double sum=fMass+sMass+tMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(fMass/sum);
       s4Mom=q4M*(sMass/sum);
@@ -6050,7 +6059,7 @@
   {
     if(!n1)                               // No K0's only K+'s
-	   {
+    {
       if(n2==1 && mK+nucM>qM+.0001)  // Mass limit: switch to K0
-	     {
+      {
         k1M=mK0;
         n1=1;
@@ -6063,10 +6072,10 @@
         k1PDG=321;                        // Only K+'s (default K0's)
         n1=n2;                            // only n1 is used
-	     }
-	   }
+      }
+    }
     else                                  // No K+'s only K0's
     {
       if(n1==1 && mK0+nucM>qM+.0001) // Mass limit: switch to K+
-	     {
+      {
         k1M=mK;
         k1PDG=321;                        // K+ instead of K0
@@ -6119,5 +6128,5 @@
     }
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(n1M/sum);
       s4Mom=q4M*(nucM/sum);
@@ -6145,5 +6154,5 @@
       G4QHadron* H1 = new G4QHadron(k1PDG,f4Mom); // Create a Hadron for the Kaon
       evaHV->push_back(H1);                       // Fill "H1" (delete equivalent)
-	   }
+    }
     G4QHadron* H2 = new G4QHadron(qPDG,s4Mom);    // Create a Hadron for the Nucleus
     //evaHV->push_back(H2);                       // Fill "H2" (delete equivalent)
@@ -6162,5 +6171,5 @@
     G4double sum=nucM+n1M+n2M;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(n1M/sum);
       s4Mom=q4M*(n2M/sum);
@@ -6188,5 +6197,5 @@
       G4QHadron* H1 = new G4QHadron(k1PDG,f4Mom); // Create a Hadron for the K0
       evaHV->push_back(H1);                       // Fill "H1" (delete equivalent)
-	   }
+    }
     s4Mom/=n2;
     for(G4int i2=0; i2<n2; i2++)
@@ -6194,5 +6203,5 @@
       G4QHadron* H2 = new G4QHadron(k2PDG,s4Mom); // Create a Hadron for the K+
       evaHV->push_back(H2);                       // Fill "H2" (delete equivalent)
-	   }
+    }
     G4QHadron* H3 = new G4QHadron(qPDG,t4Mom);    // Create a Hadron for the nucleus
     //evaHV->push_back(H3);                       // Fill "H3" (delete equivalent)
@@ -6269,5 +6278,5 @@
     G4double sum=fMass+fMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M/2.;
       s4Mom=f4Mom;
@@ -6301,5 +6310,5 @@
     G4double sum=fMass+fMass+fMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M/3.;
       s4Mom=f4Mom;
@@ -6348,5 +6357,5 @@
       G4QHadron* H1 = new G4QHadron(fPDG,f4Mom); // Create a Hadron for the baryon
       evaHV->push_back(H1);                 // Fill "H1" (delete equivalent)
-	   }
+    }
   }
 #ifdef qdebug
@@ -6381,13 +6390,13 @@
   {
     if(fabs(qM-mHel6)<eps)
-	   {
+    {
       evaHV->push_back(qH);                 // Fill as it is (delete equivalent)
       return;
-	   }
+    }
     else if(mNeut+mNeut+mAlph<qM)
     {
       fPDG = 2112;
       fMass= mNeut;
-	   }
+    }
     else
     {
@@ -6499,5 +6508,5 @@
     G4double sum=tfM+tsM;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(tfM/sum);
       s4Mom=q4M*(tsM/sum);
@@ -6550,5 +6559,5 @@
     G4double sum=fMass+sMass+sMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(fMass/sum);
       s4Mom=q4M*(sMass/sum);
@@ -6610,5 +6619,5 @@
     G4double sum=fMass+fMass+sMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*((fMass+fMass)/sum);
       s4Mom=q4M*(sMass/sum);
@@ -6682,5 +6691,5 @@
     G4double sum=fMass+sMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(fMass/sum);
       s4Mom=q4M*(sMass/sum);
@@ -6753,5 +6762,5 @@
     G4double sum=fMass+sMass;
     if(fabs(qM-sum)<eps)
-	   {
+    {
       f4Mom=q4M*(fMass/sum);
       s4Mom=q4M*(sMass/sum);
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPDGCode.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPDGCode.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPDGCode.cc	(revision 1055)
@@ -25,10 +25,17 @@
 //
 //
-// $Id: G4QPDGCode.cc,v 1.56 2008/03/20 20:11:38 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPDGCode.cc,v 1.57 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QPDGCode ----------------
 //             by Mikhail Kossov, Sept 1999.
 //      class for Hadron definitions in CHIPS Model
+// -------------------------------------------------------------------
+// Short description: The PDG Code is made on the basis of the Quark
+// Content (G4QuarkContent) of the hadronic state (including nuclear
+// fragments). The PDG code of the ground state (e.g. pi, N, etc.) is
+// calculated. It includes a complicated algortithm of the G.S. mass
+// calculation for nuclear fragments (now it is synchronised with the
+// G4 nuclear massess).
 // -------------------------------------------------------------------
 
@@ -222,6 +229,6 @@
   static G4int qC[modi] = { 11,   12,   13,   14,   15,   16,   22,   23,   24,   25, // 10
                             37,  110,  220,  330,  111,  211,  221,  311,  321,  331, // 20
-						                    2112, 2212, 3122, 3112, 3212, 3222, 3312, 3322,  113,  213, // 30
-						                     223,  313,  323,  333, 1114, 2114, 2214, 2224, 3124, 3114, // 40
+                          2112, 2212, 3122, 3112, 3212, 3222, 3312, 3322,  113,  213, // 30
+                           223,  313,  323,  333, 1114, 2114, 2214, 2224, 3124, 3114, // 40
                           3214, 3224, 3314, 3324, 3334,  115,  215,  225,  315,  325, // 50
                            335, 2116, 2216, 3126, 3116, 3216, 3226, 3316, 3326,  117, // 60
@@ -235,5 +242,5 @@
                            91001999 , 90001002 , 90002001 , 91000002 , 91001001 ,     //110
                            91002000 , 92000001 , 92001000 , 90999003 , 90001003 ,
-						   90002002 , 90003001 , 91001002 , 91002001 , 92000002 ,     //120
+         90002002 , 90003001 , 91001002 , 91002001 , 92000002 ,     //120
                            92001001 , 92002000};
   static G4int aC[15] = {1,1000,999001,1000000,1000999,1999000,1999999,        // sum 1
@@ -269,32 +276,32 @@
     ,  1691.,   1667.,    1776.,    1776.,   1854.,   1950.,  1950.,  1950.,  1950.,  2100.
     ,  2030.,   2030.,    2030.,    2127.,   2127.,   2252.,  2020.,  2020.,  2044.,  2045.
-	   , 2045., 2297., 2170.272, 2171.565, 2464., 2464., 3108.544, 3111.13,3402.272,3403.565};
+    , 2045., 2297., 2170.272, 2171.565, 2464., 2464., 3108.544, 3111.13,3402.272,3403.565};
   if(iniFlag) // Initialization of the Geant4 hadronic masses
-		{
-				m[ 0]=      G4Electron::Electron()->GetPDGMass();
-				m[ 1]=    G4NeutrinoE::NeutrinoE()->GetPDGMass();
-				m[ 2]=    G4MuonMinus::MuonMinus()->GetPDGMass();
-				m[ 3]=  G4NeutrinoMu::NeutrinoMu()->GetPDGMass();
-				m[ 4]=      G4TauMinus::TauMinus()->GetPDGMass();
-				m[ 5]=G4NeutrinoTau::NeutrinoTau()->GetPDGMass();
-				m[14]=      G4PionZero::PionZero()->GetPDGMass();
-				m[15]=    G4PionMinus::PionMinus()->GetPDGMass();
-				m[16]=                G4Eta::Eta()->GetPDGMass();
-				m[17]=      G4KaonZero::KaonZero()->GetPDGMass();
-				m[18]=    G4KaonMinus::KaonMinus()->GetPDGMass();
-				m[19]=      G4EtaPrime::EtaPrime()->GetPDGMass();
-				m[20]=        G4Neutron::Neutron()->GetPDGMass();
-				m[21]=          G4Proton::Proton()->GetPDGMass();
-				m[22]=          G4Lambda::Lambda()->GetPDGMass();
-				m[23]=  G4SigmaMinus::SigmaMinus()->GetPDGMass();
-				m[24]=    G4SigmaZero::SigmaZero()->GetPDGMass();
-				m[25]=    G4SigmaPlus::SigmaPlus()->GetPDGMass();
-				m[26]=        G4XiMinus::XiMinus()->GetPDGMass();
-				m[27]=          G4XiZero::XiZero()->GetPDGMass();
-				m[44]=  G4OmegaMinus::OmegaMinus()->GetPDGMass();
+  {
+    m[ 0]=      G4Electron::Electron()->GetPDGMass();
+    m[ 1]=    G4NeutrinoE::NeutrinoE()->GetPDGMass();
+    m[ 2]=    G4MuonMinus::MuonMinus()->GetPDGMass();
+    m[ 3]=  G4NeutrinoMu::NeutrinoMu()->GetPDGMass();
+    m[ 4]=      G4TauMinus::TauMinus()->GetPDGMass();
+    m[ 5]=G4NeutrinoTau::NeutrinoTau()->GetPDGMass();
+    m[14]=      G4PionZero::PionZero()->GetPDGMass();
+    m[15]=    G4PionMinus::PionMinus()->GetPDGMass();
+    m[16]=                G4Eta::Eta()->GetPDGMass();
+    m[17]=      G4KaonZero::KaonZero()->GetPDGMass();
+    m[18]=    G4KaonMinus::KaonMinus()->GetPDGMass();
+    m[19]=      G4EtaPrime::EtaPrime()->GetPDGMass();
+    m[20]=        G4Neutron::Neutron()->GetPDGMass();
+    m[21]=          G4Proton::Proton()->GetPDGMass();
+    m[22]=          G4Lambda::Lambda()->GetPDGMass();
+    m[23]=  G4SigmaMinus::SigmaMinus()->GetPDGMass();
+    m[24]=    G4SigmaZero::SigmaZero()->GetPDGMass();
+    m[25]=    G4SigmaPlus::SigmaPlus()->GetPDGMass();
+    m[26]=        G4XiMinus::XiMinus()->GetPDGMass();
+    m[27]=          G4XiZero::XiZero()->GetPDGMass();
+    m[44]=  G4OmegaMinus::OmegaMinus()->GetPDGMass();
     iniFlag=false;
   }
   if(nQ<0 || nQ>=nQHM)
-		{
+  {
     G4cout<<"***G4QPDGCode::QHaM: negative Q-code or Q="<<nQ<<" >= nQmax = "<<nQHM<<G4endl;
     return 0.;
@@ -327,6 +334,6 @@
 #endif
     if(b<0)                                        // ---> Baryons & Fragments
-	   {
-	     b=-b;
+    {
+      b=-b;
       n=-n;
       z=-z;
@@ -335,8 +342,8 @@
     }
     else if(!b)                                    // --> Mesons
-	   {
+    {
       //G4bool anti=false;                           // For the PDG conversion
       if(z<0)                                      // --> Mesons conversion
-	     {
+      {
         n=-n;
         z=-z;
@@ -345,7 +352,7 @@
       }
       if(!z)
-	     {
+      {
         if(s>0)
-	       {
+        {
           n=-n;
           s=-s;
@@ -357,5 +364,5 @@
       }
       else                                         // --> z>0
-	     {
+      {
         if(z==1)
         {
@@ -368,9 +375,9 @@
     } // End of meson case
     if(b>0)                                        // --> Baryon case
-	   {
+    {
       if(b==1)
-	     {
+      {
         if(!s)                                     // --> Baryons
-		      {
+        {
           if(z==-1)    return 34;                  // Delta-
           else if(!z)  return 91;                  // neutron
@@ -381,5 +388,5 @@
         }
         else if(s==1)                              // --> Hyperons
-		      {
+        {
           if(z==-1)    return 93;                  // Sigma-
           else if(!z)  return 92;                  // Lambda (@@ 24->Sigma0)
@@ -389,5 +396,5 @@
         }
         else if(s==2)                              // --> Xi Hyperons
-		      {
+        {
           if(z==-1)    return 95;                  // Xi-
           else if(!z)  return 96;                  // Xi0
@@ -396,5 +403,5 @@
         }
         else if(s==3)                              // --> Xi Hyperons
-		      {
+        {
           if(z==-1)    return 97;                  // Omega-
           else if(!z||z==-2)  return -1;           // Omega+pi Chipolino
@@ -403,5 +410,5 @@
       }
       else
-	     {
+      {
         if(b==2)
         {
@@ -457,5 +464,5 @@
     G4int p=PDGC/10;                // Quark Content
     if(r%2)                         // (2s+1 is odd) Mesons are all the same
-	   {
+    {
       if     (p==11) return Q+=1;
       else if(p==21) return Q+=2;
@@ -471,10 +478,10 @@
         return -2;
       }
-	   }
+    }
     else                    // (2s+1 is even) Baryons
-	   {
+    {
       G4int s=r/2;
       if(s%2)               // ((2s+1)/2 is odd) N Family
-	     {
+      {
         if     (p==211) return Q+=1;
         else if(p==221) return Q+=2;
@@ -492,7 +499,7 @@
           return -2;
         }
-	     }
-	     else                  // ((2s+1)/2 is odd) Delta Family
-	     {
+      }
+      else                  // ((2s+1)/2 is odd) Delta Family
+      {
         if     (p==111) return Q+= 1;
         else if(p==211) return Q+= 2;
@@ -513,6 +520,6 @@
           return -2;
         }
-	     }
-	   }
+      }
+    }
   }
   else                        // Nuclear Fragments
@@ -527,7 +534,7 @@
 #endif
       return -2;
-	   }
+    }
     else
-	   {
+    {
       G4int b=t/3;            // baryon number
       if(b==1)                // baryons
@@ -604,5 +611,5 @@
       }
       else
-	     {
+      {
         if     (s==0&&u==-1&&d== 1) return Q+=1;
         else if(s==0&&u== 0&&d== 0) return Q+=2;
@@ -620,6 +627,6 @@
           return -2;
         }
-	     }
-	   }
+      }
+    }
   }
 #ifdef pdebug
@@ -634,5 +641,5 @@
   G4int ab=theQCode;
 #ifdef debug
-		G4cout<<"G4QPDGCode::GetMass: Mass for Q="<<ab<<",PDG="<<thePDGCode<<",N="<<nQHM<<G4endl;
+  G4cout<<"G4QPDGCode::GetMass: Mass for Q="<<ab<<",PDG="<<thePDGCode<<",N="<<nQHM<<G4endl;
 #endif
   if ( (ab < 0 && thePDGCode < 80000000) || !thePDGCode) {
@@ -664,5 +671,5 @@
   G4double m=GetNuclMass(z,n,s);
 #ifdef debug
-		G4cout<<"G4QPDG::GetM:PDG="<<thePDGCode<<"=>Z="<<z<<",N="<<n<<",S="<<s<<",M="<<m<<G4endl;
+  G4cout<<"G4QPDG::GetM:PDG="<<thePDGCode<<"=>Z="<<z<<",N="<<n<<",S="<<s<<",M="<<m<<G4endl;
 #endif
   return m;
@@ -684,5 +691,5 @@
     , 160., 168., 159., 159.,  87., 300., 300.,  300., 300., 200.
     , 180., 180., 180.,  99.,  99.,  55., 387.,  387., 208., 198.
-	   , 198., 149., 120., 120., 170., 170., 120.,  120., 170., 170.};
+    , 198., 149., 120., 120., 170., 170., 120.,  120., 170., 170.};
   G4int ab=abs(theQCode);
   if(ab<nW) return width[ab];
@@ -730,6 +737,6 @@
   static const G4int iNF[nEl]={0,0,0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, // 14
                          1  ,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, // 29
-																									16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44
-																									31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59
+                         16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44
+                         31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59
                          56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, // 74
                          71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, // 89
@@ -738,6 +745,6 @@
   static G4int iNmin[nEl]={0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, // 14
                          1  ,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, // 29
-																									16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44
-																									31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59
+                         16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44
+                         31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59
                          56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, // 74
                          71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, // 89
@@ -746,6 +753,6 @@
   static G4int iNran[nEl]={19,20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, // 14
                          34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52, // 29
-																									53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44
-																									68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59
+                         53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44
+                         68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59
                          73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76, // 74
                          76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69, // 89
@@ -754,98 +761,98 @@
   static const G4int iNL[nEl]={19,20,21,22,23,24, 25, 26, 27, 28, 29, 30, 31, 32, 33, // 14
                          34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52, // 29
-																									53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44
-																									68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59
+                         53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44
+                         68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59
                          73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76, // 74
                          76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69, // 89
                          68 , 68, 68, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23};//104
    // ********* S=-4 vectors *************
-		static G4bool iNin6[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin6[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
   static G4double VZ6[nEl][iNR];
   //********* S=-3 vectors *************
-		static G4bool iNin7[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin7[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
   static G4double VZ7[nEl][iNR];
   // ********* S=-2 vectors *************
-		static G4bool iNin8[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin8[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
   static G4double VZ8[nEl][iNR];
   // ********* S=-1 vectors *************
-		static G4bool iNin9[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin9[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
   static G4double VZ9[nEl][iNR];
   // ********* S=0 vectors *************
-		static G4bool iNin0[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin0[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
  static G4double VZ0[nEl][iNR];
   // ********* S=1 vectors *************
-		static G4bool iNin1[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin1[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
   static G4double VZ1[nEl][iNR];
   // ********* S=2 vectors *************
-		static G4bool iNin2[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin2[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
   static G4double VZ2[nEl][iNR];
   // ********* S=3 vectors *************
-		static G4bool iNin3[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin3[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
   static G4double VZ3[nEl][iNR];
   // ********* S=2 vectors *************
-		static G4bool iNin4[nEl]={false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
-				false,false,false,false,false,false,false,false,false,false,false,false,false,false};
+  static G4bool iNin4[nEl]={false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false,
+    false,false,false,false,false,false,false,false,false,false,false,false,false,false};
   static G4double VZ4[nEl][iNR];
   //
@@ -863,5 +870,5 @@
   G4int zns=nz+s;
   if(nz+s<0)
-		{
+  {
     z=-z;
     n=-n;
@@ -871,14 +878,14 @@
   }
   if(z<0)
-		{
+  {
     if(z==-1)
-			 {
+    {
       if(!s)
-						{
+      {
         if(n==1)      return mPiC;              // pi-
         else          return mPiC+(n-1)*mNeut;  // Delta- + (N-1)*n
       }
       else if(s==1)                             // Strange negative hadron
-						{
+      {
         if(!n)        return mKM;               // K-
         else if(n==1) return mSiM;              // Sigma-
@@ -888,5 +895,5 @@
       }
       else if(s==2)                             // --> Double-strange negative hadrons
-						{
+      {
         if(!n)        return mKsM;              // Ksi-
         else if(n==1) return mKsiM+mNeut;       // Ksi- + n
@@ -986,14 +993,14 @@
   }
   else if(n<0)
-		{
+  {
     if(n==-1)
-			 {
+    {
       if(!s)
-						{
+      {
         if(z==1)      return mPiC;              // pi+
         else          return mPiC+(z-1)*mProt;  // Delta++ + (Z-1)*p
-					 }
+      }
       else if(s==1)                             // --> Strange neutral hadrons
-						{
+      {
         if(!z)        return mKZ;               // K0
         else if(z==1) return mSiP;              // Sigma+
@@ -1003,5 +1010,5 @@
       }
       else if(s==2)                             // --> Double-strange negative hadrons
-						{
+      {
         if(!z)        return mKsZ;              // Ksi0
         else if(z==1) return mKsiZ+mProt;       // Ksi- + p
@@ -1095,9 +1102,9 @@
   //return CalculateNuclMass(z,n,s); // @@ This is just to compare the calculation time @@
   if(!s)                   // **************> S=0 nucleus
-		{
+  {
     if(nz==256) return 256000.;
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin0[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"**>G4QPDGCode::GetMass:Z="<<z<<", S=0 is initialized. F="<<iNin0[z]<<G4endl;
@@ -1110,5 +1117,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1122,5 +1129,5 @@
     else if(dNn<iNL[z]) return VZ0[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1139,9 +1146,9 @@
   }
   else if(s==1)            // ******************> S=1 nucleus
-		{
+  {
 
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin1[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"**>G4QPDGCode::GetMass:Z="<<z<<", S=1 is initialized. F="<<iNin1[z]<<G4endl;
@@ -1154,5 +1161,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1166,5 +1173,5 @@
     else if(dNn<iNL[z]) return VZ1[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1183,8 +1190,8 @@
   }
   else if(s==-1)           // ******************> S=-1 nucleus
-		{
+  {
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin9[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=-1 is initialized. F="<<iNin9[z]<<G4endl;
@@ -1197,5 +1204,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1209,5 +1216,5 @@
     else if(dNn<iNL[z]) return VZ9[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1226,8 +1233,8 @@
   }
   else if(s==2)            // ******************> S=2 nucleus
-		{
+  {
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin2[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"**>G4QPDGCode::GetMass:Z="<<z<<", S=2 is initialized. F="<<iNin2[z]<<G4endl;
@@ -1240,5 +1247,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1252,5 +1259,5 @@
     else if(dNn<iNL[z]) return VZ2[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1269,8 +1276,8 @@
   }
   else if(s==-2)           // ******************> S=-2 nucleus
-		{
+  {
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin8[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=-2 is initialized. F="<<iNin8[z]<<G4endl;
@@ -1283,5 +1290,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1295,5 +1302,5 @@
     else if(dNn<iNL[z]) return VZ8[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1312,8 +1319,8 @@
   }
   else if(s==-3)           // ******************> S=-3 nucleus
-		{
+  {
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin7[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=-3 is initialized. F="<<iNin7[z]<<G4endl;
@@ -1326,5 +1333,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1338,5 +1345,5 @@
     else if(dNn<iNL[z]) return VZ7[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1355,8 +1362,8 @@
   }
   else if(s==3)            // ******************> S=3 nucleus
-		{
+  {
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin3[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"**>G4QPDGCode::GetMass:Z="<<z<<", S=3 is initialized. F="<<iNin3[z]<<G4endl;
@@ -1369,5 +1376,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1381,5 +1388,5 @@
     else if(dNn<iNL[z]) return VZ3[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1398,8 +1405,8 @@
   }
   else if(s==-4)           // ******************> S=-4 nucleus
-		{
+  {
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin6[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=-4 is initialized. F="<<iNin6[z]<<G4endl;
@@ -1412,5 +1419,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1424,5 +1431,5 @@
     else if(dNn<iNL[z]) return VZ6[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1441,8 +1448,8 @@
   }
   else if(s==4)           // ******************> S=4 nucleus
-		{
+  {
     G4int Nmin=iNF[z];     // Minimun N(Z) for the Dynamic Associative Memory (DAM)
     if(!iNin4[z])          // ====> This element is already initialized
-				{
+    {
 #ifdef idebug
       G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=4 is initialized. F="<<iNin4[z]<<G4endl;
@@ -1455,5 +1462,5 @@
     G4int dNn=n-Nmin;
     if(dNn<0)              // --> The minimum N must be reduced 
-				{
+    {
 #ifdef qdebug
       if(n<iNmin[z])
@@ -1467,5 +1474,5 @@
     else if(dNn<iNL[z]) return VZ4[z][dNn]; // Found in DAM
     else                   // --> The maximum N must be increased
-				{
+    {
 #ifdef qdebug
       if(dNn>iNmax)
@@ -1484,8 +1491,8 @@
   }
   else
-		{
+  {
 #ifdef qdebug
     if(s<Smin || s>Smax)
-				{
+    {
       if(s<Smin) Smin=s;
       if(s>Smax) Smax=s;
@@ -1587,14 +1594,14 @@
   //static G4double c[9][9]={// z=1     =2     =3     =4     =5     =6     =7     =8     =9
   //                 {13.136,14.931,25.320,38.000,45.000,55.000,65.000,75.000,85.000},//n=1
-		//		   {14.950, 2.425,11.680,18.374,27.870,35.094,48.000,60.000,72.000},  //n=2
-		//		   {25.930,11.390,14.086,15.770,22.921,28.914,39.700,49.000,60.000},  //n=3
-		//		   {36.830,17.594,14.908, 4.942,12.416,15.699,24.960,32.048,45.000},  //n=4
-		//		   {41.860,26.110,20.946,11.348,12.051,10.650,17.338,23.111,33.610},  //n=5
-		//		   {45.000,31.598,24.954,12.607, 8.668, 0.000, 5.345, 8.006,16.780},  //n=6
-		//		   {50.000,40.820,33.050,20.174,13.369, 3.125, 2.863, 2.855,10.680},  //n=7
-		//		   {55.000,48.810,40.796,25.076,16.562, 3.020, 0.101,-4.737,1.9520},  //n=8
-		//		   {60.000,55.000,50.100,33.660,23.664, 9.873, 5.683,-0.809,0.8730}}; //n=9
+  //     {14.950, 2.425,11.680,18.374,27.870,35.094,48.000,60.000,72.000},  //n=2
+  //     {25.930,11.390,14.086,15.770,22.921,28.914,39.700,49.000,60.000},  //n=3
+  //     {36.830,17.594,14.908, 4.942,12.416,15.699,24.960,32.048,45.000},  //n=4
+  //     {41.860,26.110,20.946,11.348,12.051,10.650,17.338,23.111,33.610},  //n=5
+  //     {45.000,31.598,24.954,12.607, 8.668, 0.000, 5.345, 8.006,16.780},  //n=6
+  //     {50.000,40.820,33.050,20.174,13.369, 3.125, 2.863, 2.855,10.680},  //n=7
+  //     {55.000,48.810,40.796,25.076,16.562, 3.020, 0.101,-4.737,1.9520},  //n=8
+  //     {60.000,55.000,50.100,33.660,23.664, 9.873, 5.683,-0.809,0.8730}}; //n=9
   if(z>107)
-		{
+  {
 #ifdef debug
     G4cout<<"***G4QPDGCode::CalcNuclMass: Z="<<z<<">107, N="<<n<<", S="<<s<<G4endl;
@@ -1641,5 +1648,5 @@
       return mK;  // Simple decision
     else if(S>0)                                  // General decision
-	   {
+    {
       if     (-Z>S) return S*mK-(S+Z)*mPi+eps;
       else if(Z>=0) return S*mK0+Z*mPi+eps;
@@ -1647,5 +1654,5 @@
     }
     else if(S<0)                                  // General decision
-	   {
+    {
       if     (Z>-S) return -S*mK+(S+Z)*mPi+eps;
       else if(Z<=0) return -S*mK0-Z*mPi+eps;
@@ -1666,20 +1673,20 @@
     else if(!S&&N<0) return mP-mPi*N+eps;         // Positive Isonuclei
     else if(S==1)                                 // --> General decision
-	   {
+    {
       if     (N>1)   return mSm+(N-1)*mPi+eps;    // (Sigma-)+(n*PI-)
       else if(Z>1)   return mSp+(Z-1)*mPi+eps;    // (Sigma+)+(n*PI+)
     }
     else if(S==2)                                 // --> General decision
-	   {
+    {
       if     (N>0)   return mXm+N*mPi+eps;        // (Xi-)+(n*PI-)
       else if(Z>0)   return mXz+Z*mPi+eps;        // (Xi0)+(n*PI+)
     }
     else if(S==3)                                 // --> General decision
-	   {
+    {
       if     (N>-1)  return mOm+(N+1)*mPi+eps;    // (Omega-)+(n*PI-)
       else if(Z>-1)  return mOm+(Z+1)*mPi+eps;    // (Omega-)+(n*PI+)
     }
     else if(S>3)                                  // --> General Omega- decision
-	   {
+    {
       if   (-Z>S-2)  return mOm+(S-3)*mK +(2-Z-S)*mPi+eps;
       else if(Z>-1)  return mOm+(S-3)*mK0+(Z+1)+mPi+eps;
@@ -1705,20 +1712,20 @@
     else if(!S&&N<0) return dmP-mPi*N+eps;        // Positive Isonuclei
     else if(S==1)                                 // --> General decision
-	   {
+    {
       if     (N>2)   return dSP+(N-2)*mPi+eps;    // (nSigma-)+(n*PI-)
       else if(Z>2)   return dSN+(Z-1)*mPi+eps;    // (pSigma+)+(n*PI+)
     }
     else if(S==2)                                 // --> General decision
-	   {
+    {
       if     (N>1)   return dXN+(N-1)*mPi+eps;    // (nXi-)+(n*PI-)
       else if(Z>1)   return dXP+(Z-1)*mPi+eps;    // (pXi0)+(n*PI+)
     }
     else if(S==3)                                 // --> General decision
-	   {
+    {
       if     (N>0)   return dON+N*mPi+eps;        // (nOmega-)+(n*PI-)
       else if(Z>0)   return dOP+Z*mPi+eps;        // (pOmega-)+(n*PI+)
     }
     else if(S>3)                                  // --> General Omega- decision
-	   {
+    {
       if   (-Z>S-2)  return dON+(S-3)*mK +(2-Z-S)*mPi+eps;
       else if(Z>0)   return dOP+(S-3)*mK0+Z+mPi+eps;
@@ -1727,7 +1734,7 @@
     //else if(S>0)                                // @@ Implement General Decision
     //{
-	   //  //#ifdef debug
-	   //  G4cout<<"***G4QPDGCode::GetNuclMass:B=2, Z="<<Z<<",N="<<N<<",S="<<S<<G4endl;
-	   //  //#endif
+    //  //#ifdef debug
+    //  G4cout<<"***G4QPDGCode::GetNuclMass:B=2, Z="<<Z<<",N="<<N<<",S="<<S<<G4endl;
+    //  //#endif
     //  return bigM;                              // Exotic dibaryons (?)
     //}
@@ -1760,10 +1767,10 @@
   {
     if(Zm>=-S)                        // Enough charge for K+'s
-	   {
+    {
       km=-S*mK;                       // Anti-Lambdas are compensated by protons
-	     Zm+=S;
+      Zm+=S;
     }
     else if(Zm>0)
-	   {
+    {
       km=Zm*mK-(S+Zm)*mK0;            // Anti-Lambdas are partially compensated by neutrons
       Zm=0;
@@ -1779,7 +1786,7 @@
     G4int bH=-S-sH;                   // BigHalhS   || as in G4QE::DecayAntiStrange
     if(Z>0 && Z>N)
-	   {
+    {
       if(Z>=bH)                       // => "Enough protons in nucleus" case
-	     {
+      {
         if(N>=sH)
         {
@@ -1823,15 +1830,15 @@
           }
         }
-	     }
+      }
       else // Must not be here
-	     {
+      {
 #ifdef debug
         G4cout<<"***G4QPDGC::CalcNuclMass:Antimatter? Z="<<Z<<",N="<<N<<",S="<<S<<G4endl;
 #endif
         return 0.;                          // @@ Antiparticles aren't implemented @@
-	     }
-	   }
+      }
+    }
     else if(N>=bH)
-	   {
+    {
       if(Z>=sH)
       {
@@ -1875,12 +1882,12 @@
         }
       }
-	   }
+    }
     else // Must not be here
-	   {
+    {
       return 0.;                            // @@ Antiparticles aren't implemented @@
 #ifdef debug
         G4cout<<"***G4QPDGC::CalcNuclMass:Antimatter? N="<<N<<",Z="<<Z<<",S="<<S<<G4endl;
 #endif
-	   }
+    }
     S=0;
   }
@@ -1923,6 +1930,6 @@
     //else if(A==256 && Z==128) m=256000.;
     //else
-				//		m=k+G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z)->GetPDGMass();
-		 //m+=-sh[Z]-sh[N]+b1*D*D*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*D)))+Z*Z*(b5*pow(fA,b9)+b6/fA);
+    //  m=k+G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z)->GetPDGMass();
+   //m+=-sh[Z]-sh[N]+b1*D*D*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*D)))+Z*Z*(b5*pow(fA,b9)+b6/fA);
   }
   //@@//G4double maxM= k+Z*mP+N*mN+S*mL+eps;      // @@ eps -- Wings of the Mass parabola
@@ -1950,5 +1957,5 @@
     {   // @@ Can be generalized to anti-nuclei
 #ifdef debug
-      G4cerr<<"**G4QPDGCode::CalcNucM:A="<<Am<<"<1 || Z="<<Zm<<"<0 || N="<<Nm<<"<0"<<G4endl;
+      G4cerr<<"*G4QPDGCode::CalcNucM:A="<<Am<<"<1 || Z="<<Zm<<"<0 || N="<<Nm<<"<0"<<G4endl;
 #endif
     }
@@ -1965,6 +1972,6 @@
       //  mm=km+G4NucleiProperties::GetNuclearMass(Am,Zm);
       //else
-						//  mm=km+G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm)->GetPDGMass();
-						//  //mm+=-sh[Zm]-sh[Nm]+b1*Dm*Dm*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*Dm)))
+      //  mm=km+G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm)->GetPDGMass();
+      //  //mm+=-sh[Zm]-sh[Nm]+b1*Dm*Dm*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*Dm)))
       //  //    +Zm*Zm*(b5*pow(fA,b9)+b6/Am);
     }
@@ -2020,5 +2027,5 @@
     if     (ab==22) G4cout<<"-W-G4QPDGC::GetQuarkCont: For the Photon? - Return 0"<<G4endl;
     else if(ab==10) G4cout<<"-W-G4QPDGC::GetQuarkCont: For Chipolino? - Return 0"<<G4endl;
-	   else G4cout<<"-W-G4QPDGCode::GetQuarkCont: For PDG="<<thePDGCode<<" Return 0"<<G4endl;
+    else G4cout<<"-W-G4QPDGCode::GetQuarkCont: For PDG="<<thePDGCode<<" Return 0"<<G4endl;
 #endif
     return G4QContent(0,0,0,0,0,0); // Photon, bosons, leptons
@@ -2031,71 +2038,71 @@
     G4int t=0;         // (3)prototype of highest quark (B)
 #ifdef sdebug
-	   G4cout<<"G4QPDGCode::GetQuarkContent: a="<<ab<<", c="<<c<<", f="<<f<<", v="<<v<<G4endl;
+    G4cout<<"G4QPDGCode::GetQuarkContent: a="<<ab<<", c="<<c<<", f="<<f<<", v="<<v<<G4endl;
 #endif
     if(v>10)           // Baryons
-	   {
+    {
       t=v/10;          // (3) highest quark
       v%=10;           // (2) high quark
       if     (f==1)
-	     {
+      {
         if(a) ad++;
         else   d++;
-	     }
+      }
       else if(f==2)
-	     {
+      {
         if(a) au++;
         else   u++;
-	     }
+      }
       else if(f==3)
-	     {
+      {
         if(a) as++;
         else   s++;
-	     }
-      else G4cerr<<"***G4QPDGCode::GetQContent:1 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
+      }
+      else G4cerr<<"*G4QPDGC::GetQCont:1 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
       if     (v==1)
-	     {
+      {
         if(a) ad++;
         else   d++;
-	     }
+      }
       else if(v==2)
-	     {
+      {
         if(a) au++;
         else   u++;
-	     }
+      }
       else if(v==3)
-	     {
+      {
         if(a) as++;
         else   s++;
-	     }
-      else G4cerr<<"***G4QPDGCode::GetQContent:2 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
+      }
+      else G4cerr<<"*G4QPDGC::GetQCont:2 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
       if     (t==1)
-	     {
+      {
         if(a) ad++;
         else   d++;
-	     }
+      }
       else if(t==2)
-	     {
+      {
         if(a) au++;
         else   u++;
-	     }
+      }
       else if(t==3)
-	     {
+      {
         if(a) as++;
         else   s++;
-	     }
-      else G4cerr<<"***G4QPDGCode::GetQCont:3 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
+      }
+      else G4cerr<<"*G4QPDGC::GetQCont:3 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
       return G4QContent(d,u,s,ad,au,as);
-	   }
+    }
     else        // Mesons
-	   {
+    {
       if(f==v)
-	     {
+      {
         if     (f==1) return G4QContent(1,0,0,1,0,0);
         else if(f==2) return G4QContent(0,1,0,0,1,0);
         else if(f==3) return G4QContent(0,0,1,0,0,1);
-        else G4cerr<<"***G4QPDGCode::GetQCont:4 PDG="<<thePDGCode<<",i="<<f<<","<<v<<","<<t<<G4endl;
-	     }
+        else G4cerr<<"*G4QPDGC::GetQC:4 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
+      }
       else
-	     {
+      {
         if     (f==1 && v==2)
         {
@@ -2113,7 +2120,7 @@
           else return G4QContent(0,1,0,0,0,1);
         }
-        else G4cerr<<"***G4QPDGCode::GetQCont:5 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
-	     }
-	   }
+        else G4cerr<<"*G4QPDGC::GetQC:5 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;
+      }
+    }
   }
   else                    
@@ -2214,5 +2221,5 @@
   if(theQCode<fragmStart) return 7;
   G4int sub=theQCode-fragmStart;
-  if ( (sub > 1 && sub < 8) || sub == 15) return 7; //@@Why they are in clusters?-Residuals(?)
+  if ( (sub > 1 && sub < 8) || sub == 15) return 7;//Why they are in clusters?-Residuals(?)
   G4int rel=sub;                         // case of nuclear baryons and isonuclei
   if     (sub>31)rel =(sub-32)%15;       // case of heavy fragments (BaryNum>3)
@@ -2278,10 +2285,10 @@
   {
     G4int shiftQ=GetRelCrossIndex(i, o);
-    G4int sQCode=theQCode;                        // QCode of the parent cluster
-    if     (shiftQ==7) return 0;                  // A parent cluster doesn't exist
-    else if(!shiftQ) sQCode+=shiftQ;              // Shift QCode of son to QCode of his parent
-    G4QPDGCode parent;                            // Create a temporary (fake) parent cluster
-    parent.InitByQCode(sQCode);                   // Initialize it by Q-Code
-    G4QContent parentQC=parent.GetQuarkContent(); // Quark Content of the parent cluster
+    G4int sQCode=theQCode;                     // QCode of the parent cluster
+    if     (shiftQ==7) return 0;               // A parent cluster doesn't exist
+    else if(!shiftQ) sQCode+=shiftQ;           // Shift QCode of son to QCode of his parent
+    G4QPDGCode parent;                         // Create a temporary (fake) parent cluster
+    parent.InitByQCode(sQCode);                // Initialize it by Q-Code
+    G4QContent parentQC=parent.GetQuarkContent();// Quark Content of the parent cluster
     if     (!o)   return parentQC.GetD();
     else if(o==1) return parentQC.GetU();
@@ -2324,5 +2331,5 @@
     {
       if(cz>500000) cz-=1000000;                   // AntiProtons
-				  z=cz/1000;                                   // Number of protons
+      z=cz/1000;                                   // Number of protons
       r-=cz;                                       // Subtract them from the residual
       if(r==90000000) return;
@@ -2332,5 +2339,5 @@
     {
       if(cs>5000000) cs-=10000000;                 // AntiLambda
-				  s=cs/1000000;                                // Number of Lambdas
+      s=cs/1000000;                                // Number of Lambdas
     }
   }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPDGToG4Particle.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPDGToG4Particle.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPDGToG4Particle.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QPDGToG4Particle.cc,v 1.5 2006/06/29 20:07:09 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPDGToG4Particle.cc,v 1.6 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ---------------- G4QG4ToG4Particle singletone class ------------------
@@ -35,4 +35,8 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: This is a helper class, which converts the PDG-defined
+// G4QHadrons of the CHIPS model to the G4 particles, defined by the singetones.
+// -----------------------------------------------------------------------------
+
 
 //#define pdebug
@@ -61,5 +65,5 @@
   if(!PDG) return 0;
   else if(PDG>0)     // Positive PDG Code
-		{
+  {
     if(PDG<100)
     {
@@ -73,5 +77,5 @@
         }
         else
-								{
+        {
           if(PDG<15)
           {
@@ -89,5 +93,5 @@
     } // End of the Lepton definition
     else if(PDG<1000)
-				{
+    {
       if(PDG<420)
       {
@@ -111,5 +115,5 @@
       }
       else
-						{
+      {
         if(PDG<500)
         {
@@ -129,5 +133,5 @@
     } // Emd of the Meson definition
     else
-				{
+    {
       if(PDG<3333)
       {
@@ -137,5 +141,5 @@
           {
             if(PDG==2112) return G4Neutron::Neutron();
-						      else if(PDG==2212) return G4Proton::Proton();
+            else if(PDG==2212) return G4Proton::Proton();
             else return 0; // @@ Warning can be added
           }
@@ -199,6 +203,6 @@
   } 
   else               // Negative PDG Code
-		{
-		  G4int aPDG=-PDG;
+  {
+    G4int aPDG=-PDG;
 #ifdef pdebug
     G4cout<<"G4QPDGToG4Particle:Antiparticle PDG="<<PDG<<G4endl;
@@ -214,5 +218,5 @@
         }
         else
-								{
+        {
           if(aPDG<15)
           {
@@ -230,5 +234,5 @@
     } // End of the Anti-Lepton definition
     else if(aPDG<1000)
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QPDGToG4Particle:AntiMesons aPDG="<<aPDG<<G4endl;
@@ -282,5 +286,5 @@
     } // Emd of the Anti-Meson definition
     else
-				{
+    {
       if(aPDG<3333)
       {
@@ -290,5 +294,5 @@
           {
             if(aPDG==2112) return G4AntiNeutron::AntiNeutron();
-						      else if(aPDG==2212) return G4AntiProton::AntiProton();
+            else if(aPDG==2212) return G4AntiProton::AntiProton();
             else return 0; // @@ Warning can be added
           }
@@ -357,5 +361,5 @@
 // ==========================================
 {
-		//======== LEPTONS =========
+  //======== LEPTONS =========
   G4Gamma::GammaDefinition();
   G4MuonPlus::MuonPlusDefinition();
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParentCluster.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParentCluster.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParentCluster.cc	(revision 1055)
@@ -25,12 +25,17 @@
 //
 //
-// $Id: G4QParentCluster.cc,v 1.25 2006/11/27 10:44:55 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QParentCluster.cc,v 1.26 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QParentCluster ----------------
 //             by Mikhail Kossov, Sept 1999.
 //      class fora Parent nuclear cluster in the CHIPS Model
-// ----------------------------------------------------------
-
+// -------------------------------------------------------------------
+// Short description: The parent cluster is the cluster, which can be
+// used for the nuclear fragment production. Different clusters csn be
+// used as the parent cluser for the particular G4QCandidate (nuclear
+// fragment), e.g. t and He3 for the t-fragment production. So the
+// G4QParentClusterVector is needed.
+// -------------------------------------------------------------------
 //#define debug
 //#define pdebug
@@ -38,5 +43,5 @@
 #include "G4QParentClusterVector.hh"
 
-G4QParentCluster::G4QParentCluster(G4int PDGCode): thePDGCode(PDGCode), theProbability(0.){}
+G4QParentCluster::G4QParentCluster(G4int PDGCode): thePDGCode(PDGCode),theProbability(0.){}
 
 G4QParentCluster::G4QParentCluster(G4int PDGCode, G4double prob): 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParticle.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParticle.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParticle.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QParticle.cc,v 1.33 2006/11/27 10:44:55 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QParticle.cc,v 1.34 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QParticle ----------------
@@ -34,5 +34,9 @@
 //       1         2         3         4         5         6         7         8         9
 //34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
- 
+// -----------------------------------------------------------------------
+// Short description: The G4QParticle is a part of the CHIPS World. It is
+// characterized by the quark content, spin, mass, width and a vector of
+// the decay channels (G4QDecayCannelVector).
+// -----------------------------------------------------------------------
 //#define debug
 //#define pdebug
@@ -143,5 +147,5 @@
       else   lhs << ",";
       lhs << PCV[j]->GetPDGCode() ;
-	   }
+    }
   }
   return lhs;
@@ -170,5 +174,5 @@
     //if(limit<=  6 && nQ>=  6)DecayDB[  6] = 0;    // gamma  (22)
     if(limit<=  7 && nQ>=  7)                       // Z0     (23)
-	   {
+    {
       DecayDB[  7].push_back(new G4QDecayChan(.036,  11, -11));
       DecayDB[  7].push_back(new G4QDecayChan(.073,  13, -13));
@@ -184,7 +188,7 @@
       DecayDB[  7].push_back(new G4QDecayChan(.990,2112,-2212, 211));
       DecayDB[  7].push_back(new G4QDecayChan(1.00,2112,-3122, 111));
-	   }
+    }
     if(limit<=  8 && nQ>=  8)                       // W-     (24) @@ Update HadronicDecays
-	   {
+    {
       DecayDB[  8].push_back(new G4QDecayChan(.107,  11, -12));
       DecayDB[  8].push_back(new G4QDecayChan(.214,  13, -14));
@@ -197,19 +201,19 @@
       DecayDB[  8].push_back(new G4QDecayChan(.921,3122,-2212, 111));
       DecayDB[  8].push_back(new G4QDecayChan(1.00,2112,-3122,-211));
-	   }
+    }
     //if(limit<=  9 && nQ>=  9)DecayDB[  9] = 0;    // H0     (25)
     //if(limit<= 10 && nQ>= 10)DecayDB[ 10] = 0;    // H-     (37)
     if(limit<= 11 && nQ>= 11)    // Low sigma=pi,pi S-wave : f_0 (800)
-	   {
+    {
       DecayDB[ 11].push_back(new G4QDecayChan(.333,211,-211));
       DecayDB[ 11].push_back(new G4QDecayChan(1.00,111, 111));
-	   }
+    }
     if(limit<= 12 && nQ>= 12)    // Midle Regeon-Pomeron   : f_0 (980)
-	   {
+    {
       DecayDB[ 12].push_back(new G4QDecayChan(.333,211,-211));
       DecayDB[ 12].push_back(new G4QDecayChan(1.00,111, 111));
-	   }
+    }
     if(limit<= 13 && nQ>= 13)    // High Regeon-Pomeron    : f_0 (1500)
-	   {
+    {
       DecayDB[ 13].push_back(new G4QDecayChan(.019,221, 331));
       DecayDB[ 13].push_back(new G4QDecayChan(.070,221, 221));
@@ -218,9 +222,9 @@
       DecayDB[ 13].push_back(new G4QDecayChan(.578,211,-211)); //@@ include 4pi decays
       DecayDB[ 13].push_back(new G4QDecayChan(1.00,111, 111));
-	   }
+    }
     //if(limit<= 14 && nQ>= 14)DecayDB[ 14].push_back(new G4QDecayChan(1.00,22,22));//Pi0
     //if(limit<= 15 && nQ>= 15)DecayDB[ 15] = 0;    // Pi +
     if(limit<= 16 && nQ>= 16)    // eta
-	   {
+    {
       DecayDB[ 16].push_back(new G4QDecayChan(.226,211,-211,111));
       DecayDB[ 16].push_back(new G4QDecayChan(.551,111, 111,111));
@@ -228,13 +232,13 @@
       DecayDB[ 16].push_back(new G4QDecayChan(.606, 11, -11, 22)); //@@ .002 (pi+)(pi-)2gam
       DecayDB[ 16].push_back(new G4QDecayChan(1.00, 22,  22));
-	   }
+    }
     //if(limit<= 17 && nQ>= 17)    // K 0 (K_short - probab 1/2) @@@@@@@@@@@@
-	   //{
+    //{
     //  DecayDB[ 17].push_back(new G4QDecayChan(.6861,211,-211));
     //  DecayDB[ 17].push_back(new G4QDecayChan(1.00, 111, 111));
-	   //}
+    //}
     //if(limit<= 18 && nQ>= 18)DecayDB[  8] = 0;    // K +
     if(limit<= 19 && nQ>= 19)    // eta'
-	   {
+    {
       DecayDB[ 19].push_back(new G4QDecayChan(.443,211,-211,221));
       DecayDB[ 19].push_back(new G4QDecayChan(.652,111, 111,221));
@@ -243,19 +247,19 @@
       DecayDB[ 19].push_back(new G4QDecayChan(.979, 22, 113));
       DecayDB[ 19].push_back(new G4QDecayChan(1.00, 22,  22));
-	   }
+    }
     //if(limit<= 20 && nQ>= 20)DecayDB[ 20] = 0;    // n
     //if(limit<= 21 && nQ>= 21)DecayDB[ 21] = 0;    // p
     //if(limit<= 22 && nQ>= 22)    // Lambda ===>>> all week decays are closed at this time
-	   //{
+    //{
     //  DecayDB[ 22].push_back(new G4QDecayChan(.640,2212,-211));
     //  DecayDB[ 22].push_back(new G4QDecayChan(1.00,2112, 111));
-	   //}
+    //}
     //if(limit<= 23 &&nQ>=23)DecayDB[23].push_back(new G4QDecayChan(1.,2112,-211));//Sigma-
     if(limit<= 24 &&nQ>=24)DecayDB[24].push_back(new G4QDecayChan(1.,3122,22));//Sigma0(EM)
     //if(limit<= 25 && nQ>= 25)    // Sigma +
-	   //{
+    //{
     //  DecayDB[ 25].push_back(new G4QDecayChan(.484,2112, 211));
     //  DecayDB[ 25].push_back(new G4QDecayChan(1.00,2212, 111));
-	   //}
+    //}
     //if(limit<= 26 && nQ>=26)DecayDB[26].push_back(new G4QDecayChan(1.,3122,-211));// Ksi-
     //if(limit<= 27 && nQ>=27)DecayDB[27].push_back(new G4QDecayChan(1.,3122, 111));// Ksi0
@@ -263,5 +267,5 @@
     if(limit<= 29 && nQ>= 29)DecayDB[ 29].push_back(new G4QDecayChan(1., 211, 111));// rho+
     if(limit<= 30 && nQ>= 30)    // omega
-	   {
+    {
       DecayDB[ 30].push_back(new G4QDecayChan(.891, 211,-211,111));
       DecayDB[ 30].push_back(new G4QDecayChan(.908, 211,-211));
@@ -270,17 +274,17 @@
       DecayDB[ 30].push_back(new G4QDecayChan(.998,  13, -13, 111));
       DecayDB[ 30].push_back(new G4QDecayChan(1.00,  22, 221));
-	   }
+    }
     if(limit<= 31 && nQ>= 31)    // K* 0
-	   {
+    {
       DecayDB[ 31].push_back(new G4QDecayChan(.667,-211, 321));
       DecayDB[ 31].push_back(new G4QDecayChan(1.00, 111, 311));
-	   }
+    }
     if(limit<= 32 && nQ>= 32)    // K* +
-	   {
+    {
       DecayDB[ 32].push_back(new G4QDecayChan(.667, 211, 311));
       DecayDB[ 32].push_back(new G4QDecayChan(1.00, 111, 321));
-	   }
+    }
     if(limit<= 33 && nQ>= 33)    // phi
-	   {
+    {
       DecayDB[ 33].push_back(new G4QDecayChan(.491, 311,-311));
       DecayDB[ 33].push_back(new G4QDecayChan(.831, 321,-321));
@@ -290,19 +294,19 @@
       DecayDB[ 33].push_back(new G4QDecayChan(.948,-211, 213));
       DecayDB[ 33].push_back(new G4QDecayChan(1.00, 111, 113));
-	   }
+    }
     if(limit<= 34 && nQ>= 34)DecayDB[34].push_back(new G4QDecayChan(1.,2112,-211));//Delta-
     if(limit<= 35 && nQ>= 35)    // Delta 0
-	   {
+    {
       DecayDB[ 35].push_back(new G4QDecayChan(.333,2212,-211));
       DecayDB[ 35].push_back(new G4QDecayChan(1.00,2112, 111));
-	   }
+    }
     if(limit<= 36 && nQ>= 36)    // Delta +
-	   {
+    {
       DecayDB[ 36].push_back(new G4QDecayChan(.333,2112, 211));
       DecayDB[ 36].push_back(new G4QDecayChan(1.00,2212, 111));
-	   }
+    }
     if(limit<= 37 && nQ>= 37)DecayDB[37].push_back(new G4QDecayChan(1.,2212,211));//Delta++
     if(limit<= 38 && nQ>= 38)    // Lambda* (1520)
-	   {
+    {
       DecayDB[ 38].push_back(new G4QDecayChan(.225,3112,-311));
       DecayDB[ 38].push_back(new G4QDecayChan(.450,3222,-321));
@@ -317,42 +321,42 @@
       DecayDB[ 38].push_back(new G4QDecayChan(.982,3112, 211));
       DecayDB[ 38].push_back(new G4QDecayChan(1.00,3122,  22));
-	   }
+    }
     if(limit<= 39 && nQ>= 39)    // Sigma* -
-	   {
+    {
       DecayDB[ 39].push_back(new G4QDecayChan(.060,3112, 111));
       DecayDB[ 39].push_back(new G4QDecayChan(.120,3212,-211));
       DecayDB[ 39].push_back(new G4QDecayChan(1.00,3122,-211));
-	   }
+    }
     if(limit<= 40 && nQ>= 40)    // Sigma* 0
-	   {
+    {
       DecayDB[ 40].push_back(new G4QDecayChan(.040,3112, 211));
       DecayDB[ 40].push_back(new G4QDecayChan(.080,3222,-211));
       DecayDB[ 40].push_back(new G4QDecayChan(.120,3212, 111));
       DecayDB[ 40].push_back(new G4QDecayChan(1.00,3122, 111));
-	   }
+    }
     if(limit<= 41 && nQ>= 41)    // Sigma* +
-	   {
+    {
       DecayDB[ 41].push_back(new G4QDecayChan(.060,3212, 211));
       DecayDB[ 41].push_back(new G4QDecayChan(.120,3222, 111));
       DecayDB[ 41].push_back(new G4QDecayChan(1.00,3122, 211));
-	   }
+    }
     if(limit<= 42 && nQ>= 42)    // Ksi* -
-	   {
+    {
       DecayDB[ 42].push_back(new G4QDecayChan(.667,3322,-211));
       DecayDB[ 42].push_back(new G4QDecayChan(1.00,3312, 111));
-	   }
+    }
     if(limit<= 43 && nQ>= 43)    // Ksi* 0
-	   {
+    {
       DecayDB[ 43].push_back(new G4QDecayChan(.667,3312, 211));
       DecayDB[ 43].push_back(new G4QDecayChan(1.00,3322, 111));
-	   }
+    }
     //if(limit<= 44 && nQ>= 44)    // OMEGA - (Weak)
-	   //{
+    //{
     //  DecayDB[ 44].push_back(new G4QDecayChan(.678,3122, 321));
     //  DecayDB[ 44].push_back(new G4QDecayChan(.914,3322,-211));
     //  DecayDB[ 44].push_back(new G4QDecayChan(1.00,3312, 111));
-	   //}
+    //}
     if(limit<= 45 && nQ>= 45)    // a_2 0
-	   {
+    {
       DecayDB[ 45].push_back(new G4QDecayChan(.070, 211,-211,223));
       DecayDB[ 45].push_back(new G4QDecayChan(.106, 111, 111,223));
@@ -363,7 +367,7 @@
       DecayDB[ 45].push_back(new G4QDecayChan(.767, 211,-213));
       DecayDB[ 45].push_back(new G4QDecayChan(1.00, 111, 113));
-	   }
+    }
     if(limit<= 46 && nQ>= 46)    // a_2 +
-	   {
+    {
       DecayDB[ 46].push_back(new G4QDecayChan(.106,111,211,223));
       DecayDB[ 46].push_back(new G4QDecayChan(.156, 321,-311));
@@ -371,7 +375,7 @@
       DecayDB[ 46].push_back(new G4QDecayChan(.651, 211, 113));
       DecayDB[ 46].push_back(new G4QDecayChan(1.00, 111, 213));
-	   }
+    }
     if(limit<= 47 && nQ>= 47)    // f_2 0
-	   {
+    {
       DecayDB[ 47].push_back(new G4QDecayChan(.005, 221, 221));
       DecayDB[ 47].push_back(new G4QDecayChan(.028, 311,-311));
@@ -382,7 +386,7 @@
       DecayDB[ 47].push_back(new G4QDecayChan(.717, 211,-211));
       DecayDB[ 47].push_back(new G4QDecayChan(1.00, 111, 111));
-	   }
+    }
     if(limit<= 48 && nQ>= 48)    // K_2 0
-	   {
+    {
       DecayDB[ 48].push_back(new G4QDecayChan(.028, 311, 223));
       DecayDB[ 48].push_back(new G4QDecayChan(.074, 211,-211,313));
@@ -395,7 +399,7 @@
       DecayDB[ 48].push_back(new G4QDecayChan(.750,-211, 321));
       DecayDB[ 48].push_back(new G4QDecayChan(1.00, 111, 311));
-	   }
+    }
     if(limit<= 49 && nQ>= 49)    // K_2 +
-	   {
+    {
       DecayDB[ 49].push_back(new G4QDecayChan(.028, 321, 223));
       DecayDB[ 49].push_back(new G4QDecayChan(.074,211,-211,323));
@@ -408,7 +412,7 @@
       DecayDB[ 49].push_back(new G4QDecayChan(.750, 211, 311));
       DecayDB[ 49].push_back(new G4QDecayChan(1.00, 111, 321));
-	   }
+    }
     if(limit<= 50 && nQ>= 50)    // f_2' 0
-	   {
+    {
       DecayDB[ 50].push_back(new G4QDecayChan(.103, 221, 221));
       DecayDB[ 50].push_back(new G4QDecayChan(.547, 311,-311));
@@ -416,7 +420,7 @@
       DecayDB[ 50].push_back(new G4QDecayChan(.997, 211,-211));
       DecayDB[ 50].push_back(new G4QDecayChan(1.00, 111, 111));
-	   }
+    }
     if(limit<= 51 && nQ>= 51)    // N_5/2 0
-	   {
+    {
       DecayDB[ 51].push_back(new G4QDecayChan(.040, 211, 1114));
       DecayDB[ 51].push_back(new G4QDecayChan(.080, 111, 2114));
@@ -427,7 +431,7 @@
       DecayDB[ 51].push_back(new G4QDecayChan(.780, 2212,-211));
       DecayDB[ 51].push_back(new G4QDecayChan(1.00, 2112, 111));
-	   }
+    }
     if(limit<= 52 && nQ>= 52)    // N_5/2 +
-	   {
+    {
       DecayDB[ 52].push_back(new G4QDecayChan(.040,-211, 2224));
       DecayDB[ 52].push_back(new G4QDecayChan(.080, 211, 2114));
@@ -438,7 +442,7 @@
       DecayDB[ 52].push_back(new G4QDecayChan(.780, 2112, 211));
       DecayDB[ 52].push_back(new G4QDecayChan(1.00, 2212, 111));
-	   }
+    }
     if(limit<= 53 && nQ>= 53)    // LAMBDA_5/2
-	   {
+    {
       DecayDB[ 53].push_back(new G4QDecayChan(.350, 2112,-311));
       DecayDB[ 53].push_back(new G4QDecayChan(.700, 2212,-321));
@@ -449,7 +453,7 @@
       DecayDB[ 53].push_back(new G4QDecayChan(.940, 3222,-211));
       DecayDB[ 53].push_back(new G4QDecayChan(1.00, 3212, 111));
-	   }
+    }
     if(limit<= 54 && nQ>= 54)    // SIGMA_5/2 -
-	   {
+    {
       DecayDB[ 54].push_back(new G4QDecayChan(.600, 2112,-321));
       DecayDB[ 54].push_back(new G4QDecayChan(.660,-211, 3214));
@@ -458,7 +462,7 @@
       DecayDB[ 54].push_back(new G4QDecayChan(.900, 3112, 111));
       DecayDB[ 54].push_back(new G4QDecayChan(1.00, 3122,-211));
-	   }
+    }
     if(limit<= 55 && nQ>= 55)    // SIGMA_5/2 0
-	   {
+    {
       DecayDB[ 55].push_back(new G4QDecayChan(.300, 2112,-311));
       DecayDB[ 55].push_back(new G4QDecayChan(.600, 2212,-321));
@@ -470,7 +474,7 @@
       DecayDB[ 55].push_back(new G4QDecayChan(.900, 3212, 111));
       DecayDB[ 55].push_back(new G4QDecayChan(1.00, 3122, 111));
-	   }
+    }
     if(limit<= 56 && nQ>= 56)    // SIGMA_5/2 +
-	   {
+    {
       DecayDB[ 56].push_back(new G4QDecayChan(.600, 2212,-311));
       DecayDB[ 56].push_back(new G4QDecayChan(.660, 211, 3214));
@@ -479,19 +483,19 @@
       DecayDB[ 56].push_back(new G4QDecayChan(.900, 3222, 111));
       DecayDB[ 56].push_back(new G4QDecayChan(1.00, 3122, 211));
-	   }
+    }
     if(limit<= 57 && nQ>= 57)    // KSI_5/2 -
-	   {
+    {
       DecayDB[ 57].push_back(new G4QDecayChan(.400, 3112,-311));
       DecayDB[ 57].push_back(new G4QDecayChan(.800, 3212,-321));
       DecayDB[ 57].push_back(new G4QDecayChan(1.00, 3122,-321));
-	   }
+    }
     if(limit<= 58 && nQ>= 58)    // KSI_5/2 0
-	   {
+    {
       DecayDB[ 58].push_back(new G4QDecayChan(.400, 3212,-311));
       DecayDB[ 58].push_back(new G4QDecayChan(.800, 3222,-321));
       DecayDB[ 58].push_back(new G4QDecayChan(1.00, 3122,-311));
-	   }
+    }
     if(limit<= 59 && nQ>= 59)    // rho_3 0
-	   {
+    {
       DecayDB[ 59].push_back(new G4QDecayChan(.019,311,-313));
       DecayDB[ 59].push_back(new G4QDecayChan(.038,321,-323));
@@ -503,7 +507,7 @@
       DecayDB[ 59].push_back(new G4QDecayChan(.764,111, 111,113));
       DecayDB[ 59].push_back(new G4QDecayChan(1.00,211,-211));
-	   }
+    }
     if(limit<= 60 && nQ>= 60)    // rho_3 +
-	   {
+    {
       DecayDB[ 60].push_back(new G4QDecayChan(.019, 321,-313));
       DecayDB[ 60].push_back(new G4QDecayChan(.038,-311, 323));
@@ -514,7 +518,7 @@
       DecayDB[ 60].push_back(new G4QDecayChan(.764,211,111,113));
       DecayDB[ 60].push_back(new G4QDecayChan(1.00, 211, 111));
-	   }
+    }
     if(limit<= 61 && nQ>= 61)    // omega_3
-	   {
+    {
       DecayDB[ 61].push_back(new G4QDecayChan(.020,211,-211,223));
       DecayDB[ 61].push_back(new G4QDecayChan(.040,111, 111,223));
@@ -522,7 +526,7 @@
       DecayDB[ 61].push_back(new G4QDecayChan(.080,-211, 213));
       DecayDB[ 61].push_back(new G4QDecayChan(1.00, 111, 113));
-	   }
+    }
     if(limit<= 62 && nQ>= 62)    // K_3 0
-	   {
+    {
       DecayDB[ 62].push_back(new G4QDecayChan(.030, 111, 315));
       DecayDB[ 62].push_back(new G4QDecayChan(.060,-211, 325));
@@ -534,7 +538,7 @@
       DecayDB[ 62].push_back(new G4QDecayChan(.940,-211, 321));
       DecayDB[ 62].push_back(new G4QDecayChan(1.00, 111, 311));
-	   }
+    }
     if(limit<= 63 && nQ>= 63)    // K_3 +
-	   {
+    {
       DecayDB[ 63].push_back(new G4QDecayChan(.030, 211, 315));
       DecayDB[ 63].push_back(new G4QDecayChan(.060, 111, 325));
@@ -546,7 +550,7 @@
       DecayDB[ 63].push_back(new G4QDecayChan(.940, 211, 311));
       DecayDB[ 63].push_back(new G4QDecayChan(1.00, 111, 321));
-	   }
+    }
     if(limit<= 64 && nQ>= 64)    // phi_3
-	   {
+    {
       DecayDB[ 64].push_back(new G4QDecayChan(.250, 321,-321));
       DecayDB[ 64].push_back(new G4QDecayChan(.500, 311,-311));
@@ -555,14 +559,14 @@
       DecayDB[ 64].push_back(new G4QDecayChan(.875, 311,-313));
       DecayDB[ 64].push_back(new G4QDecayChan(1.00,-311, 313));
-	   }
+    }
     if(limit<= 65 && nQ>= 65)    // DELTA_7/2 -
-	   {
+    {
       DecayDB[ 65].push_back(new G4QDecayChan(.200, 2112,-213 ));
       DecayDB[ 65].push_back(new G4QDecayChan(.320,-211 , 2114));
       DecayDB[ 65].push_back(new G4QDecayChan(.500, 111 , 1114));
       DecayDB[ 65].push_back(new G4QDecayChan(1.00, 2112,-211 ));
-	   }
+    }
     if(limit<= 66 && nQ>= 66)    // DELTA_7/2 0
-	   {
+    {
       DecayDB[ 66].push_back(new G4QDecayChan(.133, 2112, 113 ));
       DecayDB[ 66].push_back(new G4QDecayChan(.200, 2212,-213 ));
@@ -572,7 +576,7 @@
       DecayDB[ 66].push_back(new G4QDecayChan(.666, 2212,-211 ));
       DecayDB[ 66].push_back(new G4QDecayChan(1.00, 2112, 111 ));
-	   }
+    }
     if(limit<= 67 && nQ>= 67)    // DELTA_7/2 +
-	   {
+    {
       DecayDB[ 67].push_back(new G4QDecayChan(.133, 2112, 213 ));
       DecayDB[ 67].push_back(new G4QDecayChan(.200, 2212, 113 ));
@@ -582,14 +586,14 @@
       DecayDB[ 67].push_back(new G4QDecayChan(.666, 2112, 211 ));
       DecayDB[ 67].push_back(new G4QDecayChan(1.00, 2212, 111 ));
-	   }
+    }
     if(limit<= 68 && nQ>= 68)    // DELTA_7/2 ++
-	   {
+    {
       DecayDB[ 68].push_back(new G4QDecayChan(.200, 2212, 213 ));
       DecayDB[ 68].push_back(new G4QDecayChan(.320, 211 , 2214));
       DecayDB[ 68].push_back(new G4QDecayChan(.500, 111 , 2224));
       DecayDB[ 68].push_back(new G4QDecayChan(1.00, 2212, 211 ));
-	   }
+    }
     if(limit<= 69 && nQ>= 69)     // LAMBDA_7/2
-	   {
+    {
       DecayDB[ 69].push_back(new G4QDecayChan(.160, 3122, 223 ));
       DecayDB[ 69].push_back(new G4QDecayChan(.260, 2112,-313 ));
@@ -603,7 +607,7 @@
       DecayDB[ 69].push_back(new G4QDecayChan(.800, 3222,-211 ));
       DecayDB[ 69].push_back(new G4QDecayChan(1.00, 3212, 111 ));
-	   }
+    }
     if(limit<= 70 && nQ>= 70)    // SIGMA_7/2 -
-	   {
+    {
       DecayDB[ 70].push_back(new G4QDecayChan(.030, 2112,-323 ));
       DecayDB[ 70].push_back(new G4QDecayChan(.165,-311 , 1114));
@@ -617,7 +621,7 @@
       DecayDB[ 70].push_back(new G4QDecayChan(.780,-321 , 2112));
       DecayDB[ 70].push_back(new G4QDecayChan(1.00,-211 , 3122));
-	   }
+    }
     if(limit<= 71 && nQ>= 71)    // SIGMA_7/2 0
-	   {
+    {
       DecayDB[ 71].push_back(new G4QDecayChan(.015, 2112,-313 ));
       DecayDB[ 71].push_back(new G4QDecayChan(.030, 2212,-321 ));
@@ -634,7 +638,7 @@
       DecayDB[ 71].push_back(new G4QDecayChan(.780,-321 , 2212));
       DecayDB[ 71].push_back(new G4QDecayChan(1.00, 111 , 3122));
-	   }
+    }
     if(limit<= 72 && nQ>= 72)    // SIGMA_7/2 +
-	   {
+    {
       DecayDB[ 72].push_back(new G4QDecayChan(.030, 2212,-313 ));
       DecayDB[ 72].push_back(new G4QDecayChan(.165,-321 , 2224));
@@ -648,40 +652,40 @@
       DecayDB[ 72].push_back(new G4QDecayChan(.780,-311 , 2212));
       DecayDB[ 72].push_back(new G4QDecayChan(1.00, 211 , 3122));
-	   }
+    }
     if(limit<= 73 && nQ>= 73)    // KSI_7/2 -
-	   {
+    {
       DecayDB[ 73].push_back(new G4QDecayChan(.400, 3112,-311));
       DecayDB[ 73].push_back(new G4QDecayChan(.800, 3212,-321));
       DecayDB[ 73].push_back(new G4QDecayChan(1.00, 3122,-321));
-	   }
+    }
     if(limit<= 74 && nQ>= 74)    // KSI_7/2 0
-	   {
+    {
       DecayDB[ 74].push_back(new G4QDecayChan(.400, 3212,-311));
       DecayDB[ 74].push_back(new G4QDecayChan(.800, 3222,-321));
       DecayDB[ 74].push_back(new G4QDecayChan(1.00, 3122,-311));
-	   }
+    }
     if(limit<= 75 && nQ>= 75)    // OMEGA_7/2 -
-	   {
+    {
       DecayDB[ 75].push_back(new G4QDecayChan(.250,-311 , 3314));
       DecayDB[ 75].push_back(new G4QDecayChan(.500,-321 , 3324));
       DecayDB[ 75].push_back(new G4QDecayChan(.750, 3312,-313 ));
       DecayDB[ 75].push_back(new G4QDecayChan(1.00, 3322,-323 ));
-	   }
+    }
     if(limit<= 76 && nQ>= 76)    // a_4 0
-	   {
+    {
       DecayDB[ 76].push_back(new G4QDecayChan(.200, 311,-311));
       DecayDB[ 76].push_back(new G4QDecayChan(.400, 321,-321));
       DecayDB[ 76].push_back(new G4QDecayChan(.600, 111, 221));
       DecayDB[ 76].push_back(new G4QDecayChan(1.00, 111, 211,-211));
-	   }
+    }
     if(limit<= 77 && nQ>= 77)    // a_4 +
-	   {
+    {
       DecayDB[ 77].push_back(new G4QDecayChan(.400, 321,-311));
       DecayDB[ 77].push_back(new G4QDecayChan(.600, 211, 221));
       DecayDB[ 77].push_back(new G4QDecayChan(.800, 211, 211,-211));
       DecayDB[ 77].push_back(new G4QDecayChan(1.00, 211, 111, 111));
-	   }
+    }
     if(limit<= 78 && nQ>= 78)    // f_4 0
-	   {
+    {
       DecayDB[ 78].push_back(new G4QDecayChan(.020, 333, 333));
       DecayDB[ 78].push_back(new G4QDecayChan(.340, 223, 223));
@@ -693,7 +697,7 @@
       DecayDB[ 78].push_back(new G4QDecayChan(.940, 211,-211));
       DecayDB[ 78].push_back(new G4QDecayChan(1.00, 111, 111));
-	   }
+    }
     if(limit<= 79 && nQ>= 79)    // K_4 0
-	   {
+    {
       DecayDB[ 79].push_back(new G4QDecayChan(.060, 333, 313));
       DecayDB[ 79].push_back(new G4QDecayChan(.260, 223, 313));
@@ -707,7 +711,7 @@
       DecayDB[ 79].push_back(new G4QDecayChan(.900, 311, 111));
       DecayDB[ 79].push_back(new G4QDecayChan(1.00, 321,-211));
-	   }
+    }
     if(limit<= 80 && nQ>= 80)    // K_4 +
-	   {
+    {
       DecayDB[ 80].push_back(new G4QDecayChan(.060, 333, 323));
       DecayDB[ 80].push_back(new G4QDecayChan(.260, 223, 323));
@@ -721,5 +725,5 @@
       DecayDB[ 80].push_back(new G4QDecayChan(.900, 311, 211));
       DecayDB[ 80].push_back(new G4QDecayChan(1.00, 321, 111));
-	   }
+    }
     if(limit<=81&&nQ>=81)DecayDB[81].push_back(new G4QDecayChan(1., 333,333));//phi_4(2300)
     if(limit<=82&&nQ>=82)DecayDB[82].push_back(new G4QDecayChan(1.,2212, 2224));//pDelta++
@@ -762,12 +766,12 @@
     // ------- Nuclear fragments
     //if(limit<=114 && nQ>=114)
-	   //{
+    //{
     //  if(limit<114) limit=101;
     //  for (int i=limit; i<nQ; i++) DecayDB[i] = 0;
     //}
-	   //Update the limit
+    //Update the limit
     limit=nQ+1;
 #ifdef debug
-	   G4cout<<"G4QParticle::InitDecayVector: limit is set to "<<limit<<G4endl;
+    G4cout<<"G4QParticle::InitDecayVector: limit is set to "<<limit<<G4endl;
 #endif
   }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParton.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParton.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParton.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QParton.cc,v 1.3 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QParton.cc,v 1.4 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
@@ -36,63 +36,65 @@
 //   For comparison mirror member functions are taken from G4 class:
 //   G4Parton
-// ------------------------------------------------------------
-
+// ------------------------------------------------------------------------
+// Short description: The Quark-Gluon String consists of the partons, which
+// are quarks and some times gluons.
+// ------------------------------------------------------------------------
 #include "G4QParton.hh"
 
 G4QParton::G4QParton(G4int PDGcode)
 {
-	 PDGencoding=PDGcode;
-	 theX = 0;
-	 theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding);
-  G4int aPDG=std::abs(PDGcode);
-	 //___________quarks__ 2 possible codes for gluons _ Condition for di-quarks
-	 if(!aPDG || (aPDG>3 && PDGcode!=9 && PDGcode!=21 && (aPDG>3303||aPDG<1103||aPDG%100>3))
-     || theDefinition==0)
-	 {
-	 		G4cerr<<"***G4QParton::Constructor: wrong quark/diquark PDG="<<PDGcode<<G4endl;
-    G4Exception("G4QParton::Constructor:","72",FatalException,"WrongPartonPDG");
-	 }
-	 //
-	 // colour by random in (1,2,3)=(R,G,B) for quarks and 
-	 //                  in (-1,-2,-3)=(Rbar,Gbar,Bbar) for anti-quarks:
-  G4int RGB=(G4int)(3*G4UniformRand())+1;
-	 G4String name=theDefinition->GetParticleType();
-	 if(name == "quarks")
-	 {
-	  	if(PDGcode>0) theColour = RGB;
+  PDGencoding=PDGcode;
+  theX = 0;
+  theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding);
+       G4int aPDG=std::abs(PDGcode);
+  //___________quarks__ 2 possible codes for gluons _ Condition for di-quarks
+  if(!aPDG || (aPDG>3 && PDGcode!=9 && PDGcode!=21 &&
+          (aPDG>3303||aPDG<1103||aPDG%100>3)) || theDefinition==0)
+  {
+    G4cerr<<"***G4QParton::Constructor: wrong quark/diquark PDG="<<PDGcode<<G4endl;
+         G4Exception("G4QParton::Constructor:","72",FatalException,"WrongPartonPDG");
+  }
+  //
+  // colour by random in (1,2,3)=(R,G,B) for quarks and 
+  //                  in (-1,-2,-3)=(Rbar,Gbar,Bbar) for anti-quarks:
+       G4int RGB=(G4int)(3*G4UniformRand())+1;
+  G4String name=theDefinition->GetParticleType();
+  if(name == "quarks")
+  {
+    if(PDGcode>0) theColour = RGB;
     else          theColour =-RGB;
   }
-	 // colour by random in (-1,-2,-3)=(Rbar,Gbar,Bbar)=(GB,RB,RG) for di-quarks and
-	 //                  in (1,2,3)=(R,G,B)=(GB,RB,RG) for anti-di-quarks:
-	 else if(name == "diquarks")
+  // colour by random in (-1,-2,-3)=(Rbar,Gbar,Bbar)=(GB,RB,RG) for di-quarks and
+  //                  in (1,2,3)=(R,G,B)=(GB,RB,RG) for anti-di-quarks:
+  else if(name == "diquarks")
   {
-	  	if(PDGcode>0) theColour =-RGB;
+    if(PDGcode>0) theColour =-RGB;
     else          theColour = RGB;
-	 }
-	 // colour by random in (-11,-12,-13,-21,...,-33)=(RRbar,RGbar,RBbar,...,BBbar) for gluons
-	 else if(name == "gluons") theColour = -(RGB*10 + (G4int)(3*G4UniformRand())+1);
-	 else
+  }
+  // ColourByRandom (-11,-12,-13,-21,...,-33)=(RRbar,RGbar,RBbar,...,BBbar) for gluons
+  else if(name == "gluons") theColour = -(RGB*10 + (G4int)(3*G4UniformRand())+1);
+  else
   {
-	 		G4cerr<<"***G4QParton::Constructor: not quark/diquark/gluon = "
+    G4cerr<<"***G4QParton::Constructor: not quark/diquark/gluon = "
           <<theDefinition->GetParticleType()<<G4endl;
     G4Exception("G4QParton::Constructor:","72",FatalException,"WrongParton");
-	 }
-	 // isospin-z from PDG-encoded isospin-z for 
-	 // quarks, anti-quarks, di-quarks, and anti-di-quarks:
-	 if (name == "quarks" || name == "diquarks")theIsoSpinZ = theDefinition->GetPDGIsospin3();
-  // isospin-z choosen at random from PDG-encoded isospin for gluons (should be zero):
-	 else
+  }
+  // isospin-z from PDG-encoded isospin-z for 
+  // quarks, anti-quarks, di-quarks, and anti-di-quarks:
+  if(name == "quarks" || name == "diquarks") theIsoSpinZ = theDefinition->GetPDGIsospin3();
+       // isospin-z choosen at random from PDG-encoded isospin for gluons (should be zero):
+  else
   {
-		  G4int thisPDGiIsospin=theDefinition->GetPDGiIsospin();
-		  if (thisPDGiIsospin == 0) theIsoSpinZ = 0;
-    //@@ ? M.K.
-		  else	theIsoSpinZ = ((G4int)((thisPDGiIsospin+1)*G4UniformRand()))-thisPDGiIsospin*0.5;
-	 }
-	 //
-	 // spin-z choosen at random from PDG-encoded spin:
-	 //
-	 G4int thisPDGiSpin=theDefinition->GetPDGiSpin();
-	 if(thisPDGiSpin == 0)	theSpinZ = 0;
-	 else	theSpinZ = (G4int)((thisPDGiSpin+1)*G4UniformRand())-thisPDGiSpin*0.5;;
+    G4int thisPDGiIsospin=theDefinition->GetPDGiIsospin();
+    if (thisPDGiIsospin == 0) theIsoSpinZ = 0;
+         //@@ ? M.K.
+    else theIsoSpinZ=((G4int)((thisPDGiIsospin+1)*G4UniformRand())) - thisPDGiIsospin*0.5;
+  }
+  //
+  // spin-z choosen at random from PDG-encoded spin:
+  //
+  G4int thisPDGiSpin=theDefinition->GetPDGiSpin();
+  if(thisPDGiSpin == 0) theSpinZ = 0;
+  else theSpinZ = (G4int)((thisPDGiSpin+1)*G4UniformRand())-thisPDGiSpin*0.5;;
 }
 
@@ -132,5 +134,5 @@
     theColour = right.theColour;
     theIsoSpinZ = right.theIsoSpinZ;
-    theSpinZ = right.theSpinZ;	
+    theSpinZ = right.theSpinZ; 
   }
   return *this;
@@ -139,16 +141,17 @@
 G4QParton::~G4QParton()
 {
-//  cout << "G4QParton::~G4QParton(): this = "<<this <<endl;
-//  cout << "break here"<<this <<endl;
+  //G4cout << "G4QParton::~G4QParton(): this = "<<this <<G4endl;
+  //G4cout << "break here"<<this <<G4endl;
 }
 
 void G4QParton::DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection)
 {
-	G4double Mass = GetMass();
-	G4LorentzVector a4Momentum = Get4Momentum();
-	aLightConeMomentum*=theX;
-	G4double TransverseMass2 = sqr(a4Momentum.px()) + sqr(a4Momentum.py()) + sqr(Mass);
-	a4Momentum.setPz(0.5*(aLightConeMomentum - TransverseMass2/aLightConeMomentum)*(aDirection? 1: -1)); 
-	a4Momentum.setE( 0.5*(aLightConeMomentum + TransverseMass2/aLightConeMomentum));
-	Set4Momentum(a4Momentum);
+  G4double Mass = GetMass();
+  G4LorentzVector a4Momentum = Get4Momentum();
+  aLightConeMomentum*=theX;
+  G4double TransverseMass2 = sqr(a4Momentum.px()) + sqr(a4Momentum.py()) + sqr(Mass);
+  a4Momentum.setPz(0.5*(aLightConeMomentum - TransverseMass2/aLightConeMomentum) *
+                                                                      (aDirection? 1: -1));
+  a4Momentum.setE( 0.5*(aLightConeMomentum + TransverseMass2/aLightConeMomentum));
+  Set4Momentum(a4Momentum);
 }  
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPartonPair.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPartonPair.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPartonPair.cc	(revision 1055)
@@ -26,6 +26,6 @@
 #include "G4QPartonPair.hh"
 //
-// $Id: G4QPartonPair.cc,v 1.1 2006/10/30 10:40:36 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPartonPair.cc,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
@@ -34,9 +34,15 @@
 //      ---------------- G4QParton ----------------
 //             by Mikhail Kossov, Oct 2006.
-// class for PartonPair (hadron) used by Parton String Models
-// ------------------------------------------------------------
+// class for PartonPair (hadron) used by QGS Models
+// --------------------------------------------------------------
+// Short description: Each Quasmon String has a pair of partons
+// (quark/diquark-partons) on its ends. During the hadronization
+// procedure the rapidity gap between partons shrinks, but the
+// parton pair still exists, while it is converted to the final
+// meson (quaek-antiquark) or baryon (quark-diquark).
+// --------------------------------------------------------------
 
 G4QPartonPair::G4QPartonPair(G4QParton* P1, G4QParton* P2, G4int Type, G4int aDirection)
-		: Parton1(P1), Parton2(P2), CollisionType(Type), Direction(aDirection) {}
+  : Parton1(P1), Parton2(P2), CollisionType(Type), Direction(aDirection) {}
 
 G4QPartonPair::~G4QPartonPair() {}
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPomeron.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPomeron.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPomeron.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QPomeron.cc,v 1.2 2006/12/12 11:02:22 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QPomeron.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
@@ -36,5 +36,12 @@
 //   For comparison mirror member functions are taken from G4 class:
 //   G4PomeronCrossSection
-// -----------------------------------------------------------------
+// ------------------------------------------------------------------
+// Short description: Pomeron is one of the possible vacuum pole (the
+// second is Oderon, but they are identical in the present model), by
+// which particle exchang in the ellastic scattering process. Strings,
+// which appear as a cut of the Pomeron (optic theorem connects the
+// amplitude of scattering at zero angle with the total inelastic
+// cross-section), describe most of the processes at high energies.
+// ------------------------------------------------------------------
 
 #include "G4QPomeron.hh"
@@ -42,6 +49,6 @@
 G4QPomeron::G4QPomeron(G4int PDG)
 {
-	 pomeron_Alpha=		1.0808;
-	 pomeron_Alphaprime =	0.25/GeV/GeV;     
+  pomeron_Alpha=  1.0808;
+  pomeron_Alphaprime = 0.25/GeV/GeV;     
   pomeron_Gamma_Hard = 0.0002/GeV/GeV;
   pomeron_Alpha_Hard = 1.47;
@@ -54,5 +61,5 @@
                                                 InitForNucleon();
   else
-		{
+  {
     G4cout<<"-Warning-G4QPomeron is initialised for PDGCode="<<PDG<<" as a pion"<<G4endl;
     InitForPion();
@@ -63,19 +70,19 @@
                                               const G4int nPom)
 {
-	 G4double f=1; if(nPom>1) for(G4int i=2; i<= nPom; i++) f*=i; // Calculate factorial
+  G4double f=1; if(nPom>1) for(G4int i=2; i<= nPom; i++) f*=i; // Calculate factorial
   G4double e=Eikonal(s,imp2); e+=e;                            // Doubled Eikonal
- 	return std::exp(-e)*std::pow(e,nPom)/pomeron_C/f;
+  return std::exp(-e)*std::pow(e,nPom)/pomeron_C/f;
 }
 
 void G4QPomeron::InitForNucleon()
 {
-  // pomeron_S=		3.0*GeV*GeV;  
-	 pomeron_S=		2.7*GeV*GeV;
-  //	pomeron_Gamma=		2.16/GeV/GeV;      // ? M.K.
-  //	pomeron_Gamma=		3.96/GeV/GeV;      // ? M.K.
-	 pomeron_Gamma   =	(2.6+3.96)/GeV/GeV; // ? M.K.
-	 pomeron_C       =	1.4;
-	 pomeron_Rsquare =	3.56/GeV/GeV;
-	 /////pomeron_Alpha=		0.9808;          // This is very strange M.K. (was in GHAD QGSM)
+  // pomeron_S=  3.0*GeV*GeV;  
+  pomeron_S=  2.7*GeV*GeV;
+  // pomeron_Gamma=  2.16/GeV/GeV;      // ? M.K.
+  // pomeron_Gamma=  3.96/GeV/GeV;      // ? M.K.
+  pomeron_Gamma   = (2.6+3.96)/GeV/GeV; // ? M.K.
+  pomeron_C       = 1.4;
+  pomeron_Rsquare = 3.56/GeV/GeV;
+  /////pomeron_Alpha=  0.9808;          // This is very strange M.K. (was in GHAD QGSM)
   // If pomeron_Gamma_Hard!=0 to fit total pp XS use pomeron_Gamma_Soft=2.35/GeV/GeV ? M.K.
 }
@@ -83,27 +90,27 @@
 void G4QPomeron::InitForPion()
 {
-	 pomeron_S       =	1.5*GeV*GeV;
-  //pomeron_Gamma =	1.46/GeV/GeV;  // ? M.K.
-	 pomeron_Gamma   =	2.17/GeV/GeV;  // ? M.K.
-	 pomeron_C       =	1.6;
-	 pomeron_Rsquare =	2.36/GeV/GeV;
+  pomeron_S       = 1.5*GeV*GeV;
+  //pomeron_Gamma = 1.46/GeV/GeV;  // ? M.K.
+  pomeron_Gamma   = 2.17/GeV/GeV;  // ? M.K.
+  pomeron_C       = 1.6;
+  pomeron_Rsquare = 2.36/GeV/GeV;
 }
 
 void G4QPomeron::InitForKaon()
 {
-	 pomeron_S       =	2.3*GeV*GeV;
-  //pomeron_Gamma =	1.31/GeV/GeV;  // ? M.K.
-	 pomeron_Gamma   = 1.92/GeV/GeV;  // ? M.K.
-	 pomeron_C       =	1.8;
-	 pomeron_Rsquare =	1.96/GeV/GeV;
+  pomeron_S       = 2.3*GeV*GeV;
+  //pomeron_Gamma = 1.31/GeV/GeV;  // ? M.K.
+  pomeron_Gamma   = 1.92/GeV/GeV;  // ? M.K.
+  pomeron_C       = 1.8;
+  pomeron_Rsquare = 1.96/GeV/GeV;
 }
 
 void G4QPomeron::InitForGamma()
 {
-	 pomeron_S       =	1.7*GeV*GeV;
-  //pomeron_Gamma =		1.42/GeV/GeV; // ? M.K.
-	 pomeron_Gamma   =	2.07/GeV/GeV;  // ? M.K.
-	 pomeron_C       =	1.7;
-	 pomeron_Rsquare =	2.16/GeV/GeV;
+  pomeron_S       = 1.7*GeV*GeV;
+  //pomeron_Gamma =  1.42/GeV/GeV; // ? M.K.
+  pomeron_Gamma   = 2.07/GeV/GeV;  // ? M.K.
+  pomeron_C       = 1.7;
+  pomeron_Rsquare = 2.16/GeV/GeV;
 }
 
@@ -111,12 +118,12 @@
 {
 
-	G4double sum=1.;
-	G4double current=1.;
-	for(G4int j=2; j<21; j++)
-	{
-		 current *= -z*(j-1)/j/j;
-		 sum+=current;
-	}
-	return sum;
+ G4double sum=1.;
+ G4double current=1.;
+ for(G4int j=2; j<21; j++)
+ {
+   current *= -z*(j-1)/j/j;
+   sum+=current;
+ }
+ return sum;
 }
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QSplitter.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QSplitter.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QSplitter.cc	(revision 1055)
@@ -28,12 +28,22 @@
 //
 //
-// $Id: G4QSplitter.cc,v 1.6 2006/11/27 10:44:55 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QSplitter.cc,v 1.7 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QSplitter ----------------
 //             by Mikhail Kossov, August 2005.
 //  class for Hadron-Hadron String Interaction used by the CHIPS Model
-// -------------------------------------------------------------------
- 
+// ----------------------------------------------------==---------------
+// Short description: the hadron befor the interaction must be splitted
+// in partons: quark-antiquark (mesons) or quark-diquark (baryon) parts
+// (some time in more than two parts, e.g. baryon in three quarks or a
+// few quark-antiquark pairs can be added for the splitting). Then each
+// projectile parton can create a parton pair (G4QPartonPair) with the
+// target parton. This pair with the big rapidity difference on the ends
+// creates a planar Quark-Gluon String (a pole). A pair of the projectile
+// partons with a pair of the target partons can create a cylindrical
+// string (doubled string in the algorithm - a cut).  
+// -------------------------------------------------===------------------
+
 //#define chdebug
 //#define debug
@@ -63,5 +73,5 @@
   theWorld= G4QCHIPSWorld::Get();             // Get a pointer to the CHIPS World
 #ifdef debug
-  G4cout<<"-->G4QString::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl;
+  G4cout<<">G4QSplitter::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl;
 #endif
   // Target initialization
@@ -76,5 +86,5 @@
   // Projectile initialization
   theProj4Mom = projHadron.Get4Momentum();
-		G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS
+  G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS
   G4ThreeVector projRBoost= -projBoost;       // Projevtile Boost vector to projectile CMS
   G4QPDGCode projQPDG(projHadron.GetPDGCode());
@@ -89,18 +99,18 @@
   G4double tM2 = tM*tM;
   G4double dM2 = fabs(pM2-projM2);
-  if(dM2>1.) G4cout<<"-Warn-G4QS::Constr:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl;
+  if(dM2>1.)G4cout<<"-Warn-G4QSplit::Con:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl;
   G4double pM=sqrt(pM2);                     // @@ do we need pM ? @@ (in print)
 
   // === Print out of the input information at Creation time & tot 4-mom Calculation ======
 #ifdef pdebug
-  G4cout<<"G4QS::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<<
-				theProj4Mom.m2()<<theProj4Mom.m()<<G4endl;
-  G4cout<<"G4QSpl::Constr: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl;
+  G4cout<<"G4QSplitter::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<<
+    theProj4Mom.m2()<<theProj4Mom.m()<<G4endl;
+  G4cout<<"G4QSplit::Cons: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl;
 #endif
   //G4int nP=theWorld->GetQPEntries();       // A#of init'ed particles in CHIPS World (@@?)
   //G4int nCl=nP-90;                          // A#of init'ed clusters in CHIPS World (@@?)
-		//#ifdef pdebug
+  //#ifdef pdebug
   //G4cout<<"G4QS:Const:Before QEX:n="<<nP<<G4endl;
-		//#endif
+  //#endif
   // @@@@@@ ===> Here the Quark Exchange Quasmon Creation must be added <=== @@@@@@
   // @@ --- old ---
@@ -129,5 +139,5 @@
   G4double interc=1.;                        // @@ A parameter ?!
 #ifdef pdebug
-  G4cout<<"G4QSpl::Constr: nP="<<nQProj<<", nT="<<nQTarg<<", intercept="<<interc<<G4endl;
+  G4cout<<"G4QSplit::Constr: nP="<<nQProj<<", nT="<<nQTarg<<", intercept="<<interc<<G4endl;
 #endif
   // @@ Now projectile can be only meson or baryon @@ -- @@ Improve for clusters @@ --
@@ -136,7 +146,7 @@
   G4bool FreeFraF=false;                     // Prototype of the free exchange Flag
   //if(G4UniformRand()<0.) FreeFraF=true;      // @@@@@@@@ Confirm the free exchange
-  if(nQProj<2) G4cout<<"***G4QSpl::Constr: nQProj="<<nQProj<<"<2 ***FatalError***"<<G4endl;
-		else if(nQProj>2)                          // ---> Baryon case (clusters are not implem.)
-		{
+  if(nQProj<2) G4cout<<"***G4QSplitter::C: nQProj="<<nQProj<<"<2 ***FatalError***"<<G4endl;
+  else if(nQProj>2)                          // ---> Baryon case (clusters are not implem.)
+  {
     //if(nQProj>3)G4cout<<"-Wor-G4QS::Const:nQProj="<<nQProj<<">3 is not implem'd"<<G4endl;
     G4double xP=0.;
@@ -146,9 +156,9 @@
       xP=RandomizeMomFractionString(nQProj);
       theWeight*=pow(xP,interc);
-      G4cout<<"************G4QS::C: string xP="<<xP<<G4endl;
+      G4cout<<"************G4QSplitter::C: string xP="<<xP<<G4endl;
     }
     rPMass = sqrt(pM2*(1.-xP));              // Residual Projectile mass
 #ifdef pdebug
-    G4cout<<"G4QS::C: nQProj="<<nQProj<<", xProj="<<xP<<", rPMass="<<rPMass<<G4endl;
+    G4cout<<"G4QSplitter::C: nQProj="<<nQProj<<", xProj="<<xP<<", rPMass="<<rPMass<<G4endl;
 #endif
   }
@@ -161,5 +171,5 @@
   else G4cout<<"*Warning*G4QSplitter::Constr:ProjDecIn2 rpM="<<rPMass<<", pM="<<pM<<G4endl;
 #ifdef pdebug
-  G4cout<<"G4QSpl::Con:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl;
+  G4cout<<"G4QSplit::C:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl;
 #endif
   G4LorentzVector tq4Mom(0.,0.,0.,0.);       // Prototype of LV of quark of the target  
@@ -172,5 +182,5 @@
     xT=RandomizeMomFractionString(nQTarg);
     theWeight*=pow(xT,interc);
-    G4cout<<"************G4QS::C: string xT="<<xT<<G4endl;
+    G4cout<<"************G4QSplitter::Constr: string xT="<<xT<<G4endl;
   }
   G4double rTMass = sqrt(tM2*(1.-xT));       // Residual Target mass
@@ -180,7 +190,7 @@
   G4LorentzVector tr4Mom(0.,0.,0.,rTMass);   // Prototype of LV of the residual projectile
   if(targHadron.DecayIn2(tq4Mom,tr4Mom)) targFl=true; // Targ decay is OK
-  else G4cout<<"**Worning**G4QStr::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl;
-#ifdef pdebug
-  G4cout<<"G4QStr::Con:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl;
+  else G4cout<<"**Warning**G4QSplit::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl;
+#ifdef pdebug
+  G4cout<<"G4QSplit::C:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl;
 #endif
   G4bool elasFl=false;                       // ByDefault avoid the elastic scattering
@@ -201,13 +211,13 @@
     // @@ Just to try ---- End
 #ifdef pdebug
-    G4cout<<"G4QS::Cons: npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
+    G4cout<<"G4QSplit::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
 #endif
     if(npM<pM+mPi0) // The projectile is under min mass (@@ In Future put other cut @@)
     {
       G4double valk=tq4Mom.e();         // Momentum of the target quark
-						//#ifdef pdebug
+      //#ifdef pdebug
       G4double dvalk=valk-tq4Mom.rho();
-      if(fabs(dvalk)>.00001) G4cout<<"***kp***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
-						//#endif
+      if(fabs(dvalk)>.00001) G4cout<<"**kp**G4QSplit::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
+      //#endif
       G4double dmas=pM2-pr4Mom.m2();    // Difference of squared masses
       G4double vale=pr4Mom.e();
@@ -219,5 +229,5 @@
       {
 #ifdef pdebug
-        G4cout<<"***p***>>>G4QS::C: cost="<<cost<<G4endl;
+        G4cout<<"***p***>>>G4QSplitter::Constr: cost="<<cost<<G4endl;
 #endif
         // Get max value of |cos(theta)| and change tq value to get the pM on mass shell
@@ -231,11 +241,11 @@
         }
         else                               // --->>> cost<0.
-								{
+        {
           G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM)
           if(hvalk>tM)                     // Momentum can not be increased to this value
           {
 #ifdef pdebug
-            G4cout<<"**p-Cor**>G4QS::C: hvalk="<<hvalk<<" > tM="<<tM<<", dm="<<dmas<<", e="
-                  <<vale<<", p="<<valp<<", ct="<<cost<<G4endl;
+            G4cout<<"**p-Cor**>G4QSplitter::Constr: hvalk="<<hvalk<<" > tM="<<tM<<", dm="
+                  <<dmas<<", e="<<vale<<", p="<<valp<<", ct="<<cost<<G4endl;
 #endif
             // Put the scatteredProjectile on the massShell, and rescatter the target quark
@@ -248,5 +258,5 @@
           }
           else
-										{
+          {
 #ifdef pdebug
             G4cout<<"***---***>G4QS::C: hvalk="<<hvalk<<" < tM="<<tM<<G4endl;
@@ -284,5 +294,5 @@
       }
 #ifdef pdebug
-      G4cout<<"G4QStr::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl;
+      G4cout<<"G4QSplit::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl;
 #endif
       pcorFl=true;                           // Projectile is on the GS mass shell
@@ -296,5 +306,5 @@
     //ntM=sqrt(nTM2);
 #ifdef pdebug
-    G4cout<<"G4QStr::C: ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl;
+    G4cout<<"G4QSplit::C:ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl;
 #endif
     if(ntM<tM+mPi0 && !pcorFl) // The target is under min mass (@@ InFut put another cut@@)
@@ -304,8 +314,8 @@
       pqc4M.boost(projRBoost);             // projectileQuark => projCM system <step2>
       G4double valk=pqc4M.e();             // Momentum of the target quark in projCM
-						//#ifdef pdebug
+      //#ifdef pdebug
       G4double dvalk=valk-pqc4M.rho();
       if(fabs(dvalk)>.00001) G4cout<<"***kt***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
-						//#endif
+      //#endif
       G4double dmas=tM2-tr4Mom.m2();       // Difference of squared masses (targ - targRes)
       G4LorentzVector trc4M=tr4Mom;        // targetResidual => projCM system <step1>
@@ -314,5 +324,5 @@
       G4ThreeVector tr=trc4M.v();          // 3-mom of the targetResidual in projCM
       G4double valp=tr.mag();              // momentum of the targetResidual in projCM
-      if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4QS::C: trM2="<<tr4Mom.m2()<<"="
+      if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4QSplit::C: trM2="<<tr4Mom.m2()<<"="
                                             <<trc4M.m2()<<","<<vale*vale-valp*valp<<G4endl;
       G4ThreeVector utr=tr/valp;           // Unit vector in the tr direction in projCM
@@ -321,5 +331,5 @@
       {
 #ifdef pdebug
-        G4cout<<"***t***>>>G4QS::C: cost="<<cost<<G4endl;
+        G4cout<<"***t***>>>G4QSplitter::Constr: cost="<<cost<<G4endl;
 #endif
         // Get max value of |cos(theta)| and change pq value to get the tM on mass shell
@@ -337,5 +347,5 @@
         }
         else                                   // --->>> cost<-1 => cost=-1
-								{
+        {
           G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM)
           if(hvalk>pM)                     // Momentum can not be increased to this value
@@ -354,7 +364,7 @@
           }
           else
-										{
-#ifdef pdebug
-            G4cout<<"***---***>G4QS::C: hvalk="<<hvalk<<" < pM="<<pM<<G4endl;
+          {
+#ifdef pdebug
+            G4cout<<"***---***>G4QSplitter::Constr: hvalk="<<hvalk<<" < pM="<<pM<<G4endl;
 #endif
             valk=hvalk/2;                        // Momentum is too small (mustBeIncreased)
@@ -377,5 +387,5 @@
             G4double smo=nTc4M.rho();
             G4cout<<"G4QS::C:qM2="<<pqc4M.m2()<<",rM2="<<trc4M.m2()<<",E="<<sen<<"="<<
-														vale+valk<<",P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl;
+              vale+valk<<",P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl;
 #endif
             G4LorentzVector prc4M(pM-valk,-pqf); // Fill new 4-mom for projectResid in CM
@@ -386,5 +396,5 @@
         }
         if(fabs(newTarg4M.m()-tM)>.0001)
-          G4cout<<"******************************G4QS::C:"<<newTarg4M.m()<<"="<<pM<<G4endl;
+          G4cout<<"***************G4QSplitter::Constr: M="<<newTarg4M.m()<<"#"<<pM<<G4endl;
       }
       else // -1<cos(theta)<1 - only rotate the projQ
@@ -392,5 +402,5 @@
         // Turn the projectile quark-parton to the target residual in CMS of the Projectile
 #ifdef pdebug
-        G4cout<<"---t--->>>G4QS::C: cost="<<cost<<G4endl;
+        G4cout<<"---t--->>>G4QSplitter::Constr: cost="<<cost<<G4endl;
 #endif
         G4LorentzVector prc4M=pr4Mom;          // projectileQuark => projCM system <step1>
@@ -421,5 +431,5 @@
       }
 #ifdef pdebug
-      G4cout<<"G4QStr::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl;
+      G4cout<<"G4QSplit::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl;
 #endif
       tcorFl=true;                  // Target is on the GS mass shell
@@ -428,5 +438,5 @@
       npM=sqrt(nPM2);
 #ifdef pdebug
-      G4cout<<"G4QStr::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
+      G4cout<<"G4QSpl::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
 #endif
       if(npM<pM+mPi0) elasFl=true;    // Force elastic scattering (@@InFut putAnotherCut@@)
@@ -437,5 +447,5 @@
       // **** Put the hadrons on the mass shell conserving the CMS scattering angle ****
       G4LorentzVector theTot4M=theProj4Mom+theTarg4Mom;// 4-momentum of CMS of "targ+proj"
-		    G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS"
+      G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS"
       G4ThreeVector cmsRBoost= -cmsBoost;              // CMS Boost Vector "LS to CMS"
       G4LorentzVector cmsProj4M=theProj4Mom; // LS projectile => CMS <step1>
@@ -447,5 +457,5 @@
       if(fabs(cmsTarg4M.rho()-pcm) > 0.0001)
         G4cout<<"-Worning-G4QSplitter::Constr: P="<<cmsTarg4M.rho()<<"#"<<pcm<<G4endl;
-						//#endif
+      //#endif
       G4LorentzVector cmsNewPr4M=newProj4M;  // LS finalProj => CMS <step1>
       cmsNewPr4M.boost(cmsRBoost);           // LS finalProj => CMS <step2>
@@ -456,6 +466,6 @@
       G4ThreeVector tuV=cmsNewTg4M.v()/cmsNewTg4M.rho(); // Direction of the projectile
       if(1.+puV.dot(tuV) > 0.001)
-        G4cout<<"-Worning-G4QSplitter::Constr: ct="<<puV.dot(tuV)<<G4endl;
-						//#endif
+        G4cout<<"-Warning-G4QSplitter::Constr: ct="<<puV.dot(tuV)<<G4endl;
+      //#endif
       cmsProj4M.setV(puV*pcm);
       newProj4M=cmsProj4M;
@@ -494,5 +504,5 @@
         theQHadrons.push_back(targH);        // Fill the Target Hadron (delete equivalent)
       }
-						else                                   // Both are excited (two Quasmons only) 
+      else                                   // Both are excited (two Quasmons only) 
       {
         G4Quasmon* projQ = new G4Quasmon(projHadron.GetQC(),newProj4M);
@@ -503,5 +513,5 @@
     }
   }
-  else G4cout<<"-Wor-G4QSplitter::Constr:T="<<targFl<<" or P="<<projFl<<" err"<<G4endl;
+  else G4cout<<"-Warning-G4QSplitter::Constr:T="<<targFl<<" or P="<<projFl<<" err"<<G4endl;
 #ifdef pdebug
   G4cout<<"G4QSplitter::Constructor: *** End of Constructor ***, elF="<<elasFl<<G4endl;
@@ -523,18 +533,18 @@
     finBaryoN+=theQuasmons[iq]->GetBaryonNumber();
   }
-  G4cout<<"G4QStr::C:nH="<<nHad<<",nQ="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl;
+  G4cout<<"G4QSpl::C:nH="<<nHad<<",nQ="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl;
   if(finCharge!=totCharge || finBaryoN!=totBaryNum)
   {
-    G4cerr<<"***G4QStr::C:tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum
+    G4cerr<<"***G4QSptitter::C:tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum
           <<",B="<<finBaryoN<<G4endl;
     if(nHad) for(G4int h=0; h<nHad; h++)
     {
       G4QHadron* cH = theQHadrons[h];
-      G4cerr<<"::G4QS::C:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;
+      G4cerr<<"G4QSplit::C: h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;
     }
     if(nQuas) for(G4int q=0; q<nQuas; q++)
     {
       G4Quasmon* cQ = theQuasmons[q];
-      G4cerr<<"::G4QS::C:q#"<<q<<",C="<<cQ->GetCharge()<<",QuarkCon="<<cQ->GetQC()<<G4endl;
+      G4cerr<<"G4QSplit::C: q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl;
     }
   }
@@ -550,5 +560,5 @@
     G4Quasmon* curQ    = new G4Quasmon(right.theQuasmons[iq]);
 #ifdef fdebug
-    G4cout<<"G4QS::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
+    G4cout<<"G4QSplit::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
 #endif
     theQuasmons.push_back(curQ);             // (delete equivalent)
@@ -563,7 +573,7 @@
   
   theWorld        =  right.theWorld; 
-		tot4Mom         =	 right.tot4Mom;
-		totCharge       =	 right.totCharge;
-		totBaryNum      =	 right.totBaryNum;
+  tot4Mom         =  right.tot4Mom;
+  totCharge       =  right.totCharge;
+  totBaryNum      =  right.totBaryNum;
 }
 
@@ -581,5 +591,5 @@
       G4Quasmon* curQ    = new G4Quasmon(right.theQuasmons[iq]);
 #ifdef fdebug
-      G4cout<<"G4QS::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
+      G4cout<<"G4QSpl::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
 #endif
       theQuasmons.push_back(curQ);             // (delete equivalent)
@@ -594,7 +604,7 @@
   
     theWorld        =  right.theWorld; 
-		  tot4Mom         =	 right.tot4Mom;
-		  totCharge       =	 right.totCharge;
-		  totBaryNum      =	 right.totBaryNum;
+    tot4Mom         =  right.tot4Mom;
+    totCharge       =  right.totCharge;
+    totBaryNum      =  right.totBaryNum;
   }
   return *this;
@@ -609,5 +619,5 @@
     G4Quasmon* curQ    = new G4Quasmon(right->theQuasmons[iq]);
 #ifdef fdebug
-    G4cout<<"G4QS::CopyByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
+    G4cout<<"G4QSpl::CopyByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
 #endif
     theQuasmons.push_back(curQ);             // (delete equivalent)
@@ -622,7 +632,7 @@
   
   theWorld        =  right->theWorld; 
-		tot4Mom         =	 right->tot4Mom;
-		totCharge       =	 right->totCharge;
-		totBaryNum      =	 right->totBaryNum;
+  tot4Mom         =  right->tot4Mom;
+  totCharge       =  right->totCharge;
+  totBaryNum      =  right->totBaryNum;
 }
 
@@ -657,5 +667,5 @@
 G4QHadronVector* G4QSplitter::Fragment()
 {//              ========================== -- @@ Must be changed @@ --
-		// Make the final check before filling the output -- @@ Must be changed @@ --
+  // Make the final check before filling the output -- @@ Must be changed @@ --
 #ifdef chdebug
   G4int fCharge=0;
@@ -774,5 +784,5 @@
   // @@ TMP --- Begin ---
   if(2>1)
-		{
+  {
     if(nPart<2)
     {
@@ -785,6 +795,6 @@
     if(r==0.) return 0.;
     if(r==1.) return 1.;
-		  if     (nPart==3) x=r;          // GS baryon
-		  else if(nPart==4) x=1.-sqrt(r); // GS quaternion
+    if     (nPart==3) x=r;          // GS baryon
+    else if(nPart==4) x=1.-sqrt(r); // GS quaternion
     else x=1.-pow(r,1./(nPart-2.)); // nPart>4
     return x;
@@ -802,7 +812,7 @@
   if(r==0.) return 0.;
   if(r==1.) return 1.;
-		if(nPart==3) x=sqrt(r);      // GS baryon
-		else if(nPart==4)            // GS quaternion
-		{
+  if(nPart==3) x=sqrt(r);      // GS baryon
+  else if(nPart==4)            // GS quaternion
+  {
     if    (r==0.5) x=0.5;
     else if(r<0.5) x=sqrt(r+r)*(.5+.1579*(r-.5));
@@ -810,5 +820,5 @@
   }
   else
-		{
+  {
     G4int n1=nPart-2;
     G4double r1=n1;
@@ -819,13 +829,13 @@
     if  (r==rr)  x=p2;
     else
-				{
+    {
       if(r<rr)
       {
-								G4double pr=0.;
-								G4double pra=0.;
+        G4double pr=0.;
+        G4double pra=0.;
         if(nPart>8)
-								{
+        {
           if(nPart>10)
-								  {
+          {
             if(nPart>11)                      // >11
             {
@@ -833,5 +843,5 @@
               pra=.915/pow((nPart+6.7),1.75);
             }
-												else                              // 11
+            else                              // 11
             {
               pr=.09945;
@@ -840,5 +850,5 @@
           }
           else
-								  {
+          {
             if(nPart>9)                       // 10
             {
@@ -846,5 +856,5 @@
               pra=.00741;
             }
-												else                              // 9
+            else                              // 9
             {
               pr=.11425;
@@ -854,7 +864,7 @@
         }
         else
-								{
+        {
           if(nPart>6)
-								  {
+          {
             if(nPart>7)                       // 8
             {
@@ -862,5 +872,5 @@
               pra=.00926;
             }
-												else                              // 7
+            else                              // 7
             {
               pr=.13405;
@@ -869,5 +879,5 @@
           }
           else
-								  {
+          {
             if(nPart>5)                       // 6
             {
@@ -875,5 +885,5 @@
               pra=.01112;
             }
-												else                              // 5
+            else                              // 5
             {
               pr=.15765;
@@ -886,29 +896,29 @@
       else
       {
-								G4double sr=0.;
+        G4double sr=0.;
         if(nPart>8)
-								{
+        {
           if(nPart>10)
-								  {
+          {
             if(nPart>11) sr=.86/(nPart+1.05); // >11
-												else         sr=.0774;            // 11
+            else         sr=.0774;            // 11
           }
           else
-								  {
+          {
             if(nPart>9) sr=.0849;             // 10
-												else        sr=.0938;             // 9
+            else        sr=.0938;             // 9
           }
         }
         else
-								{
+        {
           if(nPart>6)
-								  {
+          {
             if(nPart>7) sr=.1047;             // 8
-												else        sr=.1179;             // 7
+            else        sr=.1179;             // 7
           }
           else
-								  {
+          {
             if(nPart>5) sr=.1339;             // 6
-												else        sr=.15135;            // 5
+            else        sr=.15135;            // 5
           }
         }
@@ -933,6 +943,6 @@
   if(r==0.) return 0.;
   if(r==1.) return 1.;
-		if     (nPart==3) x=r;          // GS baryon
-		else if(nPart==4) x=1.-sqrt(r); // GS quaternion
+  if     (nPart==3) x=r;          // GS baryon
+  else if(nPart==4) x=1.-sqrt(r); // GS quaternion
   else x=1.-pow(r,1./(nPart-2.)); // nPart>4
   return x;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QString.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QString.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QString.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QString.cc,v 1.4 2007/07/06 07:38:36 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QString.cc,v 1.5 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // ------------------------------------------------------------
@@ -37,5 +37,15 @@
 //   G4FragmentingString
 //   G4ExcitedStringDecay
-// ------------------------------------------------------------
+// ---------------------------------------------------------------------
+// Short description: If partons from the G4QPartonPair are close in
+// rapidity, they create Quasmons, but if they are far in the rapidity
+// space, they can not interact directly. Say the bottom parton (quark)
+// has rapidity 0, and the top parton (antiquark) has rapidity 8, then
+// the top quark splits in two by radiating gluon, and each part has
+// rapidity 4, then the gluon splits in quark-antiquark pair (rapidity
+// 2 each), and then the quark gadiates anothe gluon and reachs rapidity
+// 1. Now it can interact with the bottom antiquark, creating a Quasmon
+// or a hadron. The intermediate partons is the string ladder.
+// ---------------------------------------------------------------------
 
 //#define debug
@@ -65,5 +75,5 @@
 
 G4QString::G4QString(G4QParton* QCol,G4QParton* Gluon,G4QParton* QAntiCol,G4int Direction):
-	 theDirection(Direction),thePosition(QCol->GetPosition()),hadronizer(new G4QHadronBuilder)
+  theDirection(Direction),thePosition(QCol->GetPosition()),hadronizer(new G4QHadronBuilder)
 {
   thePartons.push_back(QCol);
@@ -80,13 +90,13 @@
 G4LorentzVector G4QString::Get4Momentum() const
 {
-	 G4LorentzVector momentum(0.,0.,0.,0.);
-	 for(unsigned i=0; i<thePartons.size(); i++) momentum += thePartons[i]->Get4Momentum();
-	 return momentum;
+  G4LorentzVector momentum(0.,0.,0.,0.);
+  for(unsigned i=0; i<thePartons.size(); i++) momentum += thePartons[i]->Get4Momentum();
+  return momentum;
 }
 
 void G4QString::LorentzRotate(const G4LorentzRotation & rotation)
 {
-	 for(unsigned i=0; i<thePartons.size(); i++)
-	    thePartons[i]->Set4Momentum(rotation*thePartons[i]->Get4Momentum());
+  for(unsigned i=0; i<thePartons.size(); i++)
+     thePartons[i]->Set4Momentum(rotation*thePartons[i]->Get4Momentum());
 }
 
@@ -94,38 +104,38 @@
 {
   G4QPartonVector::iterator insert_index;   // Begin by default (? M.K.)
-	
-	 if(addafter != NULL) 
-	 {
-	   insert_index=std::find(thePartons.begin(), thePartons.end(), addafter);
-	   if (insert_index == thePartons.end())		// No object addafter in thePartons
-	   {
-				 	G4cerr<<"***G4QString::InsertParton: Address Parton is not found"<<G4endl;
+ 
+  if(addafter != NULL) 
+  {
+    insert_index=std::find(thePartons.begin(), thePartons.end(), addafter);
+    if (insert_index == thePartons.end())  // No object addafter in thePartons
+    {
+      G4cerr<<"***G4QString::InsertParton: Address Parton is not found"<<G4endl;
       G4Exception("G4QString::InsertParton:","72",FatalException,"NoAddressParton");
-	   }
-	 }
-	 thePartons.insert(insert_index+1, aParton);
+    }
+  }
+  thePartons.insert(insert_index+1, aParton);
 } 
 
 G4LorentzRotation G4QString::TransformToCenterOfMass()
 {
-	 G4LorentzRotation toCms(-1*Get4Momentum().boostVector());
-	 for(unsigned i=0; i<thePartons.size(); i++)
-	                     thePartons[i]->Set4Momentum(toCms*thePartons[i]->Get4Momentum());
-	 return toCms;
+  G4LorentzRotation toCms(-1*Get4Momentum().boostVector());
+  for(unsigned i=0; i<thePartons.size(); i++)
+                      thePartons[i]->Set4Momentum(toCms*thePartons[i]->Get4Momentum());
+  return toCms;
 }
 
 G4LorentzRotation G4QString::TransformToAlignedCms()
 {
-	 G4LorentzVector momentum=Get4Momentum();
-	 G4LorentzRotation toAlignedCms(-1*momentum.boostVector());
-	 momentum= toAlignedCms* thePartons[0]->Get4Momentum();
-	 toAlignedCms.rotateZ(-1*momentum.phi());
-	 toAlignedCms.rotateY(-1*momentum.theta());
-	 for(unsigned index=0; index<thePartons.size(); index++)
-	 {
-	   momentum=toAlignedCms * thePartons[index]->Get4Momentum();
-	   thePartons[index]->Set4Momentum(momentum);
-	 }
-	 return toAlignedCms;
+  G4LorentzVector momentum=Get4Momentum();
+  G4LorentzRotation toAlignedCms(-1*momentum.boostVector());
+  momentum= toAlignedCms* thePartons[0]->Get4Momentum();
+  toAlignedCms.rotateZ(-1*momentum.phi());
+  toAlignedCms.rotateY(-1*momentum.theta());
+  for(unsigned index=0; index<thePartons.size(); index++)
+  {
+    momentum=toAlignedCms * thePartons[index]->Get4Momentum();
+    thePartons[index]->Set4Momentum(momentum);
+  }
+  return toAlignedCms;
 }
 
@@ -169,5 +179,5 @@
   SmoothParam     = smPar;          // QGS model parameter
   StrangeSuppress = SSup;           // Strangeness suppression parameter
-	 widthOfPtSquare = -2*SigPt*SigPt;	// width^2 of pt for string excitation
+  widthOfPtSquare = -2*SigPt*SigPt; // width^2 of pt for string excitation
   StringLoopInterrupt = SLmax;      // String fragmentation LOOP limit 
   ClusterLoopInterrupt= CLmax;      // Cluster fragmentation LOOP limit 
@@ -177,8 +187,8 @@
 G4ThreeVector G4QString::GaussianPt(G4double widthSquare, G4double maxPtSquare) const
 {
-	 G4double pt2; do{pt2=widthSquare*std::log(G4UniformRand());} while (pt2>maxPtSquare);
-		pt2=std::sqrt(pt2);
-	 G4double phi=G4UniformRand()*twopi;
-	 return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.);    
+  G4double pt2; do{pt2=widthSquare*std::log(G4UniformRand());} while (pt2>maxPtSquare);
+  pt2=std::sqrt(pt2);
+  G4double phi=G4UniformRand()*twopi;
+  return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.);    
 } // End of GaussianPt
 
@@ -186,46 +196,46 @@
 void G4QString::DiffString(G4QHadron* hadron, G4bool isProjectile)
 {
-	 hadron->SplitUp();
-	 G4QParton* start = hadron->GetNextParton();
-	 if( start==NULL) 
-	 {
+  hadron->SplitUp();
+  G4QParton* start = hadron->GetNextParton();
+  if( start==NULL) 
+  {
     G4cerr<<"***G4QString::DiffString: No start parton found, nothing is done"<<G4endl;
-	   return;
- 	}
-	 G4QParton* end = hadron->GetNextParton();
-	 if( end==NULL) 
-	 {
+    return;
+  }
+  G4QParton* end = hadron->GetNextParton();
+  if( end==NULL) 
+  {
     G4cerr<<"***G4QString::DiffString: No end parton found, nothing is done"<<G4endl;
-	   return;
-	 }
-	 if(isProjectile)	ExciteString(end, start, 1); //  1 = Projectile
-	 else            	ExciteString(start, end,-1); // -1 = Target
-	 SetPosition(hadron->GetPosition());
+    return;
+  }
+  if(isProjectile) ExciteString(end, start, 1); //  1 = Projectile
+  else             ExciteString(start, end,-1); // -1 = Target
+  SetPosition(hadron->GetPosition());
   // momenta of string ends
-	 G4double ptSquared= hadron->Get4Momentum().perp2();
+  G4double ptSquared= hadron->Get4Momentum().perp2();
   G4double hmins=hadron->Get4Momentum().minus();
   G4double hplus=hadron->Get4Momentum().plus();
-	 G4double transMassSquared=hplus*hmins;
- 	G4double maxMomentum = std::sqrt(transMassSquared) - std::sqrt(ptSquared);
-	 G4double maxAvailMomentumSquared = maxMomentum * maxMomentum;
- 	G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
- 	G4LorentzVector Pstart(G4LorentzVector(pt,0.));
-	 G4LorentzVector Pend(hadron->Get4Momentum().px(), hadron->Get4Momentum().py(), 0.);
-	 Pend-=Pstart;
-	 G4double tm1=hmins+(Pend.perp2()-Pstart.perp2())/hplus;
-	 G4double tm2=std::sqrt( std::max(0., tm1*tm1-4*Pend.perp2()*hmins/hplus ) );
- 	G4int Sign= isProjectile ? TARGET : PROJECTILE;
- 	G4double endMinus  = 0.5 * (tm1 + Sign*tm2);
-	 G4double startMinus= hmins - endMinus;
- 	G4double startPlus = Pstart.perp2() / startMinus;
-	 G4double endPlus   = hplus - startPlus;
-	 Pstart.setPz(0.5*(startPlus - startMinus));
-	 Pstart.setE (0.5*(startPlus + startMinus));
-	 Pend.setPz  (0.5*(endPlus - endMinus));
-	 Pend.setE   (0.5*(endPlus + endMinus));
-	 start->Set4Momentum(Pstart);
-	 end->Set4Momentum(Pend);
+  G4double transMassSquared=hplus*hmins;
+  G4double maxMomentum = std::sqrt(transMassSquared) - std::sqrt(ptSquared);
+  G4double maxAvailMomentumSquared = maxMomentum * maxMomentum;
+  G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
+  G4LorentzVector Pstart(G4LorentzVector(pt,0.));
+  G4LorentzVector Pend(hadron->Get4Momentum().px(), hadron->Get4Momentum().py(), 0.);
+  Pend-=Pstart;
+  G4double tm1=hmins+(Pend.perp2()-Pstart.perp2())/hplus;
+  G4double tm2=std::sqrt( std::max(0., tm1*tm1-4*Pend.perp2()*hmins/hplus ) );
+  G4int Sign= isProjectile ? TARGET : PROJECTILE;
+  G4double endMinus  = 0.5 * (tm1 + Sign*tm2);
+  G4double startMinus= hmins - endMinus;
+  G4double startPlus = Pstart.perp2() / startMinus;
+  G4double endPlus   = hplus - startPlus;
+  Pstart.setPz(0.5*(startPlus - startMinus));
+  Pstart.setE (0.5*(startPlus + startMinus));
+  Pend.setPz  (0.5*(endPlus - endMinus));
+  Pend.setE   (0.5*(endPlus + endMinus));
+  start->Set4Momentum(Pstart);
+  end->Set4Momentum(Pend);
 #ifdef debug
-		G4cout<<"G4QString::DiffString: StartQ="<<start->GetPDGCode()<<start->Get4Momentum()<<"("
+  G4cout<<"G4QString::DiffString: StartQ="<<start->GetPDGCode()<<start->Get4Momentum()<<"("
         <<start->Get4Momentum().mag()<<"), EndQ="<<end->GetPDGCode()<<end ->Get4Momentum()
         <<"("<<end->Get4Momentum().mag()<<"), sumOfEnds="<<Pstart+Pend<<", H4M(original)="
@@ -237,5 +247,5 @@
 void G4QString::ExciteString(G4QParton* Color, G4QParton* AntiColor, G4int Direction)
 {
-		theDirection = Direction;
+  theDirection = Direction;
   thePosition  = Color->GetPosition();
   thePartons.push_back(Color);
@@ -258,5 +268,5 @@
        z = zmin + G4UniformRand()*(zmax-zmin);
        // yf = std::pow(1. - z, blund)/z*std::exp(-alund*Mt2/z);
-	      yf = (1-z)/z * std::exp(-alund*Mt2/z);
+       yf = (1-z)/z * std::exp(-alund*Mt2/z);
     } while (G4UniformRand()*maxYf>yf); 
     return z;
@@ -266,5 +276,5 @@
 // QGSM Longitudinal fragmentation
 G4double G4QString::GetQGSMLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding,
-																																						G4QHadron* , G4double, G4double) // @@ M.K.
+                                      G4QHadron* , G4double, G4double) // @@ M.K.
 {
   static const G4double arho=0.5;
@@ -287,5 +297,5 @@
      G4Exception("G4QString::GetQGSMLightConeZ:","72",FatalException,"WrongQuark");
     }
-    do 	
+    do  
     {
       z  = zmin + G4UniformRand()*(zmax - zmin);
@@ -314,95 +324,95 @@
 {
   // Can no longer modify Parameters for Fragmentation.
-	 // PastInitPhase=true;                                     // Now static
-	
-  // 	check if string has enough mass to fragment...
-	 G4QHadronVector* LeftVector=LightFragmentationTest();
-	 if(LeftVector) return LeftVector;
-	
-	 LeftVector = new G4QHadronVector;
-	 G4QHadronVector* RightVector = new G4QHadronVector;
+  // PastInitPhase=true;                                     // Now static
+ 
+  //  check if string has enough mass to fragment...
+  G4QHadronVector* LeftVector=LightFragmentationTest();
+  if(LeftVector) return LeftVector;
+ 
+  LeftVector = new G4QHadronVector;
+  G4QHadronVector* RightVector = new G4QHadronVector;
 
   // this should work but it's only a semi deep copy.
-  // %GF	G4ExcitedString theStringInCMS(theString);
+  // %GF G4ExcitedString theStringInCMS(theString);
   G4QString* theStringInCMS=CPExcited();                      // must be deleted
-	 G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms();
-	 G4bool success=false;
-	 G4bool inner_sucess=true;
-	 G4int attempt=0;
-	 while (!success && attempt++<StringLoopInterrupt)              //@@ It's Loop with break
-	 {
-		  G4QString* currentString = new G4QString(*theStringInCMS);
-		  if(LeftVector->size())
+  G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms();
+  G4bool success=false;
+  G4bool inner_sucess=true;
+  G4int attempt=0;
+  while (!success && attempt++<StringLoopInterrupt)              //@@ It's Loop with break
+  {
+    G4QString* currentString = new G4QString(*theStringInCMS);
+    if(LeftVector->size())
     {
       std::for_each(LeftVector->begin(), LeftVector->end(), DeleteQHadron());
-		    LeftVector->clear();
+      LeftVector->clear();
     }
-		  if(RightVector->size())
-		  {
+    if(RightVector->size())
+    {
       std::for_each(RightVector->begin(), RightVector->end(), DeleteQHadron());
-		    RightVector->clear();
-		  }
-		  inner_sucess=true;  // set false on failure..
-		  while (!StopFragmentation())
-		  {  // Split current string into hadron + new string
-		   	G4QString* newString=0;  // used as output from SplitUp...
-			   G4QHadron* Hadron=Splitup(QL);
-			   if(Hadron && IsFragmentable())
-			   {
-			     if(currentString->GetDecayDirection()>0) LeftVector->push_back(Hadron);
-       	else RightVector->push_back(Hadron);
-			     delete currentString;
-			     currentString=newString;
-			   }
+      RightVector->clear();
+    }
+    inner_sucess=true;  // set false on failure..
+    while (!StopFragmentation())
+    {  // Split current string into hadron + new string
+      G4QString* newString=0;  // used as output from SplitUp...
+      G4QHadron* Hadron=Splitup(QL);
+      if(Hadron && IsFragmentable())
+      {
+        if(currentString->GetDecayDirection()>0) LeftVector->push_back(Hadron);
+        else RightVector->push_back(Hadron);
+        delete currentString;
+        currentString=newString;
+      }
       else
       {
-			     // abandon ... start from the beginning
-			     if (newString) delete newString;
-			     if (Hadron)    delete Hadron;
-			     inner_sucess=false;
-			     break;
-			   }
-		  } 
-		// Split current string into 2 final Hadrons
-		  if( inner_sucess && SplitLast(currentString, LeftVector, RightVector) ) 	success=true;
-		  delete currentString;
-	 }
-	 delete theStringInCMS;
-	 if (!success)
-	 {
-		  if(RightVector->size())
-		  {
+        // abandon ... start from the beginning
+        if (newString) delete newString;
+        if (Hadron)    delete Hadron;
+        inner_sucess=false;
+        break;
+      }
+    } 
+  // Split current string into 2 final Hadrons
+    if( inner_sucess && SplitLast(currentString, LeftVector, RightVector) )  success=true;
+    delete currentString;
+  }
+  delete theStringInCMS;
+  if (!success)
+  {
+    if(RightVector->size())
+    {
       std::for_each(RightVector->begin(), RightVector->end(), DeleteQHadron());
-		    RightVector->clear();
-		  }
-		  delete RightVector;
-		  if(LeftVector->size())
+      RightVector->clear();
+    }
+    delete RightVector;
+    if(LeftVector->size())
     {
       std::for_each(LeftVector->begin(), LeftVector->end(), DeleteQHadron());
-		    LeftVector->clear();
+      LeftVector->clear();
     }
-		  return LeftVector;
-	 }		
-	 // Join Left and Right Vectors into LeftVector in correct order.
-	 while(!RightVector->empty())
-	 {
-	    LeftVector->push_back(RightVector->back());
-	    RightVector->erase(RightVector->end()-1);
-	 }
-	 delete RightVector;
-	 CalculateHadronTimePosition(Get4Momentum().mag(), LeftVector);
-	 G4LorentzRotation toObserverFrame(toCms.inverse());
-	 for(unsigned C1 = 0; C1 < LeftVector->size(); C1++)
-	 {
-	   G4QHadron* Hadron = (*LeftVector)[C1];
-	   G4LorentzVector Momentum = Hadron->Get4Momentum();
-	   Momentum = toObserverFrame*Momentum;
-	   Hadron->Set4Momentum(Momentum);
-	   G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime());
-	   Momentum = toObserverFrame*Coordinate;
-	   Hadron->SetFormationTime(Momentum.e());
-	   Hadron->SetPosition(GetPosition()+Momentum.vect());
-	 }
-	 return LeftVector;
+    return LeftVector;
+  }  
+  // Join Left and Right Vectors into LeftVector in correct order.
+  while(!RightVector->empty())
+  {
+     LeftVector->push_back(RightVector->back());
+     RightVector->erase(RightVector->end()-1);
+  }
+  delete RightVector;
+  CalculateHadronTimePosition(Get4Momentum().mag(), LeftVector);
+  G4LorentzRotation toObserverFrame(toCms.inverse());
+  for(unsigned C1 = 0; C1 < LeftVector->size(); C1++)
+  {
+    G4QHadron* Hadron = (*LeftVector)[C1];
+    G4LorentzVector Momentum = Hadron->Get4Momentum();
+    Momentum = toObserverFrame*Momentum;
+    Hadron->Set4Momentum(Momentum);
+    G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime());
+    Momentum = toObserverFrame*Coordinate;
+    Hadron->SetFormationTime(Momentum.e());
+    Hadron->SetPosition(GetPosition()+Momentum.vect());
+  }
+  return LeftVector;
 } // End of FragmentLundString
 
@@ -410,7 +420,7 @@
 G4QString* G4QString::CPExcited()
 {
-	G4QParton* LeftParton = new G4QParton(GetLeftParton());
-	G4QParton* RightParton= new G4QParton(GetRightParton());
-	return new G4QString(LeftParton,RightParton,GetDirection());
+ G4QParton* LeftParton = new G4QParton(GetLeftParton());
+ G4QParton* RightParton= new G4QParton(GetRightParton());
+ return new G4QString(LeftParton,RightParton,GetDirection());
 } // End of CPExcited
 
@@ -419,39 +429,39 @@
 {
   // Check string decay threshold
-		
-	 G4QHadronVector* result=0;  // return 0 when string exceeds the mass cut
-	
-	 G4QHadronPair hadrons((G4QHadron*)0, (G4QHadron*)0); // pair of hadrons
-	 if(sqr(FragmentationMass(0,&hadrons)+MassCut)<Mass2()) return 0; //Par MassCut
-	
-	 result = new G4QHadronVector;
+  
+  G4QHadronVector* result=0;  // return 0 when string exceeds the mass cut
+ 
+  G4QHadronPair hadrons((G4QHadron*)0, (G4QHadron*)0); // pair of hadrons
+  if(sqr(FragmentationMass(0,&hadrons)+MassCut)<Mass2()) return 0; //Par MassCut
+ 
+  result = new G4QHadronVector;
         
-	 if(hadrons.second==0)                   // Second hadron exists
-	 {
-	   // Substitute string by a light hadron, Note that Energy is not conserved here! @@
-	   G4ThreeVector Mom3 = Get4Momentum().vect();
-	   G4LorentzVector Mom(Mom3, std::sqrt(Mom3.mag2() + hadrons.first->GetMass2()) );
+  if(hadrons.second==0)                   // Second hadron exists
+  {
+    // Substitute string by a light hadron, Note that Energy is not conserved here! @@
+    G4ThreeVector Mom3 = Get4Momentum().vect();
+    G4LorentzVector Mom(Mom3, std::sqrt(Mom3.mag2() + hadrons.first->GetMass2()) );
     result->push_back(new G4QHadron(hadrons.first, 0, GetPosition(), Mom));
-	 }
+  }
   else 
-	 {
-	   //... string was qq--qqbar type: Build two stable hadrons,
-	   G4LorentzVector  Mom1, Mom2;
-	   Sample4Momentum(&Mom1, hadrons.first->GetMass(), &Mom2, hadrons.second->GetMass(),
-			                                                          Get4Momentum().mag());
-	   result->push_back(new G4QHadron(hadrons.first, 0, GetPosition(), Mom1));
-	   result->push_back(new G4QHadron(hadrons.second,0, GetPosition(), Mom2));
+  {
+    //... string was qq--qqbar type: Build two stable hadrons,
+    G4LorentzVector  Mom1, Mom2;
+    Sample4Momentum(&Mom1, hadrons.first->GetMass(), &Mom2, hadrons.second->GetMass(),
+                                                             Get4Momentum().mag());
+    result->push_back(new G4QHadron(hadrons.first, 0, GetPosition(), Mom1));
+    result->push_back(new G4QHadron(hadrons.second,0, GetPosition(), Mom2));
     G4ThreeVector Velocity = Get4Momentum().boostVector();
     G4int L=result->size(); if(L) for(G4int i=0; i<L; i++) (*result)[i]->Boost(Velocity);
-	 }
-	 return result;
+  }
+  return result;
 } // End of LightFragmentationTest
 
 // Calculate Fragmentation Mass (if pdefs # 0, returns two hadrons)
-G4double G4QString::FragmentationMass(G4QHcreate build,	G4QHadronPair* pdefs)
+G4double G4QString::FragmentationMass(G4QHcreate build, G4QHadronPair* pdefs)
 {
   G4double mass;
   // Example how to use an interface to different member functions
-	 if(build==0) build=&G4QHadronBuilder::BuildLowSpin; // @@ Build S Hadrons?
+  if(build==0) build=&G4QHadronBuilder::BuildLowSpin; // @@ Build S Hadrons?
   G4QHadron* Hadron1 = 0;                            // @@ Not initialized
   G4QHadron* Hadron2 = 0;
@@ -465,16 +475,16 @@
   {
     // string is qq--qqbar: Build two stable hadrons, with extra uubar or ddbar quark pair
-	   G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;
-	   if (GetLeftParton()->GetPDGCode() < 0) iflc = -iflc;
-	   //... theSpin = 4; spin 3/2 baryons will be built
-	   Hadron1 = (hadronizer->*build)(GetLeftParton(),CreateParton(iflc));
-	   Hadron2 = (hadronizer->*build)(GetRightParton(),CreateParton(-iflc));
+    G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;
+    if (GetLeftParton()->GetPDGCode() < 0) iflc = -iflc;
+    //... theSpin = 4; spin 3/2 baryons will be built
+    Hadron1 = (hadronizer->*build)(GetLeftParton(),CreateParton(iflc));
+    Hadron2 = (hadronizer->*build)(GetRightParton(),CreateParton(-iflc));
     mass    = Hadron1->GetMass() + Hadron2->GetMass();
   }
-	 if(pdefs) // need to return hadrons as well.... 
-	 {
-	   pdefs->first  = Hadron1;
-	   pdefs->second = Hadron2;
-	 } 
+  if(pdefs) // need to return hadrons as well.... 
+  {
+    pdefs->first  = Hadron1;
+    pdefs->second = Hadron2;
+  } 
   return mass;
 } // End of FragmentationMass
@@ -527,48 +537,48 @@
 G4int G4QString::GetDecayDirection() const
 {
-	 if      (decaying == Left ) return +1;
-	 else if (decaying == Right) return -1;
-	 else
-	 {
-				G4cerr<<"***G4QString::GetDecayDirection: wrong DecayDirection="<<decaying<<G4endl;
+  if      (decaying == Left ) return +1;
+  else if (decaying == Right) return -1;
+  else
+  {
+    G4cerr<<"***G4QString::GetDecayDirection: wrong DecayDirection="<<decaying<<G4endl;
     G4Exception("G4QString::GetDecayDirection:","72",FatalException,"WrongDecayDirection");
-	 }
-	 return 0;
+  }
+  return 0;
 }
 
 G4ThreeVector G4QString::StablePt()
 {
-	 if (decaying == Left ) return Ptright;
-	 else if (decaying == Right ) return Ptleft;
-	 else
-	 {
-				G4cerr<<"***G4QString::StablePt: wrong DecayDirection="<<decaying<<G4endl;
+  if (decaying == Left ) return Ptright;
+  else if (decaying == Right ) return Ptleft;
+  else
+  {
+    G4cerr<<"***G4QString::StablePt: wrong DecayDirection="<<decaying<<G4endl;
     G4Exception("G4QString::StablePt:","72",FatalException,"WrongDecayDirection");
-	 }
-	 return G4ThreeVector();
+  }
+  return G4ThreeVector();
 }
 
 G4ThreeVector G4QString::DecayPt()
 {
-	 if      (decaying == Left  ) return Ptleft;
-	 else if (decaying == Right ) return Ptright;
-	 else
-	 {
-				G4cerr<<"***G4QString::DecayPt: wrong DecayDirection="<<decaying<<G4endl;
+  if      (decaying == Left  ) return Ptleft;
+  else if (decaying == Right ) return Ptright;
+  else
+  {
+    G4cerr<<"***G4QString::DecayPt: wrong DecayDirection="<<decaying<<G4endl;
     G4Exception("G4QString::DecayPt:","72",FatalException,"WrongDecayDirection");
-	 }
-	 return G4ThreeVector();
+  }
+  return G4ThreeVector();
 }
 
 G4double G4QString::LightConeDecay()
 {
-	 if      (decaying == Left  ) return Pplus;
-	 else if (decaying == Right ) return Pminus;
-	 else
-	 {
-				G4cerr<<"***G4QString::LightConeDecay: wrong DecayDirection="<<decaying<<G4endl;
+  if      (decaying == Left  ) return Pplus;
+  else if (decaying == Right ) return Pminus;
+  else
+  {
+    G4cerr<<"***G4QString::LightConeDecay: wrong DecayDirection="<<decaying<<G4endl;
     G4Exception("G4QString::LightConeDecay:","72",FatalException,"WrongDecayDirection");
-	 }
-	 return 0;
+  }
+  return 0;
 }
 
@@ -576,6 +586,6 @@
 {
   G4LorentzVector momentum(Ptleft+Ptright,0.5*(Pplus+Pminus));
-	 momentum.setPz(0.5*(Pplus-Pminus));
-	 return momentum;
+  momentum.setPz(0.5*(Pplus-Pminus));
+  return momentum;
 }
 
@@ -594,8 +604,8 @@
   if(HadronMomentum)
   {    
-	   G4ThreeVector   Pos(0.,0.,0.);
-	   Hadron->Set4Momentum(*HadronMomentum);
-	   UpdateString(newStringEnd, HadronMomentum);
-	   delete HadronMomentum;
+    G4ThreeVector   Pos(0.,0.,0.);
+    Hadron->Set4Momentum(*HadronMomentum);
+    UpdateString(newStringEnd, HadronMomentum);
+    delete HadronMomentum;
   }      
   return Hadron;
@@ -604,28 +614,28 @@
 void G4QString::UpdateString(G4QParton* decay, const G4LorentzVector* mom)
 {
-	 decaying=None;
-	 if(decaying == Left)
-	 {
+  decaying=None;
+  if(decaying == Left)
+  {
     G4QParton* theFirst = thePartons[0];
-				delete theFirst;
-		  theFirst = decay;
-		  Ptleft  -= mom->vect();
-		  Ptleft.setZ(0.);
-	 }
+    delete theFirst;
+    theFirst = decay;
+    Ptleft  -= mom->vect();
+    Ptleft.setZ(0.);
+  }
   else if (decaying == Right)
-	 {
+  {
     G4QParton* theLast = thePartons[thePartons.size()-1];
     delete theLast;
-		  theLast  = decay;
-		  Ptright -= mom->vect();
-		  Ptright.setZ(0.);
-	 }
+    theLast  = decay;
+    Ptright -= mom->vect();
+    Ptright.setZ(0.);
+  }
   else
-	 {
-				G4cerr<<"***G4QString::UpdateString: wrong oldDecay="<<decaying<<G4endl;
+  {
+    G4cerr<<"***G4QString::UpdateString: wrong oldDecay="<<decaying<<G4endl;
     G4Exception("G4QString::UpdateString","72",FatalException,"WrongDecayDirection");
-	 }
-	 Pplus  -= mom->e() + mom->pz();
-	 Pminus -= mom->e() - mom->pz();
+  }
+  Pplus  -= mom->e() + mom->pz();
+  Pminus -= mom->e() - mom->pz();
 } // End of UpdateString
 
@@ -641,9 +651,9 @@
   G4double DecayQuarkMass2  = sqr(GetDecayParton()->GetMass()); // Mass of quark? M.K.
   G4double HadronMass2T = HadronMass*HadronMass + HadronPt.mag2();
-  if (DecayQuarkMass2 + HadronMass2T >= SmoothParam*Mass2() )  return 0;		// restart!
+  if (DecayQuarkMass2 + HadronMass2T >= SmoothParam*Mass2() )  return 0;  // restart!
   //... then compute allowed z region  z_min <= z <= z_max 
   G4double zMin = HadronMass2T/Mass2();
   G4double zMax = 1. - DecayQuarkMass2/Mass2();
-  if (zMin >= zMax) return 0;		// have to start all over!  
+  if (zMin >= zMax) return 0;  // have to start all over!  
   G4double z=0;
   if(QL) z = GetQGSMLightConeZ(zMin, zMax, GetDecayParton()->GetPDGCode(), pHadron,
@@ -704,23 +714,23 @@
   {
     if(cClusterInterrupt++ >= ClusterLoopInterrupt) return false;
-	   G4QParton* quark = 0;
-	   string->SetLeftPartonStable(); // to query quark contents..
-	   if(string->DecayIsQuark() && string->StableIsQuark()) // There're quarks on clusterEnds
-		    LeftHadron= QuarkSplitup(string->GetLeftParton(), quark);
-	   else
-    {
-	     //... there is a Diquark on cluster ends
-		    G4int IsParticle;
-		    if(string->StableIsQuark())IsParticle=(string->GetLeftParton()->GetPDGCode()>0)?-1:1;
-		    else                       IsParticle=(string->GetLeftParton()->GetPDGCode()>0)?1:-1;
+    G4QParton* quark = 0;
+    string->SetLeftPartonStable(); // to query quark contents..
+    if(string->DecayIsQuark() && string->StableIsQuark()) // There're quarks on clusterEnds
+      LeftHadron= QuarkSplitup(string->GetLeftParton(), quark);
+    else
+    {
+      //... there is a Diquark on cluster ends
+      G4int IsParticle;
+      if(string->StableIsQuark())IsParticle=(string->GetLeftParton()->GetPDGCode()>0)?-1:1;
+      else                       IsParticle=(string->GetLeftParton()->GetPDGCode()>0)?1:-1;
       G4QPartonPair QuarkPair = CreatePartonPair(IsParticle,false);  // no diquarks wanted
       quark = QuarkPair.GetParton2();
       LeftHadron=hadronizer->Build(QuarkPair.GetParton1(), string->GetLeftParton());
-	   }
+    }
     RightHadron = hadronizer->Build(string->GetRightParton(), quark);
     //... repeat procedure, if mass of cluster is too low to produce hadrons
     //... ClusterMassCut = 0.15*GeV model parameter
-	   if ( quark->GetParticleSubType()== "quark" ) ClusterMassCut = 0.;
-	   else                                         ClusterMassCut = ClusterMass;
+    if ( quark->GetParticleSubType()== "quark" ) ClusterMassCut = 0.;
+    else                                         ClusterMassCut = ClusterMass;
   } while(ResidualMass <= LeftHadron->GetMass() + RightHadron->GetMass() + ClusterMassCut);
   //... compute hadron momenta and energies   
@@ -737,7 +747,7 @@
 } // End of SplitLast
 
-G4QHadron*	G4QString::QuarkSplitup(G4QParton*	decay, G4QParton *&created)
-{
-  G4int IsParticle=(decay->GetPDGCode()>0) ? -1 : +1; // if we have a quark, we need antiquark (or diquark)
+G4QHadron* G4QString::QuarkSplitup(G4QParton* decay, G4QParton *&created)
+{
+  G4int IsParticle=(decay->GetPDGCode()>0) ? -1 : +1; // a quark needs antiquark or diquark
   G4QPartonPair QuarkPair = CreatePartonPair(IsParticle);
   created = QuarkPair.GetParton2();
@@ -761,5 +771,5 @@
     }
     G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1; 
-	   // if we have a quark, we need antiquark)
+    // if we have a quark, we need antiquark)
     G4QPartonPair QuarkPair = CreatePartonPair(IsParticle,false);  // no diquarks wanted
     //... Build new Diquark
@@ -777,5 +787,5 @@
     //... Diquark does not break
     G4int IsParticle=(decay->GetPDGCode()>0) ? +1 : -1; 
-    	// if we have a diquark, we need quark)
+     // if we have a diquark, we need quark)
     G4QPartonPair QuarkPair = CreatePartonPair(IsParticle,false);  // no diquarks wanted
     created = QuarkPair.GetParton2();
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4Quasmon.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4Quasmon.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4Quasmon.cc	(revision 1055)
@@ -28,11 +28,32 @@
 //
 //
-// $Id: G4Quasmon.cc,v 1.107 2008/03/31 20:30:35 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4Quasmon.cc,v 1.111 2009/05/27 08:53:15 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4Quasmon ----------------
 //             by Mikhail Kossov, July 1999.
 //  class for an excited hadronic state used by the CHIPS Model
-// ------------------------------------------------------------
+// ---------------------------------------------------------------------------
+// Short description: The Quasmon is the main object of the CHIPS model, where
+// hadronic states are defined by the quark content and the 4-momentum (mass).
+// In this sense a Quasmon is a generalised hadron - hadrons are the low
+// mass discrete states of quasmons. Here the hadron can be not only an
+// elementary particle, consisting of   2 or 3 quarks, but a nucleonic
+// cluster, consisting of 6, 9, ... , 3n, ... quarks. In the CHIPS model
+// the nucleus is considered as a group of the nucleons and the nucleonic
+// clusters. In hadronic reactions a Quasmon is constructed in vacuum as
+// a result of the collision (G4QCollision process). In this case only
+// the G4Quasmon class can be used for the reaction. In nuclear reactions
+// one or a few Quasmons can be created as a result of the colision of
+// the projectile hadrons with the nucleons and the nucleonic clusters
+// of the nuclear target. In this case the Quasmons are created and
+// fragmented in the nuclear environment (G4QNucleus) and the G4QEnvironment
+// class must be used for the reaction. For nuclear-nuclear reactions
+// two G4QEnvironments are used with the common (which can fragment in both
+// nuclear environments - mostly at low energies), individual (which can
+// fragment in only one of two G4QEnvironments) and vacuum (which can
+// fragment in vacuum being too far by rapidity from both nuclei) Quasmons.
+// --------------------------------------------------------------------------
+//
 //#define debug
 //#define pdebug
@@ -287,5 +308,5 @@
   {
 #ifdef debug
-	   G4cout<<"G4Q::HQ: PionAtRest, addP="<<addPhoton<<", momP="<<momPhoton<<G4endl;
+    G4cout<<"G4Q::HQ: PionAtRest, addP="<<addPhoton<<", momP="<<momPhoton<<G4endl;
 #endif
     addPhoton=0.;
@@ -330,8 +351,8 @@
 #endif
     if(addPhoton)
-	   {
-	     G4cerr<<"***G4Quas::HQ:Q4M="<<q4Mom<<",status="<<status<<", phE="<<addPhoton<<G4endl;
+    {
+      G4cerr<<"***G4Quas::HQ:Q4M="<<q4Mom<<",status="<<status<<", phE="<<addPhoton<<G4endl;
       throw G4QException("G4Quasmon::HadronizeQuasmon: OverheadPhoton for theZeroQuasmon");
-	   }
+    }
     KillQuasmon();                         // This Quasmon is done
     qEnv=theEnvironment;                   // Update QEnvironment
@@ -386,5 +407,5 @@
     if(nHd) for(int ih=0; ih<nHd; ih++) ccSum+=theQHadrons[ih]->GetCharge();
     if(ccSum!=cSum)
-	   {
+    {
       G4cerr<<"*G4Q::HQ:C"<<cSum<<",c="<<ccSum<<",E="<<theEnvironment<<",Q="<<valQ<<G4endl;
       G4cerr<<":G4Q::HQ:oldE="<<oldEnv<<"oldQ="<<oldCQC<<",oN="<<oldNH<<",N="<<nHd<<G4endl;
@@ -405,10 +426,10 @@
     G4double tmpPq=q4Mom.rho();            // Momentum of Quasmon
     if(fabs(qM2)<.0001 || tmpEq<=tmpPq)
-	   {
+    {
       qM2=0.;
       if(!valQ.GetCharge() && !valQ.GetBaryonNumber() && !valQ.GetStrangeness())
       {
         if(fabs(qM2)<.001)
-	       {
+        {
           q4Mom.setE(tmpPq);
 #ifdef debug
@@ -420,7 +441,7 @@
           qEnv=theEnvironment;             // Update QEnvironment
           return theQHadrons;              // The last decay of the quasmon... 
-	       }
+        }
         else if(tmpPq<.001)                // @@ Unprobable...
-	       {
+        {
 #ifdef debug
           G4cout<<"G4Q::HQ:Quasmon is nothing, Q4M="<<q4Mom<<",E="<<theEnvironment<<G4endl;
@@ -429,5 +450,5 @@
           qEnv=theEnvironment;             // Update QEnvironment
           return theQHadrons;              // The last act of the quasmon... 
-	       }
+        }
       }
       else q4Mom.setE(tmpPq*1.00001);      // @@ Can break E/p conservation
@@ -438,5 +459,5 @@
     //////////G4double b2=qltb.mag2();                       // beta^2 of Quasmon
 #ifdef debug
-	   G4cout<<"G4Q::HQ: Quasm="<<q4Mom<<",qM="<<quasM<<",qQC="<<valQ<<G4endl;
+    G4cout<<"G4Q::HQ: Quasm="<<q4Mom<<",qM="<<quasM<<",qQC="<<valQ<<G4endl;
 #endif
     CalculateNumberOfQPartons(quasM);      // Fills PrivateParameter nOfQ (a#OfQPartonsInQ)
@@ -449,10 +470,10 @@
     //G4int maxActEnv=4;   // n-Dod + p-Dod  // maxEnv.(in d) to compensate the Q recoilMom
     G4int maxActEnv=256; // n-Dod + p-Dod  // maxEnv.(in d) to compensate the Q recoilMom
-    G4int dmaxActEnv=maxActEnv+maxActEnv;  // 2maxEnv.(in d) to compensate the Q recoilMom
+    G4int dmaxActEnv=maxActEnv+maxActEnv;  // 2*maxEnv.(in d) to compensate the Q recoilMom
     //G4double fAE=static_cast<double>(maxActEnv);
-	   if(envA>dmaxActEnv)
-				//if(2>3)                              // Corresponds to envA>256
-	   {
-	     //G4int oEn=static_cast<int>(fAE/sqrt(static_cast<double>(envA)));
+    if(envA>dmaxActEnv)
+    //if(2>3)                              // Corresponds to envA>256
+    {
+      //G4int oEn=static_cast<int>(fAE/sqrt(static_cast<double>(envA)));
       G4int zEn=maxActEnv;                 // Charge of the LimitActiveNuclearEnvironment
       G4int nEn=zEn;                       // Charge of the LimitActiveNuclearEnvironment
@@ -461,7 +482,7 @@
       bEn4M=G4LorentzVector(0.,0.,0.,mbEn);// 4-momentum of the LimitActiveNuclearEnviron
       bEnQC=G4QContent(bEn+nEn,bEn+zEn,0,0,0,0); // QuarkContent of the LimitActiveNuclEnv
-	   }
+    }
     else                                   // @@ Can be made STATIC CONSTANTS
-	   {
+    {
       bEn   = 256;                         // BaryoN of the LimitActiveNuclearEnvironment
       mbEn  = G4QPDGCode(2112).GetNuclMass(128,128,0); // Mass of the LimActNucEnvironment
@@ -472,5 +493,5 @@
     G4QContent envQC=theEnvironment.GetQCZNS(); // QuarkContent of theCurrentNuclearEnviron
 #ifdef debug
-	   G4cout<<"G4Q::HQ: ePDG="<<envPDG<<",eM="<<envM<<",eQC="<<envQC<<G4endl;
+    G4cout<<"G4Q::HQ: ePDG="<<envPDG<<",eM="<<envM<<",eQC="<<envQC<<G4endl;
 #endif
     G4QContent totQC=valQ+envQC;           // Total Quark Content
@@ -483,5 +504,5 @@
     G4double totM  =totN.GetMZNS();        // Minimum Mass of the Total System
 #ifdef debug
-	   G4cout<<"G4Q::HQ: tN="<<totN<<",tGSM="<<totM<<",tQC="<<totQC<<G4endl;
+    G4cout<<"G4Q::HQ: tN="<<totN<<",tGSM="<<totM<<",tQC="<<totQC<<G4endl;
 #endif
     /////////////////////G4double protCB=theEnvironment.CoulombBarrier(1.,1.);
@@ -489,10 +510,10 @@
     G4double resNM =10000000.;             // Prototype of residual mass after n separated
     if(totNeut>0)
-	   {
+    {
       G4QContent resNQC=totQC-G4QContent(2,1,0,0,0,0);
       G4QNucleus resNN(resNQC);
       resNM  = resNN.GetMZNS();
       resNPDG= resNN.GetPDG();
-	   }
+    }
     G4LorentzVector env4M =G4LorentzVector(0.,0.,0.,envM);
     G4LorentzVector tot4M =q4Mom+env4M;
@@ -500,9 +521,9 @@
     G4int    totPDG=totN.GetPDG();         // Total PDG Code for the Current compound
 #ifdef debug
-	   G4cout<<"G4Q::HQ: totPDG="<<totPDG<<",totM="<<totMass<<",rPDG="<<resNPDG<<G4endl;
+    G4cout<<"G4Q::HQ: totPDG="<<totPDG<<",totM="<<totMass<<",rPDG="<<resNPDG<<G4endl;
 #endif
     G4double totEn=tot4M.e();
-				G4double totMo=tot4M.rho();
-	   if(totEn<totMo)
+    G4double totMo=tot4M.rho();
+    if(totEn<totMo)
     {
       G4cerr<<"---Warning---G4Q::HQ: *Boost* tot4M="<<tot4M<<", E-p="<<totEn-totMo<<G4endl;
@@ -510,8 +531,8 @@
       G4double emodif=fabs(totEn-totMo);
       //if(emodif<accuracy)
-						//{
+      //{
         G4cerr<<"G4Q::HQ: *Boost* E-p shift  is corrected to "<<emodif<<G4endl;
         tot4M.setE(totMo+emodif+.01*accuracy);
-						//}
+      //}
     }
     G4ThreeVector totBoost = tot4M.boostVector(); // BoostVector for TotalSystem (backward)
@@ -524,5 +545,5 @@
     G4int    iniS   =valQ.GetL();
 #ifdef debug
-	   G4cout<<"G4Q::HQ: iniPDG="<<iniPDG<<", Z="<<iniP<<", N="<<iniN<<", S="<<iniS<<G4endl;
+    G4cout<<"G4Q::HQ: iniPDG="<<iniPDG<<", Z="<<iniP<<", N="<<iniN<<", S="<<iniS<<G4endl;
 #endif
     G4QNucleus iniRN(iniP,iniN-1,iniS);
@@ -531,5 +552,5 @@
     G4double iniQM =G4QPDGCode(iniPDG).GetMass();  // Minimum mass of Quasmon
 #ifdef debug
-	   G4cout<<"G4Q::HQ: iniRN="<<iniRN<<", iniRM="<<iniRM<<", iniQM="<<iniQM<<G4endl;
+    G4cout<<"G4Q::HQ: iniRN="<<iniRN<<", iniRM="<<iniRM<<", iniQM="<<iniQM<<G4endl;
 #endif
     /////////////////G4double iniQM2= iniQM*iniQM;
@@ -558,5 +579,5 @@
     //theEnvironment.PrepareCandidates(theQCandidates,false,false);//Calc.PrePreprob's of C
     //G4bool fF=piF||gaF;
-	   // piF,piF or gaF,gaF is correct. Made to avoid theSpecificInteractionTimeClusterChoice
+    // piF,piF or gaF,gaF is correct. Made to avoid theSpecificInteractionTimeClusterChoice
     theEnvironment.PrepareCandidates(theQCandidates,piF,piF);// Calc.PrePreprob of Candid's
     ModifyInMatterCandidates();            // Calculate InMediaMasses of Cand. & Possibil.
@@ -596,24 +617,24 @@
       kCountMax=pCountMax;
     }
-	   G4bool gintFlag=false;                // Flag of gamma interaction with one quark
-	   while(kCount<kCountMax&&kCond)
-	   {
+    G4bool gintFlag=false;                // Flag of gamma interaction with one quark
+    while(kCount<kCountMax&&kCond)
+    {
       kCond=true;
       G4double miM2=0.;
       if(envPDG==NUCPDG)
-	     {
+      {
         if(excE>mPi0) miM2=mPi02;
         else          miM2=mP2;
-	     }
+      }
       else                                // "Env. exists" case - find k_min & k_max
-	     {
+      {
         minK=100000.;
         // @@ ??? May be for the light nuclei ???
         //if(piF&&quasM>iniQM) maxK=mNeut/2.+(quasM-iniQM)*iniQM/(iniQM+mNeut);
         //else if(quasM>iniQM)
-		      //{
+        //{
         //  G4double limK=envM/2.+(quasM-iniQM)*iniQM/(iniQM+envM);
         //  if(limK<maxK) maxK=limK;
-		      //}
+        //}
         //@@*acceleration*: check only for P,N,d,& alpfa, can be done for all clusters(?)
         //if(iniN>0&&iniBN>1)               // "Neutron-hadron" estimate
@@ -634,5 +655,5 @@
         //    G4double dkts=kts+kts;
         //    G4double fu=dkts*(dkts*quasM-sm2)+quasM*m2N;
-	       //    G4cout<<"G4Q::HQ:M="<<quasM<<",R="<<bnRQ<<",f("<<kts<<")="<<fu<<"<0"<<G4endl;
+        //    G4cout<<"G4Q::HQ:M="<<quasM<<",R="<<bnRQ<<",f("<<kts<<")="<<fu<<"<0"<<G4endl;
 #endif
         //    if(quasM>=mNeut+bnRQ)
@@ -653,12 +674,12 @@
         if(totN>0&&totBN>1)               // "Neutron-cluster" estimate
         {
-		        G4QNucleus tmpNN(totZ,totN-1,0);
+          G4QNucleus tmpNN(totZ,totN-1,0);
           G4double delN=tmpNN.GetMZNS()+mNeut-totM;
           if(envN>0&&envA>1)
           {
-			         G4QNucleus envNN(envZ,envN-1,0);
+            G4QNucleus envNN(envZ,envN-1,0);
             G4double delEN=envNN.GetMZNS()+mNeut-envM;
             if(delEN>delN) delN=delEN;
-		        }
+          }
           delN*=qurF;
           if(delN<minK) minK=delN;
@@ -667,12 +688,12 @@
         {
           G4double proCB=theEnvironment.CoulombBarrier(1,1);
-		        G4QNucleus tmpPN(totZ-1,totN,0);
+          G4QNucleus tmpPN(totZ-1,totN,0);
           G4double delP=tmpPN.GetMZNS()+mProt-totM+proCB;
           if(envZ>0&&envA>1)
           {
-			         G4QNucleus envPN(envZ-1,envN,0);
+            G4QNucleus envPN(envZ-1,envN,0);
             G4double delEP=envPN.GetMZNS()+mProt-envM+proCB;
             if(delEP>delP) delP=delEP;
-		        }
+          }
           delP*=qurF;
           if(delP<minK) minK=delP;
@@ -681,12 +702,12 @@
         {
           G4double proCB=theEnvironment.CoulombBarrier(1,2);
-		        G4QNucleus tmpDN(totZ-1,totN-1,0);
+          G4QNucleus tmpDN(totZ-1,totN-1,0);
           G4double delD=tmpDN.GetMZNS()+mDeut-totM+proCB;
           if(envN>0&&envZ>0&&envA>2)
           {
-		          G4QNucleus envDN(envZ-1,envN-1,0);
+            G4QNucleus envDN(envZ-1,envN-1,0);
             G4double delED=envDN.GetMZNS()+mDeut-envM+proCB;
             if(delED>delD) delD=delED;
-		        }
+          }
           delD*=qurF;
           if(delD<minK) minK=delD;
@@ -695,12 +716,12 @@
         {
           G4double proCB=theEnvironment.CoulombBarrier(1,3);
-		        G4QNucleus tmpTN(totZ-1,totN-2,0);
+          G4QNucleus tmpTN(totZ-1,totN-2,0);
           G4double delT=tmpTN.GetMZNS()+mTrit-totM+proCB;
           if(envN>1&&envZ>0&&envA>3)
           {
-		          G4QNucleus envTN(envZ-1,envN-2,0);
+            G4QNucleus envTN(envZ-1,envN-2,0);
             G4double delET=envTN.GetMZNS()+mTrit-envM+proCB;
             if(delET>delT) delT=delET;
-		        }
+          }
           delT*=qurF;
           if(delT<minK) minK=delT;
@@ -709,12 +730,12 @@
         {
           G4double proCB=theEnvironment.CoulombBarrier(2,3);
-		        G4QNucleus tmpRN(totZ-2,totN-1,0);
+          G4QNucleus tmpRN(totZ-2,totN-1,0);
           G4double delR=tmpRN.GetMZNS()+mHel3-totM+proCB;
           if(envN>0&&envZ>1&&envA>3)
           {
-		          G4QNucleus envRN(envZ-2,envN-1,0);
+            G4QNucleus envRN(envZ-2,envN-1,0);
             G4double delER=envRN.GetMZNS()+mHel3-envM+proCB;
             if(delER>delR) delR=delER;
-		        }
+          }
           delR*=qurF;
           if(delR<minK) minK=delR;
@@ -723,12 +744,12 @@
         {
           G4double proCB=theEnvironment.CoulombBarrier(2,4);
-		        G4QNucleus tmpAN(totZ-2,totN-2,0);
+          G4QNucleus tmpAN(totZ-2,totN-2,0);
           G4double delA=tmpAN.GetMZNS()+mAlph-totM+proCB;
           if(envN>1&&envZ>1&&envA>4)
           {
-		          G4QNucleus envAN(envZ-2,envN-2,0);
+            G4QNucleus envAN(envZ-2,envN-2,0);
             G4double delEA=envAN.GetMZNS()+mAlph-envM+proCB;
             if(delEA>delA) delA=delEA;
-		        }
+          }
           delA*=qurF;
           if(delA*qurF<minK) minK=delA*qurF;
@@ -738,34 +759,34 @@
         //{
         //  G4double proCB=theEnvironment.CoulombBarrier(3,6);
-		      //  G4QNucleus tmpLN(totZ-3,totN-3,0);
+        //  G4QNucleus tmpLN(totZ-3,totN-3,0);
         //  G4double delL=tmpLN.GetMZNS()+mLit6-totM+proCB;
         //  if(envN>2&&envZ>2&&envA>6)
         //  {
-		      //    G4QNucleus envLN(envZ-3,envN-3,0);
+        //    G4QNucleus envLN(envZ-3,envN-3,0);
         //    G4double delEL=envLN.GetMZNS()+mLit6-envM+proCB;
         //    if(delEL>delL) delL=delEL;
-		      //  }
+        //  }
         //  delL*=qurF;
         //  if(delL<minK) minK=delL;
         //}
         if(minK<0.||minK+minK>quasM) minK=0.;
-	     }
+      }
       //if(addPhoton>0.&&quasM<1500.&&G4UniformRand()<f2all)
-	     //if(addPhoton>0.&&iniBN<2)// PhotonAbsorbDiagramContrib(@@HiddenPar)
-	     //if(addPhoton>0.&&(G4UniformRand()<.7||iniBN<2))//PhotoAbsorbDiagramContrib
-	     //if(addPhoton>0.&&(G4UniformRand()<.5||iniBN<2))//PhotonAbsorbDiagramContrib
+      //if(addPhoton>0.&&iniBN<2)// PhotonAbsorbDiagramContrib(@@HiddenPar)
+      //if(addPhoton>0.&&(G4UniformRand()<.7||iniBN<2))//PhotoAbsorbDiagramContrib
+      //if(addPhoton>0.&&(G4UniformRand()<.5||iniBN<2))//PhotonAbsorbDiagramContrib
       //if(addPhoton>0.&&(G4UniformRand()<.27||iniBN<2))// PhotonAbsorbDiagramContrib
-	     //if(addPhoton>0.&&iniBN<2)// PhotonAbsorbDiagramContrib(@@HiddenPar)
-	     //if(addPhoton>0.&&iniBN>1)// PhotonAbsorbDiagramContrib(@@HiddenPar)
-	     //if(addPhoton>0.&&G4UniformRand()<0.5)// PhotonAbsorbDiagramContrib(@@HiddenPar)
-	     //if(addPhoton>0.&&G4UniformRand()<0.75)// PhotonAbsorbDiagramContrib(@@HiddenPar)
-	     ///if(addPhoton>0.&&G4UniformRand()<0.8)// PhotonAbsorbDiagramContrib(@@HiddenPar)
-	     //if(addPhoton>0.&&iniBN>1)//PhotonAbsorbDiagramContrib(Photon's captured by N quark)
-	     if(addPhoton>0.)// PhotonAbsorbDiagramContrib(Photon is always captured by quarks)
-	     //if(2>3)                              // Photon capture by quark is closed
+      //if(addPhoton>0.&&iniBN<2)// PhotonAbsorbDiagramContrib(@@HiddenPar)
+      //if(addPhoton>0.&&iniBN>1)// PhotonAbsorbDiagramContrib(@@HiddenPar)
+      //if(addPhoton>0.&&G4UniformRand()<0.5)// PhotonAbsorbDiagramContrib(@@HiddenPar)
+      //if(addPhoton>0.&&G4UniformRand()<0.75)// PhotonAbsorbDiagramContrib(@@HiddenPar)
+      ///if(addPhoton>0.&&G4UniformRand()<0.8)// PhotonAbsorbDiagramContrib(@@HiddenPar)
+      //if(addPhoton>0.&&iniBN>1)//PhotonAbsorbDiagramContrib(Photon's captured by N quark)
+      if(addPhoton>0.)// PhotonAbsorbDiagramContrib(Photon is always captured by quarks)
+      //if(2>3)                              // Photon capture by quark is closed
       {
         //nOfQ=valQ.GetQ()-valQ.GetAQ();     // Recover nOfQ for the not excited cluster
         // @@ 1/(p_g,p_q) interaction probability (? (p_g,p_q)=0 always)
-	       gintFlag=true;
+        gintFlag=true;
         q4Mom-= phot4M;                    // recover Quasmon-Cluster without the Photon
         qM2   = q4Mom.m2();                // Update the Current squared mass of Quasmon 
@@ -779,8 +800,8 @@
         //G4int cMax=27;//For m_gam=0:*[k/(k+p) factor 1/s{m<<k,s=m^2*(1+p/k)}]*[p/k(ct=0)]
         //G4int pCount=0;//For m_gam=0 the suppression factor can be p*p/(p+k)/(p+k) @@ (?)
-		      //while (frat && pCount<cMax)
+        //while (frat && pCount<cMax)
         //{
-		      // ____ Keep this when closing while______________________________
-		      G4double rn=G4UniformRand(); // k is changed by addPhoton
+        // ____ Keep this when closing while______________________________
+        G4double rn=G4UniformRand(); // k is changed by addPhoton
         kMom=(1.-(1.-xmi)*pow(rn,1./kpow))*quasM/2; // 1/k from delta-funct integration
         // ----------
@@ -788,20 +809,20 @@
         G4double dkM=kMom+kMom;
         // p2+k2+2pkcost=(k+e)2
-	       //cost=(addPhoton*addPhoton-momPhoton*momPhoton+addPhoton*dkM)/momPhoton/dkM;
+        //cost=(addPhoton*addPhoton-momPhoton*momPhoton+addPhoton*dkM)/momPhoton/dkM;
         G4double cor=200./dkM/addPhoton;
         G4double bas=std::log(2+cor);
-	       cost=1.-std::exp(bas-(bas-std::log(cor))*G4UniformRand());
-	       //cost=1.-2*G4UniformRand();
-		      // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-		      //  frat=G4UniformRand()>kMom/(addPhoton+kMom);
-		      //  //frat=G4UniformRand()>kMom*kMom/(addPhoton+kMom)/(addPhoton+kMom);
+        cost=1.-std::exp(bas-(bas-std::log(cor))*G4UniformRand());
+        //cost=1.-2*G4UniformRand();
+        // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+        //  frat=G4UniformRand()>kMom/(addPhoton+kMom);
+        //  //frat=G4UniformRand()>kMom*kMom/(addPhoton+kMom)/(addPhoton+kMom);
         //  //frat=G4UniformRand()>addPhoton/(addPhoton+kMom);
         //  //frat=G4UniformRand()>addPhoton*addPhoton/(addPhoton+kMom)/(addPhoton+kMom);
         //  pCount++;
-		      //}
+        //}
         if(cost>1.) cost=1.;
         if(cost<-1.) cost=-1.;
 #ifdef debug
-	       G4cout<<"G4Q::HQ:**PHOTON out of Q**k="<<kMom<<",ct="<<cost<<",QM="<<quasM<<G4endl;
+        G4cout<<"G4Q::HQ:**PHOTON out of Q**k="<<kMom<<",ct="<<cost<<",QM="<<quasM<<G4endl;
 #endif
         // @@ (?) Pseudo Fermi-mom correction (use lib function for the 3d randomization -*
@@ -834,9 +855,9 @@
         //cost-=dc;                                  // for virtPhotons smear in both dir.|
         // --- Quark mass correction ends here (?) ---------------------------------------*
-	     }
+      }
       else
-	     {
-		      gaF=false;                         // GammaFirstAct flag is only for the gamma-q
-	       gintFlag=false;
+      {
+        gaF=false;                         // GammaFirstAct flag is only for the gamma-q
+        gintFlag=false;
         // ==== Probabiliti proportional to k (without 1/k factor of hadronization)
         if(!miM2) miM2=(minK+minK)*quasM; // Make minimum mass for randomization
@@ -846,5 +867,5 @@
         //G4double kpow=static_cast<double>(nOfQ-2);
         //G4double kst=0.;
-		      //if(maxK+maxK<quasM+.1) kst=pow((1.-(maxK+maxK)/quasM),kpow);
+        //if(maxK+maxK<quasM+.1) kst=pow((1.-(maxK+maxK)/quasM),kpow);
         //if(maxK>minK)
         //{
@@ -856,16 +877,16 @@
         G4double rnc=G4UniformRand();
         cost = 1.-rnc-rnc;
-	     }
+      }
       G4double cQM2=qM2-(kMom+kMom)*quasM;
       if(cQM2<0.)
-	     {
+      {
         //if(cQM2<-.0001)G4cerr<<"--Warning--G4Q::HQ:(PhBack) cQM2="<<cQM2<<" < 0"<<G4endl;
         cQM2=0.;
-	     }
+      }
       G4double cQM=sqrt(cQM2);             // Mass of the coloured residual Quasmom
       k4Mom=zeroLV;
       cr4Mom=G4LorentzVector(0.,0.,0.,cQM);
       G4LorentzVector dir4M=q4Mom-G4LorentzVector(0.,0.,0.,q4Mom.e()*.01);
-	     if(!G4QHadron(q4Mom).RelDecayIn2(k4Mom,cr4Mom,dir4M,cost,cost)) //Q->ColResQ+k_part
+      if(!G4QHadron(q4Mom).RelDecayIn2(k4Mom,cr4Mom,dir4M,cost,cost)) //Q->ColResQ+k_part
       {
 #ifdef debug
@@ -884,5 +905,5 @@
           }
           gintFlag=false; 
-		      }
+        }
       }
       else                                  // ***> The decay succeeded
@@ -896,7 +917,7 @@
           kMom=k4Mom.e();                   // Update the k_parton momentum
           gintFlag=false; 
-		      }
-#ifdef debug
-	       G4cout<<"G4Q::HQ:(PhBack) k="<<kMom<<",k4M="<<k4Mom<<",ct="<<cost<<",gF="<<gintFlag
+        }
+#ifdef debug
+        G4cout<<"G4Q::HQ:(PhBack) k="<<kMom<<",k4M="<<k4Mom<<",ct="<<cost<<",gF="<<gintFlag
               <<G4endl;
 #endif
@@ -907,5 +928,5 @@
         G4int totCand = theQCandidates.size(); // Total number of candidates
 #ifdef sdebug
-	       G4cout<<"G4Q::HQ: ***>>>K-ITERATION #"<<kCount<<", k="<<kMom<<k4Mom<<G4endl;
+        G4cout<<"G4Q::HQ: ***>>>K-ITERATION #"<<kCount<<", k="<<kMom<<k4Mom<<G4endl;
 #endif
         for (G4int index=0; index<totCand; index++)
@@ -917,8 +938,8 @@
             G4bool poss= curCand->GetPossibility();
 #ifdef debug
-		          if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)
-	             G4cout<<"G4Q::HQ:pos="<<poss<<",cPDG="<<cPDG<<",iQC="<<iniQChg<<G4endl;
-#endif
-		          if(poss)
+            if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)
+              G4cout<<"G4Q::HQ:pos="<<poss<<",cPDG="<<cPDG<<",iQC="<<iniQChg<<G4endl;
+#endif
+            if(poss)
             {
               G4double   cMs=curCand->GetEBMass(); // EnvBound mass of the ParentCluster(?)
@@ -931,6 +952,6 @@
               //////////////////G4double pmk  = rMo*cMs/kLS;
 #ifdef debug
-		            if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)
-			             G4cout<<"G4Q::HQ:cfM="<<cfM<<",cMs="<<cMs<<",ind="<<index<<G4endl;
+              if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)
+                G4cout<<"G4Q::HQ:cfM="<<cfM<<",cMs="<<cMs<<",ind="<<index<<G4endl;
 #endif
               G4double k = kMom;
@@ -946,23 +967,23 @@
               //if (dR<0.) dR=0.;
               G4double dR=0.;               // @@ Temporary no q-acceleration cut is used
-     		       if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)
-	              G4cout<<"G4Q::HQ:i="<<index<<",cPDG="<<cPDG<<",k="<<kMom<<","<<kLS<<">kMin="
+              if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)
+               G4cout<<"G4Q::HQ:i="<<index<<",cPDG="<<cPDG<<",k="<<kMom<<","<<kLS<<">kMin="
                      <<kMin<<",bM="<<bnM<<",rEP="<<rEP<<",dR="<<dR<<",kCo="<<kCond<<G4endl;
 #endif
               if(kLS>kMin)
-			           {
+              {
                 kCond=false;
                 break;
               }
-		          }
-		        }
-	       }
-	     }
+            }
+          }
+        }
+      }
       kCount++;
-	   }
+    }
     // End of search for "k": *** Here we forget about the initial photon forever ***???***
 #ifdef debug
     if(addPhoton)
-	     G4cout<<"G4Q::HQ:***PHOTON OK***k="<<k4Mom<<",Q="<<q4Mom<<",PhE="<<addPhoton<<G4endl;
+      G4cout<<"G4Q::HQ:***PHOTON OK***k="<<k4Mom<<",Q="<<q4Mom<<",PhE="<<addPhoton<<G4endl;
 #endif
     //if(gintFlag)kLS-=addPhoton;           // @@ correct for the virtual (?) -*
@@ -990,5 +1011,5 @@
     {
 #ifdef debug
-	     if(status==4)throw G4QException("G4Q::HQ:*TMP EXCEPTION - NoChanalsOfFragmentation");
+      if(status==4)throw G4QException("G4Q::HQ:*TMP EXCEPTION - NoChanalsOfFragmentation");
 #endif
 #ifdef debug
@@ -1007,6 +1028,6 @@
       // @@ practically never is here
       if(!first&&excE>qCB&&envM+iniQM<totMass&&nQuasms==1&&qenv&&G4UniformRand()<pCB)
-	     //if(2>3)                               // Decay in GSQuasmon+GSEnviron **Is closed**
-	     {
+      //if(2>3)                               // Decay in GSQuasmon+GSEnviron **Is closed**
+      {
         G4QHadron* resNuc = new G4QHadron(valQ,q4Mom);// Createa Hadron for Quasmon
         resNuc->CorMDecayIn2(iniQM,env4M);  // Recalculate the fr4Mom for ResidualGSMass
@@ -1023,5 +1044,5 @@
           FillHadronVector(envH);           // Fill Moving Environment (delete equivalent)
           qEnv = vacuum;
-		      }
+        }
 #ifdef debug
         G4double eM=env4M.m();
@@ -1031,7 +1052,7 @@
         ClearQuasmon();                     // This Quasmon is done
         return theQHadrons;                 // The last decay of the quasmon...
-	     }
+      }
       else                                  // May be evaporation is possible
-	     {
+      {
 #ifdef debug
         G4cout<<"G4Q::HQ:Q2E:E="<<theEnvironment<<",valQ="<<valQ<<",tot4M="<<tot4M<<G4endl;
@@ -1040,6 +1061,6 @@
         if(CheckGroundState(true)) ClearQuasmon(); // This Quasmon is done
         //if(CheckGroundState(true)) KillQuasmon(); // This Quasmon is done
-		      //else if(envPDG==NUCPDG && quasM>iniQM && iniBN>1) // Convert Quasmon to MovingEnv
-		      //{
+        //else if(envPDG==NUCPDG && quasM>iniQM && iniBN>1) // Convert Quasmon to MovingEnv
+        //{
 #ifdef debug
         //  G4cerr<<"***G4Q::HQ:Q2E="<<theEnvironment<<",QC="<<valQ<<",4M="<<tot4M<<G4endl;
@@ -1047,7 +1068,7 @@
         //  theEnvironment=G4QNucleus(valQ,tot4M);
         //  KillQuasmon();
-		      //}
-		      else if(envPDG==NUCPDG && quasM>iniQM) // Emergency decay in Gamma & GSQuasmon
-		      {
+        //}
+        else if(envPDG==NUCPDG && quasM>iniQM) // Emergency decay in Gamma & GSQuasmon
+        {
 #ifdef debug
           G4cout<<"***G4Q::HQ: Emergency Decay in Gamma/Pi0 + Residual GSQuasmon"<<G4endl;
@@ -1057,13 +1078,13 @@
           G4double gamM=0.;
           if(quasM>mPi0+iniQM)
-		        {
+          {
             gamPDG=111;
             gamM=mPi0;
-		        }
+          }
           G4LorentzVector r4Mom(0.,0.,0.,gamM);  // mass of the photon/Pi0
           G4LorentzVector s4Mom(0.,0.,0.,iniQM); // mass of the GSQuasmon
           G4double sum=gamM+iniQM;
           if(sum>0. && fabs(quasM-sum)<eps)
-		        {
+          {
              r4Mom=q4Mom*(gamM/sum);
              s4Mom=q4Mom*(iniQM/sum);
@@ -1072,9 +1093,9 @@
           {
             G4cerr<<"***G4Q::HQ:Q="<<q4Mom<<quasM<<"->g/pi0(M="<<gamM<<")+GSQ="<<iniPDG
-				              <<"(M="<<iniQM<<")="<<sum<<", d="<<sum-quasM<<G4endl;
-    	       throw G4QException("G4Quasmon::HadronizeQ:(E=0)G/Pi0+GSQ decay error");
-          }
-#ifdef debug
-	         G4cout<<"G4Q::HQ:=== 0 ===>HadrVec, Q="<<q4Mom<<quasM<<"->g/pi0("<<gamPDG<<")="
+                  <<"(M="<<iniQM<<")="<<sum<<", d="<<sum-quasM<<G4endl;
+            throw G4QException("G4Quasmon::HadronizeQ:(E=0)G/Pi0+GSQ decay error");
+          }
+#ifdef debug
+          G4cout<<"G4Q::HQ:=== 0 ===>HadrVec, Q="<<q4Mom<<quasM<<"->g/pi0("<<gamPDG<<")="
                 <<r4Mom<<gamM<<"+GSQ="<<iniPDG<<r4Mom<<iniQM<<G4endl;
 #endif
@@ -1084,12 +1105,12 @@
           FillHadronVector(curHadr1);       // Fill "new curHadr1" (delete equivalent)
           ClearQuasmon();                   // This Quasmon is done
-		      }
-#ifdef pdebug
-	       G4cout<<"***G4Q::HQ:dE="<<excE<<">minK="<<minK<<",Env="<<theEnvironment<<",k="<<kLS
+        }
+#ifdef pdebug
+        G4cout<<"***G4Q::HQ:dE="<<excE<<">minK="<<minK<<",Env="<<theEnvironment<<",k="<<kLS
               <<",Q="<<valQ<<quasM<<", nQ="<<nQuasms<<G4endl;
 #endif
         qEnv=theEnvironment;
         return theQHadrons;
-	     }
+      }
     }
     G4bool nucflag=false;                   // NuclearBinding Flag (can't reduce Environ)
@@ -1145,8 +1166,8 @@
         G4cerr<<"***G4Q::HQ: Cand#"<<i<<" >= Tot#"<<nCandid<<G4endl;
         throw G4QException("G4Quasmon::HadronizeQuasmon: Too big number of the candidate");
-	     }
+      }
       curQ = valQ;                            // Temporary copy of valQ to estimate MinM2
-						if (!fprob)  // At present is closed    // Prepare final decay (nothing was selected)
-	     {
+      if (!fprob)  // At present is closed    // Prepare final decay (nothing was selected)
+      {
         memQ=curQ;                            // Remembe QC for the case of 2H decay
         sPDG=curQ.GetSPDGCode();              // PDG of current Quasmon as S-hadron
@@ -1161,10 +1182,10 @@
         }
         else if(!sPDG)
-	       {
+        {
           G4cerr<<"**G4Q::HQ:sPDG=0,E="<<theEnvironment<<",B="<<totBN<<",S="<<totS<<G4endl;
           throw G4QException("G4Quasmon::HadronizeQuasmon:DecayPartSelection,Evaporation");
-	       }
+        }
         else if(sPDG==10)                     // ---> "Chipolino" case
-	       {
+        {
           fchipo=true;
           G4QChipolino chipQ(valQ);
@@ -1176,7 +1197,7 @@
           rMass= QPDG2.GetMass();
           if(sMass+rMass>quasM)               //@@ Evaporate but try 3Pt decay with Environ
-		        {
-		          if(totBN>1&&totMass>totM&&totS>=0)
-		          {
+          {
+            if(totBN>1&&totMass>totM&&totS>=0)
+            {
 #ifdef ppdebug
               G4cout<<"G4Q::HQ:NEED-EVAP-2:Q="<<q4Mom<<valQ<<",E="<<theEnvironment<<G4endl;
@@ -1185,12 +1206,12 @@
               qEnv=theEnvironment;
               return theQHadrons;
-		          }
+            }
             else
-		          {
+            {
               G4cerr<<"***G4Q::HQ:QM="<<quasM<<"<S="<<sMass<<"+R="<<rMass<<"="<<sMass+rMass
                     <<",tB="<<totBN<<",tS="<<totS<<",tM="<<totMass<<">minM="<<totM<<G4endl;
               throw G4QException("G4Quasmon::HadronizeQuasmon:VirtChipo Can'tEvapNucleus");
-		          }
-		        }
+            }
+          }
         }
         else if(nQuasms>1)
@@ -1208,5 +1229,5 @@
           rPDG=envPDG;
           if (rPDG>MINPDG&&rPDG!=NUCPDG)
-	         {
+          {
             rMass=theEnvironment.GetMZNS();
             q4Mom+=G4LorentzVector(0.,0.,0.,rMass);
@@ -1215,7 +1236,7 @@
             KillEnvironment();
             fred=true;                        // Flag of environment reduction
-	         }
+          }
           else if(rPDG!=NUCPDG&&totBN>1&&totMass>totM&&totS>=0)  // ===> "Evaporation" case
-	         {
+          {
 #ifdef ppdebug
             G4QContent nTotQC=totQC-neutQC;
@@ -1233,5 +1254,5 @@
             qEnv=theEnvironment;
             return theQHadrons;
-	         }
+          }
           else if(rPDG==NUCPDG)
           {
@@ -1243,10 +1264,10 @@
               rMass=mPi0;                     // Safety decay in pi0
               rPDG=111;
-		          }
+            }
             else
             {
               rMass=0.;                       // Safety decay in gamma
               rPDG=22;
-		          }
+            }
           }
         }
@@ -1255,7 +1276,7 @@
         G4cout<<"G4Q::HQ:hsflagTRUE,s="<<sPDG<<","<<sMass<<",r="<<rPDG<<","<<rMass<<G4endl;
 #endif
-	     }
+      }
       else                                    // ---> "Something was selected" case
-	     {
+      {
         G4QCandidate* curCand = theQCandidates[i];// Pointer toSelectedCandidate:hadr/fragm
         sPDG  = curCand->GetPDGCode();        // PDG of the selected candidate 
@@ -1266,5 +1287,5 @@
         //@@ For clusters use another randomization & a loop over possible parent clusters
         if(sPDG>MINPDG&&sPDG!=NUCPDG)         // ===> "Fragment" case
-	       {
+        {
           G4int ip=0;
           G4int nParCandid = curCand->GetPClustEntries();
@@ -1278,7 +1299,7 @@
             G4cerr<<G4endl;
             throw G4QException("G4Quasmon::HadronizeQuasmon:NoParentClust forTheFragment");
-	         }
+          }
           else                                // ---> "Parent cluster was found" case
-	         {
+          {
             G4double totPP = sppm * G4UniformRand();
             while(curCand->TakeParClust(ip)->GetProbability() < totPP) ip++;
@@ -1286,23 +1307,23 @@
             G4cout<<"G4Q::HQ:p#ip="<<ip<<",f#i="<<i<<",tP="<<totPP<<",sP="<<sppm<<G4endl;
 #endif
-	         }
+          }
           G4QParentCluster* parCluster=curCand->TakeParClust(ip);
           pPDG  = parCluster->GetPDGCode();
-	         G4QPDGCode pQPDG(pPDG);
+          G4QPDGCode pQPDG(pPDG);
           pQC   = pQPDG.GetQuarkContent();
           pBaryn= pQC.GetBaryonNumber();
-	         pMass = parCluster->GetEBMass();    // Environment Bounded Mass
-	         pNMass = parCluster->GetNBMass();   // NuclBoundedMass @@Env.Reduce dosn't work
-	         transQC = parCluster->GetTransQC();
-	         delta = parCluster->GetEBind();     // Environmental Binding
-	         deltaN = parCluster->GetNBind();    // Nuclear Binding
-	         loli  = parCluster->GetLow();
-	         hili  = parCluster->GetHigh();
+          pMass = parCluster->GetEBMass();    // Environment Bounded Mass
+          pNMass = parCluster->GetNBMass();   // NuclBoundedMass @@Env.Reduce dosn't work
+          transQC = parCluster->GetTransQC();
+          delta = parCluster->GetEBind();     // Environmental Binding
+          deltaN = parCluster->GetNBind();    // Nuclear Binding
+          loli  = parCluster->GetLow();
+          hili  = parCluster->GetHigh();
           //G4double dhil=.0001*(hili-loli);    // Safety factor
           //loli += dhil;
           //hili -= dhil;
-	         npqp2 = parCluster->GetNQPart2();
+          npqp2 = parCluster->GetNQPart2();
           // @@ One can get otherUsefulParameters of the parent cluster for hadronization
-	         G4QPDGCode sQPDG(curCand->GetPDGCode());
+          G4QPDGCode sQPDG(curCand->GetPDGCode());
           sQC   = sQPDG.GetQuarkContent();
           //if(sPDG==90001001 && G4UniformRand()>0.75) sMass=np; //@@ n-p pair
@@ -1315,5 +1336,5 @@
                 <<") = curQ="<<curQ<<",InvBinding="<<delta<<",pM="<<pMass<<pQC<<G4endl;
 #endif
-	       }
+        }
         else                                  // ===> "Hadron" case
         {
@@ -1327,5 +1348,5 @@
                 <<",C="<<theQCandidates[i]->GetPDGCode()<<",Q="<<curQ<<",M2="<<sM2<<G4endl;
 #endif
-	       }
+        }
         G4QContent resNQC=totQC-sQC;          // Quark Content of the totNucleus-Fragment
         G4QNucleus resTN(resNQC);   
@@ -1345,5 +1366,5 @@
         {
           // *** LIM ***
-		        G4QContent RNQC=curQ+envQC;
+          G4QContent RNQC=curQ+envQC;
           if(sPDG>MINPDG&&sPDG!=NUCPDG) RNQC-=pQC; // ==> "Nuclear Fragment Radiation" case
           if(envA-pBaryn>bEn) RNQC=curQ+bEnQC; // Leave the minimum environment
@@ -1351,12 +1372,12 @@
           if(RNPDG==10) minSqN=G4QChipolino(RNQC).GetMass2();// MinSqM of DiHadron of Chipo
           else if(!RNPDG) // It never should happen as curQ is real and env/bEn QC is > 0
-	         {
-				  						//#ifdef debug
+          {
+            //#ifdef debug
             G4cout<<"**G4Q::HQ:*KinematicTotal*, PDG="<<RNPDG<<curQ<<", QC="<<RNQC<<G4endl;
-										  //#endif
+            //#endif
             minSqN=1000000.;
-	         }
+          }
           else
-		        {
+          {
             G4double minN=G4QPDGCode(RNPDG).GetMass();
             minSqN=minN*minN;                 // SquaredGSMass of ResidQuasmon+ResidEnviron
@@ -1365,7 +1386,7 @@
 #endif
           }
-	       }
+        }
         else
-						  {
+        {
 #ifdef debug
           G4cout<<"*G4Q::HQ:EnvironmentA="<<envA<<" < SecondaryFragmentA="<<pBaryn<<G4endl;
@@ -1400,75 +1421,77 @@
             G4double qpeM=G4QNucleus(envZ+rqZ,envN+rqN,envS+rqS).GetGSMass();
 #ifdef debug
-										  G4cout<<"G4Q::HadQ:Z="<<rqZ<<",N="<<rqN<<",S="<<rqS<<",eZ="<<envZ<<",eN="<<envN
+            G4cout<<"G4Q::HadQ:Z="<<rqZ<<",N="<<rqN<<",S="<<rqS<<",eZ="<<envZ<<",eN="<<envN
                   <<",eS="<<envS<<",ePDG="<<envPDG<<",eM="<<envM<<",tM="<<qpeM<<G4endl;
 #endif
             minT=qpeM-envM;
           }
-          minSqT=minT*minT;      // Squared minimum mass of residual quasmon
+          minSqT=minT*minT;               // Squared minimum mass of residual quasmon
 #ifdef debug
           G4cout<<"G4Q::HQ:rPDG="<<rqPDG<<curQ<<",minT="<<minT<<",minSqT="<<minSqT
                 <<",hsfl="<<hsflag<<G4endl;
 #endif
-          G4double newT=0.;    // Prototype of minimal TotBoundQuasmon mass
+          G4double newT=0.;               // Prototype of minimal TotBoundQuasmon mass
           // (Hadron with environment 
-	  // (see above?) || QEX) && (Q==nucFrag || Q==n,p,Lambda)
+          // (see above?) || QEX) && (Q==nucFrag || Q==n,p,Lambda)
 
           if ( ( (sPDG < MINPDG && envPDG > MINPDG && envPDG != NUCPDG) || 
-		 (sPDG > MINPDG && sPDG != NUCPDG && envPDG > pPDG) )
-           && 
-	       ( (rqPDG > MINPDG && rqPDG != NUCPDG) || 
-                  rqPDG==2112 || 
-                  rqPDG==2212 || 
-		  rqPDG==3122) )
-          {
-            if(sPDG<MINPDG) {     // The radiatedBaryon is aVaquum(QF) particle
+                 (sPDG > MINPDG && sPDG != NUCPDG && envPDG > pPDG)
+               ) && ( (rqPDG > MINPDG && rqPDG != NUCPDG) || 
+                      rqPDG==2112 || rqPDG==2212 || rqPDG==3122
+                    )
+             )
+          {
+            if(sPDG<MINPDG)               // The radiatedBaryon is aVaquum(QF) particle
+            {
               // *** LIM ***
-              G4QContent rtQC=curQ;    // Total Residual Quasmon Quark Content
-              if (envA > bEn) {        // Nucl Env > than A_max
-	  	reM=mbEn;
+              G4QContent rtQC=curQ;       // Total Residual Quasmon Quark Content
+              if (envA > bEn)             // Nucl Env > than A_max
+              {
+                reM=mbEn;
                 rtQC+=bEnQC;
-	      } else {
-                reM=envM;              // MinMassOfResidEnviron = MassOfEnviron
+              }
+              else
+              {
+                reM=envM;                 // MinMassOfResidEnviron = MassOfEnviron
                 rtQC+=envQC;              // Nucl Env is below A_max=bEn
-	      }
+              }
               G4QNucleus rtN(rtQC);       // Create a pseudo-nucleus for E+Q
               rtM=rtN.GetMZNS();          // MinMass of TotalResidualNucleus (+hadron)
               newT=rtM-reM;               // The effective mass
 #ifdef debug
-		            G4cout<<"G4Q::HQ:***VacuumFragmentation** M="<<newT<<",rM="<<rtM<<rtQC
+              G4cout<<"G4Q::HQ:***VacuumFragmentation** M="<<newT<<",rM="<<rtM<<rtQC
                     <<",eM="<<envM<<",mM="<<minT<<G4endl;
 #endif
-	    } else {          // The RadiatedHadron is aQuarkExchange frag.
-	
-              G4QContent reQC=envQC-pQC;      // Total Residual Quark Content
+            }
+            else                          // The RadiatedHadron is aQuarkExchange frag.
+            {
+ 
+              G4QContent reQC=envQC-pQC;  // Total Residual Quark Content
               if(envA-pBaryn>bEn) reQC=bEnQC; // Nucl Env - fragment > than A_max
-              G4QNucleus reN(reQC);   // Create a pseudoNucleus for ResidualNucleus
-              reM=reN.GetMZNS();   // Min Mass of the residual EnvironmentNucleus
+              G4QNucleus reN(reQC);       // Create a pseudoNucleus for ResidualNucleus
+              reM=reN.GetMZNS();          // Min Mass of the residual EnvironmentNucleus
               // *** LIM ***
-              G4QContent rtQC=curQ;      // Total Quasmon Quark Content
-#ifdef debug
-	      G4cout<<"G4Q::HQ:reQC="<<reQC<<",rtQC="<<rtQC<<",eA="<<envA<<",pB="<<pBaryn
-                  <<",bE="<<bEn<<bEnQC<<G4endl;
-#endif
-              rtQC+=reQC;         // Quasmon + (effective) nuclear environment
-              G4QNucleus rtN(rtQC);    // Create a pseudo-nucleus for residual ENE
-              rtM=rtN.GetMZNS();       // MinMass of TotalResidualNucleus (fragment)
+              G4QContent rtQC=curQ;       // Total Quasmon Quark Content
+#ifdef debug
+              G4cout<<"G4Q::HQ:reQC="<<reQC<<",rtQC="<<rtQC<<",eA="<<envA<<",pB="<<pBaryn
+                    <<",bE="<<bEn<<bEnQC<<G4endl;
+#endif
+              rtQC+=reQC;                 // Quasmon + (effective) nuclear environment
+              G4QNucleus rtN(rtQC);       // Create a pseudo-nucleus for residual ENE
+              rtM=rtN.GetMZNS();          // MinMass of TotalResidualNucleus (fragment)
               // *** LIM ***
-	      if (envA-pBaryn > bEn) {
-                newT=rtM-mbEn;
-              } else {
-                newT=rtM-reM;
-	      }  
-#ifdef debug
-	      G4cout<<"G4Q::HQ:NuclFrM="<<newT<<",r="<<rtM<<rtQC<<",e="<<envM<<envQC<<",p="
+              if (envA-pBaryn > bEn) newT=rtM-mbEn;
+              else                   newT=rtM-reM;
+#ifdef debug
+              G4cout<<"G4Q::HQ:NuclFrM="<<newT<<",r="<<rtM<<rtQC<<",e="<<envM<<envQC<<",p="
                     <<pMass<<pQC<<",re="<<reM<<reQC<<",exEn="<<totMass-rtM-sMass<<G4endl;
 #endif
-	    }
+            }
             if(minT<newT) newT=minT;
-	  }
-          minSqB=newT*newT;     // MinSquaredMass of BoundedResidualQuasmon
-        }
-#ifdef debug
-	G4cout<<"G4Q::HQ:rq="<<rqPDG<<",miT="<<minSqT<<",miB="<<minSqB<<",M="<<rtM<<G4endl;
+          }
+          minSqB=newT*newT;               // MinSquaredMass of BoundedResidualQuasmon
+        }
+#ifdef debug
+ G4cout<<"G4Q::HQ:rq="<<rqPDG<<",miT="<<minSqT<<",miB="<<minSqB<<",M="<<rtM<<G4endl;
 #endif
         if(!minSqT)
@@ -1479,7 +1502,7 @@
         G4double m2 = BIG2; //@@ justBigNumber// Prototype/Squared Mass of Residual Quasmon
         G4double kp=0.;                       // 3-Mpm/Mass for the residual Quasmon
-        if (sPDG > MINPDG && sPDG != NUCPDG) {       // ==> NuclearFragmentCandidate hadronization
+        if (sPDG > MINPDG && sPDG != NUCPDG) {// ==> NuclearFragmentCandidate hadronization
 #ifdef debug 
-	  G4cout<<"G4Q::HQ: BoundM="<<pMass<<",FreeM="<<sMass<<",QM="<<quasM<<G4endl;
+          G4cout<<"G4Q::HQ: BoundM="<<pMass<<",FreeM="<<sMass<<",QM="<<quasM<<G4endl;
 #endif
           // = = = =  P u r e   k i n e m a t i c a l   c a l c u l a t i o n s:  = = = = =
@@ -1488,15 +1511,16 @@
           G4LorentzVector tot4Mom=q4Mom+cl4Mom;  // @@ Just for checking
 #ifdef debug
-	  G4cout<<"G4Q::HQ:Q("<<quasM<<")->k("<<k4Mom<<")+CRQ("<<cr4Mom.m()<<")"<<G4endl;
+          G4cout<<"G4Q::HQ:Q("<<quasM<<")->k("<<k4Mom<<")+CRQ("<<cr4Mom.m()<<")"<<G4endl;
 #endif
           G4LorentzVector cc4Mom=k4Mom+cl4Mom;// 4-mom of ColoredFragment (before kappa)
           G4double ccM2=cc4Mom.m2();          // SquaredMass of the ColoredFragment
           G4double frM2=sMass*sMass;          // MinSuaredMass of the OutgoingFragment
-          if (ccM2 <= frM2) {                 // Decaying ColoredFragmM < FragmM 
-#ifdef debug
-	    G4cout<<"***G4Q::HQ:FailedToFind FragmM:"<<ccM2<<"<"<<frM2<<",M="<<pMass<<"+k="
+          if (ccM2 <= frM2)                   // Decaying ColoredFragmM < FragmM 
+          {
+#ifdef debug
+            G4cout<<"***G4Q::HQ:FailedToFind FragmM:"<<ccM2<<"<"<<frM2<<",M="<<pMass<<"+k="
                   <<k4Mom<<"="<<sqrt(ccM2)<<cc4Mom<<" < fM="<<sMass<<",miK="<<minK<<G4endl;
 #endif
-	    dMass=pMass-pNMass;               // Remember the difference
+            dMass=pMass-pNMass;               // Remember the difference
             pMass=pNMass;
             delta=deltaN;
@@ -1505,19 +1529,24 @@
             cc4Mom=k4Mom+cl4Mom;              // 4-mom of ColoredFragment (before kappa)
             ccM2=cc4Mom.m2();
-            if (ccM2 <= frM2) {
-#ifdef debug
-	      G4cout<<"G4Q::HQ:hsflagTRUE*NuclBINDING,ccM2="<<ccM2<<"<frM2="<<frM2<<G4endl;
+            if (ccM2 <= frM2)
+            {
+#ifdef debug
+              G4cout<<"G4Q::HQ:hsflagTRUE*NuclBINDING,ccM2="<<ccM2<<"<frM2="<<frM2<<G4endl;
 #endif
               hsflag=true;                    // Flag of decay in Q+S
-	    } else {
-#ifdef debug
-	      G4cout<<"G4Q::HQ:***NUCLEAR BINDING***ccM2="<<ccM2<<" > frM2="<<frM2<<G4endl;
+            }
+            else
+            {
+#ifdef debug
+              G4cout<<"G4Q::HQ:***NUCLEAR BINDING***ccM2="<<ccM2<<" > frM2="<<frM2<<G4endl;
 #endif
               nucflag=true;                   // Nuclear binding was used
-	    }
-	  } else {
+            }
+          }
+          else
+          {
 #ifdef debug
             G4double crMass2 = cr4Mom.m2();   // SquredMass of ColouredResidualQuasmon
-	           G4cout<<"G4Q::HQ:cM2="<<crMass2<<"="<<rEP*(rEP-rMo-rMo)<<",h="<<hili<<",l="
+            G4cout<<"G4Q::HQ:cM2="<<crMass2<<"="<<rEP*(rEP-rMo-rMo)<<",h="<<hili<<",l="
                   <<loli<<G4endl;
 #endif
@@ -1532,12 +1561,13 @@
             G4double dM=0.;
             if(sPDG==90001001) dM=2.25;       // Binding energy of the deuteron ???
-	           G4cout<<"G4Q::HQ:Is xE="<<excE<<" > sM="<<sMass<<"-pM="<<pMass<<"-dM="<<dM
+            G4cout<<"G4Q::HQ:Is xE="<<excE<<" > sM="<<sMass<<"-pM="<<pMass<<"-dM="<<dM
                   <<" = "<<sMass-pMass-dM<<G4endl;
 #endif
 #ifdef debug
-	           G4cout<<"G4Q::HQ: must totM="<<totMass<<" > rTM="<<resTNM<<"+sM="<<sMass<<" = "
+            G4cout<<"G4Q::HQ: must totM="<<totMass<<" > rTM="<<resTNM<<"+sM="<<sMass<<" = "
                   <<sMass+resTNM<<G4endl;
 #endif
-	    if(resTNM && totMass<resTNM+sMass) { // Probably it never takes place
+            if(resTNM && totMass<resTNM+sMass)// Probably it never takes place
+            {
 #ifdef ppdebug
               G4cout<<"***G4Quasmon::HadronizeQuasmon:***PANIC#1***TotalDE="<<excE<<"< bE="
@@ -1548,7 +1578,6 @@
               qEnv=theEnvironment;            // Update the QEnvironment ???
               return theQHadrons;
-	    }
-
-	    G4double   ex=kLS-delta;          // EnvironmentExcess of parton energy in LS
+            }
+            G4double   ex=kLS-delta;          // EnvironmentExcess of parton energy in LS
             G4double   dex=ex+ex;
             G4QContent tmpEQ=envQC-pQC;       // Quark content for Residual Environment
@@ -1557,5 +1586,5 @@
             G4double   tmpNM=tmpN.GetMZNS();  // Mass of Residual Environment
 #ifdef debug
-	    G4cout<<"G4Q::HQ:eQC="<<envQC<<",pQC="<<pQC<<",rEnvM="<<tmpNM<<",hsfl="<<hsflag
+            G4cout<<"G4Q::HQ:eQC="<<envQC<<",pQC="<<pQC<<",rEnvM="<<tmpNM<<",hsfl="<<hsflag
                   <<G4endl;
 #endif
@@ -1613,5 +1642,5 @@
               G4double ctkk=1.-(dex/(1.-z)-pMass)/kLS;// cos(theta_k,kappa) in LS
 #ifdef ppdebug
-	             if(qCount) G4cout<<"G4Q::HQ:qC="<<qCount<<",ct="<<ctkk<<",M="<<pMass<<",z="
+              if(qCount) G4cout<<"G4Q::HQ:qC="<<qCount<<",ct="<<ctkk<<",M="<<pMass<<",z="
                                <<z<<",zl="<<pow(loli,pw)<<",zh="<<pow(hili,pw)<<",dE="
                                <<totMass-totM<<",bE="<<sMass-pMass<<G4endl;
@@ -1638,5 +1667,5 @@
                 if(ctc>1.) ctc=1.;
                 else if(ctc<-1.) ctc=-1.;
-			           }
+              }
               kp4Mom=zeroLV;                           // 4-mom update for RecoilQuark (q)
               fr4Mom=G4LorentzVector(0.,0.,0.,sMass);  // 4-mom update for the fragment
@@ -1650,9 +1679,9 @@
               //G4ThreeVector kp3v=kp4Mom.vect();
               //G4double ctr=cc3v.dot(kp3v)/cc3v.mag()/kp3v.mag();
-	             //G4cout<<"G4Q::HQ:cost="<<ctc<<"="<<ctr<<", d="<<ctc-ctr<<G4endl;
+              //G4cout<<"G4Q::HQ:cost="<<ctc<<"="<<ctr<<", d="<<ctc-ctr<<G4endl;
 #ifdef debug
               G4double ccM=sqrt(ccM2);
               G4double kappa=ex/(1.+kLS*(1.-ctkk)/pMass);// Energy of the RecoilQuark in LS
-	             G4cout<<"G4Q::HQ:>ColDec>>>CF("<<ccM<<")->F("<<sMass<<")+q"<<kp4Mom<<"="
+              G4cout<<"G4Q::HQ:>ColDec>>>CF("<<ccM<<")->F("<<sMass<<")+q"<<kp4Mom<<"="
                     <<kappa<<",hsfl="<<hsflag<<G4endl;
 #endif
@@ -1667,30 +1696,30 @@
               // ***VBQ***
               //G4double rQM2=rQ4Mom.m2();             // TMP (Before the "kt" is defined)
-			           //if(rQM2>=minSqB && fr4Mom.e()>=sCBE)   // minSqB = SqGSMass of BoundResidQ
+              //if(rQM2>=minSqB && fr4Mom.e()>=sCBE)   // minSqB = SqGSMass of BoundResidQ
               // ***VFQ***
               //G4double rQM2=rQ4Mom.m2();             // TMP (Before the "kt" is defined)
-			           //if(rQM2>=minSqT && fr4Mom.e()>=sCBE)   // minSqB = SqGSMass of BoundResidQ
+              //if(rQM2>=minSqT && fr4Mom.e()>=sCBE)   // minSqB = SqGSMass of BoundResidQ
               // ***VQU***
               fQ4Mom=rQ4Mom+G4LorentzVector(0.,0.,0.,tmpBE); // Free Quasmon 4-mom
               G4double fQM2=fQ4Mom.m2();             // TMP (Before the "kt" is defined)
-			           if(fQM2>=minSqT && reTNM2>=tmpTM2 && fr4Mom.e()>=sCBE) // minSqT = SqGSMass
+              if(fQM2>=minSqT && reTNM2>=tmpTM2 && fr4Mom.e()>=sCBE) // minSqT = SqGSMass
               {
-														  qCond=false;  // Ok, the appropriate q is found
+                qCond=false;  // Ok, the appropriate q is found
                 //ffdc=false;
 #ifdef debug
                 // ***VTN***
-			             //G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<reTNM2<<">"<<tmpTM2
+                //G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<reTNM2<<">"<<tmpTM2
                 //      <<" & E="<<fr4Mom.e()<<" > CB+M="<<sCBE<<G4endl;
                 // ***VBQ***
-			             //G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<rQM2<<">"<<minSqB<<G4endl;
+                //G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<rQM2<<">"<<minSqB<<G4endl;
                 // ***VQU***+***VFQ***
-			             G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<fQM2<<">"<<minSqT<<G4endl;
-#endif
-			           }
-			           else
+                G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<fQM2<<">"<<minSqT<<G4endl;
+#endif
+              }
+              else
               {
 #ifdef debug
                 // ***VTN***
-			             //G4cout<<"G4Q::HQ:Attempt#"<<qCount<<",NO.M2="<<reTNM2<<"<"<<tmpTM2
+                //G4cout<<"G4Q::HQ:Attempt#"<<qCount<<",NO.M2="<<reTNM2<<"<"<<tmpTM2
                 //      <<" or E="<<fr4Mom.e()<<" < CB+M="<<sCBE<<G4endl;
                 // ***VBQ***
@@ -1707,5 +1736,5 @@
                 // ***VTN***
                 //if(reTNM2<tmpTM2 && reTNM2>MEMrQM2 && fr4Mom.e()>=sCBE)
-			             {
+                {
                   // ***VQU***
                   MEMrQM2=fQM2;
@@ -1723,8 +1752,8 @@
                 else if(fr4Mom.e()<sCBE&&fr4Mom.e()>MEMsCBE&&reTNM2>=tmpTM2&&fQM2>MEMrQM2)
                 // ***VBQ***VFQ***
-                //else if(fr4Mom.e()<sCBE&&fr4Mom.e()>MEMsCBE&&reTNM2>=tmpTM2&&rQM2>MEMrQM2)
+                //else if(fr4Mom.e()<sCBE&&fr4Mom.e()>MEMsCBE&&reTNM2>tmpTM2&&rQM2>MEMrQM2)
                 // ***VTN***
                 //else if(fr4Mom.e()<sCBE && fr4Mom.e()>MEMsCBE && reTNM2>=tmpTM2)
-			             {
+                {
                   MEMsCBE=fr4Mom.e(); // Remember the best choice
                   MEMkp4M=kp4Mom;
@@ -1734,5 +1763,5 @@
                 }
                 else if(!qCount)                 //@@ Should not be here
-			             {
+                {
                   // ***VQU***
                   MEMrQM2=fQM2;
@@ -1749,5 +1778,5 @@
                 }
                 else
-			             {
+                {
                   // ***VQU***
                   fQM2=MEMrQM2;
@@ -1761,12 +1790,12 @@
                   rQ4Mom=MEMrQ4M;
                   reTNM2=MEMreM2;
-			             }
-			           }
+                }
+              }
               qCount++;
-		          } // End of the WHILE of the q-choice for the fixed parent
+            } // End of the WHILE of the q-choice for the fixed parent
             // If q-choice is exhosted, then get the best, not the last
             quexf=true;                      // Quark Exchange is successfully done
 #ifdef debug
-	           G4cout<<"G4Q::HadQ:RQ("<<rQ4Mom.m()<<")=C("<<cr4Mom.m()<<")+q"<<kp4Mom<<G4endl;
+            G4cout<<"G4Q::HadQ:RQ("<<rQ4Mom.m()<<")=C("<<cr4Mom.m()<<")+q"<<kp4Mom<<G4endl;
 #endif
             kt=rQ4Mom.m2();
@@ -1786,37 +1815,37 @@
             tot4Mom-=rQ4Mom+fr4Mom;
 #ifdef debug
-	           G4cout<<"G4Q::HQ:t4M="<<tot4Mom<<",hsfl="<<hsflag<<".Is kt="<<kt<<">"<<minSqB
+            G4cout<<"G4Q::HQ:t4M="<<tot4Mom<<",hsfl="<<hsflag<<".Is kt="<<kt<<">"<<minSqB
                   <<" or kn="<<kn<<">"<<minSqN<<"? m2="<<m2<<", sPDG="<<sPDG<<G4endl;
 #endif
             // Final check to accept or reject the quark-exchange
             // ***VFQ***
-		          //if(kn<minSqN && kt<minSqT)
+            //if(kn<minSqN && kt<minSqT)
             // ***VQU***
-		          if(kn<minSqN && ku<minSqT)
+            if(kn<minSqN && ku<minSqT)
             // ***VBQ***
-		          //if(kn<minSqN && kt<minSqB)
+            //if(kn<minSqN && kt<minSqB)
             //if(kt<minSqT&&ffdc) 
-		          //if(kt<minSqT)
+            //if(kt<minSqT)
             // ***VTN*** (former default)
-		          //if(sPDG<MINPDG&&kt<minSqB||sPDG>MINPDG&&kn<minSqN)
-										  //if(sPDG<MINPDG&&kt<minSqB||sPDG>MINPDG&&kt<minSqB)
-		          //if(kn<minSqN)
+            //if(sPDG<MINPDG&&kt<minSqB||sPDG>MINPDG&&kn<minSqN)
+            //if(sPDG<MINPDG&&kt<minSqB||sPDG>MINPDG&&kt<minSqB)
+            //if(kn<minSqN)
             // ***VTN***
-		          //if(kt<minSqT&&sPDG!=90000001||kn<minSqN&&sPDG==90000001)//Nucleus for Neutron
-		          //if(kt<minSqT&&sMass>1200.||kn<minSqN&&sMass<1200.) //NuclEnreach for Nucleons
+            //if(kt<minSqT&&sPDG!=90000001||kn<minSqN&&sPDG==90000001)//Nucleus for Neutron
+            //if(kt<minSqT&&sMass>1200.||kn<minSqN&&sMass<1200.) //NuclEnreach for Nucleons
             // @@@@ Priveleged Nuteron !! ??? @@@@@
-		          //if(kn<minSqN&&sPDG==90000001||kt<minSqB&&sPDG!=90000001)//BindEnOnlyForNuter.
+            //if(kn<minSqN&&sPDG==90000001||kt<minSqB&&sPDG!=90000001)//BindEnOnlyForNuter.
             {
               hsflag=true; // The quark exchange is REJECTED
 #ifdef debug
-	             G4cout<<"G4Q::HQ:**hsflag=1** No, sPDG="<<sPDG<<", kt="<<kt<<"<"<<minSqB
+              G4cout<<"G4Q::HQ:**hsflag=1** No, sPDG="<<sPDG<<", kt="<<kt<<"<"<<minSqB
                     <<" or kn="<<kn<<"<"<<minSqN<<G4endl;
 #endif
-		          }
-#ifdef debug
-	           else G4cout<<"G4Q::HQ:YES,t="<<kt<<">"<<minSqB<<",n="<<kn<<">"<<minSqN<<G4endl;
-#endif
-		        }
-	       }
+            }
+#ifdef debug
+            else G4cout<<"G4Q::HQ:YES,t="<<kt<<">"<<minSqB<<",n="<<kn<<">"<<minSqN<<G4endl;
+#endif
+          }
+        }
         else                                 // ==> "HadronicCandidate hadronization" case
         {
@@ -1839,5 +1868,5 @@
             else            TCRN+=env4M;
             kn=TCRN.m2();                  // tot4M - fr4Mom
-		        }
+          }
           else kn=kt;
         }
@@ -1857,16 +1886,16 @@
         // ***VBQ***
         if(kt>minSqB+.01 && tM>rtM && !hsflag)
-						  //if((kt>minSqB+.01&&sPDG<MINPDG || sPDG>MINPDG&&kt>minSqB+.01&&tM>rtM) && !hsflag)
+        //if((kt>minSqB+.01&&sPDG<MINPDG || sPDG>MINPDG&&kt>minSqB+.01&&tM>rtM) && !hsflag)
         // ***VTN***
         //if((kt>minSqB+.01&&sPDG<MINPDG || sPDG>MINPDG&&kn>minSqN+.01&&tM>rtM) && !hsflag)
         //if(tM>rtM&&!hsflag)                               // Mass(RNucleus)>M_min
         //if(tM>rtM&&kp<kpMax&&!hsflag)                     // Mass(RNucleus)>M_min
-	       //if(2>3)                                      // *** Close k-correction ***
-	       {
+        //if(2>3)                                      // *** Close k-correction ***
+        {
           // ***VTN*** (?)
-		        //if(sPDG<MINPDG)                      // Hadronic candidate: finish calculations
+          //if(sPDG<MINPDG)                      // Hadronic candidate: finish calculations
           // ***VBQ***VFQ***VQU***
-		        //if(2>3)                             // Close crrection for hadrons @@?p-pbar?@@
-	         //{
+          //if(2>3)                             // Close crrection for hadrons @@?p-pbar?@@
+          //{
           //  G4double np = nOfQ - 3;             // Power for an residual quasmon mass
           //  G4double cM = pow(minSqB/kt,np);    // Cut for PossibleQuasmon residual mass
@@ -1878,5 +1907,5 @@
 #endif
           //  m2 = kt*rn;                         // SquaredMass of ResidualQuasmon (hadr)
-	         //}
+          //}
           //else
           //{
@@ -1887,13 +1916,13 @@
           //}
         }
-	       else
+        else
         {
           hsflag=true;                          // Decay in ThisHadron/Fragment+(SHadron)
 #ifdef pdebug
-		        G4cout<<"G4Q::HQ:NO,hsfl=1,kt="<<kt<<"<"<<minSqB<<" or M="<<tM<<"<"<<rtM<<G4endl;
-#endif
-	       }
-#ifdef debug
-	       G4cout<<"G4Q::HQ:*****>>>rM="<<rMass<<",sqM2="<<sqrt(m2)<<",hsfl="<<hsflag<<G4endl;
+          G4cout<<"G4Q::HQ:NO,hsfl=1,kt="<<kt<<"<"<<minSqB<<" or M="<<tM<<"<"<<rtM<<G4endl;
+#endif
+        }
+#ifdef debug
+        G4cout<<"G4Q::HQ:*****>>>rM="<<rMass<<",sqM2="<<sqrt(m2)<<",hsfl="<<hsflag<<G4endl;
 #endif
         rMass=sqrt(m2);                         // if(hsflag)(TwoPartDecay) it's fake 0.
@@ -1907,5 +1936,5 @@
         G4int aPDG  = abs(rPDG);
         G4int rb    = abs(curQ.GetBaryonNumber()); // BaryNum of residual hadronic state
-        G4double rcMass=-BIG; //@@ just BIG number // Prototype of minimal mass for residual
+        G4double rcMass=-BIG; //@@ just BIG number // Prototype of minimalMass for residual
         if (!rPDG)
         {
@@ -1924,9 +1953,9 @@
         if(sPDG<MINPDG&&envPDG==NUCPDG)rFl=G4UniformRand()<bs*bs*bs/m3;//ProbFun:minM^3/m^3
 #ifdef debug
-	       G4cout<<"G4Q::HQ: sPDG="<<sPDG<<", hsflag="<<hsflag<<", rPDG="<<rPDG<<curQ<<",rM="
+        G4cout<<"G4Q::HQ: sPDG="<<sPDG<<", hsflag="<<hsflag<<", rPDG="<<rPDG<<curQ<<",rM="
               <<rMass<<",rb="<<rb<<",F="<<rFl<<",v="<<m2<<","<<bs<<",r="<<bs*bs/m2<<G4endl;
 #endif
         if(!hsflag&&rFl&&rPDG&& rPDG!=10 && rb<2 && aPDG!=1114 && aPDG!=2224 && aPDG!=3334)
-	       { // ------------------------------->>>>>>>>>>>>>>> Hadron-Parton Duality decay
+        { // ------------------------------->>>>>>>>>>>>>>> Hadron-Parton Duality decay
           G4int regPDG = 0;                            // PDG prototype for G-meson
           G4int refPDG = 0;                            // PDG prototype for F-meson
@@ -1934,5 +1963,5 @@
           G4int repPDG = 0;                            // PDG prototype for P-meson
           if(rPDG && rPDG!=10)                         // Can the residual be a Hadron ?
-	         {
+          {
             if     (rPDG== 3122) rPDG= 3212;           // LAMBDA* converted to SIGMA*
             else if(rPDG==-3122) rPDG=-3212;
@@ -1947,5 +1976,5 @@
             //if((rPDG==221||rPDG==331)&&sPDG==111) rPDG=111; // eta/eta'=>Pi0
 #ifdef debug
-	           G4cout<<"G4Q::HQ:QuasM="<<quasM<<valQ<<")->H("<<sPDG<<")+R("<<rPDG<<")"<<",rp="
+            G4cout<<"G4Q::HQ:QuasM="<<quasM<<valQ<<")->H("<<sPDG<<")+R("<<rPDG<<")"<<",rp="
                   <<repPDG<<",rd="<<redPDG<<",rf="<<refPDG<<",rg="<<regPDG<<G4endl;
 #endif
@@ -1969,15 +1998,15 @@
             if(((rM>0 && rMass<pB && rMass>sB) || (dM>0 && rMass>pB && rMass<dB) ||
                (fM>0 && rMass>dB && rMass<fB)) && theEnvironment.GetPDG()==NUCPDG)
-		          {// Final H+R decay of QUASMON in vacuum (should not exist if Environ exists)
+            {// Final H+R decay of QUASMON in vacuum (should not exist if Environ exists)
               if     (rMass>pB && rMass<dB && dM>0)    // D-resonance case
-		            {
+              {
                 repPDG=redPDG;
                 rM=dM;
-		            }
+              }
               else if(rMass>dB && rMass<fB && dM>0)    // F-resonance case
-		            {
+              {
                 repPDG=refPDG;
                 rM=fM;
-		            }                                        // If not changed - P-resonance
+              }                                        // If not changed - P-resonance
 #ifdef debug
               G4cout<<"G4Q::HQ:s="<<sPDG<<",Q=>rM="<<rMass<<"(minQ="<<rPDG<<curQ<<")+sB="
@@ -1985,13 +2014,13 @@
 #endif
               if(quasM<rM+sMass &&(sPDG==221||sPDG==331))// Change eta-Cand to pi-Cand
-	             {
+              {
                 sPDG=111;
                 sMass=mPi0;
-  	           }
+              }
               G4LorentzVector r4Mom(0.,0.,0.,rM);    // P/D/F-resonance with a random Mass
               G4LorentzVector s4Mom(0.,0.,0.,sMass); // Mass's random since ProbabilityTime
               G4double sum=rM+sMass;
               if(fabs(quasM-sum)<eps)
-		            {
+              {
                 r4Mom=q4Mom*(rM/sum);
                 s4Mom=q4Mom*(sMass/sum);
@@ -2001,8 +2030,8 @@
                 G4cerr<<"**G4Quasmon::HadronizeQuasmon:rPD="<<repPDG<<"(rM="<<rMass
                       <<")+sPD="<<sPDG<<"(sM="<<sMass<<"), Env="<<theEnvironment<<G4endl;
-    	           throw G4QException("G4Quasmon::HadronizeQuasmon: H+Res Decay failed");
+                throw G4QException("G4Quasmon::HadronizeQuasmon: H+Res Decay failed");
               }
 #ifdef debug
-	             G4cout<<"G4Q::HQ:=== 1 ===> HadronVec, Q="<<q4Mom<<" -> s4M="<<s4Mom<<"("
+              G4cout<<"G4Q::HQ:=== 1 ===> HadronVec, Q="<<q4Mom<<" -> s4M="<<s4Mom<<"("
                     <<sPDG<<"), r4M="<<r4Mom<<"("<<repPDG<<")"<<G4endl;
 #endif
@@ -2020,6 +2049,6 @@
               qEnv=theEnvironment;                   // Update the QEnvironment
               return theQHadrons;                    // The last decay of the quasmon...
-	           }
-	         }
+            }
+          }
         }
         curQ = memQ;                                   // Recover original curQ=valQ-candQ
@@ -2028,26 +2057,27 @@
       }
       // ***VFQ***
-		    //if(kn>minSqN && kt>minSqT)
+      //if(kn>minSqN && kt>minSqT)
       // ***VQU***
-
       if (kn > minSqN && ku > minSqT)
       // ***VBQ***
-		    //if(kn>minSqN && kt>minSqB)
+      //if(kn>minSqN && kt>minSqB)
       // ***VTN***
-			   //if(kt>minSqB&&sPDG<MINPDG || sPDG>MINPDG&&kn>minSqN)
-      {
-	pCond=false;       // Ok, the appropriate parent cluster is found
+      //if(kt>minSqB&&sPDG<MINPDG || sPDG>MINPDG&&kn>minSqN)
+      {
+        pCond=false;       // Ok, the appropriate parent cluster is found
 #ifdef debug
         // ***VTN***VBQ***
-			     //G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">"
+        //G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">"
         //      <<minSqB<<" || kn="<<kn<<">"<<minSqN<<G4endl;
         // ***VQU***
-			     G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",ku="<<ku<<">"
+        G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",ku="<<ku<<">"
               <<minSqT<<" || kn="<<kn<<">"<<minSqN<<G4endl;
         // ***VFQ***
-			     //G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">"
+        //G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">"
         //      <<minSqT<<" || kn="<<kn<<">"<<minSqN<<G4endl;
 #endif
-      } else {
+      }
+      else
+      {
 #ifdef debug
         // ***VBQ***VTN***
@@ -2062,15 +2092,15 @@
 #endif
         // ***VTN*** (former default)
-			   //if(kt>=minSqB || sPDG>MINPDG&&kn>minSqN)
+        //if(kt>=minSqB || sPDG>MINPDG&&kn>minSqN)
         // ***VBQ***
-			   //if(kn<minSqN && kt>=minSqB)
+        //if(kn<minSqN && kt>=minSqB)
         // ***VFQ***
-			   //if(kn<minSqN && kt>=minSqT)
+        //if(kn<minSqN && kt>=minSqT)
         // ***VQU***
-
-	if (kn < minSqN && ku < minSqT) {
-
+        if (kn < minSqN && ku < minSqT)
+        {
           // ***VTN*** (former default)
-          //if(kt<minSqB&&sPDG<MINPDG && kt>PMEMktM2 || kn<minSqN&&sPDG>MINPDG&& kn>PMEMknM2)
+          //if(kt<minSqB&&sPDG<MINPDG && kt>PMEMktM2 || 
+          //   kn<minSqN&&sPDG>MINPDG && kn>PMEMknM2)
           // ***VBQ***
           //if(kt<minSqB && kt>PMEMktM2)
@@ -2078,6 +2108,6 @@
           //if(kt<minSqT && kt>PMEMktM2)
           // ***VQU***
-
-          if(ku<minSqT && ku>PMEMktM2) {
+          if(ku < minSqT && ku > PMEMktM2)
+          {
             // ***VQU***
             PMEMktM2=ku;
@@ -2106,8 +2136,9 @@
             PMEMnucf=nucflag;
 #ifdef pdebug
-            G4cout<<"G4Q::HQ:RememberBest rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl;
-#endif
-          } else if(!pCount) {                    // @@ Should not be here
-
+            G4cout<<"G4Q::HQ:RemTheBest rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl;
+#endif
+          }
+          else if(!pCount)
+          {                    // @@ Should not be here
             // ***VQU***
             PMEMktM2=ku;
@@ -2136,7 +2167,9 @@
             PMEMnucf=nucflag;
 #ifdef pdebug
-            G4cout<<"G4Q::HQ:RememberFirst rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl;
-#endif
-          } else {
+            G4cout<<"G4Q::HQ:RemTheFirst rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl;
+#endif
+          }
+          else
+          {
             fr4Mom=PMEMfr4M; // OK -> Recover the best found values
             rQ4Mom=PMEMrQ4M; // OK
@@ -2164,9 +2197,9 @@
             hsflag=PMEMhsfl; // OK
             nucflag=PMEMnucf;// OK
-	  }
-	}
+          }
+        }
       }
       pCount++;
-		  } // End of the WHILE of the parent choice
+    } // End of the WHILE of the parent choice
 #ifdef pdebug
     G4cout<<"G4Q::HQ:>rPDG="<<rPDG<<curQ<<",sPDG="<<sPDG<<",kt="<<kt<<",F="<<fprob
@@ -2193,7 +2226,8 @@
 
     if ( ( ( (sPDG < MINPDG && envPDG > MINPDG && envPDG != NUCPDG) || 
-             (sPDG > MINPDG && sPDG!=NUCPDG && envPDG > pPDG) ) && iniBN > 0) || 
-             iniBN > 1 || 
-             rPDG == 10 ) aMass=0.;  // No Pi0 cond.(eg in NucE)
+             (sPDG > MINPDG && sPDG!=NUCPDG && envPDG > pPDG)
+           ) && iniBN > 0
+         ) ||  iniBN > 1 ||  rPDG == 10
+       ) aMass=0.;         // No Pi0 cond.(eg in NucE)
 
 #ifdef pdebug
@@ -2205,7 +2239,8 @@
     if ( hsflag || 
          (sPDG < MINPDG && rMass < reMass+aMass) || 
-	 (sPDG > MINPDG && envPDG > pPDG && reTNM2 < tmpTM2) || 
-         fdul ) {
-      // >>>>>> Decay Q->S+H or Q/C->H1+H2 or suck in or evaporate or slow down or decay etc.
+         (sPDG > MINPDG && envPDG > pPDG && reTNM2 < tmpTM2) || 
+         fdul )
+    {
+      // >>>> Decay Q->S+H or Q/C->H1+H2 or suck in or evaporate or slow down or decay etc.
       // ========> Decide what to do, if fragmentation in this Candidate is impossible ===
 #ifdef debug
@@ -2216,5 +2251,5 @@
       if(hsflag) rMass=rQPDG.GetMass();          // Get Nuclear Cluster mass
       if(sPDG>MINPDG&&sPDG!=NUCPDG)              // "Quark exchange hadronization" case
-	     {
+      {
         G4QContent tmpEQ=envQC-pQC;              // Quark content for Residual Environment
         G4QNucleus tmpN(tmpEQ);                  // Pseudo nucleus for Residual Environment
@@ -2225,5 +2260,5 @@
         G4LorentzVector ResEnv4Mom(0.,0.,0.,tmpNM);// 4-Mom for the Residual Environment
         if(rQ4Mom==zeroLV)
-		      {
+        {
 #ifdef ppdebug
           G4cout<<"G4Q::HQ:NEEDS-EVAP-5,Q="<<q4Mom<<valQ<<",QEnv="<<theEnvironment<<G4endl;
@@ -2232,5 +2267,5 @@
           qEnv=theEnvironment;
           return theQHadrons;
-		      }
+        }
         G4LorentzVector retN4Mom=rQ4Mom+ResEnv4Mom;// 4-Mom for the Total Residual Nucleus
         G4double retNM2=retN4Mom.m2();    // SqMass of the Total Residual Nucleus @@ double
@@ -2265,7 +2300,7 @@
         //      <<"+rCB="<<rCB<<"+sCB="<<sCB<<"="<<tmpNM+rMass+sMass+rCB+sCB<<G4endl;
 #endif
-		      //if(nQuasms==1&&tmpNM+rMass+rCB+sMass+sCB<totMass)// Decay in resEnv+resQ+Fragment
-								if(2>3)                              //*** Attempt GoOutDropExcNucl is closed ***
-		      {
+        //if(nQuasms==1&&tmpNM+rMass+rCB+sMass+sCB<totMass)// Decay in resEnv+resQ+Fragment
+        if(2>3)                              //*** Attempt GoOutDropExcNucl is closed ***
+        {
           G4LorentzVector fr4M = G4LorentzVector(0.,0.,0.,sMass);//GSM of Fragment
           G4LorentzVector re4M = G4LorentzVector(0.,0.,0.,tmpNM);//GSM of ResidualEnviron
@@ -2278,5 +2313,5 @@
           G4double sum=tmpNM+sMass+rMass;
           if(fabs(totMass-sum)<eps)
-		        {
+          {
             re4M=tot4M*(tmpNM/sum);
             rq4M=tot4M*(rMass/sum);
@@ -2296,5 +2331,5 @@
             FillHadronVector(envH);              // Fill MovingEnvironment (del.equiv)
             qEnv = vacuum;                       // Distruct Environment
-			       }
+          }
           else
           {
@@ -2308,9 +2343,9 @@
           ClearQuasmon();                        // This Quasmon is done
           return theQHadrons;                    // The last decay of the quasmon...
-		      }
+        }
         //else if(nQuasms==1&&tmpTM+sMass<totMass) //Lose p,go out,leave GSResNuc
-		      //else if(nQuasms==1&&tmpTM+sMass+sCB<totMass) //Lose p,goOut,leaveGSResNuc
+        //else if(nQuasms==1&&tmpTM+sMass+sCB<totMass) //Lose p,goOut,leaveGSResNuc
         else if(2>3) // ********** Decay in Fragm + GSResidNucleus is Closed ************
-		      {
+        {
           G4LorentzVector dif1=tot4M-retN4Mom-fr4Mom;
           qEnv = G4QNucleus(tmpTQ,retN4Mom);         // Createa Nucleus for TotalResidNucl
@@ -2334,8 +2369,8 @@
           ClearQuasmon();                             // This Quasmon is done
           return theQHadrons;                        // The last decay of the quasmon...
-		      }
+        }
         else if(totBN>1&&totMass>totM&&totS>=0&&envPDG>MINPDG&&envPDG!=NUCPDG)//Evaporate
-								//else if(2>3) // ********** Forced Evaporation is Closed ************
-		      {
+        //else if(2>3) // ********** Forced Evaporation is Closed ************
+        {
 #ifdef ppdebug
           //@@ May be recalculate hadronization ??
@@ -2353,7 +2388,7 @@
           qEnv=theEnvironment;
           return theQHadrons;
-		      }
+        }
         else if(totBN==1&&nQuasms==1) // Decay of the baryonic Total Nucleus state
-		      {
+        {
 #ifdef debug
           G4cout<<"G4Q::HQ:tB=1,nQ=1,Z="<<totZ<<",S="<<totS<<totQC<<",M="<<totMass<<G4endl;
@@ -2366,14 +2401,14 @@
           {
             if(totS==1)               // Decay of the strange hyperstate
-			         {
+            {
               if(!totZ&&totMass>mLamb+mPi0)
-			           {
+              {
                 nucM  = mLamb;
                 nucPDG= 3122;
                 piM   = mPi0;
                 piPDG = 111;
-			           }
+              }
               else if(abs(totZ)==1&&totMass>mLamb+mPi)
-			           {
+              {
                 nucM  = mLamb;
                 nucPDG= 3122;
@@ -2381,53 +2416,53 @@
                 if(totZ>0) piPDG = 211;
                 else       piPDG =-211;
-			           }
+              }
               else
-			           {
+              {
                 G4cerr<<"***G4Q::HQ:Z="<<totZ<<",S="<<totS<<totQC<<",tM="<<totMass<<G4endl;
-    	           throw G4QException("G4Quasmon::HadronizeQuasm: Pi + Lambda decay error");
+                throw G4QException("G4Quasmon::HadronizeQuasm: Pi + Lambda decay error");
               }
-			         }
-			         else                      // Decay of the anti-strange hyperstate
-			         {
+            }
+            else                      // Decay of the anti-strange hyperstate
+            {
               if(!totZ&&totMass>mNeut+mK0)
-			           {
+              {
                 nucM  = mNeut;
                 nucPDG= 2112;
                 piM   = mK0;
                 piPDG = 311;
-			           }
+              }
               else if(totZ==2&&totMass>mProt+mK)
-			           {
+              {
                 piM   = mK;
                 piPDG = 321;
-			           }
+              }
               else if(totZ==1&&totMass>mProt+mK0&&G4UniformRand()>0.5)
-			           {
+              {
                 piM   = mK0;
                 piPDG = 311;
-			           }
+              }
               else if(totZ==1&&totMass>=mNeut+mK)
-			           {
+              {
                 nucM  = mNeut;
                 nucPDG= 2112;
                 piM   = mK;
                 piPDG = 321;
-			           }
+              }
               else
-			           {
+              {
                 G4cerr<<"***G4Q::HQ:Z="<<totZ<<",S="<<totS<<totQC<<",tM="<<totMass<<G4endl;
-    	           throw G4QException("G4Quasmon::HadronizeQuasm: K + Nucleon decay error");
+                throw G4QException("G4Quasmon::HadronizeQuasm: K + Nucleon decay error");
               }
-			         }
-		        }
+            }
+          }
           else if(totMass>PiNM&&!totS) // Decay in nucleon & pion
           {
             if(!totZ&&totMass>mProt+mPi&&G4UniformRand()<0.5)
-		          {
+            {
               piM   = mPi;
               piPDG = -211;
             }
             else if(!totZ&&totMass>mNeut+mPi0)
-		          {
+            {
               nucM  = mNeut;
               nucPDG= 2112;
@@ -2436,5 +2471,5 @@
             }
             else if(totZ==1&&totMass>mNeut+mPi&&G4UniformRand()<0.5)
-		          {
+            {
               nucM  = mNeut;
               nucPDG= 2112;
@@ -2443,10 +2478,10 @@
             }
             else if(totZ==1&&totMass>mProt+mPi0)
-		          {
+            {
               piM   = mPi0;
               piPDG = 111;
             }
             else if(totZ==-1)
-		          {
+            {
               nucM  = mNeut;
               nucPDG= 2112;
@@ -2455,25 +2490,25 @@
             }
             else if(totZ==2)
-		          {
+            {
               piM   = mPi;
               piPDG = 211;
             }
             else
-			         {
+            {
               G4cerr<<"*G4Q::HQ:Z="<<totZ<<",B="<<totBN<<",E="<<envQC<<",Q="<<valQ<<G4endl;
-    	         throw G4QException("G4Quasmon::HadronizeQuasm: Pi + Nucleon decay error");
-            }
-		        }
+              throw G4QException("G4Quasmon::HadronizeQuasm: Pi + Nucleon decay error");
+            }
+          }
           else if(!totS)
-		        {
+          {
             if(!totZ)
-			         {
+            {
               nucM=mNeut;
               nucPDG=2112;
             }
             else if(totZ<0||totZ>1)
-			         {
+            {
               G4cerr<<"*G4Q::HQ:Z="<<totZ<<",B="<<totBN<<",E="<<envQC<<",Q="<<valQ<<G4endl;
-    	         throw G4QException("G4Quasmon::HadronizeQuasm:Photon+Nucleon decay error");
+              throw G4QException("G4Quasmon::HadronizeQuasm:Photon+Nucleon decay error");
             }
           }
@@ -2482,5 +2517,5 @@
           G4double sum=piM+nucM;
           if(fabs(totMass-sum)<eps)
-		        {
+          {
             pi4M=tot4M*(piM/sum);
             nuc4M=tot4M*(nucM/sum);
@@ -2490,8 +2525,8 @@
             G4cerr<<"***G4Q::HQ:T="<<tot4M<<totMass<<"->gam/pi/K("<<piM<<")+N="<<nucPDG
                   <<"("<<nucM<<")="<<sum<<G4endl;
-    	       throw G4QException("G4Quasmon::HadronizeQuasm:Gam/Pi/K+N decay error");
-          }
-#ifdef debug
-	         G4cout<<"G4Q::HQ:T="<<tot4M<<totMass<<"->GPK="<<piPDG<<pi4M<<"+B="<<nucPDG<<nuc4M
+            throw G4QException("G4Quasmon::HadronizeQuasm:Gam/Pi/K+N decay error");
+          }
+#ifdef debug
+          G4cout<<"G4Q::HQ:T="<<tot4M<<totMass<<"->GPK="<<piPDG<<pi4M<<"+B="<<nucPDG<<nuc4M
                 <<G4endl;
 #endif
@@ -2508,5 +2543,5 @@
                    <<", envPDG="<<envPDG<<G4endl;
 #endif
-	     }
+      }
       G4double dm=quasM-sMass;
 #ifdef debug
@@ -2515,7 +2550,7 @@
 #endif
       if(abs(dm)<.000001)
-	     {
+      {
         if(sPDG==iniPDG)
-	       {
+        {
           G4QHadron* quasH = new G4QHadron(iniPDG,q4Mom);//Create Hadron for Quasmon-Hadron
           FillHadronVector(quasH);                   // Fill "new quasH" (del. equivalent)
@@ -2523,15 +2558,15 @@
           qEnv=theEnvironment;                       // Keep initial environment
           return theQHadrons;                        // The last decay of the total nucleus
-	       }
+        }
         else G4cerr<<"---Warning---G4Q::HQ:Q=H,q="<<iniPDG<<",s="<<sPDG<<",d="<<dm<<G4endl;
-	     }
+      }
       G4double rWi=0.;
       if(rPDG!=10) rWi=G4QPDGCode(rPDG).GetWidth();
       if(rPDG!=10&&rMass>dm&&!rWi)   // Try to use the h-resonance width or reduce its spin
-	     {
+      {
         G4double sWi=G4QPDGCode(sPDG).GetWidth();
         G4double sMM=G4QPDGCode(sPDG).GetMass();
         if(sWi)                                      // Hadron is a resonance
-		      {
+        {
           G4double mmm=theWorld->GetQParticle(G4QPDGCode(sPDG))->MinMassOfFragm();
           G4double ddm=quasM-rMass;                  // Minimum mass of the sHadron
@@ -2554,7 +2589,7 @@
                   <<sWi<<G4endl;
 #endif
-		        }
+          }
           //else if(G4int ds1=abs(sPDG)%10>2)        // @@ Make it C-style ?: operator ?
-		        //{
+          //{
           //  G4int oPDG=sPDG;
           //  if   (sPDG>0&&sPDG%2==0)   sPDG-=ds1-2;
@@ -2564,6 +2599,6 @@
           //  sMass=G4QPDGCode(sPDG).GetMass();
           //  G4cout<<"**G4Q::HQ:sPDG="<<oPDG<<" changed to "<<sPDG<<",sM="<<sMass<<G4endl;
-		        //}
-		      }
+          //}
+        }
       }
       // First decay suppression for the final decay in 2 particles
@@ -2579,5 +2614,5 @@
         //if(dm>958. && rnd>.5) rPDG=331;
         if(dm>958.) rPDG=331;
-		      else rPDG=221;
+        else rPDG=221;
       }
       if(rPDG==221 && dm>958. && rnd>.5 ) rPDG=331;
@@ -2593,5 +2628,5 @@
              rMass > 782. && dm > 782. && rnd < .5) rPDG = 223; //0->omega
 
-      if ( rPDG == 331 && rMass > 1020. && dm > 1020. && rnd < .5) rPDG=333;    // eta' -> phi0
+      if ( rPDG == 331 && rMass > 1020. && dm > 1020. && rnd < .5) rPDG=333;// eta' -> phi0
 
       if(rPDG== 211 && dm>544. && rnd>.5) rPDG= 213; // M-1.5*W conv. of pi+ to rho+
@@ -2607,35 +2642,35 @@
 #endif
         if(reMass==0.)
-	       {
+        {
           if(sPDG==221 || sPDG==331)                 // Change eta-Candidate to pi/gamma
-	         {
+          {
             if     (sPDG==221) dm+=mEta-mPi0;
             else if(sPDG==331) dm+=mEtaP-mPi0;
             if(dm<0)
-			         {
+            {
               dm+=mPi0;
               sPDG=22;
               sMass=0.;
-			         }
+            }
             else
             {
               sPDG=111;
               sMass=mPi0;
-			         }
+            }
             if(dm<mPi0-.00001&&rPDG==111)
-			         {
+            {
               rPDG=22;
               reMass=0.;
-			         }
+            }
             else reMass=GetRandomMass(rPDG,dm);//Rerandomize mass of ResidQuasmon-Resonance
             if(reMass==0.)G4cerr<<"-W-G4Q::HQ:2,M="<<quasM<<",r="<<rPDG<<",d="<<dm<<G4endl;
-		        }
+          }
           else if(rPDG==111)                      // Make a photon out of the Resid Quasmon
-		        {
+          {
             rPDG=22;
             reMass=0.;
-		        }
+          }
           else
-		        {
+          {
             if(CheckGroundState()) ClearQuasmon();// This Quasmon is done
             //if(CheckGroundState(true)) KillQuasmon();// This Quasmon is done
@@ -2646,20 +2681,20 @@
             qEnv=theEnvironment;
             return theQHadrons;
-	         }
-        }
-	     }
+          }
+        }
+      }
       else if(rPDG==NUCPDG)
-	     {
+      {
         if(dm>mPi0)
         {
-		         rPDG=111;
+           rPDG=111;
            reMass=mPi0;
         }
         else
         {
-  		       rPDG=22;
+           rPDG=22;
            reMass=0.;
         }
-  	   }
+      }
       G4double freeRQM=rQPDG.GetMass();
       G4int    RQB = rQPDG.GetBaryNum();
@@ -2671,5 +2706,5 @@
       G4double sCB=theEnvironment.CoulombBarrier(sChg,sBaryn);
 #ifdef debug
-	     G4cout<<"G4Q::HQ:h="<<sCB<<",C="<<sChg<<",B="<<sBaryn<<",E="<<theEnvironment<<G4endl;
+      G4cout<<"G4Q::HQ:h="<<sCB<<",C="<<sChg<<",B="<<sBaryn<<",E="<<theEnvironment<<G4endl;
 #endif
       G4int rChg=rQPDG.GetCharge();
@@ -2681,6 +2716,9 @@
 #endif
       if ( totBN > 1 && totS >= 0 && envPDG > MINPDG && envPDG != NUCPDG &&
-          (reMass+sMass > quasM || sCB+rCB+reMass+sMass+envM > totMass || (!RQB && quasM < diPiM) ) )
-	     //if(2>3)                                      // This Evaporation channel is closed
+           (reMass+sMass > quasM || sCB+rCB+reMass+sMass+envM > totMass ||
+             (!RQB && quasM < diPiM)
+           )
+         )
+      //if(2>3)                                      // This Evaporation channel is closed
       {
 #ifdef ppdebug
@@ -2692,5 +2730,5 @@
         qEnv=theEnvironment;
         return theQHadrons;
-	     }
+      }
       if(rPDG==NUCPDG)                                
       {
@@ -2699,7 +2737,7 @@
       }
       if(rPDG==2212&&sPDG==311&&reMass+sMass>quasM)
-	     {
+      {
         if(mNeut+mK<=quasM+.001)
-		      {
+        {
           reMass=mNeut;
           rPDG  =2112;
@@ -2709,5 +2747,5 @@
           rCB=theEnvironment.CoulombBarrier(rChg,rBaryn);
 #ifdef debug
-	         G4cout<<"G4Q::HQ:NCB="<<rCB<<",NC="<<rChg<<",sB="<<sBaryn<<",r="<<rQPDG<<G4endl;
+          G4cout<<"G4Q::HQ:NCB="<<rCB<<",NC="<<rChg<<",sB="<<sBaryn<<",r="<<rQPDG<<G4endl;
 #endif
           freeRQM=mNeut;
@@ -2722,5 +2760,5 @@
           sCB=theEnvironment.CoulombBarrier(sChg,sBaryn);
 #ifdef debug
-	         G4cout<<"G4Q::HQ:KCB="<<sCB<<",KC="<<sChg<<",frB="<<sBaryn<<",E="<<theEnvironment
+          G4cout<<"G4Q::HQ:KCB="<<sCB<<",KC="<<sChg<<",frB="<<sBaryn<<",E="<<theEnvironment
                 <<G4endl;
 #endif
@@ -2751,5 +2789,5 @@
         q4Mom+=G4LorentzVector(0.,0.,0.,pMass);
       }
-	     G4double tmM=q4Mom.m()+.001;;
+      G4double tmM=q4Mom.m()+.001;;
       G4double sum=reMass+sMass;
       if(fabs(tmM-sum)<eps)
@@ -2773,5 +2811,5 @@
           G4double nreM=nNuc.GetGSMass();          // Mass of the new isotope
           if(tmM>mK+nreM)
-		        {
+          {
             sMass=mK;
             sPDG=321;
@@ -2795,5 +2833,5 @@
           }
           else
-		        {
+          {
             G4cerr<<"***G4Q::HQ:(O) KCor M="<<tmM<<"=>rPDG="<<rPDG<<"(rM="<<reMass
                   <<")+sPDG="<<sPDG<<"(sM="<<sMass<<")="<<sum<<G4endl;
@@ -2807,5 +2845,5 @@
           G4double nreM=nNuc.GetGSMass();          // Mass of the new isotope
           if(tmM>mK0+nreM)
-		        {
+          {
             sMass=mK0;
             sPDG=311;
@@ -2829,5 +2867,5 @@
           }
           else
-		        {
+          {
             G4cerr<<"***G4Q::HQ:(O) K0Cor M="<<tmM<<"=>rPDG="<<rPDG<<"(rM="<<reMass
                   <<")+sPDG="<<sPDG<<"(sM="<<sMass<<")="<<sum<<G4endl;
@@ -2841,5 +2879,5 @@
           G4double nreM=nNuc.GetGSMass();          // Mass of the new isotope
           if(tmM>mPi0+nreM)
-		        {
+          {
             sMass=mPi0;
             sPDG=111;
@@ -2863,5 +2901,5 @@
           }
           else if(tmM>nreM)
-		        {
+          {
             sMass=0.;
             sPDG=22;
@@ -2885,5 +2923,5 @@
           }
           else
-		        {
+          {
             G4cerr<<"***G4Q::HQ:(O) Pi+/Pi0Cor M="<<tmM<<"=>rPDG="<<rPDG<<"(rM="<<reMass
                   <<")+sPDG="<<sPDG<<"(sM="<<sMass<<")="<<sum<<G4endl;
@@ -2897,5 +2935,5 @@
           G4double nreM=nNuc.GetGSMass();          // Mass of the new isotope
           if(tmM>mPi0+nreM)
-		        {
+          {
             sMass=mPi0;
             sPDG=111;
@@ -2919,5 +2957,5 @@
           }
           else if(tmM>nreM)
-		        {
+          {
             sMass=0.;
             sPDG=22;
@@ -2942,5 +2980,5 @@
         }
         else if((sPDG==221 || sPDG==331) && tmM>mPi0+reMass)
-		      {
+        {
           sMass=mPi0;
           sPDG=111;
@@ -2960,5 +2998,5 @@
         }
         else if((sPDG==111 || sPDG==221 || sPDG==331) && tmM>reMass)
-		      {
+        {
           sMass=0.;
           sPDG=22;
@@ -3055,5 +3093,5 @@
           }
           else
-		        {
+          {
             G4cerr<<"***G4Q::HQ: LamToN M="<<tmM<<totQC<<"=>rM="<<nucM.GetPDG()<<","
                   <<nucZ.GetPDG()<<"("<<nreM<<","<<nreZ<<")+PiM/PiZ="<<mPi+nreM<<","
@@ -3063,5 +3101,5 @@
         }
         else if(tmM>iniQM)
-		      {
+        {
           G4QContent tmpSQC=G4QPDGCode(sPDG).GetQuarkContent();//QuarkContent of the hadron
           sMass=0.;
@@ -3086,5 +3124,5 @@
         }
         else if(totMass>resTNM+sMass) // Just decay in sPDG and total residual nucleus
-    	   {
+        {
           G4LorentzVector re4M = G4LorentzVector(0.,0.,0.,resTNM); //GSM of ResidTotEnvir
           G4LorentzVector rs4M = G4LorentzVector(0.,0.,0.,sMass);  //GSM of a Hadron
@@ -3095,5 +3133,5 @@
           G4double sum=resTNM+sMass;
           if(fabs(totMass-sum)<eps)
-		        {
+          {
             re4M=tot4M*(resTNM/sum);
             rs4M=tot4M*(sMass/sum);
@@ -3114,5 +3152,5 @@
               resTN.Set4Momentum(re4M);
               qEnv=resTN;                          // Create Nucleus for MovingResEnv
-												}
+            }
             else
             {
@@ -3120,11 +3158,11 @@
               FillHadronVector(envH);              // Fill MovingEnvironment (del.equiv)
               qEnv = vacuum;
-			         }
+            }
             ClearQuasmon();                         // This Quasmon is done
             return theQHadrons;                    // The last decay of the quasmon...
-		        }
+          }
         }
         else if(totMass>totM)         // Just decay in minimal total nucleus and gamma
-    	   {
+        {
           G4LorentzVector re4M = G4LorentzVector(0.,0.,0.,totM); // GSM of ResidTotEnvir
           G4LorentzVector rs4M = G4LorentzVector(0.,0.,0.,0.);   // GSM of a Photon
@@ -3146,5 +3184,5 @@
               totN.Set4Momentum(re4M);
               qEnv=totN;// Create Nucleus for MovingResEnv
-												}
+            }
             else
             {
@@ -3152,8 +3190,8 @@
               FillHadronVector(envH);              // Fill MovingEnvironment (del.equiv)
               qEnv = vacuum;
-			         }
+            }
             ClearQuasmon();                         // This Quasmon is done
             return theQHadrons;                    // The last decay of the quasmon...
-		        }
+          }
         }
         else
@@ -3161,16 +3199,16 @@
           G4cerr<<"***G4Q::HQ:M="<<tmM<<"=>rPDG="<<rPDG<<"(rM="<<reMass<<")+sPDG="
                 <<sPDG<<"(sM="<<sMass<<")="<<sum<<",QM="<<iniQM<<G4endl;
-										if(fabs(tmM-sum)<1.) // Just to avoid exception (Must be treated !)
-										//if(2>3)            // ------> Catch the under mass shell event
+          if(fabs(tmM-sum)<1.) // Just to avoid exception (Must be treated !)
+          //if(2>3)            // ------> Catch the under mass shell event
           {
             r4Mom=q4Mom*(reMass/sum);
             s4Mom=q4Mom*(sMass/sum);
           }
-										else throw G4QException("***G4Quasmon::HadronizeQuasmon:QHadr+SHadr DecayIn2");
+          else throw G4QException("***G4Quasmon::HadronizeQuasmon:QHadr+SHadr DecayIn2");
         }
       }
       G4double sKE=s4Mom.e()-sMass;
 #ifdef rdebug
-	     G4cout<<"G4Q::HQ:=2.3=>QHVect s4M="<<s4Mom<<",sPDG="<<sPDG<<", r4M/M="<<r4Mom<<reMass
+      G4cout<<"G4Q::HQ:=2.3=>QHVect s4M="<<s4Mom<<",sPDG="<<sPDG<<", r4M/M="<<r4Mom<<reMass
             <<",fR="<<freeRQM<<",fW="<<fRQW<<",PDG="<<rPDG<<",r="<<rCB<<",s="<<sCB<<G4endl;
 #endif
@@ -3178,5 +3216,5 @@
       //if(sKE<sCB||rKE<rCB)                  // => "KinEn is below CB, try once more" case
       if(sKE<sCB)                             // => "KinEn is below CB, try once more" case
-	     {
+      {
 #ifdef ppdebug
         G4cout<<"****G4Q::HQ:E-9: sKE="<<sKE<<"<sCB="<<sCB<<G4endl;
@@ -3186,5 +3224,5 @@
         qEnv=theEnvironment;
         return theQHadrons;
-	     }
+      }
       else if(abs(reMass-freeRQM)<fRQW||envPDG==NUCPDG)//=>"ResidQ is a GSHadron/Frag" case
       {
@@ -3194,5 +3232,5 @@
         FillHadronVector(curHadr2);                  // Fill "new curHadr2" (del. eq.)
 #ifdef rdebug
-	       G4cout<<"G4Q::HQ:DecayQuasmon "<<q4Mom<<" in 4M="<<r4Mom+s4Mom<<" RQ="<<rPDG<<r4Mom
+        G4cout<<"G4Q::HQ:DecayQuasmon "<<q4Mom<<" in 4M="<<r4Mom+s4Mom<<" RQ="<<rPDG<<r4Mom
               <<" + Fragment="<<sPDG<<s4Mom<<", Env="<<theEnvironment<<G4endl;
 #endif
@@ -3201,7 +3239,7 @@
         qEnv=theEnvironment;                        // Update the QEnvironment
         return theQHadrons;                         // This is theLastDecay of the quasmon
-	     }
+      }
       else                                           // => "Virtual Residual Quasmon" case
-	     {
+      {
         G4LorentzVector resTotN4Mom=r4Mom+G4LorentzVector(0.,0.,0.,envM);
         G4QContent resTotNQC=envQC+curQ;             // QCof possible residual nucleus
@@ -3210,5 +3248,5 @@
         G4double   resTotNM=resTotN.GetMZNS();       // Mass of the Total Residual Nucleus
         if(resTotN4Mom.m()<resTotNM)                 // Needs total evaporation
-		      {
+        {
           //if(totBN>1&&totMass>totM&&totS>=0)         //@@ ??
 #ifdef ppdebug
@@ -3221,5 +3259,5 @@
         }
         else                                         // Only theTotResidNucl can evaporate
-		      {
+        {
           G4QHadron* curHadr2 = new G4QHadron(sPDG,s4Mom);// Create Hadron for theOutHadron
           FillHadronVector(curHadr2);                // Fill "new curHadr2" (del.equiv.)
@@ -3249,29 +3287,29 @@
         }
       }
-	   }
+    }
 #ifdef rdebug
-	   else G4cout<<"G4Q::HQ:NO-OK,h="<<hsflag<<",d="<<fdul<<",M="<<rMass<<"<"<<reMass<<",M2="
+    else G4cout<<"G4Q::HQ:NO-OK,h="<<hsflag<<",d="<<fdul<<",M="<<rMass<<"<"<<reMass<<",M2="
                <<reTNM2<<"<I="<<tmpTM2<<",sP="<<sPDG<<",eP="<<envPDG<<",pP="<<pPDG<<G4endl;
 #endif
-	   if(!fskip)                                       // Continue search for fragmentation
-	   {
+    if(!fskip)                                       // Continue search for fragmentation
+    {
       // ==== From this point for nuclear fragments the procedure is just filling =====
 #ifdef debug
-	     G4int ePDG=theEnvironment.GetPDG();
+      G4int ePDG=theEnvironment.GetPDG();
       G4double frKin=fr4Mom.e()-sMass;
-	     G4cout<<"G4Q::HQ:>>"<<sPDG<<fr4Mom<<fr4Mom.m()<<"="<<sMass<<",T="<<frKin<<",E="<<ePDG
+      G4cout<<"G4Q::HQ:>>"<<sPDG<<fr4Mom<<fr4Mom.m()<<"="<<sMass<<",T="<<frKin<<",E="<<ePDG
             <<G4endl;
 #endif
       //if(sPDG<MINPDG&&(ePDG==NUCPDG||nQuasms==1)) //==>>"Hadron candidate in Vacuum" case
       //if(sPDG<MINPDG&&nQuasms==1) // ==>> "Hadron candidate with the only Quasmon" case
-	     if(sPDG<MINPDG)                         // Hadronic decay is always in vacuum @@??
+      if(sPDG<MINPDG)                         // Hadronic decay is always in vacuum @@??
       {
         G4int SQ=totQC.GetStrangeness();
 #ifdef debug
-	       G4cout<<"G4Q::HQ: sPDG="<<sPDG<<", sM="<<sMass<<", SQ="<<SQ<<G4endl;
+        G4cout<<"G4Q::HQ: sPDG="<<sPDG<<", sM="<<sMass<<", SQ="<<SQ<<G4endl;
 #endif
         if(!sPDG&&SQ<0&&nQuasms==1) // decay Of Tot(Q+Env) in K+/aK0 & residual
-		      //if(!sPDG&&SQ<0)           // decay in K+/aK0 & residual
-		      {
+        //if(!sPDG&&SQ<0)           // decay in K+/aK0 & residual
+        {
           sPDG=321;
           sMass=mK;
@@ -3289,5 +3327,5 @@
           {
 #ifdef ppdebug
-	    G4cout<<"G4Q::HQ:***PANIC#2***tM="<<totMass<<"<KM="<<mK<<","<<mK0<<",rM="<<rKPM
+            G4cout<<"G4Q::HQ:***PANIC#2***tM="<<totMass<<"<KM="<<mK<<","<<mK0<<",rM="<<rKPM
                   <<","<<rK0M<<",d="<<mK+rKPM-totMass<<","<<mK0+rK0M-totMass<<G4endl;
             throw G4QException("G4Quasmon::HadronizeQuasmon: Why PANIC? (2)"); //@@ TMP
@@ -3296,19 +3334,19 @@
             qEnv=theEnvironment;                     // Update the QEnvironment
             return theQHadrons;
-		        }
+          }
           if(rKPM + mK > rK0M + mK0)
-		        {
+          {
             rPDG  = rK0PDG;                          // PDG of the Residual System to K0
             rMass = rK0M;
             sPDG  = 311;
             sMass = mK0;
-		        }
+          }
           else
-		        {
+          {
             rPDG  = rKPPDG;                          // PDG of the Residual System to K+
             rMass = rKPM;
             sPDG  = 321;
             sMass = mK;
-		        }
+          }
           G4double ctM=tot4M.m();
           G4LorentzVector r4Mom(0.,0.,0.,rMass);
@@ -3316,5 +3354,5 @@
           G4double sum=rMass+sMass;
           if(fabs(ctM-sum)<eps)
-		        {
+          {
             r4Mom=tot4M*(rMass/sum);
             s4Mom=tot4M*(sMass/sum);
@@ -3324,8 +3362,8 @@
             G4cerr<<"***G4Q::HQ:tM="<<ctM<<totQC<<" => rPDG="<<rPDG<<"(rM="<<rMass
                   <<") + sPDG="<<sPDG<<"(sM="<<sMass<<")="<<sum<<G4endl;
-    	       throw G4QException("***G4Quasmon::HadrQuasm:K+ResNuc DecayIn2 didn't succeed");
-          }
-#ifdef debug
-	         G4cout<<"G4Q::HQ:===2.4===>HadrVec s="<<sPDG<<s4Mom<<",r="<<rPDG<<r4Mom<<G4endl;
+            throw G4QException("***G4Quasmon::HadrQuasm:K+ResNuc DecayIn2 didn't succeed");
+          }
+#ifdef debug
+          G4cout<<"G4Q::HQ:===2.4===>HadrVec s="<<sPDG<<s4Mom<<",r="<<rPDG<<r4Mom<<G4endl;
 #endif
           //@@CHECK CoulBar and may be evaporate instead
@@ -3337,69 +3375,69 @@
           qEnv=vacuum;
           return theQHadrons;                        // This is theLastDecay of the Quasmon
-		      }
+        }
         G4bool ffin=false;                           // Flag of FinalDecayInGamma+Residual
         if(quasM<rMass+sMass&&(sPDG==221||sPDG==331))// Change eta-Candidate or any to pi
-	       {
+        {
           sPDG = 111;
           sMass=mPi0;
-	       }
+        }
         else if(!sPDG)
-		      {
+        {
           if     (iniS<0&&iniQChg+iniQChg>=iniBN)    // Try to decay in K+
-		        {
+          {
             sPDG = 321;
             sMass= mK;
             G4QNucleus totQN(valQ+KpQC);             // Nucleus Residual after Kp sub.
             rPDG = totQN.GetPDG();
-		          rMass= totQN.GetMZNS();
-		        }
+            rMass= totQN.GetMZNS();
+          }
           else if(iniS<0)                            // Try to decay in K0
-		        {
+          {
             sPDG = 311;
             sMass= mK0;
             G4QNucleus totQN(valQ+K0QC);             // Nucleus Residual after K0 sub.
             rPDG = totQN.GetPDG();
-		          rMass= totQN.GetMZNS();
-		        }
+            rMass= totQN.GetMZNS();
+          }
           else if(iniQChg>iniBN-iniS)                // Try to decay in Pi+
-		        {
+          {
             sPDG = 211;
             sMass= mPi;
             G4QNucleus totQN(valQ-PiQC);             // Nucleus Residual after Pi+ sub.
             rPDG = totQN.GetPDG();
-		          rMass= totQN.GetMZNS();
-		        }
+            rMass= totQN.GetMZNS();
+          }
           else if(iniQChg<0)                         // Try to decay in Pi-
-		        {
+          {
             sPDG = -211;
             sMass= mPi;
             G4QNucleus totQN(valQ+PiQC);             // Nucleus Residual after Pi- sub.
             rPDG = totQN.GetPDG();
-		          rMass= totQN.GetMZNS();
-		        }
+            rMass= totQN.GetMZNS();
+          }
           else if(quasM>iniQM+mPi0)                  // Try to decay in Pi0
-		        {
+          {
             sPDG = 111;
             sMass= mPi0;
             rPDG = iniPDG;
-		          rMass= iniQM;
-		        }
-		        else                                       // Decay in gamma as a final decision
-		        {
+            rMass= iniQM;
+          }
+          else                                       // Decay in gamma as a final decision
+          {
             sPDG = 22;
             sMass= 0.;
             rPDG = iniPDG;
-		          rMass= iniQM;
-		        }
+            rMass= iniQM;
+          }
           ffin = true;
-		      }
-#ifdef debug
-	       G4cout<<"G4Q::HQ:MQ="<<q4Mom.m()<<"->sPDG="<<sPDG<<"(M="<<sMass<<") + rPDG="<<rPDG
+        }
+#ifdef debug
+        G4cout<<"G4Q::HQ:MQ="<<q4Mom.m()<<"->sPDG="<<sPDG<<"(M="<<sMass<<") + rPDG="<<rPDG
               <<"(M="<<rMass<<")"<<",S="<<rMass+sMass<<G4endl;
 #endif
         if(q4Mom.m()+.003<rMass+sMass)
-		      {
-#ifdef debug
-	         G4cerr<<"G4Q::HQ:***PANIC#3***tM="<<q4Mom.m()<<"<rM="<<rMass<<",sM="<<sMass
+        {
+#ifdef debug
+          G4cerr<<"G4Q::HQ:***PANIC#3***tM="<<q4Mom.m()<<"<rM="<<rMass<<",sM="<<sMass
                 <<",d="<<rMass+sMass-q4Mom.m()<<G4endl;
 #endif
@@ -3410,5 +3448,5 @@
           qEnv=theEnvironment;                       // Update the QEnvironment
           return theQHadrons;
-		      }
+        }
         G4double cqM=q4Mom.m();
         G4LorentzVector resQ4Mom(0.,0.,0.,rMass);    // 4-mom of residual Quasmon in CMS
@@ -3416,5 +3454,5 @@
         G4double sum=rMass+sMass;
         if(fabs(cqM-sum)<eps)
-		      {
+        {
           resQ4Mom=q4Mom*(rMass/sum);
           s4Mom=q4Mom*(sMass/sum);
@@ -3424,31 +3462,28 @@
           G4cerr<<"***G4Quasmon::HadronizeQuasmon: MQ="<<cqM<<"-> rPDG="<<rPDG<<", (M="
                 <<rMass<<") + sPDG="<<sPDG<<"(M="<<sMass<<")="<<sum<<G4endl;
-	         throw G4QException("G4Quasmon::HadronizeQuas:Quasm+Hadr DecayIn2 error");
-        }
-#ifdef debug
-	       G4cout<<"G4Q::HQ:Decay of Quasmon="<<q4Mom<<"->s="<<sPDG<<s4Mom<<"+R="<<resQ4Mom
+          throw G4QException("G4Quasmon::HadronizeQuas:Quasm+Hadr DecayIn2 error");
+        }
+#ifdef debug
+        G4cout<<"G4Q::HQ:Decay of Quasmon="<<q4Mom<<"->s="<<sPDG<<s4Mom<<"+R="<<resQ4Mom
               <<",f="<<ffin<<G4endl;
 #endif
         G4QHadron* candHadr = new G4QHadron(sPDG,s4Mom);// Creation Hadron for Candidate
         if(ffin)
-		      {
+        {
           //@@CHECK CoulBar and may be evaporate instead
           theQHadrons.push_back(candHadr);           // Fill the emergency PHOTON (del.eq.)
           G4QHadron* candHRes = new G4QHadron(rPDG,resQ4Mom);// Creation Hadron for QResid
           FillHadronVector(candHRes);                // Fill "new candHRes" (del.equiv.)
-#ifdef debug
-          G4cerr<<"---Warning---G4Q::HQ:EmergencyHd="<<sPDG<<",E="<<theEnvironment<<G4endl;
-#endif
           ClearQuasmon();                            // This Quasmon is done
           qEnv=theEnvironment;
           return theQHadrons;
-		      }
+        }
         else
-		      {
+        {
           G4QContent outQC = G4QPDGCode(sPDG).GetQuarkContent();
           G4int outChg     = outQC.GetCharge();
-          G4double outProb=1.;
+          G4double outProb = 1.;
           if(theEnvironment.GetPDG()>NUCPDG)
-										{
+          {
             G4int outBar   = outQC.GetBaryonNumber();
             G4double outCB = theEnvironment.CoulombBarrier(outChg,outBar);//ChrgIsNeglected
@@ -3478,8 +3513,8 @@
             delete candHadr;                         // As a result DoNothing
           }
-		      }
+        }
       }
       else                                           // ===>"HadronInNuclMedia or NuclCand"
-	     {
+      {
         // Now the CoulBar reflection should be taken into account
         G4QContent outQC = G4QPDGCode(sPDG).GetQuarkContent();
@@ -3523,14 +3558,14 @@
 #ifdef debug
           G4cout<<"G4Q::HQ:QuarkExchHadronizThroughCB Q="<<valQ<<",trQC="<<transQC<<G4endl;
-#endif	  
+#endif   
           sumL-=theEnvironment.Get4Momentum()+q4Mom+fr4Mom;
 #ifdef debug
           G4cout<<"G4Q::HQ:status=1,>>>>>>>>> NuclearMatter SUBCHECK >>>>>>"<<sumL<<G4endl;
-#endif	  
+#endif   
           status=1;                                  // Something was successfuly done
           phot4M=zeroLV;
           piF=false;
           gaF=false;
-	       }
+        }
         else
         {
@@ -3543,20 +3578,20 @@
             status=3;
             if(gaF)
-			         {
+            {
               phot4M=zeroLV;
               gaF=false;
             }
-		        //}
-		      }
-      }
-	   } // End of skip
+          //}
+        }
+      }
+    } // End of skip
     // === Check of boundary to escape not existing state of residual nucleus ===
     if(CheckGroundState())
-	   //if(CheckGroundState(true))
-	   {
+    //if(CheckGroundState(true))
+    {
       ClearQuasmon();                           // This Quasmon is done
       qEnv=theEnvironment;
       return theQHadrons;      
-	   }
+    }
     G4LorentzVector sumLor=theEnvironment.Get4Momentum()+q4Mom+check;
 #ifdef debug
@@ -3664,6 +3699,6 @@
 #endif
   if(thePDG>80000000 && (thePDG<90000000 || thePDG%1000>500 || thePDG%1000000>500000)
-	 && thePDG!=90002999 && thePDG!=89999003 && thePDG!=90003998 && thePDG!=89998004
-	 && thePDG!=90003999 && thePDG!=89999004 && thePDG!=90004998 && thePDG!=89998005)
+  && thePDG!=90002999 && thePDG!=89999003 && thePDG!=90003998 && thePDG!=89998004
+  && thePDG!=90003999 && thePDG!=89999004 && thePDG!=90004998 && thePDG!=89998005)
   { // Translation from CHIPS encoding to PDG encoding @@ change to NuclToHadr
     if     (thePDG==90999999) thePDG=-311;  // anti-K0 === Meson OCTET
@@ -3701,9 +3736,9 @@
     G4int h2PDG = h2QC.GetSPDGCode();        // PDGCode of the First Hadron
     if(!h1PDG || !h2PDG)
-	   {
+    {
       G4cerr<<"***FillHV:h1QC="<<h1QC<<"(PDG="<<h1PDG<<"),h2QC="<<h2QC<<"(PDG="<<h2PDG<<")"
             <<G4endl;
-	     throw G4QException("G4Quasmon::FillHadronVector: Cipolino cann't be defragmented");
-	   }
+      throw G4QException("G4Quasmon::FillHadronVector: Cipolino cann't be defragmented");
+    }
     G4QHadron* fHadr = new G4QHadron(h1PDG); // the First Hadron is created
     G4QHadron* sHadr = new G4QHadron(h2PDG); // the Second Hadron is created
@@ -3716,5 +3751,5 @@
       G4cerr<<"***G4Q::FillHadrV:ChipQC"<<chipQC<<":PDG1="<<h1PDG<<",PDG2="<<h2PDG<<G4endl;
       theQHadrons.push_back(qH);             // No decay (delete equivalent)
-	   }
+    }
     else
     {
@@ -3738,8 +3773,8 @@
     G4int    bA     =qNuc.GetA();            // A#of baryons in the Nucleus
 #ifdef pdebug
-	   G4cout<<"G4Quasm::FillHadrVect:Nucl="<<qNuc<<",nPDG="<<thePDG<<",GSM="<<GSMass<<G4endl;
+    G4cout<<"G4Quasm::FillHadrVect:Nucl="<<qNuc<<",nPDG="<<thePDG<<",GSM="<<GSMass<<G4endl;
 #endif
     if((nN<0||nZ<0||nS<0)&&bA>0)             // => "Anti-strangeness or ISOBAR" case
-	   {
+    {
       G4double m1=mPi;                       // Prototypes for the nZ<0 case
       G4int  PDG1=-211;
@@ -3765,5 +3800,5 @@
           PDG2=newN0.GetPDG();
         }
-	     }
+      }
       else if(nS>0&&nZ+nN>0)
       {
@@ -3784,12 +3819,12 @@
           m2         =newNp.GetMZNS();
         }
-	     }
+      }
       else if(nN<0)
-	     {
+      {
         PDG1       =211;
         G4QNucleus  newNpp(totQC-PiQC);
         PDG2       =newNpp.GetPDG();
         m2         =newNpp.GetMZNS();
-	     }
+      }
       if(fragMas>m1+m2)                      // => "can decay" case
       {
@@ -3797,9 +3832,9 @@
         G4LorentzVector qe4M(0.,0.,0.,m2);
         if(!qH->DecayIn2(fq4M,qe4M))
-	       {
+        {
           G4cerr<<"***G4Quasm::FillHadrV: QM="<<t.m()<<"-> Mes="<<PDG1<<"(M="
-	  	        <<m1<<") + ResA="<<PDG2<<"(M="<<m2<<")"<<G4endl;
-	         throw G4QException("G4Quasm::FillHadrV: Mes+ResA DecayIn2 did not succeed");
-	       }
+            <<m1<<") + ResA="<<PDG2<<"(M="<<m2<<")"<<G4endl;
+          throw G4QException("G4Quasm::FillHadrV: Mes+ResA DecayIn2 did not succeed");
+        }
         delete qH;
         G4QHadron* H1 = new G4QHadron(PDG1,fq4M);
@@ -3807,7 +3842,7 @@
         G4QHadron* H2 = new G4QHadron(PDG2,qe4M);
         FillHadronVector(H2);                // (delete equivalent)
-	     }
+      }
       else if(fabs(m1+m2-fragMas)<0.01)      // Split the 4-momentum
-	     {
+      {
         G4double r1=m1/fragMas;
         G4double r2=1.-r1;
@@ -3821,24 +3856,24 @@
         G4QHadron* H2 = new G4QHadron(PDG2,r2*t);
         FillHadronVector(H2);                  // (delete equivalent)
-	     }
+      }
       else
-	     {
+      {
 #ifdef pdebug
         G4cerr<<"-Warning-G4Q::FillHVec:PDG="<<thePDG<<"("<<t.m()<<","<<fragMas<<") < Mes="
               <<PDG1<<"("<<m1<<") + ResA="<<PDG2<<"("<<m2<<"), d="<<fragMas-m1-m2<<G4endl;
-	       //throw G4QException("G4Quasm::FillHadrVec: mass of decaying hadron is too small");
+        //throw G4QException("G4Quasm::FillHadrVec: mass of decaying hadron is too small");
 #endif
         theQHadrons.push_back(qH); // FillAsIs to correct later in G4QEnvironment (Warning)
-	     }
-	   }
+      }
+    }
     else if(abs(fragMas-GSMass)<.1)            // the Nucleus is too close the Ground State
     {
 #ifdef pdebug
-	     G4cout<<"G4Quasm::FillHadrVect: Ground state"<<G4endl;
+      G4cout<<"G4Quasm::FillHadrVect: Ground state"<<G4endl;
 #endif
       G4double nResM  =1000000.;               // Prototype of residualMass for the neutron
       G4int    nResPDG=0;                      // Prototype of PDGCode for the neutron
       if(nN>0&&bA>1)                           // It's nucleus and there is the neutron
-	     {
+      {
         G4QContent resQC=totQC-neutQC;
         G4QNucleus resN(resQC);                // Pseudo nucleus for the Residual Nucleus
@@ -3848,9 +3883,9 @@
         else if(nResPDG==91000000) nResM=mLamb;
         else nResM=resN.GetMZNS();             // min mass of the Residual Nucleus
-	     }
+      }
       G4double pResM  =1000000.;               // Prototype of residualMass for the proton
       G4int    pResPDG=0;                      // Prototype of PDGCode of the proton
       if(nZ>0&&bA>1)                           // It's nucleus and there is theroton
-	     {
+      {
         G4QContent resQC=totQC-protQC;
         G4QNucleus resN(resQC);                // Pseudo nucleus for the Residual Nucleus
@@ -3860,9 +3895,9 @@
         else if(pResPDG==91000000) pResM=mLamb;
         else pResM  =resN.GetMZNS();           // min mass of the Residual Nucleus
-	     }
+      }
       G4double lResM  =1000000.;               // Prototype of residualMass for the Lambda
       G4int    lResPDG=0;                      // Prototype of PDGCode of the Lambda
       if(nS>0&&bA>1)                           // It's nucleus and there is the Lambda
-	     {
+      {
         G4QContent resQC=totQC-lambQC;
         G4QNucleus resN(resQC);                // Pseudo nucleus for the Residual Nucleus
@@ -3872,5 +3907,5 @@
         else if(lResPDG==91000000) lResM=mLamb;
         else lResM  =resN.GetMZNS();           // min mass of the Residual Nucleus
-	     }
+      }
 #ifdef pdebug
       G4cout<<"G4Quasm::FillHadrVec:rP="<<pResPDG<<",rN="<<nResPDG<<",rL="<<lResPDG<<",nN="
@@ -3881,5 +3916,5 @@
            (bA > 1 && ( (nN > 0 && fragMas > nResM+mNeut) || 
                         (nZ > 0 && fragMas > pResM+mProt) || 
-			(nS > 0 && fragMas > lResM+mLamb) ) ) )
+   (nS > 0 && fragMas > lResM+mLamb) ) ) )
       {
         G4int barPDG = 90002002;
@@ -3888,36 +3923,36 @@
         G4double resM= mAlph;
 
-	if (fragMas > nResM+mNeut) {  // Can radiate a neutron (priority 1)
+ if (fragMas > nResM+mNeut) {  // Can radiate a neutron (priority 1)
           barPDG = 90000001;
           resPDG = nResPDG;
           barM= mNeut;
           resM= nResM;
-	}
-	else if(fragMas>pResM+mProt)  // Can radiate a proton (priority 2)
-	{
+ }
+ else if(fragMas>pResM+mProt)  // Can radiate a proton (priority 2)
+ {
           barPDG=90001000;
           resPDG=pResPDG;
           barM  =mProt;
           resM  =pResM;
-	}
-	else if(fragMas>lResM+mLamb)  // Can radiate a Lambda (priority 3)
-    	{
+ }
+ else if(fragMas>lResM+mLamb)  // Can radiate a Lambda (priority 3)
+     {
           barPDG=91000000;
           resPDG=lResPDG;
           barM  =mLamb;
           resM  =lResM;
-	}
+ }
         else if(thePDG!=90004004&&fragMas>GSMass)// If it's not Be8 decay in gamma
-	{
+ {
           barPDG=22;
           resPDG=thePDG;
           barM  =0.;
           resM  =pResM;
-	}
+ }
         else if(thePDG!=90004004)
-	{
+ {
           G4cerr<<"***G4Q::FillHadV:PDG="<<thePDG<<",M="<<fragMas<<"<GSM="<<GSMass<<G4endl;
           throw G4QException("***G4Quasmon::FillHadronVector: Below GSM but cann't decay");
-	}
+ }
 
         G4LorentzVector a4Mom(0.,0.,0.,barM);
@@ -3927,5 +3962,5 @@
           theQHadrons.push_back(qH);            // No decay (delete equivalent)
           G4cerr<<"---Warning---G4Q::FillHadronVector: Be8 decay did not succeed"<<G4endl;
-	       }
+        }
         else
         {
@@ -3940,27 +3975,29 @@
           FillHadronVector(HadrR);             // Fill 2nd Hadron (delete equivalent)
         }
-	     }
+      }
       else
       {
 #ifdef pdebug
-	       G4cout<<"G4Quasm::FillHadrVect: Leave as it is"<<G4endl;
+        G4cout<<"G4Quasm::FillHadrVect: Leave as it is"<<G4endl;
 #endif
         theQHadrons.push_back(qH);             // No decay  (delete equivalent)
-	     }
+      }
     }
     else if (fragMas<GSMass)
-	   {
+    {
       G4cerr<<"***G4Q::FillHV:M="<<fragMas<<">GSM="<<GSMass<<",d="<<fragMas-GSMass<<G4endl;
-      throw G4QException("***G4Quasmon::FillHadronVector:Mass is below theGroundStateVal");
-	   }
+      //throw G4QException("*G4Quasmon::FillHadronVector:Mass is below theGroundStateVal");
+      G4cout<<"***>>>G4Quasm::FillHadrVect: Leave as it is Instead of Exception"<<G4endl;
+      theQHadrons.push_back(qH);              // Fill As Is  (delete equivalent)
+    }
     else if (bA==1&&fragMas>GSMass)
-	   {
+    {
       G4int gamPDG=22;
       G4double gamM=0.;
       if(fragMas>mPi0+GSMass)
-	     {
+      {
         gamPDG=111;
         gamM=mPi0;
-	     }
+      }
       G4LorentzVector a4Mom(0.,0.,0.,gamM);
       G4LorentzVector b4Mom(0.,0.,0.,GSMass);
@@ -3969,5 +4006,5 @@
         theQHadrons.push_back(qH);         // No decay (delete equivalent)
         G4cerr<<"---Warning---G4Q::FillHadrVect:N*->gamma/pi0+N decay error"<<G4endl;
-	     }
+      }
       else
       {
@@ -3979,5 +4016,5 @@
     }
     else                                   // ===> Evaporation of excited system
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4Quasm::FillHadrVect:Evaporate "<<thePDG<<",tM="<<fragMas<<" > GS="<<GSMass
@@ -3987,12 +4024,12 @@
       G4QHadron* rHadron = new G4QHadron;
       if(!qNuc.EvaporateBaryon(bHadron,rHadron))
-	     {
+      {
         G4cerr<<"---Warning---G4Q::FillHV:Evaporate PDG="<<thePDG<<",M="<<fragMas<<G4endl;
         delete bHadron;
         delete rHadron;
         theQHadrons.push_back(qH);         // Fill hadron in the HadronVector as it is
-	     }
+      }
       else
-	     {
+      {
 #ifdef pdebug
         G4cout<<"G4Q::FlHV:Done,b="<<bHadron->GetQPDG()<<",r="<<rHadron->GetQPDG()<<G4endl;
@@ -4002,5 +4039,5 @@
         FillHadronVector(rHadron);          // Fill Residual Nucl. (delete equivalent)
       }
-	   }
+    }
   }
   else                                 // Try to decay the QHadron (delete equivalent)
@@ -4059,5 +4096,5 @@
     G4cerr<<"***G4Q::GetQPM: kMax="<<kMax<<", kMin="<<kMin<<", kLim="<<kLim<<", MQ="<<qMass
           <<", n="<<nOfQ<<G4endl;
-	   throw G4QException("G4Quasmon::GetQPartonMomentum: Can not generate quark-parton");   
+    throw G4QException("G4Quasmon::GetQPartonMomentum: Can not generate quark-parton");   
   }
 #ifdef pdebug
@@ -4076,5 +4113,5 @@
     if (kMax>=kLim) vRndm = vRndm*pow((1.-xMin),n)*(1.+n*xMin);   // "xMin - 1." Range 
     else
-	   {
+    {
       G4double xMax=kMax/kLim;
       G4double vRmin = pow((1.-xMin),n)*(1.+n*xMin);
@@ -4091,6 +4128,6 @@
   if (vRndm<=0. || vRndm>1.)
   {
-    //G4cout<<"-Warning-G4Quasmon::GetQPM: R="<<vRndm<<",kMi="<<kMin<<",kMa="<<kMax<<",kLi="
-    //      <<kLim<<G4endl;
+    //G4cout<<"-Warning-G4Quasmon::GetQPM: R="<<vRndm<<",kMi="<<kMin<<",kMa="<<kMax
+    //      <<",kLi="<<kLim<<G4endl;
     if(vRndm<=0.) vRndm=1.e-9;
     else if(vRndm>1.) vRndm=1.;
@@ -4128,5 +4165,5 @@
     G4double od = c - vRndm;   // the old Residual Difference
 #ifdef pdebug
-	   G4cout<<"G4Q::GetQPMom:>>>First x="<<x<<", n="<<n<<", f="<<f<<", d/R(first)="
+    G4cout<<"G4Q::GetQPMom:>>>First x="<<x<<", n="<<n<<", f="<<f<<", d/R(first)="
             <<od/vRndm<<G4endl;
 #endif
@@ -4134,5 +4171,5 @@
     if(nitMax>100)nitMax=100; // But it is limited by 100
     while( abs(d/vRndm) > 0.001 && it <= nitMax) // Solve the equation by Newton method
-	   {
+    {
       x  = x + f*od/(r*nx*(fn+1.)); // Calculate the new x value
       if(x<1.e-27) x=1.e-27;
@@ -4159,11 +4196,11 @@
       }
       else
-	     {
+      {
         if (f>1.0001&&f<27.) f=1.+(f-1.)*2; // Make a regular correction of OptStepFactor
         if (f<0.99999999999) f=1.+(1.-f)/2.;
         if (f>=27.) f=27.;
-	     }
-#ifdef pdebug
-	     G4cout<<"G4Q::GetQPMom: Iter#"<<it<<": (c="<<c<<" - R="<<vRndm<<")/R ="<<d/vRndm
+      }
+#ifdef pdebug
+      G4cout<<"G4Q::GetQPMom: Iter#"<<it<<": (c="<<c<<" - R="<<vRndm<<")/R ="<<d/vRndm
             <<", x="<<x<<", f="<<f<<G4endl;
 #endif
@@ -4178,5 +4215,5 @@
       ox = x;
       it++;
-	   }
+    }
 #ifdef pdebug
     if(it>nitMax) G4cout<<"G4Q::GetQPMom: a#of iterations > nitMax="<<nitMax<<G4endl;
@@ -4197,5 +4234,5 @@
   //  if (kMax>=kLim) vRndm = vRndm*pow((1.-xMin),n);   // Shrink to the "xMin - 1." Range 
   //  else
-	 //  {
+  //  {
   //    G4double xMax=kMax/kLim;          // Maximum value for "x"
   //    G4double vRmin = pow((1.-xMin),n); 
@@ -4290,5 +4327,5 @@
     if(asSea<sSea) sSea=asSea;
     if(sSea>nMaxStrangeSea) // @@@@@@@ Too many strange sea ??????
-	   {
+    {
 #ifdef pdebug
       G4cout<<"G4Q::Calc#ofQP:**Reduce** S="<<sSea<<",aS="<<asSea<<",maxS="<<nMaxStrangeSea
@@ -4299,5 +4336,5 @@
       valQ.DecAS(sSea);
       valQ.IncQAQ(sSea,0.); // Add notstrange sea ????????
-	   }
+    }
   }
   // @@ Chocolate rule --- Temporary (?)
@@ -4338,5 +4375,5 @@
     G4double   frM=cQPDG.GetMass();            // Vacuum mass of the candidate
     if(cPDG>80000000&&cPDG!=90000000)          // Modify Fragments toTakeIntoAccount CurNuc
-	   {
+    {
       if(totMass<tmpTM+frM)
       {
@@ -4346,5 +4383,5 @@
 #endif
         curCand->SetPossibility(false);
-	     }
+      }
       G4QNucleus cNuc(cPDG);                   // Fake nucleus for the Candidate
       G4int cP = cNuc.GetZ();                  // A#of protons in the Current Environment
@@ -4362,5 +4399,5 @@
         if(cP==eP&&cN==eN&&cL==eL)clME=cQPDG.GetMass();// The only notBoundCluster of Envir
         else                                   // Bound Cluster in the Environment
-		      {
+        {
           renvM = cQPDG.GetNuclMass(eP-cP,eN-cN,eL-cL); // Mass of residual for Environment
           clME  = envM-renvM;
@@ -4368,5 +4405,5 @@
         if(cP==tP&&cN==tN&&cL==tL)clMN=cQPDG.GetMass(); // The only NotBoundCluster of TotN
         else                                   // Bound Cluster in Total Nucleus
-		      {
+        {
           renvM = cQPDG.GetNuclMass(tP-cP,tN-cN,tL-cL); // TotalResidualNucleus Mass
           clMN   = totM-renvM;
@@ -4380,7 +4417,7 @@
               <<renvM<<G4endl;
 #endif
-	     }
+      }
       else curCand->SetParPossibility(false);
-	   } // @@ Modification of hadron masses in nuclear matter are not implemented yet
+    } // @@ Modification of hadron masses in nuclear matter are not implemented yet
   }
 } // End of "ModifyInMatterCandidates"
@@ -4450,5 +4487,6 @@
     G4double probability = 0.;
     G4double secondProbab = 0.;
-    if ( (aPDG > 80000000 && envA > 0) || aPDG < 80000000) {
+    if ( (aPDG > 80000000 && envA > 0) || aPDG < 80000000)
+    {
       G4int resPDG=0;
       G4double comb=0.;                       // Combinatorial factor for quark exchange
@@ -4471,12 +4509,12 @@
         cPDG==90000002||cPDG==90001001||cPDG==90001002||cPDG==90002001||cPDG==90002002;
       if(pPrint) G4cout<<"G4Q::CHP:==****==>>>c="<<cPDG<<",dUD="<<dUD<<",pos="<<pos<<",eA="
-                     <<envA<<",tM="<<totMass<<" > tmpTM+frM="<<tmpTM+frM<<G4endl;
-#endif
-	     //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<1)))// 1 ** never try
-	     if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<2)))//2 ***The best***
-	     //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<3))) // 3 *** good ***
-				  //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<4)))//4 almost the same
-				  //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000))) // no restrictions
-	     {
+                       <<envA<<",tM="<<totMass<<" > tmpTM+frM="<<tmpTM+frM<<G4endl;
+#endif
+      //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<1)))// 1 ** never try
+      if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<2)))//2 ***The best***
+      //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<3))) // 3 *** good ***
+      //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<4)))//4 almost the same
+      //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000))) // no restrictions
+      {
         G4QContent curQ = valQ;                 // Make current copy of theQuasmonQuarkCont
         G4int baryn= candQC.GetBaryonNumber();  // Baryon number of the Candidate
@@ -4505,12 +4543,12 @@
           G4int oQmin=0;                        // Returning from cluster quarks: d=0,u=1
           G4int oQmax=2;                        // 2 is bigger than u-quark (1, oq<2) @@ 3?
-		        if     (dofU<=nofD) iQmax=1;          // Too many Dquarks (in-Uquark is forbiden)
+          if     (dofU<=nofD) iQmax=1;          // Too many Dquarks (in-Uquark is forbiden)
           else if(dofD<=nofU) iQmin=1;          // Too many Uquarks (in-Dquark is forbiden)
           // @@ This is how netrons are increased for the pion capture at rest case @@
           if(piF)                             // force Pi- transfer its charge to a quark
-		        {
+          {
             iQmin=0;
             iQmax=1;
-		        }
+          }
 #ifdef pdebug
           if(pPrint)G4cout<<"G4Q::CHP:***!!!***>>F="<<cPDG<<",mF="<<frM<<",iq:"<<iQmin<<","
@@ -4518,5 +4556,5 @@
 #endif
           if(iQmax>iQmin) for(int iq=iQmin; iq<iQmax; iq++) // Entering (fromQuasmon) quark
-		        {
+          {
             G4double qFact=1.;
             //if(iq==1&&addPhoton>0.) qFact=4.; // @@ taftology
@@ -4527,5 +4565,5 @@
               if(pPrint) G4cout<<"G4Q::CHP:photon cap(gaF) is enhanced for Uquark"<<G4endl;
 #endif
-		          }
+            }
             G4double nqInQ=0.;                 // A#of quarks of this sort in a Quasmon
             if     (!iq)   nqInQ=valQ.GetD();
@@ -4538,10 +4576,10 @@
 #endif
             if(oQmax>oQmin) for(int oq=oQmin; oq<oQmax; oq++) // Exiting (to Quasmon) quark
-		          {
+            {
               G4int shift= cQPDG.GetRelCrossIndex(iq, oq);
               G4QContent ioQC=cQPDG.GetExQContent(iq, oq);
               G4QContent resQC=valQ+ioQC;         // Quark Content of the residual Quasmon
 #ifdef sdebug
-			           G4cout<<"G4Q::CHP:iq="<<iq<<",oq="<<oq<<",QC="<<ioQC<<",rQC="<<resQC<<G4endl;
+              G4cout<<"G4Q::CHP:iq="<<iq<<",oq="<<oq<<",QC="<<ioQC<<",rQC="<<resQC<<G4endl;
 #endif
               G4QPDGCode resQPDG(resQC);          // QPDG of the residual Quasmon
@@ -4559,28 +4597,26 @@
                        (resU+resS>resD+resD||resD+resS>resU+resU);
               //if(resQ>-2&&resPDG&&resPDG!=10&&!rI)// The Residual Quasmon is possible
-	      //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&!piF) // *** Never try this
-	      //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||cPDG==90000001))
+              //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&!piF) // *** Never try this
+              //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||cPDG==90000001))
               //G4cout<<"G4Q::CHP:PiF="<<piF<<G4endl;
               // The best:
-	      //if(resQ>-2 &&resPDG && resPDG!=10 && !rI && (!piF||piF && cPDG!=90001000 ))
-
-	      if (resQ > -2 && resPDG && resPDG != 10 && !rI && 
-                 (!piF || 
-		  (piF && 
-                   (cPDG != 90001000 || G4UniformRand() < .333333) && 
-                   cPDG != 90002001 && 
-                   cPDG != 90002002) ) )
-
-		//cPDG!=90001000||G4UniformRand()<.333333))
-		//(cPDG!=90001000||G4UniformRand()<.5)&&cPDG!=90002001&&cPDG!=90002002))
-		//cPDG!=90001000&&cPDG!=90002001&&cPDG!=90002002))
-		//-----------------------------------------------------------------
-			           //if(resQ>-2 && resPDG && resPDG!=10 && !rI && (!piF||piF&&baryn>1))
-			           //if(resQ>-2 && resPDG && resPDG!=10 && !rI) // baryons are too energetic
-			           //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||baryn==1)) // bad
-	      {
+              //if(resQ>-2 &&resPDG && resPDG!=10 && !rI && (!piF||piF && cPDG!=90001000 ))
+              if (resQ > -2 && resPDG && resPDG != 10 && !rI && 
+                   (!piF || ( piF && (cPDG != 90001000 || G4UniformRand() < .333333) && 
+                              cPDG != 90002001 && cPDG != 90002002
+                            )
+                   )
+                 )
+              //cPDG!=90001000||G4UniformRand()<.333333))
+              //(cPDG!=90001000||G4UniformRand()<.5)&&cPDG!=90002001&&cPDG!=90002002))
+              //cPDG!=90001000&&cPDG!=90002001&&cPDG!=90002002))
+              //-----------------------------------------------------------------
+              //if(resQ>-2 && resPDG && resPDG!=10 && !rI && (!piF||piF&&baryn>1))
+              //if(resQ>-2 && resPDG && resPDG!=10 && !rI) // baryons are too energetic
+              //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||baryn==1)) // bad
+              {
                 G4int is=index+shift;
                 if(shift!=7&&is<maxC)             // This quark exchange is possible
-			             {
+                {
                   G4QCandidate* parCand=theQCandidates[is];//Pointer to ParentClusterOfCand
                   G4QContent parQC = parCand->GetQC();     // QuarkCont of theParentCluster
@@ -4611,51 +4647,52 @@
                     //********* ISOTOPIC  FOCUSING  *******************
                     // ==== Old (First Publication) Complicated rule ====
-				                //if(
-				                //  //zZ<3 &&
+                    //if(
+                    //  //zZ<3 &&
                     //  //(
-				                //  abs(dI)<1 ||
-				                //  (barot==1 && (
+                    //  abs(dI)<1 ||
+                    //  (barot==1 && (
                     //     abs(dI)<2&&abs(cC-charge)<2 ||
-				                //     (dI>=2&&cC<charge)   || (dI<=-2&&cC>charge)
+                    //     (dI>=2&&cC<charge)   || (dI<=-2&&cC>charge)
                     //     //dI==2&&cC<=charge || dI==-2&&cC>=charge ||
                     //     //dI>2&&cC<charge   || dI<-2&&cC>charge
-				                //   )) || 
-				                //   (barot>1&&barot<3
-				                //     && (
-				                //     abs(dI)<2&&abs(cC-charge)<2 ||
+                    //   )) || 
+                    //   (barot>1&&barot<3
+                    //     && (
+                    //     abs(dI)<2&&abs(cC-charge)<2 ||
                     //     //dI>=2&&cC<charge   || dI<=-2&&cC>charge
-				                //     dI<=2&&cC<=charge || dI==-2&&cC>=charge ||
-				                //     dI>2&&cC<charge   || dI<-2&&cC>charge
-				                //   )) ||
-				                //   (barot>2&&barot<4
-				                //    && (
-				                //     abs(dI)<2&&abs(cC-charge)<2 ||
+                    //     dI<=2&&cC<=charge || dI==-2&&cC>=charge ||
+                    //     dI>2&&cC<charge   || dI<-2&&cC>charge
+                    //   )) ||
+                    //   (barot>2&&barot<4
+                    //    && (
+                    //     abs(dI)<2&&abs(cC-charge)<2 ||
                     //     //dI>=2&&cC<charge   || dI<=-2&&cC>charge
-				                //     dI<=2&&cC<=charge || dI==-3&&cC>=charge ||
-				                //     dI>2&&cC<charge   || dI<-3&&cC>charge
-				                //   )) ||
-				                //   (barot>3
-				                //    && (
-				                //     abs(dI)<2&&abs(cC-charge)<2 ||
+                    //     dI<=2&&cC<=charge || dI==-3&&cC>=charge ||
+                    //     dI>2&&cC<charge   || dI<-3&&cC>charge
+                    //   )) ||
+                    //   (barot>3
+                    //    && (
+                    //     abs(dI)<2&&abs(cC-charge)<2 ||
                     //     dI>=2&&cC<charge   || dI<=-2&&cC>charge
-				                //     //dI<=2&&cC<=charge || dI==-3&&cC>=charge ||
-				                //     //dI>2&&cC<charge   || dI<-3&&cC>charge
-				                //    )
+                    //     //dI<=2&&cC<=charge || dI==-3&&cC>=charge ||
+                    //     //dI>2&&cC<charge   || dI<-3&&cC>charge
+                    //    )
                     //   )
-				                //  )
+                    //  )
                     // ==== Just a coridor =======
-	      					//if(abs(dS)<3||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrForB=1(old)
-				                //if(abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrongFor1(<4)
-				                //if(baryn>1||abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//SIFF1
-				                //if(!piF&&abs(dS)<4 || piF&&abs(dS)<3) // UniversalIsoFocusing
-				                //if(!piF&&first&&abs(dS)<4 || (!piF&&!first||piF)&&abs(dS)<3)//ExpIsoF
-
-		    if ( (!piF && first && baryn < 3) || 
-                         (!piF && !first) || 
-                         (piF && abs(dS) < 3) ) 
-                                                // ExpIsoFoc
-				                //if(!qIso&&!dC||qIso>0&&dC<0||qIso<0&&dC>0)//MediumIsoFocusingForAll
-				                //if(abs(dS)<3) // Universal IsotopeFocusing(<3) (Best for pi-capture)
-				                //if(abs(dS)<4) // Never try this (**)
+                    //if(abs(dS)<3||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrForB=1(old)
+                    //if(abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrongFor1(<4)
+                    //if(baryn>1||abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//SIFF1
+                    //if(!piF&&abs(dS)<4 || piF&&abs(dS)<3) // UniversalIsoFocusing
+                    //if(!piF&&first&&abs(dS)<4 || (!piF&&!first||piF)&&abs(dS)<3)//ExpIsoF
+                    // *** Recent correction (****
+                    //if ( (!piF && first && baryn < 3) || 
+                    //     (!piF && !first) || 
+                    if ( (!piF && first && baryn < 3) || 
+                         (!piF && !first && baryn < 5 ) || 
+                         (piF && abs(dS) < 3) ) // Isotopic focusing for AtRest Reactions
+                    //if(!qIso&&!dC||qIso>0&&dC<0||qIso<0&&dC>0)//MediumIsoFocusingForAll
+                    //if(abs(dS)<3) // Universal IsotopeFocusing(<3) (Best for pi-capture)
+                    //if(abs(dS)<4) // Never try this (**)
                     //if(3>2)       //***>>> ***NO*** Isotope Focusing ***
                     {
@@ -4674,5 +4711,6 @@
                       else if(resPDG)minM=G4QPDGCode(resPDG).GetMass();//ResidQuasmonHadron
                       G4double bNM2=nucBM*nucBM;
-                      G4double nDelta=(frM2-bNM2)/(nucBM+nucBM);
+                      G4double nDelta=0.;
+                      if(nucBM)nDelta=(frM2-bNM2)/(nucBM+nucBM);    // Safety check
 #ifdef pdebug
                       G4int    iniPDG =valQ.GetSPDGCode();
@@ -4683,5 +4721,5 @@
                                       <<kCut<<",E="<<E<<">"<<nDelta<<",p="<<parPDG<<G4endl;
 #endif
-					                 if(resPDG&&minM>0.) // Kinematical analysis of hadronization
+                      if(resPDG&&minM>0.) // Kinematical analysis of hadronization
                       {
 #ifdef pdebug
@@ -4738,12 +4776,11 @@
                         //if(envM>boundM)
                         if ( (envA-barot <= bEn && envM > boundM) || envA-barot > bEn)
-  			       //if(2>3)
+                        //if(2>3)        // *** Recent correction ***
                         {
                           minBM=rtM;
                           // *** LIM ***
-                          if(envA-barot>bEn) minBM-=mbEn;
-                          else
-                            minBM-=envM-boundM; // MinResidualBoundedQuasmonMass
-					                   }
+                          if(envA-barot > bEn) minBM-=mbEn;
+                          else         minBM-=envM-boundM; // MinResidualBoundedQuasmonMass
+                        }
                         G4double minBM2=minBM*minBM+.1;
                         G4double minM2=minM*minM+.1;
@@ -4754,20 +4791,20 @@
                                          <<(mintM2-rtQ2)/rtEP/2<<G4endl;
 #endif
-					                   G4double newh=1.;
+                        G4double newh=1.;
                         // == (@@) Historical additional cuts for q_min ===
                         //G4double nc=1.-(dkLS-E-E)/boundM;   // q_min=k-E
                         G4double nc=1.-(dkLS-E-E+CB+CB)/boundM;   // q_min=k-E+CB
-					                   G4double newl=0.;
+                        G4double newl=0.;
 #ifdef pdebug
                         if(pPrint) G4cout<<"G4Q::CHP:qi_k-E="<<nc<<",k="<<kLS<<",E="<<E
                                          <<",M="<<boundM<<G4endl;
 #endif
-                        if(nc>0.&&nc<1.&&nc<ne)
+                        if(nc > 0. && nc < 1. && nc < ne)
                         {
                           ne=nc;
                           newh=pow(nc,cNQ);
-                          if(newh<kf) kf=newh;
+                          if(newh < kf) kf=newh;
                         }
-                        else if(nc<=0.)kf=0.;
+                        else if(nc <= 0.) kf=0.;
 
                         //G4double nk=1.-(dkd-Em-Em)/boundM;  // q_min=(k-delta)-E*(M-m)/M
@@ -4776,5 +4813,5 @@
                         //               <<",M="<<totMass<<G4endl;
 #endif
-                        //if(nk>0.&&nk<1.&&nk<ne)
+                        //if(nk > 0. && nk < 1. && nk < ne)
                         //{
                         //  ne=nk;
@@ -4782,5 +4819,5 @@
                         //  if(newh<kf) kf=newh;
                         //}
-                        //else if(nk<=0.)kf=0.;
+                        //else if(nk <= 0.) kf=0.;
 
                         //G4double mex=frM+Em;
@@ -4791,5 +4828,5 @@
                         //                <<",M="<<frM<<G4endl;
 #endif
-                        //if(np>0.&&np<1.&&np<ne)
+                        //if(np > 0. && np < 1. && np < ne)
                         //{
                         //  ne=np;
@@ -4797,5 +4834,5 @@
                         //  if(newh<kf) kf=newh;
                         //}
-                        //else if(np<=0.)kf=0.;
+                        //else if(np <= 0.) kf=0.;
 
                         //G4double mix=boundM+E;
@@ -4804,5 +4841,5 @@
                         ////G4double mix=nucBM+E-CB;
                         G4double st=0.;
-                        if(mix>frM) st=sqrt(mix*mix-frM2);
+                        if(mix > frM) st=sqrt(mix*mix-frM2);
                         G4double nq=1.-(dkLS-st-st)/boundM;//qi=k-sq((m+E*(M-m)/M)^2-m^2)
 #ifdef pdebug
@@ -4810,10 +4847,10 @@
                                          <<mix<<",M="<<frM<<G4endl;
 #endif
-                        if(nq>0.&&nq<1.&&nq<ne)
-																								//if(2>3)  // Does not make any difference
+                        if(nq > 0. && nq < 1. && nq < ne)
+                        //if(2>3)  // Does not make any difference
                         {
                           ne=nq;
                           newh=pow(nq,cNQ);
-                          if(newh<kf) kf=newh;
+                          if(newh < kf) kf=newh;
                         }
                         else if(nq<=0.)kf=0.;
@@ -4825,11 +4862,11 @@
                         //G4bool atrest=(eQ-mQ)/mQ<.001; // Q at rest (only PiCap)
                         // ***VTN*** CHECK IsNecessety toRecover theColTotRes to MinMassTot
-					                   if(mintM2>rtQ2) //==> Check of ResidualTotalNucleus ** Always **
-																								//if(2>3)  // Negligable difference difference
+                        if(mintM2>rtQ2) //==> Check of ResidualTotalNucleus ** Always **
+                        //if(2>3)  // Negligable difference difference
                         {
                           G4double nz=0.;
-						                    if(atrest) nz=1.-(mintM2-rtQ2+pmk*dked)/(boundM*(rtEP+pmk));
+                          if(atrest) nz=1.-(mintM2-rtQ2+pmk*dked)/(boundM*(rtEP+pmk));
                           else       nz=1.-(mintM2-rtQ2)/(boundM*rtEP);
-						                    //if(atrest) nz=1.-(mintM2-rtQ2+pmk*dkd)/(nucBM*(rtEP+pmk));
+                          //if(atrest) nz=1.-(mintM2-rtQ2+pmk*dkd)/(nucBM*(rtEP+pmk));
                           //else       nz=1.-(mintM2-rtQ2)/(nucBM*rtEP);
 #ifdef pdebug
@@ -4837,41 +4874,44 @@
                                            <<mintM2<<">"<<rtQ2<<G4endl;
 #endif
-                          if(nz>0.&&nz<1.&&nz<ne)
+                          if(nz > 0. && nz < 1. && nz < ne)
                           {
                             ne=nz;
                             newh=pow(nz,cNQ);
-                            if(newh<kf) kf=newh;
+                            if(newh < kf) kf=newh;
                           }
-                          else if(nz<=0.)kf=0.;
+                          else if(nz <= 0.) kf=0.;
                         }
                         // *** VBQ *** CHECK Residual Quazmon (Never use: reduces PS)
-					                   //if(minBM2>rQ2&&!piF&&!gaF&&baryn>3) // ==>Check ResidVirtualQuasm
-					                   //if(minBM2>rQ2&&!piF&&!gaF&&baryn>2) // ==>Check ResidVirtualQuasm
+                        //if(minBM2>rQ2&&!piF&&!gaF&&baryn>3) // ==>Check ResidVirtualQuasm
+                        //if(minBM2>rQ2&&!piF&&!gaF&&baryn>2) // ==>Check ResidVirtualQuasm
                         //if(minBM2>rQ2&&!piF&&!gaF) // ==> Check of ResidualVirtualQuasmon
-					                   //if(minBM2>rQ2&&baryn>2)//==>Check of ResidualVirtualQuasmon**OK**
-					                   //if(minBM2>rQ2&&baryn>1)//==>Check ResidualVirtualQuasm **Better**
-					                   //if(minBM2>rQ2&&piF&&(cPDG==90000001||cPDG==90002002))//CheckRVirQ
-					                   //if(minBM2>rQ2&&piF&&(cPDG==90000001||baryn>3))//CheckResidVirtQua
-					                   //if(minBM2>rQ2&&(piF&&cPDG==90000001||baryn>2))//CheckResidVirtQua
-					                   //if(minBM2>rQ2&&baryn>2) // ==> Check of Residual Virtual Quasmon
-					                   //if(minBM2>rQ2&&!piF&&baryn>2&&cPDG!=90001002)//ResidVirtQuasmon
-					                   //if(minBM2>rQ2&&!piF&&baryn>2)//==>Check of ResidualVirtualQuasmon
-					                   //if(minBM2>rQ2&&!piF&&baryn>3)//==>Check of ResidualVirtualQuasmon
-					                   //if(minBM2>rQ2&&!piF&&baryn>1)//==>Check of ResidualVirtualQuasmon
-					                   //if(minBM2>rQ2&&!piF&&!gaF)// ==> Check of ResidualVirtualQuasmon
-					                   //if(minBM2>rQ2&&!piF)// ==> Check of ResidualVirtualQuasmon ALWAYS
-					                   //if(minBM2>rQ2&&piF&&baryn>3)//==>Check of ResidualVirtualQuasmon
-					                   //if(minBM2>rQ2&&piF&&(baryn==1||baryn>2))//==>Check ResidVirtQ
-					                   //if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001||G4UniformRand()<.5)))
-					                   //if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001)))
+                        //if(minBM2>rQ2&&baryn>2)//==>Check of ResidualVirtualQuasmon**OK**
+                        //if(minBM2>rQ2&&baryn>1)//==>Check ResidualVirtualQuasm **Better**
+                        //if(minBM2>rQ2&&piF&&(cPDG==90000001||cPDG==90002002))//CheckRVirQ
+                        //if(minBM2>rQ2&&piF&&(cPDG==90000001||baryn>3))//CheckResidVirtQua
+                        //if(minBM2>rQ2&&(piF&&cPDG==90000001||baryn>2))//CheckResidVirtQua
+                        //if(minBM2>rQ2&&baryn>2) // ==> Check of Residual Virtual Quasmon
+                        //if(minBM2>rQ2&&!piF&&baryn>2&&cPDG!=90001002)//ResidVirtQuasmon
+                        //if(minBM2>rQ2&&!piF&&baryn>2)//==>Check of ResidualVirtualQuasmon
+                        //if(minBM2>rQ2&&!piF&&baryn>3)//==>Check of ResidualVirtualQuasmon
+                        //if(minBM2>rQ2&&!piF&&baryn>1)//==>Check of ResidualVirtualQuasmon
+                        //if(minBM2>rQ2&&!piF&&!gaF)// ==> Check of ResidualVirtualQuasmon
+                        //if(minBM2>rQ2&&!piF)// ==> Check of ResidualVirtualQuasmon ALWAYS
+                        //if(minBM2>rQ2&&piF&&baryn>3)//==>Check of ResidualVirtualQuasmon
+                        //if(minBM2>rQ2&&piF&&(baryn==1||baryn>2))//==>Check ResidVirtQ
+                        //if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001||G4UniformRand()<.5)))
+                        //if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001)))
                         //if(minBM2>rQ2&&(!piF&&baryn>4 || piF && cPDG!=90000001 &&
-		   	if (minBM2 > rQ2 && 
-                            (!piF || 
-                            (piF && 
-                             cPDG != 90000001 && 
-                             cPDG != 90001001 && 
-                             cPDG != 90001002) ) )      
-                                                           //if(minBM2>rQ2) // ==> Check of Residual (Virtual?) Quasmon
-			      				   //if(2>3)
+                        if (minBM2 > rQ2 && 
+                             ( !piF || 
+                               ( piF
+                                 && cPDG != 90000001
+                                 &&  cPDG != 90001001
+                                 &&  cPDG != 90001002
+                               )
+                             )
+                           )      
+                        //if(minBM2>rQ2) // ==> Check of Residual (Virtual?) Quasmon
+                        //if(2>3)
                         {
                           G4double nz=0.;
@@ -4880,8 +4920,8 @@
                           //if(atrest) nz=1.-(minBM2-rQ2+pmk*dkd)/(nucBM*(rEP+pmk));
                           //else       nz=1.-(minBM2-rQ2)/(nucBM*rEP);
-#ifdef pdebug		  
+#ifdef pdebug    
                           if(pPrint) G4cout<<"G4Q::CHP:q="<<nz<<",a="<<atrest<<",QM2="
                                            <<minM2<<">"<<rQ2<<G4endl;
-#endif				  
+#endif      
                           if(nz>0.&&nz<1.&&nz<ne)
                           {
@@ -4893,29 +4933,29 @@
                         }
                         // *** VRQ *** CHECK Min Residual Quazmon (Never use: reduces PS)
-					                   //if(minM2>rQ2&&baryn>3)       // ==> Check of Residual Quasmon
-					                   //if(minM2>rQ2&&!piF&&!gaF&&baryn>3)// ==> Check of ResidualQuasmon
-					                   //if(minM2>rQ2&&!piF&&baryn>1)      // ==> Check of ResidualQuasmon
-					                   //if(minM2>rQ2&&!piF&&baryn>2)      // ==> Check of ResidualQuasmon
-					                   //if(minM2>rQ2&&!piF&&baryn>2&&cPDG!=90001002)//=>CheckResidQuasmon
-					                   //if(minM2>rQ2&&!piF&&baryn>3) // ==> Check Residual Quasmon **OK**
-					                   //if(minM2>rQ2&&!piF&&!gaF)       // ==> Check of Residual Quasmon
-					                   //if(minM2>rQ2&&!piF)       // ==> Check of Residual Quasmon
-					                   //if(minM2>rQ2&&piF)       // ==> Check of Residual Quasmon
-					                   //if(minM2>rQ2&&baryn>1) // ==> Check Residual Quasmon **Better**
-					                   //if(minM2>rQ2&&(baryn>1||!piF))//==>CheckResidualQuasmon**Better**
-					                   //if(minM2>rQ2&&baryn>1&&cPDG!=90002002) //==> CheckResidualQuasmon
-					                   //if(minM2>rQ2&&!piF) // ==> Check of Residual Quasmon
-					                   //if(minM2>rQ2&&baryn>3) //=>CheckResidQuasmon *** The Best ***
-					                   //if(minM2>rQ2 && (!piF || piF &&
+                        //if(minM2>rQ2&&baryn>3)       // ==> Check of Residual Quasmon
+                        //if(minM2>rQ2&&!piF&&!gaF&&baryn>3)// ==> Check of ResidualQuasmon
+                        //if(minM2>rQ2&&!piF&&baryn>1)      // ==> Check of ResidualQuasmon
+                        //if(minM2>rQ2&&!piF&&baryn>2)      // ==> Check of ResidualQuasmon
+                        //if(minM2>rQ2&&!piF&&baryn>2&&cPDG!=90001002)//=>CheckResidQuasmon
+                        //if(minM2>rQ2&&!piF&&baryn>3) // ==> Check Residual Quasmon **OK**
+                        //if(minM2>rQ2&&!piF&&!gaF)       // ==> Check of Residual Quasmon
+                        //if(minM2>rQ2&&!piF)       // ==> Check of Residual Quasmon
+                        //if(minM2>rQ2&&piF)       // ==> Check of Residual Quasmon
+                        //if(minM2>rQ2&&baryn>1) // ==> Check Residual Quasmon **Better**
+                        //if(minM2>rQ2&&(baryn>1||!piF))//==>CheckResidualQuasmon**Better**
+                        //if(minM2>rQ2&&baryn>1&&cPDG!=90002002) //==> CheckResidualQuasmon
+                        //if(minM2>rQ2&&!piF) // ==> Check of Residual Quasmon
+                        //if(minM2>rQ2&&baryn>3) //=>CheckResidQuasmon *** The Best ***
+                        //if(minM2>rQ2 && (!piF || piF &&
                         //if(minM2>rQ2 && (!piF&&baryn>3 || piF &&
-
-			if (minM2 > rQ2 && 
-                            ( (!piF && baryn > 4) || 
-                              (piF &&
-                              (cPDG != 90000001 || G4UniformRand() > .3333333) && 
-			       cPDG != 90001001) ) )
-                            //cPDG!=90001001) )
-			    //if(minM2>rQ2)            // ==> Check of Residual Quasmon
-			    //if(2>3)
+                        if ( minM2 > rQ2 && 
+                             ( (!piF && baryn > 4) || 
+                               (piF && (cPDG != 90000001 || G4UniformRand() > .3333333) && 
+                                cPDG != 90001001)
+                             )
+                           )
+                        //cPDG!=90001001) )
+                        //if(minM2>rQ2)            // ==> Check of Residual Quasmon
+                        //if(2>3)
                         {
                           G4double nz=0.;
@@ -5072,30 +5112,30 @@
                         curParC->SetNQPart2(cNQ);  // Keep #of quark-partons in theFragment
 #ifdef sdebug
-		 	                    G4cout<<"G4Q::CalcHP: FillParentClaster="<<*curParC<<G4endl;
+                        G4cout<<"G4Q::CalcHP: FillParentClaster="<<*curParC<<G4endl;
 #endif
                         curCand->FillPClustVec(curParC);//FillParentClust to ParClVec(d.e.)
                         comb += probab;
 #ifdef pdebug
-		 	                    if(pPrint) G4cout<<"G4Q::CHP:in="<<index<<",cPDG="<<cPDG<<",pc"<<pc
+                        if(pPrint) G4cout<<"G4Q::CHP:in="<<index<<",cPDG="<<cPDG<<",pc"<<pc
                                          <<parQC<<",Env="<<theEnvironment<<",comb="<<comb
                                          <<",posib="<<parCand->GetParPossibility()<<G4endl;
 #endif
                         pc++;
-					                 }
-				                }
+                      }
+                    }
 #ifdef sdebug
-				                else G4cout<<"***G4Q::CHP:dI="<<dI<<",cC="<<cC<<G4endl;
-#endif
-				              }
-			             }                             // >>>> End of if of QuarkExchangePossibility
-			           }                               // +++> End of if of existinr residual Q Code
+                    else G4cout<<"***G4Q::CHP:dI="<<dI<<",cC="<<cC<<G4endl;
+#endif
+                  }
+                }                             // >>>> End of if of QuarkExchangePossibility
+              }                               // +++> End of if of existinr residual Q Code
               probability+=comb;              // Collect the probability for the fragment
 #ifdef pdebug
-	 	           if(pPrint) G4cout<<"G4Q::CHPr: probab="<<probability<<"("<<comb<<"),iq="<<iq
+              if(pPrint) G4cout<<"G4Q::CHPr: probab="<<probability<<"("<<comb<<"),iq="<<iq
                                <<",oq="<<oq<<G4endl;
 #endif
-		          }                                 // ...> End of Quark Exchange "oq" Test LOOP
-		        }                                   // ...> End of Quark Exchange "iq" Test LOOP
-	       }                                     // ---> End of Nuclear Case of fragmentation
+            }                                 // ...> End of Quark Exchange "oq" Test LOOP
+          }                                   // ...> End of Quark Exchange "iq" Test LOOP
+        }                                     // ---> End of Nuclear Case of fragmentation
         else if(cPDG<80000000)                // ===> Hadron case (QUark FUsion mechanism)
         {
@@ -5111,6 +5151,6 @@
             if (curhPDG== 211) npip++;
             if (curhPDG==-211) npin++;
-		        }
-		        // End of the hadron counting
+          }
+          // End of the hadron counting
           comb = valQ.NOfCombinations(candQC);
           if(!comb)
@@ -5163,5 +5203,5 @@
           if (comb && resPDG && totMass > frM-CB+resTM &&
              ((resPDG > 80000000 && resPDG != 90000000) || resPDG<10000) )
-	  {
+   {
 #ifdef pdebug
             if(priCon) G4cout<<"G4Q::CHP:ind="<<index<<",qQC="<<valQ<<mQ<<",cPDG="<<cPDG
@@ -5196,5 +5236,5 @@
 #endif
             if(resM>0. && resQCode>-2)
-	           {
+            {
               G4double limM=mQ-resM;
               G4double rndM=GetRandomMass(cPDG,limM);// Candidate's Mass randomization
@@ -5202,11 +5242,11 @@
               G4double cMass=G4QPDGCode(cPDG).GetMass();
               if(aPDG<10000&&aPDG%10<3)
-			           //if(aPDG<10000&&aPDG%10<5)
-			           G4cout<<"G4Q::CHP:rndM="<<rndM<<",limM="<<limM<<" > cM="<<cMass<<" ,rM+fM="
+              //if(aPDG<10000&&aPDG%10<5)
+              G4cout<<"G4Q::CHP:rndM="<<rndM<<",limM="<<limM<<" > cM="<<cMass<<" ,rM+fM="
                     <<resM+rndM<<" < mQ="<<mQ<<G4endl;
 #endif
               // --- Kinematical Factors ---
               if(rndM>0. && resM+rndM<mQ)
-	             {
+              {
                 curCand->SetEBMass(rndM);   // Set RandomizedEnvBoundMass of the Candidate
                 curCand->SetNBMass(rndM);   // Set RandomizedNotBoundMass of the Candidate
@@ -5219,5 +5259,5 @@
                 //zMin= mR2/mQ/(mQ-dk);       // z_min for Quasmon-Baryon @@ ?? @@
                 if(qBar) zMin= mR2/mQ/(mQ-dk);       // z_min for Quasmon-Baryon @@ ?? @@
-			             G4double possibility=zMax-zMin;
+                G4double possibility=zMax-zMin;
 #ifdef pdebug
                 if(priCon) G4cout<<"G4Q::CHP:M="<<rndM<<",ps="<<possibility<<",zMax="<<zMax
@@ -5226,10 +5266,10 @@
 #endif
                 if (resPDG==10)                      // Chipolino case - check minimum
-		              {
+                {
                   G4double rM2 = mQk*(mQ-rHk);
                   if(rM2<resM*resM) possibility = 0.;
                 }
                 if (possibility>0. && vap>0 && zMax>zMin)
-	               {
+                {
                   probability = vaf*(pow(zMax, vap)-pow(zMin, vap));
 #ifdef pdebug
@@ -5249,10 +5289,10 @@
                   {
                     if(cPDG==110||cPDG==220||cPDG==330) probability*=comb; // f0 has spin 0
-			                 else probability*=comb*(abs(cPDG)%10); // Spin of resonance
-				              }
-	               }
+                    else probability*=comb*(abs(cPDG)%10); // Spin of resonance
+                  }
+                }
               }
               else
-		            {
+              {
 #ifdef pdebug
                 if(priCon) G4cout<<"G4Q::CHP:cM=0[cPDG"<<cPDG<<"],mQ/QC="<<mQ<<valQ<<",rM="
@@ -5260,15 +5300,15 @@
 #endif
               }
-	           }
+            }
             else
-	           {
+            {
 #ifdef pdebug
               if(priCon) G4cout<<"***G4Q::CHP: M=0, #"<<index<<valQ<<",cPDH="<<cPDG<<"+rP="
                                <<resPDG<<curQ<<G4endl;
 #endif
-	           }
+            }
           }
           else
-	         {
+          {
             probability=0.;
 #ifdef pdebug
@@ -5277,5 +5317,5 @@
                              <<"+rTM="<<resTM<<"-CB="<<CB<< G4endl;
 #endif
-	         }
+          }
           //if(cPDG==111) secondProbab = 1.;
         }// ---> End of Hadronic Case of fragmentation
@@ -5344,27 +5384,27 @@
 #endif
     if(bsCond)                           // Decay rignht away in Fragment & residual
-	   {
+    {
       G4QContent fragmQC=protQC;
-	     G4double fragmM=mProt;
+      G4double fragmM=mProt;
       if(bsCond==2112)
-	     {
+      {
         fragmQC=neutQC;
-	       fragmM=mNeut;
-	     }
+        fragmM=mNeut;
+      }
       else if(bsCond==3122)
-	     {
+      {
         fragmQC=lambQC;
-	       fragmM=mLamb;
-	     }
+        fragmM=mLamb;
+      }
       else if(bsCond==90001001)
-	     {
+      {
         fragmQC=deutQC;
-	       fragmM=mDeut;
-	     }
+        fragmM=mDeut;
+      }
       else if(bsCond==90002002)
-	     {
+      {
         fragmQC=alphQC;
-	       fragmM=mAlph;
-	     }
+        fragmM=mAlph;
+      }
       G4QContent rsQC=valQ-fragmQC;
       G4QNucleus rsQN(rsQC);              // TemporaryNucleus for the ResidualVacuumQuasmon
@@ -5381,10 +5421,10 @@
         FillHadronVector(fragH);          // Fill ResidQuasmHadron (delete equivalent)
         return true;
-	     }
+      }
       else
-	     {
+      {
         delete quasH;
         delete fragH;
-	     }
+      }
     }
   }
@@ -5402,10 +5442,10 @@
     G4QHadron*  theLast = theQHadrons[nOfOUT-1];
     if(!(theLast->GetNFragments()) && theLast->GetPDGCode()!=22)//NotDecayedHadron & NotGam
-	   {
+    {
       G4LorentzVector hadr4M=theLast->Get4Momentum();
       G4double  hadrMa=hadr4M.m();        // Mass of the Last hadron (==GSMass)
       G4LorentzVector tmpTLV=reTLV+hadr4M;// Tot (ResidNucl+LastHadron) 4-Mom
 #ifdef pdebug
-	     G4cout<<"G4Q::CheckGS:YES,T="<<tmpTLV<<tmpTLV.m()<<">rM+hM="<<resSMa+hadrMa<<G4endl;
+      G4cout<<"G4Q::CheckGS:YES,T="<<tmpTLV<<tmpTLV.m()<<">rM+hM="<<resSMa+hadrMa<<G4endl;
 #endif
       if(tmpTLV.m()>resSMa+hadrMa)        // resMa contains 2 Hadrons: resQ and Environ
@@ -5430,6 +5470,6 @@
             FillHadronVector(quasH);              // Fill ResidQuasm Hadron (del.equiv.)
             theLast->Set4Momentum(hadr4M);
-		        }
-	       }
+          }
+        }
         else                                      //=>"The Env is vacuum" case (DecayIn2)
         {
@@ -5448,11 +5488,11 @@
             quasH->Set4Momentum(quas4M);
             FillHadronVector(quasH);              // Fill ResidQuasmHadron (del.equivalent)
-		        }
-	       }
+          }
+        }
       }
       else                                        // "CORRECTION" !!!!
       {
         if(nOfOUT>1 && corFlag)
-	       {
+        {
           G4QHadron*  thePrev = theQHadrons[nOfOUT-2];// Get pointer to prev-before-lastHad
           if(thePrev->GetNFragments()||thePrev->GetPDGCode()==22)return false;//DecH or Gam
@@ -5465,5 +5505,5 @@
           G4double   totNMa=tmpTLV.m();                   // RealMass of TotResidualNucleus
 #ifdef pdebug
-	         G4cout<<"G4Q::CheckGS:NO, M="<<tmpTLV<<totNMa<<">"<<totQMa+hadrMa+prevMa<<G4endl;
+          G4cout<<"G4Q::CheckGS:NO, M="<<tmpTLV<<totNMa<<">"<<totQMa+hadrMa+prevMa<<G4endl;
 #endif
           if(totNMa>totQMa+hadrMa+prevMa)
@@ -5484,10 +5524,10 @@
               thePrev->Set4Momentum(prev4M);
 #ifdef pdebug
-	          G4cout<<"G4Q::CheckGS: Yes, Check D4M="<<tmpTLV-hadr4M-prev4M-nuc4M<<G4endl;
-#endif
-	           }
-		        }
+           G4cout<<"G4Q::CheckGS: Yes, Check D4M="<<tmpTLV-hadr4M-prev4M-nuc4M<<G4endl;
+#endif
+            }
+          }
           else                                         // Decay in one hadron, absorb other
-		        {
+          {
             G4QContent tmpLNQ=totQC+thePrev->GetQC();
             G4int    resLPDG =tmpLNQ.GetSPDGCode();
@@ -5498,9 +5538,9 @@
             //////G4bool    which = true;          // LastH is absorbed, PrevH is radiated
 #ifdef pdebug
-	           G4cout<<"G4Quasm::CheckGS: NO, tM="<<totNMa<<" > rp+l="<<resLastM+hadrMa
+            G4cout<<"G4Quasm::CheckGS: NO, tM="<<totNMa<<" > rp+l="<<resLastM+hadrMa
                   <<" || > rl+p="<<resPrevM+prevMa<<G4endl;
 #endif
             if      (totNMa>resLastM+hadrMa)       // "Just exclude the Prev" case
-		          {
+            {
               theQHadrons.pop_back();              // theLast* is excluded from OUTPUT HV
               theQHadrons.pop_back();              // thePrev* is excluded from OUTPUT HV
@@ -5511,10 +5551,10 @@
               resPrevM=resLastM;
               prev4M  = hadr4M;
-		          }
+            }
             else if (totNMa>resPrevM+prevMa)              // "Just exclude the Last" case
-		          {
+            {
               theQHadrons.pop_back();
               delete theLast;
-		          }
+            }
             else return false;
             G4LorentzVector nuc4M = G4LorentzVector(0.,0.,0.,resPrevM);//ResNucl4m to PrevH
@@ -5532,12 +5572,12 @@
               thePrev->Set4Momentum(prev4M);
 #ifdef pdebug
-	             G4cout<<"G4Q::CheckGS:Yes, Check D4M="<<tmpTLV-prev4M-nuc4M<<G4endl;
-#endif
-	           }
-		        }
-	       }
+              G4cout<<"G4Q::CheckGS:Yes, Check D4M="<<tmpTLV-prev4M-nuc4M<<G4endl;
+#endif
+            }
+          }
+        }
         else return false;
       }
-	   }
+    }
     else return false;
   }
@@ -5566,8 +5606,8 @@
     G4int i=0;
     if(nChan>1)
-	   {
+    {
       G4double rnd = G4UniformRand();            // Random value to select a Decay Channel
       for(i=0; i<nChan; i++)
-	     {
+      {
         G4QDecayChan* dC = decV[i];              // The i-th Decay Channel
 #ifdef pdebug
@@ -5576,11 +5616,11 @@
 #endif
         if(rnd<dC->GetDecayChanLimit() && m>dC->GetMinMass()) break;
-	     }
+      }
       if(i>nChan-1) i=nChan-1;
-	   }
+    }
     G4QPDGCodeVector cV=decV[i]->GetVecOfSecHadrons();// PDGVector of theSelectedDecChannel
     G4int nPart=cV.size();                         // A#of particles to decay in
 #ifdef pdebug
-	   G4cout<<"G4Quasmon::DecayQHadron: resi="<<i<<",nP="<<nPart<<":"<<cV[0]->GetPDGCode()
+    G4cout<<"G4Quasmon::DecayQHadron: resi="<<i<<",nP="<<nPart<<":"<<cV[0]->GetPDGCode()
           <<","<<cV[1]->GetPDGCode();
     if(nPart>2) G4cout<<","<<cV[2]->GetPDGCode();
@@ -5591,10 +5631,10 @@
       G4cerr<<"---Warning---G4Q::DecayQHadr:n="<<nPart<<",ch#"<<i<<",PDG="<<thePDG<<G4endl;
       return false;
-	   }
+    }
 #ifdef pdebug
     G4cout<<"G4Q::DecQH:Decay("<<ElMaDecays<<") PDG="<<thePDG<<t<<m<<",nP="<<nPart<<G4endl;
 #endif
     if(nPart==2)
-	   {
+    {
       G4QHadron* fHadr;
       G4QHadron* sHadr;
@@ -5607,9 +5647,9 @@
 #endif
         if(cV[0]->GetWidth()==0.)
-	       { // Randomize only the second Hardon or none
+        { // Randomize only the second Hardon or none
           fHadr = new G4QHadron(cV[0]->GetPDGCode());   // the First Hadron is created *1*
           if(cV[1]->GetWidth()==0.)sHadr = new G4QHadron(sPDG);//theSecondHadron is created
           else
-		        {
+          {
             G4QParticle* sPart=theWorld->GetQParticle(cV[1]);// Pt for theSecondHadron
             G4double sdm = m - fHadr->GetMass();        // MaxMassLimit for the 2-nd Hadron
@@ -5617,7 +5657,7 @@
             if(sPDG<0) sHadr->MakeAntiHadron();
           }
-	       }
+        }
         else                                              // Randomize masses ofBothHadrons
-	       {
+        {
           G4QParticle* sPart=theWorld->GetQParticle(cV[1]);// Pt for theSecondHadron
           G4double mim = sPart->MinMassOfFragm();         // MinMassLimit for theSecondHadr
@@ -5650,9 +5690,9 @@
           delete sHadr;                                   // Delete "new sHadr"
           G4cerr<<"---Warning---G4Q::DecayQHadron:in2,PDGC="<<thePDG<<", ch#"<<i<<": 4M="
-												    <<qH->Get4Momentum()<<"("<<qH->GetMass()<<")->"<<f4Mom<<"+"<<s4Mom<<G4endl;
+                <<qH->Get4Momentum()<<"("<<qH->GetMass()<<")->"<<f4Mom<<"+"<<s4Mom<<G4endl;
           //throw G4QException("***Exception***G4Q::DecayQHadron: Failed to decay in 2");
           theFragments->push_back(qH);                    // Fill as it is (del.equiv.)
           return theFragments;
-	       }
+        }
         else
         {
@@ -5669,5 +5709,5 @@
 #endif
           if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
-										else for(G4int ip1=0; ip1<nProd; ip1++)
+          else for(G4int ip1=0; ip1<nProd; ip1++)
           {
             G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
@@ -5694,5 +5734,5 @@
 #endif
           if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
-										else for(G4int ip1=0; ip1<nProd; ip1++)
+          else for(G4int ip1=0; ip1<nProd; ip1++)
           {
             G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
@@ -5716,5 +5756,5 @@
         G4cout<<"G4Q::DecQHadr: DecayIn2 is made with nH="<<theFragments->size()<<G4endl;
 #endif
-	     }
+      }
       else
       {
@@ -5723,8 +5763,8 @@
 #endif
         theFragments->push_back(qH);               // Fill hadron as it is (del.equivalent)
-	     }
+      }
     }
     else if(nPart==3)
-	   {
+    {
       G4QHadron* fHadr;
       G4QHadron* sHadr;
@@ -5740,5 +5780,5 @@
 #endif
         if(cV[0]->GetWidth()==0.)                        // Don't randomize theFirstHardon
-	       {
+        {
           fHadr = new G4QHadron(fPDG);                   // theFirst Hadron is created  *1*
           if(cV[1]->GetWidth()==0.)
@@ -5747,13 +5787,13 @@
             if(cV[2]->GetWidth()==0.)tHadr = new G4QHadron(tPDG);//theThirdHadron isCreated
             else
-		          {
+            {
               G4QParticle* tPart=theWorld->GetQParticle(cV[2]);// Pt for the3-rdH
               G4double tdm = m-fHadr->GetMass()-sHadr->GetMass();// MaxMass for the 2d Hadr
               tHadr = new G4QHadron(tPart,tdm);                  //the3rdHadron is created
               if(tPDG<0) tHadr->MakeAntiHadron();
-		          }
+            }
           }
           else                                              // Randomize 2nd & 3rd Hadrons
-		        {
+          {
             m-=fHadr->GetMass();                            // Reduce the residual MaxMass
             G4QParticle* tPart=theWorld->GetQParticle(cV[2]);// Pt for the 3-rd Hadron
@@ -5767,7 +5807,7 @@
             if(tPDG<0) tHadr->MakeAntiHadron();
           }
-	       }
+        }
         else  // Randomize masses of all three Hadrons
-	       {
+        {
           G4QParticle* sPart=theWorld->GetQParticle(cV[1]);//Pt for theSecondHadr
           G4double smim = sPart->MinMassOfFragm();        // MinMassLim for theSecondHadron
@@ -5807,5 +5847,5 @@
           theFragments->push_back(qH);             // Fill as it is (delete equivalent)
           return false;
-	       }
+        }
         else
         {
@@ -5822,5 +5862,5 @@
 #endif
           if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
-										else for(G4int ip1=0; ip1<nProd; ip1++)
+          else for(G4int ip1=0; ip1<nProd; ip1++)
           {
             G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
@@ -5848,5 +5888,5 @@
 #endif
           if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
-										else for(G4int ip1=0; ip1<nProd; ip1++)
+          else for(G4int ip1=0; ip1<nProd; ip1++)
           {
             G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
@@ -5874,5 +5914,5 @@
 #endif
           if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
-										else for(G4int ip1=0; ip1<nProd; ip1++)
+          else for(G4int ip1=0; ip1<nProd; ip1++)
           {
             G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
@@ -5897,5 +5937,5 @@
         G4cout<<"G4Q::DecQHadr: DecayIn3 is made with nH="<<theFragments->size()<<G4endl;
 #endif
-	     }
+      }
       else theFragments->push_back(qH);            // Fill hadron as it is (del.equivalent)
     }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QuasmonString.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QuasmonString.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QuasmonString.cc	(revision 1055)
@@ -28,10 +28,16 @@
 //
 //
-// $Id: G4QuasmonString.cc,v 1.7 2006/11/27 10:44:55 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QuasmonString.cc,v 1.8 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QuasmonString ----------------
 //             by Mikhail Kossov, August 2000.
 //  class for Hadron-Hadron String Interaction used by the CHIPS Model
+// -------------------------------------------------------------------
+// Short description: The Quark-Gluon String can fragment in hadrons
+// (QGS), small hadronic clusters (HERWIG) or in unlimited in mass
+// Quasmons, defined by the G4QPartonPair. This class is made to
+// simulate the string fragmentation in Quasmons, which hadronize in
+// vacuuum or in nuclear environment.
 // -------------------------------------------------------------------
  
@@ -71,5 +77,5 @@
   theWorld= G4QCHIPSWorld::Get();             // Get a pointer to the CHIPS World
 #ifdef debug
-  G4cout<<"-->G4QString::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl;
+  G4cout<<"-->G4QuasStr::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl;
 #endif
   // Target initialization
@@ -84,5 +90,5 @@
   // Projectile initialization
   theProj4Mom = projHadron.Get4Momentum();
-		G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS
+  G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS
   G4ThreeVector projRBoost= -projBoost;       // Projevtile Boost vector to projectile CMS
   G4QPDGCode projQPDG(projHadron.GetPDGCode());
@@ -97,18 +103,18 @@
   G4double tM2 = tM*tM;
   G4double dM2 = fabs(pM2-projM2);
-  if(dM2>1.) G4cout<<"-Wor-G4QS::Constr:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl;
+  if(dM2>1.) G4cout<<"-Wor-G4QuStr::Cons:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl;
   G4double pM=sqrt(pM2);                     // @@ do we need pM ? @@ (in print)
 
   // === Print out of the input information at Creation time & tot 4-mom Calculation ======
 #ifdef pdebug
-  G4cout<<"G4QS::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<<
-				theProj4Mom.m2()<<theProj4Mom.m()<<G4endl;
-  G4cout<<"G4QStr::Constr: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl;
+  G4cout<<"G4QuaString::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<<
+    theProj4Mom.m2()<<theProj4Mom.m()<<G4endl;
+  G4cout<<"G4QuaString::C: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl;
 #endif
   //G4int nP=theWorld->GetQPEntries();       // A#of init'ed particles in CHIPS World (@@?)
   //G4int nCl=nP-90;                          // A#of init'ed clusters in CHIPS World (@@?)
-		//#ifdef pdebug
+  //#ifdef pdebug
   //G4cout<<"G4QS:Const:Before QEX:n="<<nP<<G4endl;
-		//#endif
+  //#endif
   // @@@@@@ ===> Here the Quark Exchange Quasmon Creation must be added <=== @@@@@@
   // @@ --- old ---
@@ -136,5 +142,5 @@
   // @@ --- end ---
 #ifdef pdebug
-  G4cout<<"G4QStr::Constr: nP="<<nQProj<<", nT="<<nQTarg<<G4endl;
+  G4cout<<"G4QuasmonString::Constr: nP="<<nQProj<<", nT="<<nQTarg<<G4endl;
 #endif
   // @@ Now projectile can be only meson or baryon @@ -- @@ Improve for clusters @@ --
@@ -143,7 +149,7 @@
   G4bool FreeFraF=false;                     // Prototype of the free exchange Flag
   if(G4UniformRand()<FreeFra) FreeFraF=true; // Confirm the free exchange
-  if(nQProj<2)  G4cout<<"***G4QSt::Constr: nQProj="<<nQProj<<"<2 ***FatalError***"<<G4endl;
-		else if(nQProj>2)                          // ---> Baryon case (clusters are not implem.)
-		{
+  if(nQProj<2)  G4cout<<"***G4QuaStr::Con: nQProj="<<nQProj<<"<2 ***FatalError***"<<G4endl;
+  else if(nQProj>2)                          // ---> Baryon case (clusters are not implem.)
+  {
     //if(nQProj>3)G4cout<<"-Wor-G4QS::Const:nQProj="<<nQProj<<">3 is not implem'd"<<G4endl;
     G4double xP=0.;
@@ -153,5 +159,5 @@
       xP=RandomizeMomFractionString(nQProj);
       theWeight*=pow(xP,interc);
-      G4cout<<"************G4QS::C: string xP="<<xP<<G4endl;
+      G4cout<<"************G4QuasmonString::Constr: string xP="<<xP<<G4endl;
     }
     rPMass = sqrt(pM2*(1.-xP));              // Residual Projectile mass
@@ -166,7 +172,7 @@
   if(tmpBl) projFl=true;                     // Proj decay is OK
   //if(projHadron.DecayIn2(pq4Mom,pr4Mom)) projFl=true;
-  else G4cout<<"**Worning**G4QuasmonString::Constr:ProjDecIn2 rpM="<<rPMass<<", pM="<<pM<<G4endl;
-#ifdef pdebug
-  G4cout<<"G4QStr::Con:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl;
+  else G4cout<<"**Warning**G4QuasmonString::C:ProjDecIn2 rpM="<<rPMass<<",pM="<<pM<<G4endl;
+#ifdef pdebug
+  G4cout<<"G4QuaStr::C:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl;
 #endif
   G4LorentzVector tq4Mom(0.,0.,0.,0.);       // Prototype of LV of quark of the target  
@@ -179,15 +185,15 @@
     xT=RandomizeMomFractionString(nQTarg);
     theWeight*=pow(xT,interc);
-    G4cout<<"************G4QS::C: string xT="<<xT<<G4endl;
+    G4cout<<"************G4QuaString::Constr: string xT="<<xT<<G4endl;
   }
   G4double rTMass = sqrt(tM2*(1.-xT));       // Residual Target mass
 #ifdef pdebug
-  G4cout<<"G4QS::C: nQTarg="<<nQTarg<<", xProj="<<xT<<", rTMass="<<rTMass<<G4endl;
+  G4cout<<"G4QuaString::C: nQTarg="<<nQTarg<<", xProj="<<xT<<", rTMass="<<rTMass<<G4endl;
 #endif
   G4LorentzVector tr4Mom(0.,0.,0.,rTMass);   // Prototype of LV of the residual projectile
   if(targHadron.DecayIn2(tq4Mom,tr4Mom)) targFl=true; // Targ decay is OK
-  else G4cout<<"**Worning**G4QStr::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl;
-#ifdef pdebug
-  G4cout<<"G4QStr::Con:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl;
+  else G4cout<<"**Worning**G4QuaStr::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl;
+#ifdef pdebug
+  G4cout<<"G4QuaStr::C:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl;
 #endif
   G4bool elasFl=false;                       // ByDefault avoid the elastic scattering
@@ -208,13 +214,13 @@
     // @@ Just to try ---- End
 #ifdef pdebug
-    G4cout<<"G4QS::Cons: npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
+    G4cout<<"G4QuaStr::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
 #endif
     if(npM<pM+mPi0) // The projectile is under min mass (@@ In Future put other cut @@)
     {
       G4double valk=tq4Mom.e();         // Momentum of the target quark
-						//#ifdef pdebug
+      //#ifdef pdebug
       G4double dvalk=valk-tq4Mom.rho();
-      if(fabs(dvalk)>.00001) G4cout<<"***kp***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
-						//#endif
+      if(fabs(dvalk)>.00001) G4cout<<"**kp**G4QuaStr::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
+      //#endif
       G4double dmas=pM2-pr4Mom.m2();    // Difference of squared masses
       G4double vale=pr4Mom.e();
@@ -226,5 +232,5 @@
       {
 #ifdef pdebug
-        G4cout<<"***p***>>>G4QS::C: cost="<<cost<<G4endl;
+        G4cout<<"***p***>>>G4QuasmonString::Constr: cost="<<cost<<G4endl;
 #endif
         // Get max value of |cos(theta)| and change tq value to get the pM on mass shell
@@ -238,11 +244,11 @@
         }
         else                               // --->>> cost<0.
-								{
+        {
           G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM)
           if(hvalk>tM)                     // Momentum can not be increased to this value
           {
 #ifdef pdebug
-            G4cout<<"**p-Cor**>G4QS::C: hvalk="<<hvalk<<" > tM="<<tM<<", dm="<<dmas<<", e="
-                  <<vale<<", p="<<valp<<", ct="<<cost<<G4endl;
+            G4cout<<"**p-Cor**>G4QuaStr::C: hvalk="<<hvalk<<" > tM="<<tM<<", dm="<<dmas
+                  <<", e="<<vale<<", p="<<valp<<", ct="<<cost<<G4endl;
 #endif
             // Put the scatteredProjectile on the massShell, and rescatter the target quark
@@ -252,10 +258,11 @@
             pq4Mom=G4LorentzVector(0.,0.,0.,0.);        // NewProjParton on lightMassShell
             tmpBl=tmpHadron.DecayIn2(newProj4M,pq4Mom); // Decay the Compound in newProg+pQ
-            if(!tmpBl)G4cout<<"G4QS::C:DecIn2 err "<<sqrt(tmpProj4M.m2())<<"<"<<pM<<G4endl;
+            if(!tmpBl)
+              G4cout<<"G4QuaStr::Con: DecIn2 err "<<sqrt(tmpProj4M.m2())<<"<"<<pM<<G4endl;
           }
           else
-										{
-#ifdef pdebug
-            G4cout<<"***---***>G4QS::C: hvalk="<<hvalk<<" < tM="<<tM<<G4endl;
+          {
+#ifdef pdebug
+            G4cout<<"***---***>G4QuasmonStr::Constr: hvalk="<<hvalk<<" < tM="<<tM<<G4endl;
 #endif
             valk=hvalk/2;                  // Momentum is too small (must be reduced)
@@ -266,5 +273,6 @@
           }
         }
-        if(fabs(newProj4M.m()-pM)>.0001)G4cout<<"G4QS::C:"<<newProj4M.m()<<","<<pM<<G4endl;
+        if(fabs(newProj4M.m()-pM)>.0001)
+          G4cout<<"*G4QuaString::Constr: Change of mass "<<newProj4M.m()<<"#"<<pM<<G4endl;
       }
       else
@@ -272,5 +280,5 @@
         // Turn the target quark-parton to the projectile residual in LS = CMSofTheTarget
 #ifdef pdebug
-        G4cout<<"---p--->>>G4QS::C: cost="<<cost<<G4endl;
+        G4cout<<"---p--->>>G4QuasmonString::Constr: cost="<<cost<<G4endl;
 #endif
         G4ThreeVector tq=tq4Mom.v();           // 3-mom of the targetQ (LS)
@@ -286,10 +294,12 @@
         tq4Mom.setV(tqf);                      // Change the momentum direction of targetQ
         tr4Mom.setV(-tqf);                     // Change the momentum direction of targetR
-        if(fabs(tqf.mag()-valk)>.0001)G4cout<<"*G4QS::C:||="<<tqf.mag()<<","<<valk<<G4endl;
+        if(fabs(tqf.mag()-valk)>.0001)
+          G4cout<<"*G4QuasmonString::Constr: |k|="<<tqf.mag()<<" # "<<valk<<G4endl;
         newProj4M=tq4Mom+pr4Mom;
-        if(fabs(newProj4M.m()-pM)>.001)G4cout<<"*G4QS::C:"<<newProj4M.m()<<","<<pM<<G4endl;
+        if(fabs(newProj4M.m()-pM)>.001)
+          G4cout<<"*G4QuasmonString::Constr: M="<<newProj4M.m()<<" # "<<pM<<G4endl;
       }
 #ifdef pdebug
-      G4cout<<"G4QStr::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl;
+      G4cout<<"G4QuaStr::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl;
 #endif
       pcorFl=true;                           // Projectile is on the GS mass shell
@@ -303,5 +313,5 @@
     //ntM=sqrt(nTM2);
 #ifdef pdebug
-    G4cout<<"G4QStr::C: ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl;
+    G4cout<<"G4QuaStr::C:ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl;
 #endif
     if(ntM<tM+mPi0 && !pcorFl) // The target is under min mass (@@ InFut put another cut@@)
@@ -311,8 +321,8 @@
       pqc4M.boost(projRBoost);             // projectileQuark => projCM system <step2>
       G4double valk=pqc4M.e();             // Momentum of the target quark in projCM
-						//#ifdef pdebug
+      //#ifdef pdebug
       G4double dvalk=valk-pqc4M.rho();
-      if(fabs(dvalk)>.00001) G4cout<<"***kt***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
-						//#endif
+      if(fabs(dvalk)>.00001) G4cout<<"***kt***G4QuaS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
+      //#endif
       G4double dmas=tM2-tr4Mom.m2();       // Difference of squared masses (targ - targRes)
       G4LorentzVector trc4M=tr4Mom;        // targetResidual => projCM system <step1>
@@ -321,5 +331,5 @@
       G4ThreeVector tr=trc4M.v();          // 3-mom of the targetResidual in projCM
       G4double valp=tr.mag();              // momentum of the targetResidual in projCM
-      if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4QS::C: trM2="<<tr4Mom.m2()<<"="
+      if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4QuaStr::C: trM2="<<tr4Mom.m2()<<"="
                                             <<trc4M.m2()<<","<<vale*vale-valp*valp<<G4endl;
       G4ThreeVector utr=tr/valp;           // Unit vector in the tr direction in projCM
@@ -328,5 +338,5 @@
       {
 #ifdef pdebug
-        G4cout<<"***t***>>>G4QS::C: cost="<<cost<<G4endl;
+        G4cout<<"***t***>>>G4QuasmonString::Constr: cost="<<cost<<G4endl;
 #endif
         // Get max value of |cos(theta)| and change pq value to get the tM on mass shell
@@ -344,11 +354,11 @@
         }
         else                                   // --->>> cost<-1 => cost=-1
-								{
+        {
           G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM)
           if(hvalk>pM)                     // Momentum can not be increased to this value
           {
 #ifdef pdebug
-            G4cout<<"**t-Cor**>G4QS::C: hvalk="<<hvalk<<" > pM="<<pM<<", dm="<<dmas<<", e="
-                  <<vale<<", p="<<valp<<", ct="<<cost<<G4endl;
+            G4cout<<"**t-Cor**>G4QuasmonString::C: hvalk="<<hvalk<<" > pM="<<pM<<", dm="
+                  <<dmas<<", e="<<vale<<", p="<<valp<<", ct="<<cost<<G4endl;
 #endif
             // Put the scatteredProjectile on the massShell, rescatter the targetQuark (LS)
@@ -358,10 +368,11 @@
             tq4Mom=G4LorentzVector(0.,0.,0.,0.);        // NewTargParton on lightMassShell
             tmpBl=tmpHadron.DecayIn2(newTarg4M,tq4Mom); // Decay the Compound in newTarg+tQ
-            if(!tmpBl)G4cout<<"G4QS::C:DecIn2-err "<<sqrt(tmpTarg4M.m2())<<"<"<<tM<<G4endl;
+            if(!tmpBl)
+              G4cout<<"G4QuaString::C: DecIn2-err "<<sqrt(tmpTarg4M.m2())<<"<"<<tM<<G4endl;
           }
           else
-										{
-#ifdef pdebug
-            G4cout<<"***---***>G4QS::C: hvalk="<<hvalk<<" < pM="<<pM<<G4endl;
+          {
+#ifdef pdebug
+            G4cout<<"***---***>G4QuaString::Constr: hvalk="<<hvalk<<" < pM="<<pM<<G4endl;
 #endif
             valk=hvalk/2;                        // Momentum is too small (mustBeIncreased)
@@ -372,9 +383,9 @@
             G4LorentzVector nTc4M=pqc4M+trc4M;
 #ifdef pdebug
-            G4cout<<"G4QS::C:After Boost="<<projBoost<<G4endl;
-            G4cout<<"G4QS::C:Aft: q="<<pqc4M<<pqc4M.m2()<<",t="<<nTc4M<<nTc4M.m2()<<G4endl;
-            G4cout<<"G4QS::C:E="<<nTc4M.e()<<" = q="<<pqc4M.e()<<"="<<valk<<" + r="<<
-                  trc4M.e()<<"="<<vale<<" = "<<pqc4M.e()+trc4M.e()<<",c="<<pq4Mom<<G4endl;
-            if(fabs(nTc4M.m()-tM)>.0001) G4cout<<"*G4QS::C:"<<nTc4M.m()<<"!="<<tM<<G4endl;
+            G4cout<<"G4QuasmonString::Constr:After Boost="<<projBoost<<G4endl;
+            G4cout<<"G4QuS::C:Aft:q="<<pqc4M<<pqc4M.m2()<<",t="<<nTc4M<<nTc4M.m2()<<G4endl;
+            G4cout<<"G4QuaStr::C:E="<<nTc4M.e()<<" = q="<<pqc4M.e()<<"="<<valk<<" + r="<<
+                   trc4M.e()<<"="<<vale<<" = "<<pqc4M.e()+trc4M.e()<<",c="<<pq4Mom<<G4endl;
+            if(fabs(nTc4M.m()-tM)>.0001) G4cout<<"*G4QuS::C:"<<nTc4M.m()<<"!="<<tM<<G4endl;
             G4double pp=pqf.dot(tr);             // trc3M*pqc=-valk*valp
             G4double ee=vale*valk;
@@ -383,6 +394,6 @@
             G4double sen=nTc4M.e();
             G4double smo=nTc4M.rho();
-            G4cout<<"G4QS::C:qM2="<<pqc4M.m2()<<",rM2="<<trc4M.m2()<<",E="<<sen<<"="<<
-														vale+valk<<",P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl;
+            G4cout<<"G4QuaStr::C: qM2="<<pqc4M.m2()<<",rM2="<<trc4M.m2()<<",E="<<sen<<"="<<
+              vale+valk<<", P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl;
 #endif
             G4LorentzVector prc4M(pM-valk,-pqf); // Fill new 4-mom for projectResid in CM
@@ -393,5 +404,5 @@
         }
         if(fabs(newTarg4M.m()-tM)>.0001)
-          G4cout<<"******************************G4QS::C:"<<newTarg4M.m()<<"="<<pM<<G4endl;
+          G4cout<<"****************G4QuasmonString::C: M="<<newTarg4M.m()<<"="<<pM<<G4endl;
       }
       else // -1<cos(theta)<1 - only rotate the projQ
@@ -399,5 +410,5 @@
         // Turn the projectile quark-parton to the target residual in CMS of the Projectile
 #ifdef pdebug
-        G4cout<<"---t--->>>G4QS::C: cost="<<cost<<G4endl;
+        G4cout<<"---t--->>>G4QuasmonString::Constr: cost="<<cost<<G4endl;
 #endif
         G4LorentzVector prc4M=pr4Mom;          // projectileQuark => projCM system <step1>
@@ -419,14 +430,16 @@
 #ifdef pdebug
         G4LorentzVector nT4M=pqc4M+trc4M;
-        if(fabs(nT4M.m()-tM)>.001)G4cout<<"****t****G4QS::C:M="<<nT4M.m()<<"="<<tM<<G4endl;
+        if(fabs(nT4M.m()-tM)>.001)G4cout<<"**t**G4QuaStr::C:M="<<nT4M.m()<<"="<<tM<<G4endl;
 #endif
         pr4Mom=prc4M;               // <step1> // Fill new 4-mom for projResidual in LS
         pr4Mom.boost(projBoost);    // <step2> // Fill new 4-mom for projResidual in LS
-        if(fabs(pqf.mag()-valk)>.0001)G4cout<<"*G4QS::C:||="<<pqf.mag()<<"="<<valk<<G4endl;
+        if(fabs(pqf.mag()-valk)>.0001)
+          G4cout<<"*G4QuasmonString::Constr: |k|="<<pqf.mag()<<"="<<valk<<G4endl;
         newTarg4M=pq4Mom+tr4Mom;
-        if(fabs(newTarg4M.m()-tM)>.001)G4cout<<"*G4QS::C:"<<newTarg4M.m()<<"="<<tM<<G4endl;
+        if(fabs(newTarg4M.m()-tM)>.001)
+          G4cout<<"*G4QuasmonString::Constr: M="<<newTarg4M.m()<<"="<<tM<<G4endl;
       }
 #ifdef pdebug
-      G4cout<<"G4QStr::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl;
+      G4cout<<"*G4QuaStr::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl;
 #endif
       tcorFl=true;                  // Target is on the GS mass shell
@@ -435,5 +448,5 @@
       npM=sqrt(nPM2);
 #ifdef pdebug
-      G4cout<<"G4QStr::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
+      G4cout<<"G4QuaStr::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<"="<<pM+mPi0<<G4endl;
 #endif
       if(npM<pM+mPi0) elasFl=true;    // Force elastic scattering (@@InFut putAnotherCut@@)
@@ -444,5 +457,5 @@
       // **** Put the hadrons on the mass shell conserving the CMS scattering angle ****
       G4LorentzVector theTot4M=theProj4Mom+theTarg4Mom;// 4-momentum of CMS of "targ+proj"
-		    G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS"
+      G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS"
       G4ThreeVector cmsRBoost= -cmsBoost;              // CMS Boost Vector "LS to CMS"
       G4LorentzVector cmsProj4M=theProj4Mom; // LS projectile => CMS <step1>
@@ -454,5 +467,5 @@
       if(fabs(cmsTarg4M.rho()-pcm) > 0.0001)
         G4cout<<"-Worning-G4QuasmonString::Constr: P="<<cmsTarg4M.rho()<<"#"<<pcm<<G4endl;
-						//#endif
+      //#endif
       G4LorentzVector cmsNewPr4M=newProj4M;  // LS finalProj => CMS <step1>
       cmsNewPr4M.boost(cmsRBoost);           // LS finalProj => CMS <step2>
@@ -464,5 +477,5 @@
       if(1.+puV.dot(tuV) > 0.001)
         G4cout<<"-Worning-G4QuasmonString::Constr: ct="<<puV.dot(tuV)<<G4endl;
-						//#endif
+      //#endif
       cmsProj4M.setV(puV*pcm);
       newProj4M=cmsProj4M;
@@ -501,5 +514,5 @@
         theQHadrons.push_back(targH);        // Fill the Target Hadron (delete equivalent)
       }
-						else                                   // Both are excited (two Quasmons only) 
+      else                                   // Both are excited (two Quasmons only) 
       {
         G4Quasmon* projQ = new G4Quasmon(projHadron.GetQC(),newProj4M);
@@ -530,18 +543,18 @@
     finBaryoN+=theQuasmons[iq]->GetBaryonNumber();
   }
-  G4cout<<"G4QStr::C:nH="<<nHad<<",nQ="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl;
+  G4cout<<"G4QuaStr::C:n="<<nHad<<",N="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl;
   if(finCharge!=totCharge || finBaryoN!=totBaryNum)
   {
-    G4cerr<<"***G4QStr::C:tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum
+    G4cerr<<"***G4QuasmonString::C: tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum
           <<",B="<<finBaryoN<<G4endl;
     if(nHad) for(G4int h=0; h<nHad; h++)
     {
       G4QHadron* cH = theQHadrons[h];
-      G4cerr<<"::G4QS::C:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;
+      G4cerr<<">G4QuaStr::C:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;
     }
     if(nQuas) for(G4int q=0; q<nQuas; q++)
     {
       G4Quasmon* cQ = theQuasmons[q];
-      G4cerr<<"::G4QS::C:q#"<<q<<",C="<<cQ->GetCharge()<<",QuarkCon="<<cQ->GetQC()<<G4endl;
+      G4cerr<<">G4QuaStr::C:q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl;
     }
   }
@@ -557,5 +570,5 @@
     G4Quasmon* curQ    = new G4Quasmon(right.theQuasmons[iq]);
 #ifdef fdebug
-    G4cout<<"G4QS::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
+    G4cout<<"G4QuaStr::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
 #endif
     theQuasmons.push_back(curQ);             // (delete equivalent)
@@ -570,7 +583,7 @@
   
   theWorld        =  right.theWorld; 
-		tot4Mom         =	 right.tot4Mom;
-		totCharge       =	 right.totCharge;
-		totBaryNum      =	 right.totBaryNum;
+  tot4Mom         =  right.tot4Mom;
+  totCharge       =  right.totCharge;
+  totBaryNum      =  right.totBaryNum;
 }
 
@@ -588,5 +601,5 @@
       G4Quasmon* curQ    = new G4Quasmon(right.theQuasmons[iq]);
 #ifdef fdebug
-      G4cout<<"G4QS::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
+      G4cout<<"G4QuaStr::CpByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
 #endif
       theQuasmons.push_back(curQ);             // (delete equivalent)
@@ -601,7 +614,7 @@
   
     theWorld        =  right.theWorld; 
-		  tot4Mom         =	 right.tot4Mom;
-		  totCharge       =	 right.totCharge;
-		  totBaryNum      =	 right.totBaryNum;
+    tot4Mom         =  right.tot4Mom;
+    totCharge       =  right.totCharge;
+    totBaryNum      =  right.totBaryNum;
   }
   return *this;
@@ -616,5 +629,5 @@
     G4Quasmon* curQ    = new G4Quasmon(right->theQuasmons[iq]);
 #ifdef fdebug
-    G4cout<<"G4QS::CopyByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
+    G4cout<<"G4QuaStr::CpByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
 #endif
     theQuasmons.push_back(curQ);             // (delete equivalent)
@@ -629,7 +642,7 @@
   
   theWorld        =  right->theWorld; 
-		tot4Mom         =	 right->tot4Mom;
-		totCharge       =	 right->totCharge;
-		totBaryNum      =	 right->totBaryNum;
+  tot4Mom         =  right->tot4Mom;
+  totCharge       =  right->totCharge;
+  totBaryNum      =  right->totBaryNum;
 }
 
@@ -664,5 +677,5 @@
 G4QHadronVector* G4QuasmonString::Fragment()
 {//              ========================== -- @@ Must be changed @@ --
-		// Make the final check before filling the output -- @@ Must be changed @@ --
+  // Make the final check before filling the output -- @@ Must be changed @@ --
 #ifdef chdebug
   G4int fCharge=0;
@@ -682,15 +695,15 @@
   if(fCharge!=totCharge || fBaryoN!=totBaryNum)
   {
-    G4cerr<<"***G4QS::Frag:tC="<<totCharge<<",C="<<fCharge<<",tB="<<totBaryNum
-          <<",B="<<fBaryoN<<G4endl;
+    G4cerr<<"***G4QuasmonString::Fragment: tC="<<totCharge<<", C="<<fCharge<<", tB="
+          <<totBaryNum<<", B="<<fBaryoN<<G4endl;
     if(nHad) for(G4int h=0; h<nHad; h++)
     {
       G4QHadron* cH = theQHadrons[h];
-      G4cerr<<":G4QS::HQ:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;
+      G4cerr<<":G4QuaSt::HQ:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;
     }
     if(nQuas) for(G4int q=0; q<nQuas; q++)
     {
       G4Quasmon* cQ = theQuasmons[q];
-      G4cerr<<":G4QS::HQ:q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl;
+      G4cerr<<":G4QuaSt::HQ:q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl;
     }
   }
@@ -781,5 +794,5 @@
   // @@ TMP --- Begin ---
   if(2>1)
-		{
+  {
     if(nPart<2)
     {
@@ -792,6 +805,6 @@
     if(r==0.) return 0.;
     if(r==1.) return 1.;
-		  if     (nPart==3) x=r;          // GS baryon
-		  else if(nPart==4) x=1.-sqrt(r); // GS quaternion
+    if     (nPart==3) x=r;          // GS baryon
+    else if(nPart==4) x=1.-sqrt(r); // GS quaternion
     else x=1.-pow(r,1./(nPart-2.)); // nPart>4
     return x;
@@ -809,7 +822,7 @@
   if(r==0.) return 0.;
   if(r==1.) return 1.;
-		if(nPart==3) x=sqrt(r);      // GS baryon
-		else if(nPart==4)            // GS quaternion
-		{
+  if(nPart==3) x=sqrt(r);      // GS baryon
+  else if(nPart==4)            // GS quaternion
+  {
     if    (r==0.5) x=0.5;
     else if(r<0.5) x=sqrt(r+r)*(.5+.1579*(r-.5));
@@ -817,5 +830,5 @@
   }
   else
-		{
+  {
     G4int n1=nPart-2;
     G4double r1=n1;
@@ -826,13 +839,13 @@
     if  (r==rr)  x=p2;
     else
-				{
+    {
       if(r<rr)
       {
-								G4double pr=0.;
-								G4double pra=0.;
+        G4double pr=0.;
+        G4double pra=0.;
         if(nPart>8)
-								{
+        {
           if(nPart>10)
-								  {
+          {
             if(nPart>11)                      // >11
             {
@@ -840,5 +853,5 @@
               pra=.915/pow((nPart+6.7),1.75);
             }
-												else                              // 11
+            else                              // 11
             {
               pr=.09945;
@@ -847,5 +860,5 @@
           }
           else
-								  {
+          {
             if(nPart>9)                       // 10
             {
@@ -853,5 +866,5 @@
               pra=.00741;
             }
-												else                              // 9
+            else                              // 9
             {
               pr=.11425;
@@ -861,7 +874,7 @@
         }
         else
-								{
+        {
           if(nPart>6)
-								  {
+          {
             if(nPart>7)                       // 8
             {
@@ -869,5 +882,5 @@
               pra=.00926;
             }
-												else                              // 7
+            else                              // 7
             {
               pr=.13405;
@@ -876,5 +889,5 @@
           }
           else
-								  {
+          {
             if(nPart>5)                       // 6
             {
@@ -882,5 +895,5 @@
               pra=.01112;
             }
-												else                              // 5
+            else                              // 5
             {
               pr=.15765;
@@ -893,29 +906,29 @@
       else
       {
-								G4double sr=0.;
+        G4double sr=0.;
         if(nPart>8)
-								{
+        {
           if(nPart>10)
-								  {
+          {
             if(nPart>11) sr=.86/(nPart+1.05); // >11
-												else         sr=.0774;            // 11
+            else         sr=.0774;            // 11
           }
           else
-								  {
+          {
             if(nPart>9) sr=.0849;             // 10
-												else        sr=.0938;             // 9
+            else        sr=.0938;             // 9
           }
         }
         else
-								{
+        {
           if(nPart>6)
-								  {
+          {
             if(nPart>7) sr=.1047;             // 8
-												else        sr=.1179;             // 7
+            else        sr=.1179;             // 7
           }
           else
-								  {
+          {
             if(nPart>5) sr=.1339;             // 6
-												else        sr=.15135;            // 5
+            else        sr=.15135;            // 5
           }
         }
@@ -940,6 +953,6 @@
   if(r==0.) return 0.;
   if(r==1.) return 1.;
-		if     (nPart==3) x=r;          // GS baryon
-		else if(nPart==4) x=1.-sqrt(r); // GS quaternion
+  if     (nPart==3) x=r;          // GS baryon
+  else if(nPart==4) x=1.-sqrt(r); // GS quaternion
   else x=1.-pow(r,1./(nPart-2.)); // nPart>4
   return x;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/History
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/History	(revision 1055)
@@ -12,4 +12,16 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+
+23-Jan-2009 M.Kosov (hadr-chips-inter-V09-02-06)
+------------------------------------------------------
+- Change of GetNuclearMass(A-1.,Z-1.) (and similar) to GetNuclearMass(A-1,Z-1)
+  To be consistent with the new Hisaya's developments. The changes are made in
+  the G4Q(Photon,Electron,Muon,Tau)NuclearCrossSection classes
+
+23-Jan-2009 V.Ivanchenko (hadr-chips-inter-V09-02-00)
+------------------------------------------------------
+- added deregistration in destructor of G4QCaptureAtRest
+- added string decay destruction to G4ElectroNuclearReaction
 
 24-Oct-2008 Dennis Wright (hadr-chips-inter-V09-01-09)
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ChiralInvariantPhaseSpace.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ChiralInvariantPhaseSpace.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ChiralInvariantPhaseSpace.hh	(revision 1055)
@@ -28,6 +28,6 @@
 
 //
-// Modified:
-// 16.01.08 V.Ivanchenko move inlined method to source
+// Created: H.-P. Wellicsh: GHAD model wrapper for the CHIPS model (1997)
+// Modified: 16.01.08 V.Ivanchenko move inlined method to source
 //
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ElectroNuclearReaction.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ElectroNuclearReaction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ElectroNuclearReaction.hh	(revision 1055)
@@ -24,13 +24,11 @@
 // ********************************************************************
 //
-//
-//
-// $Id: G4ElectroNuclearReaction.hh,v 1.25 2008/09/01 19:04:54 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
-//
-//
-// GEANT4 physics class: G4ElectroNuclearReaction -- header file
-// Created: J.P. Wellisch, 12/11/2001
+// $Id: G4ElectroNuclearReaction.hh,v 1.27 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// GEANT4 physics class: G4ElectroNuclearReaction -- header file for CHIPS
+// Created: J.P. Wellisch, following M. Kossov's algorithm. 12/11/2001
 // The last update: J.P. Wellisch, 06-June-02
+// 17.02.2009 M.Kossov, now it is recommended to use the G4QCollision process
 //
 #ifndef G4ElectroNuclearReaction_h
@@ -74,8 +72,8 @@
   }
 
-  virtual ~G4ElectroNuclearReaction() {};
+  virtual ~G4ElectroNuclearReaction() {delete  theStringDecay;};
     
   G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 
-				 G4Nucleus& aTargetNucleus);
+     G4Nucleus& aTargetNucleus);
 
 private:
@@ -94,11 +92,11 @@
 inline   
 G4HadFinalState* G4ElectroNuclearReaction::ApplyYourself(const G4HadProjectile& aTrack, 
-							 G4Nucleus& aTargetNucleus)
+        G4Nucleus& aTargetNucleus)
 {
   theResult.Clear();
-  static const G4double dM=G4Proton::Proton()->GetPDGMass()+G4Neutron::Neutron()->GetPDGMass(); // Mean double nucleon mass = m_n+m_p (@@ no binding)
-  static const G4double me=G4Electron::Electron()->GetPDGMass();      // electron mass
-  static const G4double me2=me*me;        // squared electron mass
-  static const G4double dpi=twopi; // 2*pi
+  static const G4double dM=G4Proton::Proton()->GetPDGMass()+
+    G4Neutron::Neutron()->GetPDGMass(); // MeanDoubleNucleon Mass = m_n+m_p (@@ no binding)
+  static const G4double me=G4Electron::Electron()->GetPDGMass(); // electron mass
+  static const G4double me2=me*me;                               // squared electron mass
   G4DynamicParticle theTempEl(const_cast<G4ParticleDefinition *>(aTrack.GetDefinition()), 
                               aTrack.Get4Momentum().vect());
@@ -106,6 +104,6 @@
   const G4ParticleDefinition* aD = theElectron->GetDefinition();
   if((aD != G4Electron::ElectronDefinition()) && (aD != G4Positron::PositronDefinition()))
-    throw G4HadronicException(__FILE__, __LINE__, "G4ElectroNuclearReaction::ApplyYourself called for neither electron or positron");
-  
+    throw G4HadronicException(__FILE__, __LINE__,
+        "G4ElectroNuclearReaction::ApplyYourself called for neither electron or positron");
   const G4ElementTable* aTab = G4Element::GetElementTable();
   G4Element * anElement = 0;
@@ -121,17 +119,17 @@
   if(0==anElement) 
   {
-    G4cerr<<"***G4ElectroNuclearReaction::ApplyYourself: element with Z="<<aTargetNucleus.GetZ()<<
-	  " is not in the element table"<<G4endl; // @@ how to retrieve A or N for the isotop?
+    G4cerr<<"***G4ElectroNuclearReaction::ApplyYourself: element with Z="
+          <<aTargetNucleus.GetZ()<<" is not in the element table"<<G4endl;
     throw G4HadronicException(__FILE__, __LINE__, "Anomalous element error.");
   }
 
   // Note: high energy gamma nuclear now implemented.
-  
-  G4double xSec = theElectronData.GetCrossSection(theElectron, anElement); // Check cross section
+  G4double xSec = theElectronData.GetCrossSection(theElectron, anElement);// Check XSection
   if(xSec<=0.) 
   {
     theResult.SetStatusChange(isAlive);
     theResult.SetEnergyChange(theElectron->GetKineticEnergy());
-    theResult.SetMomentumChange(theElectron->GetMomentumDirection()); // new direction for the electron
+    // new direction for the electron
+    theResult.SetMomentumChange(theElectron->GetMomentumDirection());
     return &theResult;        // DO-NOTHING condition
   }
@@ -140,13 +138,14 @@
   if( theElectronKinEnergy < photonEnergy )
   {
-    G4cout << "G4ElectroNuclearReaction::ApplyYourself: photonEnergy is very high"<<G4endl;
-    G4cout << "If this condition appears frequently, please contact Hans-Peter.Wellisch@cern.ch"<<G4endl;
-    theResult.SetStatusChange(isAlive);
-    theResult.SetEnergyChange(theElectron->GetKineticEnergy());
-    theResult.SetMomentumChange(theElectron->GetMomentumDirection()); // new direction for the electron
+    G4cout<<"G4ElectroNuclearReaction::ApplyYourself: photonEnergy is very high"<<G4endl;
+    G4cout<<">>> If this condition persists, please contact Geant4 group"<<G4endl;
+    theResult.SetStatusChange(isAlive);
+    theResult.SetEnergyChange(theElectron->GetKineticEnergy());
+    // new direction for the electron
+    theResult.SetMomentumChange(theElectron->GetMomentumDirection());
     return &theResult;        // DO-NOTHING condition
   }
   G4double photonQ2 = theElectronData.GetEquivalentPhotonQ2(photonEnergy);
-  G4double W=photonEnergy-photonQ2/dM;   // Hadronic energy flow (W-energy) from the virtual photon
+  G4double W=photonEnergy-photonQ2/dM; // Hadronic energy flow from the virtual photon
   if(getenv("debug_G4ElectroNuclearReaction") )
   {
@@ -157,11 +156,13 @@
     theResult.SetStatusChange(isAlive);
     theResult.SetEnergyChange(theElectron->GetKineticEnergy());
-    theResult.SetMomentumChange(theElectron->GetMomentumDirection()); // new direction for the electron
+    // new direction for the electron
+    theResult.SetMomentumChange(theElectron->GetMomentumDirection());
     return &theResult;        // DO-NOTHING condition
-    throw G4HadronicException(__FILE__, __LINE__, "G4ElectroNuclearReaction::ApplyYourself: negative equivalent energy");
+    throw G4HadronicException(__FILE__, __LINE__,
+                    "G4ElectroNuclearReaction::ApplyYourself: negative equivalent energy");
   }
   G4DynamicParticle* theDynamicPhoton = new 
                      G4DynamicParticle(G4Gamma::GammaDefinition(), 
-		     G4ParticleMomentum(1.,0.,0.), photonEnergy*MeV);            //->-*
+                     G4ParticleMomentum(1.,0.,0.), photonEnergy*MeV);        //----->-*
   G4double sigNu=thePhotonData.GetCrossSection(theDynamicPhoton, anElement); //       |
   theDynamicPhoton->SetKineticEnergy(W); // Redefine photon with equivalent energy    |
@@ -173,5 +174,6 @@
     theResult.SetStatusChange(isAlive);
     theResult.SetEnergyChange(theElectron->GetKineticEnergy());
-    theResult.SetMomentumChange(theElectron->GetMomentumDirection()); // new direction for the electron
+    // new direction for the electron
+    theResult.SetMomentumChange(theElectron->GetMomentumDirection());
     return &theResult; // DO-NOTHING condition
   }
@@ -180,9 +182,9 @@
   G4double iniE=theElectronKinEnergy+me; // Initial total energy of electron
   G4double finE=iniE-photonEnergy;       // Final total energy of electron
-  theResult.SetEnergyChange(std::max(0.,finE-me));    // Modifies the KINETIC ENERGY (Why not in the name?)
+  theResult.SetEnergyChange(std::max(0.,finE-me)); // Modifies the KINETIC ENERGY
   G4double EEm=iniE*finE-me2;            // Just an intermediate value to avoid "2*"
-  G4double iniP=std::sqrt(iniE*iniE-me2);     // Initial momentum of the electron
-  G4double finP=std::sqrt(finE*finE-me2);     // Final momentum of the electron
-  G4double cost=(EEm+EEm-photonQ2)/iniP/finP; // std::cos(theta) for the electron scattering
+  G4double iniP=std::sqrt(iniE*iniE-me2);          // Initial momentum of the electron
+  G4double finP=std::sqrt(finE*finE-me2);          // Final momentum of the electron
+  G4double cost=(EEm+EEm-photonQ2)/iniP/finP;// std::cos(theta) for the electron scattering
   if(cost>1.) cost=1.;
   if(cost<-1.) cost=-1.;
@@ -192,5 +194,5 @@
   G4ThreeVector orty = dir.cross(ortx);  // Second unit vector orthoganal to the direction
   G4double sint=std::sqrt(1.-cost*cost);      // Perpendicular component
-  G4double phi=dpi*G4UniformRand();      // phi of scattered electron
+  G4double phi=twopi*G4UniformRand();      // phi of scattered electron
   G4double sinx=sint*std::sin(phi);           // x-component
   G4double siny=sint*std::cos(phi);           // y-component
@@ -199,5 +201,5 @@
   G4ThreeVector photonMomentum=iniP*dir-finP*findir;
   G4DynamicParticle localGamma(G4Gamma::GammaDefinition(), photonEnergy, photonMomentum);
-  //G4DynamicParticle localGamma(G4Gamma::GammaDefinition(), photonDirection, photonEnergy);
+  //G4DynamicParticle localGamma(G4Gamma::GammaDefinition(),photonDirection, photonEnergy);
   //G4DynamicParticle localGamma(G4Gamma::GammaDefinition(), photonLorentzVector);
   G4ThreeVector position(0,0,0);
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4GammaNuclearReaction.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4GammaNuclearReaction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4GammaNuclearReaction.hh	(revision 1055)
@@ -25,13 +25,13 @@
 //
 //
-// $Id: G4GammaNuclearReaction.hh,v 1.14 2008/09/01 17:30:42 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4GammaNuclearReaction.hh,v 1.15 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
-// GEANT4 physics class: G4GammaNuclearReaction -- header file
-// Created: J.P. Wellisch, 2000/08/18 
+// GEANT4 physics class: G4GammaNuclearReaction - header file for CHIPS
+// Created: J.P. Wellisch, following M.Kossov's algorithm. 2000/08/18 
 // The last update: J.P. Wellisch, Thu Jun  6 2002.
 // 01.09.2008 V.Ivanchenko move inline to source and define interaction name
-//
+// 17.02.2009 M.Kossov, now it is recommended to use the G4QCollision process
 
 #ifndef G4GammaNuclearReaction_h
@@ -51,5 +51,5 @@
     
   virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 
-					 G4Nucleus& aTargetNucleus);
+                                         G4Nucleus& aTargetNucleus);
 
 private:
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4PionMinusNuclearAtRestChips.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4PionMinusNuclearAtRestChips.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4PionMinusNuclearAtRestChips.hh	(revision 1055)
@@ -23,4 +23,5 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
+// 17.02.2009 M.Kossov, now it is recommended to use the G4QCaptureAtRest process
 //
 #ifndef G4PionMinusNuclearAtRestChips_h
@@ -43,5 +44,5 @@
   public:
  
-     G4PionMinusNuclearAtRestChips(const G4String& processName ="PionMinusAnnihilationAtRest")
+     G4PionMinusNuclearAtRestChips(const G4String& processName ="PionMinusCaptureAtRest")
       : G4VRestProcess (processName, fHadronic) 
      {
@@ -56,13 +57,13 @@
      }
 
-  // null physics table
+     // null physics table
      void BuildPhysicsTable(const G4ParticleDefinition&){}
 
      G4double AtRestGetPhysicalInteractionLength(const G4Track&track,
-						 G4ForceCondition*condition);
+       G4ForceCondition*condition);
 
-  // zero mean lifetime
+     // zero mean lifetime
      G4double GetMeanLifeTime(const G4Track& aTrack,
-			      G4ForceCondition* condition) {return 0.0;}
+         G4ForceCondition* condition) {return 0.0;}
 
      G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&); 
@@ -79,5 +80,6 @@
   if(aTrack.GetDynamicParticle()->GetDefinition() != G4PionMinus::PionMinus())
   {
-    throw G4HadronicException(__FILE__, __LINE__, "Calling G4PionMinusNuclearAtRestChips with particle other than pi-!!!");
+    throw G4HadronicException(__FILE__, __LINE__,
+                  "Calling G4PionMinusNuclearAtRestChips with particle other than pi-!!!");
   }
   
@@ -91,6 +93,5 @@
 
 G4double G4PionMinusNuclearAtRestChips::
-AtRestGetPhysicalInteractionLength(const G4Track&track,
-				   G4ForceCondition*condition)
+AtRestGetPhysicalInteractionLength(const G4Track&track, G4ForceCondition*condition)
 {
   ResetNumberOfInteractionLengthLeft();
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4PionMinusNuclearReaction.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4PionMinusNuclearReaction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4PionMinusNuclearReaction.hh	(revision 1055)
@@ -23,5 +23,7 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
-//
+// (@@ Why only pi-, why not pi+? - Looks like a dummy CHIPS pocess - M.K.)
+// 17.02.2009 M.Kossov, now it is recommended to use the G4QCollision process
+
 #ifndef G4PionMinusNuclearReaction_h
 #define G4PionMinusNuclearReaction_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ProtonAntiProtonAtRestChips.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ProtonAntiProtonAtRestChips.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ProtonAntiProtonAtRestChips.hh	(revision 1055)
@@ -23,5 +23,6 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
-//
+// (Why only antiproton-proton, when the antiproton-nucleus is made? - M.K.)
+// 17.02.2009 M.Kossov, now it is recommended to use the G4QCaptureAtRest process
 #ifndef G4ProtonAntiProtonAtRestChips_h
 #define G4ProtonAntiProtonAtRestChips_h
@@ -50,5 +51,6 @@
   public:
  
-     G4ProtonAntiProtonAtRestChips(const G4String& processName ="AntiProtonAnnihilationAtRest")
+     G4ProtonAntiProtonAtRestChips(const G4String& processName=
+                                                            "AntiProtonAnnihilationAtRest")
       : G4VRestProcess (processName, fHadronic) 
      {
@@ -56,5 +58,5 @@
      }
  
-    ~G4ProtonAntiProtonAtRestChips() {}
+     ~G4ProtonAntiProtonAtRestChips() {}
 
      G4bool IsApplicable(const G4ParticleDefinition& aParticle)
@@ -67,9 +69,9 @@
 
      G4double AtRestGetPhysicalInteractionLength(const G4Track&track,
-						 G4ForceCondition*condition);
+       G4ForceCondition*condition);
 
   // zero mean lifetime
      G4double GetMeanLifeTime(const G4Track& aTrack,
-			      G4ForceCondition* condition) {return 0.0;}
+         G4ForceCondition* condition) {return 0.0;}
 
      G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&); 
@@ -92,9 +94,11 @@
   if(aTrack.GetDynamicParticle()->GetDefinition() != G4AntiProton::AntiProton())
   {
-    throw G4HadronicException(__FILE__, __LINE__, "Calling G4ProtonAntiProtonAtRestChips with particle other than p-bar!!!");
+    throw G4HadronicException(__FILE__, __LINE__,
+                "Calling G4ProtonAntiProtonAtRestChips with particle other than p-bar!!!");
   }
   if(aTargetNucleus.GetZ() != 1)
   {
-    throw G4HadronicException(__FILE__, __LINE__, "Calling G4ProtonAntiProtonAtRestChips for target other than Hydrogen!!!");
+    throw G4HadronicException(__FILE__, __LINE__,
+                "Calling G4ProtonAntiProtonAtRestChips for target other than Hydrogen!!!");
   }
   
@@ -105,5 +109,5 @@
 G4double G4ProtonAntiProtonAtRestChips::
 AtRestGetPhysicalInteractionLength(const G4Track&track,
-				   G4ForceCondition*condition)
+       G4ForceCondition*condition)
 {
   ResetNumberOfInteractionLengthLeft();
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ProtonAntiProtonReaction.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ProtonAntiProtonReaction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ProtonAntiProtonReaction.hh	(revision 1055)
@@ -23,5 +23,6 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
-//
+// (Why only antiproton-proton, when the antiproton-nucleus is made? - M.K.)
+// 17.02.2009 M.Kossov, now it is recommended to use the G4QCollision process
 #ifndef G4ProtonAntiProtonReaction_h
 #define G4ProtonAntiProtonReaction_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuANuNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuANuNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuANuNuclearCrossSection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QANuANuNuclearCrossSection.hh,v 1.1 2007/11/01 16:09:38 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QANuANuNuclearCrossSection.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -33,5 +33,5 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005
 //
-// Short description: this G4 singletone class calculates (nu_mu,mu) Nuclear cross section
+// Short description: this G4 singletone class calculates (an-nu,an-nu)A cross section
 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A)
 // ****************************************************************************************
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuENuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuENuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuENuclearCrossSection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QANuENuclearCrossSection.hh,v 1.1 2007/10/02 10:00:37 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QANuENuclearCrossSection.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -33,5 +33,5 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-SEP-2007
 //
-// Short description: this G4 singletone class calculates (nu_e,e) Nuclear cross section
+// Short description: this G4 singletone class calculates (anu_e,e+) Nuclear cross section
 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A)
 // ****************************************************************************************
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuMuNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuMuNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuMuNuclearCrossSection.hh	(revision 1055)
@@ -25,9 +25,9 @@
 //
 //
-// $Id: G4QANuMuNuclearCrossSection.hh,v 1.6 2006/12/01 10:57:46 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QANuMuNuclearCrossSection.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
-// GEANT4 physics class: G4QANuMuNuclearCrossSection -- header file
+// GEANT4 physics class: G4QANuMuNuclearCrossSection -- header file for (anu_mu,mu+)A XS
 // M.V. Kossov, CERN-ITEP(Moscow), 20-DEC-2005
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QAtomicElectronScattering.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QAtomicElectronScattering.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QAtomicElectronScattering.hh	(revision 1055)
@@ -24,47 +24,28 @@
 // ********************************************************************
 //
-// $Id: G4QAtomicElectronScattering.hh,v 1.2 2006/12/13 15:45:16 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QAtomicElectronScattering.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QAtomicElectronScattering header ----------------
 //                 by Mikhail Kossov, December 2003.
-//  Header of G4QAtomicElectronScattering class (mu-,pi-,K-) of the CHIPS Simulation Branch in GEANT4
+// Header of G4QAtomicElectronScattering class of the CHIPS Simulation Branch in GEANT4
 // -------------------------------------------------------------------------------
-// This is a unique CHIPS class for the Nuclear Capture At Rest Prosesses.
+// This is a unique CHIPS class for the Nuclear Interactions with Atomic electrons.
 // -------------------------------------------------------------------------------
-// At present (Dec.04) only pi+/-, K+/- proton, neutron, antiproton and antineutron
-// collisions with protons are implemented, which are fundamental for the in matter
-// simulation of hadronic reactions. The interactions of the same particles with
-// nuclei are planned only. The collisions of nuclei with nuclei are possible...
-// The simulation is based on the G4QuasmonString class, which extends the CHIPS model
-// to the highest energyes, implementing the Quasmon string with the
-// String->Quasmons->Hadrons scenario of the quark-gluon string fragmentation
-// --> CHIPS is a SU(3) event generator, so it does not include reactions with the
-// heavy (c,b,t), which can be simulated only by the SU(6) QUIPS (QUark Invariant
-// Phase Space) model which is an expantion of the CHIPS.-December 2003.M.Kossov.-
-// -------------------------------------------------------------------------------
-// Algorithms: the interactions in CHIPS are described by the quark exchange (QE) process.
-// The first step is the low energy quark exchange. If as a result of the QE one or
-// both secondary hadrons are below the pi0 threshold (roughly) they are pushed to the
-// Ground State (GS) value(s). The excited (above the pi0 production threshold) hadronic
-// state is considered as a Quasmon, which is filled in the G4QuasmonVector of the
-// G4QuasmonString class. On the second step all G4Quasmons are decayed by the
-// G4Quasmon class and fiill the G4QHadronVector output. If the exchange quark is too far
-// in the rapidity space (a parameter of the G4QuasmonString class) from any of the quarks
-// of the other hadron it creates a string with the nearest in the rapidity space quark.
-// This string is converted into a Quasmon. This forces the coalescence of the residuals
-// in the another Quasmon, while the possibility exist to create more residual Quasmons
-// instead of one - one per each target-quark+projectile-antiquark(diquark) pair. This
-// possibility is tuned by the Drell-Yan pair production process. If the target (or
-// pojectile) are nuclei, then the Quasmons are created not only in vacuum, where they
-// can be fragmented by the G4Quasmon class, but in nuclear matter of the residual target
-// (or projectile). If the Quasmons are crated in nuclear matter, they are fragmented by
-// the G4QEnvironment class with the subsequent Quark Exchange nuclear fragmentation.
-// This is the planned scenario.- December 2004.Mikhail Kossov.-
-// --------------------------------------------------------------------------------
 // ****************************************************************************************
 // ********* This HEADER is temporary moved from the photolepton_hadron directory *********
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: CHIPS is re3sponsible for photo- and lepto-nuclear
+// reactions. In particular for thr electron-nuclear reactions. At High
+// Energies the nucleons (including neutrons) and nuclear fragments can
+// interact with atomic electrons (reversed electro-nuclear reaction -
+// antilab), while they are missing the nucler-nuclear (ion-ion) reac-
+// tions. This nucleo-electron process comes "for-free" in CHIPS, as the
+// cross-sections of the interaction is known from the electro-nuclear
+// reactions. The only problem is to move the output from the antilab to
+// lab system. This is what this process is aiming to do. It can be used
+// for the ion transport in Geant4.
+// ---------------------------------------------------------------------
 
 #ifndef G4QAtomicElectronScattering_hh
@@ -116,5 +97,5 @@
   // (energy, material)
   // The previousStepSize and G4ForceCondition* are not used.
-  // This function overloads a virtual function of the base class.		      
+  // This function overloads a virtual function of the base class.        
   // It is invoked by the ProcessManager of the Particle.
  
@@ -122,5 +103,5 @@
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
   // It computes the final state of the process (at end of step),
-  // returned as a ParticleChange object.			    
+  // returned as a ParticleChange object.       
   // This function overloads a virtual function of the base class.
   // It is invoked by the ProcessManager of the Particle.
@@ -147,5 +128,5 @@
   G4QAtomicElectronScattering(const G4QAtomicElectronScattering&);
 
-		// BODY
+  // BODY
   // Static Parameters
   static G4bool   manualFlag;  // If false then standard parameters are used
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCaptureAtRest.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCaptureAtRest.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCaptureAtRest.hh	(revision 1055)
@@ -24,10 +24,10 @@
 // ********************************************************************
 //
-// $Id: G4QCaptureAtRest.hh,v 1.6 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCaptureAtRest.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCaptureAtRest header ----------------
 //                 by Mikhail Kossov, December 2003.
-//  Header of G4QCaptureAtRest class (mu-,pi-,K-) of the CHIPS Simulation Branch in GEANT4
+// Header of G4QCaptureAtRest class of the CHIPS Simulation Branch in GEANT4
 // -------------------------------------------------------------------------------
 // This is a unique CHIPS class for the Nuclear Capture At Rest Prosesses.
@@ -78,4 +78,11 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short Description: This is a universal process for nuclear capture
+// (including annihilation) of all negative particles (negative hadrons,
+// negative leptons: mu- & tau-). It can be used for the cold neutron
+// capture, but somebody should decide what is the probability (defined
+// by the capture cross-section and atomic material properties) to switch
+// the cold neutron to the at-rest neutron. - M.K.2009.
+// ----------------------------------------------------------------------
 
 #ifndef G4QCaptureAtRest_hh
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCoherentChargeExchange.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCoherentChargeExchange.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCoherentChargeExchange.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QCoherentChargeExchange.hh,v 1.5 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCoherentChargeExchange.hh,v 1.6 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCoherentChargeExchange header ----------------
@@ -33,9 +33,28 @@
 // This is a unique CHIPS class for the Hadron-Nuclear Elastic Scattering Prosesses
 // -------------------------------------------------------------------------------
-// At present (Jan-06) only proton-proton scattering is implemented The interaction with
-// nuclei are planned only. The scattering of nuclei on nuclei are possible...
+// At present (Jan-06) only proton-to-neutron & neutron-to-proton scattering on nuclei
+// are implemented. The scattering of mesons and nuclei on nuclei are possible...
 // The simulation is based on the CHIPS approximation of total elastic and differential
 // elastic cross sections from E=0 to the highest energyes.
 // -------------------------------------------------------------------------------
+// Short description: This class resolves an ambiguity in the definition of the
+// "inelastic" cross section. As it was shown in Ph.D.Thesis (M.Kosov,ITEP,1979)
+// it is more reasonable to subdivide the total cross-section in the coherent &
+// incoherent parts, but the measuring method for the "inelastic" cross-sections
+// consideres the lack of the projectile within the narrow forward solid angle
+// with the consequent extrapolation of these partial cross-sections, corresponding
+// to the particular solid angle, to the zero solid angle. The low angle region
+// is shadowed by the elastic (coherent) scattering. BUT the coherent charge
+// exchange (e.g. conversion p->n) is included by this procedure as a constant term
+// in the extrapolation, so the "inelastic" cross-section differes from the
+// incoherent cross-section by the value of the coherent charge exchange cross
+// section. Fortunately, this cross-sectoion drops ruther fast with energy increasing.
+// All Geant4 inelastic hadronic models (including CHIPS) simulate the incoherent
+// reactions. So the incoherent (including quasielastic) cross-section must be used
+// instead of the inelastic cross-section. For that the "inelastic" cross-section
+// must be reduced by the value of the coherent charge-exchange cross-section, which
+// is estimated (it must be tuned!) in this CHIPS class. The angular distribution
+// is made (at present) identical to the corresponding coherent-elastic scattering 
+// -----------------------------------------------------------------------------------
 
 #ifndef G4QCoherentChargeExchange_hh
@@ -84,5 +103,5 @@
   // (energy, material)
   // The previousStepSize and G4ForceCondition* are not used.
-  // This function overloads a virtual function of the base class.		      
+  // This function overloads a virtual function of the base class.        
   // It is invoked by the ProcessManager of the Particle.
  
@@ -90,5 +109,5 @@
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
   // It computes the final state of the process (at end of step),
-  // returned as a ParticleChange object.			    
+  // returned as a ParticleChange object.       
   // This function overloads a virtual function of the base class.
   // It is invoked by the ProcessManager of the Particle.
@@ -110,5 +129,5 @@
   G4double CalculateXSt(G4bool oxs, G4bool xst, G4double p, G4int Z, G4int N, G4int pPDG);
 
-		// BODY
+  // BODY
   // Static Parameters --------------------------------------------------------------------
   static G4int    nPartCWorld; // The#of particles for hadronization (limit of A of fragm.)
@@ -128,3 +147,2 @@
 };
 #endif
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCollision.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCollision.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCollision.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QCollision.hh,v 1.11 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCollision.hh,v 1.13 2009/03/23 14:12:49 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCollision header ----------------
@@ -67,4 +67,7 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: This is a universal class for the incoherent (inelastic)
+// nuclear interactions in the CHIPS model.
+// ---------------------------------------------------------------------------
 
 #ifndef G4QCollision_hh
@@ -86,4 +89,5 @@
 #include "G4LorentzVector.hh"
 #include "G4HadronicProcessType.hh"
+#include "G4RandomDirection.hh"
 
 // CHIPS Headers
@@ -124,5 +128,5 @@
   // (energy, material)
   // The previousStepSize and G4ForceCondition* are not used.
-  // This function overloads a virtual function of the base class.		      
+  // This function overloads a virtual function of the base class.        
   // It is invoked by the ProcessManager of the Particle.
  
@@ -130,5 +134,5 @@
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
   // It computes the final state of the process (at end of step),
-  // returned as a ParticleChange object.			    
+  // returned as a ParticleChange object.       
   // This function overloads a virtual function of the base class.
   // It is invoked by the ProcessManager of the Particle.
@@ -170,5 +174,5 @@
   std::pair<G4double,G4double> Random2DDirection();
 
-		// BODY
+  // BODY
   // Static Parameters --------------------------------------------------------------------
   static G4bool   manualFlag;  // If false then standard parameters are used
@@ -207,3 +211,2 @@
 };
 #endif
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiffraction.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiffraction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiffraction.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QDiffraction.hh,v 1.2 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDiffraction.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QDiffraction header ----------------
@@ -36,4 +36,14 @@
 // The normalization is based on the temporary G4QProtonNuclearCrossSection class
 // -------------------------------------------------------------------------------
+// Short description: This is a process, which describes the diffraction
+// excitation of the projectile and the nucleus. On nuclei in addition there
+// can be a coherent diffraction process for the projectile, but it is
+// comparably small. The most important part of the diffraction is the
+// progectile diffraction excitation, as in this interaction proton can lose
+// only a small part of its energy and make the shower longer. This is because
+// only 1-2 (n) pions are produce in the diffraction escitation, and the mean
+// kept energy of the nucleon is (1-n/7)=80%. For kaons the kept energy is much
+// smaller (1-n/3.5)=60%, and for pions it is less important (about 40%).
+// ----------------------------------------------------------------------------
 
 #ifndef G4QDiffraction_hh
@@ -82,5 +92,5 @@
   // (energy, material)
   // The previousStepSize and G4ForceCondition* are not used.
-  // This function overloads a virtual function of the base class.		      
+  // This function overloads a virtual function of the base class.        
   // It is invoked by the ProcessManager of the Particle.
  
@@ -88,5 +98,5 @@
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
   // It computes the final state of the process (at end of step),
-  // returned as a ParticleChange object.			    
+  // returned as a ParticleChange object.       
   // This function overloads a virtual function of the base class.
   // It is invoked by the ProcessManager of the Particle.
@@ -108,5 +118,5 @@
   G4double CalculateXS(G4double p, G4int Z, G4int N, G4int pPDG);
 
-		// BODY
+  // BODY
   // Static Parameters --------------------------------------------------------------------
   static G4int    nPartCWorld; // The#of particles for hadronization (limit of A of fragm.)
@@ -126,3 +136,2 @@
 };
 #endif
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiffractionRatio.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiffractionRatio.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiffractionRatio.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -32,4 +32,8 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006
 //
+//=======================================================================
+// Short description: Difraction excitation is a part of the incoherent
+// (inelastic) interaction. This part is calculated in the class.
+// --------------------------------------------------------------------
 
 #ifndef G4QDiffractionRatio_h
@@ -88,4 +92,4 @@
  // Body
  private:
-}; 					
+};      
 #endif
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiscProcessMixer.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiscProcessMixer.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiscProcessMixer.hh	(revision 1055)
@@ -24,16 +24,14 @@
 // ********************************************************************
 //
-// $Id: G4QDiscProcessMixer.hh,v 1.3 2008/07/09 19:45:09 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDiscProcessMixer.hh,v 1.6 2009/04/17 15:22:31 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QDiscProcessMixer header ----------------
 //                 by Mikhail Kossov, Aug 2007.
-//  Header of G4QDiscProcessMixer class (hadron+A) of the CHIPS Simulation Branch in GEANT4
-// -------------------------------------------------------------------------------
-// This is a unique CHIPS class for the Hadron-Nuclear Diffractive Interaction Prosesses
-// -------------------------------------------------------------------------------
-// At present (Aug-07) it is not tested.
-// The normalization is based on the temporary G4QIonIonCrossSection class
-// -------------------------------------------------------------------------------
+//  Header of G4QDiscProcessMixer class of the CHIPS Simulation Branch in GEANT4
+// -----------------------------------------------------------------------------
+// Short description: universal mixer of processes (NOT models as in GHAD!)
+// depending on the application energy region (defined by users).
+// ------------------------------------------------------------------------
 
 #ifndef G4QDiscProcessMixer_hh
@@ -68,5 +66,4 @@
                       const G4ParticleDefinition* proj = G4Gamma::Gamma(),
                       G4ProcessType pType = fHadronic );
-
   // Destructor
   ~G4QDiscProcessMixer();
@@ -76,9 +73,17 @@
   G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
                                                 G4double previousStepSize,
-			                                             G4ForceCondition* condition);
+                                                G4ForceCondition* condition);
+
+  G4double GetMeanFreePath(const G4Track& aTrack, G4double previousStepSize,
+                           G4ForceCondition* condition);
 
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
 
-  void AddDiscreteProcess(G4VDiscreteProcess* DP, G4double ME);
+  // DP is the name of the Discrete Process, MaxE is the maximum energy for this process
+  // The processes must be defined, starting from high energy processes (MaxE decreasing)
+  // The MaxE for the first (highest energy process) is always infinity (automatic)
+  // The MinE = MaxE of the lower energy process (MinE=0 for the lowest energy process)
+
+  void AddDiscreteProcess(G4VDiscreteProcess* DP, G4double MaxE);
 
   //G4LorentzVector GetEnegryMomentumConservation();
@@ -94,5 +99,5 @@
   G4QDiscProcessMixer(const G4QDiscProcessMixer& DPM);
 
-		// BODY
+  // BODY
   const G4ParticleDefinition* DPParticle;             // Particle for DiscreteProc mixture
   G4QDiscreteProcessVector theDPVector;               // Vector of Discrete Processes
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiscreteProcessVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiscreteProcessVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiscreteProcessVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QDiscreteProcessVector.hh,v 1.1 2007/08/28 15:48:15 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDiscreteProcessVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QDiscreteProcessVector ----------------
@@ -32,4 +32,8 @@
 // Type defenition for Vectors of DiscreteProcesses (G4VDiscreteProcess)
 // ---------------------------------------------------------------------
+// Short description: universal mixer of processes (NOT models as in GHAD!)
+// depending on the application energy region G4QDiscProcessMixer is using
+// this vector of the Geant4 processes.
+// ------------------------------------------------------------------------
 
 #ifndef G4QDiscreteProcessVector_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElastic.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElastic.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QElastic.hh,v 1.4 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QElastic.hh,v 1.5 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QElastic header ----------------
@@ -38,4 +38,8 @@
 // elastic cross sections from E=0 to the highest energyes.
 // -------------------------------------------------------------------------------
+// Short description: At present this is a process for nucleon-nucleus
+// elastic scattering. Mesons and hyperons exist only for the Hydrogen
+// target (see G4QuasiFreeRatios).
+// ---------------------------------------------------------------
 
 #ifndef G4QElastic_hh
@@ -83,5 +87,5 @@
   // (energy, material)
   // The previousStepSize and G4ForceCondition* are not used.
-  // This function overloads a virtual function of the base class.		      
+  // This function overloads a virtual function of the base class.        
   // It is invoked by the ProcessManager of the Particle.
  
@@ -89,5 +93,5 @@
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
   // It computes the final state of the process (at end of step),
-  // returned as a ParticleChange object.			    
+  // returned as a ParticleChange object.       
   // This function overloads a virtual function of the base class.
   // It is invoked by the ProcessManager of the Particle.
@@ -109,5 +113,5 @@
   G4double CalculateXSt(G4bool oxs, G4bool xst, G4double p, G4int Z, G4int N, G4int pPDG);
 
-		// BODY
+  // BODY
   // Static Parameters --------------------------------------------------------------------
   static G4int    nPartCWorld; // The#of particles for hadronization (limit of A of fragm.)
@@ -127,3 +131,2 @@
 };
 #endif
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElasticCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElasticCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElasticCrossSection.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -32,4 +32,7 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006
 //
+//================================================================================
+// Short description: Interaction cross-sections for the G4QElastic process
+// -------------------------------------------------------------------------------
 
 #ifndef G4QElasticCrossSection_h
@@ -121,12 +124,12 @@
   static G4double* lastCST;  // Last cross-section table
   static G4double* lastPAR;  // Last parameters for functional calculation
-  static G4double* lastSST;  // E-dep of squared slope of the first difruction	
-  static G4double* lastS1T;  // E-dep of mantissa of the first difruction	
+  static G4double* lastSST;  // E-dep of squared slope of the first difruction 
+  static G4double* lastS1T;  // E-dep of mantissa of the first difruction 
   static G4double* lastB1T;  // E-dep of the slope of the first difruction
   static G4double* lastS2T;  // E-dep of mantissa of the second difruction
   static G4double* lastB2T;  // E-dep of the slope of theSecond difruction
-  static G4double* lastS3T;  // E-dep of mantissa of the third difruction	
+  static G4double* lastS3T;  // E-dep of mantissa of the third difruction 
   static G4double* lastB3T;  // E-dep of the slope of the third difruction
-  static G4double* lastS4T;  // E-dep of mantissa of the 4-th difruction	
+  static G4double* lastS4T;  // E-dep of mantissa of the 4-th difruction 
   static G4double* lastB4T;  // E-dep of the slope of the 4-th difruction
 
@@ -142,4 +145,4 @@
   static std::vector <G4double*> S4T;   // Vector of the 4-th mantissa (gloria)
   static std::vector <G4double*> B4T;   // Vector of the 4-th slope    (gloria)
- }; 					
+ };
 #endif
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElectronNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElectronNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElectronNuclearCrossSection.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -32,4 +32,8 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 25-Sept-03
 //
+// --------------------------------------------------------------------------------
+// Short description: reaction cross-sections for electron-nuclear reactions, which
+// are integrals over virtual equivalent photons photons.
+// --------------------------------------------------------------------------------
 
 #ifndef G4QElectronNuclearCrossSection_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QGluonString.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QGluonString.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QGluonString.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QGluonString.hh,v 1.2 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QGluonString.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QGluonString header ----------------
@@ -44,4 +44,6 @@
 // *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch **********
 // ****************************************************************************************
+// Short description: CHIPS object for the Quark-Gluon String
+// ---------------------------------------------------------------
 
 #ifndef G4QGluonString_hh
@@ -89,10 +91,10 @@
   // (energy, material)
   // The previousStepSize and G4ForceCondition* are not used.
-  // This function overloads a virtual function of the base class.		      
+  // This function overloads a virtual function of the base class.        
   // It is invoked by the ProcessManager of the Particle.
  
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
   // It computes the final state of the process (at end of step),
-  // returned as a ParticleChange object.			    
+  // returned as a ParticleChange object.       
   // This function overloads a virtual function of the base class.
   // It is invoked by the ProcessManager of the Particle.
@@ -126,5 +128,5 @@
   G4QGluonString(const G4QGluonString&);
 
-		// BODY
+  // BODY
   // Static Parameters --------------------------------------------------------------------
   static G4bool   manualFlag;  // If false then standard parameters are used
@@ -160,3 +162,2 @@
 };
 #endif
-
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QIonIonCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QIonIonCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QIonIonCrossSection.hh	(revision 1055)
@@ -23,7 +23,9 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
+// Short description: CHIPS cross-sectons for Ion-Ion interactions
+// ---------------------------------------------------------------
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QIonIonElastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QIonIonElastic.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QIonIonElastic.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QIonIonElastic.hh,v 1.2 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QIonIonElastic.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QIonIonElastic header ----------------
@@ -35,7 +35,7 @@
 // @@ This class is on the testing level @@
 // -------------------------------------------------------------------------------
-// ****************************************************************************************
-// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
-// ****************************************************************************************
+// Short description: a simple process for the Ion-Ion elastic scattering.
+// For heavy by heavy ions it can reach 50% of the total cross-section.
+// -----------------------------------------------------------------------
 
 #ifndef G4QIonIonElastic_hh
@@ -84,5 +84,5 @@
   // (energy, material)
   // The previousStepSize and G4ForceCondition* are not used.
-  // This function overloads a virtual function of the base class.		      
+  // This function overloads a virtual function of the base class.        
   // It is invoked by the ProcessManager of the Particle.
  
@@ -90,5 +90,5 @@
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
   // It computes the final state of the process (at end of step),
-  // returned as a ParticleChange object.			    
+  // returned as a ParticleChange object.       
   // This function overloads a virtual function of the base class.
   // It is invoked by the ProcessManager of the Particle.
@@ -107,5 +107,5 @@
   G4QIonIonElastic(const G4QIonIonElastic&);
 
-		// BODY
+  // BODY
   // Static Parameters --------------------------------------------------------------------
   static G4int    nPartCWorld; // The#of particles for hadronization (limit of A of fragm.)
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QLowEnergy.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QLowEnergy.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QLowEnergy.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QLowEnergy.hh,v 1.4 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QLowEnergy.hh,v 1.6 2009/03/09 15:41:17 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QLowEnergy header ----------------
@@ -31,9 +31,14 @@
 //  Header of G4QLowEnergy class (A+A) of the CHIPS Simulation Branch in GEANT4
 // -------------------------------------------------------------------------------
-// This is a unique CHIPS class for the Ion-Ion Low Energy Inelastic Interaction Prosesses
+// This is a unique CHIPS class for the Ion-Ion Low Energy Inelastic Interactions
 // -------------------------------------------------------------------------------
 // At present (Aug-07) it is not tested.
 // The normalization is based on the temporary G4QIonIonCrossSection class
 // -------------------------------------------------------------------------------
+// Short description: This is a fast low energy algorithm for the
+// inelastic interactions of nucleons and nuclei (ions) with nuclei.
+// This is a fase-space algorithm, but not quark level. Provides
+// nuclear fragments upto alpha only. Never was tumed (but can be).
+// ---------------------------------------------------------------
 
 #ifndef G4QLowEnergy_hh
@@ -60,4 +65,5 @@
 #include "G4QNucleus.hh"
 #include "G4QIonIonCrossSection.hh"
+#include "G4QProtonNuclearCrossSection.hh"
 #include "G4QIsotope.hh"
 #include "G4QPDGToG4Particle.hh"
@@ -83,5 +89,5 @@
   // (energy, material)
   // The previousStepSize and G4ForceCondition* are not used.
-  // This function overloads a virtual function of the base class.		      
+  // This function overloads a virtual function of the base class.        
   // It is invoked by the ProcessManager of the Particle.
  
@@ -89,5 +95,5 @@
   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 
   // It computes the final state of the process (at end of step),
-  // returned as a ParticleChange object.			    
+  // returned as a ParticleChange object.       
   // This function overloads a virtual function of the base class.
   // It is invoked by the ProcessManager of the Particle.
@@ -112,5 +118,5 @@
   G4double CalculateXS(G4double p, G4int Z, G4int N, G4int pPDG);
 
-		// BODY
+  // BODY
   // Static Parameters --------------------------------------------------------------------
   static G4int    nPartCWorld; // The#of particles for hadronization (limit of A of fragm.)
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QMuonNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QMuonNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QMuonNuclearCrossSection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QMuonNuclearCrossSection.hh,v 1.6 2008/10/24 19:23:25 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QMuonNuclearCrossSection.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -39,4 +39,8 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: reaction cross-sections for muon-nuclear reactions, which
+// are integrals over virtual equivalent photons photons. The muon-nuclear GHAD
+// model (not CHIPS) gives 2-3 times smaller scattering angle and deposited energy.
+// --------------------------------------------------------------------------------
 
 #ifndef G4QMuonNuclearCrossSection_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNeutronNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNeutronNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNeutronNuclearCrossSection.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -32,8 +32,7 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-May-02
 //
-// ****************************************************************************************
-// ********* This HEADER is temporary moved from the photolepton_hadron directory *********
-// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
-// ****************************************************************************************
+// -------------------------------------------------------------------
+// Short description: neutron-nuclear cross-section for hadronic CHIPS
+// -------------------------------------------------------------------
 
 #ifndef G4QNeutronNuclearCrossSection_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuENuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuENuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuENuclearCrossSection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QNuENuclearCrossSection.hh,v 1.1 2007/10/02 10:00:37 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QNuENuclearCrossSection.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -33,5 +33,5 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-SEP-2007
 //
-// Short description: this G4 singletone class calculates (nu_e,e) Nuclear cross section
+// Short description: this G4 singletone class calculates (nu_e,e-) Nuclear cross section
 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A)
 // ****************************************************************************************
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuMuNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuMuNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuMuNuclearCrossSection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QNuMuNuclearCrossSection.hh,v 1.6 2006/12/01 10:57:46 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QNuMuNuclearCrossSection.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -33,5 +33,5 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005
 //
-// Short description: this G4 singletone class calculates (nu_mu,mu) Nuclear cross section
+// Short description: this G4 singletone class calculates (nu_mu,mu-) Nuclear cross section
 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A)
 // ****************************************************************************************
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuNuNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuNuNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuNuNuclearCrossSection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QNuNuNuclearCrossSection.hh,v 1.1 2007/11/01 16:09:38 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QNuNuNuclearCrossSection.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -33,5 +33,5 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005
 //
-// Short description: this G4 singletone class calculates (nu_mu,mu) Nuclear cross section
+// Short description: this G4 singletone class calculates (nu,nu) Nuclear cross section
 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A)
 // ****************************************************************************************
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QPhotonNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QPhotonNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QPhotonNuclearCrossSection.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -36,4 +36,8 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: This is an original CHIPS process for photo-nuclear
+// interactions, which does not include "fast and dirty" corrections for
+// reactions near threshold, with respect to the GHAD application of CHIPS.
+// ------------------------------------------------------------------------
 
 #ifndef G4QPhotonNuclearCrossSection_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QProtonNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QProtonNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QProtonNuclearCrossSection.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -36,4 +36,6 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: CHIPS cross-sections for proton-nuclear interactions
+// -----------------------------------------------------------------------
 
 #ifndef G4QProtonNuclearCrossSection_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QStringChipsParticleLevelInterface.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QStringChipsParticleLevelInterface.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QStringChipsParticleLevelInterface.hh	(revision 1055)
@@ -23,4 +23,6 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
+// Short description: Interface of QGSC to CHIPS (Energy Flow of soft hadrons) 
+// ---------------------------------------------------------------------------
 //
 #ifndef G4QStringChipsParticleLevelInterface_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QTauNuclearCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QTauNuclearCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QTauNuclearCrossSection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QTauNuclearCrossSection.hh,v 1.6 2008/10/24 19:23:48 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QTauNuclearCrossSection.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -39,4 +39,9 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: reaction cross-sections for tau-nuclear reactions, which
+// are integrals over virtual equivalent photons photons. The tau-nuclear
+// reactions do not exist in GHAD, so by the present physics lists it is not
+// simulated at all.
+// --------------------------------------------------------------------------------
 
 #ifndef G4QTauNuclearCrossSection_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QuasiFreeRatios.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QuasiFreeRatios.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QuasiFreeRatios.hh	(revision 1055)
@@ -25,5 +25,5 @@
 //
 //
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -31,5 +31,8 @@
 // M.V. Kossov, ITEP(Moscow), 24-OCT-01
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006
-//
+// ----------------------------------------------------------------------
+// Short description: Provides percentage of quasi-free and quasi-elastic
+// reactions in the inelastic reactions.
+// ----------------------------------------------------------------------
 
 #ifndef G4QuasiFreeRatios_h
@@ -68,5 +71,5 @@
   std::pair<G4double,G4double> GetChExFactor(G4double pIU, G4int pPDG, G4int Z, G4int N);
   // scatter (pPDG,p4M) on a virtual nucleon (NPDG,N4M), result: final pair(newN4M,newp4M)
-  // if(newN4M.e()==0.) - below threshold, XS=0, no scattering of the progectile happened
+  // if(newN4M.e()==0.) - below threshold, XS=0, no scattering of the projectile happened
   std::pair<G4LorentzVector,G4LorentzVector> Scatter(G4int NPDG, G4LorentzVector N4M,
                                                      G4int pPDG, G4LorentzVector p4M);
@@ -96,4 +99,4 @@
   static std::vector<G4double*> vL;     // Vector of pointers to LogTable
   static std::vector<std::pair<G4double,G4double>*> vX; // Vector of ETPointers to LogTable
-}; 					
+};
 #endif
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4StringChipsInterface.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4StringChipsInterface.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4StringChipsInterface.hh	(revision 1055)
@@ -23,4 +23,6 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
+// !!! Was used in QBBC PL, NOW it is not. Must be absolete !!!
+// ============================================================
 //
 #ifndef G4StringChipsInterface_h
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4StringChipsParticleLevelInterface.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4StringChipsParticleLevelInterface.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4StringChipsParticleLevelInterface.hh	(revision 1055)
@@ -23,4 +23,6 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
+// Short description: Interface of QGSC to CHIPS (all soft hadrons) 
+// ----------------------------------------------------------------
 //
 #ifndef G4StringChipsParticleLevelInterface_h
@@ -59,5 +61,5 @@
 
 #ifdef hdebug_SCPLI
-  		//Static variables for histogramming
+    //Static variables for histogramming
     static const G4int nbh;
     static       G4double bhmax;
@@ -71,7 +73,7 @@
     static       G4int*   ehis;
   public:
-  		//Static functions
-		  static void Reset()
-		  {
+    //Static functions
+    static void Reset()
+    {
       bhdb=bhmax/nbh;
       ehde=bhmax/nbh;
@@ -85,14 +87,14 @@
       }
     }
-		  static void SetMaxB(G4double mB) {bhmax=mB;}
-		  static void SetMaxE(G4double mE) {ehmax=mE;}
-		  static G4int GetB(G4int i){return bhis[i];}
-		  static G4int GetE(G4int i){return ehis[i];}
-		  static G4double GetTot()  {return toth;}
-		  static G4int GetNbn()     {return nbh;}
-		  static G4double GetDB()   {return bhdb;}
-		  static G4double GetDE()   {return ehde;}
-		  static G4int GetBov()     {return bover;}
-		  static G4int GetEov()     {return eover;}
+    static void SetMaxB(G4double mB) {bhmax=mB;}
+    static void SetMaxE(G4double mE) {ehmax=mE;}
+    static G4int GetB(G4int i){return bhis[i];}
+    static G4int GetE(G4int i){return ehis[i];}
+    static G4double GetTot()  {return toth;}
+    static G4int GetNbn()     {return nbh;}
+    static G4double GetDB()   {return bhdb;}
+    static G4double GetDE()   {return ehde;}
+    static G4int GetBov()     {return bover;}
+    static G4int GetEov()     {return eover;}
 #endif
 };
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4VQCrossSection.hh
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4VQCrossSection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4VQCrossSection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VQCrossSection.hh,v 1.9 2007/11/15 09:36:43 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VQCrossSection.hh,v 1.10 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -73,4 +73,6 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: a basic class for all CHIPS reaction cross-sections.
+// -----------------------------------------------------------------------
 
 #ifndef G4VQCrossSection_h
@@ -98,5 +100,5 @@
   // At present momentum (pMom) must be in GeV (@@ Units)
   virtual G4double GetCrossSection(G4bool, G4double, G4int, G4int, G4int pPDG=0)
-                                                                 		{return G4double(pPDG);}
+                                                                   {return G4double(pPDG);}
 
   virtual G4double ThresholdEnergy(G4int Z, G4int N, G4int PDG=0); // Gives 0 by default
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4ChiralInvariantPhaseSpace.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4ChiralInvariantPhaseSpace.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4ChiralInvariantPhaseSpace.cc	(revision 1055)
@@ -24,7 +24,6 @@
 // ********************************************************************
 //
-
 //
-// Created:
+// Created: H.-P. Wellicsh: GHAD model wrapper for the CHIPS model (1997)
 // 16.01.08 V.Ivanchenko use initialization similar to other CHIPS models
 //
@@ -96,14 +95,15 @@
 			   etaToEtaPrime);
   //  G4QEnvironment::SetParameters(solidAngle);
-//  G4cout << "Input info "<< projectilePDGCode << " " 
-//         << targetPDGCode <<" "
-//	 << 1./MeV*proj4Mom<<" "
-//	 << 1./MeV*targ4Mom << " "
-//	 << nop << G4endl;
+  //  G4cout << "Input info "<< projectilePDGCode << " " 
+  //         << targetPDGCode <<" "
+  //	 << 1./MeV*proj4Mom<<" "
+  //	 << 1./MeV*targ4Mom << " "
+  //	 << nop << G4endl;
   G4QHadronVector projHV;
   G4QHadron* iH = new G4QHadron(projectilePDGCode, 1./MeV*proj4Mom);
   projHV.push_back(iH);
   G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode);
-  //G4Quasmon* pan= new G4Quasmon(projectilePDGCode, targetPDGCode, 1./MeV*proj4Mom, 1./MeV*targ4Mom, nop);
+  //G4Quasmon* pan= new G4Quasmon(projectilePDGCode, targetPDGCode,
+  //                              1./MeV*proj4Mom, 1./MeV*targ4Mom, nop);
   G4QHadronVector* output=0;
   try
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4GammaNuclearReaction.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4GammaNuclearReaction.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4GammaNuclearReaction.cc	(revision 1055)
@@ -23,8 +23,9 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
+// Short description: The CHIPS model provides the G4QHadronVector
+// output, which is converted to the G4 particle-singletons
+// --------------------------------------------------------------------
 //
-
-//
-// Created:
+// Created: J.P. Wellisch, 2000/08/18 
 // 01.09.2008 V.Ivanchenko 
 //
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuANuNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuANuNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuANuNuclearCrossSection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QANuANuNuclearCrossSection.cc,v 1.2 2007/11/02 15:57:16 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QANuANuNuclearCrossSection.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -37,5 +37,7 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
-//===============================================================================================
+//=========================================================================================
+// Short description: Provides the (anti-nu,anti-nu)A cross-section (Created by M. Kossov)
+// ----------------------------------------------------------------------------------------
 
 //#define debug
@@ -90,5 +92,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(pPDG!=-14)
@@ -111,7 +113,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -163,7 +165,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QAMNCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lstI="<<lastI<<G4endl;
@@ -172,5 +174,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -184,5 +186,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QAMNCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -200,7 +202,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QAMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -274,10 +276,10 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastTX =TX[I];                 // Pointer to the prepared TX function (same isotope)
       lastQE =QE[I];                 // Pointer to the prepared QE function (same isotope)
-	  }
-	  else                              // This isotope wasn't calculated previously => CREATE
-	  {
+   }
+   else                              // This isotope wasn't calculated previously => CREATE
+   {
       if(first)
       {
@@ -295,5 +297,5 @@
       TX.push_back(lastTX);
       QE.push_back(lastQE);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -310,5 +312,5 @@
     G4int sep=ran;  // as a result = an index of the left edge of the interval
     while(ran>=2)
-				{
+    {
       G4int newran=ran/2;
       if(lastE<=lastEN[sep]) sep-=newran;
@@ -357,34 +359,34 @@
   static const G4int nE=65; // !! If change this, change it in GetCrossSection() (*.cc) !!
   static const G4double nuEn[nE]={0.,
-1.00463e-5,1.05336e-5,1.10692e-5,1.16592e-5,1.23109e-5,1.30323e-5,1.38331e-5,1.47245e-5,
-1.57194e-5,1.68335e-5,1.80848e-5,1.94948e-5,2.10894e-5,2.28991e-5,2.49608e-5,2.73189e-5,
-3.00273e-5,3.31516e-5,3.67722e-5,4.09881e-5,4.59217e-5,5.17255e-5,5.85908e-5,6.67583e-5,
-7.65338e-5,8.83078e-5,.000102583,.000120011,.000141441,.000167995,.000201160,.000242926,
-.000295985,.000364008,.000452051,.000567152,.000719210,.000922307,.001196710,.001571930,
-.002091530,.002820590,.003857810,.005354930,.007548840,.010815300,.015760100,.023376900,
-.035325600,.054430800,.085595700,.137508000,.225898000,.379892000,.654712000,1.15767000,
-2.10277000,3.92843000,7.55861000,14.9991000,30.7412000,65.1734000,143.155000,326.326000};
+  1.00463e-5,1.05336e-5,1.10692e-5,1.16592e-5,1.23109e-5,1.30323e-5,1.38331e-5,1.47245e-5,
+  1.57194e-5,1.68335e-5,1.80848e-5,1.94948e-5,2.10894e-5,2.28991e-5,2.49608e-5,2.73189e-5,
+  3.00273e-5,3.31516e-5,3.67722e-5,4.09881e-5,4.59217e-5,5.17255e-5,5.85908e-5,6.67583e-5,
+  7.65338e-5,8.83078e-5,.000102583,.000120011,.000141441,.000167995,.000201160,.000242926,
+  .000295985,.000364008,.000452051,.000567152,.000719210,.000922307,.001196710,.001571930,
+  .002091530,.002820590,.003857810,.005354930,.007548840,.010815300,.015760100,.023376900,
+  .035325600,.054430800,.085595700,.137508000,.225898000,.379892000,.654712000,1.15767000,
+  2.10277000,3.92843000,7.55861000,14.9991000,30.7412000,65.1734000,143.155000,326.326000};
   static const G4double TOTX[nE]={0.,
-3.63538e-5,3.81165e-5,4.00539e-5,4.21884e-5,4.45454e-5,4.71548e-5,5.00511e-5,5.32747e-5,
-5.68730e-5,6.09016e-5,6.54261e-5,7.05246e-5,7.62894e-5,8.28315e-5,9.02838e-5,9.88066e-5,
-.000108594,.000119884,.000132964,.000148191,.000166007,.000186959,.000211736,.000241202,
-.000276453,.000318890,.000370311,.000433042,.000510116,.000605516,.000724514,.000874144,
-.001063870,.001306520,.001619660,.002027520,.002563780,.003275710,.004230080,.005521890,
-.007286920,.009719890,.013099700,.018695100,.029208400,.042095000,.059253700,.082373900,
-.113071000,.151041000,.191803000,.224208000,.234187000,.217774000,.187139000,.157818000,
-.137494000,.125872000,.120462000,.119148000,.120418000,.123027000,.126408000,.129071000};
+  3.63538e-5,3.81165e-5,4.00539e-5,4.21884e-5,4.45454e-5,4.71548e-5,5.00511e-5,5.32747e-5,
+  5.68730e-5,6.09016e-5,6.54261e-5,7.05246e-5,7.62894e-5,8.28315e-5,9.02838e-5,9.88066e-5,
+  .000108594,.000119884,.000132964,.000148191,.000166007,.000186959,.000211736,.000241202,
+  .000276453,.000318890,.000370311,.000433042,.000510116,.000605516,.000724514,.000874144,
+  .001063870,.001306520,.001619660,.002027520,.002563780,.003275710,.004230080,.005521890,
+  .007286920,.009719890,.013099700,.018695100,.029208400,.042095000,.059253700,.082373900,
+  .113071000,.151041000,.191803000,.224208000,.234187000,.217774000,.187139000,.157818000,
+  .137494000,.125872000,.120462000,.119148000,.120418000,.123027000,.126408000,.129071000};
   static const G4double QELX[nE]={0.,
-.365220e-9,.401502e-9,.443364e-9,.491885e-9,.548393e-9,.614536e-9,.692362e-9,.784441e-9,
-.894012e-9,1.02519e-9,1.18322e-9,1.37487e-9,1.60890e-9,1.89677e-9,2.25355e-9,2.69928e-9,
-3.26079e-9,3.97433e-9,4.88937e-9,6.07407e-9,7.62331e-9,9.67058e-9,1.24058e-8,1.61022e-8,
-2.11580e-8,2.81605e-8,3.79876e-8,5.19696e-8,7.21515e-8,1.01724e-7,1.45743e-7,2.12353e-7,
-3.14890e-7,4.75585e-7,7.32171e-7,1.14991e-6,1.84390e-6,3.02121e-6,5.06217e-6,8.68002e-6,
-1.52408e-5,2.74159e-5,5.05363e-5,.000100111,.000220489,.000455269,.000933841,.001925650,
-.003994300,.008221270,.016417600,.030830400,.052902400,.082519200,.115560000,.149598000,
-.184112000,.215102000,.238253000,.252949000,.261267000,.265626000,.267782000,.268791000};
+  .365220e-9,.401502e-9,.443364e-9,.491885e-9,.548393e-9,.614536e-9,.692362e-9,.784441e-9,
+  .894012e-9,1.02519e-9,1.18322e-9,1.37487e-9,1.60890e-9,1.89677e-9,2.25355e-9,2.69928e-9,
+  3.26079e-9,3.97433e-9,4.88937e-9,6.07407e-9,7.62331e-9,9.67058e-9,1.24058e-8,1.61022e-8,
+  2.11580e-8,2.81605e-8,3.79876e-8,5.19696e-8,7.21515e-8,1.01724e-7,1.45743e-7,2.12353e-7,
+  3.14890e-7,4.75585e-7,7.32171e-7,1.14991e-6,1.84390e-6,3.02121e-6,5.06217e-6,8.68002e-6,
+  1.52408e-5,2.74159e-5,5.05363e-5,.000100111,.000220489,.000455269,.000933841,.001925650,
+  .003994300,.008221270,.016417600,.030830400,.052902400,.082519200,.115560000,.149598000,
+  .184112000,.215102000,.238253000,.252949000,.261267000,.265626000,.267782000,.268791000};
   // --------------------------------
   G4int first=0;
   if(z<0.)
-		{
+  {
     first=1;
     z=-z;
@@ -405,5 +407,5 @@
     t[k]=TOTX[k]*nuEn[k]*(za+za)/ta+QELX[k]*(dz+dz-da)/ta; // TotalCrossSection
     q[k]=QELX[k]*dz/a;                                     // QuasiElasticCrossSection
-	 }
+  }
   return first;
 }
@@ -421,28 +423,28 @@
   static const G4double Xl[nQ2]={5.20224e-16,
  .006125,.0137008,.0218166,.0302652,.0389497,.0478144,.0568228,.0659497,.0751768,.0844898,
-	.093878,	.103332,	.112844,	.122410,	.132023,	.141680,	.151376,	.161109,	.170875,	.180672,
-	.190499,	.200352,	.210230,	.220131,	.230055,	.239999,	.249963,	.259945,	.269944,	.279960,
-	.289992,	.300039,	.310099,	.320173,	.330260,	.340359,	.350470,	.360592,	.370724,	.380867,
-	.391019,	.401181,	.411352,	.421531,	.431719,	.441915,	.452118,	.462329,	.472547,	.482771,
-	.493003,	.503240,	.513484,	.523734,	.533989,	.544250,	.554517,	.564788,	.575065,	.585346,
-	.595632,	.605923,	.616218,	.626517,	.636820,	.647127,	.657438,	.667753,	.678072,	.688394,
-	.698719,	.709048,	.719380,	.729715,	.740053,	.750394,	.760738,	.771085,	.781434,	.791786,
-	.802140,	.812497,	.822857,	.833219,	.843582,	.853949,	.864317,	.874687,	.885060,	.895434,
-	.905810,	.916188,	.926568,	.936950,	.947333,	.957719,	.968105,	.978493,	.988883,	.999275};
-	  // Direct table
+ .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875, .180672,
+ .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944, .279960,
+ .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724, .380867,
+ .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547, .482771,
+ .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065, .585346,
+ .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072, .688394,
+ .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434, .791786,
+ .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060, .895434,
+ .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883, .999275};
+   // Direct table
   static const G4double Xmax=Xl[lQ2];
   static const G4double Xmin=Xl[0];
   static const G4double dX=(Xmax-Xmin)/lQ2;  // step in X(Q2, GeV^2)
   static const G4double inl[nQ2]={0,
-	1.52225,	2.77846,	3.96651,	5.11612,	6.23990,	7.34467,	8.43466,	9.51272,	10.5809,	11.6406,
-	12.6932,	13.7394,	14.7801,	15.8158,	16.8471,	17.8743,	18.8979,	19.9181,	20.9353,	21.9496,
-	22.9614,	23.9707,	24.9777,	25.9826,	26.9855,	27.9866,	28.9860,	29.9837,	30.9798,	31.9745,
-	32.9678,	33.9598,	34.9505,	35.9400,	36.9284,	37.9158,	38.9021,	39.8874,	40.8718,	41.8553,
-	42.8379,	43.8197,	44.8007,	45.7810,	46.7605,	47.7393,	48.7174,	49.6950,	50.6718,	51.6481,
-	52.6238,	53.5990,	54.5736,	55.5476,	56.5212,	57.4943,	58.4670,	59.4391,	60.4109,	61.3822,
-	62.3531,	63.3236,	64.2937,	65.2635,	66.2329,	67.2019,	68.1707,	69.1390,	70.1071,	71.0748,
-	72.0423,	73.0095,	73.9763,	74.9429,	75.9093,	76.8754,	77.8412,	78.8068,	79.7721,	80.7373,
-	81.7022,	82.6668,	83.6313,	84.5956,	85.5596,	86.5235,	87.4872,	88.4507,	89.4140,	90.3771,
-	91.3401,	92.3029,	93.2656,	94.2281,	95.1904,	96.1526,	97.1147,	98.0766,	99.0384,	100.000};
+ 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809, 11.6406,
+ 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353, 21.9496,
+ 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798, 31.9745,
+ 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718, 41.8553,
+ 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718, 51.6481,
+ 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109, 61.3822,
+ 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071, 71.0748,
+ 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721, 80.7373,
+ 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140, 90.3771,
+ 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384, 100.000};
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double dEnu=Enu+Enu;              // doubled energy of nu/anu
@@ -503,63 +505,63 @@
   // Reversed table
   static const G4double X0[nX]={5.21412e-05,
-	.437860,	.681908,	.891529,	1.08434,	1.26751,	1.44494,	1.61915,	1.79198,	1.96493,	2.13937,
-	2.31664,	2.49816,	2.68559,	2.88097,	3.08705,	3.30774,	3.54917,	3.82233,	4.15131, 4.62182};
+ .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493, 2.13937,
+ 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233, 4.15131, 4.62182};
   static const G4double X1[nX]={.00102591,
-	1.00443,	1.55828,	2.03126,	2.46406,	2.87311,	3.26723,	3.65199,	4.03134,	4.40835,	4.78561,
-	5.16549,	5.55031,	5.94252,	6.34484,	6.76049,	7.19349,	7.64917,	8.13502,	8.66246, 9.25086};
+ 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835, 4.78561,
+ 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502, 8.66246, 9.25086};
   static const G4double X2[nX]={.0120304,
-	2.59903,	3.98637,	5.15131,	6.20159,	7.18024,	8.10986,	9.00426,	9.87265,	10.7217,	11.5564,
-	12.3808,	13.1983,	14.0116,	14.8234,	15.6359,	16.4515,	17.2723,	18.1006,	18.9386, 19.7892};
+ 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217, 11.5564,
+ 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006, 18.9386, 19.7892};
   static const G4double X3[nX]={.060124,
-	5.73857,	8.62595,	10.9849,	13.0644,	14.9636,	16.7340,	18.4066,	20.0019,	21.5342,	23.0142,
-	24.4497,	25.8471,	27.2114,	28.5467,	29.8564,	31.1434,	32.4102,	33.6589,	34.8912, 36.1095};
+ 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342, 23.0142,
+ 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589, 34.8912, 36.1095};
   static const G4double X4[nX]={.0992363,
-	8.23746,	12.1036,	15.1740,	17.8231,	20.1992,	22.3792,	24.4092,	26.3198,	28.1320,	29.8615,
-	31.5200,	33.1169,	34.6594,	36.1536,	37.6044,	39.0160,	40.3920,	41.7353,	43.0485, 44.3354};
+ 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320, 29.8615,
+ 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353, 43.0485, 44.3354};
   static const G4double X5[nX]={.0561127,
-	7.33661,	10.5694,	13.0778,	15.2061,	17.0893,	18.7973,	20.3717,	21.8400,	23.2211,	24.5291,
-	25.7745,	26.9655,	28.1087,	29.2094,	30.2721,	31.3003,	32.2972,	33.2656,	34.2076, 35.1265};
+ 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211, 24.5291,
+ 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656, 34.2076, 35.1265};
   static const G4double X6[nX]={.0145859,
-	4.81774,	6.83565,	8.37399,	9.66291,	10.7920,	11.8075,	12.7366,	13.5975,	14.4025,	15.1608,
-	15.8791,	16.5628,	17.2162,	17.8427,	18.4451,	19.0259,	19.5869,	20.1300,	20.6566, 21.1706};
+ 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025, 15.1608,
+ 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300, 20.6566, 21.1706};
   static const G4double X7[nX]={.00241155,
-	2.87095,	4.02492,	4.89243,	5.61207,	6.23747,	6.79613,	7.30433,	7.77270,	8.20858,	8.61732,
-	9.00296,	9.36863,	9.71682,	10.0495,	10.3684,	10.6749,	10.9701,	11.2550,	11.5306, 11.7982};
+ 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858, 8.61732,
+ 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550, 11.5306, 11.7982};
   static const G4double X8[nX]={.000316863,
-	1.76189,	2.44632,	2.95477,	3.37292,	3.73378,	4.05420,	4.34415,	4.61009,	4.85651,	5.08666,
-	5.30299,	5.50738,	5.70134,	5.88609,	6.06262,	6.23178,	6.39425,	6.55065,	6.70149, 6.84742};
+ 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651, 5.08666,
+ 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065, 6.70149, 6.84742};
   static const G4double X9[nX]={3.73544e-05,
-	1.17106,	1.61289,	1.93763,	2.20259,	2.42976,	2.63034,	2.81094,	2.97582,	3.12796,	3.26949,
-	3.40202,	3.52680,	3.64482,	3.75687,	3.86360,	3.96557,	4.06323,	4.15697,	4.24713, 4.33413};
+ 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796, 3.26949,
+ 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697, 4.24713, 4.33413};
   static const G4double XA[nX]={4.19131e-06,
-	.849573,	1.16208,	1.38955,	1.57379,	1.73079,	1.86867,	1.99221,	2.10451,	2.20770,	2.30332,
-	2.39252,	2.47622,	2.55511,	2.62977,	2.70066,	2.76818,	2.83265,	2.89437,	2.95355, 3.01051};
+ .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770, 2.30332,
+ 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437, 2.95355, 3.01051};
   static const G4double XB[nX]={4.59981e-07,
-	.666131,	.905836,	1.07880,	1.21796,	1.33587,	1.43890,	1.53080,	1.61399,	1.69011,	1.76040,
-	1.82573,	1.88682,	1.94421,	1.99834,	2.04959,	2.09824,	2.14457,	2.18878,	2.23107, 2.27162};
+ .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011, 1.76040,
+ 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878, 2.23107, 2.27162};
   static const G4double XC[nX]={4.99861e-08,
-	.556280,	.752730,	.893387,	1.00587,	1.10070,	1.18317,	1.25643,	1.32247,	1.38269,	1.43809,
-	1.48941,	1.53724,	1.58203,	1.62416,	1.66391,	1.70155,	1.73728,	1.77128,	1.80371, 1.83473};
+ .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269, 1.43809,
+ 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128, 1.80371, 1.83473};
   static const G4double XD[nX]={5.40832e-09,
-	.488069,	.657650,	.778236,	.874148,	.954621,	1.02432,	1.08599,	1.14138,	1.19172,	1.23787,
-	1.28049,	1.32008,	1.35705,	1.39172,	1.42434,	1.45514,	1.48429,	1.51197,	1.53829, 1.56339};
+ .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172, 1.23787,
+ 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197, 1.53829, 1.56339};
   static const G4double XE[nX]={5.84029e-10,
-	.445057,	.597434,	.705099,	.790298,	.861468,	.922865,	.976982,	1.02542,	1.06930,	1.10939,
-	1.14630,	1.18050,	1.21233,	1.24208,	1.27001,	1.29630,	1.32113,	1.34462,	1.36691, 1.38812};
+ .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930, 1.10939,
+ 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462, 1.36691, 1.38812};
   static const G4double XF[nX]={6.30137e-11,
-	.418735,	.560003,	.659168,	.737230,	.802138,	.857898,	.906854,	.950515,	.989915,	1.02580,
-	1.05873,	1.08913,	1.11734,	1.14364,	1.16824,	1.19133,	1.21306,	1.23358,	1.25298, 1.27139};
+ .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915, 1.02580,
+ 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358, 1.25298, 1.27139};
   static const G4double XG[nX]={6.79627e-12,
-	.405286,	.539651,	.633227,	.706417,	.766929,	.818642,	.863824,	.903931,	.939963,	.972639,
-	1.00250,	1.02995,	1.05532,	1.07887,	1.10082,	1.12134,	1.14058,	1.15867,	1.17572, 1.19183};
+ .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963, .972639,
+ 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867, 1.17572, 1.19183};
   static const G4double XH[nX]={7.32882e-13,
-	.404391,	.535199,	.625259,	.695036,	.752243,	.800752,	.842823,	.879906,	.912994,	.942802,
-	.969862,	.994583,	1.01729,	1.03823,	1.05763,	1.07566,	1.09246,	1.10816,	1.12286, 1.13667};
+ .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994, .942802,
+ .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816, 1.12286, 1.13667};
   static const G4double XI[nX]={7.90251e-14,
-	.418084,	.548382,	.636489,	.703728,	.758106,	.803630,	.842633,	.876608,	.906576,	.933269,
-	.957233,	.978886,	.998556,	1.01651,	1.03295,	1.04807,	1.06201,	1.07489,	1.08683, 1.09792};
+ .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576, .933269,
+ .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489, 1.08683, 1.09792};
   static const G4double XJ[nX]={8.52083e-15,
-	.447299,	.579635,	.666780,	.731788,	.783268,	.825512,	.861013,	.891356,	.917626,	.940597,
-	.960842,	.978802,	.994820,	1.00917,	1.02208,	1.03373,	1.04427,	1.05383,	1.06253, 1.07046};
+ .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626, .940597,
+ .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383, 1.06253, 1.07046};
   // Direct table
   static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0],
@@ -574,72 +576,72 @@
                              {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ};
   static const G4double I0[nX]={0,
-	.354631,	1.08972,	2.05138,	3.16564,	4.38343,	5.66828,	6.99127,	8.32858,	9.65998,	10.9680,
-	12.2371,	13.4536,	14.6050,	15.6802,	16.6686,	17.5609,	18.3482,	19.0221,	19.5752,	20.0000};
+ .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998, 10.9680,
+ 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752, 20.0000};
   static const G4double I1[nX]={0,
-	.281625,	.877354,	1.67084,	2.60566,	3.64420,	4.75838,	5.92589,	7.12829,	8.34989,	9.57708,
-	10.7978,	12.0014,	13.1781,	14.3190,	15.4162,	16.4620,	17.4496,	18.3724,	19.2245,	20.0000};
+ .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989, 9.57708,
+ 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245, 20.0000};
   static const G4double I2[nX]={0,
-	.201909,	.642991,	1.24946,	1.98463,	2.82370,	3.74802,	4.74263,	5.79509,	6.89474,	8.03228,
-	9.19947,	10.3889,	11.5938,	12.8082,	14.0262,	15.2427,	16.4527,	17.6518,	18.8356,	20.0000};
+ .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474, 8.03228,
+ 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356, 20.0000};
   static const G4double I3[nX]={0,
-	.140937,	.461189,	.920216,	1.49706,	2.17728,	2.94985,	3.80580,	4.73758,	5.73867,	6.80331,
-	7.92637,	9.10316,	10.3294,	11.6013,	12.9150,	14.2672,	15.6548,	17.0746,	18.5239,	20.0000};
+ .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867, 6.80331,
+ 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239, 20.0000};
   static const G4double I4[nX]={0,
-	.099161,	.337358,	.694560,	1.16037,	1.72761,	2.39078,	3.14540,	3.98768,	4.91433,	5.92245,
-	7.00942,	8.17287,	9.41060,	10.7206,	12.1010,	13.5500,	15.0659,	16.6472,	18.2924,	20.0000};
+ .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433, 5.92245,
+ 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924, 20.0000};
   static const G4double I5[nX]={0,
-	.071131,	.255084,	.543312,	.932025,	1.41892,	2.00243,	2.68144,	3.45512,	4.32283,	5.28411,
-	6.33859,	7.48602,	8.72621,	10.0590,	11.4844,	13.0023,	14.6128,	16.3158,	18.1115,	20.0000};
+ .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283, 5.28411,
+ 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115, 20.0000};
   static const G4double I6[nX]={0,
-	.053692,	.202354,	.443946,	.778765,	1.20774,	1.73208,	2.35319,	3.07256,	3.89177,	4.81249,
-	5.83641,	6.96528,	8.20092,	9.54516,	10.9999,	12.5670,	14.2486,	16.0466,	17.9630,	20.0000};
+ .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177, 4.81249,
+ 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630, 20.0000};
   static const G4double I7[nX]={0,
-	.043065,	.168099,	.376879,	.672273,	1.05738,	1.53543,	2.10973,	2.78364,	3.56065,	4.44429,
-	5.43819,	6.54610,	7.77186,	9.11940,	10.5928,	12.1963,	13.9342,	15.8110,	17.8313,	20.0000};
+ .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065, 4.44429,
+ 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313, 20.0000};
   static const G4double I8[nX]={0,
-	.036051,	.143997,	.327877,	.592202,	.941572,	1.38068,	1.91433,	2.54746,	3.28517,	4.13277,
-	5.09574,	6.17984,	7.39106,	8.73568,	10.2203,	11.8519,	13.6377,	15.5854,	17.7033,	20.0000};
+ .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517, 4.13277,
+ 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033, 20.0000};
   static const G4double I9[nX]={0,
-	.030977,	.125727,	.289605,	.528146,	.846967,	1.25183,	1.74871,	2.34384,	3.04376,	3.85535,
-	4.78594,	5.84329,	7.03567,	8.37194,	9.86163,	11.5150,	13.3430,	15.3576,	17.5719,	20.0000};
+ .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376, 3.85535,
+ 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719, 20.0000};
   static const G4double IA[nX]={0,
-	.027129,	.111420,	.258935,	.475812,	.768320,	1.14297,	1.60661,	2.16648,	2.83034,	3.60650,
-	4.50394,	5.53238,	6.70244,	8.02569,	9.51488,	11.1841,	13.0488,	15.1264,	17.4362,	20.0000};
+ .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034, 3.60650,
+ 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362, 20.0000};
   static const G4double IB[nX]={0,
-	.024170,	.100153,	.234345,	.433198,	.703363,	1.05184,	1.48607,	2.01409,	2.64459,	3.38708,
-	4.25198,	5.25084,	6.39647,	7.70319,	9.18708,	10.8663,	12.7617,	14.8968,	17.2990,	20.0000};
+ .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459, 3.38708,
+ 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990, 20.0000};
   static const G4double IC[nX]={0,
-	.021877,	.091263,	.214670,	.398677,	.650133,	.976322,	1.38510,	1.88504,	2.48555,	3.19709,
-	4.03129,	5.00127,	6.12184,	7.40989,	8.88482,	10.5690,	12.4888,	14.6748,	17.1638,	20.0000};
+ .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555, 3.19709,
+ 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638, 20.0000};
   static const G4double ID[nX]={0,
-	.020062,	.084127,	.198702,	.370384,	.606100,	.913288,	1.30006,	1.77535,	2.34912,	3.03253,
-	3.83822,	4.78063,	5.87634,	7.14459,	8.60791,	10.2929,	12.2315,	14.4621,	17.0320,	20.0000};
+ .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912, 3.03253,
+ 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320, 20.0000};
   static const G4double IE[nX]={0,
-	.018547,	.078104,	.185102,	.346090,	.567998,	.858331,	1.22535,	1.67824,	2.22735,	2.88443,
-	3.66294,	4.57845,	5.64911,	6.89637,	8.34578,	10.0282,	11.9812,	14.2519,	16.8993,	20.0000};
+ .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735, 2.88443,
+ 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993, 20.0000};
   static const G4double IF[nX]={0,
-	.017143,	.072466,	.172271,	.323007,	.531545,	.805393,	1.15288,	1.58338,	2.10754,	2.73758,
-	3.48769,	4.37450,	5.41770,	6.64092,	8.07288,	9.74894,	11.7135,	14.0232,	16.7522,	20.0000};
+ .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754, 2.73758,
+ 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522, 20.0000};
   static const G4double IG[nX]={0,
-	.015618,	.066285,	.158094,	.297316,	.490692,	.745653,	1.07053,	1.47479,	1.96931,	2.56677,
-	3.28205,	4.13289,	5.14068,	6.33158,	7.73808,	9.40133,	11.3745,	13.7279,	16.5577,	20.0000};
+ .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931, 2.56677,
+ 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577, 20.0000};
   static const G4double IH[nX]={0,
-	.013702,	.058434,	.139923,	.264115,	.437466,	.667179,	.961433,	1.32965,	1.78283,	2.33399,
-	2.99871,	3.79596,	4.74916,	5.88771,	7.24937,	8.88367,	10.8576,	13.2646,	16.2417,	20.0000};
+ .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283, 2.33399,
+ 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417, 20.0000};
   static const G4double II[nX]={0,
-	.011264,	.048311,	.116235,	.220381,	.366634,	.561656,	.813132,	1.13008,	1.52322,	2.00554,
-	2.59296,	3.30542,	4.16834,	5.21490,	6.48964,	8.05434,	9.99835,	12.4580,	15.6567,	20.0000};
+ .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322, 2.00554,
+ 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567, 20.0000};
   static const G4double IJ[nX]={0,
-	.008628,	.037206,	.089928,	.171242,	.286114,	.440251,	.640343,	.894382,	1.21208,	1.60544,
-	2.08962,	2.68414,	3.41486,	4.31700,	5.44048,	6.85936,	8.69067,	11.1358,	14.5885,	20.0000};
+ .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208, 1.60544,
+ 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885, 20.0000};
   static const G4double* Il[nE]=
                              {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ};
   static const G4double lE[nE]={
--1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215,	.459141,	.867068,	1.27499,	1.68292,
- 2.09085,	2.49877,	2.90670,	3.31463,	3.72255,	4.13048,	4.53840,	4.94633,	5.35426,	5.76218};
+-1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292,
+ 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218};
   static const G4double lEmi=lE[0];
   static const G4double lEma=lE[nE-1];
   static const G4double dlE=(lEma-lEmi)/bE;
-	 //***************************************************************************************
+  //***************************************************************************************
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double lEn=std::log(Enu);         // log(E) for interpolation
@@ -727,4 +729,4 @@
 }
 
-// This class can provide only virtual exchange pi+ (a substitute for W+ boson)
+// This class can provide only virtual exchange by gamma (a substitute for Z0 boson)
 G4int G4QANuANuNuclearCrossSection::GetExchangePDGCode() {return 22;}
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuENuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuENuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuENuclearCrossSection.cc	(revision 1055)
@@ -25,9 +25,9 @@
 //
 //
-// $Id: G4QANuENuclearCrossSection.cc,v 1.2 2007/11/01 16:09:38 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QANuENuclearCrossSection.cc,v 1.4 2009/05/08 15:16:26 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
-// G4 Physics class: G4QANuENuclearCrossSection for (anti_ni_e,e+) cross sections
+// G4 Physics class: G4QANuENuclearCrossSection for (anti_nu_e,e+) cross sections
 // Created: M.V. Kossov, CERN/ITEP(Moscow), 24-SEP-2007
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 24-SEP-2007
@@ -37,5 +37,5 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
-//===============================================================================================
+//=========================================================================================
 
 //#define debug
@@ -90,5 +90,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(pPDG!=-12)
@@ -111,7 +111,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -163,7 +163,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QAENCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lstI="<<lastI<<G4endl;
@@ -172,5 +172,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -184,5 +184,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QAENCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -200,7 +200,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QAENCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -245,7 +245,7 @@
 G4double G4QANuENuclearCrossSection::ThresholdEnergy(G4int Z, G4int N, G4int)
 {
-  //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1.,0.)/GeV;
-  //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1.,1.)/GeV;
-  //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2.,1.)/GeV/2.;
+  //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/GeV;
+  //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/GeV;
+  //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2,1)/GeV/2.;
   static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
   static const G4double dmN=mN+mN;    // Doubled nucleon mass (2*AtomicMassUnit, GeV)
@@ -294,10 +294,10 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastTX =TX[I];                 // Pointer to the prepared TX function (same isotope)
       lastQE =QE[I];                 // Pointer to the prepared QE function (same isotope)
-	  }
-	  else                              // This isotope wasn't calculated previously => CREATE
-	  {
+   }
+   else                              // This isotope wasn't calculated previously => CREATE
+   {
       if(first)
       {
@@ -315,5 +315,5 @@
       TX.push_back(lastTX);
       QE.push_back(lastQE);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -330,5 +330,5 @@
     G4int sep=ran;  // as a result = an index of the left edge of the interval
     while(ran>=2)
-				{
+    {
       G4int newran=ran/2;
       G4double oldL=lastEN[sep];
@@ -386,34 +386,34 @@
   static const G4int nE=65; // !! If change this, change it in CalculateCrossSection() !!
   static const G4double nuEn[nE]={thresh,
-.00051331,.00053602,.00056078,.00058783,.00061743,.00064990,.00068559,.00072492,
-.00076834,.00081641,.00086975,.00092912,.00099536,.00106950,.00115273,.00124646,
-.00135235,.00147241,.00160901,.00176503,.00194392,.00214986,.00238797,.00266448,
-.00298709,.00336531,.00381094,.00433879,.00496745,.00572047,.00662785,.00772806,
-.00907075,.01072050,.01276190,.01530660,.01850330,.02255110,.02771990,.03437780,
-.04303240,.05438970,.06944210,.08959920,.11688400,.15423600,.20597200,.27851200,
-.38153100,.52979600,.74616300,1.0665200,1.5480900,2.2834800,3.4251100,5.2281000,
-8.1270200,12.875900,20.808500,34.331200,57.877800,99.796200,176.16300,318.68200};
+    .00051331,.00053602,.00056078,.00058783,.00061743,.00064990,.00068559,.00072492,
+    .00076834,.00081641,.00086975,.00092912,.00099536,.00106950,.00115273,.00124646,
+    .00135235,.00147241,.00160901,.00176503,.00194392,.00214986,.00238797,.00266448,
+    .00298709,.00336531,.00381094,.00433879,.00496745,.00572047,.00662785,.00772806,
+    .00907075,.01072050,.01276190,.01530660,.01850330,.02255110,.02771990,.03437780,
+    .04303240,.05438970,.06944210,.08959920,.11688400,.15423600,.20597200,.27851200,
+    .38153100,.52979600,.74616300,1.0665200,1.5480900,2.2834800,3.4251100,5.2281000,
+    8.1270200,12.875900,20.808500,34.331200,57.877800,99.796200,176.16300,318.68200};
   static const G4double TOTX[nE]={0.,
-.00046923,.00160693,.00229560,.00288772,.00344344,.00398831,.00453725,.00510087,
-.00568797,.00630663,.00696489,.00767121,.00843477,.00926586,.01017610,.01117910,
-.01229040,.01352820,.01491430,.01647420,.01823820,.02024280,.02253130,.02515600,
-.02818010,.03167950,.03574640,.04049260,.04605330,.05739330,.07028190,.08396290,
-.09969400,.11756200,.13812500,.16207000,.19099600,.22447700,.26434900,.31051900,
-.36357400,.42242900,.48500000,.54692800,.60140500,.63996800,.65519300,.64339200,
-.60784300,.55734400,.50212600,.45116800,.40962600,.37854800,.35702100,.34330900,
-.33576200,.33300100,.33387100,.33737700,.34235200,.34880100,.35507500,.35961200};
+    .00046923,.00160693,.00229560,.00288772,.00344344,.00398831,.00453725,.00510087,
+    .00568797,.00630663,.00696489,.00767121,.00843477,.00926586,.01017610,.01117910,
+    .01229040,.01352820,.01491430,.01647420,.01823820,.02024280,.02253130,.02515600,
+    .02818010,.03167950,.03574640,.04049260,.04605330,.05739330,.07028190,.08396290,
+    .09969400,.11756200,.13812500,.16207000,.19099600,.22447700,.26434900,.31051900,
+    .36357400,.42242900,.48500000,.54692800,.60140500,.63996800,.65519300,.64339200,
+    .60784300,.55734400,.50212600,.45116800,.40962600,.37854800,.35702100,.34330900,
+    .33576200,.33300100,.33387100,.33737700,.34235200,.34880100,.35507500,.35961200};
   static const G4double QELX[nE]={0.,
-2.40856e-7,8.61338e-7,1.28732e-6,1.69747e-6,2.12608e-6,2.59201e-6,3.11071e-6,3.69770e-6,
-4.37028e-6,5.14877e-6,6.05773e-6,7.12746e-6,8.39567e-6,9.90987e-6,1.17304e-5,1.39343e-5,
-1.66209e-5,1.99191e-5,2.39974e-5,2.90775e-5,3.54536e-5,4.35191e-5,5.38039e-5,6.70278e-5,
-8.41765e-5,.000106611,.000136228,.000175689,.000228768,.000328317,.000465818,.000648870,
-.000904299,.001260330,.001762740,.002480740,.003534040,.005062210,.007327720,.010675000,
-.015645500,.022975800,.033679400,.049004300,.070294800,.098706100,.134951000,.179193000,
-.231297000,.287287000,.344760000,.404397000,.465915000,.527060000,.584085000,.632748000,
-.671346000,.699744000,.719355000,.732541000,.740996000,.746249000,.749265000,.751160000};
+  2.40856e-7,8.61338e-7,1.28732e-6,1.69747e-6,2.12608e-6,2.59201e-6,3.11071e-6,3.69770e-6,
+  4.37028e-6,5.14877e-6,6.05773e-6,7.12746e-6,8.39567e-6,9.90987e-6,1.17304e-5,1.39343e-5,
+  1.66209e-5,1.99191e-5,2.39974e-5,2.90775e-5,3.54536e-5,4.35191e-5,5.38039e-5,6.70278e-5,
+  8.41765e-5,.000106611,.000136228,.000175689,.000228768,.000328317,.000465818,.000648870,
+  .000904299,.001260330,.001762740,.002480740,.003534040,.005062210,.007327720,.010675000,
+  .015645500,.022975800,.033679400,.049004300,.070294800,.098706100,.134951000,.179193000,
+  .231297000,.287287000,.344760000,.404397000,.465915000,.527060000,.584085000,.632748000,
+  .671346000,.699744000,.719355000,.732541000,.740996000,.746249000,.749265000,.751160000};
   // --------------------------------
   G4int first=0;
   if(z<0.)
-		{
+  {
     first=1;
     z=-z;
@@ -434,5 +434,5 @@
     t[k]=TOTX[k]*nuEn[k]*(za+za)/ta+QELX[k]*(dz+dz-da)/ta; // TotalCrossSection
     q[k]=QELX[k]*dz/a;                                     // QuasiElasticCrossSection
-	 }
+  }
   return first;
 }
@@ -454,28 +454,28 @@
   static const G4double Xl[nQ2]={5.20224e-16,
  .006125,.0137008,.0218166,.0302652,.0389497,.0478144,.0568228,.0659497,.0751768,.0844898,
-	.093878,	.103332,	.112844,	.122410,	.132023,	.141680,	.151376,	.161109,	.170875,	.180672,
-	.190499,	.200352,	.210230,	.220131,	.230055,	.239999,	.249963,	.259945,	.269944,	.279960,
-	.289992,	.300039,	.310099,	.320173,	.330260,	.340359,	.350470,	.360592,	.370724,	.380867,
-	.391019,	.401181,	.411352,	.421531,	.431719,	.441915,	.452118,	.462329,	.472547,	.482771,
-	.493003,	.503240,	.513484,	.523734,	.533989,	.544250,	.554517,	.564788,	.575065,	.585346,
-	.595632,	.605923,	.616218,	.626517,	.636820,	.647127,	.657438,	.667753,	.678072,	.688394,
-	.698719,	.709048,	.719380,	.729715,	.740053,	.750394,	.760738,	.771085,	.781434,	.791786,
-	.802140,	.812497,	.822857,	.833219,	.843582,	.853949,	.864317,	.874687,	.885060,	.895434,
-	.905810,	.916188,	.926568,	.936950,	.947333,	.957719,	.968105,	.978493,	.988883,	.999275};
-	  // Direct table
+ .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875, .180672,
+ .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944, .279960,
+ .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724, .380867,
+ .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547, .482771,
+ .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065, .585346,
+ .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072, .688394,
+ .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434, .791786,
+ .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060, .895434,
+ .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883, .999275};
+   // Direct table
   static const G4double Xmax=Xl[lQ2];
   static const G4double Xmin=Xl[0];
   static const G4double dX=(Xmax-Xmin)/lQ2;  // step in X(Q2, GeV^2)
   static const G4double inl[nQ2]={0,
-	1.52225,	2.77846,	3.96651,	5.11612,	6.23990,	7.34467,	8.43466,	9.51272,	10.5809,	11.6406,
-	12.6932,	13.7394,	14.7801,	15.8158,	16.8471,	17.8743,	18.8979,	19.9181,	20.9353,	21.9496,
-	22.9614,	23.9707,	24.9777,	25.9826,	26.9855,	27.9866,	28.9860,	29.9837,	30.9798,	31.9745,
-	32.9678,	33.9598,	34.9505,	35.9400,	36.9284,	37.9158,	38.9021,	39.8874,	40.8718,	41.8553,
-	42.8379,	43.8197,	44.8007,	45.7810,	46.7605,	47.7393,	48.7174,	49.6950,	50.6718,	51.6481,
-	52.6238,	53.5990,	54.5736,	55.5476,	56.5212,	57.4943,	58.4670,	59.4391,	60.4109,	61.3822,
-	62.3531,	63.3236,	64.2937,	65.2635,	66.2329,	67.2019,	68.1707,	69.1390,	70.1071,	71.0748,
-	72.0423,	73.0095,	73.9763,	74.9429,	75.9093,	76.8754,	77.8412,	78.8068,	79.7721,	80.7373,
-	81.7022,	82.6668,	83.6313,	84.5956,	85.5596,	86.5235,	87.4872,	88.4507,	89.4140,	90.3771,
-	91.3401,	92.3029,	93.2656,	94.2281,	95.1904,	96.1526,	97.1147,	98.0766,	99.0384,	100.000};
+ 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809, 11.6406,
+ 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353, 21.9496,
+ 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798, 31.9745,
+ 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718, 41.8553,
+ 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718, 51.6481,
+ 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109, 61.3822,
+ 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071, 71.0748,
+ 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721, 80.7373,
+ 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140, 90.3771,
+ 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384, 100.000};
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double dEnu=Enu+Enu;              // doubled energy of nu/anu
@@ -544,63 +544,63 @@
   // Reversed table
   static const G4double X0[nX]={5.21412e-05,
-	.437860,	.681908,	.891529,	1.08434,	1.26751,	1.44494,	1.61915,	1.79198,	1.96493,	2.13937,
-	2.31664,	2.49816,	2.68559,	2.88097,	3.08705,	3.30774,	3.54917,	3.82233,	4.15131, 4.62182};
+ .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493, 2.13937,
+ 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233, 4.15131, 4.62182};
   static const G4double X1[nX]={.00102591,
-	1.00443,	1.55828,	2.03126,	2.46406,	2.87311,	3.26723,	3.65199,	4.03134,	4.40835,	4.78561,
-	5.16549,	5.55031,	5.94252,	6.34484,	6.76049,	7.19349,	7.64917,	8.13502,	8.66246, 9.25086};
+ 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835, 4.78561,
+ 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502, 8.66246, 9.25086};
   static const G4double X2[nX]={.0120304,
-	2.59903,	3.98637,	5.15131,	6.20159,	7.18024,	8.10986,	9.00426,	9.87265,	10.7217,	11.5564,
-	12.3808,	13.1983,	14.0116,	14.8234,	15.6359,	16.4515,	17.2723,	18.1006,	18.9386, 19.7892};
+ 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217, 11.5564,
+ 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006, 18.9386, 19.7892};
   static const G4double X3[nX]={.060124,
-	5.73857,	8.62595,	10.9849,	13.0644,	14.9636,	16.7340,	18.4066,	20.0019,	21.5342,	23.0142,
-	24.4497,	25.8471,	27.2114,	28.5467,	29.8564,	31.1434,	32.4102,	33.6589,	34.8912, 36.1095};
+ 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342, 23.0142,
+ 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589, 34.8912, 36.1095};
   static const G4double X4[nX]={.0992363,
-	8.23746,	12.1036,	15.1740,	17.8231,	20.1992,	22.3792,	24.4092,	26.3198,	28.1320,	29.8615,
-	31.5200,	33.1169,	34.6594,	36.1536,	37.6044,	39.0160,	40.3920,	41.7353,	43.0485, 44.3354};
+ 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320, 29.8615,
+ 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353, 43.0485, 44.3354};
   static const G4double X5[nX]={.0561127,
-	7.33661,	10.5694,	13.0778,	15.2061,	17.0893,	18.7973,	20.3717,	21.8400,	23.2211,	24.5291,
-	25.7745,	26.9655,	28.1087,	29.2094,	30.2721,	31.3003,	32.2972,	33.2656,	34.2076, 35.1265};
+ 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211, 24.5291,
+ 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656, 34.2076, 35.1265};
   static const G4double X6[nX]={.0145859,
-	4.81774,	6.83565,	8.37399,	9.66291,	10.7920,	11.8075,	12.7366,	13.5975,	14.4025,	15.1608,
-	15.8791,	16.5628,	17.2162,	17.8427,	18.4451,	19.0259,	19.5869,	20.1300,	20.6566, 21.1706};
+ 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025, 15.1608,
+ 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300, 20.6566, 21.1706};
   static const G4double X7[nX]={.00241155,
-	2.87095,	4.02492,	4.89243,	5.61207,	6.23747,	6.79613,	7.30433,	7.77270,	8.20858,	8.61732,
-	9.00296,	9.36863,	9.71682,	10.0495,	10.3684,	10.6749,	10.9701,	11.2550,	11.5306, 11.7982};
+ 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858, 8.61732,
+ 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550, 11.5306, 11.7982};
   static const G4double X8[nX]={.000316863,
-	1.76189,	2.44632,	2.95477,	3.37292,	3.73378,	4.05420,	4.34415,	4.61009,	4.85651,	5.08666,
-	5.30299,	5.50738,	5.70134,	5.88609,	6.06262,	6.23178,	6.39425,	6.55065,	6.70149, 6.84742};
+ 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651, 5.08666,
+ 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065, 6.70149, 6.84742};
   static const G4double X9[nX]={3.73544e-05,
-	1.17106,	1.61289,	1.93763,	2.20259,	2.42976,	2.63034,	2.81094,	2.97582,	3.12796,	3.26949,
-	3.40202,	3.52680,	3.64482,	3.75687,	3.86360,	3.96557,	4.06323,	4.15697,	4.24713, 4.33413};
+ 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796, 3.26949,
+ 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697, 4.24713, 4.33413};
   static const G4double XA[nX]={4.19131e-06,
-	.849573,	1.16208,	1.38955,	1.57379,	1.73079,	1.86867,	1.99221,	2.10451,	2.20770,	2.30332,
-	2.39252,	2.47622,	2.55511,	2.62977,	2.70066,	2.76818,	2.83265,	2.89437,	2.95355, 3.01051};
+ .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770, 2.30332,
+ 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437, 2.95355, 3.01051};
   static const G4double XB[nX]={4.59981e-07,
-	.666131,	.905836,	1.07880,	1.21796,	1.33587,	1.43890,	1.53080,	1.61399,	1.69011,	1.76040,
-	1.82573,	1.88682,	1.94421,	1.99834,	2.04959,	2.09824,	2.14457,	2.18878,	2.23107, 2.27162};
+ .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011, 1.76040,
+ 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878, 2.23107, 2.27162};
   static const G4double XC[nX]={4.99861e-08,
-	.556280,	.752730,	.893387,	1.00587,	1.10070,	1.18317,	1.25643,	1.32247,	1.38269,	1.43809,
-	1.48941,	1.53724,	1.58203,	1.62416,	1.66391,	1.70155,	1.73728,	1.77128,	1.80371, 1.83473};
+ .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269, 1.43809,
+ 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128, 1.80371, 1.83473};
   static const G4double XD[nX]={5.40832e-09,
-	.488069,	.657650,	.778236,	.874148,	.954621,	1.02432,	1.08599,	1.14138,	1.19172,	1.23787,
-	1.28049,	1.32008,	1.35705,	1.39172,	1.42434,	1.45514,	1.48429,	1.51197,	1.53829, 1.56339};
+ .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172, 1.23787,
+ 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197, 1.53829, 1.56339};
   static const G4double XE[nX]={5.84029e-10,
-	.445057,	.597434,	.705099,	.790298,	.861468,	.922865,	.976982,	1.02542,	1.06930,	1.10939,
-	1.14630,	1.18050,	1.21233,	1.24208,	1.27001,	1.29630,	1.32113,	1.34462,	1.36691, 1.38812};
+ .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930, 1.10939,
+ 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462, 1.36691, 1.38812};
   static const G4double XF[nX]={6.30137e-11,
-	.418735,	.560003,	.659168,	.737230,	.802138,	.857898,	.906854,	.950515,	.989915,	1.02580,
-	1.05873,	1.08913,	1.11734,	1.14364,	1.16824,	1.19133,	1.21306,	1.23358,	1.25298, 1.27139};
+ .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915, 1.02580,
+ 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358, 1.25298, 1.27139};
   static const G4double XG[nX]={6.79627e-12,
-	.405286,	.539651,	.633227,	.706417,	.766929,	.818642,	.863824,	.903931,	.939963,	.972639,
-	1.00250,	1.02995,	1.05532,	1.07887,	1.10082,	1.12134,	1.14058,	1.15867,	1.17572, 1.19183};
+ .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963, .972639,
+ 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867, 1.17572, 1.19183};
   static const G4double XH[nX]={7.32882e-13,
-	.404391,	.535199,	.625259,	.695036,	.752243,	.800752,	.842823,	.879906,	.912994,	.942802,
-	.969862,	.994583,	1.01729,	1.03823,	1.05763,	1.07566,	1.09246,	1.10816,	1.12286, 1.13667};
+ .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994, .942802,
+ .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816, 1.12286, 1.13667};
   static const G4double XI[nX]={7.90251e-14,
-	.418084,	.548382,	.636489,	.703728,	.758106,	.803630,	.842633,	.876608,	.906576,	.933269,
-	.957233,	.978886,	.998556,	1.01651,	1.03295,	1.04807,	1.06201,	1.07489,	1.08683, 1.09792};
+ .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576, .933269,
+ .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489, 1.08683, 1.09792};
   static const G4double XJ[nX]={8.52083e-15,
-	.447299,	.579635,	.666780,	.731788,	.783268,	.825512,	.861013,	.891356,	.917626,	.940597,
-	.960842,	.978802,	.994820,	1.00917,	1.02208,	1.03373,	1.04427,	1.05383,	1.06253, 1.07046};
+ .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626, .940597,
+ .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383, 1.06253, 1.07046};
   // Direct table
   static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0],
@@ -615,72 +615,72 @@
                              {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ};
   static const G4double I0[nX]={0,
-	.354631,	1.08972,	2.05138,	3.16564,	4.38343,	5.66828,	6.99127,	8.32858,	9.65998,	10.9680,
-	12.2371,	13.4536,	14.6050,	15.6802,	16.6686,	17.5609,	18.3482,	19.0221,	19.5752,	20.0000};
+ .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998, 10.9680,
+ 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752, 20.0000};
   static const G4double I1[nX]={0,
-	.281625,	.877354,	1.67084,	2.60566,	3.64420,	4.75838,	5.92589,	7.12829,	8.34989,	9.57708,
-	10.7978,	12.0014,	13.1781,	14.3190,	15.4162,	16.4620,	17.4496,	18.3724,	19.2245,	20.0000};
+ .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989, 9.57708,
+ 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245, 20.0000};
   static const G4double I2[nX]={0,
-	.201909,	.642991,	1.24946,	1.98463,	2.82370,	3.74802,	4.74263,	5.79509,	6.89474,	8.03228,
-	9.19947,	10.3889,	11.5938,	12.8082,	14.0262,	15.2427,	16.4527,	17.6518,	18.8356,	20.0000};
+ .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474, 8.03228,
+ 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356, 20.0000};
   static const G4double I3[nX]={0,
-	.140937,	.461189,	.920216,	1.49706,	2.17728,	2.94985,	3.80580,	4.73758,	5.73867,	6.80331,
-	7.92637,	9.10316,	10.3294,	11.6013,	12.9150,	14.2672,	15.6548,	17.0746,	18.5239,	20.0000};
+ .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867, 6.80331,
+ 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239, 20.0000};
   static const G4double I4[nX]={0,
-	.099161,	.337358,	.694560,	1.16037,	1.72761,	2.39078,	3.14540,	3.98768,	4.91433,	5.92245,
-	7.00942,	8.17287,	9.41060,	10.7206,	12.1010,	13.5500,	15.0659,	16.6472,	18.2924,	20.0000};
+ .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433, 5.92245,
+ 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924, 20.0000};
   static const G4double I5[nX]={0,
-	.071131,	.255084,	.543312,	.932025,	1.41892,	2.00243,	2.68144,	3.45512,	4.32283,	5.28411,
-	6.33859,	7.48602,	8.72621,	10.0590,	11.4844,	13.0023,	14.6128,	16.3158,	18.1115,	20.0000};
+ .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283, 5.28411,
+ 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115, 20.0000};
   static const G4double I6[nX]={0,
-	.053692,	.202354,	.443946,	.778765,	1.20774,	1.73208,	2.35319,	3.07256,	3.89177,	4.81249,
-	5.83641,	6.96528,	8.20092,	9.54516,	10.9999,	12.5670,	14.2486,	16.0466,	17.9630,	20.0000};
+ .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177, 4.81249,
+ 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630, 20.0000};
   static const G4double I7[nX]={0,
-	.043065,	.168099,	.376879,	.672273,	1.05738,	1.53543,	2.10973,	2.78364,	3.56065,	4.44429,
-	5.43819,	6.54610,	7.77186,	9.11940,	10.5928,	12.1963,	13.9342,	15.8110,	17.8313,	20.0000};
+ .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065, 4.44429,
+ 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313, 20.0000};
   static const G4double I8[nX]={0,
-	.036051,	.143997,	.327877,	.592202,	.941572,	1.38068,	1.91433,	2.54746,	3.28517,	4.13277,
-	5.09574,	6.17984,	7.39106,	8.73568,	10.2203,	11.8519,	13.6377,	15.5854,	17.7033,	20.0000};
+ .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517, 4.13277,
+ 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033, 20.0000};
   static const G4double I9[nX]={0,
-	.030977,	.125727,	.289605,	.528146,	.846967,	1.25183,	1.74871,	2.34384,	3.04376,	3.85535,
-	4.78594,	5.84329,	7.03567,	8.37194,	9.86163,	11.5150,	13.3430,	15.3576,	17.5719,	20.0000};
+ .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376, 3.85535,
+ 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719, 20.0000};
   static const G4double IA[nX]={0,
-	.027129,	.111420,	.258935,	.475812,	.768320,	1.14297,	1.60661,	2.16648,	2.83034,	3.60650,
-	4.50394,	5.53238,	6.70244,	8.02569,	9.51488,	11.1841,	13.0488,	15.1264,	17.4362,	20.0000};
+ .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034, 3.60650,
+ 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362, 20.0000};
   static const G4double IB[nX]={0,
-	.024170,	.100153,	.234345,	.433198,	.703363,	1.05184,	1.48607,	2.01409,	2.64459,	3.38708,
-	4.25198,	5.25084,	6.39647,	7.70319,	9.18708,	10.8663,	12.7617,	14.8968,	17.2990,	20.0000};
+ .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459, 3.38708,
+ 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990, 20.0000};
   static const G4double IC[nX]={0,
-	.021877,	.091263,	.214670,	.398677,	.650133,	.976322,	1.38510,	1.88504,	2.48555,	3.19709,
-	4.03129,	5.00127,	6.12184,	7.40989,	8.88482,	10.5690,	12.4888,	14.6748,	17.1638,	20.0000};
+ .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555, 3.19709,
+ 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638, 20.0000};
   static const G4double ID[nX]={0,
-	.020062,	.084127,	.198702,	.370384,	.606100,	.913288,	1.30006,	1.77535,	2.34912,	3.03253,
-	3.83822,	4.78063,	5.87634,	7.14459,	8.60791,	10.2929,	12.2315,	14.4621,	17.0320,	20.0000};
+ .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912, 3.03253,
+ 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320, 20.0000};
   static const G4double IE[nX]={0,
-	.018547,	.078104,	.185102,	.346090,	.567998,	.858331,	1.22535,	1.67824,	2.22735,	2.88443,
-	3.66294,	4.57845,	5.64911,	6.89637,	8.34578,	10.0282,	11.9812,	14.2519,	16.8993,	20.0000};
+ .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735, 2.88443,
+ 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993, 20.0000};
   static const G4double IF[nX]={0,
-	.017143,	.072466,	.172271,	.323007,	.531545,	.805393,	1.15288,	1.58338,	2.10754,	2.73758,
-	3.48769,	4.37450,	5.41770,	6.64092,	8.07288,	9.74894,	11.7135,	14.0232,	16.7522,	20.0000};
+ .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754, 2.73758,
+ 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522, 20.0000};
   static const G4double IG[nX]={0,
-	.015618,	.066285,	.158094,	.297316,	.490692,	.745653,	1.07053,	1.47479,	1.96931,	2.56677,
-	3.28205,	4.13289,	5.14068,	6.33158,	7.73808,	9.40133,	11.3745,	13.7279,	16.5577,	20.0000};
+ .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931, 2.56677,
+ 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577, 20.0000};
   static const G4double IH[nX]={0,
-	.013702,	.058434,	.139923,	.264115,	.437466,	.667179,	.961433,	1.32965,	1.78283,	2.33399,
-	2.99871,	3.79596,	4.74916,	5.88771,	7.24937,	8.88367,	10.8576,	13.2646,	16.2417,	20.0000};
+ .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283, 2.33399,
+ 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417, 20.0000};
   static const G4double II[nX]={0,
-	.011264,	.048311,	.116235,	.220381,	.366634,	.561656,	.813132,	1.13008,	1.52322,	2.00554,
-	2.59296,	3.30542,	4.16834,	5.21490,	6.48964,	8.05434,	9.99835,	12.4580,	15.6567,	20.0000};
+ .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322, 2.00554,
+ 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567, 20.0000};
   static const G4double IJ[nX]={0,
-	.008628,	.037206,	.089928,	.171242,	.286114,	.440251,	.640343,	.894382,	1.21208,	1.60544,
-	2.08962,	2.68414,	3.41486,	4.31700,	5.44048,	6.85936,	8.69067,	11.1358,	14.5885,	20.0000};
+ .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208, 1.60544,
+ 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885, 20.0000};
   static const G4double* Il[nE]=
                              {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ};
   static const G4double lE[nE]={
--1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215,	.459141,	.867068,	1.27499,	1.68292,
- 2.09085,	2.49877,	2.90670,	3.31463,	3.72255,	4.13048,	4.53840,	4.94633,	5.35426,	5.76218};
+-1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292,
+ 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218};
   static const G4double lEmi=lE[0];
   static const G4double lEma=lE[nE-1];
   static const G4double dlE=(lEma-lEmi)/bE;
-	 //***************************************************************************************
+  //***************************************************************************************
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double lEn=std::log(Enu);         // log(E) for interpolation
@@ -772,4 +772,4 @@
 }
 
-// This class can provide only virtual exchange pi+ (a substitute for W+ boson)
+// This class can provide only virtual exchange pi- (a substitute for W- boson)
 G4int G4QANuENuclearCrossSection::GetExchangePDGCode() {return -211;}
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuMuNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuMuNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuMuNuclearCrossSection.cc	(revision 1055)
@@ -25,9 +25,9 @@
 //
 //
-// $Id: G4QANuMuNuclearCrossSection.cc,v 1.11 2007/11/01 16:09:38 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QANuMuNuclearCrossSection.cc,v 1.13 2009/05/08 15:16:26 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
-// G4 Physics class: G4QANuMuNuclearCrossSection for gamma+A cross sections
+// G4 Physics class: G4QANuMuNuclearCrossSection for (anu_mu,mu+)A cross sections
 // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03
@@ -37,5 +37,5 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
-//===============================================================================================
+//=========================================================================================
 
 //#define debug
@@ -90,5 +90,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(pPDG!=-14)
@@ -111,7 +111,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -163,7 +163,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QAMNCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lstI="<<lastI<<G4endl;
@@ -172,5 +172,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -184,5 +184,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QAMNCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -200,7 +200,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QAMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -245,7 +245,7 @@
 G4double G4QANuMuNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N, G4int)
 {
-  //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1.,0.)/GeV;
-  //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1.,1.)/GeV;
-  //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2.,1.)/GeV/2.;
+  //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/GeV;
+  //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/GeV;
+  //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2,1)/GeV/2.;
   static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
   static const G4double dmN=mN+mN;    // Doubled nucleon mass (2*AtomicMassUnit, GeV)
@@ -294,10 +294,10 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastTX =TX[I];                 // Pointer to the prepared TX function (same isotope)
       lastQE =QE[I];                 // Pointer to the prepared QE function (same isotope)
-	  }
-	  else                              // This isotope wasn't calculated previously => CREATE
-	  {
+   }
+   else                              // This isotope wasn't calculated previously => CREATE
+   {
       if(first)
       {
@@ -315,5 +315,5 @@
       TX.push_back(lastTX);
       QE.push_back(lastQE);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -330,5 +330,5 @@
     G4int sep=ran;  // as a result = an index of the left edge of the interval
     while(ran>=2)
-				{
+    {
       G4int newran=ran/2;
       if(lastE<=lastEN[sep]) sep-=newran;
@@ -382,32 +382,32 @@
   static const G4int nE=65; // !! If change this, change it in GetCrossSection() (*.cc) !!
   static const G4double nuEn[nE]={thresh,
-.112039,.116079,.120416,.125076,.130090,.135494,.141324,.147626,.154445,.161838,
-.169864,.178594,.188105,.198485,.209836,.222272,.235923,.250941,.267497,.285789,
-.306045,.328530,.353552,.381466,.412689,.447710,.487101,.531538,.581820,.638893,
-.703886,.778147,.863293,.961275,1.07445,1.20567,1.35843,1.53701,1.74667,1.99390,
-2.28679,2.63542,3.05245,3.55386,4.15990,4.89644,5.79665,6.90336,8.27224,9.97606,
-12.1106,14.8029,18.2223,22.5968,28.2351,35.5587,45.1481,57.8086,74.6682,97.3201,
-128.036,170.085,228.220,309.420};
+    .112039,.116079,.120416,.125076,.130090,.135494,.141324,.147626,.154445,.161838,
+    .169864,.178594,.188105,.198485,.209836,.222272,.235923,.250941,.267497,.285789,
+    .306045,.328530,.353552,.381466,.412689,.447710,.487101,.531538,.581820,.638893,
+    .703886,.778147,.863293,.961275,1.07445,1.20567,1.35843,1.53701,1.74667,1.99390,
+    2.28679,2.63542,3.05245,3.55386,4.15990,4.89644,5.79665,6.90336,8.27224,9.97606,
+    12.1106,14.8029,18.2223,22.5968,28.2351,35.5587,45.1481,57.8086,74.6682,97.3201,
+    128.036,170.085,228.220,309.420};
   static const G4double TOTX[nE]={0.,
-.077498,.247583,.329691,.386384,.429087,.462699,.489899,.512316,.530996,.546614,
-.559616,.570292,.578840,.585395,.590053,.593083,.594197,.593614,.591396,.587611,
-.582335,.575653,.567667,.558490,.548417,.537270,.525352,.512825,.499857,.486620,
-.473283,.460014,.446970,.434294,.422116,.410656,.399782,.389665,.380349,.371860,
-.364207,.357387,.351388,.346192,.341778,.338122,.335198,.332980,.331439,.330544,
-.330263,.330558,.331391,.332718,.334494,.336667,.339182,.341697,.344470,.348125,
-.351322,.354481,.357507,.359239};
+    .077498,.247583,.329691,.386384,.429087,.462699,.489899,.512316,.530996,.546614,
+    .559616,.570292,.578840,.585395,.590053,.593083,.594197,.593614,.591396,.587611,
+    .582335,.575653,.567667,.558490,.548417,.537270,.525352,.512825,.499857,.486620,
+    .473283,.460014,.446970,.434294,.422116,.410656,.399782,.389665,.380349,.371860,
+    .364207,.357387,.351388,.346192,.341778,.338122,.335198,.332980,.331439,.330544,
+    .330263,.330558,.331391,.332718,.334494,.336667,.339182,.341697,.344470,.348125,
+    .351322,.354481,.357507,.359239};
   static const G4double QELX[nE]={0.,
-.008683,.028739,.039700,.048327,.055820,.062693,.069235,.075631,.082010,.088463,
-.095059,.101851,.108883,.116192,.123814,.131826,.140185,.148962,.158197,.167933,
-.178221,.189119,.200700,.213045,.226326,.240454,.255277,.270612,.286388,.302608,
-.319318,.336582,.354468,.373031,.392427,.412445,.433146,.454448,.476222,.498289,
-.520430,.542558,.564130,.585003,.604928,.623680,.641266,.657255,.671704,.684586,
-.696111,.706028,.714553,.721951,.728085,.733182,.737348,.740958,.743716,.746059,
-.747806,.749129,.750331,.751100};
+    .008683,.028739,.039700,.048327,.055820,.062693,.069235,.075631,.082010,.088463,
+    .095059,.101851,.108883,.116192,.123814,.131826,.140185,.148962,.158197,.167933,
+    .178221,.189119,.200700,.213045,.226326,.240454,.255277,.270612,.286388,.302608,
+    .319318,.336582,.354468,.373031,.392427,.412445,.433146,.454448,.476222,.498289,
+    .520430,.542558,.564130,.585003,.604928,.623680,.641266,.657255,.671704,.684586,
+    .696111,.706028,.714553,.721951,.728085,.733182,.737348,.740958,.743716,.746059,
+    .747806,.749129,.750331,.751100};
 
   // --------------------------------
   G4int first=0;
   if(z<0.)
-		{
+  {
     first=1;
     z=-z;
@@ -428,5 +428,5 @@
     t[k]=TOTX[k]*nuEn[k]*(za+za)/ta+QELX[k]*(dz+dz-da)/ta; // TotalCrossSection
     q[k]=QELX[k]*dz/a;                                     // QuasiElasticCrossSection
-	 }
+  }
   return first;
 }
@@ -448,28 +448,28 @@
   static const G4double Xl[nQ2]={5.20224e-16,
  .006125,.0137008,.0218166,.0302652,.0389497,.0478144,.0568228,.0659497,.0751768,.0844898,
-	.093878,	.103332,	.112844,	.122410,	.132023,	.141680,	.151376,	.161109,	.170875,	.180672,
-	.190499,	.200352,	.210230,	.220131,	.230055,	.239999,	.249963,	.259945,	.269944,	.279960,
-	.289992,	.300039,	.310099,	.320173,	.330260,	.340359,	.350470,	.360592,	.370724,	.380867,
-	.391019,	.401181,	.411352,	.421531,	.431719,	.441915,	.452118,	.462329,	.472547,	.482771,
-	.493003,	.503240,	.513484,	.523734,	.533989,	.544250,	.554517,	.564788,	.575065,	.585346,
-	.595632,	.605923,	.616218,	.626517,	.636820,	.647127,	.657438,	.667753,	.678072,	.688394,
-	.698719,	.709048,	.719380,	.729715,	.740053,	.750394,	.760738,	.771085,	.781434,	.791786,
-	.802140,	.812497,	.822857,	.833219,	.843582,	.853949,	.864317,	.874687,	.885060,	.895434,
-	.905810,	.916188,	.926568,	.936950,	.947333,	.957719,	.968105,	.978493,	.988883,	.999275};
-	  // Direct table
+ .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875, .180672,
+ .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944, .279960,
+ .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724, .380867,
+ .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547, .482771,
+ .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065, .585346,
+ .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072, .688394,
+ .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434, .791786,
+ .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060, .895434,
+ .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883, .999275};
+   // Direct table
   static const G4double Xmax=Xl[lQ2];
   static const G4double Xmin=Xl[0];
   static const G4double dX=(Xmax-Xmin)/lQ2;  // step in X(Q2, GeV^2)
   static const G4double inl[nQ2]={0,
-	1.52225,	2.77846,	3.96651,	5.11612,	6.23990,	7.34467,	8.43466,	9.51272,	10.5809,	11.6406,
-	12.6932,	13.7394,	14.7801,	15.8158,	16.8471,	17.8743,	18.8979,	19.9181,	20.9353,	21.9496,
-	22.9614,	23.9707,	24.9777,	25.9826,	26.9855,	27.9866,	28.9860,	29.9837,	30.9798,	31.9745,
-	32.9678,	33.9598,	34.9505,	35.9400,	36.9284,	37.9158,	38.9021,	39.8874,	40.8718,	41.8553,
-	42.8379,	43.8197,	44.8007,	45.7810,	46.7605,	47.7393,	48.7174,	49.6950,	50.6718,	51.6481,
-	52.6238,	53.5990,	54.5736,	55.5476,	56.5212,	57.4943,	58.4670,	59.4391,	60.4109,	61.3822,
-	62.3531,	63.3236,	64.2937,	65.2635,	66.2329,	67.2019,	68.1707,	69.1390,	70.1071,	71.0748,
-	72.0423,	73.0095,	73.9763,	74.9429,	75.9093,	76.8754,	77.8412,	78.8068,	79.7721,	80.7373,
-	81.7022,	82.6668,	83.6313,	84.5956,	85.5596,	86.5235,	87.4872,	88.4507,	89.4140,	90.3771,
-	91.3401,	92.3029,	93.2656,	94.2281,	95.1904,	96.1526,	97.1147,	98.0766,	99.0384,	100.000};
+ 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809, 11.6406,
+ 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353, 21.9496,
+ 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798, 31.9745,
+ 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718, 41.8553,
+ 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718, 51.6481,
+ 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109, 61.3822,
+ 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071, 71.0748,
+ 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721, 80.7373,
+ 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140, 90.3771,
+ 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384, 100.000};
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double dEnu=Enu+Enu;              // doubled energy of nu/anu
@@ -538,63 +538,63 @@
   // Reversed table
   static const G4double X0[nX]={5.21412e-05,
-	.437860,	.681908,	.891529,	1.08434,	1.26751,	1.44494,	1.61915,	1.79198,	1.96493,	2.13937,
-	2.31664,	2.49816,	2.68559,	2.88097,	3.08705,	3.30774,	3.54917,	3.82233,	4.15131, 4.62182};
+ .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493, 2.13937,
+ 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233, 4.15131, 4.62182};
   static const G4double X1[nX]={.00102591,
-	1.00443,	1.55828,	2.03126,	2.46406,	2.87311,	3.26723,	3.65199,	4.03134,	4.40835,	4.78561,
-	5.16549,	5.55031,	5.94252,	6.34484,	6.76049,	7.19349,	7.64917,	8.13502,	8.66246, 9.25086};
+ 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835, 4.78561,
+ 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502, 8.66246, 9.25086};
   static const G4double X2[nX]={.0120304,
-	2.59903,	3.98637,	5.15131,	6.20159,	7.18024,	8.10986,	9.00426,	9.87265,	10.7217,	11.5564,
-	12.3808,	13.1983,	14.0116,	14.8234,	15.6359,	16.4515,	17.2723,	18.1006,	18.9386, 19.7892};
+ 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217, 11.5564,
+ 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006, 18.9386, 19.7892};
   static const G4double X3[nX]={.060124,
-	5.73857,	8.62595,	10.9849,	13.0644,	14.9636,	16.7340,	18.4066,	20.0019,	21.5342,	23.0142,
-	24.4497,	25.8471,	27.2114,	28.5467,	29.8564,	31.1434,	32.4102,	33.6589,	34.8912, 36.1095};
+ 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342, 23.0142,
+ 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589, 34.8912, 36.1095};
   static const G4double X4[nX]={.0992363,
-	8.23746,	12.1036,	15.1740,	17.8231,	20.1992,	22.3792,	24.4092,	26.3198,	28.1320,	29.8615,
-	31.5200,	33.1169,	34.6594,	36.1536,	37.6044,	39.0160,	40.3920,	41.7353,	43.0485, 44.3354};
+ 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320, 29.8615,
+ 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353, 43.0485, 44.3354};
   static const G4double X5[nX]={.0561127,
-	7.33661,	10.5694,	13.0778,	15.2061,	17.0893,	18.7973,	20.3717,	21.8400,	23.2211,	24.5291,
-	25.7745,	26.9655,	28.1087,	29.2094,	30.2721,	31.3003,	32.2972,	33.2656,	34.2076, 35.1265};
+ 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211, 24.5291,
+ 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656, 34.2076, 35.1265};
   static const G4double X6[nX]={.0145859,
-	4.81774,	6.83565,	8.37399,	9.66291,	10.7920,	11.8075,	12.7366,	13.5975,	14.4025,	15.1608,
-	15.8791,	16.5628,	17.2162,	17.8427,	18.4451,	19.0259,	19.5869,	20.1300,	20.6566, 21.1706};
+ 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025, 15.1608,
+ 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300, 20.6566, 21.1706};
   static const G4double X7[nX]={.00241155,
-	2.87095,	4.02492,	4.89243,	5.61207,	6.23747,	6.79613,	7.30433,	7.77270,	8.20858,	8.61732,
-	9.00296,	9.36863,	9.71682,	10.0495,	10.3684,	10.6749,	10.9701,	11.2550,	11.5306, 11.7982};
+ 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858, 8.61732,
+ 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550, 11.5306, 11.7982};
   static const G4double X8[nX]={.000316863,
-	1.76189,	2.44632,	2.95477,	3.37292,	3.73378,	4.05420,	4.34415,	4.61009,	4.85651,	5.08666,
-	5.30299,	5.50738,	5.70134,	5.88609,	6.06262,	6.23178,	6.39425,	6.55065,	6.70149, 6.84742};
+ 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651, 5.08666,
+ 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065, 6.70149, 6.84742};
   static const G4double X9[nX]={3.73544e-05,
-	1.17106,	1.61289,	1.93763,	2.20259,	2.42976,	2.63034,	2.81094,	2.97582,	3.12796,	3.26949,
-	3.40202,	3.52680,	3.64482,	3.75687,	3.86360,	3.96557,	4.06323,	4.15697,	4.24713, 4.33413};
+ 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796, 3.26949,
+ 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697, 4.24713, 4.33413};
   static const G4double XA[nX]={4.19131e-06,
-	.849573,	1.16208,	1.38955,	1.57379,	1.73079,	1.86867,	1.99221,	2.10451,	2.20770,	2.30332,
-	2.39252,	2.47622,	2.55511,	2.62977,	2.70066,	2.76818,	2.83265,	2.89437,	2.95355, 3.01051};
+ .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770, 2.30332,
+ 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437, 2.95355, 3.01051};
   static const G4double XB[nX]={4.59981e-07,
-	.666131,	.905836,	1.07880,	1.21796,	1.33587,	1.43890,	1.53080,	1.61399,	1.69011,	1.76040,
-	1.82573,	1.88682,	1.94421,	1.99834,	2.04959,	2.09824,	2.14457,	2.18878,	2.23107, 2.27162};
+ .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011, 1.76040,
+ 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878, 2.23107, 2.27162};
   static const G4double XC[nX]={4.99861e-08,
-	.556280,	.752730,	.893387,	1.00587,	1.10070,	1.18317,	1.25643,	1.32247,	1.38269,	1.43809,
-	1.48941,	1.53724,	1.58203,	1.62416,	1.66391,	1.70155,	1.73728,	1.77128,	1.80371, 1.83473};
+ .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269, 1.43809,
+ 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128, 1.80371, 1.83473};
   static const G4double XD[nX]={5.40832e-09,
-	.488069,	.657650,	.778236,	.874148,	.954621,	1.02432,	1.08599,	1.14138,	1.19172,	1.23787,
-	1.28049,	1.32008,	1.35705,	1.39172,	1.42434,	1.45514,	1.48429,	1.51197,	1.53829, 1.56339};
+ .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172, 1.23787,
+ 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197, 1.53829, 1.56339};
   static const G4double XE[nX]={5.84029e-10,
-	.445057,	.597434,	.705099,	.790298,	.861468,	.922865,	.976982,	1.02542,	1.06930,	1.10939,
-	1.14630,	1.18050,	1.21233,	1.24208,	1.27001,	1.29630,	1.32113,	1.34462,	1.36691, 1.38812};
+ .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930, 1.10939,
+ 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462, 1.36691, 1.38812};
   static const G4double XF[nX]={6.30137e-11,
-	.418735,	.560003,	.659168,	.737230,	.802138,	.857898,	.906854,	.950515,	.989915,	1.02580,
-	1.05873,	1.08913,	1.11734,	1.14364,	1.16824,	1.19133,	1.21306,	1.23358,	1.25298, 1.27139};
+ .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915, 1.02580,
+ 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358, 1.25298, 1.27139};
   static const G4double XG[nX]={6.79627e-12,
-	.405286,	.539651,	.633227,	.706417,	.766929,	.818642,	.863824,	.903931,	.939963,	.972639,
-	1.00250,	1.02995,	1.05532,	1.07887,	1.10082,	1.12134,	1.14058,	1.15867,	1.17572, 1.19183};
+ .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963, .972639,
+ 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867, 1.17572, 1.19183};
   static const G4double XH[nX]={7.32882e-13,
-	.404391,	.535199,	.625259,	.695036,	.752243,	.800752,	.842823,	.879906,	.912994,	.942802,
-	.969862,	.994583,	1.01729,	1.03823,	1.05763,	1.07566,	1.09246,	1.10816,	1.12286, 1.13667};
+ .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994, .942802,
+ .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816, 1.12286, 1.13667};
   static const G4double XI[nX]={7.90251e-14,
-	.418084,	.548382,	.636489,	.703728,	.758106,	.803630,	.842633,	.876608,	.906576,	.933269,
-	.957233,	.978886,	.998556,	1.01651,	1.03295,	1.04807,	1.06201,	1.07489,	1.08683, 1.09792};
+ .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576, .933269,
+ .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489, 1.08683, 1.09792};
   static const G4double XJ[nX]={8.52083e-15,
-	.447299,	.579635,	.666780,	.731788,	.783268,	.825512,	.861013,	.891356,	.917626,	.940597,
-	.960842,	.978802,	.994820,	1.00917,	1.02208,	1.03373,	1.04427,	1.05383,	1.06253, 1.07046};
+ .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626, .940597,
+ .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383, 1.06253, 1.07046};
   // Direct table
   static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0],
@@ -609,72 +609,72 @@
                              {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ};
   static const G4double I0[nX]={0,
-	.354631,	1.08972,	2.05138,	3.16564,	4.38343,	5.66828,	6.99127,	8.32858,	9.65998,	10.9680,
-	12.2371,	13.4536,	14.6050,	15.6802,	16.6686,	17.5609,	18.3482,	19.0221,	19.5752,	20.0000};
+ .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998, 10.9680,
+ 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752, 20.0000};
   static const G4double I1[nX]={0,
-	.281625,	.877354,	1.67084,	2.60566,	3.64420,	4.75838,	5.92589,	7.12829,	8.34989,	9.57708,
-	10.7978,	12.0014,	13.1781,	14.3190,	15.4162,	16.4620,	17.4496,	18.3724,	19.2245,	20.0000};
+ .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989, 9.57708,
+ 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245, 20.0000};
   static const G4double I2[nX]={0,
-	.201909,	.642991,	1.24946,	1.98463,	2.82370,	3.74802,	4.74263,	5.79509,	6.89474,	8.03228,
-	9.19947,	10.3889,	11.5938,	12.8082,	14.0262,	15.2427,	16.4527,	17.6518,	18.8356,	20.0000};
+ .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474, 8.03228,
+ 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356, 20.0000};
   static const G4double I3[nX]={0,
-	.140937,	.461189,	.920216,	1.49706,	2.17728,	2.94985,	3.80580,	4.73758,	5.73867,	6.80331,
-	7.92637,	9.10316,	10.3294,	11.6013,	12.9150,	14.2672,	15.6548,	17.0746,	18.5239,	20.0000};
+ .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867, 6.80331,
+ 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239, 20.0000};
   static const G4double I4[nX]={0,
-	.099161,	.337358,	.694560,	1.16037,	1.72761,	2.39078,	3.14540,	3.98768,	4.91433,	5.92245,
-	7.00942,	8.17287,	9.41060,	10.7206,	12.1010,	13.5500,	15.0659,	16.6472,	18.2924,	20.0000};
+ .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433, 5.92245,
+ 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924, 20.0000};
   static const G4double I5[nX]={0,
-	.071131,	.255084,	.543312,	.932025,	1.41892,	2.00243,	2.68144,	3.45512,	4.32283,	5.28411,
-	6.33859,	7.48602,	8.72621,	10.0590,	11.4844,	13.0023,	14.6128,	16.3158,	18.1115,	20.0000};
+ .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283, 5.28411,
+ 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115, 20.0000};
   static const G4double I6[nX]={0,
-	.053692,	.202354,	.443946,	.778765,	1.20774,	1.73208,	2.35319,	3.07256,	3.89177,	4.81249,
-	5.83641,	6.96528,	8.20092,	9.54516,	10.9999,	12.5670,	14.2486,	16.0466,	17.9630,	20.0000};
+ .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177, 4.81249,
+ 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630, 20.0000};
   static const G4double I7[nX]={0,
-	.043065,	.168099,	.376879,	.672273,	1.05738,	1.53543,	2.10973,	2.78364,	3.56065,	4.44429,
-	5.43819,	6.54610,	7.77186,	9.11940,	10.5928,	12.1963,	13.9342,	15.8110,	17.8313,	20.0000};
+ .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065, 4.44429,
+ 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313, 20.0000};
   static const G4double I8[nX]={0,
-	.036051,	.143997,	.327877,	.592202,	.941572,	1.38068,	1.91433,	2.54746,	3.28517,	4.13277,
-	5.09574,	6.17984,	7.39106,	8.73568,	10.2203,	11.8519,	13.6377,	15.5854,	17.7033,	20.0000};
+ .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517, 4.13277,
+ 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033, 20.0000};
   static const G4double I9[nX]={0,
-	.030977,	.125727,	.289605,	.528146,	.846967,	1.25183,	1.74871,	2.34384,	3.04376,	3.85535,
-	4.78594,	5.84329,	7.03567,	8.37194,	9.86163,	11.5150,	13.3430,	15.3576,	17.5719,	20.0000};
+ .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376, 3.85535,
+ 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719, 20.0000};
   static const G4double IA[nX]={0,
-	.027129,	.111420,	.258935,	.475812,	.768320,	1.14297,	1.60661,	2.16648,	2.83034,	3.60650,
-	4.50394,	5.53238,	6.70244,	8.02569,	9.51488,	11.1841,	13.0488,	15.1264,	17.4362,	20.0000};
+ .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034, 3.60650,
+ 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362, 20.0000};
   static const G4double IB[nX]={0,
-	.024170,	.100153,	.234345,	.433198,	.703363,	1.05184,	1.48607,	2.01409,	2.64459,	3.38708,
-	4.25198,	5.25084,	6.39647,	7.70319,	9.18708,	10.8663,	12.7617,	14.8968,	17.2990,	20.0000};
+ .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459, 3.38708,
+ 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990, 20.0000};
   static const G4double IC[nX]={0,
-	.021877,	.091263,	.214670,	.398677,	.650133,	.976322,	1.38510,	1.88504,	2.48555,	3.19709,
-	4.03129,	5.00127,	6.12184,	7.40989,	8.88482,	10.5690,	12.4888,	14.6748,	17.1638,	20.0000};
+ .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555, 3.19709,
+ 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638, 20.0000};
   static const G4double ID[nX]={0,
-	.020062,	.084127,	.198702,	.370384,	.606100,	.913288,	1.30006,	1.77535,	2.34912,	3.03253,
-	3.83822,	4.78063,	5.87634,	7.14459,	8.60791,	10.2929,	12.2315,	14.4621,	17.0320,	20.0000};
+ .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912, 3.03253,
+ 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320, 20.0000};
   static const G4double IE[nX]={0,
-	.018547,	.078104,	.185102,	.346090,	.567998,	.858331,	1.22535,	1.67824,	2.22735,	2.88443,
-	3.66294,	4.57845,	5.64911,	6.89637,	8.34578,	10.0282,	11.9812,	14.2519,	16.8993,	20.0000};
+ .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735, 2.88443,
+ 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993, 20.0000};
   static const G4double IF[nX]={0,
-	.017143,	.072466,	.172271,	.323007,	.531545,	.805393,	1.15288,	1.58338,	2.10754,	2.73758,
-	3.48769,	4.37450,	5.41770,	6.64092,	8.07288,	9.74894,	11.7135,	14.0232,	16.7522,	20.0000};
+ .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754, 2.73758,
+ 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522, 20.0000};
   static const G4double IG[nX]={0,
-	.015618,	.066285,	.158094,	.297316,	.490692,	.745653,	1.07053,	1.47479,	1.96931,	2.56677,
-	3.28205,	4.13289,	5.14068,	6.33158,	7.73808,	9.40133,	11.3745,	13.7279,	16.5577,	20.0000};
+ .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931, 2.56677,
+ 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577, 20.0000};
   static const G4double IH[nX]={0,
-	.013702,	.058434,	.139923,	.264115,	.437466,	.667179,	.961433,	1.32965,	1.78283,	2.33399,
-	2.99871,	3.79596,	4.74916,	5.88771,	7.24937,	8.88367,	10.8576,	13.2646,	16.2417,	20.0000};
+ .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283, 2.33399,
+ 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417, 20.0000};
   static const G4double II[nX]={0,
-	.011264,	.048311,	.116235,	.220381,	.366634,	.561656,	.813132,	1.13008,	1.52322,	2.00554,
-	2.59296,	3.30542,	4.16834,	5.21490,	6.48964,	8.05434,	9.99835,	12.4580,	15.6567,	20.0000};
+ .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322, 2.00554,
+ 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567, 20.0000};
   static const G4double IJ[nX]={0,
-	.008628,	.037206,	.089928,	.171242,	.286114,	.440251,	.640343,	.894382,	1.21208,	1.60544,
-	2.08962,	2.68414,	3.41486,	4.31700,	5.44048,	6.85936,	8.69067,	11.1358,	14.5885,	20.0000};
+ .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208, 1.60544,
+ 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885, 20.0000};
   static const G4double* Il[nE]=
                              {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ};
   static const G4double lE[nE]={
--1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215,	.459141,	.867068,	1.27499,	1.68292,
- 2.09085,	2.49877,	2.90670,	3.31463,	3.72255,	4.13048,	4.53840,	4.94633,	5.35426,	5.76218};
+-1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292,
+ 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218};
   static const G4double lEmi=lE[0];
   static const G4double lEma=lE[nE-1];
   static const G4double dlE=(lEma-lEmi)/bE;
-	 //***************************************************************************************
+  //***************************************************************************************
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double lEn=std::log(Enu);         // log(E) for interpolation
@@ -766,4 +766,4 @@
 }
 
-// This class can provide only virtual exchange pi+ (a substitute for W+ boson)
+// This class can provide only virtual exchange pi- (a substitute for W- boson)
 G4int G4QANuMuNuclearCrossSection::GetExchangePDGCode() {return -211;}
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QAtomicElectronScattering.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QAtomicElectronScattering.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QAtomicElectronScattering.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QAtomicElectronScattering.cc,v 1.4 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QAtomicElectronScattering.cc,v 1.5 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QAtomicElectronScattering class -----------------
@@ -34,5 +34,16 @@
 // ********** This CLASS is temporary moved from the photolepton_hadron directory *********
 // ****************************************************************************************
-
+// Short description: CHIPS is re3sponsible for photo- and lepto-nuclear
+// reactions. In particular for thr electron-nuclear reactions. At High
+// Energies the nucleons (including neutrons) and nuclear fragments can
+// interact with atomic electrons (reversed electro-nuclear reaction -
+// antilab), while they are missing the nucler-nuclear (ion-ion) reac-
+// tions. This nucleo-electron process comes "for-free" in CHIPS, as the
+// cross-sections of the interaction is known from the electro-nuclear
+// reactions. The only problem is to move the output from the antilab to
+// lab system. This is what this process is aiming to do. It can be used
+// for the ion transport in Geant4.
+// ---------------------------------------------------------------------
+   
 //#define debug
 //#define pdebug
@@ -74,8 +85,10 @@
 
 // Fill the private parameters
-void G4QAtomicElectronScattering::SetParameters(G4double temper, G4double ssin2g, G4double etaetap,
-                                     G4double fN, G4double fD, G4double cP, G4double mR,
-                                     G4int nParCW, G4double solAn, G4bool efFlag,
-                                     G4double piThresh, G4double mpisq, G4double dinum)
+void G4QAtomicElectronScattering::SetParameters(G4double temper, G4double ssin2g,
+                                                G4double etaetap, G4double fN, G4double fD,
+                                                G4double cP, G4double mR, G4int nParCW,
+                                                G4double solAn, G4bool efFlag,
+                                                G4double piThresh, G4double mpisq,
+                                                G4double dinum)
 {//  =============================================================================
   Temperature=temper;
@@ -263,5 +276,5 @@
 #ifdef debug
   G4int prPDG=particle->GetPDGEncoding();
-		G4cout<<"G4QAtomElScat::PostStepRestDoIt: projPDG="<<projPDG<<",stPDG="<<prPDG<<G4endl;
+  G4cout<<"G4QAtomElScat::PostStepRestDoIt: projPDG="<<projPDG<<",stPDG="<<prPDG<<G4endl;
 #endif
   if(!projPDG)
@@ -274,5 +287,5 @@
   for(i=0; i<nE; ++i)
   {
-	   G4double frac=material->GetFractionVector()[i];
+    G4double frac=material->GetFractionVector()[i];
     sum+=frac;
     sumfra.push_back(sum);             // remember the summation steps
@@ -299,5 +312,5 @@
     G4int curInd=G4QIsotope::Get()->GetLastIndex(Z);
     if(!curInd)                       // The new artificial element must be defined 
-				{
+    {
       std::vector<std::pair<G4int,G4double>*>* newAbund =
                                                new std::vector<std::pair<G4int,G4double>*>;
@@ -307,12 +320,12 @@
         N=pElement->GetIsotope(j)->GetN()-Z;
         if(pElement->GetIsotope(j)->GetZ()!=Z) G4cerr<<"*G4QCaptureAtRest::AtRestDoIt: Z="
-																																							 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
+                                        <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
         G4double abund=abuVector[j];
-								std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+        std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
         G4cout<<"G4QAtomElScat::PostStepDoIt:pair#="<<j<<", N="<<N<<",ab="<<abund<<G4endl;
 #endif
         newAbund->push_back(pr);
-						}
+      }
 #ifdef debug
       G4cout<<"G4QAtomElectScat::PostStepDoIt:pairVectorLength="<<newAbund->size()<<G4endl;
@@ -333,5 +346,5 @@
   if(dsr<dd)dsr=dd;
   if(manualFlag) G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio); // ManualP
-		else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars
+  else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars
   else if(projPDG==-211)  G4QNucleus::SetParameters(.67-dsr,.32-dsr,5.,9.);//Pi- ClustPars
 #ifdef debug
@@ -343,6 +356,6 @@
     return 0;
   }
-		if(projPDG==11||projPDG==-11||projPDG==13||projPDG==-13||projPDG==15||projPDG==-15)
-		{ // Lepto-nuclear case with the equivalent photon algorithm. @@InFuture + neutrino & QE
+  if(projPDG==11||projPDG==-11||projPDG==13||projPDG==-13||projPDG==15||projPDG==-15)
+  { // Lepto-nuclear case with the equivalent photon algorithm. @@InFuture + neutrino & QE
     G4double kinEnergy= projHadron->GetKineticEnergy();
     G4ParticleMomentum dir = projHadron->GetMomentumDirection();
@@ -443,32 +456,32 @@
   G4cout<<"G4QAtomElScat::PostStepDoIt: projPDG="<<projPDG<<", targPDG="<<targPDG<<G4endl;
 #endif
-  G4QHadron* pH = new G4QHadron(projPDG,proj4M);                // ---> DELETED -->--   -+
+  G4QHadron* pH = new G4QHadron(projPDG,proj4M);                // ---> DELETED -->------*
   if(momentum<1000.) // Condition for using G4QEnvironment (not G4QuasmonString)         |
-		{ //                                                                                   |
+  { //                                                                                   |
     G4QHadronVector projHV;                                 //                           |
-    projHV.push_back(pH);                                   // DESTROYED over 2 lines -+ |
-    G4QEnvironment* pan= new G4QEnvironment(projHV,targPDG);// ---> DELETED --->-----+ | |
-    std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); // <---<------<----+-+-+
-    projHV.clear(); // <------------<---------------<-------------------<------------+-+ .
+    projHV.push_back(pH);                                   // DESTROYED over 2 lines -* |
+    G4QEnvironment* pan= new G4QEnvironment(projHV,targPDG);// ---> DELETED --->-----* | |
+    std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); // <---<------<----+-+-*
+    projHV.clear(); // <------------<---------------<-------------------<------------+-* .
 #ifdef debug
     G4cout<<"G4QAtomElectScat::PostStepDoIt: pPDG="<<projPDG<<", mp="<<mp<<G4endl;// |   .
 #endif
-    try                                                           //                 |   .
-	   {                                                             //                 |   .
-	     delete output;                                              //                 |   .
+    try                                                           //                 |   ^
+    {                                                             //                 |   .
+      delete output;                                              //                 |   ^
       output = pan->Fragment();// DESTROYED in the end of the LOOP work space        |   .
-    }                                                             //                 |   .
+    }                                                             //                 |   ^
     catch (G4QException& error)//                                                    |   .
-	   {                                                             //                 |   .
-	     //#ifdef pdebug
+    {                                                             //                 |   ^
+      //#ifdef pdebug
       G4cerr<<"**G4QAtomElectScat::PostStepDoIt:G4QE Exception is catched"<<G4endl;//|   .
-	     //#endif
+      //#endif
       G4Exception("G4QAtomElScat::PostStepDoIt:","27",FatalException,"CHIPScrash");//|   .
-    }                                                             //                 |   .
-    delete pan;                              // Delete the Nuclear Environment <--<--+   .
-  } //                                                                                   .
+    }                                                             //                 |   ^
+    delete pan;                              // Delete the Nuclear Environment <--<--*   .
+  } //                                                                                   ^
   else               // Use G4QuasmonString                                              .
-		{ //                                                                                   ^
-    G4QuasmonString* pan= new G4QuasmonString(pH,false,targPDG,false);//-> DELETED --+   |
+  { //                                                                                   ^
+    G4QuasmonString* pan= new G4QuasmonString(pH,false,targPDG,false);//-> DELETED --*   .
     delete pH;                                                    // --------<-------+---+
 #ifdef debug
@@ -478,13 +491,13 @@
     //G4int tNH=0;                    // Prototype of the number of secondaries inOut|
     try                                                           //                 |
-	   {                                                             //                 |
-				  delete output;                                            //                   |
+    {                                                             //                 |
+      delete output;                                              //                 |
       output = pan->Fragment();// DESTROYED in the end of the LOOP work space        |
       // @@@@@@@@@@@@@@ Temporary for the testing purposes --- Begin                 |
       //tNH=pan->GetNOfHadrons();     // For the test purposes of the String         |
       //if(tNH==2)                    // At least 2 hadrons are in the Constr.Output |
-				  //{//                                                                          |
+      //{//                                                                          |
       //  elF=true;                   // Just put a flag for the ellastic Scattering |
-	     //  delete output;              // Delete a prototype of dummy G4QHadronVector |
+      //  delete output;              // Delete a prototype of dummy G4QHadronVector |
       //  output = pan->GetHadrons(); // DESTROYED in the end of the LOOP work space |
       //}//                                                                          |
@@ -496,11 +509,11 @@
     }                                                             //                 |
     catch (G4QException& error)//                                                    |
-	   {                                                             //                 |
-	     //#ifdef pdebug
+    {                                                             //                 |
+      //#ifdef pdebug
       G4cerr<<"**G4QAtomElectScat::PostStepDoIt: GEN Exception is catched"<<G4endl;//|
-	     //#endif
+      //#endif
       G4Exception("G4QAtomElSct::AtRestDoIt:","27",FatalException,"QString Excep");//|
     }                                                             //                 |
-    delete pan;                              // Delete the Nuclear Environment ---<--+
+    delete pan;                              // Delete the Nuclear Environment ---<--*
   }
   aParticleChange.Initialize(track);
@@ -534,5 +547,5 @@
     {
 #ifdef debug
-	     G4cout<<"G4QAtomElScat::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;
+      G4cout<<"G4QAtomElScat::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;
 #endif
       delete hadr;
@@ -547,5 +560,5 @@
     {
       if(G4UniformRand()>.5) theDefinition = G4KaonZeroLong::KaonZeroLong();   // K_L
-						else                   theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S
+      else                   theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S
     }
     else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus();
@@ -554,10 +567,10 @@
     else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero();
     else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus();
-	   else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
+    else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
     {
       G4int aZ = hadr->GetCharge();
       G4int aA = hadr->GetBaryonNumber();
 #ifdef pdebug
-						G4cout<<"G4QAtomicElectronScattering::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
+      G4cout<<"G4QAtomicElectronScattering::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
 #endif
       theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ);
@@ -567,9 +580,9 @@
     {
 #ifdef pdebug
-						G4cout<<"G4QAtomElectScat::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;
+      G4cout<<"G4QAtomElectScat::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;
 #endif
       theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode);
 #ifdef pdebug
-						G4cout<<"G4QAtomElScat::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
+      G4cout<<"G4QAtomElScat::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
 #endif
     }
@@ -593,5 +606,5 @@
 #endif
     theSec->Set4Momentum(h4M); //                                                         ^
-    delete hadr; // <-----<-----------<-------------<---------------------<---------<-----+
+    delete hadr; // <-----<-----------<-------------<---------------------<---------<-----*
 #ifdef debug
     G4ThreeVector curD=theSec->GetMomentumDirection();              //                    ^
@@ -607,5 +620,5 @@
 #endif
   } //                                                                                    |
-  delete output; // instances of the G4QHadrons from the output are already deleted above +
+  delete output; // instances of the G4QHadrons from the output are already deleted above *
   aParticleChange.ProposeTrackStatus(fStopAndKill);        // Kill the absorbed particle
   //return &aParticleChange;                               // This is not enough (ClearILL)
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCaptureAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCaptureAtRest.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCaptureAtRest.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QCaptureAtRest.cc,v 1.18 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCaptureAtRest.cc,v 1.20 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCaptureAtRest class -----------------
@@ -35,4 +35,12 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short Description: This is a universal process for nuclear capture
+// (including annihilation) of all negative particles (negative hadrons,
+// negative leptons: mu- & tau-). It can be used for the cold neutron
+// capture, but somebody should decide what is the probability (defined
+// by the capture cross-section and atomic material properties) to switch
+// the cold neutron to the at-rest neutron. - M.K.2009.
+// ----------------------------------------------------------------------
+
 
 //#define debug
@@ -105,5 +113,8 @@
 
 G4QCaptureAtRest::~G4QCaptureAtRest()
-{}
+{
+  // deregister in the store
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
+}
 
 G4LorentzVector G4QCaptureAtRest::GetEnegryMomentumConservation()
@@ -170,5 +181,5 @@
   static G4bool CWinit = true;                       // CHIPS Warld needs to be initted
   if(CWinit)
-		{
+  {
     CWinit=false;
     G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
@@ -219,5 +230,5 @@
   for(i=0; i<nE; ++i)
   {
-   	G4double frac=material->GetFractionVector()[i];
+    G4double frac=material->GetFractionVector()[i];
     if(projPDG==13||projPDG==15)
     {
@@ -258,5 +269,5 @@
 #endif
     if(!Isotopes->IsDefined(Z,indEl))      // This index is not defined for this Z: define
-				{
+    {
       std::vector<std::pair<G4int,G4double>*>* newAbund =
                                                new std::vector<std::pair<G4int,G4double>*>;
@@ -266,12 +277,12 @@
         N=pElement->GetIsotope(j)->GetN()-Z;
         if(pElement->GetIsotope(j)->GetZ()!=Z) G4cerr<<"*G4QCaptureAtRest::AtRestDoIt: Z="
-																																							 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
+                                        <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
         G4double abund=abuVector[j];
-								std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+        std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
         G4cout<<"G4QCaptureAtRest::AtRestDoIt:pair#="<<j<<", N="<<N<<",ab="<<abund<<G4endl;
 #endif
         newAbund->push_back(pr);
-						}
+      }
 #ifdef debug
       G4cout<<"G4QCaptureAtRest::AtRestDoIt: pairVectorLength="<<newAbund->size()<<G4endl;
@@ -292,5 +303,5 @@
   if(dsr<dd)dsr=dd;
   if(manualFlag) G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio); // ManualP
-		else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars
+  else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars
   else if(projPDG==-211)  G4QNucleus::SetParameters(.67-dsr,.32-dsr,5.,9.);//Pi- ClustPars
 #ifdef debug
@@ -330,6 +341,6 @@
 #endif
   localtime += Time;
-	 std::vector<G4double>* cascE = new std::vector<G4double>;
-	 std::vector<G4Track*>* cascT = new std::vector<G4Track*>;
+  std::vector<G4double>* cascE = new std::vector<G4double>;
+  std::vector<G4Track*>* cascT = new std::vector<G4Track*>;
   G4bool neutronElastic = false;             // Flag of elastic neutro-nucleeus Scattering
   G4bool chargExElastic = false;             // Flag of charge exchange Quasi-Elastic Scat.
@@ -361,5 +372,5 @@
       if(eNeut<.0001) chargExElastic=true;    // neutron is too soft -> charge Exchange
       else
-						{
+      {
         G4double probP=std::sqrt(eProt*(dmProt+eProt));
         G4double probN=std::sqrt(eNeut*(dmNeut+eNeut));
@@ -368,5 +379,5 @@
       }
     }
-				else if(mAR<=mAN||(mAR<=mAP+mProt&&mAR<=mAA+mAlph)) // Impossible to radiate n or Alpha
+    else if(mAR<=mAN||(mAR<=mAP+mProt&&mAR<=mAA+mAlph)) // Impossible to radiate n or Alpha
     {
 #ifdef debug
@@ -383,5 +394,5 @@
   if(projPDG==15) nuPDG=16;
 #ifdef debug
-		G4int CV=0;
+  G4int CV=0;
   G4cout<<"G4QCaptureAtRest::AtRestDoIt:DecayIf is reached CV="<<CV<<G4endl;
 #endif
@@ -431,5 +442,5 @@
 #endif
   }
-		else if(projPDG==-211 && targPDG==90001000)// Use Panofsky Ratio for (p+pi-) system decay
+  else if(projPDG==-211 && targPDG==90001000)// Use Panofsky Ratio for (p+pi-) system decay
   {                                          // (p+pi-=>n+pi0)/p+pi-=>n+gamma) = 3/2
 #ifdef debug
@@ -440,5 +451,5 @@
     G4double pigamM=mPi0;
     if(G4UniformRand()>0.6)
-	   {
+    {
       pigamPDG=22;
       pigamM=0.;
@@ -463,5 +474,5 @@
     G4LorentzVector totLV(0.,0.,0.,mp+mt);   // 4-momentum of the (A+pi-) compound system
     if(Z==1 && N==1)                         // Quasi-Free process on Deuteron
-	   {
+    {
       G4LorentzVector f4Mom(0.,0.,0.,mNeut); // First neutron 
       G4LorentzVector s4Mom(0.,0.,0.,mNeut); // Second neutron
@@ -505,6 +516,6 @@
       G4int nsec=cascE->size();
       G4DynamicParticle* theSec = 0; // Prototype to fill particle in the G4ParticleChange
-	     for(G4int is=0; is<nsec; is++)
-	     {
+      for(G4int is=0; is<nsec; is++)
+      {
         G4double ener=cascE->operator[](is);
         if(ener>0) theSec = new G4DynamicParticle(G4Electron::Electron(),RndmDir(),ener);
@@ -517,5 +528,5 @@
       }
 #ifdef debug
-	     G4cout<<"G4QCaptureAtRest::AtRestDoIt: e+nu+nu decay 4M="<<totLV<<totLV.m()<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt: e+nu+nu decay 4M="<<totLV<<totLV.m()<<G4endl;
 #endif
       G4double mt=G4QPDGCode(targPDG).GetMass();// Mass of the target Nucleus
@@ -524,6 +535,6 @@
       G4double mmt=totLV.m();                   // Total energy of the compound system
       if(ee>=mbm*(mmt-mbm/2)/mmt)
-				  {
-  	     G4cout<<"-W-G4QCaptureAtRest::AtRestDoIt: Unrealistic E="<<ee<<", m="<<mMu<<G4endl;
+      {
+        G4cout<<"-W-G4QCaptureAtRest::AtRestDoIt: Unrealistic E="<<ee<<", m="<<mMu<<G4endl;
         G4LorentzVector f4Mom(0.,0.,0.,mEl);    // Electron
         G4LorentzVector s4Mom(0.,0.,0.,mt);     // Quark-A
@@ -551,5 +562,5 @@
 #ifdef debug
         G4double fe=f4Mom.e();
-	       G4cout<<"G4QCaptureAtRest::AtRestDoIt: Ei="<<ee<<",Ef="<<fe<<",de="<<fe-ee<<G4endl;
+        G4cout<<"G4QCaptureAtRest::AtRestDoIt: Ei="<<ee<<",Ef="<<fe<<",de="<<fe-ee<<G4endl;
 #endif
         G4QHadron* electron = new G4QHadron(11,f4Mom); // Create Electron
@@ -564,33 +575,33 @@
         }
 #ifdef debug
-	       G4cout<<"G4QCaptureAtRest::AtRestDoIt: (A+2nu) Decay is successful - 2"<<G4endl;
+        G4cout<<"G4QCaptureAtRest::AtRestDoIt: (A+2nu) Decay is successful - 2"<<G4endl;
 #endif
         G4QHadron* resnuc = new G4QHadron(targPDG,r4Mom); // Creation Hadron for ResidNucl
 #ifdef debug
-	       G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc 4M="<<mt<<r4Mom<<r4Mom.m()<<G4endl;
+        G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc 4M="<<mt<<r4Mom<<r4Mom.m()<<G4endl;
 #endif
         output->push_back(resnuc);               // Fill the Residual Nucleus to the output
 #ifdef debug
-	       G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc is filled nu="<<n4Mom<<nuPDG<<G4endl;
+        G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc is filled nu="<<n4Mom<<nuPDG<<G4endl;
 #endif
         G4QHadron* numu = new G4QHadron(nuPDG,n4Mom); // Create Hadron for LeptonicNeutrino
         output->push_back(numu);                      // Fill Muonic Neutrino to the output
 #ifdef debug
-	       G4cout<<"G4QCaptureAtRest::AtRestDoIt:Nu is filled,anu="<<a4Mom<<a4Mom.m()<<G4endl;
+        G4cout<<"G4QCaptureAtRest::AtRestDoIt:Nu is filled,anu="<<a4Mom<<a4Mom.m()<<G4endl;
 #endif
         G4QHadron* anue = new G4QHadron(-12,a4Mom); // Create Hadron for the AntiE Neutrino
         output->push_back(anue);                    // Fill the AntiENeutrino to the output
 #ifdef debug
-	       G4cout<<"G4QCaptureAtRest::AtRestDoIt: anu is filled == Success of Mu-cap"<<G4endl;
+        G4cout<<"G4QCaptureAtRest::AtRestDoIt: anu is filled == Success of Mu-cap"<<G4endl;
 #endif
       }
     }
     else                                            // @@Should be developed for tau-lepton
-				{
-						G4int deL=11;                                 // Prototype of decay lepton
+    {
+      G4int deL=11;                                 // Prototype of decay lepton
       G4int deN=-12;                                // Prototype of decay neutrino
       G4double mdl=mEl;                             // Prototype of the decay mass
       if(G4UniformRand()>.55)                       // Use mu decay instead of e-decay
-						{
+      {
         deL=13;
         deN=-14;
@@ -606,22 +617,22 @@
       }
 #ifdef debug
-	     G4cout<<"G4QCaptureAtRest::AtRestDoIt: Tau Decay is successful"<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt: Tau Decay is successful"<<G4endl;
 #endif
       G4QHadron* lept = new G4QHadron(deL,e4Mom);   // Creation Hadron for the Electron
 #ifdef debug
-	     G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton 4M="<<e4Mom<<e4Mom.m()<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton 4M="<<e4Mom<<e4Mom.m()<<G4endl;
 #endif
       output->push_back(lept);                      // Fill the Electron in the output
 #ifdef debug
-	     G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton is filled nu="<<n4Mom<<nuPDG<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton is filled nu="<<n4Mom<<nuPDG<<G4endl;
 #endif
       G4QHadron* nuta = new G4QHadron(nuPDG,n4Mom); // Create Hadron for LeptonicNeutrino
 #ifdef debug
-	     G4cout<<"G4QCaptureAtRest::AtRestDoIt: nu 4M="<<n4Mom<<n4Mom.m()<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt: nu 4M="<<n4Mom<<n4Mom.m()<<G4endl;
 #endif
       output->push_back(nuta);                      // Fill Muonic Neutrino to the output
       G4QHadron* anul = new G4QHadron(deN,a4Mom);   // Create Hadron for the AntiE Neutrino
 #ifdef debug
-  	   G4cout<<"G4QCaptureAtRest::AtRestDoIt: antiNu 4M="<<a4Mom<<a4Mom.m()<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt: antiNu 4M="<<a4Mom<<a4Mom.m()<<G4endl;
 #endif
       output->push_back(anul);                      // Fill the AntiENeutrino to the output
@@ -632,5 +643,5 @@
     G4LorentzVector totLV(0.,0.,0.,mp+mProt-EnergyDeposition);// 4-mom of theCompoundSystem
 #ifdef debug
-	   G4cout<<"G4QCaptureAtRest::AtRestDoIt:CapOnProton decay 4M="<<totLV<<totLV.m()<<G4endl;
+    G4cout<<"G4QCaptureAtRest::AtRestDoIt:CapOnProton decay 4M="<<totLV<<totLV.m()<<G4endl;
 #endif
     G4LorentzVector g4Mom(0.,0.,0.,0.);      // mass of the muon neutrino
@@ -650,5 +661,5 @@
     G4LorentzVector totLV(0.,0.,0.,mp+mDeut-EnergyDeposition);// 4-mom of theCompoundSystem
 #ifdef debug
-	   G4cout<<"G4QCaptureAtRest::AtRestDoIt: CapOnDeutr decay 4M="<<totLV<<totLV.m()<<G4endl;
+    G4cout<<"G4QCaptureAtRest::AtRestDoIt: CapOnDeutr decay 4M="<<totLV<<totLV.m()<<G4endl;
 #endif
     G4LorentzVector g4Mom(0.,0.,0.,0.);      // mass of the muon neutrino
@@ -673,5 +684,5 @@
     G4LorentzVector totLV(0.,0.,0.,mp+mt-EnergyDeposition);// 4-mom of the(A+mu-) compound
 #ifdef debug
-	   G4cout<<"G4QCaptureAtRest::AtRestDoIt: Quasi-Free decay 4M="<<totLV<<totLV.m()<<G4endl;
+    G4cout<<"G4QCaptureAtRest::AtRestDoIt: Quasi-Free decay 4M="<<totLV<<totLV.m()<<G4endl;
 #endif
     G4int rPDG=targPDG-1000;                  // Subtract one proton from the nucleus
@@ -693,10 +704,10 @@
   }
   else                                        // *** THIS works for all particles ! ***
-		//else if(1>2)// !! Immediately change back - Very temporary to avoid nuclear capture !!
+  //else if(1>2)// !! Immediately change back - Very temporary to avoid nuclear capture !!
   {
     G4QHadron* neutr = 0; // Create Neutrino
     if(projPDG==13||projPDG==15) mp-=EnergyDeposition;//TheEnergyDeposit is only for LepCap
 #ifdef debug
-	   G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS M="<<mp<<",dE="<<EnergyDeposition<<G4endl;
+    G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS M="<<mp<<",dE="<<EnergyDeposition<<G4endl;
 #endif
     G4LorentzVector projLV(0.,0.,0.,mp);
@@ -706,6 +717,6 @@
       G4int nsec=cascE->size();
       G4DynamicParticle* theSec = 0; // Prototype to fill particle in the G4ParticleChange
-	     for(G4int is=0; is<nsec; is++)
-	     {
+      for(G4int is=0; is<nsec; is++)
+      {
         G4double ener=cascE->operator[](is);
         if(ener>0) theSec = new G4DynamicParticle(G4Electron::Electron(),RndmDir(),ener);
@@ -737,5 +748,5 @@
         G4double qp=std::pow((std::pow(1.+ga*std::pow(hmm,b1),G4UniformRand())-1.)/ga,rb);
         G4double mqq=0.;
-						  if(qp<hmm) mqq=std::sqrt(mmu2-dmm*qp);
+        if(qp<hmm) mqq=std::sqrt(mmu2-dmm*qp);
         G4LorentzVector f4Mom(0.,0.,0.,0.);      // Muon neutrino 
         G4LorentzVector s4Mom(0.,0.,0.,mqq);     // Quark-Antiquark
@@ -767,18 +778,18 @@
 #endif
     try                                                           //                 |
-	   {                                                             //                 |
-	     delete output;                                              //                 |
+    {                                                             //                 |
+      delete output;                                              //                 |
       output = pan->Fragment();// DESTROYED in the end of the LOOP work space        |
     }                                                             //                 |
     catch (G4QException& error)//                                                    |
-	   {                                                             //                 |
-	     //#ifdef pdebug
+    {                                                             //                 |
+      //#ifdef pdebug
       G4cerr<<"***G4QCaptureAtRest::AtRestDoIt: Exception is catched"<<G4endl; //    |
-	     //#endif
+      //#endif
       G4Exception("G4QCaptureAtRest::AtRestDoIt:","27",FatalException,"Gen.CHIPS Except.");
     }                                                             //                 |
     delete pan;                              // Delete the Nuclear Environment <--<--+
 #ifdef debug
-	   G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS fragmentation is done, CV="<<CV<<G4endl;
+    G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS fragmentation is done, CV="<<CV<<G4endl;
 #endif
     // ----- Ericson mu to pi conversion ----- ????? -----
@@ -790,5 +801,5 @@
   G4int nsec=cascE->size();
   aParticleChange.SetNumberOfSecondaries(tNH+nsec); 
-	 for(G4int is=0; is<nsec; is++) aParticleChange.AddSecondary((*cascT)[is]);
+  for(G4int is=0; is<nsec; is++) aParticleChange.AddSecondary((*cascT)[is]);
   cascE->clear();
   delete cascE;
@@ -809,5 +820,5 @@
     {
 #ifdef debug
-	     G4cout<<"G4QCaptureAtRest::AtRestDoIt: Intermediate particle is found i="<<i<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt: Intermediate particle is found i="<<i<<G4endl;
 #endif
       delete hadr;
@@ -826,5 +837,5 @@
     {
       if(G4UniformRand()>.5) theDefinition = G4KaonZeroLong::KaonZeroLong();   // K_L
-						else                   theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S
+      else                   theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S
     }
     else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus();
@@ -833,10 +844,10 @@
     else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero();
     else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus();
-	   else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
+    else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
     {
       G4int aZ = hadr->GetCharge();
       G4int aA = hadr->GetBaryonNumber();
 #ifdef pdebug
-						G4cout<<"G4QCaptureAtRest::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
 #endif
       //if      (PDGCode==90001001) theDefinition = G4Deuteron::Deuteron();
@@ -850,9 +861,9 @@
     {
 #ifdef pdebug
-						G4cout<<"G4QCaptureAtRest::AtRestDoIt:Define particle with PDG="<<PDGCode<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt:Define particle with PDG="<<PDGCode<<G4endl;
 #endif
       theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode);
 #ifdef pdebug
-						G4cout<<"G4QCaptureAtRest::AtRestDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
+      G4cout<<"G4QCaptureAtRest::AtRestDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
 #endif
     }
@@ -925,5 +936,5 @@
   static const G4double rate[nAZ]={.00000045, .00000047, .00000215, .000000356, .00000468,
                                    .00000226, .00000610, .00002750, .000023500, .00003790,
-																																			.00003500, .00006600, .00006200, .000102500, .00009500,
+                                   .00003500, .00006600, .00006200, .000102500, .00009500,
                                    .00008800, .00022900};
 #ifdef debug
@@ -944,6 +955,6 @@
   else G4cout<<"--Warning--G4QCaptureAtRest::RandomizeMuDecayOrCapture: NEG Z="<<Z<<G4endl;
   mZ=Z; mN=N; mH=Huff; mR=pC;    // Remember the last calculated parameters
-  //G4double DLifeT=-std::log(G4UniformRand())/pD; // Time of the muon decay inside the atom
-  //G4double CLifeT=-std::log(G4UniformRand())/pC; // Time of the muon capture by nucleus
+  //G4double DLifeT=-std::log(G4UniformRand())/pD;// Time of the muon decay inside the atom
+  //G4double CLifeT=-std::log(G4UniformRand())/pC;// Time of the muon capture by nucleus
   //if(DLifeT<CLifeT)
   //{
@@ -958,15 +969,15 @@
   //  Time=CLifeT;
 #ifdef debug
-  //  G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: CaptureLifeTime="<<Time<<G4endl;
-#endif
-		//  return true;
+  //  G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture:CaptureLifeTime="<<Time<<G4endl;
+#endif
+  //  return true;
   //}
   if((pD+pC)*G4UniformRand()>pD) // CAPTURE @@ Cash pD+pC
-		{
+  {
      Time=-std::log(G4UniformRand())/pC;
      return true;
   }
   else
-		{
+  {
      Time=-std::log(G4UniformRand())/pD;
      return false;
@@ -1035,9 +1046,9 @@
     if((nAuger < Z) && ((pGamma + 10000.0) * G4UniformRand() < 10000.0) ) // 10000 (? M.K.)
     {
-   	  nAuger++;                       // Radiate one more Auger electron
+      nAuger++;                       // Radiate one more Auger electron
       DeltaE = EnergyLevel[nLevel-1] - EnergyLevel[nLevel];
       nLevel--;
 #ifdef debug
-	  G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: Auger_e E="<<DeltaE<<G4endl;
+   G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: Auger_e E="<<DeltaE<<G4endl;
 #endif
       dV->push_back(DeltaE);
@@ -1052,5 +1063,5 @@
       nLevel = iLevel;
 #ifdef debug
-	     G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: photon E="<<DeltaE<<G4endl;
+      G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: photon E="<<DeltaE<<G4endl;
 #endif
       dV->push_back(-DeltaE);
@@ -1072,5 +1083,5 @@
   G4double Z227=Z27*Z27;
   G4double Z427=Z227*Z227;
-  G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*std::sqrt((G4double)Z)); // EffNuclear Charge
+  G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*std::sqrt((G4double)Z));// EffNuclCharge
   G4double Ze2=Zeff*Zeff;      // Squared effective charge of the Nucleus
   G4double pD=3436.*(1.-Ze2*.00014658);     //@@ 1./MeanLifeTime of Tau in atoms (in ns^-1)
@@ -1225,5 +1236,5 @@
           49.5635,49.6993,49.8367,49.9760,50.1175,50.2617,50.4091,50.5605,50.7166,50.8785,
           51.0475,51.2256,51.4151,51.6195,51.8439,52.0962,52.3897,52.7496,53.2325,54.0205};
-		//Na23(Z=11)
+  //Na23(Z=11)
   static G4double P5[nE]={
           0.00000,7.00695,8.86633,10.1943,11.2667,12.1832,12.9928,13.7237,14.3938,15.0151,
@@ -1384,10 +1395,10 @@
   static const G4int mZ=mZ1-1;    // MaxPossibleZ
   static G4double* P[mZ1]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-																											0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-																											0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+                           0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                           0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
   //---------------------------------------------------------------------------------------
   if(z<1 || z>mZ)
-		{
-				G4cout<<"-W-G4QCapAtRest::RandomizeDecayElectron: <=0 or big(>"<<mZ<<") Z="<<z<<G4endl;
+  {
+    G4cout<<"-W-G4QCapAtRest::RandomizeDecayElectron: <=0 or big(>"<<mZ<<") Z="<<z<<G4endl;
     return 0.;
   }
@@ -1395,12 +1406,12 @@
   G4double* nP = 0;
   if(!P[z])          // The table for this element must be created
-		{
+  {
     for(G4int i=0; i<nZ; i++)
-				{
+    {
       G4double fZ=tZ[i];
       if(Z<=fZ)      // The extrapolation bin is found
-						{
-#ifdef debug
-		      G4cout<<"G4QCapAtRest::RandomizeDecayElectron: Z="<<Z<<", fZ="<<fZ<<G4endl;
+      {
+#ifdef debug
+        G4cout<<"G4QCapAtRest::RandomizeDecayElectron: Z="<<Z<<", fZ="<<fZ<<G4endl;
 #endif
         nP = new G4double[nE];
@@ -1408,7 +1419,7 @@
         if(Z==fZ) for(G4int j=0; j<nE; j++) nP[j]=fP[j];
         else
-								{
-										G4int i1=i-1;  // i>2, asthe first tabilated Z are 1,2,4,... and min_i=3
-										G4double  iZ=tZ[i1];
+        {
+          G4int i1=i-1;  // i>2, asthe first tabilated Z are 1,2,4,... and min_i=3
+          G4double  iZ=tZ[i1];
           G4double* iP=PP[i1];
           G4double rZ=(Z-iZ)/(fZ-iZ);
@@ -1416,5 +1427,5 @@
         }
 #ifdef debug
-				    for(G4int k=0; k<nE; k++)G4cout<<"G4QCAR::RandDecEle:P["<<k<<"]="<<nP[k]<<G4endl;
+        for(G4int k=0; k<nE; k++)G4cout<<"G4QCAR::RandDecEle:P["<<k<<"]="<<nP[k]<<G4endl;
 #endif
         P[z]=nP;
@@ -1432,7 +1443,7 @@
   G4double nPf=0.;
   if(iR<nEl) nPf=nP[iR+1];
-		else       nPf=nP[nEl]+(nP[nEl]-nP[nEb])/2; // An artificial tail
-#ifdef debug
-		G4cout<<"G4QCapAtR::RaDEl:R="<<R<<",Ei="<<nPi<<",E="<<MeV*(nPi+(R-iR)*(nPf-nPi))<<G4endl;
+  else       nPf=nP[nEl]+(nP[nEl]-nP[nEb])/2; // An artificial tail
+#ifdef debug
+  G4cout<<"G4QCapAtR::RaDEl:R="<<R<<",Ei="<<nPi<<",E="<<MeV*(nPi+(R-iR)*(nPf-nPi))<<G4endl;
 #endif
   return MeV*(nPi+(R-iR)*(nPf-nPi));
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCoherentChargeExchange.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCoherentChargeExchange.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCoherentChargeExchange.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QCoherentChargeExchange.cc,v 1.7 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCoherentChargeExchange.cc,v 1.8 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCoherentChargeExchange class -----------------
@@ -34,5 +34,23 @@
 // ********** This CLASS is temporary moved from the photolepton_hadron directory *********
 // ****************************************************************************************
-
+// Short description: This class resolves an ambiguity in the definition of the
+// "inelastic" cross section. As it was shown in Ph.D.Thesis (M.Kosov,ITEP,1979)
+// it is more reasonable to subdivide the total cross-section in the coherent &
+// incoherent parts, but the measuring method for the "inelastic" cross-sections
+// consideres the lack of the projectile within the narrow forward solid angle
+// with the consequent extrapolation of these partial cross-sections, corresponding
+// to the particular solid angle, to the zero solid angle. The low angle region
+// is shadowed by the elastic (coherent) scattering. BUT the coherent charge
+// exchange (e.g. conversion p->n) is included by this procedure as a constant term
+// in the extrapolation, so the "inelastic" cross-section differes from the
+// incoherent cross-section by the value of the coherent charge exchange cross
+// section. Fortunately, this cross-sectoion drops ruther fast with energy increasing.
+// All Geant4 inelastic hadronic models (including CHIPS) simulate the incoherent
+// reactions. So the incoherent (including quasielastic) cross-section must be used
+// instead of the inelastic cross-section. For that the "inelastic" cross-section
+// must be reduced by the value of the coherent charge-exchange cross-section, which
+// is estimated (it must be tuned!) in this CHIPS class. The angular distribution
+// is made (at present) identical to the corresponding coherent-elastic scattering 
+// -----------------------------------------------------------------------------------
 //#define debug
 //#define pdebug
@@ -146,10 +164,10 @@
                                          <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
           G4double abund=abuVector[j];
-								  std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+          std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
           G4cout<<"G4QCohChEx::GetMeanFreePath:pair#="<<j<<",N="<<N<<",ab="<<abund<<G4endl;
 #endif
           newAbund->push_back(pr);
-						  }
+        }
 #ifdef debug
         G4cout<<"G4QCohChEx::GetMeanFreePath: pairVectorLength="<<newAbund->size()<<G4endl;
@@ -178,5 +196,5 @@
       G4cout<<"G4QCCX::GMFP:true, P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl;
 #endif
-		    G4bool ccsf=true;
+      G4bool ccsf=true;
       if(Q==-27.) ccsf=false;
 #ifdef debug
@@ -251,5 +269,5 @@
   static G4bool CWinit = true;                       // CHIPS Warld needs to be initted
   if(CWinit)
-		{
+  {
     CWinit=false;
     G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
@@ -323,5 +341,5 @@
 #ifdef debug
   G4int prPDG=particle->GetPDGEncoding();
-		G4cout<<"G4QCohChrgExchange::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
+  G4cout<<"G4QCohChrgExchange::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
 #endif
   if(!projPDG)
@@ -340,8 +358,8 @@
   }
   G4double pM2=pM*pM;
-		// Element treatment
+  // Element treatment
   G4int EPIM=ElProbInMat.size();
 #ifdef debug
-		G4cout<<"G4QCohChEx::PostStDoIt:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
+  G4cout<<"G4QCohChEx::PostStDoIt:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
 #endif
   G4int i=0;
@@ -350,7 +368,7 @@
     G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand();
     for(i=0; i<nE; ++i)
-		  {
-#ifdef debug
-				  G4cout<<"G4QCohChEx::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
+    {
+#ifdef debug
+      G4cout<<"G4QCohChEx::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
 #endif
       if (rnd<ElProbInMat[i]) break;
@@ -361,5 +379,5 @@
   Z=static_cast<G4int>(pElement->GetZ());
 #ifdef debug
-				G4cout<<"G4QCoherentChargeExchange::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
+    G4cout<<"G4QCoherentChargeExchange::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
 #endif
   if(Z<=0)
@@ -372,5 +390,5 @@
   G4int nofIsot=SPI->size();               // #of isotopes in the element i
 #ifdef debug
-		G4cout<<"G4QCohChargeExchange::PosStDoIt:nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
+  G4cout<<"G4QCohChargeExchange::PosStDoIt:nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
 #endif
   G4int j=0;
@@ -381,5 +399,5 @@
     {
 #ifdef debug
-				  G4cout<<"G4QCohChargEx::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
+      G4cout<<"G4QCohChargEx::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
 #endif
       if(rndI < (*SPI)[j]) break;
@@ -389,5 +407,5 @@
   G4int N =(*IsN)[j]; ;                    // Randomized number of neutrons
 #ifdef debug
-		G4cout<<"G4QCohChargeEx::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;
+  G4cout<<"G4QCohChargeEx::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;
 #endif
   if(N<0)
@@ -505,5 +523,5 @@
   aParticleChange.ProposeTrackStatus(fStopAndKill);
   // Definition of the scattered nucleon
-		G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 
+  G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 
   G4ParticleDefinition* theDefinition=G4Proton::Proton();
   if(projPDG==2212) theDefinition=G4Neutron::Neutron();
@@ -516,8 +534,8 @@
   aParticleChange.AddSecondary( aNewTrack );
   // Filling the recoil nucleus
-		theSec = new G4DynamicParticle; // A secondary for the recoil hadron 
+  theSec = new G4DynamicParticle; // A secondary for the recoil hadron 
   G4int aA = Z+N;
 #ifdef pdebug
-		G4cout<<"G4QCoherentChargeExchange::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;
+  G4cout<<"G4QCoherentChargeExchange::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;
 #endif
   theDefinition=G4ParticleTable::GetParticleTable()->FindIon(Z,aA,0,Z);
@@ -577,5 +595,5 @@
   {
     if(oxs) res=CSmanager->GetHMaxT();   // Calculate the max_t value
-				else res=CSmanager->GetExchangeT(Z, N, pPDG); // fanctionally randomized -t in MeV^2
+    else res=CSmanager->GetExchangeT(Z, N, pPDG); // fanctionally randomized -t in MeV^2
   }
   else G4cout<<"*Warning*G4QCohChrgExchange::CalculateXSt: NotInitiatedScattering"<<G4endl;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCollision.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCollision.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCollision.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QCollision.cc,v 1.28 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QCollision.cc,v 1.32 2009/04/17 15:22:31 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QCollision class -----------------
@@ -34,7 +34,10 @@
 // ********** This CLASS is temporary moved from the photolepton_hadron directory *********
 // ****************************************************************************************
-
+// Short description: This is a universal class for the incoherent (inelastic)
+// nuclear interactions in the CHIPS model.
+// ---------------------------------------------------------------------------
 //#define debug
 //#define pdebug
+//#define ldebug
 //#define ppdebug
 //#define qedebug
@@ -250,5 +253,5 @@
     G4cout<<"G4QCollision::GetMeanFreePath: isovectorLength="<<isoSize<<G4endl; // Result
 #endif
-    if(isoSize)                             // The Element has non-trivial abumdance set
+    if(isoSize)                             // The Element has non-trivial abundance set
     {
       indEl=pElement->GetIndex()+1;         // Index of the non-trivial element
@@ -262,12 +265,12 @@
           G4int N=pElement->GetIsotope(j)->GetN()-Z; // N means A=N+Z !
           if(pElement->GetIsotope(j)->GetZ()!=Z)G4cerr<<"G4QCollision::GetMeanFreePath"
-																																	<<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
+                                 <<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
           G4double abund=abuVector[j];
-								  std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+          std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
           G4cout<<"G4QCollision::GetMeanFreePath: p#="<<j<<",N="<<N<<",ab="<<abund<<G4endl;
 #endif
           newAbund->push_back(pr);
-						  }
+        }
 #ifdef debug
         G4cout<<"G4QCollision::GetMeanFreePath: pairVectLength="<<newAbund->size()<<G4endl;
@@ -384,4 +387,5 @@
   static const G4double mPi0s= mPi0*mPi0;
   static const G4double mDeut= G4QPDGCode(2112).GetNuclMass(1,1,0);// Mass of deuteron
+  //static const G4double mDeut2=mDeut*mDeut;                      // SquaredMassOfDeuteron
   static const G4double mTrit= G4QPDGCode(2112).GetNuclMass(1,2,0);// Mass of tritium
   static const G4double mHel3= G4QPDGCode(2112).GetNuclMass(2,1,0);// Mass of Helium3
@@ -432,5 +436,5 @@
   static G4bool CWinit = true;              // CHIPS Warld needs to be initted
   if(CWinit)
-		{
+  {
     CWinit=false;
     G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
@@ -457,5 +461,5 @@
 #ifdef debug
   G4double mp=proj4M.m();
-  G4cout<<"G4QCollis::PostStepDoIt:called, P="<<Momentum<<"="<<momentum<<",m="<<mp<<G4endl;
+  G4cout<<"-->G4QCollis::PostStDoIt:called,P="<<Momentum<<"="<<momentum<<",m="<<mp<<G4endl;
 #endif
   if (!IsApplicable(*particle))  // Check applicability
@@ -507,5 +511,5 @@
 #ifdef debug
   G4int prPDG=particle->GetPDGEncoding();
-		G4cout<<"G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
+  G4cout<<"G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
 #endif
   if(!projPDG)
@@ -516,5 +520,5 @@
   G4int EPIM=ElProbInMat.size();
 #ifdef debug
-		G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
+  G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
 #endif
   G4int i=0;
@@ -523,7 +527,7 @@
     G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand();
     for(i=0; i<nE; ++i)
-		  {
-#ifdef debug
-				  G4cout<<"G4QCollision::PostStepDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
+    {
+#ifdef debug
+      G4cout<<"G4QCollision::PostStepDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
 #endif
       if (rnd<ElProbInMat[i]) break;
@@ -534,5 +538,5 @@
   Z=static_cast<G4int>(pElement->GetZ());
 #ifdef debug
-				G4cout<<"G4QCollision::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
+    G4cout<<"G4QCollision::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
 #endif
   if(Z<=0)
@@ -545,5 +549,5 @@
   G4int nofIsot=SPI->size();               // #of isotopes in the element i
 #ifdef debug
-		G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
+  G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
 #endif
   G4int j=0;
@@ -554,5 +558,5 @@
     {
 #ifdef debug
-				  G4cout<<"G4QCollision::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
+      G4cout<<"G4QCollision::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
 #endif
       if(rndI < (*SPI)[j]) break;
@@ -562,5 +566,5 @@
   G4int N =(*IsN)[j]; ;                    // Randomized number of neutrons
 #ifdef debug
-		G4cout<<"G4QCollision::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<G4endl;
+  G4cout<<"G4QCollision::PostStepDoIt: Z="<<Z<<", j="<<i<<", N(isotope)="<<N<<G4endl;
 #endif
   if(N<0)
@@ -576,5 +580,5 @@
   if(dsr<dd)dsr=dd;
   if(manualFlag) G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio); // ManualP
-		else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars
+  else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars
   else if(projPDG==-211)  G4QNucleus::SetParameters(.67-dsr,.32-dsr,5.,9.);//Pi- ClustPars
 #ifdef debug
@@ -607,6 +611,6 @@
   // Lepto-nuclear case with the equivalent photon algorithm. @@InFuture + NC (?)
   //
-  if (aProjPDG == 11 || aProjPDG == 13 || aProjPDG == 15) {
-
+  if (aProjPDG == 11 || aProjPDG == 13 || aProjPDG == 15)
+  {
 #ifdef debug
     G4cout<<"G4QCollision::PostStDoIt:startSt="<<aParticleChange.GetTrackStatus()<<G4endl;
@@ -646,5 +650,5 @@
     G4double photonEnergy = CSmanager->GetExchangeEnergy(); // Energy of EqivExchangePart
 #ifdef debug
-				G4cout<<"G4QCol::PStDoIt: kE="<<kinEnergy<<",dir="<<dir<<",phE="<<photonEnergy<<G4endl;
+    G4cout<<"G4QCol::PStDoIt: kE="<<kinEnergy<<",dir="<<dir<<",phE="<<photonEnergy<<G4endl;
 #endif
     if( kinEnergy < photonEnergy || photonEnergy < 0.)
@@ -708,5 +712,5 @@
     G4double cost=(iniE*finE-ml2-photonQ2/2)/iniP/finP; // cos(scat_ang_of_lepton)
 #ifdef pdebug
-		  G4cout<<"G4QC::PSDoIt:Q2="<<photonQ2<<",ct="<<cost<<",Pi="<<iniP<<",Pf="<<finP<<G4endl;
+    G4cout<<"G4QC::PSDoIt:Q2="<<photonQ2<<",ct="<<cost<<",Pi="<<iniP<<",Pf="<<finP<<G4endl;
 #endif
     if(cost>1.) cost=1.;                 // To avoid the accuracy of calculation problem
@@ -717,5 +721,5 @@
     G4double absEn = std::pow(am,third)*GeV;  // @@(b) Mean Energy Absorbed by a Nucleus
     //if(am>1 && absEn < photonEnergy)     // --> the absorption of energy can happen
-				if(absEn < photonEnergy)     // --> the absorption of energy can happen
+    if(absEn < photonEnergy)     // --> the absorption of energy can happen
     {
       G4double abtEn = absEn+hdM;        // @@(b) MeanEnergyAbsorbed by a nucleus (+M_N)
@@ -727,13 +731,13 @@
       absMom         = std::sqrt(abMo2); // Absorbed Momentum
       if(absMom < phMo)                  // --> the absorption of momentum can happen
-				  {
+      {
         G4double dEn = photonEnergy - absEn; // Leading energy
         G4double dMo = phMo - absMom;    // Leading momentum
         G4double sF  = dEn*dEn - dMo*dMo;// s of leading particle
 #ifdef ppdebug
-				    G4cout<<"-PhotoAbsorption-G4QCol::PStDoIt:sF="<<sF<<",phEn="<<photonEnergy<<G4endl;
+        G4cout<<"-PhotoAbsorption-G4QCol::PStDoIt:sF="<<sF<<",phEn="<<photonEnergy<<G4endl;
 #endif
         if(sF > stmPi)                   // --> Leading fragmentation is possible
-								{
+        {
           photonEnergy = absEn;          // New value of the photon energy
           photonQ2=abMo2-absEn*absEn;    // New value of the photon Q2
@@ -757,5 +761,5 @@
     aParticleChange.ProposeMomentumDirection(findir); // new direction for the lepton
 #ifdef pdebug
-		  G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()<<"="<<finE<<"-"
+    G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()<<"="<<finE<<"-"
           <<ml<<", d="<<*aParticleChange.GetMomentumDirection()<<","<<findir<<G4endl;
 #endif
@@ -765,5 +769,5 @@
       G4double ptm=photon3M.mag();                    // 3M of the virtual photon
 #ifdef ppdebug
-		    G4cout<<"-Absorption-G4QCollision::PostStepDoIt: ph3M="<<photon3M<<", eIn3M="
+      G4cout<<"-Absorption-G4QCollision::PostStepDoIt: ph3M="<<photon3M<<", eIn3M="
             <<iniP*dir<<", eFin3M="<<finP*findir<<", abs3M="<<absMom<<"<ptm="<<ptm<<G4endl;
 #endif
@@ -772,16 +776,16 @@
       proj4M=G4LorentzVector(lead3M,absEn); // 4-momentum of leading System
 #ifdef ppdebug
-		    G4cout<<"-->G4QC::PoStDoIt: new sF="<<proj4M.m2()<<", lead4M="<<proj4M<<G4endl;
+      G4cout<<"-->G4QC::PoStDoIt: new sF="<<proj4M.m2()<<", lead4M="<<proj4M<<G4endl;
 #endif
       lead4M=proj4M;                        // Remember 4-mom for the total 4-momentum
       G4Quasmon* pan= new G4Quasmon(G4QContent(1,1,0,1,1,0),proj4M);// ---> DELETED -->---+
       try                                                           //                    |
-	     {                                                             //                    |
-	       delete leadhs;                                              //                    |
+      {                                                             //                    |
+        delete leadhs;                                              //                    |
         G4QNucleus vac(90000000);                                   //                    |
         leadhs=pan->Fragment(vac,1);  // DELETED after it is copied to output vector      |
       }                                                             //                    |
       catch (G4QException& error)                                   //                    |
-	     {                                                             //                    |
+      {                                                             //                    |
         G4cerr<<"***G4QCollision::PostStepDoIt: G4Quasmon Exception is catched"<<G4endl;//|
         G4Exception("G4QCollision::PostStepDoIt:","72",FatalException,"QuasmonCrash");  //|
@@ -789,5 +793,5 @@
       delete pan;                              // Delete the Nuclear Environment <----<---+
 #ifdef ppdebug
-						G4cout<<"G4QCol::PStDoIt: l4M="<<proj4M<<proj4M.m2()<<", N="<<leadhs->size()<<",pt="
+      G4cout<<"G4QCol::PStDoIt: l4M="<<proj4M<<proj4M.m2()<<", N="<<leadhs->size()<<",pt="
             <<ptm<<",pa="<<absMom<<",El="<<absEn<<",Pl="<<ptm-absMom<<G4endl;
 #endif
@@ -796,5 +800,5 @@
     proj4M=G4LorentzVector(photon3M,photonEnergy);
 #ifdef debug
-		  G4cout<<"G4QCollision::PostStDoIt: St="<<aParticleChange.GetTrackStatus()<<", g4m="
+    G4cout<<"G4QCollision::PostStDoIt: St="<<aParticleChange.GetTrackStatus()<<", g4m="
           <<proj4M<<", lE="<<finE<<", lP="<<finP*findir<<", d="<<findir.mag2()<<G4endl;
 #endif
@@ -803,40 +807,41 @@
   // neutrinoNuclear interactions (nu_e, nu_mu only)
   //
-  } else if (aProjPDG == 12 || aProjPDG == 14) {
-
+  }
+  else if (aProjPDG == 12 || aProjPDG == 14)
+  {
     G4double kinEnergy= projHadron->GetKineticEnergy()/MeV; // Total energy of the neutrino
     G4double dKinE=kinEnergy+kinEnergy;  // doubled energy for s calculation
 #ifdef debug
-		  G4cout<<"G4QCollision::PostStDoIt: 2*nuEnergy="<<dKinE<<"(MeV), PDG="<<projPDG<<G4endl;
+    G4cout<<"G4QCollision::PostStDoIt: 2*nuEnergy="<<dKinE<<"(MeV), PDG="<<projPDG<<G4endl;
 #endif
     G4ParticleMomentum dir = projHadron->GetMomentumDirection(); // unit vector
     G4double ml  = mu;
-    G4double ml2 =	mu2;
-    //G4double mlN =	muN;
-    G4double mlN2=	muN2;
-    G4double fmlN=	fmuN;
-    G4double mlsN=	musN;
-    //G4double mlP =	muP;
-    G4double mlP2=	muP2;
-    G4double fmlP=	fmuP;
-    G4double mlsP=	musP;
-    G4double mldM=	mudM;
-    //G4double mlD =	muD;
-    G4double mlD2=	muD2;
+    G4double ml2 = mu2;
+    //G4double mlN = muN;
+    G4double mlN2= muN2;
+    G4double fmlN= fmuN;
+    G4double mlsN= musN;
+    //G4double mlP = muP;
+    G4double mlP2= muP2;
+    G4double fmlP= fmuP;
+    G4double mlsP= musP;
+    G4double mldM= mudM;
+    //G4double mlD = muD;
+    G4double mlD2= muD2;
     if(aProjPDG==12)
     {
       ml  = me;
-      ml2 =	me2;
-      //mlN =	meN;
-      mlN2=	meN2;
-      fmlN=	fmeN;
-      mlsN=	mesN;
-      //mlP =	meP;
-      mlP2=	meP2;
-      fmlP=	fmeP;
-      mlsP=	mesP;
-      mldM=	medM;
-      //mlD =	meD;
-      mlD2=	meD2;
+      ml2 = me2;
+      //mlN = meN;
+      mlN2= meN2;
+      fmlN= fmeN;
+      mlsN= mesN;
+      //mlP = meP;
+      mlP2= meP2;
+      fmlP= fmeP;
+      mlsP= mesP;
+      mldM= medM;
+      //mlD = meD;
+      mlD2= meD2;
     }
     G4VQCrossSection* CSmanager =G4QNuMuNuclearCrossSection::GetPointer(); // (nu,l)
@@ -881,5 +886,5 @@
     G4bool secnu=false;
     if(xSec*G4UniformRand()>xSec1)               // recover neutrino/antineutrino
-				{
+    {
       if(scatPDG>0) scatPDG++;
       else          scatPDG--;
@@ -900,5 +905,5 @@
       totCS1 = qelCS1;
       totCS2 = qelCS2;
-				}
+    }
     // make different definitions for neutrino and antineutrino
     G4double mIN=mProt;                          // Just a prototype (for anu, Z=1, N=0)
@@ -956,5 +961,5 @@
     {
       if(Z>1||N>0)                               // Calculate the splitted mass
-						{
+      {
         targPDG-=1000;                           // Anti-Neutrino -> subtract proton
         G4QPDGCode targQPDG(targPDG);
@@ -973,5 +978,5 @@
     G4double s=mIN*(mIN+dKinE);                  // s=(M_cm)^2=m2+2mE (m=targetMass,E=E_nu)
 #ifdef debug
-		  G4cout<<"G4QCollision::PostStDoIt: s="<<s<<" >? OT="<<OT<<", mlD2="<<mlD2<<G4endl;
+    G4cout<<"G4QCollision::PostStDoIt: s="<<s<<" >? OT="<<OT<<", mlD2="<<mlD2<<G4endl;
 #endif
     if(s<=OT)                                    // *** Do nothing solution ***
@@ -986,5 +991,5 @@
     }
 #ifdef debug
-  		G4cout<<"G4QCollision::PostStDoIt: Stop and kill the projectile neutrino"<<G4endl;
+    G4cout<<"G4QCollision::PostStDoIt: Stop and kill the projectile neutrino"<<G4endl;
 #endif
     aParticleChange.ProposeEnergy(0.);
@@ -998,5 +1003,5 @@
       else      Q2=CSmanager->GetQEL_ExchangeQ2();
 #ifdef debug
-  		  G4cout<<"G4QCollision::PostStDoIt:QuasiEl(nu="<<secnu<<"),s="<<s<<",Q2="<<Q2<<G4endl;
+      G4cout<<"G4QCollision::PostStDoIt:QuasiEl(nu="<<secnu<<"),s="<<s<<",Q2="<<Q2<<G4endl;
 #endif
       //G4double ds=s+s;                          // doubled s
@@ -1032,5 +1037,5 @@
       else      Q2=CSmanager2->GetNQE_ExchangeQ2();
 #ifdef debug
-  		  G4cout<<"G4QColl::PStDoIt: MultiPeriferal s="<<s<<",Q2="<<Q2<<",T="<<targPDG<<G4endl;
+      G4cout<<"G4QColl::PStDoIt: MultiPeriferal s="<<s<<",Q2="<<Q2<<",T="<<targPDG<<G4endl;
 #endif
       if(secnu) projPDG=CSmanager2->GetExchangePDGCode();// PDG Code of the effective gamma
@@ -1055,5 +1060,5 @@
       {
 #ifdef debug
-  		    G4cout<<"*G4QCollision::PostStDoIt: cost="<<cost<<", Q2="<<Q2<<", nu="<<we<<", mx="
+        G4cout<<"*G4QCollision::PostStDoIt: cost="<<cost<<", Q2="<<Q2<<", nu="<<we<<", mx="
               <<mx<<", pot="<<pot<<", 2KE="<<dKinE<<G4endl;
 #endif
@@ -1077,5 +1082,5 @@
       proj4M-=scat4M;                           // 4mom of the W/Z (effective pion/gamma)
 #ifdef debug
-  		  G4cout<<"G4QCollision::PostStDoIt: proj4M="<<proj4M<<", ml="<<ml<<G4endl;
+      G4cout<<"G4QCollision::PostStDoIt: proj4M="<<proj4M<<", ml="<<ml<<G4endl;
 #endif
       // Check that the en/mom transfer is possible, if not -> elastic
@@ -1162,38 +1167,57 @@
       }
     }
-
   //
-  // quasi-elastic for p+A(Z,N)
+  // quasi-elastic (& pickup process) for p+A(Z,N)
   //
-  } else if (aProjPDG == 2212 && Z > 0 && N > 0) {
-    //else if(2>3)
-
+  }
+  else if (aProjPDG == 2212 && Z > 0 && N > 0)
+  //else if(2>3) 
+  {
     G4QuasiFreeRatios* qfMan=G4QuasiFreeRatios::GetPointer();
     std::pair<G4double,G4double> fief=qfMan->GetRatios(momentum, aProjPDG, Z, N);
     G4double qepart=fief.first*fief.second;
-#ifdef qedebug
-    G4cout<<"G4QCol::PSD:QE[p("<<proj4M<<")+(Z="<<Z<<",N="<<N<<",)="<<qepart<<G4endl;
-#endif
-    if(G4UniformRand()<qepart) // Make a quasi free scattering (out:A-1,h,N) @@ KinLim
-    {
-      // First decay a nucleus in a nucleon and a residual (A-1) nucleus
-      G4double dmom=91.; // Fermi momentum (proto default for a deuteron)
-      if(Z>1||N>1) dmom=286.2*std::pow(-std::log(G4UniformRand()),third);// p_max=250 MeV/c
-
+    // Keep QE part for the quasi-free nucleons
+    const G4int lCl=3; // The last clProb[lCl]==1. by definition, MUST be increasing
+    G4double clProb[lCl]={.65,.85,.95};// N/P,D,t/He3,He4, integratedProb for .65,.2,.1,.05
+    if(qepart>0.45) qepart=.45; // Quasielastic part is too large - shrink
+    else qepart/=clProb[0];     // Add corresponding number of 2N, 3N, & 4N clusters
+    G4double pickup=1.-qepart;  // Estimate the rest of the cross-section
+    G4double thresh=100.;
+    if(momentum > thresh) pickup*=50./momentum/std::pow(Z+N,third); // 50. is a par(!)
+    // pickup = 0.;               // To exclude the pickup process
+    if (N) pickup+=qepart;
+    else   pickup =qepart;
+    G4double rnd=G4UniformRand();
+#ifdef ldebug
+    G4cout<<"-->G4QCol::PSD:QE[p("<<proj4M<<")+(Z="<<Z<<",N="<<N<<")]="<<qepart
+          <<", pickup="<<pickup<<G4endl;
+#endif
+    if(rnd<pickup) // Make a quasi free scattering (out:A-1,h,N) @@ KinLim,CoulBar,PauliBl
+    {
+     G4double dmom=91.;  // Fermi momentum (proto default for a deuteron)
+     G4double fmm=287.;  // @@ Can be A-dependent
+     if(Z>1||N>1) dmom=fmm*std::pow(-std::log(G4UniformRand()),third);
+     // Values to be redefined for quasi-elastic
+     G4LorentzVector r4M(0.,0.,0.,0.);      // Prototype of 4mom of the residual nucleus
+     G4LorentzVector n4M(0.,0.,0.,0.);      // Prototype of 4mom of the quasi-cluster
+     G4int nPDG=90000001;                   // Prototype for quasi-cluster mass calculation
+     G4int restPDG=targPDG;                 // Prototype should be reduced by quasi-cluster
+     G4int rA=Z+N-1;                        // Prototype for the residualNucl definition
+     G4int rZ=Z;                            // residZ: OK for the quasi-free neutron
+     G4int nA=1;                            // Prototype for the quasi-cluster definition
+     G4int nZ=0;                            // nA=1,nZ=0: OK for the quasi-free neutron
+     G4double qM=mNeut;                     // Free mass of the quasi-free cluster
+     G4int A = Z + N;                       // Baryon number of the nucleus
+     if(rnd<qepart)
+     {
+      // ===> First decay a nucleus in a nucleon and a residual (A-1) nucleus
       // Calculate cluster probabilities (n,p,d,t,he3,he4 now only, can use UpdateClusters)
-      const G4int lCl=3; // The last clProb[lCl]==1. by definition, MUST be increasing
-      G4double clProb[lCl]={0.6,0.7,0.8}; // N/P,D,t/He3,Alpha, integrated prob for .6,.1,.1,.2
       G4double base=1.;  // Base for randomization (can be reduced by totZ & totN)
-      G4int max=lCl;   // Number of boundaries (can be reduced by totZ & totN)
-
+      G4int max=lCl;     // Number of boundaries (can be reduced by totZ & totN)
       // Take into account that at least one nucleon must be left !
-      // Change max-- to --max - DHW 05/08
-      G4int A = Z + N;       // Baryon number of the nucleus
       if (Z<2 || N<2 || A<5) base = clProb[--max]; // Alpha cluster is impossible
       if ( (Z > 1 && N < 2) || (Z < 2 && N > 1) ) 
         base=(clProb[max]+clProb[max-1])/2; // t or He3 is impossible
-
-      if ( (Z < 2 && N < 2) || A < 4) base=clProb[--max]; // Both He3 and t clusters are impossible
-
+      if ( (Z < 2 && N < 2) || A < 4) base=clProb[--max];// He3 & t clusters are impossible
       if(A<3)           base=clProb[--max]; // Deuteron cluster is impossible
       G4int cln=0;                          // Cluster#0 (Default for the selected nucleon)
@@ -1207,14 +1231,4 @@
       G4ParticleDefinition* theDefinition;  // Prototype for qfNucleon
       G4bool cp1 = cln+2==A;                // A=ClusterBN+1 condition
-      // Values to be defined in the following IF/ELSE
-      G4LorentzVector r4M(0.,0.,0.,0.);     // Prototype of 4mom of the residual nucleus
-      G4LorentzVector n4M(0.,0.,0.,0.);     // Prototype of 4mom of the quasi-cluster
-      G4int nPDG=90000001;                  // Prototype for quasi-cluster mass calculation
-      G4int restPDG=targPDG;                // Prototype should be reduced by quasi-cluster
-      G4int rA=Z+N-1;                       // Prototype for the residualNucl definition
-      G4int rZ=Z;                           // residZ: OK for the quasi-free neutron
-      G4int nA=1;                           // Prototype for the quasi-cluster definition
-      G4int nZ=0;                           // nA=1,nZ=0: OK for the quasi-free neutron
-      G4double qM=mNeut;                    // Free mass of the quasi-free cluster
       if(!cln || cp1)                       // Split in nucleon + (A-1) with Fermi momentum
       {
@@ -1239,5 +1253,5 @@
         n4M=G4LorentzVector(0.,0.,0.,nM);         // 4mom of the quasi-nucleon
 #ifdef qedebug
-		      G4cout<<"G4QCollis::PStDoIt:QE,p="<<dmom<<",tM="<<tM<<",R="<<rM<<",N="<<nM<<G4endl;
+        G4cout<<"G4QCollis::PStDoIt:QE,p="<<dmom<<",tM="<<tM<<",R="<<rM<<",N="<<nM<<G4endl;
 #endif
         if(!G4QHadron(t4M).DecayIn2(r4M, n4M))
@@ -1247,5 +1261,5 @@
         }
 #ifdef qedebug
-		      G4cout<<"G4QCol::PStDoIt:QE-N,RA="<<r4M.rho()<<r4M<<",QN="<<n4M.rho()<<n4M<<G4endl;
+        G4cout<<"G4QCol::PStDoIt:QE-N,RA="<<r4M.rho()<<r4M<<",QN="<<n4M.rho()<<n4M<<G4endl;
 #endif
         if(cp1 && cln)                           // Quasi-cluster case: swap the output
@@ -1266,5 +1280,5 @@
         }
       }
-      else // Split a cluster (w or w/o "Fermi motion" and "Fermi decay")
+      else // Split the cluster (with or w/o "Fermi motion" and "Fermi decay")
       {
         if(cln==1)
@@ -1275,9 +1289,13 @@
           nZ=1;
           restPDG-=1001;
+          // Recalculate dmom
+          G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) +
+                      fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection();
+          dmom=sumv.mag();
         }
         else if(cln==2)
         {
           nA=3;
-										if(G4UniformRand()*(A-2)>(N-1)) // He3
+          if(G4UniformRand()*(A-2)>(N-1)) // He3
           {
             nPDG=90002001;
@@ -1293,4 +1311,9 @@
             restPDG-=1002;
           }
+          // Recalculate dmom
+          G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) +
+                        fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection()+
+                        fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection();
+          dmom=sumv.mag();
         }
         else
@@ -1301,4 +1324,9 @@
           nZ=2;
           restPDG-=2002;
+          G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) +
+                        fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection()+
+                        fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection()+
+                        fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection();
+          dmom=sumv.mag();
         }
         rA=A-nA;
@@ -1317,5 +1345,5 @@
         n4M=G4LorentzVector(0.,0.,0.,nM);         // 4mom of the quasi-nucleon
 #ifdef qedebug
-		      G4cout<<"G4QCollis::PStDoIt:QEC,p="<<dmom<<",T="<<tM<<",R="<<rM<<",N="<<nM<<G4endl;
+        G4cout<<"G4QCollis::PStDoIt:QEC,p="<<dmom<<",T="<<tM<<",R="<<rM<<",N="<<nM<<G4endl;
 #endif
         if(!G4QHadron(t4M).DecayIn2(r4M, n4M))
@@ -1326,9 +1354,9 @@
         // --- End of the moving cluster implementation ---
 #ifdef qedebug
-		      G4cout<<"G4QCol::PStDoIt:QEC,RN="<<r4M.rho()<<r4M<<",QCl="<<n4M.rho()<<n4M<<G4endl;
+        G4cout<<"G4QCol::PStDoIt:QEC,RN="<<r4M.rho()<<r4M<<",QCl="<<n4M.rho()<<n4M<<G4endl;
 #endif
       }
       G4LorentzVector s4M=n4M+proj4M;             // Tot 4-momentum for scattering
-      G4double prjM2 = proj4M.m2();
+      G4double prjM2 = proj4M.m2();               // Squared mass of the projectile
       G4double prjM = std::sqrt(prjM2);           // @@ Get from pPDG (?)
       G4double minM = prjM+qM;                    // Min mass sum for the final products
@@ -1337,14 +1365,15 @@
       {
 #ifdef qedebug
-		      G4cout<<"G4QCol::PStDoIt:***Enter***,cmM2="<<cmM2<<" > minM2="<<minM*minM<<G4endl;
+        G4cout<<"G4QCol::PStDoIt:***Enter***,cmM2="<<cmM2<<" > minM2="<<minM*minM<<G4endl;
 #endif
         // Estimate and randomize charge-exchange with quasi-free cluster
         G4bool chex=false;                        // Flag of the charge exchange scattering
         G4ParticleDefinition* projpt=G4Proton::Proton(); // Prototype, only for chex=true
+        // This is reserved for the charge-exchange scattering (to help neutron spectras)
         //if(cln&&!cp1 &&(projPDG==2212&&rA>rZ || projPDG==2112&&rZ>1))// @@ Use proj chex
-	       if(2>3)
+        if(2>3)
         {
 #ifdef qedebug
-		        G4cout<<"G4QCol::PStDoIt:-Enter,P="<<projPDG<<",cln="<<cln<<",cp1="<<cp1<<G4endl;
+          G4cout<<"G4QCol::PStDoIt:-Enter,P="<<projPDG<<",cln="<<cln<<",cp1="<<cp1<<G4endl;
 #endif
           G4double tprM=mProt;
@@ -1365,5 +1394,5 @@
           G4double chl=qfMan->ChExElCoef(efP*MeV, nZ, nA-nZ, projPDG); // ChEx/Elast(pPDG!)
 #ifdef qedebug
-		        G4cout<<"G4QCol::PStDoIt:chl="<<chl<<",P="<<efP<<",nZ="<<nZ<<",nA="<<nA<<G4endl;
+          G4cout<<"G4QCol::PStDoIt:chl="<<chl<<",P="<<efP<<",nZ="<<nZ<<",nA="<<nA<<G4endl;
 #endif
           if(chl>0.&&cmM2>minM*minM&&G4UniformRand()<chl/(1.+chl))     // minM is redefined
@@ -1381,5 +1410,5 @@
                                                                          projPDG, proj4M);
 #ifdef qedebug
-		      G4cout<<"G4QCollis::PStDoIt:QElS,proj="<<prjM<<sctout.second<<",qfCl="<<qM
+        G4cout<<"G4QCollis::PStDoIt:QElS,proj="<<prjM<<sctout.second<<",qfCl="<<qM
               <<sctout.first<<",chex="<<chex<<",nA="<<nA<<",nZ="<<nZ<<G4endl;
 #endif
@@ -1431,7 +1460,126 @@
       else G4cout<<"G4QCol::PSD: OUT, M2="<<s4M.m2()<<"<"<<minM*minM<<", N="<<nPDG<<G4endl;
 #endif
-    }
+     } // end of proton quasi-elastic (including QE on NF)
+     else // @@ make cost-condition @@ Pickup process (pickup 1 or 2 n and make d or t)
+     {
+       restPDG--;                // Res. nucleus PDG is one neutron less than targ. PDG
+       G4double mPUF=mDeut;      // Prototype of the mass of the created pickup fragment
+       G4ParticleDefinition* theDefinition = G4Deuteron::Deuteron();
+       //theDefinition = G4ParticleTable::GetParticleTable()->FindIon(nZ,nA,0,nZ);//ion
+       G4bool din=false;         // Flag of picking up 2 neutrons to create t (tritium)
+       //G4bool hin=false;         // Flag of picking up 1 n + 1 p to create He3 (NOT IMPL)
+       G4bool tin=false;         // Flag of picking up 2 n + 1 p to create alpha (He4)
+       G4double frn=G4UniformRand();
+       if(N>2 && frn > 0.95)      // .95 is a parameter to pickup 2n (cteate t or +1p=alph)
+       {
+         theDefinition = G4Triton::Triton();
+         restPDG--;              // Res. nucleus PDG is two neutrons less than target PDG
+         rA--;                   // Reduce the baryon number of the residual nucleus
+         mPUF=mTrit;             // The mass of the created pickup fragment (triton)
+         // Recalculate dmom
+         G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) +
+                       fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection();
+         dmom=sumv.mag();
+         din=true;
+         if(Z>1 && frn > 0.99)  // 0.99 is a parameter to pickup 2n + 1p and create alpha
+         {
+           theDefinition = G4Alpha::Alpha();
+           restPDG-=1000;        // Res. nucleus PDG is (2 n + 1 p) less than target PDG
+           rA--;                 // Reduce the baryon number of the residual nucleus
+           rZ--;                 // Reduce the charge of the residual nucleus
+           mPUF=mAlph;           // The mass of the created pickup fragment (triton)
+           // Recalculate dmom
+           sumv += fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection();
+           dmom=sumv.mag();
+           tin=true;
+         }
+       }
+       G4double mPUF2=mPUF*mPUF;
+       G4LorentzVector t4M(0.,0.,0.,tM);         // 4m of the target nucleus to be decayed
+       G4double rM=G4QPDGCode(restPDG).GetMass();// Mass of the residual nucleus
+       G4double rM2=rM*rM;                       // Squared mass of the residual nucleus
+       G4double nM2=rM2+tM*tM-(tM+tM)*std::sqrt(rM2+dmom*dmom);// M2 of boundQF-nucleon(2N)
+       if(nM2 < 0) nM2=0.;
+       G4double nM=std::sqrt(nM2);               // M of bQF-nucleon
+       G4double den2=(dmom*dmom+nM2);            // squared energy of bQF-nucleon
+       G4double den=std::sqrt(den2);             // energy of bQF-nucleon
+#ifdef qedebug
+       G4cout<<"G4QCollis::PStDoIt:PiU,p="<<dmom<<",tM="<<tM<<",R="<<rM<<",N="<<nM<<G4endl;
+#endif
+       G4double qp=momentum*dmom;
+       G4double srm=proj4M.e()*den;
+       G4double cost=(nM2+mProt2+srm+srm-mPUF2)/(qp+qp);
+       G4int ict=0;
+       while(std::fabs(cost)>1. && ict<3)
+       {
+         dmom=91.;  // Fermi momentum (proto default for a deuteron)
+         if(Z>1||N>1) dmom=fmm*std::pow(-std::log(G4UniformRand()),third);
+         if(din)          // Recalculate dmom for the final triton
+         {
+          G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) +
+                        fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection();
+          if(tin) sumv+=fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection();
+          dmom=sumv.mag();
+         }
+         nM2=rM2+tM*tM-(tM+tM)*std::sqrt(rM2+dmom*dmom); // M2 of bQF-nucleon
+         if(nM2 < 0) nM2=0.;
+         nM=std::sqrt(nM2);                      // M of bQF-nucleon
+         den2=(dmom*dmom+nM2);                   // squared energy of bQF-nucleon
+         den=std::sqrt(den2);                    // energy of bQF-nucleon
+         qp=momentum*dmom;
+         srm=proj4M.e()*den;
+         cost=(nM2+mProt2+srm+srm-mPUF2)/(qp+qp);
+         ict++;
+#ifdef ldebug
+         if(ict>2)G4cout<<"G4QCollis::PStDoIt:i="<<ict<<",d="<<dmom<<",ct="<<cost<<G4endl;
+#endif
+       }
+       if(std::fabs(cost)<=1.)
+       {// ---- @@ From here can be a MF for QF nucleon extraction (if used by others)
+        G4ThreeVector vdir = proj4M.vect();  // 3-Vector in the projectile direction
+        G4ThreeVector vx(0.,0.,1.);          // ProtoOrt in theDirection of the projectile
+        G4ThreeVector vy(0.,1.,0.);          // First ProtoOrt orthogonal to the direction
+        G4ThreeVector vz(1.,0.,0.);          // SecondProtoOrt orthoganal to the direction
+        if(vdir.mag2() > 0.)                 // the projectile isn't at rest
+        {
+          vx = vdir.unit();                  // Ort in the direction of the projectile
+          G4ThreeVector vv= vx.orthogonal(); // Not normed orthogonal vector (!)
+          vy = vv.unit();                    // First ort orthogonal to the proj direction
+          vz = vx.cross(vy);                 // Second ort orthoganal to the projDirection
+        }
+        // ---- @@ End of possible MF (Similar is in G4QEnvironment)
+        G4double tdom=dmom*std::sqrt(1-cost*cost);// Transversal component of the Fermi-Mom
+        G4double phi=twopi*G4UniformRand();  // Phi of the Fermi-Mom
+        G4ThreeVector vedm=vx*dmom*cost+vy*tdom*std::sin(phi)+vz*tdom*std::cos(phi);// bQFN
+        G4LorentzVector bqf(vedm,den);      // 4-mom of the bQF nucleon
+        r4M=t4M-bqf;                         // 4mom of the residual nucleus
+        if(std::fabs(r4M.m()-rM)>.001) G4cout<<"G4QCol::PSD:rM="<<rM<<"#"<<r4M.m()<<G4endl;
+        G4LorentzVector f4M=proj4M+bqf;      // Prototype of 4-mom of Deuteron
+        if(std::fabs(f4M.m()-mPUF)>.001)
+                              G4cout<<"G4QCol::PSD:mDeut="<<mPUF<<" # "<<f4M.m()<<G4endl;
+        aParticleChange.ProposeEnergy(0.);   // @@ ??
+        aParticleChange.ProposeTrackStatus(fStopAndKill);// projectile nucleon is killed
+        aParticleChange.SetNumberOfSecondaries(2); 
+        // Fill pickup hadron
+        G4DynamicParticle* theQFN = new G4DynamicParticle(theDefinition,f4M);
+        G4Track* scatQFN = new G4Track(theQFN, localtime, position ); //    pickup
+        scatQFN->SetWeight(weight);                                   //    weighted
+        scatQFN->SetTouchableHandle(trTouchable);                     //    nuclear
+        aParticleChange.AddSecondary(scatQFN);                        //    cluster
+        // ----------------------------------------------------
+        // Fill residual nucleus
+        if     (restPDG==90000001) theDefinition = G4Neutron::Neutron();
+        else if(restPDG==90001000) theDefinition = G4Proton::Proton();
+        else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(rZ,rA,0,rZ);//ion
+        G4DynamicParticle* theReN = new G4DynamicParticle(theDefinition,r4M);
+        G4Track* scatReN = new G4Track(theReN, localtime, position ); //    scattered
+        scatReN->SetWeight(weight);                                   //    weighted
+        scatReN->SetTouchableHandle(trTouchable);                     //    residual
+        aParticleChange.AddSecondary(scatReN);                        //    nucleus
+        return G4VDiscreteProcess::PostStepDoIt(track, step);
+	 }
+     }
+    } // end of decoupled processes for the proton projectile
   }  // end lepto-nuclear, neutrino-nuclear, proton quasi-elastic
-
   EnMomConservation=proj4M+G4LorentzVector(0.,0.,0.,tM);    // Total 4-mom of the reaction
   if(absMom) EnMomConservation+=lead4M;         // Add E/M of leading System
@@ -1444,8 +1592,8 @@
   //G4double eWei=1.;
   // @@@@@@@@@@@@@@ Temporary for the testing purposes --- End  
-#ifdef debug
-  G4cout<<"G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", targPDG="<<targPDG<<G4endl;
-#endif
-  G4QHadron* pH = new G4QHadron(projPDG,proj4M);                // ---> DELETED -->--  -+
+#ifdef ldebug
+  G4cout<<"^^G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", targPDG="<<targPDG<<G4endl;
+#endif
+  G4QHadron* pH = new G4QHadron(projPDG,proj4M);                // ---> DELETED -->----+*
   //if(momentum<1000.) // Condition for using G4QEnvironment (not G4QuasmonString)      |
   { //                                                                                  |
@@ -1465,7 +1613,7 @@
     catch (G4QException& error)//                                                   |   .
     {                                                             //                |   .
-	     //#ifdef pdebug
+      //#ifdef pdebug
       G4cerr<<"***G4QCollision::PostStepDoIt: G4QE Exception is catched"<<G4endl;// |   .
-	     //#endif
+      //#endif
       G4Exception("G4QCollision::PostStepDoIt:","27",FatalException,"CHIPSCrash");//|   .
     }                                                             //                |   .
@@ -1483,10 +1631,10 @@
   //  try                                                           //                 |
   //  {                                                             //                 |
-  //		  delete output;                                  //                   |
+  //    delete output;                                  //                   |
   //    output = pan->Fragment();// DESTROYED in the end of the LOOP work space        |
   //    // @@@@@@@@@@@@@@ Temporary for the testing purposes --- Begin                 |
   //    //tNH=pan->GetNOfHadrons();     // For the test purposes of the String         |
   //    //if(tNH==2)                    // At least 2 hadrons are in the Constr.Output |
-  //	//{//                                                                          |
+  // //{//                                                                          |
   //    //  elF=true;                   // Just put a flag for the ellastic Scattering |
   //    //  delete output;              // Delete a prototype of dummy G4QHadronVector |
@@ -1503,5 +1651,5 @@
   //    //#ifdef pdebug
   //    G4cerr<<"***G4QCollision::PostStepDoIt: GEN Exception is catched"<<G4endl; //  |
-	 //    //#endif
+  //    //#endif
   //    G4Exception("G4QCollision::PostStDoIt:","27",FatalException,"QString Excep");//|
   //  }                                                             //                 |
@@ -1524,6 +1672,4 @@
     delete leadhs;
   }
-
-
   // ------------- From here the secondaries are filled -------------------------
   G4int tNH = output->size();       // A#of hadrons in the output
@@ -1565,5 +1711,5 @@
     {
 #ifdef debug
-	     G4cout<<"G4QCollision::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;
+      G4cout<<"G4QCollision::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;
 #endif
       delete hadr;
@@ -1578,5 +1724,5 @@
     {
       if(G4UniformRand()>.5) theDefinition = G4KaonZeroLong::KaonZeroLong();   // K_L
-						else                   theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S
+      else                   theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S
     }
     else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus();
@@ -1585,10 +1731,10 @@
     else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero();
     else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus();
-	   else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
+    else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
     {
       G4int aZ = hadr->GetCharge();
       G4int aA = hadr->GetBaryonNumber();
 #ifdef pdebug
-						G4cout<<"G4QCollision::PostStepDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
+      G4cout<<"G4QCollision::PostStepDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
 #endif
       theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ);
@@ -1598,9 +1744,9 @@
     {
 #ifdef pdebug
-						G4cout<<"G4QCollision::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;
+      G4cout<<"G4QCollision::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;
 #endif
       theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode);
 #ifdef pdebug
-						G4cout<<"G4QCollision::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
+      G4cout<<"G4QCollision::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
 #endif
     }
@@ -1643,5 +1789,5 @@
   delete output; // instances of the G4QHadrons from the output are already deleted above +
 #ifdef debug
-		G4cout<<"G4QCollision::PostStDoIt: after St="<<aParticleChange.GetTrackStatus()<<G4endl;
+  G4cout<<"G4QCollision::PostStDoIt: after St="<<aParticleChange.GetTrackStatus()<<G4endl;
 #endif
   if(aProjPDG!=11 && aProjPDG!=13 && aProjPDG!=15)
@@ -1649,9 +1795,9 @@
   //return &aParticleChange;                               // This is not enough (ClearILL)
 #ifdef pdebug
-		  G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()
+    G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()
           <<", d="<<*aParticleChange.GetMomentumDirection()<<G4endl;
 #endif
-#ifdef debug
-		G4cout<<"G4QCollision::PostStepDoIt:*** PostStepDoIt is done ***, P="<<aProjPDG<<", St="
+#ifdef ldebug
+  G4cout<<"G4QCollision::PostStepDoIt:*** PostStepDoIt is done ***, P="<<aProjPDG<<", St="
         <<aParticleChange.GetTrackStatus()<<G4endl;
 #endif
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiffraction.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiffraction.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiffraction.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QDiffraction.cc,v 1.5 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDiffraction.cc,v 1.6 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QDiffraction class -----------------
@@ -31,7 +31,14 @@
 // G4QDiffraction class of the CHIPS Simulation Branch in GEANT4
 // ---------------------------------------------------------------
-// ****************************************************************************************
-// ********** This CLASS is temporary moved from the "chips/interface" directory *********
-// ****************************************************************************************
+// Short description: This is a process, which describes the diffraction
+// excitation of the projectile and the nucleus. On nuclei in addition there
+// can be a coherent diffraction process for the projectile, but it is
+// comparably small. The most important part of the diffraction is the
+// progectile diffraction excitation, as in this interaction proton can lose
+// only a small part of its energy and make the shower longer. This is because
+// only 1-2 (n) pions are produce in the diffraction escitation, and the mean
+// kept energy of the nucleon is (1-n/7)=80%. For kaons the kept energy is much
+// smaller (1-n/3.5)=60%, and for pions it is less important (about 40%).
+// ----------------------------------------------------------------------------
 
 //#define debug
@@ -144,10 +151,10 @@
                                          <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
           G4double abund=abuVector[j];
-								  std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+          std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
           G4cout<<"G4QDiffract::GetMeanFreePath:pair#"<<j<<",N="<<N<<",ab="<<abund<<G4endl;
 #endif
           newAbund->push_back(pr);
-						  }
+        }
 #ifdef debug
         G4cout<<"G4QDiffract::GetMeanFreePath:pairVectorLength="<<newAbund->size()<<G4endl;
@@ -176,5 +183,5 @@
       G4cout<<"G4QDiff::GMFP:true,P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl;
 #endif
-		    G4bool ccsf=true;
+      G4bool ccsf=true;
       if(Q==-27.) ccsf=false;
 #ifdef debug
@@ -250,5 +257,5 @@
   static G4bool CWinit = true;                       // CHIPS Warld needs to be initted
   if(CWinit)
-		{
+  {
     CWinit=false;
     G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
@@ -323,5 +330,5 @@
 #ifdef debug
   G4int prPDG=particle->GetPDGEncoding();
-		G4cout<<"G4QDiffraction::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
+  G4cout<<"G4QDiffraction::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
 #endif
   if(!projPDG)
@@ -339,8 +346,8 @@
     fPDG=2212;
   }
-		// Element treatment
+  // Element treatment
   G4int EPIM=ElProbInMat.size();
 #ifdef debug
-		G4cout<<"G4QDiffra::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
+  G4cout<<"G4QDiffra::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
 #endif
   G4int i=0;
@@ -349,7 +356,7 @@
     G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand();
     for(i=0; i<nE; ++i)
-		  {
-#ifdef debug
-				  G4cout<<"G4QDiffra::PostStepDoIt: EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
+    {
+#ifdef debug
+      G4cout<<"G4QDiffra::PostStepDoIt: EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
 #endif
       if (rnd<ElProbInMat[i]) break;
@@ -360,5 +367,5 @@
   Z=static_cast<G4int>(pElement->GetZ());
 #ifdef debug
-				G4cout<<"G4QDiffraction::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
+    G4cout<<"G4QDiffraction::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
 #endif
   if(Z<=0)
@@ -371,5 +378,5 @@
   G4int nofIsot=SPI->size();               // #of isotopes in the element i
 #ifdef debug
-		G4cout<<"G4QDiffraction::PostStepDoIt: nI="<<nofIsot<<", T="<<(*SPI)[nofIsot-1]<<G4endl;
+  G4cout<<"G4QDiffraction::PostStepDoIt: nI="<<nofIsot<<", T="<<(*SPI)[nofIsot-1]<<G4endl;
 #endif
   G4int j=0;
@@ -380,5 +387,5 @@
     {
 #ifdef debug
-				  G4cout<<"G4QDiffraction::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl;
+      G4cout<<"G4QDiffraction::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl;
 #endif
       if(rndI < (*SPI)[j]) break;
@@ -388,5 +395,5 @@
   G4int N =(*IsN)[j]; ;                    // Randomized number of neutrons
 #ifdef debug
-		G4cout<<"G4QDiffraction::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;
+  G4cout<<"G4QDiffraction::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;
 #endif
   if(N<0)
@@ -470,10 +477,10 @@
   G4QHadronVector* out=diffRatio->TargFragment(projPDG, proj4M, Z, N);
   G4int nSec=out->size();             // #of secondaries in the diffraction reaction
-		G4DynamicParticle* theSec=0;        // A prototype for secondary for the secondary
+  G4DynamicParticle* theSec=0;        // A prototype for secondary for the secondary
   G4LorentzVector dif4M(0.,0.,0.,0.); // Prototype for the secondary 4-momentum
   G4int difPDG=0;                     // PDG code of the secondary
   G4QHadron* difQH=0;                 // Prototype for a Q-secondary
 #ifdef pdebug
-		G4cout<<"G4QDiffraction::PostStepDoIt: =====found===== nSecondaries="<<nSec<<G4endl;
+  G4cout<<"G4QDiffraction::PostStepDoIt: =====found===== nSecondaries="<<nSec<<G4endl;
 #endif
   for(G4int i=0; i<nSec; i++)
@@ -522,10 +529,10 @@
       theDefinition = G4ParticleTable::GetParticleTable()->FindIon(Z,B,0,0);
 #ifdef pdebug
-		    G4cout<<"G4QDiffraction::PoStDoIt:Ion,Z="<<Z<<",A="<<B<<",D="<<theDefinition<<G4endl;
+      G4cout<<"G4QDiffraction::PoStDoIt:Ion,Z="<<Z<<",A="<<B<<",D="<<theDefinition<<G4endl;
 #endif
     }
     if(theDefinition)
     {
-    		theSec = new G4DynamicParticle;       // A secondary for the recoil hadron 
+      theSec = new G4DynamicParticle;       // A secondary for the recoil hadron 
       theSec->SetDefinition(theDefinition);
       dif4M  = difQH->Get4Momentum();
@@ -537,5 +544,5 @@
       aParticleChange.AddSecondary( aNewTrack );
 #ifdef pdebug
-		    G4cout<<"G4QDiffraction::PostStepDoIt: Filled 4M="<<dif4M<<", PDG="<<difPDG<<G4endl;
+      G4cout<<"G4QDiffraction::PostStepDoIt: Filled 4M="<<dif4M<<", PDG="<<difPDG<<G4endl;
 #endif
     }
@@ -568,5 +575,5 @@
   G4double s=diffRatio->GetTargSingDiffXS(p, PDG, Z, N);     // XS for target diffraction
 #ifdef debug
-		G4cout<<"G4QDiff::CXS:p="<<p<<",Z="<<Z<<",N="<<N<<",C="<<PDG<<",XS="<<s<<G4endl;
+  G4cout<<"G4QDiff::CXS:p="<<p<<",Z="<<Z<<",N="<<N<<",C="<<PDG<<",XS="<<s<<G4endl;
 #endif
   return s;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiffractionRatio.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiffractionRatio.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiffractionRatio.cc	(revision 1055)
@@ -25,13 +25,16 @@
 //
 //
-// $Id: G4QDiffractionRatio.cc,v 1.9 2008/03/21 21:40:08 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDiffractionRatio.cc,v 1.10 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
-// G4 Physics class: G4QDiffractionRatio for N+A elastic cross sections
+// G4 Physics class: G4QDiffractionRatio for N+A Diffraction Interactions
 // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-06
 // 
-//================================================================================
+//=======================================================================
+// Short description: Difraction excitation is a part of the incoherent
+// (inelastic) interaction. This part is calculated in the class.
+// --------------------------------------------------------------------
 
 //#define debug
@@ -114,5 +117,5 @@
   G4bool found=false;
   G4int i=-1;
-		if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB
+  if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB
   {
     found=true;                         // The A value is found
@@ -120,5 +123,5 @@
   }
   if(!nDB || !found)                    // Create new line in the AMDB
-	 {
+  {
     lastA = A;
     lastT = new G4double[mps];          // Create the linear Table
@@ -152,5 +155,5 @@
       {
         lastL[j]=CalcDiff2Prod_Ratio(sv,A);
-	       if(j!=lastK) sv*=edl;
+        if(j!=lastK) sv*=edl;
       }
     }
@@ -171,5 +174,5 @@
   }
   else                                  // The A value was found in AMDB
-	 {
+  {
     lastA=vA[i];
     lastH=vH[i];
@@ -199,5 +202,5 @@
       } // End of LinTab update
       if(lastN>=nextN)
-						{
+      {
         vH[i]=lastH;
         vN[i]=lastN;
@@ -205,5 +208,5 @@
       G4int nextK=lastK+1;
       if(s>sma && lastK<nls)             // LogTab must be updated
-						{
+      {
         G4double sv=std::exp(lastM+lsi); // Define starting poit (lastM will be changed)
         G4double ls=std::log(s);
@@ -217,10 +220,10 @@
         for(G4int j=nextK; j<=lastK; j++)// Calculate LogTab values
         {
-	         sv*=edl;
+          sv*=edl;
           lastL[j]=CalcDiff2Prod_Ratio(sv,A);
         }
       } // End of LogTab update
       if(lastK>=nextK)
-						{
+      {
         vM[i]=lastM;
         vK[i]=lastK;
@@ -230,5 +233,5 @@
   // Now one can use tabeles to calculate the value
   if(s<sma)                             // Use linear table
-		{
+  {
     G4int n=static_cast<int>(s/ds);     // Low edge number of the bin
     G4double d=s-n*ds;                  // Linear shift
@@ -236,6 +239,6 @@
     lastR=v+d*(lastT[n+1]-v)/ds;        // Result
   }
-		else                                  // Use log table
-		{
+  else                                  // Use log table
+  {
     G4double ls=std::log(s)-lsi;        // ln(s)-l_min
     G4int n=static_cast<int>(ls/dl);    // Low edge number of the bin
@@ -263,5 +266,5 @@
   if(s<=0. || A<=1) return 0.;
   if(A!=mA && A!=1)
-		{
+  {
     mA=A;
     G4double a=mA;
@@ -281,5 +284,5 @@
     G4double q=std::pow(a,0.7);
     p4=(.036/q+.0009*q)/(1.+6./a3+1.e-7*a3);
-				p5=1.3*std::pow(a,0.1168)/(1.+1.2e-8*a3);
+    p5=1.3*std::pow(a,0.1168)/(1.+1.2e-8*a3);
     p6=.00046*(a+11830./a2);
     p7=1./(1.+6.17/a2+.00406*a);
@@ -297,7 +300,7 @@
   G4double s2=s*s;
   G4double s4=s2*s2;
-		G4double dl=std::log(s)-p5;
+  G4double dl=std::log(s)-p5;
   R=1./(1.+1./(p1+p2/s4+p4*dl*dl/(1.+p6*std::pow(s,p7))));
-	 return R;
+  return R;
 } // End of CalcQF2IN_Ratio
 
@@ -350,5 +353,5 @@
   G4double mT=mNeut;                       // Prototype of mass of QF nucleon
   G4double mT2=mNeut2;                     // Squared mass of a free nucleon to be excited
-  G4double dmT=dmNeut;                     // Doubled mass														
+  G4double dmT=dmNeut;                     // Doubled mass              
   G4int Z=0;                               // Prototype of the isotope Z
   G4int N=1;                               // Prototype of the Isotope N
@@ -357,7 +360,7 @@
     mT=mProt;                              // Prototype of mass of QF nucleon to be excited
     mT2=mProt2;                            // Squared mass of the free nucleon
-    dmT=dmProt;                            // Doubled mass														
-    Z=1;							                            // Z of the isotope
-    N=0;							                            // N of the Isotope
+    dmT=dmProt;                            // Doubled mass              
+    Z=1;                                   // Z of the isotope
+    N=0;                                   // N of the Isotope
   }
   G4double mP2=pr4M.m2();                  // Squared mass of the projectile
@@ -396,5 +399,5 @@
   G4double ds=s-mP2-mDif2;               
   G4double e=ds/dmP;
-		G4double P=std::sqrt(e*e-mDif2);      // Momentum in pseudo laboratory system
+  G4double P=std::sqrt(e*e-mDif2);      // Momentum in pseudo laboratory system
   G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer();
 #ifdef debug
@@ -442,5 +445,5 @@
     else if(cost<-1.) cost=-1.;
     else
-				{
+    {
       G4cerr<<"G4QDiffRat::TargFragm: *NAN* cost="<<cost<<",t="<<t<<",tmax="<<maxt<<G4endl;
       return ResHV;                     // Do Nothing Action
@@ -457,5 +460,5 @@
   }
 #ifdef debug
-		G4cout<<"G4QDifRat::TargFragm:d4M="<<d4M<<"+r4M="<<r4M<<"="<<d4M+r4M<<"="<<tot4M<<G4endl;
+  G4cout<<"G4QDifRat::TargFragm:d4M="<<d4M<<"+r4M="<<r4M<<"="<<d4M+r4M<<"="<<tot4M<<G4endl;
 #endif
   // Now everything is ready for fragmentation and DoNothing projHadron must be wiped out
@@ -465,13 +468,13 @@
   ResHV->push_back(hadron);             // Fill the recoil nucleon
 #ifdef debug
-		G4cout<<"G4QDiffractionRatio::TargFragm: *Filled* LeadingNuc="<<r4M<<pPDG<<G4endl;
-#endif
-  G4QHadronVector* leadhs=new G4QHadronVector;// Quasmon Output G4QHadronVectorum --->---+
+  G4cout<<"G4QDiffractionRatio::TargFragm: *Filled* LeadingNuc="<<r4M<<pPDG<<G4endl;
+#endif
+  G4QHadronVector* leadhs=new G4QHadronVector;// Quasmon Output G4QHadronVectorum --->---*
   G4QContent dQC=G4QPDGCode(rPDG).GetQuarkContent(); // QuarkContent of quasiFreeNucleon | 
-  G4Quasmon* quasm = new G4Quasmon(dQC,d4M); // Quasmon=DiffractionExcitationQuasmon-+   |
+  G4Quasmon* quasm = new G4Quasmon(dQC,d4M); // Quasmon=DiffractionExcitationQuasmon-*   |
 #ifdef debug
-		G4cout<<"G4QDiffRatio::TgFrag:tPDG="<<tPDG<<",rPDG="<<rPDG<<",d4M="<<d4M<<G4endl;//|   |
-#endif
-  G4QEnvironment* pan= new G4QEnvironment(G4QNucleus(tPDG));// --> DELETED --->---+  |   |
+  G4cout<<"G4QDiffRatio::TgFrag:tPDG="<<tPDG<<",rPDG="<<rPDG<<",d4M="<<d4M<<G4endl;//|   |
+#endif
+  G4QEnvironment* pan= new G4QEnvironment(G4QNucleus(tPDG));// --> DELETED --->---*  |   |
   pan->AddQuasmon(quasm);                    // Add diffractiveQuasmon to Environ.|  |   |
 #ifdef debug
@@ -479,16 +482,16 @@
 #endif
   try                                                           //                |  |   |
-	 {                                                             //                |  |   |
-	   delete leadhs;                                              //                |  |   |
+  {                                                             //                |  |   |
+    delete leadhs;                                              //                |  |   |
     leadhs = pan->Fragment();// DESTROYED in the end of the LOOP work space       |  |   |
   }                                                             //                |  |   |
   catch (G4QException& error)//                                                   |  |   |
-	 {                                                             //                |  |   |
-	   //#ifdef pdebug
+  {                                                             //                |  |   |
+    //#ifdef pdebug
     G4cerr<<"***G4QCollision::PostStepDoIt: G4QE Exception is catched"<<G4endl;// |  |   |
-	   //#endif
+    //#endif
     G4Exception("G4QCollision::PostStepDoIt:","27",FatalException,"CHIPSCrash");//|  |   |
   }                                                             //                |  |   |
-  delete pan;                              // Delete the Nuclear Environment <-<--+--+   |
+  delete pan;                              // Delete the Nuclear Environment <-<--*--*   |
   G4int qNH=leadhs->size();                // A#of collected hadrons from diff.frag.     |
   if(qNH) for(G4int iq=0; iq<qNH; iq++)    // Loop over hadrons to fill the result       |
@@ -498,5 +501,5 @@
   }                                        //                                            |
   delete leadhs; // <----<----<----<----<----<----<----<----<----<----<----<----<----<---*
-		return ResHV; // Result
+  return ResHV; // Result
 } // End of TargFragment
 
@@ -588,5 +591,5 @@
   G4double ds=s-mT2-mDif2;
   G4double e=ds/dmT;
-		G4double P=std::sqrt(e*e-mDif2);          // Momentum in pseudo laboratory system
+  G4double P=std::sqrt(e*e-mDif2);          // Momentum in pseudo laboratory system
   G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer();
 #ifdef debug
@@ -632,5 +635,5 @@
     else if(cost<-1.) cost=-1.;
     else
-				{
+    {
       G4cerr<<"G4QDiffRat::ProjFragm: *NAN* cost="<<cost<<",t="<<t<<",tmax="<<maxt<<G4endl;
       return ResHV; // Do Nothing Action
@@ -647,5 +650,5 @@
   }
 #ifdef debug
-		G4cout<<"G4QDiffR::ProjFragm:d4M="<<d4M<<"+r4M="<<r4M<<"="<<d4M+r4M<<"="<<tot4M<<G4endl;
+  G4cout<<"G4QDiffR::ProjFragm:d4M="<<d4M<<"+r4M="<<r4M<<"="<<d4M+r4M<<"="<<tot4M<<G4endl;
 #endif
   // Now everything is ready for fragmentation and DoNothing projHadron must be wiped out
@@ -655,10 +658,10 @@
   ResHV->push_back(hadron);          // Fill the recoil nucleus
 #ifdef debug
-		G4cout<<"G4QDiffractionRatio::ProjFragment: *Filled* RecNucleus="<<t4M<<tPDG<<G4endl;
+  G4cout<<"G4QDiffractionRatio::ProjFragment: *Filled* RecNucleus="<<t4M<<tPDG<<G4endl;
 #endif
   hadron = new G4QHadron(rPDG,r4M);  // Hadron for the recoil nucleon
   ResHV->push_back(hadron);          // Fill the recoil nucleon
 #ifdef debug
-		G4cout<<"G4QDiffractionRatio::ProjFragment: *Filled* RecNucleon="<<r4M<<rPDG<<G4endl;
+  G4cout<<"G4QDiffractionRatio::ProjFragment: *Filled* RecNucleon="<<r4M<<rPDG<<G4endl;
 #endif
   G4LorentzVector sum4M(0.,0.,0.,0.);
@@ -668,10 +671,10 @@
   G4Quasmon* pan= new G4Quasmon(dQC,d4M); // --->---->---->----->-----> DELETED -->---*
   try                                                           //                    |
-	 {                                                             //                    |
+  {                                                             //                    |
     G4QNucleus vac(90000000);                                   //                    |
     leadhs=pan->Fragment(vac,1);  // DELETED after it is copied to ResHV vector -->---+-*
   }                                                             //                    | |
   catch (G4QException& error)                                   //                    | |
-	 {                                                             //                    | |
+  {                                                             //                    | |
     G4cerr<<"***G4QDiffractionRatio::ProjFragment: G4Quasmon Exception"<<G4endl;    //| |
     G4Exception("G4QDiffractionRatio::ProjFragment","72",FatalException,"*Quasmon");//| |
@@ -789,5 +792,5 @@
         }
         else                                          //(2) n*N+m*(Pi-)   (nL=0)        |
-	       {
+        {
           sPDG = -211;
           qPN  = -nC;
@@ -839,5 +842,5 @@
           nB  = nC;
           fMass= mProt;
-	       }
+        }
         else if(nL  && nC<nB-nL) //(3)n*L+m*P+k*N ***Should not be here***              |
         {
@@ -1005,5 +1008,5 @@
 #ifdef fdebug
             sum4M+=r4M;                      // Sum 4-momenta for the EnMom check       |
-  		        G4cout<<"G4QDR::ProjFrag: *additional Nucleon*="<<f4Mom<<fPDG<<G4endl; //   |
+            G4cout<<"G4QDR::ProjFrag: *additional Nucleon*="<<f4Mom<<fPDG<<G4endl; //   |
 #endif
           }
@@ -1026,5 +1029,5 @@
 #ifdef fdebug
             sum4M+=r4M;                      // Sum 4-momenta for the EnMom check       |
-  		        G4cout<<"G4QDR::ProjFragm: *additional Pion*="<<f4Mom<<fPDG<<G4endl; //     |
+            G4cout<<"G4QDR::ProjFragm: *additional Pion*="<<f4Mom<<fPDG<<G4endl; //     |
 #endif
           }
@@ -1047,10 +1050,10 @@
 #ifdef fdebug
             sum4M+=r4M;                    // Sum 4-momenta for the EnMom check         |
-  		        G4cout<<"G4QDR::ProjFragm: *additional Hyperon*="<<f4Mom<<fPDG<<G4endl; //  |
+            G4cout<<"G4QDR::ProjFragm: *additional Hyperon*="<<f4Mom<<fPDG<<G4endl; //  |
 #endif
           }
         }
       }                                    // --> End of decay                          |
-				}                                      // -> End of Iso-nuclear treatment           |
+    }                                      // -> End of Iso-nuclear treatment           |
     else if( (nL > 0 && nB > 1) || (nL < 0 && nB < -1) ) 
     {     // Hypernucleus is found                                                      |
@@ -1067,12 +1070,12 @@
       G4int nSP=0;                         // A#0f unavoidable Sigma+                   |
       if(nC<0)                             // Negative hypernucleus                     |
-	     {
+      {
         if(-nC<=nL)                        // Partial compensation by Sigma-            |
-		      {
+        {
           nSM=-nC;                         // Can be compensated by Sigma-              |
           nL+=nC;                          // Reduce the residual strangeness           |
         }
         else                               // All Charge is compensated by Sigma-       |
-		      {
+        {
           nSM=nL;                          // The maximum number of Sigma-              |
           nL=0;                            // Kill the residual strangeness             |
@@ -1080,7 +1083,7 @@
       }
       else if(nC>nB-nL)                    // Extra positive hypernucleus               |
-	     {
+      {
         if(nC<=nB)                         // Partial compensation by Sigma+            |
-		      {
+        {
           G4int dH=nB-nC;                  // Isotopic shift                            |
           nSP=nL-dH;                       // Can be compensated by Sigma+              |
@@ -1088,5 +1091,5 @@
         }
         else                               // All Charge is compensated by Sigma+       |
-		      {
+        {
           nSP=nL;                          // The maximum number of Sigma+              |
           nL=0;                            // Kill the residual strangeness             |
@@ -1105,5 +1108,5 @@
 #endif
       if(nSP||nSM)                         // Sigma+/- improvement                      |
-	     {
+      {
         if(nL)                             // By mistake Lambda improvement is found    |
         {
@@ -1115,5 +1118,5 @@
         }
         if(nSP)                            // Sibma+ should be decayed                  |
-		      {
+        {
           nL=nSP;                          // #of decaying hyperons                     |
           sPDG=3222;                       // PDG code of decaying hyperons             |
@@ -1121,5 +1124,5 @@
         }
         else                               // Sibma+ should be decayed                  |
-		      {
+        {
           nL=nSM;                          // #of decaying hyperons                     |
           sPDG=3112;                       // PDG code of decaying hyperons             |
@@ -1133,5 +1136,5 @@
       G4double rlM=G4QNucleus(rlPDG).GetMZNS();// Mass of the NonstrangeNucleus         |
       if(!nSP&&!nSM&&nL==1&&reM>rlM+mSigZ&&G4UniformRand()>.5) // Conv Lambda->Sigma0   |
-	     {
+      {
         sPDG=3212;                         // PDG code of a decaying hyperon            |
         MLa=mSigZ;                         // Mass of the decaying hyperon              |
@@ -1142,5 +1145,5 @@
       // @@ In future take into account Iso-Hypernucleus (Add PI+,R & Pi-,R decays)     |
       if(rlPDG==90000000)                  // Multy Hyperon (HyperNuc of only hyperons) |
-	     {
+      {
         if(nL>1) r4M=r4M/nL;               // split the 4-mom for the MultyLambda       |
         for(G4int il=0; il<nL; il++)       // loop over Lambdas                         |
@@ -1151,15 +1154,15 @@
 #ifdef fdebug
           sum4M+=r4M;                      // Sum 4-momenta for the EnMom check         |
-  		      G4cout<<"G4QDR::ProjFrag: *additional Lambda*="<<r4M<<sPDG<<G4endl; //        |
-#endif
-        }
-      }
-	     else if(reM>rlM+MLa-eps)              // Lambda (or Sigma) can be split           |
-	     {
+          G4cout<<"G4QDR::ProjFrag: *additional Lambda*="<<r4M<<sPDG<<G4endl; //        |
+#endif
+        }
+      }
+      else if(reM>rlM+MLa-eps)              // Lambda (or Sigma) can be split           |
+      {
         G4LorentzVector n4M(0.,0.,0.,rlM);  // 4-mom of the residual nucleus            |
         G4LorentzVector h4M(0.,0.,0.,MLa);  // 4-mom of the Hyperon                     |
         G4double sum=rlM+MLa;               // Safety sum                               |
-        if(std::fabs(reM-sum)<eps)               // At rest in CMS                           |
-	       {
+        if(std::fabs(reM-sum)<eps)          // At rest in CMS                           |
+        {
           n4M=r4M*(rlM/sum);                // Split tot 4-mom for resNuc               |
           h4M=r4M*(MLa/sum);                // Split tot 4-mom for Hyperon              |
@@ -1178,5 +1181,5 @@
         loh->SetQPDG(G4QPDGCode(rlPDG));   // ConvertedHypernucleus to nonstrange(@anti)|
         if(rlPDG==90000002)                // Additional action with loH changed to 2n  |
-	       {
+        {
           G4LorentzVector newLV=n4M/2.;    // Split 4-momentum                          |
           loh->Set4Momentum(newLV);        // Reupdate the hadron                       |
@@ -1187,9 +1190,9 @@
 #ifdef fdebug
           sum4M+=r4M;                      // Sum 4-momenta for the EnMom check         |
-  		      G4cout<<"G4QDR::ProgFrag: *additional Neutron*="<<r4M<<sPDG<<G4endl; //       |
+          G4cout<<"G4QDR::ProgFrag: *additional Neutron*="<<r4M<<sPDG<<G4endl; //       |
 #endif
         }
         else if(rlPDG==90002000)           // Additional action with loH change to 2p   |
-	       {
+        {
           G4LorentzVector newLV=n4M/2.;    // Split 4-momentum                          |
           loh->Set4Momentum(newLV);        // Reupdate the hadron                       |
@@ -1200,5 +1203,5 @@
 #ifdef fdebug
           sum4M+=r4M;                      // Sum 4-momenta for the EnMom check         |
-  		      G4cout<<"G4QDR::ProjFrag: *additional Proton*="<<r4M<<sPDG<<G4endl; //        |
+          G4cout<<"G4QDR::ProjFrag: *additional Proton*="<<r4M<<sPDG<<G4endl; //        |
 #endif
         }
@@ -1215,10 +1218,10 @@
 #ifdef fdebug
           sum4M+=r4M;                      // Sum 4-momenta for the EnMom check         |
-  		      G4cout<<"G4QDR::ProjFrag: *additional Hyperon*="<<r4M<<sPDG<<G4endl; //       |
-#endif
-        }
-      }
-	     else if(reM>rnM+mPi0-eps&&!nSP&&!nSM)// Lambda->N only if Sigmas are absent       |
-	     {
+          G4cout<<"G4QDR::ProjFrag: *additional Hyperon*="<<r4M<<sPDG<<G4endl; //       |
+#endif
+        }
+      }
+      else if(reM>rnM+mPi0-eps&&!nSP&&!nSM)// Lambda->N only if Sigmas are absent       |
+      {
         G4int nPi=static_cast<G4int>((reM-rnM)/mPi0); // Calc. pion multiplicity        |
         if (nPi>nL) nPi=nL;                // Cut the pion multiplicity                 |
@@ -1227,6 +1230,6 @@
         G4LorentzVector h4M(0.,0.,0.,npiM);// 4-momentum of pions                       |
         G4double sum=rnM+npiM;             // Safety sum                                |
-        if(std::fabs(reM-sum)<eps)              // At rest                                   |
-	       {
+        if(std::fabs(reM-sum)<eps)         // At rest                                   |
+        {
           n4M=r4M*(rnM/sum);               // The residual nucleus part                 |
           h4M=r4M*(npiM/sum);              // The pion part                             |
@@ -1251,9 +1254,9 @@
 #ifdef fdebug
           sum4M+=r4M;                      // Sum 4-momenta for the EnMom check         |
-  		      G4cout<<"G4QDR::ProjFrag: *additional Pion*="<<r4M<<sPDG<<G4endl; //          |
+          G4cout<<"G4QDR::ProjFrag: *additional Pion*="<<r4M<<sPDG<<G4endl; //          |
 #endif
         }
         if(rnPDG==90000002)                // Additional action with loH change to 2n   |
-	       {
+        {
           G4LorentzVector newLV=n4M/2.;    // Split 4-momentum                          |
           loh->Set4Momentum(newLV);        // Reupdate the hadron                       |
@@ -1264,9 +1267,9 @@
 #ifdef fdebug
           sum4M+=r4M;                      // Sum 4-momenta for the EnMom check         |
-  		      G4cout<<"G4QDR::ProjFrag: *additional Neutron*="<<r4M<<sPDG<<G4endl; //       |
+          G4cout<<"G4QDR::ProjFrag: *additional Neutron*="<<r4M<<sPDG<<G4endl; //       |
 #endif
         }
         else if(rnPDG==90002000)           // Additional action with loH change to 2p   |
-	       {
+        {
           G4LorentzVector newLV=n4M/2.;    // Split 4-momentum                          |
           loh->Set4Momentum(newLV);        // Reupdate the hadron                       |
@@ -1277,5 +1280,5 @@
 #ifdef fdebug
           sum4M+=r4M;                      // Sum 4-momenta for the EnMom check         |
-  		      G4cout<<"G4QDR::ProjFrag: *additional Proton*="<<r4M<<sPDG<<G4endl; //        |
+          G4cout<<"G4QDR::ProjFrag: *additional Proton*="<<r4M<<sPDG<<G4endl; //        |
 #endif
         }
@@ -1283,23 +1286,23 @@
       }
       else // If this Excepton shows up (lowProbable appearance) => include gamma decay |
-	     {
+      {
         G4double d=rlM+MLa-reM;            // Hyperon Excessive energy                  |
-		      G4cerr<<"G4QDR::PF:R="<<rlM<<",S+="<<nSP<<",S-="<<nSM<<",L="<<nL<<",d="<<d<<G4endl;
+        G4cerr<<"G4QDR::PF:R="<<rlM<<",S+="<<nSP<<",S-="<<nSM<<",L="<<nL<<",d="<<d<<G4endl;
         d=rnM+mPi0-reM;                    // Pion Excessive energy                     |
-		      G4cerr<<"G4QDR::PF:"<<oPDG<<","<<hPDG<<",M="<<reM<<"<"<<rnM+mPi0<<",d="<<d<<G4endl;
+        G4cerr<<"G4QDR::PF:"<<oPDG<<","<<hPDG<<",M="<<reM<<"<"<<rnM+mPi0<<",d="<<d<<G4endl;
         throw G4QException("G4QDiffractionRatio::ProjFragment: Hypernuclear conver");// |
       }
-		  }                                      // => End of G4 Hypernuclear decay           |
+    }                                      // => End of G4 Hypernuclear decay           |
     ResHV->push_back(loh);                 // Fill in the result                        |
 #ifdef debug
     sum4M+=loh->Get4Momentum();            // Sum 4-momenta for the EnMom check         |
-  		G4cout<<"G4QDR::PrFra:#"<<iq<<","<<loh->Get4Momentum()<<loh->GetPDGCode()<<G4endl;//|
+    G4cout<<"G4QDR::PrFra:#"<<iq<<","<<loh->Get4Momentum()<<loh->GetPDGCode()<<G4endl;//|
 #endif
   }                                        //                                           |
   delete leadhs; // <----<----<----<----<----<----<----<----<----<----<----<----<----<--*
 #ifdef debug
-		G4cout<<"G4QDiffractionRatio::ProjFragment: *End* Sum="<<sum4M<<" =?= d4M="<<d4M<<G4endl;
-#endif
-		return ResHV; // Result
+  G4cout<<"G4QDiffractionRatio::ProjFragment: *End* Sum="<<sum4M<<" =?= d4M="<<d4M<<G4endl;
+#endif
+  return ResHV; // Result
 } // End of ProjFragment
 
@@ -1312,5 +1315,5 @@
          <<pPDG<<G4endl;
   G4double A=Z+N;                        // A of the target
-		//return 4.5*std::pow(A,.364)*millibarn; // Result
+  //return 4.5*std::pow(A,.364)*millibarn; // Result
   return 3.7*std::pow(A,.364)*millibarn; // Result after mpi0 correction
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiscProcessMixer.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiscProcessMixer.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiscProcessMixer.cc	(revision 1055)
@@ -24,14 +24,14 @@
 // ********************************************************************
 //
-// $Id: G4QDiscProcessMixer.cc,v 1.4 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QDiscProcessMixer.cc,v 1.8 2009/04/22 12:26:13 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
-//      ---------------- G4QDiscProcessMixer class -----------------
+//      ---------------- G4QDiscProcessMixer class -------------------
 //                 by Mikhail Kossov, Aug 2007.
 // G4QDiscProcessMixer class of the CHIPS Simulation Branch in GEANT4
-// ---------------------------------------------------------------
-// ****************************************************************************************
-// ********** This CLASS is temporary moved from the "chips/interface" directory *********
-// ****************************************************************************************
+// ------------------------------------------------------------------------
+// Short description: universal mixer of processes (NOT models as in GHAD!)
+// depending on the application energy region (defined by users).
+// ------------------------------------------------------------------------
 
 //#define debug
@@ -54,20 +54,31 @@
 G4QDiscProcessMixer::~G4QDiscProcessMixer()
 {
-  for_each(theDPVector.begin(), theDPVector.end(), DeleteDiscreteProcess());
+  // Now the responsibility of deleting is deligated to the user, who created them
+  //for_each(theDPVector.begin(), theDPVector.end(), DeleteDiscreteProcess());
 }
 
 void G4QDiscProcessMixer::AddDiscreteProcess(G4VDiscreteProcess* DP, G4double ME)
 {
-  if(ME>theDPVector[theDPVector.size()-1]->second)
+  static const G4double maxEn = 1.E8*megaelectronvolt; // Conditional INF
+  if(!theDPVector.size()) // The first process in the DiscreteProcessVector (MaxE=INF)
   {
     std::pair<G4VDiscreteProcess*, G4double>* QDiscProc =
-      new std::pair<G4VDiscreteProcess*, G4double>(DP, ME);
+      new std::pair<G4VDiscreteProcess*, G4double>(DP, maxEn);
     theDPVector.push_back( QDiscProc );
   }
-  else // Wrong Max Energy Order for the new process in the sequence of processes
+  else
   {
-    G4cerr<<"G4QDiscProcessMixer::AddDiscreteProcess:LastMaxE("<<theDPVector.size()-1<<")="
-          <<theDPVector[theDPVector.size()-1]->second<<" >= MaxE="<<ME<<G4endl;
-    G4Exception("G4QDiscProcessMixer::AddDiscreteProcess: Wrong Max Energy Order");
+    if(ME<theDPVector[theDPVector.size()-1]->second)
+    {
+      std::pair<G4VDiscreteProcess*, G4double>* QDiscProc =
+        new std::pair<G4VDiscreteProcess*, G4double>(DP, ME);
+      theDPVector.push_back( QDiscProc );
+    }
+    else // Wrong Max Energy Order for the new process in the sequence of processes
+    {
+      G4cerr<<"G4QDiscProcessMixer::AddDiscreteProcess:LastMaxE("<<theDPVector.size()-1
+            <<")="<<theDPVector[theDPVector.size()-1]->second<<" <= MaxE="<<ME<<G4endl;
+      G4Exception("G4QDiscProcessMixer::AddDiscreteProcess: Wrong Max Energy Order");
+    }
   }
 }
@@ -80,11 +91,17 @@
 
 G4double G4QDiscProcessMixer::PostStepGetPhysicalInteractionLength(const G4Track& Track,
-			                                                         G4double   PrevStSize,
-			                                                         G4ForceCondition* F)
+                                                                   G4double  PrevStSize,
+                                                                   G4ForceCondition* F)
 {
   G4double kEn=Track.GetDynamicParticle()->GetKineticEnergy(); // Projectile kinetic energy
   G4int maxDP=theDPVector.size();
-  if(maxDP) for(G4int i=0; i<maxDP; ++i) if(kEn < theDPVector[i]->second)
+  if(maxDP) for(G4int i=maxDP-1; i>-1; i--) if(kEn < theDPVector[i]->second)
     return theDPVector[i]->first->PostStepGetPhysicalInteractionLength(Track,PrevStSize,F);
+  return DBL_MAX;
+}
+
+// A fake class for compilation only
+G4double G4QDiscProcessMixer::GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*)
+{
   return DBL_MAX;
 }
@@ -95,5 +112,5 @@
   G4double kEn=Track.GetDynamicParticle()->GetKineticEnergy(); // Projectile kinetic energy
   G4int maxDP=theDPVector.size();
-  if(maxDP) for(G4int i=0; i<maxDP; ++i) if(kEn < theDPVector[i]->second)
+  if(maxDP) for(G4int i=maxDP-1; i>-1; i--) if(kEn < theDPVector[i]->second)
   {
     //EnMomConservation= theDPVector[i]->first->GetEnegryMomentumConservation();
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElastic.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElastic.cc	(revision 1055)
@@ -24,14 +24,15 @@
 // ********************************************************************
 //
-// $Id: G4QElastic.cc,v 1.27 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QElastic.cc,v 1.28 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QElastic class -----------------
 //                 by Mikhail Kossov, December 2003.
 // G4QElastic class of the CHIPS Simulation Branch in GEANT4
-// ---------------------------------------------------------------
-// ****************************************************************************************
-// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
-// ****************************************************************************************
+// --------------------------------------------------------------------
+// Short description: At present this is a process for nucleon-nucleus
+// elastic scattering. Mesons and hyperons exist only for the Hydrogen
+// target (see G4QuasiFreeRatios).
+// --------------------------------------------------------------------
 
 //#define debug
@@ -145,10 +146,10 @@
                                          <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
           G4double abund=abuVector[j];
-								  std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+          std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
           G4cout<<"G4QElastic::GetMeanFreePath:pair#="<<j<<",N="<<N<<",ab="<<abund<<G4endl;
 #endif
           newAbund->push_back(pr);
-						  }
+        }
 #ifdef debug
         G4cout<<"G4QElastic::GetMeanFreePath: pairVectorLength="<<newAbund->size()<<G4endl;
@@ -177,5 +178,5 @@
       G4cout<<"G4QEl::GMFP:*true*,P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl;
 #endif
-		    G4bool ccsf=true;
+      G4bool ccsf=true;
       if(Q==-27.) ccsf=false;
 #ifdef debug
@@ -244,12 +245,12 @@
 G4VParticleChange* G4QElastic::PostStepDoIt(const G4Track& track, const G4Step& step)
 {
-  //static const G4double mProt=G4Proton::Proton()->GetPDGMass()*GeV; // proton mass (in GeV)
-  //static const G4double mProt= G4QPDGCode(2212).GetMass()*.001;   // CHIPS in GeV
-  //static const G4double mP2=mProt*mProt;                            // squared proton mass
+  //static const G4double mProt=G4Proton::Proton()->GetPDGMass()*GeV;// proton mass in GeV
+  //static const G4double mProt= G4QPDGCode(2212).GetMass()*.001;    // CHIPS m_p in GeV
+  //static const G4double mP2=mProt*mProt;                           // squared proton mass
   //
   //-------------------------------------------------------------------------------------
   static G4bool CWinit = true;                       // CHIPS Warld needs to be initted
   if(CWinit)
-		{
+  {
     CWinit=false;
     G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
@@ -326,5 +327,5 @@
 #ifdef debug
   G4int prPDG=particle->GetPDGEncoding();
-		G4cout<<"G4QElastic::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
+  G4cout<<"G4QElastic::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
 #endif
   if(!projPDG)
@@ -335,5 +336,5 @@
   G4int EPIM=ElProbInMat.size();
 #ifdef debug
-		G4cout<<"G4QElastic::PostStDoIt:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
+  G4cout<<"G4QElastic::PostStDoIt:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
 #endif
   G4int i=0;
@@ -342,7 +343,7 @@
     G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand();
     for(i=0; i<nE; ++i)
-		  {
-#ifdef debug
-				  G4cout<<"G4QElastic::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
+    {
+#ifdef debug
+      G4cout<<"G4QElastic::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
 #endif
       if (rnd<ElProbInMat[i]) break;
@@ -353,5 +354,5 @@
   Z=static_cast<G4int>(pElement->GetZ());
 #ifdef debug
-				G4cout<<"G4QElastic::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
+    G4cout<<"G4QElastic::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
 #endif
   if(Z<=0)
@@ -364,5 +365,5 @@
   G4int nofIsot=SPI->size();               // #of isotopes in the element i
 #ifdef debug
-		G4cout<<"G4QElastic::PosStDoIt: nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
+  G4cout<<"G4QElastic::PosStDoIt: nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
 #endif
   G4int j=0;
@@ -373,5 +374,5 @@
     {
 #ifdef debug
-				  G4cout<<"G4QElastic::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
+      G4cout<<"G4QElastic::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
 #endif
       if(rndI < (*SPI)[j]) break;
@@ -381,5 +382,5 @@
   G4int N =(*IsN)[j]; ;                    // Randomized number of neutrons
 #ifdef debug
-		G4cout<<"G4QElastic::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;
+  G4cout<<"G4QElastic::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;
 #endif
   if(N<0)
@@ -507,10 +508,10 @@
   EnMomConservation-=scat4M;                        // It must be initialized by (pE+tM,pP)
   // This is how in general the secondary should be identified
-		G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 
+  G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 
   //G4int targPDG=2212;                      // PDG for the recoil proton @@only for p targ
   //G4ParticleDefinition* theDefinition=G4Proton::Proton(); // @@ only for p target
   G4int aA = Z+N;
 #ifdef pdebug
-		G4cout<<"G4QElastic::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;
+  G4cout<<"G4QElastic::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;
 #endif
   G4ParticleDefinition* theDefinition=G4ParticleTable::GetParticleTable()
@@ -570,5 +571,5 @@
   {
     if(oxs) res=CSmanager->GetHMaxT();   // Calculate the max_t value
-				else res=CSmanager->GetExchangeT(Z, N, pPDG); // functionally randomized -t in MeV^2
+    else res=CSmanager->GetExchangeT(Z, N, pPDG); // functionally randomized -t in MeV^2
   }
   else G4cout<<"*Warning*G4QElastic::CalculateXSt:*NotInitiatedScattering"<<G4endl;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElasticCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElasticCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElasticCrossSection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QElasticCrossSection.cc,v 1.36 2008/03/21 21:42:44 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QElasticCrossSection.cc,v 1.37 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -34,4 +34,6 @@
 // 
 //================================================================================
+// Short description: Interaction cross-sections for the G4QElastic process
+// -------------------------------------------------------------------------------
 
 //#define debug
@@ -50,6 +52,6 @@
 G4double  G4QElasticCrossSection::lPMax= 8.;  // Max tabulated logarithmic Momentum     (D)
 G4double  G4QElasticCrossSection::dlnP=(lPMax-lPMin)/nLast;// Log step in the table     (D)
-G4bool    G4QElasticCrossSection::onlyCS=true;// Flag to calculate only CS (not Si/Bi)		(L)
-G4double  G4QElasticCrossSection::lastSIG=0.; // Last calculated cross section								  (L)
+G4bool    G4QElasticCrossSection::onlyCS=true;// Flag to calculate only CS (not Si/Bi)  (L)
+G4double  G4QElasticCrossSection::lastSIG=0.; // Last calculated cross section          (L)
 G4double  G4QElasticCrossSection::lastLP=-10.;// Last log(mom_of_the_incident_hadron)   (L)
 G4double  G4QElasticCrossSection::lastTM=0.;  // Last t_maximum                         (L)
@@ -63,17 +65,17 @@
 G4double  G4QElasticCrossSection::theS4=0.;   // The Last mantissa of 4-th difruction   (L)
 G4double  G4QElasticCrossSection::theB4=0.;   // The Last slope of 4-th difruction      (L)
-G4int     G4QElasticCrossSection::lastTZ=0;   // Last atomic number of the target				
+G4int     G4QElasticCrossSection::lastTZ=0;   // Last atomic number of the target    
 G4int     G4QElasticCrossSection::lastTN=0;   // Last number of neutrons of the target
 G4double  G4QElasticCrossSection::lastPIN=0.; // Last initialized max momentum
-G4double* G4QElasticCrossSection::lastCST=0;  // Elastic cross-section table															
-G4double* G4QElasticCrossSection::lastPAR=0;  // Parameters for functional calculation					
-G4double* G4QElasticCrossSection::lastSST=0;  // E-dep of sq.slope of the first difruction	
-G4double* G4QElasticCrossSection::lastS1T=0;  // E-dep of mantissa of the first difruction	
+G4double* G4QElasticCrossSection::lastCST=0;  // Elastic cross-section table               
+G4double* G4QElasticCrossSection::lastPAR=0;  // Parameters for functional calculation     
+G4double* G4QElasticCrossSection::lastSST=0;  // E-dep of sq.slope of the first difruction 
+G4double* G4QElasticCrossSection::lastS1T=0;  // E-dep of mantissa of the first difruction 
 G4double* G4QElasticCrossSection::lastB1T=0;  // E-dep of the slope of the first difruction
 G4double* G4QElasticCrossSection::lastS2T=0;  // E-dep of mantissa of the second difruction
 G4double* G4QElasticCrossSection::lastB2T=0;  // E-dep of the slope of theSecond difruction
-G4double* G4QElasticCrossSection::lastS3T=0;  // E-dep of mantissa of the third difruction	
+G4double* G4QElasticCrossSection::lastS3T=0;  // E-dep of mantissa of the third difruction 
 G4double* G4QElasticCrossSection::lastB3T=0;  // E-dep of the slope of the third difruction
-G4double* G4QElasticCrossSection::lastS4T=0;  // E-dep of mantissa of the 4-th difruction	
+G4double* G4QElasticCrossSection::lastS4T=0;  // E-dep of mantissa of the 4-th difruction 
 G4double* G4QElasticCrossSection::lastB4T=0;  // E-dep of the slope of the 4-th difruction
 G4int     G4QElasticCrossSection::lastPDG=0;  // The last PDG code of the projectile
@@ -159,5 +161,5 @@
   // ***---*** End of the mandatory Static Definitions of the Associative Memory ***---***
   if(tgZ==0 && tgN==1)                 // Temporary change for Quasi-Elastic
-		{
+  {
     tgZ=1;
     tgN=1;
@@ -171,5 +173,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(!pPDG)
@@ -183,5 +185,5 @@
   G4bool in=false;                     // By default the isotope must be found in the AMDB
 //GF the block will update parameters, needed for quasi-eleastic
-//GF  if(tgN!=lastN || tgZ!=lastZ || pPDG!=lastPDG)// The nucleus was not the last used isotope
+//GF if(tgN!=lastN || tgZ!=lastZ || pPDG!=lastPDG)// The nucleus isn't the LastUsedIsotope
   {
     in = false;                        // By default the isotope haven't be found in AMDB  
@@ -192,7 +194,7 @@
     lastI   = colN.size();             // Size of the Associative Memory DB in the heap
     if(lastI) for(G4int i=0; i<lastI; i++) // Loop over proj/tgZ/tgN lines of DB
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colPDG[i]==pPDG && colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -211,5 +213,5 @@
         lastP  =colP [i];                // Last Momentum  (A-dependent)
         lastCS =colCS[i];                // Last CrossSect (A-dependent)
-	//        if(std::fabs(lastP/pMom-1.)<tolerance) //VI (do not use tolerance)
+        //  if(std::fabs(lastP/pMom-1.)<tolerance) //VI (do not use tolerance)
         if(lastP == pMom)   // V.Ivanchenko safe solution
         {
@@ -244,7 +246,7 @@
       //CalculateCrossSection(fCS,-27,i,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QElCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -253,5 +255,5 @@
       lastCS=CalculateCrossSection(fCS,0,lastI,lastPDG,lastZ,lastN,pMom);//calculate&create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -265,5 +267,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QElCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -281,7 +283,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QElCS::GetCS: Update lastI="<<lastI<<G4endl;
@@ -293,32 +295,32 @@
   } // End of parameters udate
 
-// GF
-//	  else if(pEn<=lastTH)
-//	  {
-//	#ifdef pdebug
-//	    G4cout<<"G4QElCS::GetCS: Current T="<<pEn<<" < Threshold="<<lastTH<<", CS=0"<<G4endl;
-//	    //CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
-//	#endif
-//	    return 0.;                         // Momentum is below the Threshold Value -> CS=0
-//	  }
-//	  //  else if(std::fabs(lastP/pMom-1.)<tolerance)
-//	  else if(lastP == pMom) // V.Ivanchenko safe solution
-//	  {
-//	#ifdef pdebug
-//	    G4cout<<"G4QElCS::GetCS:OldCur P="<<pMom<<"="<<pMom<<", CS="<<lastCS*millibarn<<G4endl;
-//	    //CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
-//	    G4cout<<"G4QElCS::GetCrSec:***SAME***, onlyCS="<<onlyCS<<G4endl;
-//	#endif
-//	    return lastCS*millibarn;     // Use theLastCS
-//	  }
-//	  else
-//	  {
-//	#ifdef pdebug
-//	    G4cout<<"G4QElCS::GetCS:UpdatCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl;
-//	#endif
-//	    lastCS=CalculateCrossSection(fCS,1,lastI,lastPDG,lastZ,lastN,pMom); // Only UpdateDB
-//	    lastP=pMom;
-//	  }
-// GF
+//GF
+// else if(pEn<=lastTH)
+// {
+//#ifdef pdebug
+//  G4cout<<"G4QElCS::GetCS: Current T="<<pEn<<" < Threshold="<<lastTH<<", CS=0"<<G4endl;
+//  //CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+//#endif
+//  return 0.;                         // Momentum is below the Threshold Value -> CS=0
+// }
+// //  else if(std::fabs(lastP/pMom-1.)<tolerance)
+// else if(lastP == pMom) // V.Ivanchenko safe solution
+// {
+//#ifdef pdebug
+//  G4cout<<"G4QElCS::GetCS:OldCur P="<<pMom<<"="<<pMom<<", CS="<<lastCS*millibarn<<G4endl;
+//  //CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+//  G4cout<<"G4QElCS::GetCrSec:***SAME***, onlyCS="<<onlyCS<<G4endl;
+//#endif
+//  return lastCS*millibarn;     // Use theLastCS
+// }
+// else
+// {
+//#ifdef pdebug
+//  G4cout<<"G4QElCS::GetCS:UpdatCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl;
+//#endif
+//  lastCS=CalculateCrossSection(fCS,1,lastI,lastPDG,lastZ,lastN,pMom); // Only UpdateDB
+//  lastP=pMom;
+// }
+//GF
 
 #ifdef pdebug
@@ -339,5 +341,5 @@
   // *** End of Static Definitions (Associative Memory Data Base) ***
   if(tgZ==0 && tgN==1)                 // Temporary change for Quasi-Elastic
-		{
+  {
     tgZ=1;
     tgN=1;
@@ -352,5 +354,5 @@
   lastLP=std::log(pMom);                // Make a logarithm of the momentum for calculation
   if(F)                                 // This isotope was found in AMDB =>RETRIEVE/UPDATE
-		{
+  {
     if(F<0)                             // the AMDB must be loded
     {
@@ -378,22 +380,22 @@
       lastPIN=GetPTables(lastLP,lastPIN,PDG,tgZ,tgN);// Can update upper logP-Limit in tabs
 #ifdef pdebug
-						G4cout<<"G4QElCS::CalcCS:*updated(I)*,LP="<<lastLP<<"<IN["<<I<<"]="<<lastPIN<<G4endl;
+      G4cout<<"G4QElCS::CalcCS:*updated(I)*,LP="<<lastLP<<"<IN["<<I<<"]="<<lastPIN<<G4endl;
 #endif
       PIN[I]=lastPIN;                   // Remember the new P-Limit of the tables
     }
-	 }
-	 else                                  // This isotope wasn't initialized => CREATE
-	 {
+  }
+  else                                  // This isotope wasn't initialized => CREATE
+  {
     lastPAR = new G4double[nPoints];    // Allocate memory for parameters of CS function
     lastPAR[nLast]=0;                   // Initialization for VALGRIND
-    lastCST = new G4double[nPoints];    // Allocate memory for Tabulated CS function				
-    lastSST = new G4double[nPoints];    // Allocate memory for Tabulated first sqaredSlope	
-    lastS1T = new G4double[nPoints];    // Allocate memory for Tabulated first mantissa	
-    lastB1T = new G4double[nPoints];    // Allocate memory for Tabulated first slope				
+    lastCST = new G4double[nPoints];    // Allocate memory for Tabulated CS function    
+    lastSST = new G4double[nPoints];    // Allocate memory for Tabulated first sqaredSlope 
+    lastS1T = new G4double[nPoints];    // Allocate memory for Tabulated first mantissa 
+    lastB1T = new G4double[nPoints];    // Allocate memory for Tabulated first slope    
     lastS2T = new G4double[nPoints];    // Allocate memory for Tabulated second mantissa
-    lastB2T = new G4double[nPoints];    // Allocate memory for Tabulated second slope			
-    lastS3T = new G4double[nPoints];    // Allocate memory for Tabulated third mantissa	
+    lastB2T = new G4double[nPoints];    // Allocate memory for Tabulated second slope   
+    lastS3T = new G4double[nPoints];    // Allocate memory for Tabulated third mantissa 
     lastB3T = new G4double[nPoints];    // Allocate memory for Tabulated third slope    
-    lastS4T = new G4double[nPoints];    // Allocate memory for Tabulated 4-th mantissa	
+    lastS4T = new G4double[nPoints];    // Allocate memory for Tabulated 4-th mantissa 
     lastB4T = new G4double[nPoints];    // Allocate memory for Tabulated 4-th slope    
 #ifdef pdebug
@@ -406,15 +408,15 @@
     PIN.push_back(lastPIN);             // Fill parameters of CS function to AMDB
     PAR.push_back(lastPAR);             // Fill parameters of CS function to AMDB
-    CST.push_back(lastCST);             // Fill Tabulated CS function to AMDB				
-    SST.push_back(lastSST);             // Fill Tabulated first sq.slope to AMDB	
-    S1T.push_back(lastS1T);             // Fill Tabulated first mantissa to AMDB	
+    CST.push_back(lastCST);             // Fill Tabulated CS function to AMDB    
+    SST.push_back(lastSST);             // Fill Tabulated first sq.slope to AMDB 
+    S1T.push_back(lastS1T);             // Fill Tabulated first mantissa to AMDB 
     B1T.push_back(lastB1T);             // Fill Tabulated first slope to AMDB    
-    S2T.push_back(lastS2T);             // Fill Tabulated second mantissa to AMDB	
+    S2T.push_back(lastS2T);             // Fill Tabulated second mantissa to AMDB 
     B2T.push_back(lastB2T);             // Fill Tabulated second slope to AMDB    
-    S3T.push_back(lastS3T);             // Fill Tabulated third mantissa to AMDB	
+    S3T.push_back(lastS3T);             // Fill Tabulated third mantissa to AMDB 
     B3T.push_back(lastB3T);             // Fill Tabulated third slope to AMDB    
-    S4T.push_back(lastS4T);             // Fill Tabulated 4-th mantissa to AMDB	
+    S4T.push_back(lastS4T);             // Fill Tabulated 4-th mantissa to AMDB 
     B4T.push_back(lastB4T);             // Fill Tabulated 4-th slope to AMDB    
-	 } // End of creation/update of the new set of parameters and tables
+  } // End of creation/update of the new set of parameters and tables
   // ============= NOW Update (if necessary) and Calculate the Cross Section ===========
 #ifdef pdebug
@@ -459,5 +461,5 @@
       G4cout<<"G4QElasticCrossSection::CalculateCS:(E) S1="<<theS1<<", B1="<<theB1<<G4endl;
 #endif
-				}
+    }
     else
     {
@@ -540,5 +542,5 @@
   //                      -0- -1--2- -3-  -4-  -5-  -6-    -7-  -8- -9- -10--11--12--13-
   if(tgZ==0 && tgN==1)                 // Temporary change for Quasi-Elastic
-		{
+  {
     tgZ=1;
     tgN=1;
@@ -550,5 +552,5 @@
     // --- Total np elastic cross section cs & s1/b1 (t), s2/b2 (u) --- NotTuned for highE
     //p2=p*p;p3=p2*p;sp=sqrt(p);p2s=p2*sp;lp=log(p);dl1=lp-(5.=par(3));p4=p2*p2; p=|3-mom|
-				//CS=12./(p2s+.05*p+.0001/sqrt(sp))+.35/p+(6.75+.14*dl1*dl1+19./p)/(1.+.6/p4);
+    //CS=12./(p2s+.05*p+.0001/sqrt(sp))+.35/p+(6.75+.14*dl1*dl1+19./p)/(1.+.6/p4);
     //  par(0)   par(1) par(2)        par(4) par(5) par(6)     par(7)     par(8)
     //s1=(6.75+.14*dl2*dl2+13./p)/(1.+.14/p4)+.6/(p4+.00013), s2=(75.+.001/p4/p)/p3
@@ -559,5 +561,5 @@
     // -- Total pp elastic cross section cs & s1/b1 (main), s2/b2 (tail1), s3/b3 (tail2) --
     //p2=p*p;p3=p2*p;sp=sqrt(p);p2s=p2*sp;lp=log(p);dl1=lp-(3.=par(3));p4=p2*p2; p=|3-mom|
-				//CS=2.865/p2s/(1+.0022/p2s)+(18.9+.6461*dl1*dl1+9./p)/(1.+.425*lp)/(1.+.4276/p4);
+    //CS=2.865/p2s/(1+.0022/p2s)+(18.9+.6461*dl1*dl1+9./p)/(1.+.425*lp)/(1.+.4276/p4);
     //   par(0)       par(7)     par(1) par(2)      par(4)      par(5)         par(6)
     //dl2=lp-5., s1=(74.+3.*dl2*dl2)/(1+3.4/p4/p)+(.2/p2+17.*p)/(p4+.001*sp),
@@ -602,47 +604,46 @@
         G4double pa10=5.e-27*a10;
         // Reaction cross-section parameters (pel=peh_fit.f)
-        lastPAR[0]=.28*a;                                                        // p1
-        lastPAR[1]=4.8*std::pow(a,1.14)/(1.+3.6/a3);                             // p2(p/n)
-        lastPAR[2]=3.3/a+.5*ssa/(1.+2.e7/a8);                                    // p3
-        if(PDG==2112)
+        lastPAR[0]=a/3.;                                                       // p1(p/n)
+        //lastPAR[0]=.28*a;                                                      // p1(p/n)
+        lastPAR[1]=4.5*a*ssa/(1.+6./a3)/(1.+1.e-2*a);                          // p2(p/n)
+        //lastPAR[1]=4.8*std::pow(a,1.14)/(1.+3.6/a3);                           // p2(p/n)
+        if(PDG==2112)                           // Neutron projectile
         {
+          lastPAR[2]=3.3/a+.5*ssa/(1.+2.e7/a8);                                // p3 (old)
           if(a<6.5)
-								  {
-            lastPAR[3]=1./(1.+.00123*a4);                                        // p4
-            lastPAR[4]=1.5e-4/a2/(a+1.2e-6*a12)+1.5e-6;                          // p5
-            lastPAR[5]=.0062/(a+5.e-11*a16);                                     // p6
-            lastPAR[6]=3.2e-14/a6/(1.+4.e-10*a17);                               // p7
-            lastPAR[7]=.847/a4/(a+.0005*a8)+.00045;                              // p8
-            lastPAR[8]=.413/a16+7.e-7;                                           // p10
-								  }
+          {
+            lastPAR[3]=1./(1.+.00123*a4);                                      // p4
+            lastPAR[4]=1.5e-4/a2/(a+1.2e-6*a12)+1.5e-6;                        // p5
+            lastPAR[5]=.0062/(a+5.e-11*a16);                                   // p6
+            lastPAR[6]=3.2e-14/a6/(1.+4.e-10*a17);                             // p7
+            lastPAR[7]=.847/a4/(a+.0005*a8)+.00045;                            // p8
+            lastPAR[8]=.413/a16+7.e-7;                                         // p9
+          }
           else
           {
-            lastPAR[1]/=1.+4.e-3*a;      // @@ reduction for n, can be for p too // p2(n)
-            lastPAR[3]=a*(.5+1.e-10*a4)/(1.+7.e5/a6);                            // p4
-            lastPAR[4]=a*3.e-5/(1.+2.e12/a12);                                   // p5
-            lastPAR[5]=(.0006+1.e-14*a5)/(1.+4.e5/a3)/(1.+3.e23/a16/a8);         // p6
-            lastPAR[6]=1.e-22*a4/(1.+5.e16*(1.+5e31/a32)/a16);                   // p7
-            lastPAR[7]=(8.+.00016*a2)/(1.+1.4e14/a16);                           // p8
-            lastPAR[8]=.0013;                                                    // p10
+            lastPAR[3]=a*(.5+1.e-10*a4)/(1.+7.e5/a6);                          // p4
+            lastPAR[4]=a*3.e-5/(1.+2.e12/a12);                                 // p5
+            lastPAR[5]=(.0006+1.e-14*a5)/(1.+4.e5/a3)/(1.+3.e23/a16/a8);       // p6
+            lastPAR[6]=1.e-22*a4/(1.+5.e16*(1.+5e31/a32)/a16);                 // p7
+            lastPAR[7]=(8.+.00016*a2)/(1.+1.4e14/a16);                         // p8
+            lastPAR[8]=.0013;                                                  // p9
           }
-						  }
-        else
+        }
+        else                                   // Proton projectile
         {
-          lastPAR[2]=3.3/a+.7*ssa/(1.+2.e7/a8);                                  // p3
-          lastPAR[3]=1./(1.+6.e-9*a12)+.6*a/(1.+1.6e15/a16);                     // p4
-          lastPAR[4]=6.e-4/(a4+3.e-6*a12)+.16/(a+9.e5/a3+r1a16*r1a16);           // p5
-          lastPAR[5]=3.e-4/a2+(1.5e-3+3.e-14*a7)/(1.+r2a16*r2a16+3.e-12*a6);     // p6
-          lastPAR[6]=4.e-30+(1.2e-28*a3+pa10*pa10)/(1.+r3a16*r3a16+4.e-26*a14);  // p7
-          lastPAR[7]=.07/(1.+1.7e-8*a16)+.5/(1.+1.7e18/a16+4.5e-7*a4);           // p8
-          lastPAR[8]=(1.5e-10+2.e-18*a8)/(1.+3.e-25*a16);                        // p10
+          lastPAR[2]=3.3/a+.8*ssa/(1.+2.e7/a8);                                // p3
+          //lastPAR[2]=3.3/a+.7*ssa/(1.+2.e7/a8);                                // p3(old)
+          lastPAR[3]=1./(1.+6.e-9*a12)+.6*a/(1.+1.6e15/a16);                   // p4
+          lastPAR[4]=6.e-4/(a4+3.e-6*a12)+.16/(a+9.e5/a3+r1a16*r1a16);         // p5
+          lastPAR[5]=3.e-4/a2+(1.5e-3+3.e-14*a7)/(1.+r2a16*r2a16+3.e-12*a6);   // p6
+          lastPAR[6]=4.e-30+(1.2e-28*a3+pa10*pa10)/(1.+r3a16*r3a16+4.e-26*a14);// p7
+          lastPAR[7]=.1/(1.+1.7e-8*a16)+1./(1.+1.7e18/a16+2.e-6*a4);         // p8
+          //lastPAR[7]=.07/(1.+1.7e-8*a16)+.5/(1.+1.7e18/a16+4.5e-7*a4);         // p8(old)
+          lastPAR[8]=(1.5e-10+2.e-18*a8)/(1.+3.e-25*a16);                      // p9
         }
         // @@ the differential cross-section is parameterized separately for A>6 & A<7
         if(a<6.5)
-								{
-          // a11
-          // a13
+        {
           G4double a28=a16*a12;
-          // a31
-          // a40
           // The main pre-exponent      (pel_sg)
           lastPAR[ 9]=4000*a;                                // p1
@@ -664,7 +665,9 @@
           lastPAR[23]=3.5e-36*a32*a8/(1.+5.e-15*a32/a);      // p4
           // The 1st max pre-exponent   (pel_qq)
-          lastPAR[24]=8.e4/(a8+2.5e12/a16);                  // p1
-          lastPAR[25]=8.e7/(a12+1.e-27*a28*a28);             // p2
-          lastPAR[26]=.0011*a3;                              // p3
+          lastPAR[24]=1.e5/(a8+2.5e12/a16);                  // p1
+          //lastPAR[24]=8.e4/(a8+2.5e12/a16);                  // p1 (old)
+          lastPAR[25]=8.e7/(a12+1.e-27*a28*a28);             // p2 
+          lastPAR[26]=.0006*a3;                              // p3
+          //lastPAR[26]=.0011*a3;                              // p3 (old)
           // The 1st max slope          (pel_qs)
           lastPAR[27]=10.+4.e-8*a12*a;                       // p1
@@ -682,6 +685,8 @@
           lastPAR[37]=64./a3;                                // p4
           // The gloria pre-exponent    (pel_us)
-          lastPAR[38]=1.05e8*std::exp(.32*asa);              // p1
-          lastPAR[39]=19.5*std::exp(.45*asa);                // p2
+          lastPAR[38]=1.e8*std::exp(.32*asa);                // p1
+          //lastPAR[38]=1.05e8*std::exp(.32*asa);              // p1 (old)
+          lastPAR[39]=20.*std::exp(.45*asa);                // p2
+          //lastPAR[39]=19.5*std::exp(.45*asa);                // p2 (old)
           lastPAR[40]=7.e3+2.4e6/a5;                         // p3
           lastPAR[41]=2.5e5*std::exp(.085*a3);               // p4
@@ -696,5 +701,5 @@
         }
         else
-								{
+        {
           G4double p1a10=2.2e-28*a10;
           G4double r4a16=6.e14/a16;
@@ -779,10 +784,10 @@
 #ifdef pdebug
       G4cout<<"G4QElasticCrossSection::GetPTables:ip=0(init), lp="<<lp<<",S1="<<theS1
-												<<",B1="<<theB1<<",S2="<<theS2<<",B2="<<theB3<<",S3="<<theS3
+            <<",B1="<<theB1<<",S2="<<theS2<<",B2="<<theB3<<",S3="<<theS3
             <<",B3="<<theB3<<",S4="<<theS4<<",B4="<<theB4<<G4endl;
 #endif
     }
     if(LP>ILP)
-				{
+    {
       G4int ini = static_cast<int>((ILP-lPMin+.000001)/dlnP)+1; // already inited till this
       if(ini<0) ini=0;
@@ -795,5 +800,5 @@
           G4double lp=0.;
           for(G4int ip=ini; ip<=fin; ip++)        // Calculate tabular CS,S1,B1,S2,B2,S3,B3
-										{
+          {
             lp=lPMin+ip*dlnP;                     // ln(momentum)
             G4bool memCS=onlyCS;
@@ -848,5 +853,5 @@
   static const G4double sevth=1./7.;
   if(tgZ==0 && tgN==1)                 // Temporary change for Quasi-Elastic
-		{
+  {
     tgZ=1;
     tgN=1;
@@ -855,7 +860,7 @@
   }
 #ifdef tdebug
-  G4cout<<"G4QElasticCS::GetExchangeT:F="<<onlyCS<<",Z="<<tgZ<<",N="<<tgN<<",PDG="<<PDG<<G4endl;
-#endif
-  if(onlyCS) G4cout<<"*Warning*G4QElasticCrossSection::GetExchangeQ2: onlyCS=true"<<G4endl;
+  G4cout<<"G4QElasticCS::GetExcT:F="<<onlyCS<<",Z="<<tgZ<<",N="<<tgN<<",PDG="<<PDG<<G4endl;
+#endif
+  if(onlyCS) G4cout<<"**Warning*G4QElasticCrossSection::GetExchangeT: onlyCS=true"<<G4endl;
   if(lastLP<-4.3) return lastTM*GeVSQ*G4UniformRand();// S-wave for p<14 MeV/c (kinE<.1MeV)
   G4double q2=0.;
@@ -867,5 +872,5 @@
 #endif
     G4double E1=lastTM*theB1;
-  		G4double R1=(1.-std::exp(-E1));
+    G4double R1=(1.-std::exp(-E1));
 #ifdef tdebug
     G4double ts1=-std::log(1.-R1)/theB1;
@@ -876,5 +881,5 @@
 #endif
     G4double E2=lastTM*theB2;
-  		G4double R2=(1.-std::exp(-E2));
+    G4double R2=(1.-std::exp(-E2));
 #ifdef tdebug
     G4double ts2=-std::log(1.-R2)/theB2;
@@ -885,5 +890,5 @@
 #endif
     //G4double E3=lastTM*theB3;
-  		//G4double R3=(1.-std::exp(-E3));
+    //G4double R3=(1.-std::exp(-E3));
 #ifdef tdebug
     //G4double ts3=-std::log(1.-R3)/theB3;
@@ -891,7 +896,7 @@
     //if(ds3>.01)G4cout<<"*Warn*G4QElCS::GetExT:3n "<<ts3<<"#"<<lastTM<<",d="<<ds3<<G4endl;
 #endif
-  		G4double I1=R1*theS1;
-  		G4double I2=R2*theS2/theB2;
-				//G4double I3=R3*theS3/theB3;
+    G4double I1=R1*theS1;
+    G4double I2=R2*theS2/theB2;
+    //G4double I3=R3*theS3/theB3;
     G4double I12=I1+I2;
     //G4double rand=(I12+I3)*G4UniformRand();
@@ -903,5 +908,5 @@
       q2=-std::log(1.-ran)/theB1;       // t-chan
     }
-				else
+    else
     {
       G4double ran=R2*G4UniformRand();
@@ -917,5 +922,5 @@
 #endif
     G4double E1=lastTM*theB1;
-  		G4double R1=(1.-std::exp(-E1));
+    G4double R1=(1.-std::exp(-E1));
 #ifdef tdebug
     G4double ts1=-std::log(1.-R1)/theB1;
@@ -926,5 +931,5 @@
 #endif
     G4double E2=lastTM*theB2;
-  		G4double R2=(1.-std::exp(-E2*E2*E2));
+    G4double R2=(1.-std::exp(-E2*E2*E2));
 #ifdef tdebug
     G4double ts2=std::pow(-std::log(1.-R2),.333333333)/theB2;
@@ -935,5 +940,5 @@
 #endif
     G4double E3=lastTM*theB3;
-  		G4double R3=(1.-std::exp(-E3));
+    G4double R3=(1.-std::exp(-E3));
 #ifdef tdebug
     G4double ts3=-std::log(1.-R3)/theB3;
@@ -943,7 +948,7 @@
             <<",R3="<<R1<<",E3="<<E3<<G4endl;
 #endif
-  		G4double I1=R1*theS1/theB1;
-  		G4double I2=R2*theS2;
-				G4double I3=R3*theS3;
+    G4double I1=R1*theS1/theB1;
+    G4double I2=R2*theS2;
+    G4double I3=R3*theS3;
     G4double I12=I1+I2;
     G4double rand=(I12+I3)*G4UniformRand();
@@ -954,5 +959,5 @@
       q2=-std::log(1.-ran)/theB1;
     }
-				else if(rand<I12)
+    else if(rand<I12)
     {
       G4double ran=R2*G4UniformRand();
@@ -978,5 +983,5 @@
 #endif
     G4double E1=lastTM*(theB1+lastTM*theSS);
-  		G4double R1=(1.-std::exp(-E1));
+    G4double R1=(1.-std::exp(-E1));
     G4double tss=theSS+theSS; // for future solution of quadratic equation (imediate check)
 #ifdef tdebug
@@ -991,5 +996,5 @@
     G4double E2=lastTM*tm2*theB2;                   // power 3 for lowA, 5 for HighA (1st)
     if(a>6.5)E2*=tm2;                               // for heavy nuclei
-  		G4double R2=(1.-std::exp(-E2));
+    G4double R2=(1.-std::exp(-E2));
 #ifdef tdebug
     G4double ts2=-std::log(1.-R2)/theB2;
@@ -1003,5 +1008,5 @@
     G4double E3=lastTM*theB3;
     if(a>6.5)E3*=tm2*tm2*tm2;                       // power 1 for lowA, 7 (2nd) for HighA
-  		G4double R3=(1.-std::exp(-E3));
+    G4double R3=(1.-std::exp(-E3));
 #ifdef tdebug
     G4double ts3=-std::log(1.-R3)/theB3;
@@ -1013,5 +1018,5 @@
 #endif
     G4double E4=lastTM*theB4;
-  		G4double R4=(1.-std::exp(-E4));
+    G4double R4=(1.-std::exp(-E4));
 #ifdef tdebug
     G4double ts4=-std::log(1.-R4)/theB4;
@@ -1021,8 +1026,8 @@
             <<",R4="<<R4<<",E4="<<E4<<G4endl;
 #endif
-  		G4double I1=R1*theS1;
-  		G4double I2=R2*theS2;
-				G4double I3=R3*theS3;
-				G4double I4=R4*theS4;
+    G4double I1=R1*theS1;
+    G4double I2=R2*theS2;
+    G4double I3=R3*theS3;
+    G4double I4=R4*theS4;
     G4double I12=I1+I2;
     G4double I13=I12+I3;
@@ -1041,5 +1046,5 @@
 #endif
     }
-				else if(rand<I12)
+    else if(rand<I12)
     {
       G4double ran=R2*G4UniformRand();
@@ -1124,5 +1129,5 @@
 {
   if(tgZ==0 && tgN==1)                 // Temporary change for Quasi-Elastic
-		{
+  {
     tgZ=1;
     tgN=1;
@@ -1137,5 +1142,5 @@
   G4int iZ=tgZ-1; // Z index
   if(iZ<0)
-		{
+  {
     iZ=0;         // conversion of the neutron target to the proton target
     tgZ=1;
@@ -1162,5 +1167,5 @@
     G4double ssp=std::sqrt(sp);           // sqrt(sqrt(p))=p^.25
     G4double p2s=p2*sp;
-		  G4double dl1=lp-lastPAR[3];
+    G4double dl1=lp-lastPAR[3];
     theSS=lastPAR[21];
     theS1=(lastPAR[9]+lastPAR[10]*dl1*dl1+lastPAR[11]/p)/(1.+lastPAR[12]/p4)
@@ -1185,6 +1190,6 @@
 
     G4double p2s=p2*sp;
-		  G4double dl1=lp-lastPAR[3];
-		  G4double dl2=lp-lastPAR[8];
+    G4double dl1=lp-lastPAR[3];
+    G4double dl2=lp-lastPAR[8];
     theSS=lastPAR[31];
     theS1=(lastPAR[9]+lastPAR[10]*dl2*dl2)/(1.+lastPAR[11]/p4/p)+
@@ -1214,5 +1219,5 @@
     G4double p16=p8*p8;
     //G4double p24=p16*p8;
-		  G4double dl=lp-5.;
+    G4double dl=lp-5.;
     G4double a=tgZ+tgN;
     G4double pah=std::pow(p,a/2);
@@ -1226,10 +1231,10 @@
       theSS=lastPAR[20]/(1.+lastPAR[21]/p2)+lastPAR[22]/(p6/pa+lastPAR[23]/p16);
       theS2=lastPAR[24]/(pa/p2+lastPAR[25]/p4)+lastPAR[26];
-				  theB2=lastPAR[27]*std::pow(p,lastPAR[28])+lastPAR[29]/(p8+lastPAR[30]/p16);
-				  theS3=lastPAR[31]/(pa*p+lastPAR[32]/pa)+lastPAR[33];
-				  theB3=lastPAR[34]/(p3+lastPAR[35]/p6)+lastPAR[36]/(1.+lastPAR[37]/p2);
-				  theS4=p2*(pah*lastPAR[38]*std::exp(-pah*lastPAR[39])+
+      theB2=lastPAR[27]*std::pow(p,lastPAR[28])+lastPAR[29]/(p8+lastPAR[30]/p16);
+      theS3=lastPAR[31]/(pa*p+lastPAR[32]/pa)+lastPAR[33];
+      theB3=lastPAR[34]/(p3+lastPAR[35]/p6)+lastPAR[36]/(1.+lastPAR[37]/p2);
+      theS4=p2*(pah*lastPAR[38]*std::exp(-pah*lastPAR[39])+
                 lastPAR[40]/(1.+lastPAR[41]*std::pow(p,lastPAR[42])));
-				  theB4=lastPAR[43]*pa/p2/(1.+pa*lastPAR[44]);
+      theB4=lastPAR[43]*pa/p2/(1.+pa*lastPAR[44]);
 #ifdef tdebug
       G4cout<<"G4QElCS::GetTabV: lA, p="<<p<<",S1="<<theS1<<",B1="<<theB1<<",SS="<<theSS
@@ -1246,11 +1251,11 @@
       theSS=lastPAR[21]/(p4/std::pow(p,lastPAR[23])+lastPAR[22]/p4);
       theS2=lastPAR[24]/p4/(std::pow(p,lastPAR[25])+lastPAR[26]/p12)+lastPAR[27];
-				  theB2=lastPAR[28]/std::pow(p,lastPAR[29])+lastPAR[30]/std::pow(p,lastPAR[31]);
-				  theS3=lastPAR[32]/std::pow(p,lastPAR[35])/(1.+lastPAR[36]/p12)+
+      theB2=lastPAR[28]/std::pow(p,lastPAR[29])+lastPAR[30]/std::pow(p,lastPAR[31]);
+      theS3=lastPAR[32]/std::pow(p,lastPAR[35])/(1.+lastPAR[36]/p12)+
             lastPAR[33]/(1.+lastPAR[34]/p6);
-				  theB3=lastPAR[37]/p8+lastPAR[38]/p2+lastPAR[39]/(1.+lastPAR[40]/p8);
-				  theS4=(lastPAR[41]/p4+lastPAR[46]/p)/(1.+lastPAR[42]/p10)+
+      theB3=lastPAR[37]/p8+lastPAR[38]/p2+lastPAR[39]/(1.+lastPAR[40]/p8);
+      theS4=(lastPAR[41]/p4+lastPAR[46]/p)/(1.+lastPAR[42]/p10)+
             (lastPAR[43]+lastPAR[44]*dl*dl)/(1.+lastPAR[45]/p12);
-				  theB4=lastPAR[47]/(1.+lastPAR[48]/p)+lastPAR[49]*p4/(1.+lastPAR[50]*p5);
+      theB4=lastPAR[47]/(1.+lastPAR[48]/p)+lastPAR[49]*p4/(1.+lastPAR[50]*p5);
 #ifdef tdebug
       G4cout<<"G4QElCS::GetTabV: hA, p="<<p<<",S1="<<theS1<<",B1="<<theB1<<",SS="<<theSS
@@ -1276,5 +1281,5 @@
      return (lastPAR[0]*dl*dl+lastPAR[1])/(1.+lastPAR[2]/p)+lastPAR[3]/(p4+lastPAR[4]/p2)+
             lastPAR[5]/(p8+lastPAR[6]/p8)+lastPAR[7]/(p2+lastPAR[8]);
-				//else
+    //else
     //{
     //  G4int nI=nn[iZ];
@@ -1286,6 +1291,6 @@
 #endif
     //    if(kE<nT[iZ][i]) return 0.;    // 0 below the threshold (in MeV)
-				//   if(p<2.) return nX[iZ][i];     // At very low momentum(<2MeV/c) -> only LECS
-    //				return lastPAR[3]/(p4+lastPAR[4]/p2)+lastPAR[5]/(p5+rp16*rp16)+
+    //   if(p<2.) return nX[iZ][i];     // At very low momentum(<2MeV/c) -> only LECS
+    //    return lastPAR[3]/(p4+lastPAR[4]/p2)+lastPAR[5]/(p5+rp16*rp16)+
     //           lastPAR[7]/(p4+lastPAR[8]/p4)+nX[iZ][i]/(1.+lastPAR[51]*p16);
     //  }
@@ -1315,5 +1320,5 @@
   //static const G4double mDeut2= mDeut*mDeut;
   if(tgZ==0 && tgN==1)                 // Temporary change for Quasi-Elastic
-		{
+  {
     tgZ=1;
     tgN=1;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElectronNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElectronNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElectronNuclearCrossSection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QElectronNuclearCrossSection.cc,v 1.13 2008/10/24 19:25:41 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QElectronNuclearCrossSection.cc,v 1.15 2009/05/08 15:16:26 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -33,5 +33,8 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03
 // 
-//================================================================================
+//=================================================================================
+// Short description: reaction cross-sections for electron-nuclear reactions, which
+// are integrals over virtual equivalent photons photons.
+// --------------------------------------------------------------------------------
 
 //#define debug
@@ -90,5 +93,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(std::abs(pPDG)!=11)
@@ -111,7 +114,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -130,5 +133,5 @@
         lastP  =colP [i];                // Last Momentum  (A-dependent)
         lastCS =colCS[i];                // Last CrossSect (A-dependent)
-	//       if(std::fabs(lastP/pMom-1.)<tolerance) // VI (do not use tolerance) 
+ //       if(std::fabs(lastP/pMom-1.)<tolerance) // VI (do not use tolerance) 
         if(lastP == pMom)
         {
@@ -164,7 +167,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QENCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -173,5 +176,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -185,5 +188,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QENCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -201,7 +204,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QENCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -274,13 +277,13 @@
   //if(Z) mP= G4QPDGCode(111).GetNuclMass(Z-1,N,0);
   if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1))
-     	    mP = G4NucleiProperties::GetNuclearMass(A-1.,Z-1.)/MeV; // ResNucMass for a proton
+         mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV;  // ResNucMass for a proton
   G4double mN= infEn;
   //if(N) mN= G4QPDGCode(111).GetNuclMass(Z,N-1,0);
   if(N&&G4NucleiProperties::IsInStableTable(A-1,Z))
-    	    mN = G4NucleiProperties::GetNuclearMass(A-1.,Z-0.)/MeV;  // ResNucMass for a neutron
+         mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV;    // ResNucMass for a neutron
 
   G4double mA= infEn;
   if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2))
-     	    mA = G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV; // ResNucMass for an alpha
+         mA = G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV;// ResNucMass for an alpha
 
   G4double dP= mP +mProt - mT;
@@ -288,5 +291,5 @@
   G4double dA= mA +mAlph - mT;
 #ifdef pdebug
-		G4cout<<"G4QElectronNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="
+  G4cout<<"G4QElectronNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="
         <<mA<<",dA="<<dA<<",mT="<<mT<<",A="<<A<<",Z="<<Z<<G4endl;
 #endif
@@ -318,5 +321,5 @@
   static std::vector <G4double*> J3;   // Vector of pointers to the J3 tabulated functions
 #ifdef pdebug
-		G4cout<<"G4QElectronNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();
+  G4cout<<"G4QElectronNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();
   if(J3.size()) G4cout<<", p="<<J3[0];
   G4cout<<G4endl;
@@ -330,5 +333,5 @@
   lastE=TotEnergy-mel;                 // Kinetic energy of the electron
 #ifdef pdebug
-		G4cout<<"G4QElectronNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ;
+  G4cout<<"G4QElectronNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ;
   if(J3.size()) G4cout<<", p="<<J3[0];
   G4cout<<", N="<<targN<<", onlyCS="<<CS<<",E="<<lastE<<",th="<<EMi<<G4endl;
@@ -338,5 +341,5 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{                                // ...........................................========
+    {                                // ...........................................========
       if (lastE<=EMi)                // Energy is below the minimum energy in the table
       {
@@ -345,5 +348,5 @@
         lastSig=0.;
 #ifdef pdebug
-				    G4cout<<"G4QElectronNucCS::CalcCS: Old CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl;
+        G4cout<<"G4QElectronNucCS::CalcCS: Old CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl;
 #endif
         return 0.;
@@ -354,7 +357,7 @@
       lastF  =colF[I];               // Last ZeroPosition in the J-functions
       lastH  =colH[I];               // Last High Energy Coefficient (A-dependent)
-	   }
-	   else                             // This isotope wasn't calculated previously => CREATE
-	   {
+    }
+    else                             // This isotope wasn't calculated previously => CREATE
+    {
       lastJ1 = new G4double[nE];     // Allocate memory for the new J1 function
       lastJ2 = new G4double[nE];     // Allocate memory for the new J2 function
@@ -375,5 +378,5 @@
       colF.push_back(lastF);
       colH.push_back(lastH);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -384,5 +387,5 @@
     lastSig=0.;
 #ifdef pdebug
-				G4cout<<"G4QElectronNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;
+    G4cout<<"G4QElectronNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;
 #endif
     return 0.;
@@ -398,5 +401,5 @@
 #ifdef pdebug
     G4cout<<"-->G4QElectronNuclearCS::CalcCrossSect:LOGfit b="<<blast<<",max="<<mL<<",lJ1="
-						    <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<",lEmin="<<lEMi<<",d="<<dlnE<<G4endl;
+          <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<",lEmin="<<lEMi<<",d="<<dlnE<<G4endl;
 #endif
     if(blast<0)   blast=0;
@@ -2587,5 +2590,5 @@
               <<y[k]<<",J3="<<z[k]<<G4endl;
 #endif
-	     }
+      }
       r=L[i];                             // Low channel for the J-functions
     }
@@ -2614,5 +2617,5 @@
       r=L[k];
       if(L[k1]<r) r=L[k1];
-	   }
+    }
   }
   return r;
@@ -2648,16 +2651,16 @@
   if(ris<Y[lastL])                      // Search in the table
   {
-	G4int j=lastF;
+ G4int j=lastF;
     G4double Yj=Y[j];                   // It mast be 0 (some times just very small)
     while (ris>Yj && j<lastL)           // Associative search
-	   {
+    {
       j++;
       Yj=Y[j];                          // High value
-	   }
+    }
     G4int j1=j-1;
     G4double Yi=Y[j1];                  // Low value
     phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE;
 #ifdef debug
-	G4cout<<"G4QElectronNucCS::GetExchEn="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="
+ G4cout<<"G4QElectronNucCS::GetExchEn="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="
        <<Yi<<",Y="<<Yj<<G4endl;
 #endif
@@ -2668,9 +2671,9 @@
     G4double f=(ris-Y[lastL])/lastH;    // ScaledResidualValue of the CrossSection integral
 #ifdef pdebug
-	   G4cout<<"G4QElNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;
+    G4cout<<"G4QElNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;
 #endif
     phLE=SolveTheEquation(f);      // Solve equation to find Log(phE) (compare with lastLE)
 #ifdef pdebug
-	   G4cout<<"G4QElectronNuclearCS::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;
+    G4cout<<"G4QElectronNuclearCS::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;
 #endif
   }
@@ -2718,5 +2721,5 @@
 #endif
     if(x>=lastLE)
-	   {
+    {
       G4cerr<<"*G4QElNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE
             <<",f="<<f<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl;
@@ -2806,11 +2809,11 @@
     return 0.;
   }
-  G4double lK=std::log(K);                     // ln(K)
-  G4double x=1.-K/nu;                          // This definitin saves one div.
-  G4double GD=1.+Q2/Q02;                       // Reversed nucleonic form-factor
-  G4double b=std::exp(bp*(lK-blK0));           // b-factor
-  G4double c=std::exp(cp*(lK-clK0));           // c-factor
-  G4double r=.5*std::log(Q2+nu*nu)-lK;         // r=.5*log((Q^2+nu^2)/K^2)
-  G4double ef=std::exp(r*(b-c*r*r));           // exponential factor
+  G4double lK=std::log(K);               // ln(K)
+  G4double x=1.-K/nu;                    // This definitin saves one div.
+  G4double GD=1.+Q2/Q02;                 // Reversed nucleonic form-factor
+  G4double b=std::exp(bp*(lK-blK0));     // b-factor
+  G4double c=std::exp(cp*(lK-clK0));     // c-factor
+  G4double r=.5*std::log(Q2+nu*nu)-lK;   // r=.5*log((Q^2+nu^2)/K^2)
+  G4double ef=std::exp(r*(b-c*r*r));     // exponential factor
   return (1.-x)*ef/GD/GD;
 }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QGluonString.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QGluonString.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QGluonString.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QGluonString.cc,v 1.3 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QGluonString.cc,v 1.4 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QGluonString class -----------------
@@ -31,7 +31,6 @@
 // G4QGluonString class of the CHIPS Simulation Branch in GEANT4
 // ---------------------------------------------------------------
-// ****************************************************************************************
-// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
-// ****************************************************************************************
+// Short description: CHIPS object for the Quark-Gluon String
+// ---------------------------------------------------------------
 
 //#define debug
@@ -206,12 +205,12 @@
           G4int N=pElement->GetIsotope(j)->GetN()-Z; // N means A=N+Z !
           if(pElement->GetIsotope(j)->GetZ()!=Z)G4cerr<<"G4QCaptureAtRest::GetMeanFreePath"
-																																	<<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
+                                 <<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
           G4double abund=abuVector[j];
-								  std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+          std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
           G4cout<<"G4QGluonString::GetMeanFreePath:p#"<<j<<",N="<<N<<",ab="<<abund<<G4endl;
 #endif
           newAbund->push_back(pr);
-						  }
+        }
 #ifdef debug
         G4cout<<"G4QGluonString::PostStepDoIt:pairVectorLength="<<newAbund->size()<<G4endl;
@@ -370,5 +369,5 @@
 #ifdef debug
   G4int prPDG=particle->GetPDGEncoding();
-		G4cout<<"G4QGluonString::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
+  G4cout<<"G4QGluonString::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
 #endif
   if(!projPDG)
@@ -379,5 +378,5 @@
   G4int EPIM=ElProbInMat.size();
 #ifdef debug
-		G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
+  G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
 #endif
   G4int i=0;
@@ -386,7 +385,7 @@
     G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand();
     for(i=0; i<nE; ++i)
-		  {
-#ifdef debug
-				  G4cout<<"G4QGluonString::PostStepDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
+    {
+#ifdef debug
+      G4cout<<"G4QGluonString::PostStDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
 #endif
       if (rnd<ElProbInMat[i]) break;
@@ -397,5 +396,5 @@
   Z=static_cast<G4int>(pElement->GetZ());
 #ifdef debug
-				G4cout<<"G4QGluonString::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
+    G4cout<<"G4QGluonString::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
 #endif
   if(Z<=0)
@@ -408,5 +407,5 @@
   G4int nofIsot=SPI->size();               // #of isotopes in the element i
 #ifdef debug
-		G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
+  G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
 #endif
   G4int j=0;
@@ -417,5 +416,5 @@
     {
 #ifdef debug
-				  G4cout<<"G4QGluonString::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
+      G4cout<<"G4QGluonString::PostStepDoIt:SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl;
 #endif
       if(rndI < (*SPI)[j]) break;
@@ -425,5 +424,5 @@
   G4int N =(*IsN)[j]; ;                    // Randomized number of neutrons
 #ifdef debug
-		G4cout<<"G4QGluonString::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<G4endl;
+  G4cout<<"G4QGluonString::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<G4endl;
 #endif
   if(N<0)
@@ -439,5 +438,5 @@
   if(dsr<dd)dsr=dd;
   if(manualFlag) G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio);// ManualPa
-		//else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP CluPars
+  //else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP CluPars
   //else if(projPDG==-211)  G4QNucleus::SetParameters(.67-dsr,.32-dsr,5.,9.); //Pi- CluPars
 #ifdef debug
@@ -517,5 +516,5 @@
     {
 #ifdef debug
-	     G4cout<<"G4QGluonString::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;
+      G4cout<<"G4QGluonString::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;
 #endif
       delete hadr;
@@ -530,5 +529,5 @@
     {
       if(G4UniformRand()>.5) theDefinition = G4KaonZeroLong::KaonZeroLong();   // K_L
-						else                   theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S
+      else                   theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S
     }
     else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus();
@@ -537,10 +536,10 @@
     else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero();
     else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus();
-	   else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
+    else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
     {
       G4int aZ = hadr->GetCharge();
       G4int aA = hadr->GetBaryonNumber();
 #ifdef pdebug
-						G4cout<<"G4QGluonString::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
+      G4cout<<"G4QGluonString::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
 #endif
       theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ);
@@ -550,9 +549,9 @@
     {
 #ifdef pdebug
-						G4cout<<"G4QGluonString::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;
+      G4cout<<"G4QGluonString::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;
 #endif
       theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode);
 #ifdef pdebug
-						G4cout<<"G4QGluonString::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
+      G4cout<<"G4QGluonString::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
 #endif
     }
@@ -594,9 +593,9 @@
   delete output; // instances of the G4QHadrons from the output are already deleted above +
 #ifdef debug
-		G4cout<<"G4QGluonString::PostStDoIt: afterSt="<<aParticleChange.GetTrackStatus()<<G4endl;
+  G4cout<<"G4QGluonString::PostStDoIt: afterSt="<<aParticleChange.GetTrackStatus()<<G4endl;
 #endif
   aParticleChange.ProposeTrackStatus(fStopAndKill);        // Kill the absorbed particle
 #ifdef debug
-		G4cout<<"G4QGluonString::PostStepDoIt:*** PostStepDoIt is done ***, P="<<aProjPDG
+  G4cout<<"G4QGluonString::PostStepDoIt:*** PostStepDoIt is done ***, P="<<aProjPDG
         <<", St="<<aParticleChange.GetTrackStatus()<<G4endl;
 #endif
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QIonIonCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QIonIonCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QIonIonCrossSection.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 19-Aug-07
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -37,4 +37,6 @@
 // *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch **********
 // ****************************************************************************************
+// Short description: CHIPS cross-sectons for Ion-Ion interactions
+// ---------------------------------------------------------------
 //
 //#define debug
@@ -85,5 +87,5 @@
         <<"),PDG="<<pPDG<<"("<<lastPDG<<"), p="<<pMom<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(!pPDG)
@@ -106,7 +108,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tN && colZ[i]==tZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -129,6 +131,6 @@
         {
 #ifdef pdebug
-          G4cout<<"G4QIonIonCS::GetCS:P="<<pMom<<",InXS="<<lastICS*millibarn<<",ElXS="<<lastECS*millibarn
-                <<G4endl;
+          G4cout<<"G4QIonIonCS::GetCS:P="<<pMom<<",InXS="<<lastICS*millibarn<<",ElXS="
+                <<lastECS*millibarn<<G4endl;
 #endif
           CalculateCrossSection(fCS,-1,j,lastPDG,lastZ,lastN,pMom); // Update param's only
@@ -161,7 +163,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QIICS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -171,5 +173,5 @@
       lastECS=CalculateCrossSection(false,0,j,lastPDG,lastZ,lastN,pMom); //calculate&create
       if(lastICS<=0. || lastECS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tZ, tN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -183,5 +185,5 @@
           lastTH=pMom;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QIICS::GetCS: *New* ICS="<<lastICS<<", ECS="<<lastICS<<",N="<<lastN<<",Z="
@@ -201,7 +203,7 @@
       if(fCS) return lastICS*millibarn;     // Use theLastInelasticCS
       return         lastECS*millibarn;     // Use theLastElasticCS
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QIICS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -286,5 +288,5 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastLENI=LENI[I];              // Pointer to Low Energy inelastic cross sections
       lastHENI=HENI[I];              // Pointer to High Energy inelastic cross sections
@@ -292,6 +294,6 @@
       lastHENE=HENE[I];              // Pointer to High Energy inelastic cross sections
     }
-	   else                             // This isotope wasn't calculated previously => CREATE
-	   {
+    else                             // This isotope wasn't calculated previously => CREATE
+    {
       lastLENI = new G4double[nL];   // Allocate memory for the new LEN cross sections
       lastHENI = new G4double[nH];   // Allocate memory for the new HEN cross sections
@@ -299,5 +301,5 @@
       lastHENE = new G4double[nH];   // Allocate memory for the new HEN cross sections
       G4int er=GetFunctions(pZ,pN,tZ,tN,lastLENI,lastHENI,lastLENE,lastHENE);
-	     if(er<1) G4cerr<<"*W*G4QIonIonCroSec::CalcCrossSection: pA="<<tA<<",tA="<<tA<<G4endl;
+      if(er<1) G4cerr<<"*W*G4QIonIonCroSec::CalcCrossSection: pA="<<tA<<",tA="<<tA<<G4endl;
 #ifdef debug
       G4cout<<"G4QIonIonCrossSection::CalcCS: GetFunctions er="<<er<<",pA="<<pA<<",tA="<<tA
@@ -311,16 +313,16 @@
       LENE.push_back(lastLENE);      // added LEN Elastic
       HENE.push_back(lastHENE);      // added HEN Elastic
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW the Magic Formula =================================
   if (Momentum<lastTH) return 0.;    // It must be already checked in the interface class
-		else if (Momentum<Pmin)            // LEN region (approximated in E, not in lnE)
+  else if (Momentum<Pmin)            // LEN region (approximated in E, not in lnE)
   {
 #ifdef debug
-	   G4cout<<"G4QIICS::CalCS:p="<<pA<<",t="<<tA<<",n="<<nL<<",T="<<THmin<<",d="<<dP<<G4endl;
+    G4cout<<"G4QIICS::CalCS:p="<<pA<<",t="<<tA<<",n="<<nL<<",T="<<THmin<<",d="<<dP<<G4endl;
 #endif
     if(tA<1. || pA<1.)
     {
-  	   G4cout<<"-Warning-G4QIICS::CalcCS: pA="<<pA<<" or tA="<<tA<<" aren't nuclei"<<G4endl;
+      G4cout<<"-Warning-G4QIICS::CalcCS: pA="<<pA<<" or tA="<<tA<<" aren't nuclei"<<G4endl;
       sigma=0.;
     }
@@ -331,5 +333,5 @@
     }
 #ifdef debugn
-	   if(sigma<0.) G4cout<<"-Warning-G4QIICS::CalcCS:pA="<<pA<<",tA="<<tA<<",XS="<<XS<<",P="
+    if(sigma<0.) G4cout<<"-Warning-G4QIICS::CalcCS:pA="<<pA<<",tA="<<tA<<",XS="<<XS<<",P="
                        <<Momentum<<", Th="<<THmin<<", dP="<<dP<<G4endl;
 #endif
@@ -343,5 +345,5 @@
     if(tA<=1. || pA<=1.)
     {
-  	   G4cout<<"-Warning-G4QIICS::CalcCS:pA="<<pA<<"or tA="<<tA<<" aren't composit"<<G4endl;
+      G4cout<<"-Warning-G4QIICS::CalcCS:pA="<<pA<<"or tA="<<tA<<" aren't composit"<<G4endl;
       sigma=0.;
     }
@@ -354,5 +356,5 @@
   else                                      // UltraHighE region (not frequent)
   {
-				std::pair<G4double, G4double> inelel = CalculateXS(pZ, pN, tZ, tN, Momentum);
+    std::pair<G4double, G4double> inelel = CalculateXS(pZ, pN, tZ, tN, Momentum);
     if(XS) sigma=inelel.first;
     else   sigma=inelel.second;
@@ -423,5 +425,5 @@
   G4double elCS=0.;
   if(pA<1.1 || tA<1.1) // Ion-nucleon/nucleon-ion interaction use NA(in,el)
-		{
+  {
     if ( (pZ == 1 && !pN) || (tZ == 1 && !tN) ) // proton-nuclear
     {
@@ -434,8 +436,8 @@
       inCS=ElCSman->GetCrossSection(true, Mom, tZ, tN, 2112);
     }
-				else G4cerr<<"-Warn-G4QIICS::CaCS:pZ="<<pZ<<",pN="<<pN<<",tZ="<<tZ<<",tN="<<tN<<G4endl;
+    else G4cerr<<"-Warn-G4QIICS::CaCS:pZ="<<pZ<<",pN="<<pN<<",tZ="<<tZ<<",tN="<<tN<<G4endl;
   }
   else
-		{
+  {
     G4double P2=Mom*Mom;
     G4double P4=P2*P2;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QIonIonElastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QIonIonElastic.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QIonIonElastic.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QIonIonElastic.cc,v 1.3 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QIonIonElastic.cc,v 1.4 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QIonIonElastic class -----------------
@@ -34,4 +34,7 @@
 // ********** This CLASS is temporary moved from the photolepton_hadron directory *********
 // ****************************************************************************************
+// Short description: a simple process for the Ion-Ion elastic scattering.
+// For heavy by heavy ions it can reach 50% of the total cross-section.
+// -----------------------------------------------------------------------
 
 //#define debug
@@ -153,10 +156,10 @@
                                          <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
           G4double abund=abuVector[j];
-								  std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+          std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
           G4cout<<"G4QIonIonElastic::GetMeanFP:pair#="<<j<<",N="<<N<<",ab="<<abund<<G4endl;
 #endif
           newAbund->push_back(pr);
-						  }
+        }
 #ifdef debug
         G4cout<<"G4QIonIonElastic::GetMeanFP: pairVectorLength="<<newAbund->size()<<G4endl;
@@ -185,5 +188,5 @@
       G4cout<<"G4QIIEl::GMFP:true,P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl;
 #endif
-		    G4bool ccsf=false;                    // Extract elastic Ion-Ion cross-section
+      G4bool ccsf=false;                    // Extract elastic Ion-Ion cross-section
 #ifdef debug
       G4cout<<"G4QIonIonElastic::GMFP: GetCS #1 j="<<j<<G4endl;
@@ -232,5 +235,5 @@
   static G4bool CWinit = true;                   // CHIPS Warld needs to be initted
   if(CWinit)
-		{
+  {
     CWinit=false;
     G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
@@ -292,5 +295,5 @@
 #ifdef debug
   G4int prPDG=particle->GetPDGEncoding();
-		G4cout<<"G4QIonIonElastic::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
+  G4cout<<"G4QIonIonElastic::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
 #endif
   if(!projPDG)
@@ -304,5 +307,5 @@
   G4int EPIM=ElProbInMat.size();
 #ifdef debug
-		G4cout<<"G4QIonIonElastic::PSDI:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
+  G4cout<<"G4QIonIonElastic::PSDI:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
 #endif
   G4int i=0;
@@ -311,7 +314,7 @@
     G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand();
     for(i=0; i<nE; ++i)
-		  {
-#ifdef debug
-				  G4cout<<"G4QIonIonElastic::PSDI: EPM["<<i<<"]="<<ElProbInMat[i]<<", r="<<rnd<<G4endl;
+    {
+#ifdef debug
+      G4cout<<"G4QIonIonElastic::PSDI: EPM["<<i<<"]="<<ElProbInMat[i]<<", r="<<rnd<<G4endl;
 #endif
       if (rnd<ElProbInMat[i]) break;
@@ -322,5 +325,5 @@
   Z=static_cast<G4int>(pElement->GetZ());
 #ifdef debug
-				G4cout<<"G4QIonIonElastic::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
+    G4cout<<"G4QIonIonElastic::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
 #endif
   if(Z<=0)
@@ -333,5 +336,5 @@
   G4int nofIsot=SPI->size();               // #of isotopes in the element i
 #ifdef debug
-		G4cout<<"G4QIonIonElastic::PosStDoIt: nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
+  G4cout<<"G4QIonIonElastic::PosStDoIt: nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;
 #endif
   G4int j=0;
@@ -342,5 +345,5 @@
     {
 #ifdef debug
-				  G4cout<<"G4QIonIonElastic::PostStDI: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
+      G4cout<<"G4QIonIonElastic::PostStDI: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;
 #endif
       if(rndI < (*SPI)[j]) break;
@@ -350,5 +353,5 @@
   G4int N =(*IsN)[j]; ;                    // Randomized number of neutrons
 #ifdef debug
-		G4cout<<"G4QIonIonElastic::PostStepDoIt:j="<<i<<",N(isotope)="<<N<<", MeV="<<MeV<<G4endl;
+  G4cout<<"G4QIonIonElastic::PostStepDoIt:j="<<i<<",N(isotope)="<<N<<", MeV="<<MeV<<G4endl;
 #endif
   if(N<0)
@@ -492,8 +495,8 @@
   EnMomConservation-=scat4M;                        // It must be initialized by (pE+tM,pP)
   // This is how in general the secondary should be identified
-		G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 
+  G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 
   G4int aA = Z+N;
 #ifdef pdebug
-		G4cout<<"G4QIonIonElastic::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;
+  G4cout<<"G4QIonIonElastic::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;
 #endif
   G4ParticleDefinition* theDefinition=G4ParticleTable::GetParticleTable()
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QLowEnergy.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QLowEnergy.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QLowEnergy.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4QLowEnergy.cc,v 1.7 2008/10/02 21:10:07 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QLowEnergy.cc,v 1.9 2009/03/09 15:41:17 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //      ---------------- G4QLowEnergy class -----------------
@@ -31,7 +31,9 @@
 // G4QLowEnergy class of the CHIPS Simulation Branch in GEANT4
 // ---------------------------------------------------------------
-// ****************************************************************************************
-// ********** This CLASS is temporary moved from the "chips/interface" directory *********
-// ****************************************************************************************
+// Short description: This is a fast low energy algorithm for the
+// inelastic interactions of nucleons and nuclei (ions) with nuclei.
+// This is a fase-space algorithm, but not quark level. Provides
+// nuclear fragments upto alpha only. Never was tumed (but can be).
+// ---------------------------------------------------------------
 
 //#define debug
@@ -93,8 +95,7 @@
   G4cout<<"G4QLowEnergy::GetMeanFreePath:"<<nE<<" Elems"<<G4endl;
 #endif
-  G4VQCrossSection* CSmanager=G4QIonIonCrossSection::GetPointer();
   G4int pPDG=0;
-  // @@ At present it is made only for n & p, but can be extended if inXS are available
-  if      ( incidentParticleDefinition ==  G4Deuteron::Deuteron()     ) pPDG = 100001002;
+  if      ( incidentParticleDefinition ==  G4Proton::Proton()         ) pPDG = 2212;
+  else if ( incidentParticleDefinition ==  G4Deuteron::Deuteron()     ) pPDG = 100001002;
   else if ( incidentParticleDefinition ==  G4Alpha::Alpha()           ) pPDG = 100002004;
   else if ( incidentParticleDefinition ==  G4Triton::Triton()         ) pPDG = 100001003;
@@ -110,5 +111,7 @@
 #endif
   }
-  else G4cout<<"-Warning-G4QLowEnergy::GetMeanFreePath: only AA are implemented"<<G4endl;  
+  else G4cout<<"-Warning-G4QLowEnergy::GetMeanFreePath: only AA & pA implemented"<<G4endl;
+  G4VQCrossSection* CSmanager=G4QIonIonCrossSection::GetPointer();
+  if(pPDG == 2212) CSmanager=G4QProtonNuclearCrossSection::GetPointer();
   Momentum/=incidentParticleDefinition->GetBaryonNumber(); // Divide Mom by projectile A
   G4QIsotope* Isotopes = G4QIsotope::Get(); // Pointer to the G4QIsotopes singleton
@@ -157,10 +160,10 @@
                                          <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
           G4double abund=abuVector[j];
-								  std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
+          std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
 #ifdef debug
           G4cout<<"G4QLowEnergy::GetMeanFreePath:pair#"<<j<<",N="<<N<<",a="<<abund<<G4endl;
 #endif
           newAbund->push_back(pr);
-						  }
+        }
 #ifdef debug
         G4cout<<"G4QLowEnergy::GetMeanFreePath: pairVectLength="<<newAbund->size()<<G4endl;
@@ -189,5 +192,5 @@
       G4cout<<"G4QLowE::GMFP:true,P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl;
 #endif
-		    G4bool ccsf=true;                    // Extract inelastic Ion-Ion cross-section
+      G4bool ccsf=true;                    // Extract inelastic Ion-Ion cross-section
 #ifdef debug
       G4cout<<"G4QLowEnergy::GMFP: GetCS #1 j="<<j<<G4endl;
@@ -256,5 +259,5 @@
   static G4bool CWinit = true;                       // CHIPS Warld needs to be initted
   if(CWinit)
-		{
+  {
     CWinit=false;
     G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
@@ -314,5 +317,5 @@
 #ifdef debug
   G4int prPDG=particle->GetPDGEncoding();
-		G4cout<<"G4QLowEnergy::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
+  G4cout<<"G4QLowEnergy::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
 #endif
   if(!projPDG)
@@ -321,8 +324,8 @@
     return 0;
   }
-		// Element treatment
+  // Element treatment
   G4int EPIM=ElProbInMat.size();
 #ifdef debug
-		G4cout<<"G4QLowEn::PostStDoIt: m="<<EPIM<<", n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
+  G4cout<<"G4QLowEn::PostStDoIt: m="<<EPIM<<", n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
 #endif
   G4int i=0;
@@ -331,7 +334,7 @@
     G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand();
     for(i=0; i<nE; ++i)
-		  {
-#ifdef debug
-				  G4cout<<"G4QLowEn::PostStepDoIt: EPM["<<i<<"]="<<ElProbInMat[i]<<", r="<<rnd<<G4endl;
+    {
+#ifdef debug
+      G4cout<<"G4QLowEn::PostStepDoIt: EPM["<<i<<"]="<<ElProbInMat[i]<<", r="<<rnd<<G4endl;
 #endif
       if (rnd<ElProbInMat[i]) break;
@@ -342,5 +345,5 @@
   G4int tZ=static_cast<G4int>(pElement->GetZ());
 #ifdef debug
-				G4cout<<"G4QLowEnergy::PostStepDoIt: i="<<i<<", Z(element)="<<tZ<<G4endl;
+    G4cout<<"G4QLowEnergy::PostStepDoIt: i="<<i<<", Z(element)="<<tZ<<G4endl;
 #endif
   if(tZ<=0)
@@ -353,5 +356,5 @@
   G4int nofIsot=SPI->size();               // #of isotopes in the element i
 #ifdef debug
-		G4cout<<"G4QLowEnergy::PostStepDoIt: nI="<<nofIsot<<", T="<<(*SPI)[nofIsot-1]<<G4endl;
+  G4cout<<"G4QLowEnergy::PostStepDoIt: nI="<<nofIsot<<", T="<<(*SPI)[nofIsot-1]<<G4endl;
 #endif
   G4int j=0;
@@ -362,5 +365,5 @@
     {
 #ifdef debug
-				  G4cout<<"G4QLowEnergy::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl;
+      G4cout<<"G4QLowEnergy::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl;
 #endif
       if(rndI < (*SPI)[j]) break;
@@ -370,5 +373,5 @@
   G4int tN =(*IsN)[j]; ;                    // Randomized number of neutrons
 #ifdef debug
-		G4cout<<"G4QLowEnergy::PostStepDoIt: j="<<i<<", N(isotope)="<<tN<<", MeV="<<MeV<<G4endl;
+  G4cout<<"G4QLowEnergy::PostStepDoIt: j="<<i<<", N(isotope)="<<tN<<", MeV="<<MeV<<G4endl;
 #endif
   if(tN<0)
@@ -451,5 +454,5 @@
   // algorithm implementation --- STARTS HERE --- All calculations are in IU --------
   G4double totM=tot4M.m(); // total CMS mass of the reaction
-		G4int totN=tN+pN;
+  G4int totN=tN+pN;
   G4int totZ=tZ+pZ;
   // @@ Here mass[i] can be calculated if mass=0
@@ -980,8 +983,8 @@
   if(!G4QHadron(tot4M).CopDecayIn3(fst4Mom,snd4Mom,res4Mom,dir4Mom,cosp))
   {                   //                                          
-		  G4cerr<<"**G4LowEnergy::PoStDoIt:i="<<index<<",tM="<<totM<<"->M1="<<res4Mom.m()<<"+M2="
+    G4cerr<<"**G4LowEnergy::PoStDoIt:i="<<index<<",tM="<<totM<<"->M1="<<res4Mom.m()<<"+M2="
      <<fst4Mom.m()<<"+M3="<<snd4Mom.m()<<"=="<<res4Mom.m()+fst4Mom.m()+snd4Mom.m()<<G4endl;
     throw G4QException("G4QLowEnergy::PostStepDoIt: Can't decay the Compound");
-		}                   //                                          
+  }                   //                                          
 #ifdef debug
   G4cout<<"G4QLowEn::PSDI:r4M="<<res4Mom<<",f4M="<<fst4Mom<<",s4M="<<snd4Mom<<G4endl;
@@ -1075,8 +1078,9 @@
   {
     CSmanager=G4QIonIonCrossSection::GetPointer();
+    if(PDG == 2212) CSmanager=G4QProtonNuclearCrossSection::GetPointer();
     first=false;
   }
 #ifdef debug
-		G4cout<<"G4QLowE::CXS: *DONE* p="<<p<<",Z="<<Z<<",N="<<N<<",PDG="<<PDG<<G4endl;
+  G4cout<<"G4QLowE::CXS: *DONE* p="<<p<<",Z="<<Z<<",N="<<N<<",PDG="<<PDG<<G4endl;
 #endif
   return CSmanager->GetCrossSection(true, p, Z, N, PDG);
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QMuonNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QMuonNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QMuonNuclearCrossSection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QMuonNuclearCrossSection.cc,v 1.13 2008/10/24 19:24:59 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QMuonNuclearCrossSection.cc,v 1.15 2009/05/08 15:16:26 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -38,4 +38,8 @@
 // ****************************************************************************************
 //=========================================================================================
+// Short description: reaction cross-sections for muon-nuclear reactions, which
+// are integrals over virtual equivalent photons photons. The muon-nuclear GHAD
+// model (not CHIPS) gives 2-3 times smaller scattering angle and deposited energy.
+// --------------------------------------------------------------------------------
 
 //#define debug
@@ -94,5 +98,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(std::abs(pPDG)!=13)
@@ -115,7 +119,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -134,5 +138,5 @@
         lastP  =colP [i];                // Last Momentum  (A-dependent)
         lastCS =colCS[i];                // Last CrossSect (A-dependent)
-	//        if(std::fabs(lastP/pMom-1.)<tolerance)
+ //        if(std::fabs(lastP/pMom-1.)<tolerance)
         if(lastP==pMom)                  // VI do not use tolerance
         {
@@ -168,7 +172,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QMNCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -177,5 +181,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -189,5 +193,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QMNCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -205,7 +209,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -277,13 +281,13 @@
   G4double mP= infEn;
   if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1))
-     	    mP = G4NucleiProperties::GetNuclearMass(A-1.,Z-1.)/MeV; // ResNucMass for a proton
+          mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV;// ResNucMass for a proton
 
   G4double mN= infEn;
   if(N&&G4NucleiProperties::IsInStableTable(A-1,Z))
-    	    mN = G4NucleiProperties::GetNuclearMass(A-1.,Z)/MeV;  // ResNucMass for a neutron
+          mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV;  // ResNucMass for a neutron
 
   G4double mA= infEn;
   if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2))
-     	    mA=G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV; // ResNucMass for an alpha
+          mA=G4NucleiProperties::GetNuclearMass(A-4,Z-2)/MeV;  // ResNucMass for an alpha
 
   G4double dP= mP +mProt - mT;
@@ -291,5 +295,5 @@
   G4double dA= mA +mAlph - mT;
 #ifdef pdebug
-		G4cout<<"G4QMuonNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="
+  G4cout<<"G4QMuonNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="
         <<mA<<",dA="<<dA<<",mT="<<mT<<",A="<<A<<",Z="<<Z<<G4endl;
 #endif
@@ -321,5 +325,5 @@
   static std::vector <G4double*> J3;   // Vector of pointers to the J3 tabulated functions
 #ifdef pdebug
-		G4cout<<"G4QMuonNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();
+  G4cout<<"G4QMuonNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();
   if(J3.size()) G4cout<<", p="<<J3[0];
   G4cout<<G4endl;
@@ -333,5 +337,5 @@
   lastE=TotEnergy-mmu;               // Kinetic energy of the muon
 #ifdef pdebug
-		G4cout<<"G4QMuonNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ
+  G4cout<<"G4QMuonNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ
         <<", N="<<targN<<", onlyCS="<<CS<<",E="<<lastE<<",th="<<EMi<<G4endl;
 #endif
@@ -340,5 +344,5 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-			 {                                // ...........................................========
+    {                                // ...........................................========
       if (lastE<=EMi)                // Energy is below the minimum energy in the table
       {
@@ -347,5 +351,5 @@
         lastSig=0.;
 #ifdef pdebug
-				    G4cout<<"--> G4QMuonNucCS::CalcCS: Old CS=0  as lastE="<<lastE<<" < "<<EMi<<G4endl;
+        G4cout<<"--> G4QMuonNucCS::CalcCS: Old CS=0  as lastE="<<lastE<<" < "<<EMi<<G4endl;
 #endif
         return 0.;
@@ -356,7 +360,7 @@
       lastF  =colF[I];               // Last ZeroPosition in the J-functions
       lastH  =colH[I];               // Last High Energy Coefficient (A-dependent)
-	   }
-	   else                             // This isotope wasn't calculated previously => CREATE
-			 {                                // ............................................=======
+    }
+    else                             // This isotope wasn't calculated previously => CREATE
+    {                                // ............................................=======
       lastJ1 = new G4double[nE];     // Allocate memory for the new J1 function
       lastJ2 = new G4double[nE];     // Allocate memory for the new J2 function
@@ -375,5 +379,5 @@
       colF.push_back(lastF);
       colH.push_back(lastH);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -384,5 +388,5 @@
     lastSig=0.;
 #ifdef pdebug
-				G4cout<<"--> G4QMuonNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;
+    G4cout<<"--> G4QMuonNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;
 #endif
     return 0.;
@@ -398,5 +402,5 @@
 #ifdef pdebug
     G4cout<<"-->G4QMuonNuclearCS::CalcCrossSect:LOGfit b="<<blast<<",max="<<mL<<",lJ1="
-				      <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<G4endl;
+          <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<G4endl;
 #endif
     if(blast<0)   blast=0;
@@ -2572,5 +2576,5 @@
         y[k]=P1[i][k];                 // J1
         z[k]=P2[i][k];                 // J2
-	     }
+      }
       r=L[i];                          // Low channel for the J-functions
     }
@@ -2595,5 +2599,5 @@
       r=L[k];
       if(L[k1]<r) r=L[k1];
-	   }
+    }
   }
   return r;
@@ -2629,16 +2633,16 @@
   if(ris<Y[lastL])                      // Search in the table
   {
-	   G4int j=lastF;
+    G4int j=lastF;
     G4double Yj=Y[j];                   // It mast be 0 (some times just very small)
     while (ris>Yj && j<lastL)           // Associative search
-	   {
+    {
       j++;
       Yj=Y[j];                          // High value
-	   }
+    }
     G4int j1=j-1;
     G4double Yi=Y[j1];                  // Low value
     phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE;
 #ifdef debug
-	   G4cout<<"G4QMuNuclearCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi
+    G4cout<<"G4QMuNuclearCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi
           <<",Y="<<Yj<<G4endl;
 #endif
@@ -2650,9 +2654,9 @@
     G4double f=(ris-Y[lastL])/lastH;    // ScaledResidualValue of the cross-sec. integral
 #ifdef pdebug
-   	G4cout<<"G4QMuNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;
+    G4cout<<"G4QMuNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;
 #endif
     phLE=SolveTheEquation(f);           // Solve equation to find theLog(phE) (comp lastLE)
 #ifdef pdebug
-	   G4cout<<"G4QMuonNuclearCrossSection::GetExchangeEnergy:HighEnergy lphE="<<phLE<<G4endl;
+    G4cout<<"G4QMuonNuclearCrossSection::GetExchangeEnergy:HighEnergy lphE="<<phLE<<G4endl;
 #endif
   }
@@ -2701,5 +2705,5 @@
 #endif
     if(x>=lastLE)
-	   {
+    {
       G4cerr<<"*G4QMuNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE
             <<",f="<<f<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl;
@@ -2789,11 +2793,11 @@
     return 0.;
   }
-  G4double lK=std::log(K);                     // ln(K)
+  G4double lK=std::log(K);                // ln(K)
   G4double x=1.-K/nu;                     // This definitin saves one div.
   G4double GD=1.+Q2/Q02;                  // Reversed nucleonic form-factor
-  G4double b=std::exp(bp*(lK-blK0));           // b-factor
-  G4double c=std::exp(cp*(lK-clK0));           // c-factor
-  G4double r=.5*std::log(Q2+nu*nu)-lK;         // r=.5*log((Q^2+nu^2)/K^2)
-  G4double ef=std::exp(r*(b-c*r*r));           // exponential factor
+  G4double b=std::exp(bp*(lK-blK0));      // b-factor
+  G4double c=std::exp(cp*(lK-clK0));      // c-factor
+  G4double r=.5*std::log(Q2+nu*nu)-lK;    // r=.5*log((Q^2+nu^2)/K^2)
+  G4double ef=std::exp(r*(b-c*r*r));      // exponential factor
   return (1.-x)*ef/GD/GD;
 }
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNeutronNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNeutronNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNeutronNuclearCrossSection.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -34,8 +34,6 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Feb-04
 // --------------------------------------------------------------------------------
-// ****************************************************************************************
-// ****** This CLASS is a property of the CHIPS hadronic package in Geant4 (M. Kosov) *****
-// *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch **********
-// ****************************************************************************************
+// Short description: neutron-nuclear cross-section for hadronic CHIPS
+// -------------------------------------------------------------------
 //
 //#define debug
@@ -49,5 +47,5 @@
 // Initialization of the
 G4double* G4QNeutronNuclearCrossSection::lastLEN=0; // Pointer to the lastArray of LowEn CS
-G4double* G4QNeutronNuclearCrossSection::lastHEN=0; // Pointer to the lastArray of HighEn CS
+G4double* G4QNeutronNuclearCrossSection::lastHEN=0; // Pointer to the lastArray of HighE CS
 G4int     G4QNeutronNuclearCrossSection::lastN=0;   // The last N of calculated nucleus
 G4int     G4QNeutronNuclearCrossSection::lastZ=0;   // The last Z of calculated nucleus
@@ -91,7 +89,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) // The partType is found
-	   {                                  // The nucleus with is found in AMDB
+    {                                  // The nucleus with is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -108,5 +106,5 @@
         lastP  =colP [i];                // Last Momentum  (A-dependent)
         lastCS =colCS[i];                // Last CrossSect (A-dependent)
-	//        if(std::fabs(lastP/pMom-1.)<tolerance)
+ //        if(std::fabs(lastP/pMom-1.)<tolerance)
         if(lastP==pMom)                 // VI do not use tolerance
         {
@@ -140,7 +138,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QNtCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -149,5 +147,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,2212,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -161,5 +159,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QNtCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -174,7 +172,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QNeutronNuclearCrossSect::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -228,5 +226,5 @@
   static const G4double malP=std::log(Pmax);// High logarithm energy (each 2.75 percent)
   static const G4double dlP=(malP-milP)/(nH-1); // Step in log energy in the HEN part
-  static const G4double milPG=std::log(.001*Pmin);// Low logarithm energy for the HEN part GeV/c
+  static const G4double milPG=std::log(.001*Pmin);// Low logEnergy for the HEN part GeV/c
   //
   // Associative memory for acceleration
@@ -244,10 +242,10 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastLEN=LEN[I];                // Pointer to prepared LowEnergy cross sections
       lastHEN=HEN[I];                // Pointer to prepared High Energy cross sections
     }
-	   else                             // This isotope wasn't calculated previously => CREATE
-	   {
+    else                             // This isotope wasn't calculated previously => CREATE
+    {
       lastLEN = new G4double[nL];    // Allocate memory for the new LEN cross sections
       lastHEN = new G4double[nH];    // Allocate memory for the new HEN cross sections
@@ -271,5 +269,5 @@
       LEN.push_back(lastLEN);          // added LEN, found by AH 10/7/02
       HEN.push_back(lastHEN);          // added HEN, found by AH 10/7/02
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW the Magic Formula =================================
@@ -278,10 +276,10 @@
   {
 #ifdef debug
-	   G4cout<<"G4QNeutCS::CalcCS:bLEN A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dP="<<dP<<G4endl;
+    G4cout<<"G4QNeutCS::CalcCS:bLEN A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dP="<<dP<<G4endl;
 #endif
     if(A<=1.) sigma=0.;
     else      sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
 #ifdef debugn
-	   if(sigma<0.)
+    if(sigma<0.)
       G4cout<<"G4QNeutCS::CalcCS:A="<<A<<",E="<<Momentum<<",T="<<THmin<<",dP="<<dP<<G4endl;
 #endif
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuENuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuENuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuENuclearCrossSection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QNuENuclearCrossSection.cc,v 1.2 2007/11/01 16:09:38 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QNuENuclearCrossSection.cc,v 1.4 2009/05/08 15:16:26 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -37,5 +37,5 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
-//===============================================================================================
+//=========================================================================================
 
 //#define debug
@@ -90,5 +90,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(pPDG!=12)
@@ -111,7 +111,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -163,7 +163,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QNENCS::GetCrSec: CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -172,5 +172,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -184,5 +184,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QNENCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -200,7 +200,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QNENCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -245,7 +245,7 @@
 G4double G4QNuENuclearCrossSection::ThresholdEnergy(G4int Z, G4int N, G4int)
 {
-  //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1.,0.)/GeV;
-  //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1.,1.)/GeV;
-  //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2.,1.)/GeV/2.;
+  //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/GeV;
+  //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/GeV;
+  //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2,1)/GeV/2.;
   static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
   static const G4double dmN=mN+mN;    // Doubled nucleon mass (2*AtomicMassUnit, GeV)
@@ -294,10 +294,10 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastTX =TX[I];                 // Pointer to the prepared TX function (same isotope)
       lastQE =QE[I];                 // Pointer to the prepared QE function (same isotope)
-	  }
-	  else                              // This isotope wasn't calculated previously => CREATE
-	  {
+   }
+   else                              // This isotope wasn't calculated previously => CREATE
+   {
       if(first)
       {
@@ -315,5 +315,5 @@
       TX.push_back(lastTX);
       QE.push_back(lastQE);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -330,5 +330,5 @@
     G4int sep=ran;  // as a result = an index of the left edge of the interval
     while(ran>=2)
-				{
+    {
       G4int newran=ran/2;
       if(lastE<=lastEN[sep]) sep-=newran;
@@ -382,35 +382,35 @@
   static const G4int nE=65; // !! If change this, change it in CalculateCrossSection() !!
   static const G4double nuEn[nE]={thresh,
-.00051331,.00053602,.00056078,.00058783,.00061743,.00064990,.00068559,.00072492,
-.00076834,.00081641,.00086975,.00092912,.00099536,.00106950,.00115273,.00124646,
-.00135235,.00147241,.00160901,.00176503,.00194392,.00214986,.00238797,.00266448,
-.00298709,.00336531,.00381094,.00433879,.00496745,.00572047,.00662785,.00772806,
-.00907075,.01072050,.01276190,.01530660,.01850330,.02255110,.02771990,.03437780,
-.04303240,.05438970,.06944210,.08959920,.11688400,.15423600,.20597200,.27851200,
-.38153100,.52979600,.74616300,1.0665200,1.5480900,2.2834800,3.4251100,5.2281000,
-8.1270200,12.875900,20.808500,34.331200,57.877800,99.796200,176.16300,318.68200};
+    .00051331,.00053602,.00056078,.00058783,.00061743,.00064990,.00068559,.00072492,
+    .00076834,.00081641,.00086975,.00092912,.00099536,.00106950,.00115273,.00124646,
+    .00135235,.00147241,.00160901,.00176503,.00194392,.00214986,.00238797,.00266448,
+    .00298709,.00336531,.00381094,.00433879,.00496745,.00572047,.00662785,.00772806,
+    .00907075,.01072050,.01276190,.01530660,.01850330,.02255110,.02771990,.03437780,
+    .04303240,.05438970,.06944210,.08959920,.11688400,.15423600,.20597200,.27851200,
+    .38153100,.52979600,.74616300,1.0665200,1.5480900,2.2834800,3.4251100,5.2281000,
+    8.1270200,12.875900,20.808500,34.331200,57.877800,99.796200,176.16300,318.68200};
   static const G4double TOTX[nE]={0.,
-.00047551,.00162896,.00232785,.00292938,.00349456,.00404939,.00460908,.00518455,
-.00578488,.00641848,.00709376,.00781964,.00860585,.00946334,.01040460,.01144420,
-.01259910,.01388920,.01533830,.01697480,.01883260,.02095280,.02338500,.02618960,
-.02944060,.03322870,.03766580,.04289050,.04907540,.06123530,.07521120,.09034730,
-.10803800,.12856800,.15277600,.18174900,.21764300,.26083100,.31424900,.37935600,
-.45871900,.55375100,.66506600,.79039400,.92276600,1.0489000,1.1500300,1.2071700,
-1.2096800,1.1612200,1.0782900,.98251100,.89137400,.81472700,.75500100,.71061200,
-.67873900,.65619000,.64098400,.63085100,.62389900,.61664900,.61261000,.60635700};
+    .00047551,.00162896,.00232785,.00292938,.00349456,.00404939,.00460908,.00518455,
+    .00578488,.00641848,.00709376,.00781964,.00860585,.00946334,.01040460,.01144420,
+    .01259910,.01388920,.01533830,.01697480,.01883260,.02095280,.02338500,.02618960,
+    .02944060,.03322870,.03766580,.04289050,.04907540,.06123530,.07521120,.09034730,
+    .10803800,.12856800,.15277600,.18174900,.21764300,.26083100,.31424900,.37935600,
+    .45871900,.55375100,.66506600,.79039400,.92276600,1.0489000,1.1500300,1.2071700,
+    1.2096800,1.1612200,1.0782900,.98251100,.89137400,.81472700,.75500100,.71061200,
+    .67873900,.65619000,.64098400,.63085100,.62389900,.61664900,.61261000,.60635700};
   static const G4double QELX[nE]={0.,
-2.44084e-7,8.73147e-7,1.30540e-6,1.72196e-6,2.15765e-6,2.63171e-6,3.15996e-6,3.75836e-6,
-4.44474e-6,5.24008e-6,6.16982e-6,7.26537e-6,8.56595e-6,1.01211e-5,1.19937e-5,1.42647e-5,
-1.70384e-5,2.04506e-5,2.46796e-5,2.99611e-5,3.66090e-5,4.50456e-5,5.58425e-5,6.97817e-5,
-8.79417e-5,.000111825,.000143542,.000186093,.000243780,.000350295,.000498489,.000698209,
-.000979989,.001378320,.001949710,.002781960,.004027110,.005882030,.008710940,.013041400,
-.019739800,.030118300,.046183600,.070818700,.107857000,.161778000,.236873000,.336212000,
-.455841000,.565128000,.647837000,.701208000,.729735000,.742062000,.746495000,.748182000,
-.749481000,.750637000,.751471000,.752237000,.752763000,.753103000,.753159000,.753315000};
+  2.44084e-7,8.73147e-7,1.30540e-6,1.72196e-6,2.15765e-6,2.63171e-6,3.15996e-6,3.75836e-6,
+  4.44474e-6,5.24008e-6,6.16982e-6,7.26537e-6,8.56595e-6,1.01211e-5,1.19937e-5,1.42647e-5,
+  1.70384e-5,2.04506e-5,2.46796e-5,2.99611e-5,3.66090e-5,4.50456e-5,5.58425e-5,6.97817e-5,
+  8.79417e-5,.000111825,.000143542,.000186093,.000243780,.000350295,.000498489,.000698209,
+  .000979989,.001378320,.001949710,.002781960,.004027110,.005882030,.008710940,.013041400,
+  .019739800,.030118300,.046183600,.070818700,.107857000,.161778000,.236873000,.336212000,
+  .455841000,.565128000,.647837000,.701208000,.729735000,.742062000,.746495000,.748182000,
+  .749481000,.750637000,.751471000,.752237000,.752763000,.753103000,.753159000,.753315000};
 
   // --------------------------------
   G4int first=0;
   if(z<0.)
-		{
+  {
     first=1;
     z=-z;
@@ -431,5 +431,5 @@
     t[k]=TOTX[k]*nuEn[k]*(na+na)/ta+QELX[k]*(dn+dn-da)/ta; // TotalCrossSection
     q[k]=QELX[k]*dn/a;                                     // QuasiElasticCrossSection
-	 }
+  }
   return first;
 }
@@ -450,14 +450,14 @@
   // Reversed table
   static const G4double Xl[nQ2]={1.87905e-10,
-	.005231,	.010602,	.016192,	.022038,	.028146,	.034513,	.041130,	.047986,	.055071,	.062374,
-	.069883,	.077587,	.085475,	.093539,	.101766,	.110150,	.118680,	.127348,	.136147,	.145069,
-	.154107,	.163255,	.172506,	.181855,	.191296,	.200825,	.210435,	.220124,	.229886,	.239718,
-	.249617,	.259578,	.269598,	.279675,	.289805,	.299986,	.310215,	.320490,	.330808,	.341169,
-	.351568,	.362006,	.372479,	.382987,	.393527,	.404099,	.414700,	.425330,	.435987,	.446670,
-	.457379,	.468111,	.478866,	.489643,	.500441,	.511260,	.522097,	.532954,	.543828,	.554720,
-	.565628,	.576553,	.587492,	.598447,	.609416,	.620398,	.631394,	.642403,	.653424,	.664457,
-	.675502,	.686557,	.697624,	.708701,	.719788,	.730886,	.741992,	.753108,	.764233,	.775366,
-	.786508,	.797658,	.808816,	.819982,	.831155,	.842336,	.853524,	.864718,	.875920,	.887128,
-	.898342,	.909563,	.920790,	.932023,	.943261,	.954506,	.965755,	.977011,	.988271,	.999539};
+ .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071, .062374,
+ .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147, .145069,
+ .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886, .239718,
+ .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808, .341169,
+ .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987, .446670,
+ .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828, .554720,
+ .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424, .664457,
+ .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233, .775366,
+ .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920, .887128,
+ .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271, .999539};
   // Direct table
   static const G4double Xmax=Xl[lQ2];
@@ -465,14 +465,14 @@
   static const G4double dX=(Xmax-Xmin)/lQ2;  // step in X(Q2, GeV^2)
   static const G4double inl[nQ2]={0,
-	1.88843,	3.65455,	5.29282,	6.82878,	8.28390,	9.67403,	11.0109,	12.3034,	13.5583,	14.7811,
-	15.9760,	17.1466,	18.2958,	19.4260,	20.5392,	21.6372,	22.7215,	23.7933,	24.8538,	25.9039,
-	26.9446,	27.9766,	29.0006,	30.0171,	31.0268,	32.0301,	33.0274,	34.0192,	35.0058,	35.9876,
-	36.9649,	37.9379,	38.9069,	39.8721,	40.8337,	41.7920,	42.7471,	43.6992,	44.6484,	45.5950,
-	46.5390,	47.4805,	48.4197,	49.3567,	50.2916,	51.2245,	52.1554,	53.0846,	54.0120,	54.9377,
-	55.8617,	56.7843,	57.7054,	58.6250,	59.5433,	60.4603,	61.3761,	62.2906,	63.2040,	64.1162,
-	65.0274,	65.9375,	66.8467,	67.7548,	68.6621,	69.5684,	70.4738,	71.3784,	72.2822,	73.1852,
-	74.0875,	74.9889,	75.8897,	76.7898,	77.6892,	78.5879,	79.4860,	80.3835,	81.2804,	82.1767,
-	83.0724,	83.9676,	84.8622,	85.7563,	86.6499,	87.5430,	88.4356,	89.3277,	90.2194,	91.1106,
-	92.0013,	92.8917,	93.7816,	94.6711,	95.5602,	96.4489,	97.3372,	98.2252,	99.1128,	100.000};
+ 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583, 14.7811,
+ 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538, 25.9039,
+ 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058, 35.9876,
+ 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484, 45.5950,
+ 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120, 54.9377,
+ 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040, 64.1162,
+ 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822, 73.1852,
+ 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804, 82.1767,
+ 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194, 91.1106,
+ 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128, 100.000};
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double dEnu=Enu+Enu;              // doubled energy of nu/anu
@@ -541,63 +541,63 @@
   // Reversed table
   static const G4double X0[nX]={6.14081e-05,
-	.413394,	.644455,	.843199,	1.02623,	1.20032,	1.36916,	1.53516,	1.70008,	1.86539,	2.03244,
-	2.20256,	2.37723,	2.55818,	2.74762,	2.94857,	3.16550,	3.40582,	3.68379,	4.03589,	4.77419};
+ .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539, 2.03244,
+ 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589, 4.77419};
   static const G4double X1[nX]={.00125268,
-	.861178,	1.34230,	1.75605,	2.13704,	2.49936,	2.85072,	3.19611,	3.53921,	3.88308,	4.23049,
-	4.58423,	4.94735,	5.32342,	5.71700,	6.13428,	6.58447,	7.08267,	7.65782,	8.38299,	9.77330};
+ .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308, 4.23049,
+ 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299, 9.77330};
   static const G4double X2[nX]={.015694,
-	1.97690,	3.07976,	4.02770,	4.90021,	5.72963,	6.53363,	7.32363,	8.10805,	8.89384,	9.68728,
-	10.4947,	11.3228,	12.1797,	13.0753,	14.0234,	15.0439,	16.1692,	17.4599,	19.0626,	21.7276};
+ 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384, 9.68728,
+ 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626, 21.7276};
   static const G4double X3[nX]={.0866877,
-	4.03498,	6.27651,	8.20056,	9.96931,	11.6487,	13.2747,	14.8704,	16.4526,	18.0351,	19.6302,
-	21.2501,	22.9075,	24.6174,	26.3979,	28.2730,	30.2770,	32.4631,	34.9243,	37.8590,	41.9115};
+ 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351, 19.6302,
+ 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590, 41.9115};
   static const G4double X4[nX]={.160483,
-	5.73111,	8.88884,	11.5893,	14.0636,	16.4054,	18.6651,	20.8749,	23.0578,	25.2318,	27.4127,
-	29.6152,	31.8540,	34.1452,	36.5074,	38.9635,	41.5435,	44.2892,	47.2638,	50.5732,	54.4265};
+ 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318, 27.4127,
+ 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732, 54.4265};
   static const G4double X5[nX]={.0999307,
-	5.25720,	8.11389,	10.5375,	12.7425,	14.8152,	16.8015,	18.7296,	20.6194,	22.4855,	24.3398,
-	26.1924,	28.0527,	29.9295,	31.8320,	33.7699,	35.7541,	37.7975,	39.9158,	42.1290,	44.4649};
+ 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855, 24.3398,
+ 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290, 44.4649};
   static const G4double X6[nX]={.0276367,
-	3.53378,	5.41553,	6.99413,	8.41629,	9.74057,	10.9978,	12.2066,	13.3796,	14.5257,	15.6519,
-	16.7636,	17.8651,	18.9603,	20.0527,	21.1453,	22.2411,	23.3430,	24.4538,	25.5765,	26.7148};
+ 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257, 15.6519,
+ 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765, 26.7148};
   static const G4double X7[nX]={.00472383,
-	2.08253,	3.16946,	4.07178,	4.87742,	5.62140,	6.32202,	6.99034,	7.63368,	8.25720,	8.86473,
-	9.45921,	10.0430,	10.6179,	11.1856,	11.7475,	12.3046,	12.8581,	13.4089,	13.9577,	14.5057};
+ 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720, 8.86473,
+ 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577, 14.5057};
   static const G4double X8[nX]={.000630783,
-	1.22723,	1.85845,	2.37862,	2.84022,	3.26412,	3.66122,	4.03811,	4.39910,	4.74725,	5.08480,
-	5.41346,	5.73457,	6.04921,	6.35828,	6.66250,	6.96250,	7.25884,	7.55197,	7.84232,	8.13037};
+ 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725, 5.08480,
+ 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232, 8.13037};
   static const G4double X9[nX]={7.49179e-05,
-	.772574,	1.16623,	1.48914,	1.77460,	2.03586,	2.27983,	2.51069,	2.73118,	2.94322,	3.14823,
-	3.34728,	3.54123,	3.73075,	3.91638,	4.09860,	4.27779,	4.45428,	4.62835,	4.80025,	4.97028};
+ .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322, 3.14823,
+ 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025, 4.97028};
   static const G4double XA[nX]={8.43437e-06,
-	.530035,	.798454,	1.01797,	1.21156,	1.38836,	1.55313,	1.70876,	1.85712,	1.99956,	2.13704,
-	2.27031,	2.39994,	2.52640,	2.65007,	2.77127,	2.89026,	3.00726,	3.12248,	3.23607, 3.34823};
+ .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956, 2.13704,
+ 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248, 3.23607, 3.34823};
   static const G4double XB[nX]={9.27028e-07,
-	.395058,	.594211,	.756726,	.899794,	1.03025,	1.15167,	1.26619,	1.37523,	1.47979,	1.58059,
-	1.67819,	1.77302,	1.86543,	1.95571,	2.04408,	2.13074,	2.21587,	2.29960,	2.38206, 2.46341};
+ .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979, 1.58059,
+ 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960, 2.38206, 2.46341};
   static const G4double XC[nX]={1.00807e-07,
-	.316195,	.474948,	.604251,	.717911,	.821417,	.917635,	1.00829,	1.09452,	1.17712,	1.25668,
-	1.33364,	1.40835,	1.48108,	1.55207,	1.62150,	1.68954,	1.75631,	1.82193,	1.88650, 1.95014};
+ .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712, 1.25668,
+ 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193, 1.88650, 1.95014};
   static const G4double XD[nX]={1.09102e-08,
-	.268227,	.402318,	.511324,	.606997,	.694011,	.774803,	.850843,	.923097,	.992243,	1.05878,
-	1.12309,	1.18546,	1.24613,	1.30530,	1.36313,	1.41974,	1.47526,	1.52978,	1.58338,	1.63617};
+ .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243, 1.05878,
+ 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338, 1.63617};
   static const G4double XE[nX]={1.17831e-09,
-	.238351,	.356890,	.453036,	.537277,	.613780,	.684719,	.751405,	.814699,	.875208,	.933374,
-	.989535,	1.04396,	1.09685,	1.14838,	1.19870,	1.24792,	1.29615,	1.34347,	1.38996, 1.43571};
+ .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208, .933374,
+ .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347, 1.38996, 1.43571};
   static const G4double XF[nX]={1.27141e-10,
-	.219778,	.328346,	.416158,	.492931,	.562525,	.626955,	.687434,	.744761,	.799494,	.852046,
-	.902729,	.951786,	.999414,	1.04577,	1.09099,	1.13518,	1.17844,	1.22084,	1.26246,	1.30338};
+ .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494, .852046,
+ .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246, 1.30338};
   static const G4double XG[nX]={1.3713e-11,
-	.208748,	.310948,	.393310,	.465121,	.530069,	.590078,	.646306,	.699515,	.750239,	.798870,
-	.845707,	.890982,	.934882,	.977559,	1.01914,	1.05973,	1.09941,	1.13827,	1.17637, 1.21379};
+ .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239, .798870,
+ .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827, 1.17637, 1.21379};
   static const G4double XH[nX]={1.47877e-12,
-	.203089,	.301345,	.380162,	.448646,	.510409,	.567335,	.620557,	.670820,	.718647,	.764421,
-	.808434,	.850914,	.892042,	.931967,	.970812,	1.00868,	1.04566,	1.08182,	1.11724, 1.15197};
+ .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647, .764421,
+ .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182, 1.11724, 1.15197};
   static const G4double XI[nX]={1.59454e-13,
-	.201466,	.297453,	.374007,	.440245,	.499779,	.554489,	.605506,	.653573,	.699213,	.742806,
-	.784643,	.824952,	.863912,	.901672,	.938353,	.974060,	1.00888,	1.04288,	1.07614,	1.10872};
+ .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213, .742806,
+ .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614, 1.10872};
   static const G4double XJ[nX]={1.71931e-14,
-	.202988,	.297870,	.373025,	.437731,	.495658,	.548713,	.598041,	.644395,	.688302,	.730147,
-	.770224,	.808762,	.845943,	.881916,	.916805,	.950713,	.983728,	1.01592,	1.04737, 1.07813};
+ .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302, .730147,
+ .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592, 1.04737, 1.07813};
   // Direct table
   static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0],
@@ -612,72 +612,72 @@
                              {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ};
   static const G4double I0[nX]={0,
-	.411893,	1.25559,	2.34836,	3.60264,	4.96046,	6.37874,	7.82342,	9.26643,	10.6840,	12.0555,
-	13.3628,	14.5898,	15.7219,	16.7458,	17.6495,	18.4217,	19.0523,	19.5314,	19.8501, 20.0000};
+ .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840, 12.0555,
+ 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314, 19.8501, 20.0000};
   static const G4double I1[nX]={0,
-	.401573,	1.22364,	2.28998,	3.51592,	4.84533,	6.23651,	7.65645,	9.07796,	10.4780,	11.8365,
-	13.1360,	14.3608,	15.4967,	16.5309,	17.4516,	18.2481,	18.9102,	19.4286,	19.7946, 20.0000};
+ .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780, 11.8365,
+ 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286, 19.7946, 20.0000};
   static const G4double I2[nX]={0,
-	.387599,	1.17339,	2.19424,	3.37090,	4.65066,	5.99429,	7.37071,	8.75427,	10.1232,	11.4586,
-	12.7440,	13.9644,	15.1065,	16.1582,	17.1083,	17.9465,	18.6634,	19.2501,	19.6982, 20.0000};
+ .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232, 11.4586,
+ 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501, 19.6982, 20.0000};
   static const G4double I3[nX]={0,
-	.366444,	1.09391,	2.04109,	3.13769,	4.33668,	5.60291,	6.90843,	8.23014,	9.54840,	10.8461,
-	12.1083,	13.3216,	14.4737,	15.5536,	16.5512,	17.4573,	18.2630,	18.9603,	19.5417, 20.0000};
+ .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840, 10.8461,
+ 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603, 19.5417, 20.0000};
   static const G4double I4[nX]={0,
-	.321962,	.959681,	1.79769,	2.77753,	3.85979,	5.01487,	6.21916,	7.45307,	8.69991,	9.94515,
-	11.1759,	12.3808,	13.5493,	14.6720,	15.7402,	16.7458,	17.6813,	18.5398,	19.3148, 20.0000};
+ .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991, 9.94515,
+ 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398, 19.3148, 20.0000};
   static const G4double I5[nX]={0,
-	.257215,	.786302,	1.49611,	2.34049,	3.28823,	4.31581,	5.40439,	6.53832,	7.70422,	8.89040,
-	10.0865,	11.2833,	12.4723,	13.6459,	14.7969,	15.9189,	17.0058,	18.0517,	19.0515, 20.0000};
+ .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422, 8.89040,
+ 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517, 19.0515, 20.0000};
   static const G4double I6[nX]={0,
-	.201608,	.638914,	1.24035,	1.97000,	2.80354,	3.72260,	4.71247,	5.76086,	6.85724,	7.99243,
-	9.15826,	10.3474,	11.5532,	12.7695,	13.9907,	15.2117,	16.4275,	17.6337,	18.8258, 20.0000};
+ .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724, 7.99243,
+ 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337, 18.8258, 20.0000};
   static const G4double I7[nX]={0,
-	.168110,	.547208,	1.07889,	1.73403,	2.49292,	3.34065,	4.26525,	5.25674,	6.30654,	7.40717,
-	8.55196,	9.73492,	10.9506,	12.1940,	13.4606,	14.7460,	16.0462,	17.3576,	18.6767, 20.0000};
+ .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654, 7.40717,
+ 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576, 18.6767, 20.0000};
   static const G4double I8[nX]={0,
-	.150652,	.497557,	.990048,	1.60296,	2.31924,	3.12602,	4.01295,	4.97139,	5.99395,	7.07415,
-	8.20621,	9.38495,	10.6057,	11.8641,	13.1561,	14.4781,	15.8267,	17.1985,	18.5906, 20.0000};
+ .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395, 7.07415,
+ 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985, 18.5906, 20.0000};
   static const G4double I9[nX]={0,
-	.141449,	.470633,	.941304,	1.53053,	2.22280,	3.00639,	3.87189,	4.81146,	5.81837,	6.88672,
-	8.01128,	9.18734,	10.4106,	11.6772,	12.9835,	14.3261,	15.7019,	17.1080,	18.5415, 20.0000};
+ .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837, 6.88672,
+ 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080, 18.5415, 20.0000};
   static const G4double IA[nX]={0,
-	.136048,	.454593,	.912075,	1.48693,	2.16457,	2.93400,	3.78639,	4.71437,	5.71163,	6.77265,
-	7.89252,	9.06683,	10.2916,	11.5631,	12.8780,	14.2331,	.625500,	17.0525,	18.5115, 20.0000};
+ .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163, 6.77265,
+ 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525, 18.5115, 20.0000};
   static const G4double IB[nX]={0,
-	.132316,	.443455,	.891741,	1.45656,	2.12399,	2.88352,	3.72674,	4.64660,	5.63711,	6.69298,
-	7.80955,	8.98262,	10.2084,	11.4833,	12.8042,	14.1681,	15.5721,	17.0137,	18.4905, 20.0000};
+ .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711, 6.69298,
+ 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137, 18.4905, 20.0000};
   static const G4double IC[nX]={0,
-	.129197,	.434161,	.874795,	1.43128,	2.09024,	2.84158,	3.67721,	4.59038,	5.57531,	6.62696,
-	7.74084,	8.91291,	10.1395,	11.4173,	12.7432,	14.1143,	15.5280,	16.9817,	18.4731, 20.0000};
+ .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531, 6.62696,
+ 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817, 18.4731, 20.0000};
   static const G4double ID[nX]={0,
-	.126079,	.424911,	.857980,	1.40626,	2.05689,	2.80020,	3.62840,	4.53504,	5.51456,	6.56212,
-	7.67342,	8.84458,	10.0721,	11.3527,	12.6836,	14.0618,	15.4849,	16.9504,	18.4562, 20.0000};
+ .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456, 6.56212,
+ 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504, 18.4562, 20.0000};
   static const G4double IE[nX]={0,
-	.122530,	.414424,	.838964,	1.37801,	2.01931,	2.75363,	3.57356,	4.47293,	5.44644,	6.48949,
-	7.59795,	8.76815,	9.99673,	11.2806,	12.6170,	14.0032,	15.4369,	16.9156,	18.4374, 20.0000};
+ .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644, 6.48949,
+ 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156, 18.4374, 20.0000};
   static const G4double IF[nX]={0,
-	.118199,	.401651,	.815838,	1.34370,	1.97370,	2.69716,	3.50710,	4.39771,	5.36401,	6.40164,
-	7.50673,	8.67581,	9.90572,	11.1936,	12.5367,	13.9326,	15.3790,	16.8737,	18.4146, 20.0000};
+ .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401, 6.40164,
+ 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737, 18.4146, 20.0000};
   static const G4double IG[nX]={0,
-	.112809,	.385761,	.787075,	1.30103,	1.91700,	2.62697,	3.42451,	4.30424,	5.26158,	6.29249,
-	7.39341,	8.56112,	9.79269,	11.0855,	12.4369,	13.8449,	15.3071,	16.8216,	18.3865, 20.0000};
+ .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158, 6.29249,
+ 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216, 18.3865, 20.0000};
   static const G4double IH[nX]={0,
-	.106206,	.366267,	.751753,	1.24859,	1.84728,	2.54062,	3.32285,	.189160,	5.13543,	6.15804,
-	7.25377,	8.41975,	9.65334,	10.9521,	12.3139,	13.7367,	15.2184,	16.7573,	18.3517, 20.0000};
+ .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543, 6.15804,
+ 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573, 18.3517, 20.0000};
   static const G4double II[nX]={0,
-	.098419,	.343194,	.709850,	1.18628,	1.76430,	2.43772,	3.20159,	4.05176,	4.98467,	5.99722,
-	7.08663,	8.25043,	9.48633,	10.7923,	12.1663,	13.6067,	15.1118,	16.6800,	18.3099,	20.0000};
+ .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467, 5.99722,
+ 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099, 20.0000};
   static const G4double IJ[nX]={0,
-	.089681,	.317135,	.662319,	1.11536,	1.66960,	2.32002,	3.06260,	3.89397,	4.81126,	5.81196,
-	6.89382,	8.05483,	9.29317,	10.6072,	11.9952,	13.4560,	14.9881,	16.5902,	18.2612, 20.0000};
+ .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126, 5.81196,
+ 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902, 18.2612, 20.0000};
   static const G4double* Il[nE]=
                              {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ};
   static const G4double lE[nE]={
--1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215,	.459141,	.867068,	1.27499,	1.68292,
- 2.09085,	2.49877,	2.90670,	3.31463,	3.72255,	4.13048,	4.53840,	4.94633,	5.35426,	5.76218};
+-1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292,
+ 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218};
   static const G4double lEmi=lE[0];
   static const G4double lEma=lE[nE-1];
   static const G4double dlE=(lEma-lEmi)/bE;
-	 //***************************************************************************************
+  //***************************************************************************************
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double lEn=std::log(Enu);         // log(E) for interpolation
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuMuNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuMuNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuMuNuclearCrossSection.cc	(revision 1055)
@@ -25,9 +25,9 @@
 //
 //
-// $Id: G4QNuMuNuclearCrossSection.cc,v 1.12 2007/11/01 16:09:38 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QNuMuNuclearCrossSection.cc,v 1.14 2009/05/08 15:16:26 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
-// G4 Physics class: G4QNuMuNuclearCrossSection for gamma+A cross sections
+// G4 Physics class: G4QNuMuNuclearCrossSection for (nu,mu-)A cross sections
 // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03
@@ -37,5 +37,5 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
-//===============================================================================================
+//=========================================================================================
 
 //#define debug
@@ -90,5 +90,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(pPDG!=14)
@@ -111,7 +111,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -163,7 +163,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QNMNCS::GetCrSec: CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -172,5 +172,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -184,5 +184,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QNMNCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -200,7 +200,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QNMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -245,7 +245,7 @@
 G4double G4QNuMuNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N, G4int)
 {
-  //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1.,0.)/GeV;
-  //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1.,1.)/GeV;
-  //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2.,1.)/GeV/2.;
+  //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/GeV;
+  //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/GeV;
+  //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2,1)/GeV/2.;
   static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
   static const G4double dmN=mN+mN;    // Doubled nucleon mass (2*AtomicMassUnit, GeV)
@@ -294,10 +294,10 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastTX =TX[I];                 // Pointer to the prepared TX function (same isotope)
       lastQE =QE[I];                 // Pointer to the prepared QE function (same isotope)
-	  }
-	  else                              // This isotope wasn't calculated previously => CREATE
-	  {
+   }
+   else                              // This isotope wasn't calculated previously => CREATE
+   {
       if(first)
       {
@@ -315,5 +315,5 @@
       TX.push_back(lastTX);
       QE.push_back(lastQE);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -330,5 +330,5 @@
     G4int sep=ran;  // as a result = an index of the left edge of the interval
     while(ran>=2)
-				{
+    {
       G4int newran=ran/2;
       if(lastE<=lastEN[sep]) sep-=newran;
@@ -382,32 +382,31 @@
   static const G4int nE=65; // !! If change this, change it in GetCrossSection() (*.cc) !!
   static const G4double nuEn[nE]={thresh,
-.112039,.116079,.120416,.125076,.130090,.135494,.141324,.147626,.154445,.161838,
-.169864,.178594,.188105,.198485,.209836,.222272,.235923,.250941,.267497,.285789,
-.306045,.328530,.353552,.381466,.412689,.447710,.487101,.531538,.581820,.638893,
-.703886,.778147,.863293,.961275,1.07445,1.20567,1.35843,1.53701,1.74667,1.99390,
-2.28679,2.63542,3.05245,3.55386,4.15990,4.89644,5.79665,6.90336,8.27224,9.97606,
-12.1106,14.8029,18.2223,22.5968,28.2351,35.5587,45.1481,57.8086,74.6682,97.3201,
-128.036,170.085,228.220,309.420};
+    .112039,.116079,.120416,.125076,.130090,.135494,.141324,.147626,.154445,.161838,
+    .169864,.178594,.188105,.198485,.209836,.222272,.235923,.250941,.267497,.285789,
+    .306045,.328530,.353552,.381466,.412689,.447710,.487101,.531538,.581820,.638893,
+    .703886,.778147,.863293,.961275,1.07445,1.20567,1.35843,1.53701,1.74667,1.99390,
+    2.28679,2.63542,3.05245,3.55386,4.15990,4.89644,5.79665,6.90336,8.27224,9.97606,
+    12.1106,14.8029,18.2223,22.5968,28.2351,35.5587,45.1481,57.8086,74.6682,97.3201,
+    128.036,170.085,228.220,309.420};
   static const G4double TOTX[nE]={0.,
-.108618,.352160,.476083,.566575,.639014,.699871,.752634,.799407,.841524,.879844,
-.914908,.947050,.976456,1.00321,1.02734,1.04881,1.06755,1.08349,1.09653,1.10657,
-1.11355,1.11739,1.11806,1.11556,1.10992,1.10124,1.08964,1.07532,1.05851,1.03950,
-1.01859,.996169,.972593,.948454,.923773,.899081,.874713,.850965,.828082,.806265,
-.785659,.766367,.748450,.731936,.716824,.703098,.690723,.679652,.669829,.661187,
-.653306,.646682,.640986,.636125,.631993,.628479,.625458,.622800,.620364,.616231,
-.614986,.612563,.609807,.606511};
-
+    .108618,.352160,.476083,.566575,.639014,.699871,.752634,.799407,.841524,.879844,
+    .914908,.947050,.976456,1.00321,1.02734,1.04881,1.06755,1.08349,1.09653,1.10657,
+    1.11355,1.11739,1.11806,1.11556,1.10992,1.10124,1.08964,1.07532,1.05851,1.03950,
+    1.01859,.996169,.972593,.948454,.923773,.899081,.874713,.850965,.828082,.806265,
+    .785659,.766367,.748450,.731936,.716824,.703098,.690723,.679652,.669829,.661187,
+    .653306,.646682,.640986,.636125,.631993,.628479,.625458,.622800,.620364,.616231,
+    .614986,.612563,.609807,.606511};
   static const G4double QELX[nE]={0.,
-.012170,.040879,.057328,.070865,.083129,.094828,.106366,.118013,.129970,.142392,
-.155410,.169138,.183676,.199123,.215573,.233120,.251860,.271891,.293317,.316246,
-.340796,.367096,.395292,.425547,.458036,.491832,.524989,.556457,.585692,.612377,
-.636544,.657790,.676260,.692007,.705323,.716105,.724694,.731347,.736340,.740172,
-.742783,.744584,.745804,.746829,.747479,.747995,.748436,.749047,.749497,.749925,
-.750486,.750902,.751268,.751566,.752026,.752266,.752428,.752761,.752873,.753094,
-.753161,.753164,.753340,.753321};
+    .012170,.040879,.057328,.070865,.083129,.094828,.106366,.118013,.129970,.142392,
+    .155410,.169138,.183676,.199123,.215573,.233120,.251860,.271891,.293317,.316246,
+    .340796,.367096,.395292,.425547,.458036,.491832,.524989,.556457,.585692,.612377,
+    .636544,.657790,.676260,.692007,.705323,.716105,.724694,.731347,.736340,.740172,
+    .742783,.744584,.745804,.746829,.747479,.747995,.748436,.749047,.749497,.749925,
+    .750486,.750902,.751268,.751566,.752026,.752266,.752428,.752761,.752873,.753094,
+    .753161,.753164,.753340,.753321};
   // --------------------------------
   G4int first=0;
   if(z<0.)
-		{
+  {
     first=1;
     z=-z;
@@ -428,5 +427,5 @@
     t[k]=TOTX[k]*nuEn[k]*(na+na)/ta+QELX[k]*(dn+dn-da)/ta; // TotalCrossSection
     q[k]=QELX[k]*dn/a;                                     // QuasiElasticCrossSection
-	 }
+  }
   return first;
 }
@@ -447,14 +446,14 @@
   // Reversed table
   static const G4double Xl[nQ2]={1.87905e-10,
-	.005231,	.010602,	.016192,	.022038,	.028146,	.034513,	.041130,	.047986,	.055071,	.062374,
-	.069883,	.077587,	.085475,	.093539,	.101766,	.110150,	.118680,	.127348,	.136147,	.145069,
-	.154107,	.163255,	.172506,	.181855,	.191296,	.200825,	.210435,	.220124,	.229886,	.239718,
-	.249617,	.259578,	.269598,	.279675,	.289805,	.299986,	.310215,	.320490,	.330808,	.341169,
-	.351568,	.362006,	.372479,	.382987,	.393527,	.404099,	.414700,	.425330,	.435987,	.446670,
-	.457379,	.468111,	.478866,	.489643,	.500441,	.511260,	.522097,	.532954,	.543828,	.554720,
-	.565628,	.576553,	.587492,	.598447,	.609416,	.620398,	.631394,	.642403,	.653424,	.664457,
-	.675502,	.686557,	.697624,	.708701,	.719788,	.730886,	.741992,	.753108,	.764233,	.775366,
-	.786508,	.797658,	.808816,	.819982,	.831155,	.842336,	.853524,	.864718,	.875920,	.887128,
-	.898342,	.909563,	.920790,	.932023,	.943261,	.954506,	.965755,	.977011,	.988271,	.999539};
+ .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071, .062374,
+ .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147, .145069,
+ .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886, .239718,
+ .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808, .341169,
+ .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987, .446670,
+ .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828, .554720,
+ .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424, .664457,
+ .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233, .775366,
+ .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920, .887128,
+ .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271, .999539};
   // Direct table
   static const G4double Xmax=Xl[lQ2];
@@ -462,14 +461,14 @@
   static const G4double dX=(Xmax-Xmin)/lQ2;  // step in X(Q2, GeV^2)
   static const G4double inl[nQ2]={0,
-	1.88843,	3.65455,	5.29282,	6.82878,	8.28390,	9.67403,	11.0109,	12.3034,	13.5583,	14.7811,
-	15.9760,	17.1466,	18.2958,	19.4260,	20.5392,	21.6372,	22.7215,	23.7933,	24.8538,	25.9039,
-	26.9446,	27.9766,	29.0006,	30.0171,	31.0268,	32.0301,	33.0274,	34.0192,	35.0058,	35.9876,
-	36.9649,	37.9379,	38.9069,	39.8721,	40.8337,	41.7920,	42.7471,	43.6992,	44.6484,	45.5950,
-	46.5390,	47.4805,	48.4197,	49.3567,	50.2916,	51.2245,	52.1554,	53.0846,	54.0120,	54.9377,
-	55.8617,	56.7843,	57.7054,	58.6250,	59.5433,	60.4603,	61.3761,	62.2906,	63.2040,	64.1162,
-	65.0274,	65.9375,	66.8467,	67.7548,	68.6621,	69.5684,	70.4738,	71.3784,	72.2822,	73.1852,
-	74.0875,	74.9889,	75.8897,	76.7898,	77.6892,	78.5879,	79.4860,	80.3835,	81.2804,	82.1767,
-	83.0724,	83.9676,	84.8622,	85.7563,	86.6499,	87.5430,	88.4356,	89.3277,	90.2194,	91.1106,
-	92.0013,	92.8917,	93.7816,	94.6711,	95.5602,	96.4489,	97.3372,	98.2252,	99.1128,	100.000};
+ 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583, 14.7811,
+ 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538, 25.9039,
+ 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058, 35.9876,
+ 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484, 45.5950,
+ 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120, 54.9377,
+ 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040, 64.1162,
+ 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822, 73.1852,
+ 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804, 82.1767,
+ 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194, 91.1106,
+ 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128, 100.000};
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double dEnu=Enu+Enu;              // doubled energy of nu/anu
@@ -538,63 +537,63 @@
   // Reversed table
   static const G4double X0[nX]={6.14081e-05,
-	.413394,	.644455,	.843199,	1.02623,	1.20032,	1.36916,	1.53516,	1.70008,	1.86539,	2.03244,
-	2.20256,	2.37723,	2.55818,	2.74762,	2.94857,	3.16550,	3.40582,	3.68379,	4.03589,	4.77419};
+ .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539, 2.03244,
+ 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589, 4.77419};
   static const G4double X1[nX]={.00125268,
-	.861178,	1.34230,	1.75605,	2.13704,	2.49936,	2.85072,	3.19611,	3.53921,	3.88308,	4.23049,
-	4.58423,	4.94735,	5.32342,	5.71700,	6.13428,	6.58447,	7.08267,	7.65782,	8.38299,	9.77330};
+ .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308, 4.23049,
+ 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299, 9.77330};
   static const G4double X2[nX]={.015694,
-	1.97690,	3.07976,	4.02770,	4.90021,	5.72963,	6.53363,	7.32363,	8.10805,	8.89384,	9.68728,
-	10.4947,	11.3228,	12.1797,	13.0753,	14.0234,	15.0439,	16.1692,	17.4599,	19.0626,	21.7276};
+ 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384, 9.68728,
+ 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626, 21.7276};
   static const G4double X3[nX]={.0866877,
-	4.03498,	6.27651,	8.20056,	9.96931,	11.6487,	13.2747,	14.8704,	16.4526,	18.0351,	19.6302,
-	21.2501,	22.9075,	24.6174,	26.3979,	28.2730,	30.2770,	32.4631,	34.9243,	37.8590,	41.9115};
+ 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351, 19.6302,
+ 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590, 41.9115};
   static const G4double X4[nX]={.160483,
-	5.73111,	8.88884,	11.5893,	14.0636,	16.4054,	18.6651,	20.8749,	23.0578,	25.2318,	27.4127,
-	29.6152,	31.8540,	34.1452,	36.5074,	38.9635,	41.5435,	44.2892,	47.2638,	50.5732,	54.4265};
+ 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318, 27.4127,
+ 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732, 54.4265};
   static const G4double X5[nX]={.0999307,
-	5.25720,	8.11389,	10.5375,	12.7425,	14.8152,	16.8015,	18.7296,	20.6194,	22.4855,	24.3398,
-	26.1924,	28.0527,	29.9295,	31.8320,	33.7699,	35.7541,	37.7975,	39.9158,	42.1290,	44.4649};
+ 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855, 24.3398,
+ 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290, 44.4649};
   static const G4double X6[nX]={.0276367,
-	3.53378,	5.41553,	6.99413,	8.41629,	9.74057,	10.9978,	12.2066,	13.3796,	14.5257,	15.6519,
-	16.7636,	17.8651,	18.9603,	20.0527,	21.1453,	22.2411,	23.3430,	24.4538,	25.5765,	26.7148};
+ 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257, 15.6519,
+ 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765, 26.7148};
   static const G4double X7[nX]={.00472383,
-	2.08253,	3.16946,	4.07178,	4.87742,	5.62140,	6.32202,	6.99034,	7.63368,	8.25720,	8.86473,
-	9.45921,	10.0430,	10.6179,	11.1856,	11.7475,	12.3046,	12.8581,	13.4089,	13.9577,	14.5057};
+ 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720, 8.86473,
+ 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577, 14.5057};
   static const G4double X8[nX]={.000630783,
-	1.22723,	1.85845,	2.37862,	2.84022,	3.26412,	3.66122,	4.03811,	4.39910,	4.74725,	5.08480,
-	5.41346,	5.73457,	6.04921,	6.35828,	6.66250,	6.96250,	7.25884,	7.55197,	7.84232,	8.13037};
+ 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725, 5.08480,
+ 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232, 8.13037};
   static const G4double X9[nX]={7.49179e-05,
-	.772574,	1.16623,	1.48914,	1.77460,	2.03586,	2.27983,	2.51069,	2.73118,	2.94322,	3.14823,
-	3.34728,	3.54123,	3.73075,	3.91638,	4.09860,	4.27779,	4.45428,	4.62835,	4.80025,	4.97028};
+ .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322, 3.14823,
+ 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025, 4.97028};
   static const G4double XA[nX]={8.43437e-06,
-	.530035,	.798454,	1.01797,	1.21156,	1.38836,	1.55313,	1.70876,	1.85712,	1.99956,	2.13704,
-	2.27031,	2.39994,	2.52640,	2.65007,	2.77127,	2.89026,	3.00726,	3.12248,	3.23607, 3.34823};
+ .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956, 2.13704,
+ 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248, 3.23607, 3.34823};
   static const G4double XB[nX]={9.27028e-07,
-	.395058,	.594211,	.756726,	.899794,	1.03025,	1.15167,	1.26619,	1.37523,	1.47979,	1.58059,
-	1.67819,	1.77302,	1.86543,	1.95571,	2.04408,	2.13074,	2.21587,	2.29960,	2.38206, 2.46341};
+ .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979, 1.58059,
+ 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960, 2.38206, 2.46341};
   static const G4double XC[nX]={1.00807e-07,
-	.316195,	.474948,	.604251,	.717911,	.821417,	.917635,	1.00829,	1.09452,	1.17712,	1.25668,
-	1.33364,	1.40835,	1.48108,	1.55207,	1.62150,	1.68954,	1.75631,	1.82193,	1.88650, 1.95014};
+ .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712, 1.25668,
+ 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193, 1.88650, 1.95014};
   static const G4double XD[nX]={1.09102e-08,
-	.268227,	.402318,	.511324,	.606997,	.694011,	.774803,	.850843,	.923097,	.992243,	1.05878,
-	1.12309,	1.18546,	1.24613,	1.30530,	1.36313,	1.41974,	1.47526,	1.52978,	1.58338,	1.63617};
+ .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243, 1.05878,
+ 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338, 1.63617};
   static const G4double XE[nX]={1.17831e-09,
-	.238351,	.356890,	.453036,	.537277,	.613780,	.684719,	.751405,	.814699,	.875208,	.933374,
-	.989535,	1.04396,	1.09685,	1.14838,	1.19870,	1.24792,	1.29615,	1.34347,	1.38996, 1.43571};
+ .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208, .933374,
+ .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347, 1.38996, 1.43571};
   static const G4double XF[nX]={1.27141e-10,
-	.219778,	.328346,	.416158,	.492931,	.562525,	.626955,	.687434,	.744761,	.799494,	.852046,
-	.902729,	.951786,	.999414,	1.04577,	1.09099,	1.13518,	1.17844,	1.22084,	1.26246,	1.30338};
+ .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494, .852046,
+ .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246, 1.30338};
   static const G4double XG[nX]={1.3713e-11,
-	.208748,	.310948,	.393310,	.465121,	.530069,	.590078,	.646306,	.699515,	.750239,	.798870,
-	.845707,	.890982,	.934882,	.977559,	1.01914,	1.05973,	1.09941,	1.13827,	1.17637, 1.21379};
+ .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239, .798870,
+ .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827, 1.17637, 1.21379};
   static const G4double XH[nX]={1.47877e-12,
-	.203089,	.301345,	.380162,	.448646,	.510409,	.567335,	.620557,	.670820,	.718647,	.764421,
-	.808434,	.850914,	.892042,	.931967,	.970812,	1.00868,	1.04566,	1.08182,	1.11724, 1.15197};
+ .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647, .764421,
+ .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182, 1.11724, 1.15197};
   static const G4double XI[nX]={1.59454e-13,
-	.201466,	.297453,	.374007,	.440245,	.499779,	.554489,	.605506,	.653573,	.699213,	.742806,
-	.784643,	.824952,	.863912,	.901672,	.938353,	.974060,	1.00888,	1.04288,	1.07614,	1.10872};
+ .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213, .742806,
+ .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614, 1.10872};
   static const G4double XJ[nX]={1.71931e-14,
-	.202988,	.297870,	.373025,	.437731,	.495658,	.548713,	.598041,	.644395,	.688302,	.730147,
-	.770224,	.808762,	.845943,	.881916,	.916805,	.950713,	.983728,	1.01592,	1.04737, 1.07813};
+ .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302, .730147,
+ .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592, 1.04737, 1.07813};
   // Direct table
   static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0],
@@ -609,72 +608,72 @@
                              {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ};
   static const G4double I0[nX]={0,
-	.411893,	1.25559,	2.34836,	3.60264,	4.96046,	6.37874,	7.82342,	9.26643,	10.6840,	12.0555,
-	13.3628,	14.5898,	15.7219,	16.7458,	17.6495,	18.4217,	19.0523,	19.5314,	19.8501, 20.0000};
+ .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840, 12.0555,
+ 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314, 19.8501, 20.0000};
   static const G4double I1[nX]={0,
-	.401573,	1.22364,	2.28998,	3.51592,	4.84533,	6.23651,	7.65645,	9.07796,	10.4780,	11.8365,
-	13.1360,	14.3608,	15.4967,	16.5309,	17.4516,	18.2481,	18.9102,	19.4286,	19.7946, 20.0000};
+ .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780, 11.8365,
+ 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286, 19.7946, 20.0000};
   static const G4double I2[nX]={0,
-	.387599,	1.17339,	2.19424,	3.37090,	4.65066,	5.99429,	7.37071,	8.75427,	10.1232,	11.4586,
-	12.7440,	13.9644,	15.1065,	16.1582,	17.1083,	17.9465,	18.6634,	19.2501,	19.6982, 20.0000};
+ .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232, 11.4586,
+ 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501, 19.6982, 20.0000};
   static const G4double I3[nX]={0,
-	.366444,	1.09391,	2.04109,	3.13769,	4.33668,	5.60291,	6.90843,	8.23014,	9.54840,	10.8461,
-	12.1083,	13.3216,	14.4737,	15.5536,	16.5512,	17.4573,	18.2630,	18.9603,	19.5417, 20.0000};
+ .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840, 10.8461,
+ 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603, 19.5417, 20.0000};
   static const G4double I4[nX]={0,
-	.321962,	.959681,	1.79769,	2.77753,	3.85979,	5.01487,	6.21916,	7.45307,	8.69991,	9.94515,
-	11.1759,	12.3808,	13.5493,	14.6720,	15.7402,	16.7458,	17.6813,	18.5398,	19.3148, 20.0000};
+ .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991, 9.94515,
+ 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398, 19.3148, 20.0000};
   static const G4double I5[nX]={0,
-	.257215,	.786302,	1.49611,	2.34049,	3.28823,	4.31581,	5.40439,	6.53832,	7.70422,	8.89040,
-	10.0865,	11.2833,	12.4723,	13.6459,	14.7969,	15.9189,	17.0058,	18.0517,	19.0515, 20.0000};
+ .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422, 8.89040,
+ 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517, 19.0515, 20.0000};
   static const G4double I6[nX]={0,
-	.201608,	.638914,	1.24035,	1.97000,	2.80354,	3.72260,	4.71247,	5.76086,	6.85724,	7.99243,
-	9.15826,	10.3474,	11.5532,	12.7695,	13.9907,	15.2117,	16.4275,	17.6337,	18.8258, 20.0000};
+ .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724, 7.99243,
+ 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337, 18.8258, 20.0000};
   static const G4double I7[nX]={0,
-	.168110,	.547208,	1.07889,	1.73403,	2.49292,	3.34065,	4.26525,	5.25674,	6.30654,	7.40717,
-	8.55196,	9.73492,	10.9506,	12.1940,	13.4606,	14.7460,	16.0462,	17.3576,	18.6767, 20.0000};
+ .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654, 7.40717,
+ 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576, 18.6767, 20.0000};
   static const G4double I8[nX]={0,
-	.150652,	.497557,	.990048,	1.60296,	2.31924,	3.12602,	4.01295,	4.97139,	5.99395,	7.07415,
-	8.20621,	9.38495,	10.6057,	11.8641,	13.1561,	14.4781,	15.8267,	17.1985,	18.5906, 20.0000};
+ .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395, 7.07415,
+ 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985, 18.5906, 20.0000};
   static const G4double I9[nX]={0,
-	.141449,	.470633,	.941304,	1.53053,	2.22280,	3.00639,	3.87189,	4.81146,	5.81837,	6.88672,
-	8.01128,	9.18734,	10.4106,	11.6772,	12.9835,	14.3261,	15.7019,	17.1080,	18.5415, 20.0000};
+ .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837, 6.88672,
+ 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080, 18.5415, 20.0000};
   static const G4double IA[nX]={0,
-	.136048,	.454593,	.912075,	1.48693,	2.16457,	2.93400,	3.78639,	4.71437,	5.71163,	6.77265,
-	7.89252,	9.06683,	10.2916,	11.5631,	12.8780,	14.2331,	.625500,	17.0525,	18.5115, 20.0000};
+ .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163, 6.77265,
+ 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525, 18.5115, 20.0000};
   static const G4double IB[nX]={0,
-	.132316,	.443455,	.891741,	1.45656,	2.12399,	2.88352,	3.72674,	4.64660,	5.63711,	6.69298,
-	7.80955,	8.98262,	10.2084,	11.4833,	12.8042,	14.1681,	15.5721,	17.0137,	18.4905, 20.0000};
+ .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711, 6.69298,
+ 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137, 18.4905, 20.0000};
   static const G4double IC[nX]={0,
-	.129197,	.434161,	.874795,	1.43128,	2.09024,	2.84158,	3.67721,	4.59038,	5.57531,	6.62696,
-	7.74084,	8.91291,	10.1395,	11.4173,	12.7432,	14.1143,	15.5280,	16.9817,	18.4731, 20.0000};
+ .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531, 6.62696,
+ 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817, 18.4731, 20.0000};
   static const G4double ID[nX]={0,
-	.126079,	.424911,	.857980,	1.40626,	2.05689,	2.80020,	3.62840,	4.53504,	5.51456,	6.56212,
-	7.67342,	8.84458,	10.0721,	11.3527,	12.6836,	14.0618,	15.4849,	16.9504,	18.4562, 20.0000};
+ .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456, 6.56212,
+ 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504, 18.4562, 20.0000};
   static const G4double IE[nX]={0,
-	.122530,	.414424,	.838964,	1.37801,	2.01931,	2.75363,	3.57356,	4.47293,	5.44644,	6.48949,
-	7.59795,	8.76815,	9.99673,	11.2806,	12.6170,	14.0032,	15.4369,	16.9156,	18.4374, 20.0000};
+ .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644, 6.48949,
+ 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156, 18.4374, 20.0000};
   static const G4double IF[nX]={0,
-	.118199,	.401651,	.815838,	1.34370,	1.97370,	2.69716,	3.50710,	4.39771,	5.36401,	6.40164,
-	7.50673,	8.67581,	9.90572,	11.1936,	12.5367,	13.9326,	15.3790,	16.8737,	18.4146, 20.0000};
+ .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401, 6.40164,
+ 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737, 18.4146, 20.0000};
   static const G4double IG[nX]={0,
-	.112809,	.385761,	.787075,	1.30103,	1.91700,	2.62697,	3.42451,	4.30424,	5.26158,	6.29249,
-	7.39341,	8.56112,	9.79269,	11.0855,	12.4369,	13.8449,	15.3071,	16.8216,	18.3865, 20.0000};
+ .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158, 6.29249,
+ 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216, 18.3865, 20.0000};
   static const G4double IH[nX]={0,
-	.106206,	.366267,	.751753,	1.24859,	1.84728,	2.54062,	3.32285,	.189160,	5.13543,	6.15804,
-	7.25377,	8.41975,	9.65334,	10.9521,	12.3139,	13.7367,	15.2184,	16.7573,	18.3517, 20.0000};
+ .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543, 6.15804,
+ 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573, 18.3517, 20.0000};
   static const G4double II[nX]={0,
-	.098419,	.343194,	.709850,	1.18628,	1.76430,	2.43772,	3.20159,	4.05176,	4.98467,	5.99722,
-	7.08663,	8.25043,	9.48633,	10.7923,	12.1663,	13.6067,	15.1118,	16.6800,	18.3099,	20.0000};
+ .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467, 5.99722,
+ 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099, 20.0000};
   static const G4double IJ[nX]={0,
-	.089681,	.317135,	.662319,	1.11536,	1.66960,	2.32002,	3.06260,	3.89397,	4.81126,	5.81196,
-	6.89382,	8.05483,	9.29317,	10.6072,	11.9952,	13.4560,	14.9881,	16.5902,	18.2612, 20.0000};
+ .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126, 5.81196,
+ 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902, 18.2612, 20.0000};
   static const G4double* Il[nE]=
                              {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ};
   static const G4double lE[nE]={
--1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215,	.459141,	.867068,	1.27499,	1.68292,
- 2.09085,	2.49877,	2.90670,	3.31463,	3.72255,	4.13048,	4.53840,	4.94633,	5.35426,	5.76218};
+-1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292,
+ 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218};
   static const G4double lEmi=lE[0];
   static const G4double lEma=lE[nE-1];
   static const G4double dlE=(lEma-lEmi)/bE;
-	 //***************************************************************************************
+  //***************************************************************************************
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double lEn=std::log(Enu);         // log(E) for interpolation
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuNuNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuNuNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuNuNuclearCrossSection.cc	(revision 1055)
@@ -25,9 +25,9 @@
 //
 //
-// $Id: G4QNuNuNuclearCrossSection.cc,v 1.2 2007/11/02 15:57:16 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QNuNuNuclearCrossSection.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
-// G4 Physics class: G4QNuNuNuclearCrossSection for gamma+A cross sections
+// G4 Physics class: G4QNuNuNuclearCrossSection for (nu,nu)A cross sections
 // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03
@@ -37,5 +37,5 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
-//===============================================================================================
+//=========================================================================================
 
 //#define debug
@@ -90,5 +90,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(pPDG!=14)
@@ -111,7 +111,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -163,7 +163,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QNMNCS::GetCrSec: CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -172,5 +172,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -184,5 +184,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QNMNCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -200,7 +200,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QNMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -274,10 +274,10 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastTX =TX[I];                 // Pointer to the prepared TX function (same isotope)
       lastQE =QE[I];                 // Pointer to the prepared QE function (same isotope)
-	  }
-	  else                              // This isotope wasn't calculated previously => CREATE
-	  {
+   }
+   else                              // This isotope wasn't calculated previously => CREATE
+   {
       if(first)
       {
@@ -295,5 +295,5 @@
       TX.push_back(lastTX);
       QE.push_back(lastQE);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -310,5 +310,5 @@
     G4int sep=ran;  // as a result = an index of the left edge of the interval
     while(ran>=2)
-				{
+    {
       G4int newran=ran/2;
       if(lastE<=lastEN[sep]) sep-=newran;
@@ -357,34 +357,34 @@
   static const G4int nE=65; // !! If change this, change it in GetCrossSection() (*.cc) !!
   static const G4double nuEn[nE]={0.,
-1.00463e-5,1.05336e-5,1.10692e-5,1.16592e-5,1.23109e-5,1.30323e-5,1.38331e-5,1.47245e-5,
-1.57194e-5,1.68335e-5,1.80848e-5,1.94948e-5,2.10894e-5,2.28991e-5,2.49608e-5,2.73189e-5,
-3.00273e-5,3.31516e-5,3.67722e-5,4.09881e-5,4.59217e-5,5.17255e-5,5.85908e-5,6.67583e-5,
-7.65338e-5,8.83078e-5,.000102583,.000120011,.000141441,.000167995,.000201160,.000242926,
-.000295985,.000364008,.000452051,.000567152,.000719210,.000922307,.001196710,.001571930,
-.002091530,.002820590,.003857810,.005354930,.007548840,.010815300,.015760100,.023376900,
-.035325600,.054430800,.085595700,.137508000,.225898000,.379892000,.654712000,1.15767000,
-2.10277000,3.92843000,7.55861000,14.9991000,30.7412000,65.1734000,143.155000,326.326000};
+  1.00463e-5,1.05336e-5,1.10692e-5,1.16592e-5,1.23109e-5,1.30323e-5,1.38331e-5,1.47245e-5,
+  1.57194e-5,1.68335e-5,1.80848e-5,1.94948e-5,2.10894e-5,2.28991e-5,2.49608e-5,2.73189e-5,
+  3.00273e-5,3.31516e-5,3.67722e-5,4.09881e-5,4.59217e-5,5.17255e-5,5.85908e-5,6.67583e-5,
+  7.65338e-5,8.83078e-5,.000102583,.000120011,.000141441,.000167995,.000201160,.000242926,
+  .000295985,.000364008,.000452051,.000567152,.000719210,.000922307,.001196710,.001571930,
+  .002091530,.002820590,.003857810,.005354930,.007548840,.010815300,.015760100,.023376900,
+  .035325600,.054430800,.085595700,.137508000,.225898000,.379892000,.654712000,1.15767000,
+  2.10277000,3.92843000,7.55861000,14.9991000,30.7412000,65.1734000,143.155000,326.326000};
   static const G4double TOTX[nE]={0.,
-3.18319e-5,3.33759e-5,3.50729e-5,3.69425e-5,3.90071e-5,4.12928e-5,4.38300e-5,4.66541e-5,
-4.98065e-5,5.33360e-5,5.73004e-5,6.17678e-5,6.68196e-5,7.25529e-5,7.90845e-5,8.65551e-5,
-9.51355e-5,.000105033,.000116503,.000129858,.000145486,.000163871,.000185616,.000211484,
-.000242444,.000279730,.000324932,.000380110,.000447953,.000531999,.000636946,.000769076,
-.000936873,.001151900,.001430050,.001793410,.002272980,.002912690,.003775490,.004952530,
-.006577150,.008846400,.012054100,.017404800,.027443300,.040285600,.058251500,.084054600,
-.121309000,.173273000,.240200000,.312865000,.367478000,.379071000,.348461000,.301143000,
-.259802000,.231449000,.214007000,.203827000,.198265000,.195186000,.192821000,.190555000};
+  3.18319e-5,3.33759e-5,3.50729e-5,3.69425e-5,3.90071e-5,4.12928e-5,4.38300e-5,4.66541e-5,
+  4.98065e-5,5.33360e-5,5.73004e-5,6.17678e-5,6.68196e-5,7.25529e-5,7.90845e-5,8.65551e-5,
+  9.51355e-5,.000105033,.000116503,.000129858,.000145486,.000163871,.000185616,.000211484,
+  .000242444,.000279730,.000324932,.000380110,.000447953,.000531999,.000636946,.000769076,
+  .000936873,.001151900,.001430050,.001793410,.002272980,.002912690,.003775490,.004952530,
+  .006577150,.008846400,.012054100,.017404800,.027443300,.040285600,.058251500,.084054600,
+  .121309000,.173273000,.240200000,.312865000,.367478000,.379071000,.348461000,.301143000,
+  .259802000,.231449000,.214007000,.203827000,.198265000,.195186000,.192821000,.190555000};
   static const G4double QELX[nE]={0.,
-.319793e-9,.351567e-9,.388228e-9,.430721e-9,.480212e-9,.538141e-9,.606306e-9,.686956e-9,
-.782930e-9,.897832e-9,1.03626e-9,1.20415e-9,1.40918e-9,1.66139e-9,1.97401e-9,2.36458e-9,
-2.85666e-9,3.48202e-9,4.28408e-9,5.32264e-9,6.68098e-9,8.47630e-9,1.08754e-8,1.41183e-8,
-1.85552e-8,2.47023e-8,3.33325e-8,4.56172e-8,6.33590e-8,8.93735e-8,1.28128e-7,1.86829e-7,
-2.77301e-7,4.19300e-7,6.46455e-7,1.01714e-6,1.63475e-6,2.68640e-6,4.51816e-6,7.78503e-6,
-1.37563e-5,2.49521e-5,4.65025e-5,9.32015e-5,.000207165,.000435700,.000918046,.001964940,
-.004285300,.009431390,.020560100,.043021600,.083012600,.142280000,.194239000,.222213000,
-.231903000,.234030000,.234691000,.235204000,.235575000,.235793000,.235902000,.235946000};
+  .319793e-9,.351567e-9,.388228e-9,.430721e-9,.480212e-9,.538141e-9,.606306e-9,.686956e-9,
+  .782930e-9,.897832e-9,1.03626e-9,1.20415e-9,1.40918e-9,1.66139e-9,1.97401e-9,2.36458e-9,
+  2.85666e-9,3.48202e-9,4.28408e-9,5.32264e-9,6.68098e-9,8.47630e-9,1.08754e-8,1.41183e-8,
+  1.85552e-8,2.47023e-8,3.33325e-8,4.56172e-8,6.33590e-8,8.93735e-8,1.28128e-7,1.86829e-7,
+  2.77301e-7,4.19300e-7,6.46455e-7,1.01714e-6,1.63475e-6,2.68640e-6,4.51816e-6,7.78503e-6,
+  1.37563e-5,2.49521e-5,4.65025e-5,9.32015e-5,.000207165,.000435700,.000918046,.001964940,
+  .004285300,.009431390,.020560100,.043021600,.083012600,.142280000,.194239000,.222213000,
+  .231903000,.234030000,.234691000,.235204000,.235575000,.235793000,.235902000,.235946000};
   // --------------------------------
   G4int first=0;
   if(z<0.)
-		{
+  {
     first=1;
     z=-z;
@@ -405,5 +405,5 @@
     t[k]=TOTX[k]*nuEn[k]*(na+na)/ta+QELX[k]*(dn+dn-da)/ta; // TotalCrossSection
     q[k]=QELX[k]*dn/a;                                     // QuasiElasticCrossSection
-	 }
+  }
   return first;
 }
@@ -420,14 +420,14 @@
   // Reversed table
   static const G4double Xl[nQ2]={1.87905e-10,
-	.005231,	.010602,	.016192,	.022038,	.028146,	.034513,	.041130,	.047986,	.055071,	.062374,
-	.069883,	.077587,	.085475,	.093539,	.101766,	.110150,	.118680,	.127348,	.136147,	.145069,
-	.154107,	.163255,	.172506,	.181855,	.191296,	.200825,	.210435,	.220124,	.229886,	.239718,
-	.249617,	.259578,	.269598,	.279675,	.289805,	.299986,	.310215,	.320490,	.330808,	.341169,
-	.351568,	.362006,	.372479,	.382987,	.393527,	.404099,	.414700,	.425330,	.435987,	.446670,
-	.457379,	.468111,	.478866,	.489643,	.500441,	.511260,	.522097,	.532954,	.543828,	.554720,
-	.565628,	.576553,	.587492,	.598447,	.609416,	.620398,	.631394,	.642403,	.653424,	.664457,
-	.675502,	.686557,	.697624,	.708701,	.719788,	.730886,	.741992,	.753108,	.764233,	.775366,
-	.786508,	.797658,	.808816,	.819982,	.831155,	.842336,	.853524,	.864718,	.875920,	.887128,
-	.898342,	.909563,	.920790,	.932023,	.943261,	.954506,	.965755,	.977011,	.988271,	.999539};
+ .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071, .062374,
+ .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147, .145069,
+ .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886, .239718,
+ .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808, .341169,
+ .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987, .446670,
+ .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828, .554720,
+ .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424, .664457,
+ .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233, .775366,
+ .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920, .887128,
+ .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271, .999539};
   // Direct table
   static const G4double Xmax=Xl[lQ2];
@@ -435,14 +435,14 @@
   static const G4double dX=(Xmax-Xmin)/lQ2;  // step in X(Q2, GeV^2)
   static const G4double inl[nQ2]={0,
-	1.88843,	3.65455,	5.29282,	6.82878,	8.28390,	9.67403,	11.0109,	12.3034,	13.5583,	14.7811,
-	15.9760,	17.1466,	18.2958,	19.4260,	20.5392,	21.6372,	22.7215,	23.7933,	24.8538,	25.9039,
-	26.9446,	27.9766,	29.0006,	30.0171,	31.0268,	32.0301,	33.0274,	34.0192,	35.0058,	35.9876,
-	36.9649,	37.9379,	38.9069,	39.8721,	40.8337,	41.7920,	42.7471,	43.6992,	44.6484,	45.5950,
-	46.5390,	47.4805,	48.4197,	49.3567,	50.2916,	51.2245,	52.1554,	53.0846,	54.0120,	54.9377,
-	55.8617,	56.7843,	57.7054,	58.6250,	59.5433,	60.4603,	61.3761,	62.2906,	63.2040,	64.1162,
-	65.0274,	65.9375,	66.8467,	67.7548,	68.6621,	69.5684,	70.4738,	71.3784,	72.2822,	73.1852,
-	74.0875,	74.9889,	75.8897,	76.7898,	77.6892,	78.5879,	79.4860,	80.3835,	81.2804,	82.1767,
-	83.0724,	83.9676,	84.8622,	85.7563,	86.6499,	87.5430,	88.4356,	89.3277,	90.2194,	91.1106,
-	92.0013,	92.8917,	93.7816,	94.6711,	95.5602,	96.4489,	97.3372,	98.2252,	99.1128,	100.000};
+ 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583, 14.7811,
+ 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538, 25.9039,
+ 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058, 35.9876,
+ 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484, 45.5950,
+ 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120, 54.9377,
+ 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040, 64.1162,
+ 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822, 73.1852,
+ 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804, 82.1767,
+ 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194, 91.1106,
+ 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128, 100.000};
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double dEnu=Enu+Enu;              // doubled energy of nu/anu
@@ -503,63 +503,63 @@
   // Reversed table
   static const G4double X0[nX]={6.14081e-05,
-	.413394,	.644455,	.843199,	1.02623,	1.20032,	1.36916,	1.53516,	1.70008,	1.86539,	2.03244,
-	2.20256,	2.37723,	2.55818,	2.74762,	2.94857,	3.16550,	3.40582,	3.68379,	4.03589,	4.77419};
+ .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539, 2.03244,
+ 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589, 4.77419};
   static const G4double X1[nX]={.00125268,
-	.861178,	1.34230,	1.75605,	2.13704,	2.49936,	2.85072,	3.19611,	3.53921,	3.88308,	4.23049,
-	4.58423,	4.94735,	5.32342,	5.71700,	6.13428,	6.58447,	7.08267,	7.65782,	8.38299,	9.77330};
+ .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308, 4.23049,
+ 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299, 9.77330};
   static const G4double X2[nX]={.015694,
-	1.97690,	3.07976,	4.02770,	4.90021,	5.72963,	6.53363,	7.32363,	8.10805,	8.89384,	9.68728,
-	10.4947,	11.3228,	12.1797,	13.0753,	14.0234,	15.0439,	16.1692,	17.4599,	19.0626,	21.7276};
+ 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384, 9.68728,
+ 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626, 21.7276};
   static const G4double X3[nX]={.0866877,
-	4.03498,	6.27651,	8.20056,	9.96931,	11.6487,	13.2747,	14.8704,	16.4526,	18.0351,	19.6302,
-	21.2501,	22.9075,	24.6174,	26.3979,	28.2730,	30.2770,	32.4631,	34.9243,	37.8590,	41.9115};
+ 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351, 19.6302,
+ 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590, 41.9115};
   static const G4double X4[nX]={.160483,
-	5.73111,	8.88884,	11.5893,	14.0636,	16.4054,	18.6651,	20.8749,	23.0578,	25.2318,	27.4127,
-	29.6152,	31.8540,	34.1452,	36.5074,	38.9635,	41.5435,	44.2892,	47.2638,	50.5732,	54.4265};
+ 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318, 27.4127,
+ 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732, 54.4265};
   static const G4double X5[nX]={.0999307,
-	5.25720,	8.11389,	10.5375,	12.7425,	14.8152,	16.8015,	18.7296,	20.6194,	22.4855,	24.3398,
-	26.1924,	28.0527,	29.9295,	31.8320,	33.7699,	35.7541,	37.7975,	39.9158,	42.1290,	44.4649};
+ 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855, 24.3398,
+ 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290, 44.4649};
   static const G4double X6[nX]={.0276367,
-	3.53378,	5.41553,	6.99413,	8.41629,	9.74057,	10.9978,	12.2066,	13.3796,	14.5257,	15.6519,
-	16.7636,	17.8651,	18.9603,	20.0527,	21.1453,	22.2411,	23.3430,	24.4538,	25.5765,	26.7148};
+ 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257, 15.6519,
+ 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765, 26.7148};
   static const G4double X7[nX]={.00472383,
-	2.08253,	3.16946,	4.07178,	4.87742,	5.62140,	6.32202,	6.99034,	7.63368,	8.25720,	8.86473,
-	9.45921,	10.0430,	10.6179,	11.1856,	11.7475,	12.3046,	12.8581,	13.4089,	13.9577,	14.5057};
+ 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720, 8.86473,
+ 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577, 14.5057};
   static const G4double X8[nX]={.000630783,
-	1.22723,	1.85845,	2.37862,	2.84022,	3.26412,	3.66122,	4.03811,	4.39910,	4.74725,	5.08480,
-	5.41346,	5.73457,	6.04921,	6.35828,	6.66250,	6.96250,	7.25884,	7.55197,	7.84232,	8.13037};
+ 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725, 5.08480,
+ 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232, 8.13037};
   static const G4double X9[nX]={7.49179e-05,
-	.772574,	1.16623,	1.48914,	1.77460,	2.03586,	2.27983,	2.51069,	2.73118,	2.94322,	3.14823,
-	3.34728,	3.54123,	3.73075,	3.91638,	4.09860,	4.27779,	4.45428,	4.62835,	4.80025,	4.97028};
+ .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322, 3.14823,
+ 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025, 4.97028};
   static const G4double XA[nX]={8.43437e-06,
-	.530035,	.798454,	1.01797,	1.21156,	1.38836,	1.55313,	1.70876,	1.85712,	1.99956,	2.13704,
-	2.27031,	2.39994,	2.52640,	2.65007,	2.77127,	2.89026,	3.00726,	3.12248,	3.23607, 3.34823};
+ .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956, 2.13704,
+ 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248, 3.23607, 3.34823};
   static const G4double XB[nX]={9.27028e-07,
-	.395058,	.594211,	.756726,	.899794,	1.03025,	1.15167,	1.26619,	1.37523,	1.47979,	1.58059,
-	1.67819,	1.77302,	1.86543,	1.95571,	2.04408,	2.13074,	2.21587,	2.29960,	2.38206, 2.46341};
+ .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979, 1.58059,
+ 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960, 2.38206, 2.46341};
   static const G4double XC[nX]={1.00807e-07,
-	.316195,	.474948,	.604251,	.717911,	.821417,	.917635,	1.00829,	1.09452,	1.17712,	1.25668,
-	1.33364,	1.40835,	1.48108,	1.55207,	1.62150,	1.68954,	1.75631,	1.82193,	1.88650, 1.95014};
+ .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712, 1.25668,
+ 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193, 1.88650, 1.95014};
   static const G4double XD[nX]={1.09102e-08,
-	.268227,	.402318,	.511324,	.606997,	.694011,	.774803,	.850843,	.923097,	.992243,	1.05878,
-	1.12309,	1.18546,	1.24613,	1.30530,	1.36313,	1.41974,	1.47526,	1.52978,	1.58338,	1.63617};
+ .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243, 1.05878,
+ 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338, 1.63617};
   static const G4double XE[nX]={1.17831e-09,
-	.238351,	.356890,	.453036,	.537277,	.613780,	.684719,	.751405,	.814699,	.875208,	.933374,
-	.989535,	1.04396,	1.09685,	1.14838,	1.19870,	1.24792,	1.29615,	1.34347,	1.38996, 1.43571};
+ .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208, .933374,
+ .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347, 1.38996, 1.43571};
   static const G4double XF[nX]={1.27141e-10,
-	.219778,	.328346,	.416158,	.492931,	.562525,	.626955,	.687434,	.744761,	.799494,	.852046,
-	.902729,	.951786,	.999414,	1.04577,	1.09099,	1.13518,	1.17844,	1.22084,	1.26246,	1.30338};
+ .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494, .852046,
+ .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246, 1.30338};
   static const G4double XG[nX]={1.3713e-11,
-	.208748,	.310948,	.393310,	.465121,	.530069,	.590078,	.646306,	.699515,	.750239,	.798870,
-	.845707,	.890982,	.934882,	.977559,	1.01914,	1.05973,	1.09941,	1.13827,	1.17637, 1.21379};
+ .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239, .798870,
+ .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827, 1.17637, 1.21379};
   static const G4double XH[nX]={1.47877e-12,
-	.203089,	.301345,	.380162,	.448646,	.510409,	.567335,	.620557,	.670820,	.718647,	.764421,
-	.808434,	.850914,	.892042,	.931967,	.970812,	1.00868,	1.04566,	1.08182,	1.11724, 1.15197};
+ .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647, .764421,
+ .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182, 1.11724, 1.15197};
   static const G4double XI[nX]={1.59454e-13,
-	.201466,	.297453,	.374007,	.440245,	.499779,	.554489,	.605506,	.653573,	.699213,	.742806,
-	.784643,	.824952,	.863912,	.901672,	.938353,	.974060,	1.00888,	1.04288,	1.07614,	1.10872};
+ .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213, .742806,
+ .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614, 1.10872};
   static const G4double XJ[nX]={1.71931e-14,
-	.202988,	.297870,	.373025,	.437731,	.495658,	.548713,	.598041,	.644395,	.688302,	.730147,
-	.770224,	.808762,	.845943,	.881916,	.916805,	.950713,	.983728,	1.01592,	1.04737, 1.07813};
+ .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302, .730147,
+ .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592, 1.04737, 1.07813};
   // Direct table
   static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0],
@@ -574,72 +574,72 @@
                              {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ};
   static const G4double I0[nX]={0,
-	.411893,	1.25559,	2.34836,	3.60264,	4.96046,	6.37874,	7.82342,	9.26643,	10.6840,	12.0555,
-	13.3628,	14.5898,	15.7219,	16.7458,	17.6495,	18.4217,	19.0523,	19.5314,	19.8501, 20.0000};
+ .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840, 12.0555,
+ 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314, 19.8501, 20.0000};
   static const G4double I1[nX]={0,
-	.401573,	1.22364,	2.28998,	3.51592,	4.84533,	6.23651,	7.65645,	9.07796,	10.4780,	11.8365,
-	13.1360,	14.3608,	15.4967,	16.5309,	17.4516,	18.2481,	18.9102,	19.4286,	19.7946, 20.0000};
+ .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780, 11.8365,
+ 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286, 19.7946, 20.0000};
   static const G4double I2[nX]={0,
-	.387599,	1.17339,	2.19424,	3.37090,	4.65066,	5.99429,	7.37071,	8.75427,	10.1232,	11.4586,
-	12.7440,	13.9644,	15.1065,	16.1582,	17.1083,	17.9465,	18.6634,	19.2501,	19.6982, 20.0000};
+ .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232, 11.4586,
+ 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501, 19.6982, 20.0000};
   static const G4double I3[nX]={0,
-	.366444,	1.09391,	2.04109,	3.13769,	4.33668,	5.60291,	6.90843,	8.23014,	9.54840,	10.8461,
-	12.1083,	13.3216,	14.4737,	15.5536,	16.5512,	17.4573,	18.2630,	18.9603,	19.5417, 20.0000};
+ .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840, 10.8461,
+ 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603, 19.5417, 20.0000};
   static const G4double I4[nX]={0,
-	.321962,	.959681,	1.79769,	2.77753,	3.85979,	5.01487,	6.21916,	7.45307,	8.69991,	9.94515,
-	11.1759,	12.3808,	13.5493,	14.6720,	15.7402,	16.7458,	17.6813,	18.5398,	19.3148, 20.0000};
+ .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991, 9.94515,
+ 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398, 19.3148, 20.0000};
   static const G4double I5[nX]={0,
-	.257215,	.786302,	1.49611,	2.34049,	3.28823,	4.31581,	5.40439,	6.53832,	7.70422,	8.89040,
-	10.0865,	11.2833,	12.4723,	13.6459,	14.7969,	15.9189,	17.0058,	18.0517,	19.0515, 20.0000};
+ .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422, 8.89040,
+ 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517, 19.0515, 20.0000};
   static const G4double I6[nX]={0,
-	.201608,	.638914,	1.24035,	1.97000,	2.80354,	3.72260,	4.71247,	5.76086,	6.85724,	7.99243,
-	9.15826,	10.3474,	11.5532,	12.7695,	13.9907,	15.2117,	16.4275,	17.6337,	18.8258, 20.0000};
+ .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724, 7.99243,
+ 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337, 18.8258, 20.0000};
   static const G4double I7[nX]={0,
-	.168110,	.547208,	1.07889,	1.73403,	2.49292,	3.34065,	4.26525,	5.25674,	6.30654,	7.40717,
-	8.55196,	9.73492,	10.9506,	12.1940,	13.4606,	14.7460,	16.0462,	17.3576,	18.6767, 20.0000};
+ .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654, 7.40717,
+ 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576, 18.6767, 20.0000};
   static const G4double I8[nX]={0,
-	.150652,	.497557,	.990048,	1.60296,	2.31924,	3.12602,	4.01295,	4.97139,	5.99395,	7.07415,
-	8.20621,	9.38495,	10.6057,	11.8641,	13.1561,	14.4781,	15.8267,	17.1985,	18.5906, 20.0000};
+ .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395, 7.07415,
+ 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985, 18.5906, 20.0000};
   static const G4double I9[nX]={0,
-	.141449,	.470633,	.941304,	1.53053,	2.22280,	3.00639,	3.87189,	4.81146,	5.81837,	6.88672,
-	8.01128,	9.18734,	10.4106,	11.6772,	12.9835,	14.3261,	15.7019,	17.1080,	18.5415, 20.0000};
+ .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837, 6.88672,
+ 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080, 18.5415, 20.0000};
   static const G4double IA[nX]={0,
-	.136048,	.454593,	.912075,	1.48693,	2.16457,	2.93400,	3.78639,	4.71437,	5.71163,	6.77265,
-	7.89252,	9.06683,	10.2916,	11.5631,	12.8780,	14.2331,	.625500,	17.0525,	18.5115, 20.0000};
+ .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163, 6.77265,
+ 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525, 18.5115, 20.0000};
   static const G4double IB[nX]={0,
-	.132316,	.443455,	.891741,	1.45656,	2.12399,	2.88352,	3.72674,	4.64660,	5.63711,	6.69298,
-	7.80955,	8.98262,	10.2084,	11.4833,	12.8042,	14.1681,	15.5721,	17.0137,	18.4905, 20.0000};
+ .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711, 6.69298,
+ 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137, 18.4905, 20.0000};
   static const G4double IC[nX]={0,
-	.129197,	.434161,	.874795,	1.43128,	2.09024,	2.84158,	3.67721,	4.59038,	5.57531,	6.62696,
-	7.74084,	8.91291,	10.1395,	11.4173,	12.7432,	14.1143,	15.5280,	16.9817,	18.4731, 20.0000};
+ .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531, 6.62696,
+ 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817, 18.4731, 20.0000};
   static const G4double ID[nX]={0,
-	.126079,	.424911,	.857980,	1.40626,	2.05689,	2.80020,	3.62840,	4.53504,	5.51456,	6.56212,
-	7.67342,	8.84458,	10.0721,	11.3527,	12.6836,	14.0618,	15.4849,	16.9504,	18.4562, 20.0000};
+ .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456, 6.56212,
+ 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504, 18.4562, 20.0000};
   static const G4double IE[nX]={0,
-	.122530,	.414424,	.838964,	1.37801,	2.01931,	2.75363,	3.57356,	4.47293,	5.44644,	6.48949,
-	7.59795,	8.76815,	9.99673,	11.2806,	12.6170,	14.0032,	15.4369,	16.9156,	18.4374, 20.0000};
+ .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644, 6.48949,
+ 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156, 18.4374, 20.0000};
   static const G4double IF[nX]={0,
-	.118199,	.401651,	.815838,	1.34370,	1.97370,	2.69716,	3.50710,	4.39771,	5.36401,	6.40164,
-	7.50673,	8.67581,	9.90572,	11.1936,	12.5367,	13.9326,	15.3790,	16.8737,	18.4146, 20.0000};
+ .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401, 6.40164,
+ 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737, 18.4146, 20.0000};
   static const G4double IG[nX]={0,
-	.112809,	.385761,	.787075,	1.30103,	1.91700,	2.62697,	3.42451,	4.30424,	5.26158,	6.29249,
-	7.39341,	8.56112,	9.79269,	11.0855,	12.4369,	13.8449,	15.3071,	16.8216,	18.3865, 20.0000};
+ .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158, 6.29249,
+ 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216, 18.3865, 20.0000};
   static const G4double IH[nX]={0,
-	.106206,	.366267,	.751753,	1.24859,	1.84728,	2.54062,	3.32285,	.189160,	5.13543,	6.15804,
-	7.25377,	8.41975,	9.65334,	10.9521,	12.3139,	13.7367,	15.2184,	16.7573,	18.3517, 20.0000};
+ .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543, 6.15804,
+ 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573, 18.3517, 20.0000};
   static const G4double II[nX]={0,
-	.098419,	.343194,	.709850,	1.18628,	1.76430,	2.43772,	3.20159,	4.05176,	4.98467,	5.99722,
-	7.08663,	8.25043,	9.48633,	10.7923,	12.1663,	13.6067,	15.1118,	16.6800,	18.3099,	20.0000};
+ .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467, 5.99722,
+ 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099, 20.0000};
   static const G4double IJ[nX]={0,
-	.089681,	.317135,	.662319,	1.11536,	1.66960,	2.32002,	3.06260,	3.89397,	4.81126,	5.81196,
-	6.89382,	8.05483,	9.29317,	10.6072,	11.9952,	13.4560,	14.9881,	16.5902,	18.2612, 20.0000};
+ .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126, 5.81196,
+ 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902, 18.2612, 20.0000};
   static const G4double* Il[nE]=
                              {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ};
   static const G4double lE[nE]={
--1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215,	.459141,	.867068,	1.27499,	1.68292,
- 2.09085,	2.49877,	2.90670,	3.31463,	3.72255,	4.13048,	4.53840,	4.94633,	5.35426,	5.76218};
+-1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292,
+ 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218};
   static const G4double lEmi=lE[0];
   static const G4double lEma=lE[nE-1];
   static const G4double dlE=(lEma-lEmi)/bE;
-	 //***************************************************************************************
+  //***************************************************************************************
   G4double Enu=lastE;                 // Get energy of the last calculated cross-section
   G4double lEn=std::log(Enu);         // log(E) for interpolation
@@ -727,4 +727,4 @@
 }
 
-// This class can provide only virtual exchange pi+ (a substitute for W+ boson)
+// This class can provide only virtual exchange gamma (a substitute for Z0 boson)
 G4int G4QNuNuNuclearCrossSection::GetExchangePDGCode() {return 22;}
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QPhotonNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QPhotonNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QPhotonNuclearCrossSection.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -36,5 +36,9 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
-//
+// Short description: This is an original CHIPS process for photo-nuclear
+// interactions, which does not include "fast and dirty" corrections for
+// reactions near threshold, with respect to the GHAD application of CHIPS.
+// ------------------------------------------------------------------------
+
 //#define debug
 //#define pdebug
@@ -85,5 +89,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(!pPDG)
@@ -106,7 +110,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -125,5 +129,5 @@
         lastP  =colP [i];                // Last Momentum  (A-dependent)
         lastCS =colCS[i];                // Last CrossSect (A-dependent)
-	//        if(std::fabs(lastP/pMom-1.)<tolerance) // VI do not use tolerance
+ //        if(std::fabs(lastP/pMom-1.)<tolerance) // VI do not use tolerance
         if(lastP == pMom)
         {
@@ -159,7 +163,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QPhCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -168,5 +172,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -180,5 +184,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QPhCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -196,7 +200,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QPrCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -266,13 +270,13 @@
   G4double mP= infEn;
   if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1))
-     	    mP = G4NucleiProperties::GetNuclearMass(A-1.,Z-1.)/MeV; // ResNucMass for a proton
+          mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV;// ResNucMass for a proton
 
   G4double mN= infEn;
   if(N&&G4NucleiProperties::IsInStableTable(A-1,Z))
-    	    mN = G4NucleiProperties::GetNuclearMass(A-1.,Z)/MeV;  // ResNucMass for a neutron
+          mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV;  // ResNucMass for a neutron
 
   G4double mA= infEn;
   if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2))
-     	    mA=G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV; // ResNucMass for an alpha
+          mA=G4NucleiProperties::GetNuclearMass(A-4,Z-2)/MeV;  // ResNucMass for an alpha
 
   G4double dP= mP +mProt - mT;
@@ -280,5 +284,5 @@
   G4double dA= mA +mAlph - mT;
 #ifdef pdebug
-		G4cout<<"G4QPhotoNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="
+  G4cout<<"G4QPhotoNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="
         <<mA<<",dA="<<dA<<",mT="<<mT<<",A="<<A<<",Z="<<Z<<G4endl;
 #endif
@@ -293,5 +297,5 @@
 {
 #ifdef pdebug
-		G4cout<<"G4QPhotonNucCrossSection::CalculateCrossSection: ***Called***"<<G4endl;
+  G4cout<<"G4QPhotonNucCrossSection::CalculateCrossSection: ***Called***"<<G4endl;
 #endif
   static const G4double THmin=2.;  // minimum Energy Threshold
@@ -320,5 +324,5 @@
   onlyCS=CS;                         // Flag to calculate only CS (not Si/Bi)
 #ifdef pdebug
-		G4cout<<"G4QPhotonNucCS::CalcCS: P="<<Energy<<", F="<<F<<", I="<<I<<", Z="<<targZ
+  G4cout<<"G4QPhotonNucCS::CalcCS: P="<<Energy<<", F="<<F<<", I="<<I<<", Z="<<targZ
         <<", N="<<targN<<", onlyCS="<<CS<<",E="<<Energy<<",th="<<THmin<<G4endl;
   if(F==-27) return 0.;
@@ -329,5 +333,5 @@
     lastSig=0.;
 #ifdef pdebug
-				G4cout<<"---> G4QMuonNucCS::CalcCS: CS=0  as E="<<Energy<<" < "<<THmin<<G4endl;
+    G4cout<<"---> G4QMuonNucCS::CalcCS: CS=0  as E="<<Energy<<" < "<<THmin<<G4endl;
 #endif
     return 0.;                      // @@ This can be dangerouse for the heaviest nuc.!
@@ -338,11 +342,11 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
+    {
       lastGDR=GDR[I];                // Pointer to prepared GDR cross sections
       lastHEN=HEN[I];                // Pointer to prepared High Energy cross sections
       lastSP =spA[I];                // Shadowing coefficient for UHE
     }
-	   else                             // This isotope wasn't calculated previously => CREATE
-	   {
+    else                             // This isotope wasn't calculated previously => CREATE
+    {
       G4double lnA=std::log(A);          // The nucleus is not found in DB. It is new.
       if(A==1.) lastSP=1.;               // The Reggeon shadowing (A=1)
@@ -357,5 +361,5 @@
       lastHEN = new G4double[nH];        // Allocate memory for the new HEN cross sections
       G4int er=GetFunctions(A,lastGDR,lastHEN);// set newZeroPosition and fill theFunctions
-	     if(er<1) G4cerr<<"***G4QPhotNucCrosSec::CalcCrossSection: A="<<A<<" failed"<<G4endl;
+      if(er<1) G4cerr<<"***G4QPhotNucCrosSec::CalcCrossSection: A="<<A<<" failed"<<G4endl;
 #ifdef debug
       G4cout<<"G4QPhotonNuclearCrossSec::CalcCS:**GDR/HEN're made** GetFunEr="<<er<<G4endl;
@@ -367,5 +371,5 @@
       HEN.push_back(lastHEN);            // added HEN, found by AH 10/7/02
       spA.push_back(lastSP);             // Pomeron Shadowing
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW the Magic Formula =================================
@@ -374,10 +378,10 @@
   {
 #ifdef debug
-	   G4cout<<"G4QPhNCS::CalcCS:bGDR A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dE="<<dE<<G4endl;
+    G4cout<<"G4QPhNCS::CalcCS:bGDR A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dE="<<dE<<G4endl;
 #endif
     if(A<=1.) sigma=0.;
     else      sigma=EquLinearFit(Energy,nL,THmin,dE,lastGDR);
 #ifdef debugn
-	   if(sigma<0.)
+    if(sigma<0.)
       G4cout<<"G4QPhoNucCS::CalcCS:A="<<A<<",E="<<Energy<<",T="<<THmin<<",dE="<<dE<<G4endl;
 #endif
@@ -569,18 +573,18 @@
   static const G4double SL9[nL]={
     3.243985e-4,1.122034e-3,3.000932e-3,6.850212e-3,1.414720e-2,2.751937e-2,5.204925e-2,
-				9.887958e-2,1.966468e-1,4.282973e-1,1.041076e+0,2.706630e+0,6.509565e+0,1.085114e+1,
-				1.162472e+1,1.124054e+1,1.202416e+1,1.402207e+1,1.659634e+1,1.891975e+1,2.032292e+1,
-				2.059083e+1,1.993672e+1,1.873926e+1,1.732572e+1,1.590211e+1,1.457097e+1,1.336993e+1,
-				1.230272e+1,1.135820e+1,1.052046e+1,9.773672e+0,9.103884e+0,8.499562e+0,7.951408e+0,
-				7.451996e+0,6.995366e+0,6.576679e+0,6.191930e+0,5.837748e+0,5.511235e+0,5.209864e+0,
-				4.931401e+0,4.673850e+0,4.435420e+0,4.214488e+0,4.009588e+0,3.819384e+0,3.642664e+0,
-				3.478323e+0,3.325356e+0,3.182848e+0,3.049964e+0,2.925943e+0,2.810093e+0,2.701782e+0,
-				2.600432e+0,2.505518e+0,2.416558e+0,2.333114e+0,2.254783e+0,2.181197e+0,2.112021e+0,
-				2.046943e+0,1.985682e+0,1.927976e+0,1.873586e+0,1.822292e+0,1.773891e+0,1.728195e+0,
-				1.685032e+0,1.644242e+0,1.605677e+0,1.569201e+0,1.534686e+0,1.502017e+0,1.471082e+0,
-				1.441781e+0,1.414020e+0,1.387711e+0,1.362772e+0,1.339127e+0,1.316705e+0,1.295438e+0,
-				1.275266e+0,1.256130e+0,1.237976e+0,1.220753e+0,1.204413e+0,1.188912e+0,1.174209e+0,
-				1.160265e+0,1.147042e+0,1.134507e+0,1.122628e+0,1.111376e+0,1.100721e+0,1.090639e+0,
-				1.081106e+0,1.072098e+0,1.063597e+0,1.055582e+0,1.048036e+0,1.040943e+0,1.034290e+0};
+    9.887958e-2,1.966468e-1,4.282973e-1,1.041076e+0,2.706630e+0,6.509565e+0,1.085114e+1,
+    1.162472e+1,1.124054e+1,1.202416e+1,1.402207e+1,1.659634e+1,1.891975e+1,2.032292e+1,
+    2.059083e+1,1.993672e+1,1.873926e+1,1.732572e+1,1.590211e+1,1.457097e+1,1.336993e+1,
+    1.230272e+1,1.135820e+1,1.052046e+1,9.773672e+0,9.103884e+0,8.499562e+0,7.951408e+0,
+    7.451996e+0,6.995366e+0,6.576679e+0,6.191930e+0,5.837748e+0,5.511235e+0,5.209864e+0,
+    4.931401e+0,4.673850e+0,4.435420e+0,4.214488e+0,4.009588e+0,3.819384e+0,3.642664e+0,
+    3.478323e+0,3.325356e+0,3.182848e+0,3.049964e+0,2.925943e+0,2.810093e+0,2.701782e+0,
+    2.600432e+0,2.505518e+0,2.416558e+0,2.333114e+0,2.254783e+0,2.181197e+0,2.112021e+0,
+    2.046943e+0,1.985682e+0,1.927976e+0,1.873586e+0,1.822292e+0,1.773891e+0,1.728195e+0,
+    1.685032e+0,1.644242e+0,1.605677e+0,1.569201e+0,1.534686e+0,1.502017e+0,1.471082e+0,
+    1.441781e+0,1.414020e+0,1.387711e+0,1.362772e+0,1.339127e+0,1.316705e+0,1.295438e+0,
+    1.275266e+0,1.256130e+0,1.237976e+0,1.220753e+0,1.204413e+0,1.188912e+0,1.174209e+0,
+    1.160265e+0,1.147042e+0,1.134507e+0,1.122628e+0,1.111376e+0,1.100721e+0,1.090639e+0,
+    1.081106e+0,1.072098e+0,1.063597e+0,1.055582e+0,1.048036e+0,1.040943e+0,1.034290e+0};
   static const G4double SL10[nL]={
     4.311217e-4,1.384716e-3,3.549518e-3,7.988549e-3,1.667330e-2,3.341344e-2,6.552895e-2,
@@ -713,18 +717,18 @@
   static const G4double SL18[nL]={
     2.220534e-3,5.640053e-3,1.253572e-2,2.881392e-2,7.191580e-2,1.859408e-1,4.687157e-1,
-				1.115760e+0,2.485562e+0,5.183559e+0,1.013008e+1,1.847496e+1,3.103145e+1,4.701870e+1,
-				6.345164e+1,7.777111e+1,8.950804e+1,9.321427e+1,8.410731e+1,6.975786e+1,5.670984e+1,
-				4.641759e+1,3.856198e+1,3.257293e+1,2.796698e+1,2.438084e+1,2.154901e+1,1.927832e+1,
-				1.742802e+1,1.589540e+1,1.460538e+1,1.350313e+1,1.254846e+1,1.171188e+1,1.097157e+1,
-				1.031123e+1,9.718498e+0,9.183826e+0,8.699693e+0,8.260038e+0,7.859873e+0,7.495011e+0,
-				7.161876e+0,6.857372e+0,6.578785e+0,6.323715e+0,6.090025e+0,5.875801e+0,5.679326e+0,
-				5.499048e+0,5.333567e+0,5.181614e+0,5.042039e+0,4.913795e+0,4.795932e+0,4.687583e+0,
-				4.587960e+0,4.496341e+0,4.412068e+0,4.334539e+0,4.263201e+0,4.197551e+0,4.137125e+0,
-				4.081496e+0,4.030275e+0,3.983101e+0,3.939643e+0,3.899598e+0,3.862684e+0,3.828641e+0,
-				3.797233e+0,3.768237e+0,3.741451e+0,3.716686e+0,3.693770e+0,3.672542e+0,3.652854e+0,
-				3.634571e+0,3.617565e+0,3.601721e+0,3.586931e+0,3.573099e+0,3.560132e+0,3.547947e+0,
-				3.536470e+0,3.525629e+0,3.515361e+0,3.505610e+0,3.496321e+0,3.487449e+0,3.478950e+0,
-				3.470787e+0,3.462928e+0,3.455342e+0,3.448006e+0,3.440898e+0,3.434002e+0,3.427303e+0,
-				3.420792e+0,3.414463e+0,3.408314e+0,3.402345e+0,3.396560e+0,3.390968e+0,3.385579e+0};
+    1.115760e+0,2.485562e+0,5.183559e+0,1.013008e+1,1.847496e+1,3.103145e+1,4.701870e+1,
+    6.345164e+1,7.777111e+1,8.950804e+1,9.321427e+1,8.410731e+1,6.975786e+1,5.670984e+1,
+    4.641759e+1,3.856198e+1,3.257293e+1,2.796698e+1,2.438084e+1,2.154901e+1,1.927832e+1,
+    1.742802e+1,1.589540e+1,1.460538e+1,1.350313e+1,1.254846e+1,1.171188e+1,1.097157e+1,
+    1.031123e+1,9.718498e+0,9.183826e+0,8.699693e+0,8.260038e+0,7.859873e+0,7.495011e+0,
+    7.161876e+0,6.857372e+0,6.578785e+0,6.323715e+0,6.090025e+0,5.875801e+0,5.679326e+0,
+    5.499048e+0,5.333567e+0,5.181614e+0,5.042039e+0,4.913795e+0,4.795932e+0,4.687583e+0,
+    4.587960e+0,4.496341e+0,4.412068e+0,4.334539e+0,4.263201e+0,4.197551e+0,4.137125e+0,
+    4.081496e+0,4.030275e+0,3.983101e+0,3.939643e+0,3.899598e+0,3.862684e+0,3.828641e+0,
+    3.797233e+0,3.768237e+0,3.741451e+0,3.716686e+0,3.693770e+0,3.672542e+0,3.652854e+0,
+    3.634571e+0,3.617565e+0,3.601721e+0,3.586931e+0,3.573099e+0,3.560132e+0,3.547947e+0,
+    3.536470e+0,3.525629e+0,3.515361e+0,3.505610e+0,3.496321e+0,3.487449e+0,3.478950e+0,
+    3.470787e+0,3.462928e+0,3.455342e+0,3.448006e+0,3.440898e+0,3.434002e+0,3.427303e+0,
+    3.420792e+0,3.414463e+0,3.408314e+0,3.402345e+0,3.396560e+0,3.390968e+0,3.385579e+0};
   static const G4double SL19[nL]={
     2.305897e-3,5.842654e-3,1.297593e-2,2.991119e-2,7.506153e-2,1.950960e-1,4.938019e-1,
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QProtonNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QProtonNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QProtonNuclearCrossSection.cc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
-// GEANT4 tag $Name: geant4-09-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -37,4 +37,6 @@
 // *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch **********
 // ****************************************************************************************
+// Short description: CHIPS cross-sections for proton-nuclear interactions
+// -----------------------------------------------------------------------
 //
 //#define debug
@@ -68,5 +70,6 @@
                                                        G4int tgZ, G4int tgN, G4int)
 {
-  static G4int j;                      // A#0f records found in DB for this projectile
+  static G4double tolerance=0.001;     // Tolerance (0.1%) to consider as "the same mom"
+  static G4int j;                      // A#0f Z/N-records already tested in AMDB
   static std::vector <G4int>    colN;  // Vector of N for calculated nuclei (isotops)
   static std::vector <G4int>    colZ;  // Vector of Z for calculated nuclei (isotops)
@@ -75,8 +78,7 @@
   static std::vector <G4double> colCS; // Vector of last cross sections for the reaction
   // ***---*** End of the mandatory Static Definitions of the Associative Memory ***---***
-  G4double pEn=pMom;
-#ifdef pdebug
+#ifdef debug
   G4cout<<"G4QPrCS::GetCS:>>> f="<<fCS<<", p="<<pMom<<", Z="<<tgZ<<"("<<lastZ<<") ,N="<<tgN
-        <<"("<<lastN<<"),PDG=2212, P="<<pEn<<"("<<lastTH<<")"<<",Sz="<<colN.size()<<G4endl;
+        <<"("<<lastN<<"),PDG=2212, thresh="<<lastTH<<",Sz="<<colN.size()<<G4endl;
 #endif
   G4bool in=false;                     // By default the isotope must be found in the AMDB
@@ -89,92 +91,93 @@
     lastI   = colN.size();             // Size of the Associative Memory DB in the heap
     j  = 0;                            // A#0f records found in DB for this projectile
-    if(lastI) for(G4int i=0; i<lastI; i++) // The partType is found
-	   {                                  // The nucleus with is found in AMDB
-      if(colN[i]==tgN && colZ[i]==tgZ)
-						{
-        lastI=i;
-        lastTH =colTH[i];                // Last THreshold (A-dependent)
-#ifdef pdebug
+#ifdef debug
+    G4cout<<"G4QPrCS::GetCS: the amount of records in the AMDB lastI="<<lastI<<G4endl;
+#endif
+    if(lastI) for(G4int i=0; i<lastI; i++) // AMDB exists, try to find the (Z,N) isotope
+    {
+      if(colN[i]==tgN && colZ[i]==tgZ) // Try the record "i" in the AMDB
+      {
+        lastI=i;                       // Remember the index for future fast/last use
+        lastTH =colTH[i];              // The last THreshold (A-dependent)
+#ifdef debug
         G4cout<<"G4QPrCS::GetCS:*Found* P="<<pMom<<",Threshold="<<lastTH<<",j="<<j<<G4endl;
 #endif
-        if(pEn<=lastTH)
+        if(pMom<=lastTH)
         {
-#ifdef pdebug
-          G4cout<<"G4QPrCS::GetCS:Found T="<<pEn<<" < Threshold="<<lastTH<<",CS=0"<<G4endl;
-#endif
-          return 0.;                     // Energy is below the Threshold value
+#ifdef debug
+          G4cout<<"G4QPCS::GetCS:Found,P="<<pMom<<" < Threshold="<<lastTH<<",CS=0"<<G4endl;
+#endif
+          return 0.;                   // Energy is below the Threshold value
         }
-        lastP  =colP [i];                // Last Momentum  (A-dependent)
-        lastCS =colCS[i];                // Last CrossSect (A-dependent)
-	//        if(std::fabs(lastP/pMom-1.)<tolerance)
-        if(lastP==pMom)                  // VI do not use tolerance
+        lastP  =colP [i];              // Last Momentum  (A-dependent)
+        lastCS =colCS[i];              // Last CrossSect (A-dependent)
+        if(std::fabs(lastP-pMom)<tolerance*pMom)
+        //if(lastP==pMom)              // VI do not use tolerance
         {
-#ifdef pdebug
-          G4cout<<"G4QPrCS::GetCS:P="<<pMom<<",CS="<<lastCS*millibarn<<G4endl;
-#endif
-          CalculateCrossSection(fCS,-1,j,2212,lastZ,lastN,pMom); // Update param's only
+#ifdef debug
+          G4cout<<"..G4QPrCS::GetCS:.DoNothing.P="<<pMom<<",CS="<<lastCS*millibarn<<G4endl;
+#endif
+          //CalculateCrossSection(fCS,-1,j,2212,lastZ,lastN,pMom); // Update param's only
           return lastCS*millibarn;     // Use theLastCS
         }
-        in = true;                       // This is the case when the isotop is found in DB
+        in = true;                     // This is the case when the isotop is found in DB
         // Momentum pMom is in IU ! @@ Units
-#ifdef pdebug
+#ifdef debug
         G4cout<<"G4QPrCS::G:UpdatDB P="<<pMom<<",f="<<fCS<<",lI="<<lastI<<",j="<<j<<G4endl;
 #endif
         lastCS=CalculateCrossSection(fCS,-1,j,2212,lastZ,lastN,pMom); // read & update
-#ifdef pdebug
+#ifdef debug
         G4cout<<"G4QPrCS::GetCrosSec: *****> New (inDB) Calculated CS="<<lastCS<<G4endl;
 #endif
-        if(lastCS<=0. && pEn>lastTH)    // Correct the threshold
+        if(lastCS<=0. && pMom>lastTH)  // Correct the threshold (@@ No intermediate Zeros)
         {
-#ifdef pdebug
-          G4cout<<"G4QPrCS::GetCS: New T="<<pEn<<"(CS=0) > Threshold="<<lastTH<<G4endl;
-#endif
-          lastTH=pEn;
+#ifdef debug
+          G4cout<<"G4QPrCS::GetCS: New P="<<pMom<<"(CS=0) > Threshold="<<lastTH<<G4endl;
+#endif
+          lastCS=0.;
+          lastTH=pMom;
         }
-        break;                           // Go out of the LOOP
-      }
-#ifdef pdebug
+        break;                         // Go out of the LOOP
+      }
+#ifdef debug
       G4cout<<"-->G4QPrCrossSec::GetCrosSec: pPDG=2212, j="<<j<<", N="<<colN[i]
             <<",Z["<<i<<"]="<<colZ[i]<<G4endl;
 #endif
       j++;                             // Increment a#0f records found in DB
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
-#ifdef pdebug
-      G4cout<<"G4QPrCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
+    }
+#ifdef debug
+    G4cout<<"-?-G4QPrCS::GetCS:RC Z="<<tgZ<<",N="<<tgN<<",in="<<in<<",j="<<j<<" ?"<<G4endl;
+#endif
+    if(!in)                            // This isotope has not been calculated previously
+    {
+#ifdef debug
+      G4cout<<"^^^G4QPrCS::GetCS:CalcNew P="<<pMom<<", f="<<fCS<<", lastI="<<lastI<<G4endl;
 #endif
       //!!The slave functions must provide cross-sections in millibarns (mb) !! (not in IU)
       lastCS=CalculateCrossSection(fCS,0,j,2212,lastZ,lastN,pMom); //calculate & create
-      if(lastCS<=0.)
-						{
+      if(lastCS>0.)                   // It means that the AMBD was initialized
+      {
+
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
-#ifdef pdebug
-        G4cout<<"G4QPrCrossSection::GetCrossSect: NewThresh="<<lastTH<<",T="<<pEn<<G4endl;
-#endif
-        if(pEn>lastTH)
-        {
-#ifdef pdebug
-          G4cout<<"G4QPrCS::GetCS: First T="<<pEn<<"(CS=0) > Threshold="<<lastTH<<G4endl;
-#endif
-          lastTH=pEn;
-        }
-						}
-#ifdef pdebug
-      G4cout<<"G4QPrCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
-#endif
-      colN.push_back(tgN);
-      colZ.push_back(tgZ);
-      colP.push_back(pMom);
-      colTH.push_back(lastTH);
-      colCS.push_back(lastCS);
+#ifdef debug
+        G4cout<<"G4QPrCrossSection::GetCrossSect: NewThresh="<<lastTH<<",P="<<pMom<<G4endl;
+#endif
+        colN.push_back(tgN);
+        colZ.push_back(tgZ);
+        colP.push_back(pMom);
+        colTH.push_back(lastTH);
+        colCS.push_back(lastCS);
+#ifdef debug
+        G4cout<<"G4QPrCS::GetCrosSec:recCS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
+#endif
+      }
 #ifdef pdebug
       G4cout<<"G4QPrCS::GetCS:1st,P="<<pMom<<"(MeV),CS="<<lastCS*millibarn<<"(mb)"<<G4endl;
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
-#ifdef pdebug
+    {
+#ifdef debug
       G4cout<<"G4QPrCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
 #endif
@@ -183,29 +186,29 @@
     }
   } // End of parameters udate
-  else if(pEn<=lastTH)
-  {
-#ifdef pdebug
-    G4cout<<"G4QPrCS::GetCS: Current T="<<pEn<<" < Threshold="<<lastTH<<", CS=0"<<G4endl;
+  else if(pMom<=lastTH)
+  {
+#ifdef debug
+    G4cout<<"G4QPrCS::GetCS: Current P="<<pMom<<" < Threshold="<<lastTH<<", CS=0"<<G4endl;
 #endif
     return 0.;                         // Momentum is below the Threshold Value -> CS=0
   }
-  //  else if(std::fabs(lastP/pMom-1.)<tolerance)
-  else if(lastP==pMom)                // VI do not use tolerance
-  {
-#ifdef pdebug
-    G4cout<<"G4QPrCS::GetCS:OldCur P="<<pMom<<"="<<pMom<<", CS="<<lastCS*millibarn<<G4endl;
-#endif
-    return lastCS*millibarn;     // Use theLastCS
-  }
-  else
-  {
-#ifdef pdebug
-    G4cout<<"G4QPrCS::GetCS:UpdatCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl;
-#endif
-    lastCS=CalculateCrossSection(fCS,1,j,2212,lastZ,lastN,pMom); // Only UpdateDB
+  else if(std::fabs(lastP-pMom)<tolerance*pMom)
+  //else if(lastP==pMom)               // VI do not use tolerance
+  {
+#ifdef debug
+    G4cout<<"..G4QPCS::GetCS:OldNZ&P="<<lastP<<"="<<pMom<<",CS="<<lastCS*millibarn<<G4endl;
+#endif
+    return lastCS*millibarn;           // Use theLastCS
+  }
+  else                                 // It is the last used -> use the current tables
+  {
+#ifdef debug
+    G4cout<<"-!-G4QPCS::GetCS:UseCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl;
+#endif
+    lastCS=CalculateCrossSection(fCS,1,j,2212,lastZ,lastN,pMom); // Only read and UpdateDB
     lastP=pMom;
   }
-#ifdef pdebug
-  G4cout<<"G4QPrCS::GetCroSec:End,P="<<pMom<<"(MeV),CS="<<lastCS*millibarn<<"(mb)"<<G4endl;
+#ifdef debug
+  G4cout<<"==>G4QPrCS::GetCroSec: P="<<pMom<<"(MeV),CS="<<lastCS*millibarn<<"(mb)"<<G4endl;
 #endif
   return lastCS*millibarn;
@@ -216,5 +219,5 @@
                                         G4int, G4int targZ, G4int targN, G4double Momentum)
 {
-  static const G4double THmin=27.;     // minimum Momentum (MeV/c) Threshold
+  static const G4double THmin=27.;     // default minimum Momentum (MeV/c) Threshold
   static const G4double THmiG=THmin*.001; // minimum Momentum (GeV/c) Threshold
   static const G4double dP=10.;        // step for the LEN (Low ENergy) table MeV/c
@@ -227,5 +230,5 @@
   static const G4double malP=std::log(Pmax);// High logarithm energy (each 2.75 percent)
   static const G4double dlP=(malP-milP)/(nH-1); // Step in log energy in the HEN part
-  static const G4double milPG=std::log(.001*Pmin);// Low logarithm energy for the HEN part GeV/c
+  static const G4double milPG=std::log(.001*Pmin);// Low logarithmEnergy for HEN part GeV/c
   //
   // Associative memory for acceleration
@@ -234,23 +237,29 @@
   static std::vector <G4double*> HEN;  // Vector of pointers to HighEnProtonCrossSection
 #ifdef debug
-  G4cout<<"G4QProtonNuclearCS::CalcCS: N="<<targN<<",Z="<<targZ<<",P="<<Momentum<<G4endl;
-#endif
-  if (Momentum<THmin) return 0.;       // @@ This can be dangerouse for the heaviest nuc.!
+  G4cout<<"G4QProtNCS::CalCS:N="<<targN<<",Z="<<targZ<<",P="<<Momentum<<">"<<THmin<<G4endl;
+#endif
+  if (Momentum<THmin) return 0.;       // @@ This can be dangerouse for the heaviest nuc.?!
   G4double sigma=0.;
   if(F&&I) sigma=0.;                   // @@ *!* Fake line *!* to use F & I !!!Temporary!!!
   G4double A=targN+targZ;              // A of the target
-  if(F<=0)                           // This isotope was not the last used isotop
-  {
-    if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{
-      lastLEN=LEN[I];                // Pointer to prepared LowEnergy cross sections
-      lastHEN=HEN[I];                // Pointer to prepared High Energy cross sections
-    }
-	   else                             // This isotope wasn't calculated previously => CREATE
-	   {
-      lastLEN = new G4double[nL];    // Allocate memory for the new LEN cross sections
-      lastHEN = new G4double[nH];    // Allocate memory for the new HEN cross sections
+#ifdef debug
+  G4cout<<"G4QProtNucCS::CalCS: A="<<A<<",F="<<F<<",I="<<I<<",nL="<<nL<<",nH="<<nH<<G4endl;
+#endif
+  if(F<=0)                             // This isotope was not the last used isotop
+  {
+    if(F<0)                            // This isotope was found in DAMDB =======> RETRIEVE
+    {
+      G4int sync=LEN.size();
+      if(sync<=I) G4cerr<<"*!*G4QProtonNuclCS::CalcCrossSect:Sync="<<sync<<"<="<<I<<G4endl;
+      lastLEN=LEN[I];                  // Pointer to prepared LowEnergy cross sections
+      lastHEN=HEN[I];                  // Pointer to prepared High Energy cross sections
+    }
+    else if(Momentum<ThresholdMomentum(targZ,targN)) return 0.; // BelowThreshold -> NotIni
+    else                               // This isotope wasn't calculated before => CREATE
+    {
+      lastLEN = new G4double[nL];      // Allocate memory for the new LEN cross sections
+      lastHEN = new G4double[nH];      // Allocate memory for the new HEN cross sections
       // --- Instead of making a separate function ---
-      G4double P=THmiG;              // Table threshold in GeV/c
+      G4double P=THmiG;                // Table threshold in GeV/c
       for(G4int m=0; m<nL; m++)
       {
@@ -264,27 +273,38 @@
         lP+=dlP;
       }
+#ifdef debug
+      G4cout<<"-*->G4QPr0tNucCS::CalcCS:Tab for Z="<<targZ<<",N="<<targN<<",I="<<I<<G4endl;
+#endif
       // --- End of possible separate function
       // *** The synchronization check ***
       G4int sync=LEN.size();
-      if(sync!=I) G4cerr<<"**G4QPhortonNuclCS::CalcCrossSect: Sync="<<sync<<"#"<<I<<G4endl;
-      LEN.push_back(lastLEN);          // added LEN, found by AH 10/7/02
-      HEN.push_back(lastHEN);          // added HEN, found by AH 10/7/02
-	   } // End of creation of the new set of parameters
+      if(sync!=I)
+      {
+        G4cerr<<"***G4QProtonNuclCS::CalcCrossSect: Sinc="<<sync<<"#"<<I<<", Z=" <<targZ
+              <<", N="<<targN<<", F="<<F<<G4endl;
+        //G4Exception("G4ProtonNuclearCS::CalculateCS:","39",FatalException,"overflow DB");
+      }
+      LEN.push_back(lastLEN);          // remember the Low Energy Table
+      HEN.push_back(lastHEN);          // remember the High Energy Table
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW the Magic Formula =================================
+#ifdef debug
+  G4cout<<"G4QPrNCS::CalcCS:lTH="<<lastTH<<",Pmi="<<Pmin<<",dP="<<dP<<",dlP="<<dlP<<G4endl;
+#endif
   if (Momentum<lastTH) return 0.;      // It must be already checked in the interface class
-  else if (Momentum<Pmin)                     // High Energy region
-  {
-#ifdef debug
-	   G4cout<<"G4QPrNCS::CalcCS:bLEN A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dP="<<dP<<G4endl;
+  else if (Momentum<Pmin)              // High Energy region
+  {
+#ifdef debug
+    G4cout<<"G4QPrNCS::CalcCS:bLEN A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dP="<<dP<<G4endl;
 #endif
     if(A<=1.) sigma=0.;
     else      sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
 #ifdef debugn
-	   if(sigma<0.)
+    if(sigma<0.)
       G4cout<<"G4QPrNuCS::CalcCS:A="<<A<<",E="<<Momentum<<",T="<<THmin<<",dP="<<dP<<G4endl;
 #endif
   }
-  else if (Momentum<Pmax)                     // High Energy region
+  else if (Momentum<Pmax)              // High Energy region
   {
     G4double lP=std::log(Momentum);
@@ -294,11 +314,11 @@
     sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
   }
-  else                                      // UHE region (calculation, not frequent)
-  {
-    G4double P=0.001*Momentum;              // Approximation formula is for P in GeV/c
+  else                                 // UHE region (calculation, not frequent)
+  {
+    G4double P=0.001*Momentum;         // Approximation formula is for P in GeV/c
     sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
   }
 #ifdef debug
-  G4cout<<"G4QProtonNuclearCrossSection::CalcCS: sigma="<<sigma<<G4endl;
+  G4cout<<"G4QProtonNuclearCrossSection::CalcCS: CS="<<sigma<<G4endl;
 #endif
   if(sigma<0.) return 0.;
@@ -314,4 +334,5 @@
   G4double tA=tZ+tN;
   if(tZ<.99 || tN<0.) return 0.;
+  else if(tZ==1 && tN==0) return 800.;    // A threshold on the free proton
   //G4double dE=1.263*tZ/(1.+std::pow(tA,third));
   G4double dE=tZ/(1.+std::pow(tA,third)); // Safety for diffused edge of the nucleus (QE)
@@ -374,5 +395,5 @@
     {
       G4double dp=P-pos;
-      sigma+=pex*std::exp(dp*dp/wid);
+      sigma+=pex*std::exp(-dp*dp/wid);
     }
   }
@@ -407,5 +428,5 @@
   else if(tZ<93 && tN<146)                // General solution
   {
-    G4double lP=std::log(P);
+    //G4double lP=std::log(P);            // Already calculated
     G4double d=lP-4.2;
     G4double p2=P*P;
@@ -427,4 +448,8 @@
     G4double h=(.01/a4+2.5e-6/a)*(1.+7.e-8*a4)/(1.+6.e7/a12/a2);
     sigma=(c+d*d)/(1.+r/p4)+(g+e*std::exp(-s*P))/(1.+h/p4/p4);
+#ifdef pdebug
+  G4cout<<"G4QProtNucCS::CSForm: A="<<a<<",P="<<P<<",CS="<<sigma<<",c="<<c<<",g="<<g<<",d="
+        <<d<<",r="<<r<<",e="<<e<<",h="<<h<<G4endl;
+#endif
   }
   else
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QStringChipsParticleLevelInterface.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QStringChipsParticleLevelInterface.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QStringChipsParticleLevelInterface.cc	(revision 1055)
@@ -23,5 +23,6 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
-//
+// Short description: Interface of QGSC to CHIPS (Energy Flow  of soft hadrons) 
+// ----------------------------------------------------------------------------
 
 //#define debug
@@ -143,6 +144,11 @@
   }
   G4int targetPDGCode = 90000000 + 1000*resZ + (resA-resZ);    // PDG of theResidualNucleus
-  G4double targetMass = theNucleus->GetMass();                 // Its mass
-  targetMass -= hitMass; // subtract masses of knocked out nucleons (binding?! M.K.) E/M
+  G4double targetMass=mNeut;
+  if (!resZ)                                                   // Nucleus of only neutrons
+  {
+    if (resA>1) targetMass*=resA;
+  }
+  else targetMass=G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ)
+                                                                            ->GetPDGMass();
   G4double targetEnergy = std::sqrt(hitMomentum.mag2()+targetMass*targetMass);
   // !! @@ Target should be at rest: hitMomentum=(0,0,0) @@ !! M.K. (go to this system)
@@ -153,5 +159,5 @@
   G4double impactX = theImpact.first;
   G4double impactY = theImpact.second;
-  G4double inpactPar2 = impactX*impactX + impactY*impactY;
+  G4double impactPar2 = impactX*impactX + impactY*impactY;
   
   G4double radius2 = theNucleus->GetNuclearRadius(theInnerCoreDensityCut*perCent);
@@ -160,8 +166,8 @@
 #ifdef pdebug
   G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: r="<<std::sqrt(radius2)/fermi
-        <<", b="<<std::sqrt(inpactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi
-        <<", b/r="<<std::sqrt(inpactPar2/radius2)<<G4endl; 
-#endif
-  if(radius2 - inpactPar2>0) pathlength = 2.*std::sqrt(radius2 - inpactPar2);
+        <<", b="<<std::sqrt(impactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi
+        <<", b/r="<<std::sqrt(impactPar2/radius2)<<G4endl; 
+#endif
+  if(radius2 - impactPar2>0) pathlength = 2.*std::sqrt(radius2 - impactPar2);
   G4double theEnergyLostInFragmentation = theEnergyLossPerFermi*pathlength/fermi;
   
@@ -176,5 +182,5 @@
           << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<" "
           << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()<<" "
-       	  << a4Mom <<G4endl; 
+          << a4Mom <<G4endl; 
 #endif
 #ifdef pdebug
@@ -193,7 +199,7 @@
       if((*current).first > toSort)        // The current is smaller then existing
       {
-	       theSorted.insert(current, it);     // It shifts the others up
-	       inserted = true;
-	       break;
+        theSorted.insert(current, it);     // It shifts the others up
+        inserted = true;
+        break;
       }
     }
@@ -234,9 +240,9 @@
         <<theSorted.size()<<G4endl; 
 #endif
-  
+  G4bool EscapeExists = false;
   for(current = theSorted.begin(); current!=theSorted.end(); current++)
   {
 #ifdef pdebug
-				G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: nq="
+    G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: nq="
           <<(*current).second->GetDefinition()->GetQuarkContent(3)<<", naq="
           <<(*current).second->GetDefinition()->GetAntiQuarkContent(3)<<", PDG="
@@ -306,15 +312,17 @@
 
 #ifdef pdebug
-				G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL="
+    G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL="
                                                     <<theEnergyLostInFragmentation<<G4endl;
 #endif
-
-    if(runningEnergy > theEnergyLostInFragmentation) break;
-    
+    if(runningEnergy > theEnergyLostInFragmentation)
+    {
+      EscapeExists = true;
+      break;
+    }
 #ifdef CHIPSdebug
     G4cout <<"G4QStringChipsParticleLevelInterface::Propagate: ABSORBED STRING particles "
            <<(*current).second->GetDefinition()->GetPDGCharge()<<" "
            << (*current).second->GetDefinition()->GetPDGEncoding()<<" "
-	          << (*current).second->Get4Momentum() <<G4endl; 
+           << (*current).second->Get4Momentum() <<G4endl; 
 #endif
 #ifdef pdebug
@@ -322,5 +330,5 @@
           <<current->second->GetDefinition()->GetPDGCharge()<<", PDG="
           <<current->second->GetDefinition()->GetPDGEncoding()<<", 4M="
-	         <<current->second->Get4Momentum()<<G4endl; 
+          <<current->second->Get4Momentum()<<G4endl; 
 #endif
 
@@ -382,7 +390,7 @@
       {
         theFinalContents[hp] +=theContents[running];
-	       *(theFinalMomenta[hp])+=*(theMomenta[running]);
-	       running++;
-	       if(running == theContents.size()) break;
+        *(theFinalMomenta[hp])+=*(theMomenta[running]);
+        running++;
+        if(running == theContents.size()) break;
       }
     }
@@ -402,6 +410,6 @@
   G4QNucleus::SetParameters(fractionOfSingleQuasiFreeNucleons,
                             fractionOfPairedQuasiFreeNucleons,
-			                         clusteringCoefficient, 
-					                       fusionToExchange);
+                            clusteringCoefficient, 
+                            fusionToExchange);
   G4Quasmon::SetParameters(temperature, halfTheStrangenessOfSee, etaToEtaPrime);
 
@@ -424,4 +432,8 @@
     G4QCHIPSWorld::Get()->GetParticles(nop);
     G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode);
+#ifdef pdebug
+      G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: CHIPS fragmentation, rA="
+            <<resA<<", #AbsPt="<<particleCount<<G4endl; 
+#endif
     try
     {
@@ -438,5 +450,5 @@
       {
         G4cerr <<"  Incoming 4-momentum and PDG code of "<<i<<"'th hadron: "
-	       <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;
+        <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;
       }
       throw;
@@ -447,13 +459,19 @@
     delete pan;
   }
-  else output = new G4QHadronVector;
-   
+  else
+  {
+#ifdef pdebug
+    G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: NO CHIPS fragmentation, rA="
+          <<resA<<", #AbsPt="<<particleCount<<G4endl; 
+#endif
+    output = new G4QHadronVector;
+  }   
   // Fill the result.
 #ifdef CHIPSdebug
-  G4cout << "NEXT EVENT"<<endl;
+  G4cout << "NEXT EVENT, EscapeExists="<<EscapeExists<<G4endl;
 #endif
 
   // first decay and add all escaping particles.
-  for(current = firstEscape; current!=theSorted.end(); current++)
+  if (EscapeExists) for (current = firstEscape; current!=theSorted.end(); current++)
   {
     G4KineticTrack* aResult = (*current).second;
@@ -472,5 +490,5 @@
       theSec->SetMomentum(current4Mom.vect());
 #ifdef pdebug
-				  G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="
+      G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="
             <<aResult->GetDefinition()->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 
 #endif
@@ -487,5 +505,5 @@
         theSec->SetMomentum(current4Mom.vect());
 #ifdef pdebug
-				    G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="
+        G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="
               <<secondaries->operator[](aSecondary)->GetDefinition()->GetPDGEncoding()
               <<",4M="<<current4Mom<<G4endl; 
@@ -561,5 +579,5 @@
       theSec->SetMomentum(current4Mom.vect());
 #ifdef pdebug
-				  G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="
+      G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="
               <<theDefinition->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 
 #endif
@@ -576,8 +594,31 @@
     G4cout <<"CHIPS particles "<<theDefinition->GetPDGCharge()<<" "
            << theDefinition->GetPDGEncoding()<<" "
-	   << output->operator[](particle)->Get4Momentum() <<G4endl; 
+    << output->operator[](particle)->Get4Momentum() <<G4endl; 
 #endif
 
     delete output->operator[](particle);
+  }
+  else
+  {
+    if(resA>0)
+    {
+      G4ParticleDefinition* theDefinition = G4Neutron::Neutron();
+      if(resA==1) // The residual nucleus at rest must be added to conserve BaryN & Charge
+      {
+        if(resZ == 1) theDefinition = G4Proton::Proton();
+      }
+      else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ);
+      theSec = new G4ReactionProduct(theDefinition);
+      theSec->SetTotalEnergy(theDefinition->GetPDGMass());
+      theSec->SetMomentum(G4ThreeVector(0.,0.,0.));
+      theResult->push_back(theSec);
+      if(!resZ && resA>0) for(G4int ni=1; ni<resA; ni++) 
+      {
+        theSec = new G4ReactionProduct(theDefinition);
+        theSec->SetTotalEnergy(theDefinition->GetPDGMass());
+        theSec->SetMomentum(G4ThreeVector(0.,0.,0.));
+        theResult->push_back(theSec);
+      }
+    }
   }
   delete output;
@@ -588,11 +629,11 @@
   G4cout << "QUASMON preparation info "
          << 1./MeV*proj4Mom<<" "
-	 << 1./MeV*targ4Mom<<" "
-	 << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" "
-	 << hitCount<<" "
-	 << particleCount<<" "
-	 << theLow<<" "
-	 << theHigh<<" "
-	 << G4endl;
+  << 1./MeV*targ4Mom<<" "
+  << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" "
+  << hitCount<<" "
+  << particleCount<<" "
+  << theLow<<" "
+  << theHigh<<" "
+  << G4endl;
 #endif
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QTauNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QTauNuclearCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QTauNuclearCrossSection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QTauNuclearCrossSection.cc,v 1.11 2008/10/24 19:24:29 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QTauNuclearCrossSection.cc,v 1.13 2009/05/08 15:16:26 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -38,4 +38,9 @@
 // ****************************************************************************************
 //=========================================================================================
+// Short description: reaction cross-sections for tau-nuclear reactions, which
+// are integrals over virtual equivalent photons photons. The tau-nuclear
+// reactions do not exist in GHAD, so by the present physics lists it is not
+// simulated at all.
+// --------------------------------------------------------------------------------
 
 ///#define debug
@@ -94,5 +99,5 @@
         <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz="
         <<colN.size()<<G4endl;
-		//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
+  //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
 #endif
   if(std::abs(pPDG)!=15)
@@ -115,7 +120,7 @@
     j  = 0;                            // A#0f records found in DB for this projectile
     if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
-	   {                                  // The nucleus with projPDG is found in AMDB
+    {                                  // The nucleus with projPDG is found in AMDB
       if(colN[i]==tgN && colZ[i]==tgZ)
-						{
+      {
         lastI=i;
         lastTH =colTH[i];                // Last THreshold (A-dependent)
@@ -167,7 +172,7 @@
 #endif
       j++;                             // Increment a#0f records found in DB for this pPDG
-	   }
-	   if(!in)                            // This nucleus has not been calculated previously
-	   {
+    }
+    if(!in)                            // This nucleus has not been calculated previously
+    {
 #ifdef pdebug
       G4cout<<"G4QTNCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
@@ -176,5 +181,5 @@
       lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
       if(lastCS<=0.)
-						{
+      {
         lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
 #ifdef pdebug
@@ -188,5 +193,5 @@
           lastTH=pEn;
         }
-						}
+      }
 #ifdef pdebug
       G4cout<<"G4QTNCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
@@ -204,7 +209,7 @@
 #endif
       return lastCS*millibarn;
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
     else
-				{
+    {
 #ifdef pdebug
       G4cout<<"G4QTNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
@@ -275,13 +280,13 @@
   G4double mP= infEn;
   if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1))
-     	    mP = G4NucleiProperties::GetNuclearMass(A-1.,Z-1.)/MeV; // ResNucMass for a proton
+          mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV; // ResNucMass for a proton
 
   G4double mN= infEn;
   if(N&&G4NucleiProperties::IsInStableTable(A-1,Z))
-    	    mN = G4NucleiProperties::GetNuclearMass(A-1.,Z)/MeV;  // ResNucMass for a neutron
+          mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV;  // ResNucMass for a neutron
 
   G4double mA= infEn;
   if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2))
-     	    mA = G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV; // ResNucMass for an alpha
+          mA = G4NucleiProperties::GetNuclearMass(A-4,Z-2)/MeV; // ResNucMass for an alpha
 
   G4double dP= mP +mProt - mT;
@@ -289,5 +294,5 @@
   G4double dA= mA +mAlph - mT;
 #ifdef pdebug
-		G4cout<<"G4TauNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="
+  G4cout<<"G4TauNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="
         <<mA<<",dA="<<dA<<",mT="<<mT<<",A="<<A<<",Z="<<Z<<G4endl;
 #endif
@@ -319,5 +324,5 @@
   static std::vector <G4double*> J3;   // Vector of pointers to the J3 tabulated functions
 #ifdef pdebug
-		G4cout<<"G4QTauNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();
+  G4cout<<"G4QTauNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();
   if(J3.size()) G4cout<<", p="<<J3[0];
   G4cout<<G4endl;
@@ -331,5 +336,5 @@
   lastE=TotEnergy-mtu;               // Kinetic energy of the muon
 #ifdef pdebug
-		G4cout<<"G4QElectronNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ
+  G4cout<<"G4QElectronNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ
         <<", N="<<targN<<", onlyCS="<<CS<<",E="<<lastE<<",th="<<EMi<<G4endl;
 #endif
@@ -338,5 +343,5 @@
   {
     if(F<0)                          // This isotope was found in DAMDB =========> RETRIEVE
-				{                                // ...........................................========
+    {                                // ...........................................========
       if (lastE<=EMi)                // Energy is below the minimum energy in the table
       {
@@ -345,5 +350,5 @@
         lastSig=0.;
 #ifdef pdebug
-				    G4cout<<"---> G4QTauNucCS::CalcCS: Old CS=0  as lastE="<<lastE<<" < "<<EMi<<G4endl;
+        G4cout<<"---> G4QTauNucCS::CalcCS: Old CS=0  as lastE="<<lastE<<" < "<<EMi<<G4endl;
 #endif
         return 0.;
@@ -355,9 +360,9 @@
       lastH  =colH[I];               // Last High Energy Coefficient (A-dependent)
 #ifdef pdebug
-				G4cout<<"---> G4QTauNucCS::CalcCS: CS=0  as lastE="<<lastE<<" < "<<EMi<<G4endl;
-#endif
-	  }
-	  else                              // This isotope wasn't calculated previously => CREATE
-	  {
+    G4cout<<"---> G4QTauNucCS::CalcCS: CS=0  as lastE="<<lastE<<" < "<<EMi<<G4endl;
+#endif
+   }
+   else                              // This isotope wasn't calculated previously => CREATE
+   {
       lastJ1 = new G4double[nE];     // Allocate memory for the new J1 function
       lastJ2 = new G4double[nE];     // Allocate memory for the new J2 function
@@ -376,5 +381,5 @@
       colF.push_back(lastF);
       colH.push_back(lastH);
-	   } // End of creation of the new set of parameters
+    } // End of creation of the new set of parameters
   } // End of parameters udate
   // ============================== NOW Calculate the Cross Section =====================
@@ -385,5 +390,5 @@
     lastSig=0.;
 #ifdef pdebug
-				G4cout<<"---> G4QTauNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;
+    G4cout<<"---> G4QTauNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;
 #endif
     return 0.;
@@ -399,5 +404,5 @@
 #ifdef pdebug
     G4cout<<"-->G4QTauNuclearCS::CalcCrossSect:LOGfit b="<<blast<<",max="<<mL<<",lJ1="
-				      <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<G4endl;
+          <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<G4endl;
 #endif
     if(blast<0)   blast=0;
@@ -2575,5 +2580,5 @@
         y[k]=P1[i][k];                 // J1
         z[k]=P2[i][k];                 // J2
-	  }
+   }
       r=L[i];                          // Low channel for the J-functions
     }
@@ -2598,5 +2603,5 @@
       r=L[k];
       if(L[k1]<r) r=L[k1];
-	}
+ }
   }
   return r;
@@ -2632,16 +2637,16 @@
   if(ris<Y[lastL])                      // Search in the table
   {
-	   G4int j=lastF;
+    G4int j=lastF;
     G4double Yj=Y[j];                   // It mast be 0 (some times just very small)
     while (ris>Yj && j<lastL)           // Associative search
-	   {
+    {
       j++;
       Yj=Y[j];                          // High value
-	   }
+    }
     G4int j1=j-1;
     G4double Yi=Y[j1];                  // Low value
     phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE;
 #ifdef debug
-	G4cout<<"G4QTauNuclearCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi
+ G4cout<<"G4QTauNuclearCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi
           <<",Y="<<Yj<<G4endl;
 #endif
@@ -2653,9 +2658,9 @@
     G4double f=(ris-Y[lastL])/lastH;    // ScaledResidualValue of the cross-sec. integral
 #ifdef pdebug
-	   G4cout<<"G4QTauNucCS::GetExEn:HighEnergy f="<<f<<", ris="<<ris<<", lH="<<lastH<<G4endl;
+    G4cout<<"G4QTauNucCS::GetExEn:HighEnergy f="<<f<<", ris="<<ris<<", lH="<<lastH<<G4endl;
 #endif
     phLE=SolveTheEquation(f);           // Solve equation to find theLog(phE) (comp lastLE)
 #ifdef pdebug
-   	G4cout<<"G4QTauNuclearCrossSection::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;
+    G4cout<<"G4QTauNuclearCrossSection::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;
 #endif
   }
@@ -2704,5 +2709,5 @@
 #endif
     if(x>=lastLE)
-	   {
+    {
       G4cerr<<"*G4QTauNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE
             <<",f="<<f<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl;
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QuasiFreeRatios.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QuasiFreeRatios.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QuasiFreeRatios.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4QuasiFreeRatios.cc,v 1.19 2008/03/21 21:44:39 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QuasiFreeRatios.cc,v 1.21 2009/04/09 08:25:46 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -33,5 +33,8 @@
 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-06
 // 
-//================================================================================
+//=======================================================================
+// Short description: Provides percentage of quasi-free and quasi-elastic
+// reactions in the inelastic reactions.
+// ----------------------------------------------------------------------
 
 //#define debug
@@ -50,5 +53,5 @@
 {
 #ifdef pdebug
-		G4cout<<"***^^^*** G4QuasiFreeRatios singletone is created ***^^^***"<<G4endl;
+  G4cout<<"***^^^*** G4QuasiFreeRatios singletone is created ***^^^***"<<G4endl;
 #endif
 }
@@ -81,12 +84,22 @@
                                                            G4int tgZ,    G4int tgN)
 {
-		std::pair<G4double,G4double> ElTot=GetElTot(pIU, pPDG, tgZ, tgN); // mean hN El&Tot(IU)
+#ifdef pdebug
+  G4cout<<">>>IN>>>G4QFRat::GetQF:P="<<pIU<<",pPDG="<<pPDG<<",Z="<<tgZ<<",N="<<tgN<<G4endl;
+#endif
   G4double R=0.;
-  G4double QF2In=1.;               // Prototype of QuasiFree/Inelastic ratio for hN_tot
-  if(ElTot.second>0.)
-  {
-    R=ElTot.first/ElTot.second;    // Elastic/Total ratio (does not depend on units
-    QF2In=GetQF2IN_Ratio(ElTot.second/millibarn, tgZ+tgN); // QuasiFree/Inelastic ratio
-  }
+  G4double QF2In=1.;                        // Prototype of QuasiFree/Inel ratio for hN_tot
+  G4int tgA=tgZ+tgN;
+  if(tgA<2) return std::make_pair(QF2In,R); // No quasi-elastic on the only nucleon
+  std::pair<G4double,G4double> ElTot=GetElTot(pIU, pPDG, tgZ, tgN); // mean hN El&Tot(IU)
+  //if( ( (pPDG>999 && pIU<227.) || pIU<27.) && tgA>1) R=1.; // @@ TMP to accelerate @lowE
+  if(pPDG>999 && pIU<227. && tgZ+tgN>1) R=1.;                // To accelerate @lowE
+  else if(ElTot.second>0.)
+  {
+    R=ElTot.first/ElTot.second;             // El/Total ratio (does not depend on units
+    QF2In=GetQF2IN_Ratio(ElTot.second/millibarn, tgZ+tgN);   // QuasiFree/Inelastic ratio
+  }
+#ifdef pdebug
+  G4cout<<">>>OUT>>>G4QuasiFreeRatio::GetQF2IN_Ratio: QF2In="<<QF2In<<", R="<<R<<G4endl;
+#endif
   return std::make_pair(QF2In,R);
 }
@@ -125,4 +138,7 @@
   static G4double* lastL=0;             // theLast of pointer to LogTable in the C++ heap
   // LogTable is created only if necessary. The ratio R(s>8100 mb) = 0 for any nuclei
+#ifdef pdebug
+  G4cout<<"+++G4QuasiFreeRatio::GetQF2IN_Ratio:A="<<A<<", s="<<s<<G4endl;
+#endif
   if(s<toler || A<2) return 1.;
   if(s>ms) return 0.;
@@ -137,14 +153,17 @@
   G4bool found=false;
   G4int i=-1;
-		if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB
+  if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB
   {
     found=true;                         // The A value is found
     break;
   }
+#ifdef pdebug
+  G4cout<<"+++G4QuasiFreeRatio::GetQF2IN_Ratio: nDB="<<nDB<<", found="<<found<<G4endl;
+#endif
   if(!nDB || !found)                    // Create new line in the AMDB
-	 {
+  {
     lastA = A;
 #ifdef pdebug
-				G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: NewT, A="<<A<<", nDB="<<nDB<<G4endl;
+    G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: NewT, A="<<A<<", nDB="<<nDB<<G4endl;
 #endif
     lastT = new G4double[mps];          // Create the linear Table
@@ -163,10 +182,10 @@
       lastT[j]=CalcQF2IN_Ratio(sv,A);
     }
+    lastL=new G4double[mls];          // Create the logarithmic Table
     if(s>sma)                           // Initialize the logarithmic Table
     {
 #ifdef pdebug
-				G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: NewL, A="<<A<<", nDB="<<nDB<<G4endl;
-#endif
-      lastL=new G4double[mls];          // Create the logarithmic Table
+      G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: NewL, A="<<A<<", nDB="<<nDB<<G4endl;
+#endif
       G4double ls=std::log(s);
       lastK = static_cast<int>((ls-lsi)/dl)+1; // MaxBin to be initialized in LogTaB
@@ -181,10 +200,9 @@
       {
         lastL[j]=CalcQF2IN_Ratio(sv,A);
-	       if(j!=lastK) sv*=edl;
+        if(j!=lastK) sv*=edl;
       }
     }
     else                                // LogTab is not initialized
     {
-      lastL = 0;
       lastK = 0;
       lastM = 0.;
@@ -200,5 +218,5 @@
   }
   else                                  // The A value was found in AMDB
-	 {
+  {
     lastA=vA[i];
     lastH=vH[i];
@@ -208,7 +226,13 @@
     lastT=vT[i];
     lastL=vL[i];
+#ifdef pdebug
+    G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: Found, s="<<s<<", lastM="<<lastM<<G4endl;
+#endif
     if(s>lastM)                          // At least LinTab must be updated
     {
       G4int nextN=lastN+1;               // The next bin to be initialized
+#ifdef pdebug
+      G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: lastN="<<lastN<<" ?< nps="<<nps<<G4endl;
+#endif
       if(lastN<nps)
       {
@@ -226,13 +250,23 @@
           lastT[j]=CalcQF2IN_Ratio(sv,A);
         }
+#ifdef pdebug
+        G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: End of LinTab update"<<G4endl;
+#endif
       } // End of LinTab update
+#ifdef pdebug
+      G4cout<<"G4QFRatios::GetQF2IN_Ratio: lN="<<lastN<<", nN="<<nextN<<", i="<<i<<G4endl;
+#endif
       if(lastN>=nextN)
-						{
+      {
         vH[i]=lastH;
         vN[i]=lastN;
       }
       G4int nextK=lastK+1;
+      if(!lastK) nextK=0;
+#ifdef pdebug
+      G4cout<<"G4QFRat::GetQF2IN_Ratio: sma="<<sma<<", lastK="<<lastK<<" < "<<nls<<G4endl;
+#endif
       if(s>sma && lastK<nls)             // LogTab must be updated
-						{
+      {
         G4double sv=std::exp(lastM+lsi); // Define starting poit (lastM will be changed)
         G4double ls=std::log(s);
@@ -244,12 +278,24 @@
         }
         else lastM = lastK*dl;           // Calculate max initialized ln(s)-lsi for LogTab
+#ifdef pdebug
+        G4cout<<"G4QFRat::GetQF2IN_Ratio: nK="<<nextK<<", lK="<<lastK<<", sv="<<sv<<G4endl;
+#endif
         for(G4int j=nextK; j<=lastK; j++)// Calculate LogTab values
         {
-	         sv*=edl;
+          sv*=edl;
+#ifdef pdebug
+          G4cout<<"G4QFRat::GetQF2IN_Ratio: j="<<j<<", sv="<<sv<<", A="<<A<<G4endl;
+#endif
           lastL[j]=CalcQF2IN_Ratio(sv,A);
         }
+#ifdef pdebug
+        G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: End of LinTab update"<<G4endl;
+#endif
       } // End of LogTab update
+#ifdef pdebug
+      G4cout<<"G4QFRatios::GetQF2IN_Ratio: lK="<<lastK<<", nK="<<nextK<<", i="<<i<<G4endl;
+#endif
       if(lastK>=nextK)
-						{
+      {
         vM[i]=lastM;
         vK[i]=lastK;
@@ -257,7 +303,10 @@
     }
   }
+#ifdef pdebug
+  G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: BeforeTab s="<<s<<", sma="<<sma<<G4endl;
+#endif
   // Now one can use tabeles to calculate the value
   if(s<sma)                             // Use linear table
-		{
+  {
     G4int n=static_cast<int>(s/ds);     // Low edge number of the bin
     G4double d=s-n*ds;                  // Linear shift
@@ -265,6 +314,6 @@
     lastR=v+d*(lastT[n+1]-v)/ds;        // Result
   }
-		else                                  // Use log table
-		{
+  else                                  // Use log table
+  {
     G4double ls=std::log(s)-lsi;        // ln(s)-l_min
     G4int n=static_cast<int>(ls/dl);    // Low edge number of the bin
@@ -275,4 +324,7 @@
   if(lastR<0.) lastR=0.;
   if(lastR>1.) lastR=1.;
+#ifdef pdebug
+  G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: BeforeRet lastR="<<lastR<<G4endl;
+#endif
   return lastR;
 } // End of CalcQF2IN_Ratio
@@ -282,11 +334,11 @@
 {
   static const G4double C=1.246;
-		G4double s2=s*s;
+  G4double s2=s*s;
   G4double s4=s2*s2;
-		G4double ss=std::sqrt(std::sqrt(s));
+  G4double ss=std::sqrt(std::sqrt(s));
   G4double P=7.48e-5*s2/(1.+8.77e12/s4/s4/s2);
   G4double E=.2644+.016/(1.+std::exp((29.54-s)/2.49));
   G4double F=ss*.1526*std::exp(-s2*ss*.0000859);
-	 return C*std::exp(-E*std::pow(G4double(A-1.),F))/std::pow(G4double(A),P);
+  return C*std::exp(-E*std::pow(G4double(A-1.),F))/std::pow(G4double(A),P);
 } // End of CalcQF2IN_Ratio
 
@@ -309,7 +361,7 @@
   }
   if     (!I)                          // pp/nn
-		{
+  {
 #ifdef debug
-				G4cout<<"G4QuasiFreeR::CalcElTot:I=0, p="<<p<<", pmi="<<pmi<<", pma="<<pma<<G4endl;
+    G4cout<<"G4QuasiFreeR::CalcElTot:I=0, p="<<p<<", pmi="<<pmi<<", pma="<<pma<<G4endl;
 #endif
     if(p<pmi)
@@ -319,5 +371,5 @@
       To=El;
 #ifdef debug
-				  G4cout<<"G4QuasiFreeR::CalcElTot:I=0i, El="<<El<<", To="<<To<<", p2="<<p2<<G4endl;
+      G4cout<<"G4QuasiFreeR::CalcElTot:I=0i, El="<<El<<", To="<<To<<", p2="<<p2<<G4endl;
 #endif
     }
@@ -329,5 +381,5 @@
       To=pbt*lp2+38.2;
 #ifdef debug
-				  G4cout<<"G4QuasiFreeR::CalcElTot:I=0a, El="<<El<<", To="<<To<<", lp2="<<lp2<<G4endl;
+      G4cout<<"G4QuasiFreeR::CalcElTot:I=0a, El="<<El<<", To="<<To<<", lp2="<<lp2<<G4endl;
 #endif
     }
@@ -342,10 +394,10 @@
       To=LE+(pbt*lp2+38.2+52.7*rp2)/(1.+2.72*rp2*rp2);
 #ifdef debug
-				  G4cout<<"G4QuasiFreeR::CalcElTot:0,E="<<El<<",T="<<To<<",s="<<p2<<",l="<<lp2<<G4endl;
+      G4cout<<"G4QuasiFreeR::CalcElTot:0,E="<<El<<",T="<<To<<",s="<<p2<<",l="<<lp2<<G4endl;
 #endif
     }
   }
   else if(I==1)                        // np/pn
-		{
+  {
     if(p<pmi)
     {
@@ -373,5 +425,5 @@
   }
   else if(I==2)                        // pimp/pipn
-		{
+  {
     G4double lp=std::log(p);
     if(p<pmi)
@@ -407,5 +459,5 @@
   }
   else if(I==3)                        // pipp/pimn
-		{
+  {
     G4double lp=std::log(p);
     if(p<pmi)
@@ -440,6 +492,6 @@
     }
   }
-		else if(I==4)                        // Kmp/Kmn/K0p/K0n
-		{
+  else if(I==4)                        // Kmp/Kmn/K0p/K0n
+  {
 
     if(p<pmi)
@@ -473,5 +525,5 @@
   }
   else if(I==5)                        // Kpp/Kpn/aKp/aKn
-		{
+  {
     if(p<pmi)
     {
@@ -505,5 +557,5 @@
   }
   else if(I==6)                        // hyperon-N
-		{
+  {
     if(p<pmi)
     {
@@ -533,5 +585,5 @@
   }
   else if(I==7)                        // antibaryon-N
-		{
+  {
     if(p>pma)
     {
@@ -571,5 +623,5 @@
   static const G4double dl=(lpa-lpi)/nlp;// Step of the logarithmic Table
   static const G4double edl=std::exp(dl);// Multiplication step of the logarithmic Table
-  //  static const G4double toler=.001;      // Relative tolarence defining "the same momentum"
+  //static const G4double toler=.001;      // Relative Tolarence defining "theSameMomentum"
   static G4double lastP=0.;              // The last momentum for which XS was calculated
   static G4int    lastH=0;               // The last projPDG for which XS was calculated
@@ -590,5 +642,5 @@
   G4cout<<"G4QuasiFreeR::FetchElTot:p="<<p<<",PDG="<<PDG<<",F="<<F<<",nDB="<<nDB<<G4endl;
 #endif
-  if(nDB && lastH==PDG && lastF==F && p>0. && p==lastP) return lastR; // VI do not use toler
+  if(nDB && lastH==PDG && lastF==F && p>0. && p==lastP) return lastR;// VI don't use toler.
   //  if(nDB && lastH==PDG && lastF==F && p>0. && std::fabs(p-lastP)/p<toler) return lastR;
   lastH=PDG;
@@ -596,5 +648,5 @@
   G4int ind=-1;                          // Prototipe of the index of the PDG/F combination
   // i=0: pp(nn), i=1: np(pn), i=2: pimp(pipn), i=3: pipp(pimn), i=4: Kmp(Kmn,K0n,K0p),
-		// i=5: Kpp(Kpn,aK0n,aK0p), i=6: Hp(Hn), i=7: app(apn,ann,anp) 
+  // i=5: Kpp(Kpn,aK0n,aK0p), i=6: Hp(Hn), i=7: app(apn,ann,anp) 
   G4bool kfl=true;                             // Flag of K0/aK0 oscillation
   G4bool kf=false;
@@ -630,5 +682,5 @@
   G4bool found=false;
   G4int i=-1;
-		if(nDB) for (i=0; i<nDB; i++) if(ind==vI[i])  // Sirch for this index in AMDB
+  if(nDB) for (i=0; i<nDB; i++) if(ind==vI[i])  // Sirch for this index in AMDB
   {
     found=true;                                 // The index is found
@@ -637,10 +689,10 @@
   G4double lp=std::log(p);
 #ifdef pdebug
-		G4cout<<"G4QuasiFreeR::FetchElTot:I="<<ind<<",i="<<i<<",fd="<<found<<",lp="<<lp<<G4endl;
+  G4cout<<"G4QuasiFreeR::FetchElTot:I="<<ind<<",i="<<i<<",fd="<<found<<",lp="<<lp<<G4endl;
 #endif
   if(!nDB || !found)                            // Create new line in the AMDB
-	 {
-#ifdef pdebug
-				G4cout<<"G4QuasiFreeRatios::FetchElTot: NewX, ind="<<ind<<", nDB="<<nDB<<G4endl;
+  {
+#ifdef pdebug
+    G4cout<<"G4QuasiFreeRatios::FetchElTot: NewX, ind="<<ind<<", nDB="<<nDB<<G4endl;
 #endif
     lastX = new std::pair<G4double,G4double>[mlp]; // Create logarithmic Table for ElTot
@@ -658,5 +710,5 @@
       lastX[j]=CalcElTot(pv,ind);
 #ifdef pdebug
-		    G4cout<<"G4QuasiFreeR::FetchElTot:I,j="<<j<<",pv="<<pv<<",E="<<lastX[j].first<<",T="
+      G4cout<<"G4QuasiFreeR::FetchElTot:I,j="<<j<<",pv="<<pv<<",E="<<lastX[j].first<<",T="
             <<lastX[j].second<<G4endl;
 #endif
@@ -670,5 +722,5 @@
   }
   else                                   // The A value was found in AMDB
-	 {
+  {
     lastI=vI[i];
     lastM=vM[i];
@@ -678,11 +730,11 @@
     G4double lpM=lastM+lpi;
 #ifdef pdebug
-		  G4cout<<"G4QuasiFreeR::FetchElTo:M="<<lpM<<",l="<<lp<<",K="<<lastK<<",n="<<nlp<<G4endl;
+    G4cout<<"G4QuasiFreeR::FetchElTo:M="<<lpM<<",l="<<lp<<",K="<<lastK<<",n="<<nlp<<G4endl;
 #endif
     if(lp>lpM && lastK<nlp)              // LogTab must be updated
-				{
+    {
       lastK = static_cast<int>((lp-lpi)/dl)+1; // MaxBin to be initialized in LogTab
 #ifdef pdebug
-		    G4cout<<"G4QuasiFreeR::FetET:K="<<lastK<<",lp="<<lp<<",li="<<lpi<<",dl="<<dl<<G4endl;
+      G4cout<<"G4QuasiFreeR::FetET:K="<<lastK<<",lp="<<lp<<",li="<<lpi<<",dl="<<dl<<G4endl;
 #endif
       if(lastK>nlp)
@@ -698,5 +750,5 @@
         lastX[j]=CalcElTot(pv,ind);
 #ifdef pdebug
-		      G4cout<<"G4QuasiFreeR::FetchElTot:U:j="<<j<<",p="<<pv<<",E="<<lastX[j].first<<",T="
+        G4cout<<"G4QuasiFreeR::FetchElTot:U:j="<<j<<",p="<<pv<<",E="<<lastX[j].first<<",T="
               <<lastX[j].second<<G4endl;
 #endif
@@ -704,5 +756,5 @@
     } // End of LogTab update
     if(lastK>=nextK)                   // The AMDB was apdated
-				{
+    {
       vM[i]=lastM;
       vK[i]=lastK;
@@ -719,4 +771,7 @@
   lastR.second=t+d*(lastX[n+1].second-t)/dl; // T-Result
   if(lastR.second<0.) lastR.second= 0.;
+#ifdef pdebug
+  G4cout<<"=O=>G4QuasiFreeR::FetchElTot:1st="<<lastR.first<<", 2nd="<<lastR.second<<G4endl;
+#endif
   if(lastR.first>lastR.second) lastR.first = lastR.second;
   return lastR;
@@ -728,4 +783,7 @@
 {
   G4double pGeV=pIU/gigaelectronvolt;
+#ifdef pdebug
+  G4cout<<"-->G4QuasiFreeR::GetElTot: P="<<pIU<<",pPDG="<<hPDG<<",Z="<<Z<<",N="<<N<<G4endl;
+#endif
   if(Z<1 && N<1)
   {
@@ -735,4 +793,8 @@
   std::pair<G4double,G4double> hp=FetchElTot(pGeV, hPDG, true);
   std::pair<G4double,G4double> hn=FetchElTot(pGeV, hPDG, false);
+#ifdef pdebug
+  G4cout<<"-OUT->G4QFRat::GetElTot: hp("<<hp.first<<","<<hp.second<<"), hn("<<hn.first<<","
+        <<hn.second<<")"<<G4endl;
+#endif
   G4double A=(Z+N)/millibarn;                // To make the result in independent units(IU)
   return std::make_pair((Z*hp.first+N*hn.first)/A,(Z*hp.second+N*hn.second)/A);
@@ -795,4 +857,7 @@
   N4M/=megaelectronvolt;
   G4LorentzVector tot4M=N4M+p4M;
+#ifdef ppdebug
+  G4cerr<<"->G4QFR::Scat:p4M="<<pr4M<<",N4M="<<N4M<<",t4M="<<tot4M<<",NPDG="<<NPDG<<G4endl;
+#endif
   G4double mT=mNeut;
   G4int Z=0;
@@ -843,12 +908,12 @@
   if(E<0. || E2<mP2)
   {
-#ifdef pdebug
+#ifdef ppdebug
     G4cerr<<"-Warning-G4QFR::Scat:*Negative Energy*E="<<E<<",E2="<<E2<<"<M2="<<mP2<<G4endl;
 #endif
     return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action
   }
-		G4double P=std::sqrt(E2-mP2);                   // Momentum in pseudo laboratory system
+  G4double P=std::sqrt(E2-mP2);                   // Momentum in pseudo laboratory system
   G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer();
-#ifdef debug
+#ifdef ppdebug
   G4cout<<"G4QFR::Scatter: Before XS, P="<<P<<", Z="<<Z<<", N="<<N<<", PDG="<<pPDG<<G4endl;
 #endif
@@ -859,5 +924,5 @@
   G4double xSec=CSmanager->GetCrossSection(false, P, Z, N, PDG); // Rec.CrossSect *TMP*
   //G4double xSec=CSmanager->GetCrossSection(false, P, Z, N, pPDG); // Rec.CrossSect
-#ifdef debug
+#ifdef ppdebug
   G4cout<<"G4QElast::Scatter:pPDG="<<pPDG<<",P="<<P<<",CS="<<xSec/millibarn<<G4endl;
 #endif
@@ -869,5 +934,5 @@
   if(xSec <= 0.) // The cross-section iz 0 -> Do Nothing
   {
-#ifdef pdebug
+#ifdef ppdebug
     G4cerr<<"-Warning-G4QFR::Scat:**Zero XS**PDG="<<pPDG<<",NPDG="<<NPDG<<",P="<<P<<G4endl;
 #endif
@@ -878,5 +943,6 @@
   G4double maxt=CSmanager->GetHMaxT();            // max possible -t
 #ifdef ppdebug
-  G4cout<<"G4QFR::Scat:PDG="<<PDG<<",P="<<P<<",X="<<xSec<<",-t="<<mint<<"<"<<maxt<<", Z="<<Z<<",N="<<N<<G4endl;
+  G4cout<<"G4QFR::Scat:PDG="<<PDG<<",P="<<P<<",X="<<xSec<<",-t="<<mint<<"<"<<maxt<<", Z="
+        <<Z<<",N="<<N<<G4endl;
 #endif
 #ifdef nandebug
@@ -893,5 +959,5 @@
     else if(cost<-1.) cost=-1.;
     else
-				{
+    {
       G4cerr<<"G4QFR::S:*NAN*c="<<cost<<",t="<<mint<<",tm="<<CSmanager->GetHMaxT()<<G4endl;
       return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action
@@ -907,7 +973,7 @@
   }
 #ifdef ppdebug
-		G4cout<<"G4QFR::Scat:p4M="<<pr4M<<"+r4M="<<reco4M<<",dr="<<dir4M<<",t4M="<<tot4M<<G4endl;
-#endif
-		return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result
+  G4cout<<"G4QFR::Scat:p4M="<<pr4M<<"+r4M="<<reco4M<<",dr="<<dir4M<<",t4M="<<tot4M<<G4endl;
+#endif
+  return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result
 } // End of Scatter
 
@@ -935,6 +1001,6 @@
     N=0;
     RPDG=2112;                                         // PDG of the recoil nucleon
-  		if(pPDG==-211) sPDG=111;                           // pi+    -> pi0
-  		else if(pPDG==-321)
+    if(pPDG==-211) sPDG=111;                           // pi+    -> pi0
+    else if(pPDG==-321)
     {
       sPDG=310;                                        // K+     -> K0S
@@ -948,6 +1014,6 @@
   else if(NPDG==2112) // Default
   {
-  		if(pPDG==211)  sPDG=111;                           // pi+    -> pi0
-  		else if(pPDG==321)
+    if(pPDG==211)  sPDG=111;                           // pi+    -> pi0
+    else if(pPDG==321)
     {
       sPDG=310;                                        // K+     -> K0S
@@ -983,5 +1049,5 @@
     return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action
   }
-		G4double P=std::sqrt(E2-mS2);                   // Momentum in pseudo laboratory system
+  G4double P=std::sqrt(E2-mS2);                   // Momentum in pseudo laboratory system
   G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer();
 #ifdef debug
@@ -1025,5 +1091,5 @@
     else if(cost<-1.) cost=-1.;
     else
-				{
+    {
       G4cerr<<"G4QFR::C:*NAN*c="<<cost<<",t="<<mint<<",tm="<<CSmanager->GetHMaxT()<<G4endl;
       return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action
@@ -1040,7 +1106,7 @@
   }
 #ifdef debug
-		G4cout<<"G4QFR::ChEx:p4M="<<p4M<<"+r4M="<<reco4M<<"="<<p4M+reco4M<<"="<<tot4M<<G4endl;
-#endif
-		return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result
+  G4cout<<"G4QFR::ChEx:p4M="<<p4M<<"+r4M="<<reco4M<<"="<<p4M+reco4M<<"="<<tot4M<<G4endl;
+#endif
+  return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result
 } // End of ChExer
 
@@ -1060,5 +1126,5 @@
   G4double p2=p*p;            
   G4double p4=p2*p2;
-		G4double dl1=std::log(p)-5.;
+  G4double dl1=std::log(p)-5.;
   G4double T=(6.75+.14*dl1*dl1+13./p)/(1.+.14/p4)+.6/(p4+.00013);
   G4double U=(6.25+8.33e-5/p4/p)*(p*sp+.34)/p2/p; 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4StringChipsInterface.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4StringChipsInterface.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4StringChipsInterface.cc	(revision 1055)
@@ -23,5 +23,6 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
-//
+// !!! Was used in QBBC PL, NOW it is not. Must be absolete !!!
+// ============================================================
 
 //#define debug
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4StringChipsParticleLevelInterface.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4StringChipsParticleLevelInterface.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4StringChipsParticleLevelInterface.cc	(revision 1055)
@@ -23,4 +23,6 @@
 // * acceptance of all terms of the Geant4 Software license.          *
 // ********************************************************************
+// Short description: Interface of QGSC to CHIPS (all soft hadrons) 
+// ----------------------------------------------------------------
 //
 
@@ -175,6 +177,11 @@
   }
   G4int targetPDGCode = 90000000 + 1000*resZ + (resA-resZ);    // PDG of theResidualNucleus
-  G4double targetMass = theNucleus->GetMass();                 // Its mass
-  targetMass -= hitMass; // subtract masses of knocked out nucleons (binding?! M.K.) E/M
+  G4double targetMass=mNeut;
+  if (!resZ)                                                   // Nucleus of only neutrons
+  {
+    if (resA>1) targetMass*=resA;
+  }
+  else targetMass=G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ)
+                                                                            ->GetPDGMass();
   G4double targetEnergy = std::sqrt(hitMomentum.mag2()+targetMass*targetMass);
   // !! @@ Target should be at rest: hitMomentum=(0,0,0) @@ !! M.K. (go to this system)
@@ -185,5 +192,5 @@
   G4double impactX = theImpact.first;
   G4double impactY = theImpact.second;
-  G4double inpactPar2 = impactX*impactX + impactY*impactY;
+  G4double impactPar2 = impactX*impactX + impactY*impactY;
   G4double radius2 = theNucleus->GetNuclearRadius(theInnerCoreDensityCut*perCent);
   //G4double radius2 = theNucleus->GetNuclearRadius(theInnerCoreDensityCut*perCent);
@@ -192,11 +199,12 @@
 #ifdef ppdebug
   G4cout<<"G4StringChipsParticleLevelInterface::Propagate: r="<<std::sqrt(radius2)/fermi
-        <<", b="<<std::sqrt(inpactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi
-        <<", b/r="<<std::sqrt(inpactPar2/radius2)<<G4endl; 
-#endif
-  if(radius2 - inpactPar2>0) pathlength = 2.*std::sqrt(radius2 - inpactPar2);
+        <<", b="<<std::sqrt(impactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi
+        <<", b/r="<<std::sqrt(impactPar2/radius2)<<G4endl; 
+#endif
+  if(radius2 - impactPar2>0) pathlength = 2.*std::sqrt(radius2 - impactPar2);
+  //pathlength = 27.;                         // *** Only temporary *** Always CHIPS
 #ifdef hdebug_SCPLI
   toth+=1.;                                 // increment total number of measurements
-  G4double bfm=std::sqrt(inpactPar2)/fermi; // impact parameter
+  G4double bfm=std::sqrt(impactPar2)/fermi; // impact parameter
   G4double efm=pathlength/fermi;            // energy absorption length
   G4int    nbi=static_cast<G4int>(bfm/bhdb);
@@ -219,5 +227,5 @@
           << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<" "
           << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()<<" "
-       	  << a4Mom <<G4endl; 
+          << a4Mom <<G4endl; 
 #endif
 #ifdef pdebug
@@ -236,10 +244,10 @@
       if((*current).first > toSort)        // The current is smaller then existing
       {
-	       theSorted.insert(current, it);     // It shifts the others up
-	       inserted = true;
-	       break;
+        theSorted.insert(current, it);     // It shifts the others up
+        inserted = true;
+        break;
       }
     }
-    if(!inserted) theSorted.push_back(it); // It is bigger than any previous
+    if(!inserted) theSorted.push_back(it); // It is bigger than any previous (@@Check this)
   }
   
@@ -278,9 +286,9 @@
         <<theSorted.size()<<G4endl; 
 #endif
-  
+  G4bool EscapeExists = false;
   for(current = theSorted.begin(); current!=theSorted.end(); current++)
   {
 #ifdef pdebug
-				G4cout<<"G4StringChipsParticleLevelInterface::Propagate: nq="
+    G4cout<<"G4StringChipsParticleLevelInterface::Propagate: nq="
           <<(*current).second->GetDefinition()->GetQuarkContent(3)<<", naq="
           <<(*current).second->GetDefinition()->GetAntiQuarkContent(3)<<", PDG="
@@ -350,15 +358,17 @@
 
 #ifdef pdebug
-				G4cout<<"G4StringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL="
+    G4cout<<"G4StringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL="
                                                     <<theEnergyLostInFragmentation<<G4endl;
 #endif
-
-    if(runningEnergy > theEnergyLostInFragmentation) break;
-    
+    if(runningEnergy > theEnergyLostInFragmentation)
+    {
+      EscapeExists = true;
+      break;
+    }
 #ifdef CHIPSdebug
     G4cout <<"G4StringChipsParticleLevelInterface::Propagate: ABSORBED STRING particles "
            <<(*current).second->GetDefinition()->GetPDGCharge()<<" "
            << (*current).second->GetDefinition()->GetPDGEncoding()<<" "
-	          << (*current).second->Get4Momentum() <<G4endl; 
+           << (*current).second->Get4Momentum() <<G4endl; 
 #endif
 #ifdef pdebug
@@ -366,5 +376,5 @@
           <<current->second->GetDefinition()->GetPDGCharge()<<", PDG="
           <<current->second->GetDefinition()->GetPDGEncoding()<<", 4M="
-	         <<current->second->Get4Momentum()<<G4endl; 
+          <<current->second->Get4Momentum()<<G4endl; 
 #endif
 
@@ -428,5 +438,5 @@
       stras += stran;                           // Collected strangeness
       chars += charg;                           // Collected charge
-						//empty = false;
+      //empty = false;
     }
     if(barys>pcl)                               // Split in two or more parts (to survive!)
@@ -451,12 +461,12 @@
         //@@ Convert it to a CHIPS function (Which class? G4QH::Conctruct?)
         if(!strm)                               // --> The total strangness = 0 (n/p/pi-)
-								{
-										if(chgm<0)                            // (n/pi-)
-										{
+        {
+          if(chgm<0)                            // (n/pi-)
+          {
             prtM=(-chgm)*mPiCh+brnm*mNeut;
             prtQC=(-chgm)*PiMiQC+brnm*NeutQC;
           }
           else                                  // (n/p)
-										{
+          {
             prtM=chgm*mProt+(brnm-chgm)*mNeut;
             prtQC=chgm*ProtQC+(brnm-chgm)*NeutQC;
@@ -464,8 +474,8 @@
         }
         else if(strm>=brnm)                     // ---> BigPositiveStrangeness(L/Pi+/K0/K-)
-								{
+        {
           G4int stmb=strm-brnm;
-										if(chgm<0)                            // (L/K-/K0)
-										{
+          if(chgm<0)                            // (L/K-/K0)
+          {
             prtM=(-chgm)*mKChg+brnm*mLamb+std::abs(stmb+chgm)*mKZer;
             prtQC=(-chgm)*KMinQC+brnm*LambQC;
@@ -473,6 +483,6 @@
             else if(stmb<-chgm) prtQC+=(-stmb-chgm)*AKZrQC;
           }
-										else                                  // (L/K0/pi+)
-										{
+          else                                  // (L/K0/pi+)
+          {
             prtM=chgm*mPiCh+(strm-brnm)*mKZer+brnm*mLamb;
             prtQC=chgm*PiPlQC+(strm-brnm)*KZerQC+brnm*LambQC;
@@ -480,18 +490,18 @@
         }
         else if(strm>0)                         // ---> PositiveStrangeness<B (L/n/p/Pi+-)
-								{
+        {
           G4int bmst=brnm-strm;
-										if(chgm<0)                            // (L/n/Pi-)
-										{
+          if(chgm<0)                            // (L/n/Pi-)
+          {
             prtM=(-chgm)*mPiCh+strm*mLamb+bmst*mNeut;
             prtQC=(-chgm)*PiMiQC+strm*LambQC+bmst*NeutQC;
           }
-										else if(chgm>=bmst)                   // (L/p/Pi+)
-										{
+          else if(chgm>=bmst)                   // (L/p/Pi+)
+          {
             prtM=(chgm-bmst)*mPiCh+strm*mLamb+bmst*mProt;
             prtQC=(chgm-bmst)*PiPlQC+strm*LambQC+bmst*ProtQC;
           }
-										else                                  // ch<bmst (L/p/n)
-										{
+          else                                  // ch<bmst (L/p/n)
+          {
             prtM=chgm*mProt+strm*mLamb+(bmst-chgm)*mNeut;
             prtQC=chgm*ProtQC+strm*LambQC+(bmst-chgm)*NeutQC;
@@ -499,23 +509,23 @@
         }
         else                                    // ---> NegativeStrangeness (N/K+/aK0/Pi-)
-								{
+        {
           G4int bmst=brnm-strm;
-										if(chgm>=bmst)                        // (K+/p/Pi+)
-										{
+          if(chgm>=bmst)                        // (K+/p/Pi+)
+          {
             prtM=(-strm)*mKChg+brnm*mProt+(chgm-bmst)*mPiCh;
             prtQC=(-strm)*KPlsQC+brnm*ProtQC+(chgm-bmst)*PiPlQC;
           }
-										else if(chgm>=-strm)                  // (K+/p/n)
-										{
+          else if(chgm>=-strm)                  // (K+/p/n)
+          {
             prtM=(-strm)*mKChg+chgm*mProt+(brnm-chgm)*mNeut;
             prtQC=(-strm)*KPlsQC+chgm*ProtQC+(brnm-chgm)*NeutQC;
           }
-										else if(chgm>=0)                      // (K+/aK0/n)
-										{
+          else if(chgm>=0)                      // (K+/aK0/n)
+          {
             prtM=chgm*mKChg+(-chgm-strm)*mKZer+brnm*mNeut;
             prtQC=chgm*KPlsQC+(-chgm-strm)*AKZrQC+brnm*NeutQC;
           }
-										else                                  // ch<0 (aK0/n/Pi-)
-										{
+          else                                  // ch<0 (aK0/n/Pi-)
+          {
             prtM=(-strm)*mKChg+(-chgm)*mPiCh+brnm*mNeut;
             prtQC=(-strm)*KPlsQC+(-chgm)*PiMiQC+brnm*NeutQC;
@@ -523,32 +533,32 @@
         }
         EnFlowQC-=prtQC;
-								chgm=chars-chgm;                        // Just to keep the same notation
+        chgm=chars-chgm;                        // Just to keep the same notation
         strm=stras-strm;
         brnm=curb;
         if(!strm)                               // --> The total strangness = 0 (n/p/pi-)
-								{
-										if(chgm<0) resM=(-chgm)*mPiCh+brnm*mNeut;
+        {
+          if(chgm<0) resM=(-chgm)*mPiCh+brnm*mNeut;
           else       resM=chgm*mProt+(brnm-chgm)*mNeut;
         }
         else if(strm>=brnm)                     // ---> BigPositiveStrangeness(L/Pi+/K0/K-)
-								{
+        {
           G4int stmb=strm-brnm;
-										if(chgm<0) resM=(-chgm)*mKChg+brnm*mLamb+std::abs(stmb+chgm)*mKZer;
-										else       resM=chgm*mPiCh+(strm-brnm)*mKZer+brnm*mLamb;
+          if(chgm<0) resM=(-chgm)*mKChg+brnm*mLamb+std::abs(stmb+chgm)*mKZer;
+          else       resM=chgm*mPiCh+(strm-brnm)*mKZer+brnm*mLamb;
         }
         else if(strm>0)                         // ---> PositiveStrangeness<B (L/n/p/Pi+-)
-								{
+        {
           G4int bmst=brnm-strm;
-										if     (chgm<0)     resM=(-chgm)*mPiCh+strm*mLamb+bmst*mNeut;
-										else if(chgm>=bmst) resM=(chgm-bmst)*mPiCh+strm*mLamb+bmst*mProt;
-										else                resM=chgm*mProt+strm*mLamb+(bmst-chgm)*mNeut;
+          if     (chgm<0)     resM=(-chgm)*mPiCh+strm*mLamb+bmst*mNeut;
+          else if(chgm>=bmst) resM=(chgm-bmst)*mPiCh+strm*mLamb+bmst*mProt;
+          else                resM=chgm*mProt+strm*mLamb+(bmst-chgm)*mNeut;
         }
         else                                    // ---> NegativeStrangeness (N/K+/aK0/Pi-)
-								{
+        {
           G4int bmst=brnm-strm;
-										if     (chgm>=bmst)  resM=(-strm)*mKChg+brnm*mProt+(chgm-bmst)*mPiCh;
-										else if(chgm>=-strm) resM=(-strm)*mKChg+chgm*mProt+(brnm-chgm)*mNeut;
-										else if(chgm>=0)     resM=chgm*mKChg+(-chgm-strm)*mKZer+brnm*mNeut;
-										else                 resM=(-strm)*mKChg+(-chgm)*mPiCh+brnm*mNeut;
+          if     (chgm>=bmst)  resM=(-strm)*mKChg+brnm*mProt+(chgm-bmst)*mPiCh;
+          else if(chgm>=-strm) resM=(-strm)*mKChg+chgm*mProt+(brnm-chgm)*mNeut;
+          else if(chgm>=0)     resM=chgm*mKChg+(-chgm-strm)*mKZer+brnm*mNeut;
+          else                 resM=(-strm)*mKChg+(-chgm)*mPiCh+brnm*mNeut;
         }
         G4LorentzVector prt4M=(prtM/(prtM+resM))*EnFlow4M;
@@ -584,5 +594,5 @@
     //  G4int baryn = curQC.GetBaryonNumber();
     //  if(baryn>0 && barys>0 && !empty) // New baryon and b-positive collection -> fill
-	   //  {
+    //  {
     //    G4QHadron* aHadron = new G4QHadron(EnFlowQC, EnFlow4M);
     //    projHV.push_back(aHadron);
@@ -620,7 +630,7 @@
       {
         theFinalContents[hp] +=theContents[running];
-	       *(theFinalMomenta[hp])+=*(theMomenta[running]);
-	       running++;
-	       if(running == theContents.size()) break;
+        *(theFinalMomenta[hp])+=*(theMomenta[running]);
+        running++;
+        if(running == theContents.size()) break;
       }
     }
@@ -640,6 +650,6 @@
   G4QNucleus::SetParameters(fractionOfSingleQuasiFreeNucleons,
                             fractionOfPairedQuasiFreeNucleons,
-			                         clusteringCoefficient, 
-					                       fusionToExchange);
+                            clusteringCoefficient, 
+                            fusionToExchange);
   G4Quasmon::SetParameters(temperature, halfTheStrangenessOfSee, etaToEtaPrime);
 
@@ -662,4 +672,8 @@
     G4QCHIPSWorld::Get()->GetParticles(nop);
     G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode);
+#ifdef pdebug
+      G4cout<<"G4StringChipsParticleLevelInterface::Propagate: CHIPS fragmentation, rA="
+            <<resA<<", #AbsPt="<<particleCount<<G4endl; 
+#endif
     try
     {
@@ -676,5 +690,5 @@
       {
         G4cerr <<"  Incoming 4-momentum and PDG code of "<<i<<"'th hadron: "
-	       <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;
+        <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;
       }
       throw;
@@ -682,5 +696,12 @@
     delete pan;
   }
-  else output = new G4QHadronVector;
+  else
+  {
+#ifdef pdebug
+    G4cout<<"G4StringChipsParticleLevelInterface::Propagate: NO CHIPS fragmentation, rA="
+          <<resA<<", #AbsPt="<<particleCount<<G4endl; 
+#endif
+    output = new G4QHadronVector;
+  }   
 
   // clean up impinging particles
@@ -690,9 +711,9 @@
   // Fill the result.
 #ifdef CHIPSdebug
-  G4cout << "NEXT EVENT"<<endl;
+  G4cout << "NEXT EVENT, EscapeExists="<<EscapeExists<<G4endl;
 #endif
 
   // first decay and add all escaping particles.
-  for(current = firstEscape; current!=theSorted.end(); current++)
+  if (EscapeExists) for (current = firstEscape; current!=theSorted.end(); current++)
   {
     G4KineticTrack* aResult = (*current).second;
@@ -720,5 +741,5 @@
              theSec->SetMomentum(cur4Mom.vect());
 #ifdef trapdebug
-				         if(cdef->GetPDGEncoding()==113) G4cout
+             if(cdef->GetPDGEncoding()==113) G4cout
                 <<"G4StringChipsParticleLevelInterface::Propagate: *Rho0* QGS dec2 PDG="
                 <<cdef->GetPDGEncoding()<<",4M="<<cur4Mom<<", grandparPDG= "
@@ -726,5 +747,5 @@
 #endif
 #ifdef pdebug
-				         G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS dec2 PDG="
+             G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS dec2 PDG="
               <<sdef->GetPDGEncoding()<<",4M="<<cur4Mom<<G4endl; 
 #endif
@@ -742,5 +763,5 @@
           theSec->SetMomentum(current4Mom.vect());
 #ifdef trapdebug
-				      if(sdef->GetPDGEncoding()==113)
+          if(sdef->GetPDGEncoding()==113)
             G4cout<<"G4StringChipsParticleLevelInterface::Propagate:*Rho0* QGS decay PDG="
                   <<sdef->GetPDGEncoding()<<",4M="<<current4Mom<<", parentPDG= "
@@ -750,5 +771,5 @@
 #endif
 #ifdef pdebug
-				      G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="
+          G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="
                 <<sdef->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 
 #endif
@@ -767,10 +788,10 @@
       theSec->SetMomentum(current4Mom.vect());
 #ifdef trapdebug
-				  if(aResult->GetDefinition()->GetPDGEncoding()==113)
+      if(aResult->GetDefinition()->GetPDGEncoding()==113)
         G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="
               <<aResult->GetDefinition()->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 
 #endif
 #ifdef pdebug
-				  G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="
+      G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="
             <<aResult->GetDefinition()->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 
 #endif
@@ -849,5 +870,5 @@
       theSec->SetMomentum(current4Mom.vect());
 #ifdef pdebug
-				  G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="
+      G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="
               <<theDefinition->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 
 #endif
@@ -866,8 +887,31 @@
     G4cout <<"CHIPS particles "<<theDefinition->GetPDGCharge()<<" "
            << theDefinition->GetPDGEncoding()<<" "
-	   << output->operator[](particle)->Get4Momentum() <<G4endl; 
+    << output->operator[](particle)->Get4Momentum() <<G4endl; 
 #endif
 
     delete output->operator[](particle);
+  }
+  else
+  {
+    if(resA>0)
+    {
+      G4ParticleDefinition* theDefinition = G4Neutron::Neutron();
+      if(resA==1) // The residual nucleus at rest must be added to conserve BaryN & Charge
+      {
+        if(resZ == 1) theDefinition = G4Proton::Proton();
+      }
+      else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ);
+      theSec = new G4ReactionProduct(theDefinition);
+      theSec->SetTotalEnergy(theDefinition->GetPDGMass());
+      theSec->SetMomentum(G4ThreeVector(0.,0.,0.));
+      theResult->push_back(theSec);
+      if(!resZ && resA>0) for(G4int ni=1; ni<resA; ni++) 
+      {
+        theSec = new G4ReactionProduct(theDefinition);
+        theSec->SetTotalEnergy(theDefinition->GetPDGMass());
+        theSec->SetMomentum(G4ThreeVector(0.,0.,0.));
+        theResult->push_back(theSec);
+      }
+    }
   }
   delete output;
@@ -878,11 +922,11 @@
   G4cout << "QUASMON preparation info "
          << 1./MeV*proj4Mom<<" "
-	 << 1./MeV*targ4Mom<<" "
-	 << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" "
-	 << hitCount<<" "
-	 << particleCount<<" "
-	 << theLow<<" "
-	 << theHigh<<" "
-	 << G4endl;
+  << 1./MeV*targ4Mom<<" "
+  << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" "
+  << hitCount<<" "
+  << particleCount<<" "
+  << theLow<<" "
+  << theHigh<<" "
+  << G4endl;
 #endif
 
Index: trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4VQCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4VQCrossSection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4VQCrossSection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VQCrossSection.cc,v 1.14 2007/11/15 09:36:43 mkossov Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VQCrossSection.cc,v 1.16 2009/03/09 15:41:17 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -38,4 +38,6 @@
 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
 // ****************************************************************************************
+// Short description: a basic class for all CHIPS reaction cross-sections.
+// -----------------------------------------------------------------------
 
 //#define debug
@@ -96,7 +98,8 @@
 {
 #ifdef pdebug
-		G4cout<<"G4VQCrossSection::EquLinearFit: ***Called*** X="<<DX<<", N="<<N<<", X0="<<X0
+  G4cout<<"G4VQCrossSection::EquLinearFit: ***Called*** X="<<X<<", N="<<N<<", X0="<<X0
         <<", DX="<<DX<<G4endl;
-		G4cout<<"G4VQCrossSection::EquLinearFit: Y[0]="<<Y[0]<<", Y[N-1]="<<Y[N-1]<<G4endl;
+  G4cout<<"G4VQCrossSection::EquLinearFit: Y[0]="<<Y[0]<<", Y[N-1]="<<Y[N-1]<<G4endl;
+  //for(G4int i=1; i<N; i++)G4cout<<"-----G4VQCS::EquLinearFit: Y["<<i<<"]="<<Y[i]<<G4endl;
 #endif
   if(DX<=0. || N<2)
@@ -113,4 +116,7 @@
   G4double yi=Y[j];
   G4double sigma=yi+(Y[j+1]-yi)*d;
+#ifdef pdebug
+  G4cout<<"G4VQCrossSection::EquLinearFit: CS="<<sigma<<G4endl;
+#endif
   return sigma;
 }
Index: trunk/source/processes/hadronic/models/coherent_elastic/History
===================================================================
--- trunk/source/processes/hadronic/models/coherent_elastic/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/coherent_elastic/History	(revision 1055)
@@ -14,4 +14,10 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+
+02 March 2009 - D. Wright for V.Grichine (hadr-cohe-V09-02-00)
+--------------------------------------------------------------
+  Model precise sampling and 'on the fly' table preparation in 
+  G4DiffuseElastic.hh, .cc
 
 27 November 2008 - V.Ivanchenko (hadr-cohe-V09-01-08)
Index: trunk/source/processes/hadronic/models/coherent_elastic/include/G4DiffuseElastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/coherent_elastic/include/G4DiffuseElastic.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/coherent_elastic/include/G4DiffuseElastic.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4DiffuseElastic.hh,v 1.13 2007/11/06 17:01:20 grichine Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4DiffuseElastic.hh,v 1.15 2009/02/20 15:38:07 grichine Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -164,5 +164,6 @@
                                 G4double tmass, G4double thetaLab);
 
-
+  void TestAngleTable(const G4ParticleDefinition* theParticle, G4double partMom,
+		      G4double Z, G4double A);
 
 
@@ -175,4 +176,5 @@
   G4double GetDiffElasticProb(G4double theta);
   G4double GetDiffElasticSumProb(G4double theta);
+  G4double GetDiffElasticSumProbA(G4double alpha);
   G4double GetIntegrandFunction(G4double theta);
 
@@ -443,8 +445,8 @@
   G4double r0;
 
-  if(A < 50.)
-  {
-    if(A > 10.) r0  = 1.16*( 1 - std::pow(A, -2./3.) )*fermi;   // 1.08*fermi;
-    else        r0  = 1.1*fermi;
+  if( A < 50. )
+  {
+    if( A > 10. ) r0  = 1.16*( 1 - std::pow(A, -2./3.) )*fermi;   // 1.08*fermi;
+    else          r0  = 1.1*fermi;
 
     fNuclearRadius = r0*std::pow(A, 1./3.);
@@ -452,7 +454,7 @@
   else
   {
-    r0 = 1.7*fermi;
-
-    fNuclearRadius = r0*std::pow(A, 0.27);
+    r0 = 1.7*fermi;   // 1.7*fermi;
+
+    fNuclearRadius = r0*std::pow(A, 0.27); // 0.27);
   }
   return fNuclearRadius;
Index: trunk/source/processes/hadronic/models/coherent_elastic/src/G4ChargeExchange.cc
===================================================================
--- trunk/source/processes/hadronic/models/coherent_elastic/src/G4ChargeExchange.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/coherent_elastic/src/G4ChargeExchange.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4ChargeExchange.cc,v 1.14 2008/12/18 13:01:48 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4ChargeExchange.cc,v 1.13 2008/11/20 12:35:19 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -312,6 +312,6 @@
     dd = 10.;
   }
-  G4double x1 = (1.0 - std::exp(-tmax*bb))*aa/bb;
-  G4double x2 = (1.0 - std::exp(-tmax*dd))*cc/dd;
+  G4double x1 = (1.0 - exp(-tmax*bb))*aa/bb;
+  G4double x2 = (1.0 - exp(-tmax*dd))*cc/dd;
   
   G4double t;
Index: trunk/source/processes/hadronic/models/coherent_elastic/src/G4DiffuseElastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/coherent_elastic/src/G4DiffuseElastic.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/coherent_elastic/src/G4DiffuseElastic.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4DiffuseElastic.cc,v 1.20 2008/01/14 10:39:13 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4DiffuseElastic.cc,v 1.23 2009/03/02 09:17:43 grichine Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //
@@ -67,5 +67,5 @@
 {
   SetMinEnergy( 0.01*GeV );
-  SetMaxEnergy( 100.*TeV );
+  SetMaxEnergy( 1.*TeV );
   verboseLevel = 0;
   lowEnergyRecoilLimit = 100.*keV;  
@@ -83,7 +83,7 @@
 
   fEnergyBin = 200;
-  fAngleBin = 100;
-
-  fEnergyVector = 0;
+  fAngleBin  = 200;
+
+  fEnergyVector =  new G4PhysicsLogVector( theMinEnergy, theMaxEnergy, fEnergyBin );
   fAngleTable = 0;
 
@@ -107,5 +107,5 @@
 {
   SetMinEnergy( 0.01*GeV );
-  SetMaxEnergy( 100.*TeV );
+  SetMaxEnergy( 1.*TeV );
   verboseLevel = 0;
   lowEnergyRecoilLimit = 100.*keV;  
@@ -122,6 +122,6 @@
   thePionMinus= G4PionMinus::PionMinus();
 
-  fEnergyBin = 200;
-  fAngleBin = 100;
+  fEnergyBin = 200; // 200; // 100;
+  fAngleBin  = 400; // 200; // 100;
 
   // fEnergyVector = 0;
@@ -174,7 +174,10 @@
     fAtomicWeight = (*theElementTable)[jEl]->GetN();     // number of nucleons
     fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
-    if(verboseLevel > 0)    
+
+    if(verboseLevel > 0) 
+    {   
       G4cout<<"G4DiffuseElastic::Initialise() the element: "
 	    <<(*theElementTable)[jEl]->GetName()<<G4endl;
+    }
     fElementNumberVector.push_back(fAtomicNumber);
     fElementNameVector.push_back((*theElementTable)[jEl]->GetName());
@@ -183,83 +186,4 @@
     fAngleBank.push_back(fAngleTable);
   }  
-  return;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Initialisation for given particle on fly using new element number
-
-void G4DiffuseElastic::InitialiseOnFly(G4double Z, G4double A) 
-{
-  fAtomicNumber = Z;     // atomic number
-  fAtomicWeight = A;     // number of nucleons
-  fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
-  if(verboseLevel > 0)    
-    G4cout<<"G4DiffuseElastic::Initialise() the element with Z = "
-	  <<Z<<"; and A = "<<A<<G4endl;
-  fElementNumberVector.push_back(fAtomicNumber);
-
-  BuildAngleTable();
-  fAngleBank.push_back(fAngleTable);
-  return;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Build for given particle and element table of momentum, angle probability.
-// For the moment in lab system. 
-
-void G4DiffuseElastic::BuildAngleTable() 
-{
-  G4int i, j;
-  G4double partMom, kinE, a=0., z = fParticle->GetPDGCharge(), m1 = fParticle->GetPDGMass();
-  G4double theta1, theta2, thetaMax, thetaCoulomb, sum = 0.;
-
-  G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral;
-  
-  fAngleTable = new G4PhysicsTable(fEnergyBin);
-
-  for(i = 0; i < fEnergyBin; i++)
-  {
-    kinE        = fEnergyVector->GetLowEdgeEnergy(i);
-    partMom     = std::sqrt( kinE*(kinE + 2*m1) );
-    fWaveVector = partMom/hbarc;
-
-    thetaMax    = 10.174/fWaveVector/fNuclearRadius;
-
-    if (thetaMax > pi) thetaMax = pi;
-
-    thetaCoulomb = 0.2*thetaMax;
-
-    if(z)
-    {
-      a = partMom/m1;
-      fBeta          = a/std::sqrt(1+a*a);
-      fZommerfeld    = CalculateZommerfeld( fBeta, z, fAtomicNumber);
-      fAm            = CalculateAm( partMom, fZommerfeld, fAtomicNumber);
-    }
-    G4PhysicsFreeVector* angleVector = new G4PhysicsFreeVector(fAngleBin);
-
-    G4PhysicsLogVector*  angleBins = new G4PhysicsLogVector( 0.01*thetaMax, thetaMax, fAngleBin );
-
-    for(j = 1; j < fAngleBin; j++)
-    {
-      theta1 = angleBins->GetLowEdgeEnergy(j-1);
-      theta2 = angleBins->GetLowEdgeEnergy(j);
-
-      if(theta2 > thetaCoulomb && z) fAddCoulomb = true;
-
-      sum   += integral.Legendre10(this,&G4DiffuseElastic::GetIntegrandFunction, theta1,theta2);
-      
-      angleVector->PutValue( j-1 , theta2, sum );
-      // G4cout<<"j-1 = "<<j-1<<"; theta2 = "<<theta2<<"; sum = "<<sum<<G4endl;
-    }
-    fAddCoulomb = false;
-
-    fAngleTable->insertAt(i,angleVector);
-
-    // delete[] angleVector; 
-    // delete[] angleBins; 
-  }
   return;
 }
@@ -525,14 +449,19 @@
   fAtomicWeight  = A;
   fAtomicNumber  = Z;
-  G4double z             = particle->GetPDGCharge();
-  if(z)
+  fNuclearRadius = CalculateNuclearRad(A);
+  fAddCoulomb    = false;
+
+  G4double z     = particle->GetPDGCharge();
+
+  G4double kRt   = fWaveVector*fNuclearRadius*theta;
+  G4double kRtC  = 1.9;
+
+  if( z && (kRt > kRtC) )
   {
     fAddCoulomb = true;
-    fBeta          = CalculateParticleBeta( particle, momentum);
-    fZommerfeld    = CalculateZommerfeld( fBeta, z, fAtomicNumber);
-    fAm            = CalculateAm( momentum, fZommerfeld, fAtomicNumber);
-  }
-  fNuclearRadius = CalculateNuclearRad(A);
-
+    fBeta       = CalculateParticleBeta( particle, momentum);
+    fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber);
+    fAm         = CalculateAm( momentum, fZommerfeld, fAtomicNumber);
+  }
   G4double sigma = fNuclearRadius*fNuclearRadius*GetDiffElasticSumProb(theta);
 
@@ -552,9 +481,11 @@
 {
   G4double m1 = particle->GetPDGMass();
+
   G4LorentzVector lv1(0.,0.,plab,std::sqrt(plab*plab+m1*m1));
 
   G4int iZ = static_cast<G4int>(Z+0.5);
   G4int iA = static_cast<G4int>(A+0.5);
-  G4ParticleDefinition * theDef = 0;
+
+  G4ParticleDefinition* theDef = 0;
 
   if      (iZ == 1 && iA == 1) theDef = theProton;
@@ -575,6 +506,6 @@
   G4ThreeVector p1 = lv1.vect();
   G4double ptot    = p1.mag();
-  G4double ptot2 = ptot*ptot;
-  G4double cost = 1 - 0.5*std::fabs(tMand)/ptot2;
+  G4double ptot2   = ptot*ptot;
+  G4double cost    = 1 - 0.5*std::fabs(tMand)/ptot2;
 
   if( cost >= 1.0 )      cost = 1.0;  
@@ -658,4 +589,5 @@
   // G4double r0    = 1.08*fermi;
   // G4double rad   = r0*std::pow(A, 1./3.);
+
   G4double kr    = fWaveVector*fNuclearRadius; // wavek*rad;
   G4double kr2   = kr*kr;
@@ -686,10 +618,14 @@
   }
   G4double lambda = 15.; // 15 ok
+
   //  G4double kg    = fWaveVector*gamma;   // wavek*delta;
+
   G4double kg    = lambda*(1.-std::exp(-fWaveVector*gamma/lambda));   // wavek*delta;
   G4double kg2   = kg*kg;
+
   // G4double dk2t  = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta;
   // G4double dk2t2 = dk2t*dk2t;
   // G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta;
+
   G4double pikdt    = lambda*(1.-std::exp(-pi*fWaveVector*diffuse*theta/lambda));   // wavek*delta;
 
@@ -730,4 +666,5 @@
   // G4double r0    = 1.08*fermi;
   // G4double rad   = r0*std::pow(A, 1./3.);
+
   G4double kr    = fWaveVector*fNuclearRadius; // wavek*rad;
   G4double kr2   = kr*kr;
@@ -774,11 +711,10 @@
 
   G4double kg2   = kg*kg;
+
   // G4double dk2t  = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta;
-
   //   G4cout<<"dk2t = "<<dk2t<<G4endl;
-
   // G4double dk2t2 = dk2t*dk2t;
-
   // G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta;
+
   G4double pikdt    = lambda*(1.-std::exp(-pi*fWaveVector*diffuse*theta/lambda));   // wavek*delta;
 
@@ -808,13 +744,112 @@
 ////////////////////////////////////////////////////////////////////////////
 //
+// return differential elastic probability d(probability)/d(t) with 
+// Coulomb correction
+
+G4double 
+G4DiffuseElastic::GetDiffElasticSumProbA( G4double alpha )
+{
+  G4double theta; 
+
+  theta = std::sqrt(alpha);
+
+  // theta = std::acos( 1 - alpha/2. );
+
+  G4double sigma, bzero, bzero2, bonebyarg, bonebyarg2, damp, damp2;
+  G4double delta, diffuse, gamma;
+  G4double e1, e2, bone, bone2;
+
+  // G4double wavek = momentum/hbarc;  // wave vector
+  // G4double r0    = 1.08*fermi;
+  // G4double rad   = r0*std::pow(A, 1./3.);
+
+  G4double kr    = fWaveVector*fNuclearRadius; // wavek*rad;
+  G4double kr2   = kr*kr;
+  G4double krt   = kr*theta;
+
+  bzero      = BesselJzero(krt);
+  bzero2     = bzero*bzero;    
+  bone       = BesselJone(krt);
+  bone2      = bone*bone;
+  bonebyarg  = BesselOneByArg(krt);
+  bonebyarg2 = bonebyarg*bonebyarg;  
+
+  if (fParticle == theProton)
+  {
+    diffuse = 0.63*fermi;
+    // diffuse = 0.6*fermi;
+    gamma   = 0.3*fermi;
+    delta   = 0.1*fermi*fermi;
+    e1      = 0.3*fermi;
+    e2      = 0.35*fermi;
+  }
+  else // as proton, if were not defined 
+  {
+    diffuse = 0.63*fermi;
+    gamma   = 0.3*fermi;
+    delta   = 0.1*fermi*fermi;
+    e1      = 0.3*fermi;
+    e2      = 0.35*fermi;
+  }
+  G4double lambda = 15.; // 15 ok
+  // G4double kg    = fWaveVector*gamma;   // wavek*delta;
+  G4double kg    = lambda*(1.-std::exp(-fWaveVector*gamma/lambda));   // wavek*delta;
+
+  // G4cout<<"kg = "<<kg<<G4endl;
+
+  if(fAddCoulomb)  // add Coulomb correction
+  {
+    G4double sinHalfTheta  = theta*0.5; // std::sin(0.5*theta);
+    G4double sinHalfTheta2 = sinHalfTheta*sinHalfTheta;
+
+    kg += 0.5*fZommerfeld/kr/(sinHalfTheta2+fAm); // correction at J0()
+  // kg += 0.65*fZommerfeld/kr/(sinHalfTheta2+fAm); // correction at J0()
+  }
+
+  G4double kg2   = kg*kg;
+
+  // G4double dk2t  = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta;
+  //   G4cout<<"dk2t = "<<dk2t<<G4endl;
+  // G4double dk2t2 = dk2t*dk2t;
+  // G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta;
+
+  G4double pikdt    = lambda*(1.-std::exp(-pi*fWaveVector*diffuse*theta/lambda));   // wavek*delta;
+
+  // G4cout<<"pikdt = "<<pikdt<<G4endl;
+
+  damp           = DampFactor(pikdt);
+  damp2          = damp*damp;
+
+  G4double mode2k2 = (e1*e1+e2*e2)*fWaveVector*fWaveVector;  
+  G4double e2dk3t  = -2.*e2*delta*fWaveVector*fWaveVector*fWaveVector*theta;
+
+  sigma  = kg2;
+  // sigma += dk2t2;
+  sigma *= bzero2;
+  sigma += mode2k2*bone2; 
+  sigma += e2dk3t*bzero*bone;
+
+  // sigma += kr2*(1 + 8.*fZommerfeld*fZommerfeld/kr2)*bonebyarg2;  // correction at J1()/()
+  sigma += kr2*bonebyarg2;  // correction at J1()/()
+
+  sigma *= damp2;          // *rad*rad;
+
+  return sigma;
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
 // return differential elastic probability 2*pi*sin(theta)*d(probability)/d(omega) 
 
 G4double 
-G4DiffuseElastic::GetIntegrandFunction( G4double theta )
+G4DiffuseElastic::GetIntegrandFunction( G4double alpha )
 {
   G4double result;
 
-  result  = 2*pi*std::sin(theta);
-  result *= GetDiffElasticSumProb(theta);
+  result  = GetDiffElasticSumProbA(alpha);
+
+  // result *= 2*pi*std::sin(theta);
+
   return result;
 }
@@ -859,16 +894,4 @@
 ////////////////////////////////////////////////////////////////////////////
 //
-// Return inv momentum transfer -t > 0 from initialisation table
-
-G4double G4DiffuseElastic::SampleTableT( const G4ParticleDefinition* aParticle, G4double p, 
-                                               G4double Z, G4double A)
-{
-  G4double theta = SampleTableThetaCMS( aParticle,  p, Z, A); // sample theta in cms
-  G4double t     = 2*p*p*( 1 - std::cos(theta) ); // -t !!!
-  return t;
-}
-
-////////////////////////////////////////////////////////////////////////////
-//
 // Return scattering angle sampled in cms
 
@@ -922,7 +945,22 @@
 }
 
-////////////////////////////////////////////////////////////////////////////
-//
-// Return scattering angle sampled in cms according to precalculated table.
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////  Table preparation and reading ////////////////////////
+////////////////////////////////////////////////////////////////////////////
+//
+// Return inv momentum transfer -t > 0 from initialisation table
+
+G4double G4DiffuseElastic::SampleTableT( const G4ParticleDefinition* aParticle, G4double p, 
+                                               G4double Z, G4double A)
+{
+  G4double alpha = SampleTableThetaCMS( aParticle,  p, Z, A); // sample theta2 in cms
+  // G4double t     = 2*p*p*( 1 - std::cos(std::sqrt(alpha)) );             // -t !!!
+  G4double t     = p*p*alpha;             // -t !!!
+  return t;
+}
+
+////////////////////////////////////////////////////////////////////////////
+//
+// Return scattering angle2 sampled in cms according to precalculated table.
 
 
@@ -942,5 +980,6 @@
   if ( iElement == fElementNumberVector.size() ) 
   {
-    InitialiseOnFly(Z,A);
+    InitialiseOnFly(Z,A); // table preparation, if needed
+
     // iElement--;
 
@@ -955,58 +994,73 @@
   G4double kinE = std::sqrt(momentum*momentum + m1*m1) - m1;
 
-  for(iMomentum = 0; iMomentum < fEnergyBin; iMomentum++)
+  for( iMomentum = 0; iMomentum < fEnergyBin; iMomentum++)
   {
     if( kinE < fEnergyVector->GetLowEdgeEnergy(iMomentum) ) break;
   }
-  if ( iMomentum == fEnergyBin ) iMomentum--;   // kinE is more then theMaxEnergy
+  if ( iMomentum >= fEnergyBin ) iMomentum = fEnergyBin-1;   // kinE is more then theMaxEnergy
   if ( iMomentum < 0 )           iMomentum = 0; // against negative index, kinE < theMinEnergy
+
   // G4cout<<"iMomentum = "<<iMomentum<<G4endl;
 
-  if (iMomentum == fEnergyBin -1 || iMomentum == 0 ) // the table edges
+  if (iMomentum == fEnergyBin -1 || iMomentum == 0 )   // the table edges
   {
     position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand();
+
     // G4cout<<"position = "<<position<<G4endl;
 
-    for(iAngle = 0; iAngle < fAngleBin; iAngle++)
+    for(iAngle = 0; iAngle < fAngleBin-1; iAngle++)
     {
       if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
     }
-    if (iAngle == fAngleBin) iAngle--;
+    if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2;
+
     // G4cout<<"iAngle = "<<iAngle<<G4endl;
 
     randAngle = GetScatteringAngle(iMomentum, iAngle, position);
+
     // G4cout<<"randAngle = "<<randAngle<<G4endl;
   }
-  else
-  {
-    position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand();
+  else  // kinE inside between energy table edges
+  {
+    // position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand();
+    position = (*(*fAngleTable)(iMomentum))(0)*G4UniformRand();
+
     // G4cout<<"position = "<<position<<G4endl;
 
-    for(iAngle = 0; iAngle < fAngleBin; iAngle++)
+    for(iAngle = 0; iAngle < fAngleBin-1; iAngle++)
     {
-      if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
+      // if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
+      if( position > (*(*fAngleTable)(iMomentum))(iAngle) ) break;
     }
-    if (iAngle == fAngleBin) iAngle--;
+    if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2;
+
     // G4cout<<"iAngle = "<<iAngle<<G4endl;
 
     theta2  = GetScatteringAngle(iMomentum, iAngle, position);
+
     // G4cout<<"theta2 = "<<theta2<<G4endl;
     E2 = fEnergyVector->GetLowEdgeEnergy(iMomentum);
+
     // G4cout<<"E2 = "<<E2<<G4endl;
-
+    
     iMomentum--;
-
-    position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand();
+    
+    // position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand();
+
     // G4cout<<"position = "<<position<<G4endl;
 
-    for(iAngle = 0; iAngle < fAngleBin; iAngle++)
+    for(iAngle = 0; iAngle < fAngleBin-1; iAngle++)
     {
-      if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
+      // if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
+      if( position > (*(*fAngleTable)(iMomentum))(iAngle) ) break;
     }
-    if (iAngle == fAngleBin) iAngle--;
-
+    if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2;
+    
     theta1  = GetScatteringAngle(iMomentum, iAngle, position);
+
     // G4cout<<"theta1 = "<<theta1<<G4endl;
+
     E1 = fEnergyVector->GetLowEdgeEnergy(iMomentum);
+
     // G4cout<<"E1 = "<<E1<<G4endl;
 
@@ -1016,9 +1070,124 @@
 
     randAngle = W1*theta1 + W2*theta2;
+    
+    // randAngle = theta2;
     // G4cout<<"randAngle = "<<randAngle<<G4endl;
   }
+  // G4double angle = randAngle;
+  // if (randAngle > 0.) randAngle /= 2*pi*std::sin(angle);
+
   return randAngle;
 }
 
+//////////////////////////////////////////////////////////////////////////////
+//
+// Initialisation for given particle on fly using new element number
+
+void G4DiffuseElastic::InitialiseOnFly(G4double Z, G4double A) 
+{
+  fAtomicNumber  = Z;     // atomic number
+  fAtomicWeight  = A;     // number of nucleons
+
+  fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
+  
+  if( verboseLevel > 0 )    
+  {
+    G4cout<<"G4DiffuseElastic::Initialise() the element with Z = "
+	  <<Z<<"; and A = "<<A<<G4endl;
+  }
+  fElementNumberVector.push_back(fAtomicNumber);
+
+  BuildAngleTable();
+
+  fAngleBank.push_back(fAngleTable);
+
+  return;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Build for given particle and element table of momentum, angle probability.
+// For the moment in lab system. 
+
+void G4DiffuseElastic::BuildAngleTable() 
+{
+  G4int i, j;
+  G4double partMom, kinE, a = 0., z = fParticle->GetPDGCharge(), m1 = fParticle->GetPDGMass();
+  G4double alpha1, alpha2, alphaMax, alphaCoulomb, delta = 0., sum = 0.;
+
+  G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral;
+  
+  fAngleTable = new G4PhysicsTable(fEnergyBin);
+
+  for( i = 0; i < fEnergyBin; i++)
+  {
+    kinE        = fEnergyVector->GetLowEdgeEnergy(i);
+    partMom     = std::sqrt( kinE*(kinE + 2*m1) );
+
+    fWaveVector = partMom/hbarc;
+
+    G4double kR     = fWaveVector*fNuclearRadius;
+    G4double kR2    = kR*kR;
+    G4double kRmax  = 18.6; // 10.6; 10.6, 18, 10.174; ~ 3 maxima of J1 or 15., 25.
+    G4double kRcoul = 1.9; // 1.2; 1.4, 2.5; // on the first slope of J1
+    // G4double kRlim  = 1.2;
+    // G4double kRlim2 = kRlim*kRlim/kR2;
+
+    alphaMax = kRmax*kRmax/kR2;
+
+    if (alphaMax > 4.) alphaMax = 4.;  // vmg05-02-09: was pi2 
+
+    alphaCoulomb = kRcoul*kRcoul/kR2;
+
+    if( z )
+    {
+      a           = partMom/m1;         // beta*gamma for m1
+      fBeta       = a/std::sqrt(1+a*a);
+      fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber);
+      fAm         = CalculateAm( partMom, fZommerfeld, fAtomicNumber);
+    }
+    G4PhysicsFreeVector* angleVector = new G4PhysicsFreeVector(fAngleBin-1);
+
+    // G4PhysicsLogVector*  angleBins = new G4PhysicsLogVector( 0.001*alphaMax, alphaMax, fAngleBin );
+
+    G4double delth = alphaMax/fAngleBin;
+        
+    sum = 0.;
+
+    // fAddCoulomb = false;
+    fAddCoulomb = true;
+
+    // for(j = 1; j < fAngleBin; j++)
+    for(j = fAngleBin-1; j >= 1; j--)
+    {
+      // alpha1 = angleBins->GetLowEdgeEnergy(j-1);
+      // alpha2 = angleBins->GetLowEdgeEnergy(j);
+
+      // alpha1 = alphaMax*(j-1)/fAngleBin;
+      // alpha2 = alphaMax*( j )/fAngleBin;
+
+      alpha1 = delth*(j-1);
+      // if(alpha1 < kRlim2) alpha1 = kRlim2;
+      alpha2 = alpha1 + delth;
+
+      // if( ( alpha2 > alphaCoulomb ) && z ) fAddCoulomb = true;
+      if( ( alpha1 < alphaCoulomb ) && z ) fAddCoulomb = false;
+
+      delta = integral.Legendre10(this, &G4DiffuseElastic::GetIntegrandFunction, alpha1, alpha2);
+      // delta = integral.Legendre96(this, &G4DiffuseElastic::GetIntegrandFunction, alpha1, alpha2);
+
+      sum += delta;
+      
+      angleVector->PutValue( j-1 , alpha1, sum ); // alpha2
+      // G4cout<<"j-1 = "<<j-1<<"; alpha2 = "<<alpha2<<"; sum = "<<sum<<G4endl;
+    }
+    fAngleTable->insertAt(i,angleVector);
+
+    // delete[] angleVector; 
+    // delete[] angleBins; 
+  }
+  return;
+}
+
 /////////////////////////////////////////////////////////////////////////////////
 //
@@ -1026,5 +1195,5 @@
 
 G4double 
-G4DiffuseElastic:: GetScatteringAngle(G4int iMomentum, G4int iAngle, G4double position)
+G4DiffuseElastic:: GetScatteringAngle( G4int iMomentum, G4int iAngle, G4double position )
 {
  G4double x1, x2, y1, y2, randAngle;
@@ -1033,4 +1202,5 @@
   {
     randAngle = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle);
+    // iAngle++;
   }
   else
@@ -1046,11 +1216,11 @@
     x2 = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle);
 
-    if ( x1 == x2 )    randAngle = x2;
+    if ( x1 == x2 )   randAngle = x2;
     else
     {
-      if ( y1 == y2  ) randAngle = x1 + (x2 - x1)*G4UniformRand();
+      if ( y1 == y2 ) randAngle = x1 + ( x2 - x1 )*G4UniformRand();
       else
       {
-        randAngle = x1 + (position - y1)*(x2 - x1)/(y2 - y1);
+        randAngle = x1 + ( position - y1 )*( x2 - x1 )/( y2 - y1 );
       }
     }
@@ -1270,4 +1440,108 @@
 }
 
+///////////////////////////////////////////////////////////////////////////////
+//
+// Test for given particle and element table of momentum, angle probability.
+// For the moment in lab system. 
+
+void G4DiffuseElastic::TestAngleTable(const G4ParticleDefinition* theParticle, G4double partMom,
+                                            G4double Z, G4double A) 
+{
+  fAtomicNumber  = Z;     // atomic number
+  fAtomicWeight  = A;     // number of nucleons
+  fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
+  
+     
+  
+  G4cout<<"G4DiffuseElastic::TestAngleTable() init the element with Z = "
+	  <<Z<<"; and A = "<<A<<G4endl;
+ 
+  fElementNumberVector.push_back(fAtomicNumber);
+
+ 
+
+
+  G4int i=0, j;
+  G4double a = 0., z = theParticle->GetPDGCharge(),  m1 = fParticle->GetPDGMass();
+  G4double alpha1=0., alpha2=0., alphaMax=0., alphaCoulomb=0.;
+  G4double deltaL10 = 0., deltaL96 = 0., deltaAG = 0.;
+  G4double sumL10 = 0.,sumL96 = 0.,sumAG = 0.;
+  G4double epsilon = 0.001;
+
+  G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral;
+  
+  fAngleTable = new G4PhysicsTable(fEnergyBin);
+
+  fWaveVector = partMom/hbarc;
+
+  G4double kR     = fWaveVector*fNuclearRadius;
+  G4double kR2    = kR*kR;
+  G4double kRmax  = 10.6; // 10.6, 18, 10.174; ~ 3 maxima of J1 or 15., 25.
+  G4double kRcoul = 1.2; // 1.4, 2.5; // on the first slope of J1
+
+  alphaMax = kRmax*kRmax/kR2;
+
+  if (alphaMax > 4.) alphaMax = 4.;  // vmg05-02-09: was pi2 
+
+  alphaCoulomb = kRcoul*kRcoul/kR2;
+
+  if( z )
+  {
+      a           = partMom/m1; // beta*gamma for m1
+      fBeta       = a/std::sqrt(1+a*a);
+      fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber);
+      fAm         = CalculateAm( partMom, fZommerfeld, fAtomicNumber);
+  }
+  G4PhysicsFreeVector* angleVector = new G4PhysicsFreeVector(fAngleBin-1);
+
+  // G4PhysicsLogVector*  angleBins = new G4PhysicsLogVector( 0.001*alphaMax, alphaMax, fAngleBin );
+    
+  
+  fAddCoulomb = false;
+
+  for(j = 1; j < fAngleBin; j++)
+  {
+      // alpha1 = angleBins->GetLowEdgeEnergy(j-1);
+      // alpha2 = angleBins->GetLowEdgeEnergy(j);
+
+    alpha1 = alphaMax*(j-1)/fAngleBin;
+    alpha2 = alphaMax*( j )/fAngleBin;
+
+    if( ( alpha2 > alphaCoulomb ) && z ) fAddCoulomb = true;
+
+    deltaL10 = integral.Legendre10(this, &G4DiffuseElastic::GetIntegrandFunction, alpha1, alpha2);
+    deltaL96 = integral.Legendre96(this, &G4DiffuseElastic::GetIntegrandFunction, alpha1, alpha2);
+    deltaAG  = integral.AdaptiveGauss(this, &G4DiffuseElastic::GetIntegrandFunction, 
+                                       alpha1, alpha2,epsilon);
+
+      // G4cout<<alpha1<<"\t"<<std::sqrt(alpha1)/degree<<"\t"
+      //     <<deltaL10<<"\t"<<deltaL96<<"\t"<<deltaAG<<G4endl;
+
+    sumL10 += deltaL10;
+    sumL96 += deltaL96;
+    sumAG  += deltaAG;
+
+    G4cout<<alpha1<<"\t"<<std::sqrt(alpha1)/degree<<"\t"
+            <<sumL10<<"\t"<<sumL96<<"\t"<<sumAG<<G4endl;
+      
+    angleVector->PutValue( j-1 , alpha1, sumL10 ); // alpha2
+  }
+  fAngleTable->insertAt(i,angleVector);
+  fAngleBank.push_back(fAngleTable);
+
+  /*
+  // Integral over all angle range - Bad accuracy !!!
+
+  sumL10 = integral.Legendre10(this, &G4DiffuseElastic::GetIntegrandFunction, 0., alpha2);
+  sumL96 = integral.Legendre96(this, &G4DiffuseElastic::GetIntegrandFunction, 0., alpha2);
+  sumAG  = integral.AdaptiveGauss(this, &G4DiffuseElastic::GetIntegrandFunction, 
+                                       0., alpha2,epsilon);
+  G4cout<<G4endl;
+  G4cout<<alpha2<<"\t"<<std::sqrt(alpha2)/degree<<"\t"
+            <<sumL10<<"\t"<<sumL96<<"\t"<<sumAG<<G4endl;
+  */
+  return;
+}
+
 //
 //
Index: trunk/source/processes/hadronic/models/de_excitation/History
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/History	(revision 1055)
@@ -14,4 +14,59 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+13 March 2009 Vladimir Ivanchenko (hadr-deex-V09-02-09)
+---------------------------------------------------------
+- G4CompetitiveFission - fixed 4-momentum balance by using direct Lorentz 
+                         computations (JMQ);
+                       - use G4 units (VI).
+
+12 March 2009 Alexander Howard (hadr-deex-V09-02-08)
+----------------------------------------------------
+- Added Tatsumi's fixes ( G4GEMProbability.cc and G4GEMChannel.cc ) to GEM 
+  on top of patch9-02 ("hadr-deex-V09-02-07" and "hadr-deex-util-V09-02-00")
+
+04 March 2009 Gabriele Cosmo
+----------------------------
+- Fixed leaks in singleton classes in the 'util' module. Corrected wherever
+  needed inlining of constructors/destructors for base classes and usage of
+  virtual specification. Corresponds to tag "hadr-deex-util-V09-02-00".
+
+15 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-07)
+---------------------------------------------------------
+- G4EvaporationProbability - hbar_Plank substituted by hbarc (JMQ fix)
+- G4FissionProbability - fixed forgotten parenthesis (JMQ fix) 
+
+13 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-06)
+---------------------------------------------------------
+- Jose Manuel Quesada change the shape of probabilities (back to 9.2)
+  for d, t, He3, alpha near the Coulomb barrier
+
+12 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-05)
+---------------------------------------------------------
+- Jose Manuel Quesada change the shape of probabilities 
+  for d, t, He3, alpha near the Coulomb barrier
+
+11 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-04)
+---------------------------------------------------------
+- Jose Manuel Quesada set default OPT=3 back for all particles
+  and add smearing of Coloumb barriers of d, t, he3, alpha 
+
+10 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-03)
+---------------------------------------------------------
+- Exclude updated G4VGammaDeexcitation
+
+10 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-02)
+---------------------------------------------------------
+- Jose Manuel Quesada set default OPT=3 for evaporation of protons 
+  and neutrons and OPT=1 for deuterons, tritons, alpha and He3
+
+10 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-01)
+---------------------------------------------------------
+- Miguel Cortes added extra protection to G4VGammaDeexcitation
+
+27 January 2009 Vladimir Ivanchenko (hadr-deex-V09-02-00)
+--------------------------------------------------------
+- Miguel Cortes fix of Lorentz transformation in G4VGammaDeexcitation,
+  which provides Doppler broading of gamma lines
 
 09 December 2008 Alexander Howard (hadr-deex-V09-01-25)
Index: trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4AlphaEvaporationProbability.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4AlphaEvaporationProbability.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4AlphaEvaporationProbability.cc	(revision 1055)
@@ -104,5 +104,6 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4AlphaEvaporationProbability::CrossSection(const  G4Fragment & fragment, const  G4double K)
+G4double G4AlphaEvaporationProbability::CrossSection(const  G4Fragment & fragment, 
+						     const  G4double K)
 {
   theA=GetA();
@@ -117,5 +118,6 @@
   
   if (OPTxs==0) {std::ostringstream errOs;
-    errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (Alpha's)!!"  <<G4endl;
+    errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (Alpha's)!!"  
+	  <<G4endl;
     throw G4HadronicException(__FILE__, __LINE__, errOs.str());
     return 0.;}
@@ -203,5 +205,7 @@
   G4double      ra=1.20;
   
-  ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  //JMQ 13/02/09 increase of reduced radius to lower the barrier
+  // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra);
   ecsq = ec * ec;
   p = p0 + p1/ec + p2/ecsq;
@@ -226,5 +230,5 @@
   
   if (elab <= ec) { //start for E<Ec
-    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;    
+    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
   }           //end for E<Ec
   else {           //start for E>Ec
Index: trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4DeuteronEvaporationProbability.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4DeuteronEvaporationProbability.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4DeuteronEvaporationProbability.cc	(revision 1055)
@@ -106,5 +106,5 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4DeuteronEvaporationProbability::CrossSection(const  G4Fragment & fragment, const  G4double K)
+G4double G4DeuteronEvaporationProbability::CrossSection(const  G4Fragment & fragment, const  G4double K)
 {
        theA=GetA();
@@ -205,5 +205,7 @@
   G4double      ra=0.80;
         
-  ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  //JMQ 13/02/09 increase of reduced radius to lower the barrier
+  // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra);
   ecsq = ec * ec;
   p = p0 + p1/ec + p2/ecsq;
@@ -226,7 +228,7 @@
   elab = K * FragmentA / ResidualA;
   sig = 0.;
- 
+
   if (elab <= ec) { //start for E<Ec
-    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;    
+    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
   }           //end for E<Ec
   else {           //start for E>Ec
Index: trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationProbability.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationProbability.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationProbability.cc	(revision 1055)
@@ -33,5 +33,7 @@
 // JMQ (06 September 2008) Also external choices have been added for 
 // superimposed Coulomb barrier (if useSICB is set true, by default is false) 
-
+//
+// JMQ (14 february 2009) bug fixed in emission width: hbarc instead of hbar_Planck in the denominator
+//
 #include <iostream>
 using namespace std;
@@ -138,15 +140,15 @@
 
 
-// if Coulomb barrier cutoff is superimposed for all cross sections the limit is the Coulomb Barrier
-	G4double LowerLimit= limit;
-
-//  MaximalKineticEnergy: asimptotic value (already accounted for in G4EvaporationChannel)     
-
-  G4double UpperLimit = MaximalKineticEnergy;
-
-
-  G4double Width = IntegrateEmissionProbability(fragment,LowerLimit,UpperLimit);
-
-  return Width;
+   // if Coulomb barrier cutoff is superimposed for all cross sections the limit is the Coulomb Barrier
+   G4double LowerLimit= limit;
+
+   //  MaximalKineticEnergy: asimptotic value (already accounted for in G4EvaporationChannel)     
+
+   G4double UpperLimit = MaximalKineticEnergy;
+
+
+   G4double Width = IntegrateEmissionProbability(fragment,LowerLimit,UpperLimit);
+
+   return Width;
  } else{
    std::ostringstream errOs;
@@ -244,12 +246,14 @@
   if (E1<0.) return 0.;
 
-
-//Without 1/hbar_Panck remains as a width
-
-  G4double  Prob=Gamma*ParticleMass/((pi*hbar_Planck)*(pi*hbar_Planck)*std::exp(2*std::sqrt(a0*E0)))*K*CrossSection(fragment,K)*std::exp(2*std::sqrt(a1*E1))*millibarn;
-
-return Prob;
-
-}
-
-
+  //JMQ 14/02/09 BUG fixed: hbarc should be in the denominator instead of hbar_Planck 
+  //Without 1/hbar_Panck remains as a width
+  //  G4double  Prob=Gamma*ParticleMass/((pi*hbar_Planck)*(pi*hbar_Planck)*
+  //std::exp(2*std::sqrt(a0*E0)))*K*CrossSection(fragment,K)*std::exp(2*std::sqrt(a1*E1))*millibarn;
+
+  G4double Prob=Gamma*ParticleMass/((pi*hbarc)*(pi*hbarc)*std::exp(2*std::sqrt(a0*E0)))
+    *K*CrossSection(fragment,K)*std::exp(2*std::sqrt(a1*E1))*millibarn;
+
+  return Prob;
+}
+
+
Index: trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4He3EvaporationProbability.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4He3EvaporationProbability.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4He3EvaporationProbability.cc	(revision 1055)
@@ -104,5 +104,5 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4He3EvaporationProbability::CrossSection(const  G4Fragment & fragment, const  G4double K)
+G4double G4He3EvaporationProbability::CrossSection(const  G4Fragment & fragment, const  G4double K)
 {
        theA=GetA();
@@ -117,5 +117,6 @@
 
        if (OPTxs==0) {std::ostringstream errOs;
-         errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (He3's)!!"  <<G4endl;
+         errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (He3's)!!"  
+	       <<G4endl;
          throw G4HadronicException(__FILE__, __LINE__, errOs.str());
          return 0.;}
@@ -200,5 +201,7 @@
   G4double      ra=0.80;
   
-  ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  //JMQ 13/02/09 increase of reduced radius to lower the barrier
+  // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra);
   ecsq = ec * ec;
   p = p0 + p1/ec + p2/ecsq;
@@ -221,7 +224,7 @@
   elab = K * FragmentA / ResidualA;
   sig = 0.;
-  
+
   if (elab <= ec) { //start for E<Ec
-    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;    
+    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
   }           //end for E<Ec
   else {           //start for E>Ec
Index: trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4TritonEvaporationProbability.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4TritonEvaporationProbability.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4TritonEvaporationProbability.cc	(revision 1055)
@@ -100,5 +100,5 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4TritonEvaporationProbability::CrossSection(const  G4Fragment & fragment, const  G4double K)
+G4double G4TritonEvaporationProbability::CrossSection(const  G4Fragment & fragment, const  G4double K)
 {
   theA=GetA();
@@ -113,5 +113,6 @@
   
   if (OPTxs==0) {std::ostringstream errOs;
-    errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (tritons)!!"  <<G4endl;
+    errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (tritons)!!"  
+	  <<G4endl;
     throw G4HadronicException(__FILE__, __LINE__, errOs.str());
     return 0.;}
@@ -198,5 +199,7 @@
   G4double      ra=0.80;
         
-  ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  //JMQ 13/02/09 increase of reduced radius to lower the barrier
+  // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra);
   ecsq = ec * ec;
   p = p0 + p1/ec + p2/ecsq;
@@ -219,9 +222,9 @@
   elab = K * FragmentA / ResidualA;
   sig = 0.;
-  
+
   if (elab <= ec) { //start for E<Ec
-    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;    
+    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
   }           //end for E<Ec
-  else {           //start for E>Ec
+  else {           //start for E>Ec  
     sig = (landa*elab+mu+nu/elab) * signor;
     geom = 0.;
Index: trunk/source/processes/hadronic/models/de_excitation/fission/src/G4CompetitiveFission.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/fission/src/G4CompetitiveFission.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/fission/src/G4CompetitiveFission.cc	(revision 1055)
@@ -25,9 +25,14 @@
 //
 //
-// $Id: G4CompetitiveFission.cc,v 1.9 2008/11/20 13:46:27 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CompetitiveFission.cc,v 1.11 2009/03/13 18:57:17 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
 // by V. Lara (Oct 1998)
+//
+// J. M. Quesada (March 2009). Bugs fixed:
+//          - Full relativistic calculation (Lorentz boosts)
+//          - Fission pairing energy is included in fragment excitation energies
+// Now Energy and momentum are conserved in fission 
 
 #include "G4CompetitiveFission.hh"
@@ -127,6 +132,8 @@
     }
 
+
     // Atomic Mass of Nucleus (in MeV)
-    G4double M = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A)/MeV;
+    G4double M = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A);
+
     // Nucleus Momentum
     G4LorentzVector theNucleusMomentum = theNucleus.GetMomentum();
@@ -147,4 +154,7 @@
     G4double FragmentsExcitationEnergy = 0.0;
     G4double FragmentsKineticEnergy = 0.0;
+
+    //JMQ 04/03/09 It will be used latter to fix the bug in energy conservation
+    G4double FissionPairingEnergy=G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(A,Z);
 
     G4int Trials = 0;
@@ -162,13 +172,12 @@
 	if (A2 < 1 || Z2 < 0) 
 	    throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakUp: Can't define second fragment! ");
-	M2 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z2,A2)/MeV;
+
+	M2 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z2,A2);
 
 	// Check that fragment masses are less or equal than total energy
-	//  if (M1 + M2 > theNucleusMomentum.mag()/MeV)
-	if (M1 + M2 > theNucleusMomentum.e()/MeV)
+	if (M1 + M2 > theNucleusMomentum.e())
 	    throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakUp: Fragments Mass > Total Energy");
 
 	// Maximal Kinetic Energy (available energy for fragments)
-	//  G4double Tmax = theNucleusMomentum.mag()/MeV - M1 - M2;
 	G4double Tmax = M + U - M1 - M2;
 
@@ -180,8 +189,13 @@
     
 	// Excitation Energy
-	FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy;
+	//	FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy;
+	// JMQ 04/03/09 BUG FIXED: in order to fulfill energy conservation the
+	// fragments carry the fission pairing energy in form of 
+	//excitation energy
+
+	FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy+FissionPairingEnergy;
+
+    } while (FragmentsExcitationEnergy < 0.0 && Trials++ < 100);
     
-    } while (FragmentsExcitationEnergy < 0.0 && Trials++ < 100);
-  
   
 
@@ -190,7 +204,7 @@
   
 
-  // while (FragmentsExcitationEnergy < 0 && Trials < 100);
-  
-  // Fragment 1
+    // while (FragmentsExcitationEnergy < 0 && Trials < 100);
+  
+    // Fragment 1
     G4double U1 = FragmentsExcitationEnergy * (static_cast<G4double>(A1)/static_cast<G4double>(A));
     // Fragment 2
@@ -198,22 +212,41 @@
 
 
-    G4double Pmax = std::sqrt( 2 * ( ( (M1+U1)*(M2+U2) ) /
-				( (M1+U1)+(M2+U2) ) ) * FragmentsKineticEnergy);
-
-    G4ParticleMomentum momentum1 = IsotropicVector( Pmax );
-    G4ParticleMomentum momentum2( -momentum1 );
+    //JMQ  04/03/09 Full relativistic calculation is performed
+    //
+    G4double Fragment1KineticEnergy=(FragmentsKineticEnergy*(FragmentsKineticEnergy+2*(M2+U2)))/(2*(M1+U1+M2+U2+FragmentsKineticEnergy));
+    G4ParticleMomentum Momentum1(IsotropicVector(std::sqrt(Fragment1KineticEnergy*(Fragment1KineticEnergy+2*(M1+U1)))));
+    G4ParticleMomentum Momentum2(-Momentum1);
+    G4LorentzVector FourMomentum1(Momentum1,std::sqrt(Momentum1.mag2()+(M1+U1)*(M1+U1)));
+    G4LorentzVector FourMomentum2(Momentum2,std::sqrt(Momentum2.mag2()+(M2+U2)*(M2+U2)));
+
+    //JMQ 04/03/09 now we do Lorentz boosts (instead of Galileo boosts)
+    FourMomentum1.boost(theNucleusMomentum.boostVector());
+    FourMomentum2.boost(theNucleusMomentum.boostVector());
+    
+    //////////JMQ 04/03: Old version calculation is commented
+    // There was vioation of energy momentum conservation
+
+    //    G4double Pmax = std::sqrt( 2 * ( ( (M1+U1)*(M2+U2) ) /
+    //				( (M1+U1)+(M2+U2) ) ) * FragmentsKineticEnergy);
+
+    //G4ParticleMomentum momentum1 = IsotropicVector( Pmax );
+    //  G4ParticleMomentum momentum2( -momentum1 );
 
     // Perform a Galileo boost for fragments
-    momentum1 += (theNucleusMomentum.boostVector() * (M1+U1));
-    momentum2 += (theNucleusMomentum.boostVector() * (M2+U2));
+    //    momentum1 += (theNucleusMomentum.boostVector() * (M1+U1));
+    //    momentum2 += (theNucleusMomentum.boostVector() * (M2+U2));
 
 
     // Create 4-momentum for first fragment
     // Warning!! Energy conservation is broken
-    G4LorentzVector FourMomentum1( momentum1 , std::sqrt(momentum1.mag2() + (M1+U1)*(M1+U1)));
+    //JMQ 04/03/09 ...NOT ANY MORE!! BUGS FIXED: Energy and momentum are NOW conserved 
+    //    G4LorentzVector FourMomentum1( momentum1 , std::sqrt(momentum1.mag2() + (M1+U1)*(M1+U1)));
 
     // Create 4-momentum for second fragment
     // Warning!! Energy conservation is broken
-    G4LorentzVector FourMomentum2( momentum2 , std::sqrt(momentum2.mag2() + (M2+U2)*(M2+U2)));
+    //JMQ 04/03/09 ...NOT ANY MORE!! BUGS FIXED: Energy and momentum are NOW conserved
+    //    G4LorentzVector FourMomentum2( momentum2 , std::sqrt(momentum2.mag2() + (M2+U2)*(M2+U2)));
+
+    //////////
 
     // Create Fragments
@@ -227,5 +260,5 @@
     Fragment2->SetCreatorModel(G4String("G4CompetitiveFission"));
 #endif
-  // Create Fragment Vector
+    // Create Fragment Vector
     G4FragmentVector * theResult = new G4FragmentVector;
 
Index: trunk/source/processes/hadronic/models/de_excitation/fission/src/G4FissionProbability.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/fission/src/G4FissionProbability.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/fission/src/G4FissionProbability.cc	(revision 1055)
@@ -25,10 +25,12 @@
 //
 //
-// $Id: G4FissionProbability.cc,v 1.8 2007/02/12 09:39:58 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4FissionProbability.cc,v 1.9 2009/02/15 17:03:25 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
 // by V. Lara (Oct 1998)
 //
+//
+// J.M.Quesada (14 february 2009) bug fixed in fission width: missing parenthesis in the denominator 
 
 
@@ -95,9 +97,13 @@
     G4double Exp1 = 0.0;
     if (SystemEntropy <= 160.0) Exp1 = std::exp(-SystemEntropy);
-    // @@@@@@@@@@@@@@@@@ hpw changed max to min - cannot notify vicente now since cern mail gave up on me...
+    // @@@@@@@@@@@@@@@@@ hpw changed max to min - cannot notify vicente now
     G4double Exp2 = std::exp( std::min(700.0,Cf-SystemEntropy) ); 
 
+    // JMQ 14/02/09 BUG fixed in fission probability (missing parenthesis at denominator)
     //AH fix from Vincente:    G4double probability = (Exp1 + (1.0-Cf)*Exp2) / 4.0*pi*afission;
-    G4double probability = (Exp1 + (Cf-1.0)*Exp2) / 4.0*pi*afission;
+    //    G4double probability = (Exp1 + (Cf-1.0)*Exp2) / 4.0*pi*afission;
+    G4double probability = (Exp1 + (Cf-1.0)*Exp2) / (4.0*pi*afission);
+
+
     
     return probability;
Index: trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMChannel.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMChannel.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMChannel.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4GEMChannel.cc,v 1.6 2008/11/18 18:26:30 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4GEMChannel.cc,v 1.7 2009/03/12 11:25:28 ahoward Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -125,6 +125,10 @@
     //    G4double ExEnergy = fragment.GetExcitationEnergy() -
     //      G4PairingCorrection::GetInstance()->GetPairingCorrection(anA,aZ);
-    G4double ExEnergy = fragment.GetExcitationEnergy() -
-      G4PairingCorrection::GetInstance()->GetPairingCorrection(AResidual,ZResidual);
+//090120
+    //G4double ExEnergy = fragment.GetExcitationEnergy() -
+      //G4PairingCorrection::GetInstance()->GetPairingCorrection(AResidual,ZResidual);
+    G4double ExEnergy = fragment.GetExcitationEnergy(); 
+    if ( AResidual > 0 ) ExEnergy -= G4PairingCorrection::GetInstance()->GetPairingCorrection(AResidual,ZResidual);
+//090120
     
     // We only take into account channels which are physically allowed
@@ -260,6 +264,9 @@
     G4double a = theLevelDensityPtr->LevelDensityParameter(static_cast<G4int>(fragment.GetA()),
 							   static_cast<G4int>(fragment.GetZ()),U);
-    G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()),
-									       static_cast<G4int>(fragment.GetZ()));
+//090115
+//G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()),
+//								       static_cast<G4int>(fragment.GetZ()));
+    G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(AResidual,ZResidual);
+//090115
     
     G4double Alpha = theEvaporationProbabilityPtr->CalcAlphaParam(fragment);
@@ -307,4 +314,8 @@
 //      std::cout << "\t\tEjectile (" << A << ',' << Z << ") V = " << CoulombBarrier 
 //  	      << " Beta = " << Beta << " V+Beta = " << CoulombBarrier+Beta << '\n';
+
+//G4cout << AResidual << " " << ZResidual << " " << ConstantFactor << " " << Beta << " " << CoulombBarrier << " " << MaximalKineticEnergy << " " << CoulombBarrier + MaximalKineticEnergy + Beta << G4endl;
+//090128
+if ( CoulombBarrier + MaximalKineticEnergy + Beta <= 0 ) return 0; 
 
     do 
Index: trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMProbability.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMProbability.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMProbability.cc	(revision 1055)
@@ -108,6 +108,10 @@
     G4double a = theEvapLDPptr->LevelDensityParameter(static_cast<G4int>(fragment.GetA()),
 						      static_cast<G4int>(fragment.GetZ()),U);
-    G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()),
-									       static_cast<G4int>(fragment.GetZ()));
+//090115
+//G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()),
+//								       static_cast<G4int>(fragment.GetZ()));
+    G4double ResidualZ = static_cast<G4double>(fragment.GetZ() - theZ);
+    G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection( static_cast<G4int>( ResidualA ) , static_cast<G4int>( ResidualZ ) );
+//090115
     
     G4double Alpha = CalcAlphaParam(fragment);
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronGilbertPairingCorrections.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronGilbertPairingCorrections.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronGilbertPairingCorrections.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronGilbertPairingCorrections.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronGilbertPairingCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -52,5 +52,5 @@
   static G4CameronGilbertPairingCorrections* GetInstance();
 
-  ~G4CameronGilbertPairingCorrections() {};
+  ~G4CameronGilbertPairingCorrections();
 
   G4double GetPairingCorrection(const G4int A, const G4int Z) const
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronGilbertShellCorrections.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronGilbertShellCorrections.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronGilbertShellCorrections.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronGilbertShellCorrections.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronGilbertShellCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -51,5 +51,5 @@
   static G4CameronGilbertShellCorrections* GetInstance();
 
-  ~G4CameronGilbertShellCorrections() {};
+  ~G4CameronGilbertShellCorrections();
   
   G4double GetShellCorrection(const G4int A, const G4int Z) const 
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronShellPlusPairingCorrections.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronShellPlusPairingCorrections.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronShellPlusPairingCorrections.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronShellPlusPairingCorrections.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronShellPlusPairingCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -51,5 +51,5 @@
   static G4CameronShellPlusPairingCorrections* GetInstance();
 
-  ~G4CameronShellPlusPairingCorrections() {};
+  ~G4CameronShellPlusPairingCorrections();
   
   G4double GetShellPlusPairingZ(const G4int Z) const 
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronTruranHilfPairingCorrections.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronTruranHilfPairingCorrections.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronTruranHilfPairingCorrections.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronTruranHilfPairingCorrections.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronTruranHilfPairingCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -50,5 +50,5 @@
   static G4CameronTruranHilfPairingCorrections* GetInstance();
 
-  ~G4CameronTruranHilfPairingCorrections() {};
+  ~G4CameronTruranHilfPairingCorrections();
 
   G4double GetParingCorrection(const G4int A, const  G4int Z) const
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronTruranHilfShellCorrections.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronTruranHilfShellCorrections.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronTruranHilfShellCorrections.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronTruranHilfShellCorrections.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronTruranHilfShellCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -50,5 +50,5 @@
   static G4CameronTruranHilfShellCorrections* GetInstance();
   
-  ~G4CameronTruranHilfShellCorrections() {};
+  ~G4CameronTruranHilfShellCorrections();
 
   G4double GetShellCorrection(const G4int A, const G4int Z) const 
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4ConstantLevelDensityParameter.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4ConstantLevelDensityParameter.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4ConstantLevelDensityParameter.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4ConstantLevelDensityParameter.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4ConstantLevelDensityParameter.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations (photon evaporation)
@@ -41,5 +41,5 @@
 public:
   G4ConstantLevelDensityParameter() :  EvapLevelDensityParameter(0.125*(1./MeV)) {};
-  virtual ~G4ConstantLevelDensityParameter() {};
+  virtual ~G4ConstantLevelDensityParameter();
 
 private:  
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookPairingCorrections.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookPairingCorrections.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookPairingCorrections.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CookPairingCorrections.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CookPairingCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -50,5 +50,5 @@
   static G4CookPairingCorrections* GetInstance();
 
-  ~G4CookPairingCorrections() {};
+  ~G4CookPairingCorrections();
 
   G4double GetParingCorrection(const G4int A, const G4int Z) const {
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookShellCorrections.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookShellCorrections.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookShellCorrections.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CookShellCorrections.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CookShellCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -52,5 +52,5 @@
   static G4CookShellCorrections* GetInstance();
 
-  ~G4CookShellCorrections() {};
+  ~G4CookShellCorrections();
 
   G4double GetShellCorrection(const G4int A, const G4int Z) const 
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4CoulombBarrier.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4CoulombBarrier.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4CoulombBarrier.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CoulombBarrier.hh,v 1.5 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CoulombBarrier.hh,v 1.6 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -42,8 +42,7 @@
 {
 public:
-  G4CoulombBarrier() : G4VCoulombBarrier(1,0) {};
-  G4CoulombBarrier(const G4int anA,const G4int aZ) :
-    G4VCoulombBarrier(anA,aZ) {};
-  ~G4CoulombBarrier() {};
+  G4CoulombBarrier();
+  G4CoulombBarrier(const G4int anA,const G4int aZ);
+  virtual ~G4CoulombBarrier();
 
 private:
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4DeuteronCoulombBarrier.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4DeuteronCoulombBarrier.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4DeuteronCoulombBarrier.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4DeuteronCoulombBarrier.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4DeuteronCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -40,6 +40,6 @@
 {
 public:
-	G4DeuteronCoulombBarrier() : G4CoulombBarrier(2,1) {};
-	~G4DeuteronCoulombBarrier() {};
+	G4DeuteronCoulombBarrier() : G4CoulombBarrier(2,1) {}
+	~G4DeuteronCoulombBarrier() {}
 
 private:
@@ -52,6 +52,5 @@
 private:
 
-	virtual G4double BarrierPenetrationFactor(const G4double aZ) const;
-
+	G4double BarrierPenetrationFactor(const G4double aZ) const;
 
 };
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4EvaporationLevelDensityParameter.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4EvaporationLevelDensityParameter.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4EvaporationLevelDensityParameter.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4EvaporationLevelDensityParameter.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4EvaporationLevelDensityParameter.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -45,7 +45,7 @@
 public:
 
-  G4EvaporationLevelDensityParameter()  {};
+  G4EvaporationLevelDensityParameter();
 
-  virtual ~G4EvaporationLevelDensityParameter() {};
+  virtual ~G4EvaporationLevelDensityParameter();
 
 private:  
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4He3CoulombBarrier.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4He3CoulombBarrier.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4He3CoulombBarrier.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4He3CoulombBarrier.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4He3CoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -40,6 +40,6 @@
 {
 public:
-	G4He3CoulombBarrier() : G4CoulombBarrier(3,2) {};
-	~G4He3CoulombBarrier() {};
+	G4He3CoulombBarrier() : G4CoulombBarrier(3,2) {}
+	~G4He3CoulombBarrier() {}
 
 private:
@@ -52,6 +52,5 @@
 private:
 
-	virtual G4double BarrierPenetrationFactor(const G4double aZ) const;
-
+	G4double BarrierPenetrationFactor(const G4double aZ) const;
 
 };
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4NeutronCoulombBarrier.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4NeutronCoulombBarrier.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4NeutronCoulombBarrier.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4NeutronCoulombBarrier.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4NeutronCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -40,6 +40,6 @@
 {
 public:
-	G4NeutronCoulombBarrier() : G4CoulombBarrier(1,0) {};
-	~G4NeutronCoulombBarrier() {};
+	G4NeutronCoulombBarrier() : G4CoulombBarrier(1,0) {}
+	~G4NeutronCoulombBarrier() {}
 
 private:
@@ -52,7 +52,6 @@
 private:
 
-	virtual G4double BarrierPenetrationFactor(const G4double ) const
+	G4double BarrierPenetrationFactor(const G4double ) const
 	{ return 1.0;}
-
 
 };
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4PairingCorrection.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4PairingCorrection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4PairingCorrection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4PairingCorrection.hh,v 1.5 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4PairingCorrection.hh,v 1.6 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -53,5 +53,5 @@
   static G4PairingCorrection* GetInstance();
   
-  ~G4PairingCorrection() {};
+  ~G4PairingCorrection();
 
   G4double GetPairingCorrection(const G4int A, const G4int Z) const
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4ProtonCoulombBarrier.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4ProtonCoulombBarrier.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4ProtonCoulombBarrier.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4ProtonCoulombBarrier.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4ProtonCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -40,6 +40,6 @@
 {
 public:
-	G4ProtonCoulombBarrier() : G4CoulombBarrier(1,1) {};
-	~G4ProtonCoulombBarrier() {};
+	G4ProtonCoulombBarrier() : G4CoulombBarrier(1,1) {}
+	~G4ProtonCoulombBarrier() {}
 
 private:
@@ -52,6 +52,5 @@
 private:
 
-	virtual G4double BarrierPenetrationFactor(const G4double aZ) const;
-
+	G4double BarrierPenetrationFactor(const G4double aZ) const;
 
 };
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4ShellCorrection.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4ShellCorrection.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4ShellCorrection.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4ShellCorrection.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4ShellCorrection.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -51,5 +51,5 @@
 public:
   static G4ShellCorrection* GetInstance();
-  ~G4ShellCorrection() {};
+  ~G4ShellCorrection();
 
   G4double GetShellCorrection(const G4int A, const G4int Z) const 
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4TritonCoulombBarrier.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4TritonCoulombBarrier.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4TritonCoulombBarrier.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4TritonCoulombBarrier.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4TritonCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -40,6 +40,6 @@
 {
 public:
-    G4TritonCoulombBarrier() : G4CoulombBarrier(3,1) {};
-    ~G4TritonCoulombBarrier() {};
+    G4TritonCoulombBarrier() : G4CoulombBarrier(3,1) {}
+    ~G4TritonCoulombBarrier() {}
 
 private:
@@ -52,6 +52,5 @@
 private:
 
-    virtual G4double BarrierPenetrationFactor(const G4double aZ) const;
-
+    G4double BarrierPenetrationFactor(const G4double aZ) const;
 
 };
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4VCoulombBarrier.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4VCoulombBarrier.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4VCoulombBarrier.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VCoulombBarrier.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -41,8 +41,8 @@
 public:
   G4VCoulombBarrier(const G4int anA, const G4int aZ);
-  virtual ~G4VCoulombBarrier() {};
+  virtual ~G4VCoulombBarrier();
 
 protected:
-  G4VCoulombBarrier() : theA(1),theZ(0) {};
+  G4VCoulombBarrier();
 
 private:
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4VEmissionProbability.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4VEmissionProbability.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4VEmissionProbability.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VEmissionProbability.hh,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VEmissionProbability.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -47,6 +47,6 @@
 {
 public:
-  G4VEmissionProbability() {};
-  virtual ~G4VEmissionProbability() {};
+  G4VEmissionProbability();
+  virtual ~G4VEmissionProbability();
 
 private:  
Index: trunk/source/processes/hadronic/models/de_excitation/util/include/G4VLevelDensityParameter.hh
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/include/G4VLevelDensityParameter.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/include/G4VLevelDensityParameter.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VLevelDensityParameter.hh,v 1.5 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VLevelDensityParameter.hh,v 1.6 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -44,6 +44,6 @@
 {
 public:
-  G4VLevelDensityParameter() {};
-  virtual ~G4VLevelDensityParameter() {};
+  G4VLevelDensityParameter();
+  virtual ~G4VLevelDensityParameter();
 
 private:  
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertPairingCorrections.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertPairingCorrections.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertPairingCorrections.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronGilbertPairingCorrections.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronGilbertPairingCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -74,4 +74,6 @@
 {;}
 
+G4CameronGilbertPairingCorrections::~G4CameronGilbertPairingCorrections()
+{ delete theInstance; }
 
 G4CameronGilbertPairingCorrections* G4CameronGilbertPairingCorrections::GetInstance()
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertShellCorrections.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertShellCorrections.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertShellCorrections.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronGilbertShellCorrections.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronGilbertShellCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -74,4 +74,7 @@
 {;}
 
+G4CameronGilbertShellCorrections::~G4CameronGilbertShellCorrections()
+{ delete theInstance; }
+
 G4CameronGilbertShellCorrections* G4CameronGilbertShellCorrections::GetInstance()
 {
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronShellPlusPairingCorrections.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronShellPlusPairingCorrections.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronShellPlusPairingCorrections.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronShellPlusPairingCorrections.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronShellPlusPairingCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -92,4 +92,7 @@
 {;}
 
+G4CameronShellPlusPairingCorrections::~G4CameronShellPlusPairingCorrections()
+{ delete theInstance; }
+
 G4CameronShellPlusPairingCorrections* G4CameronShellPlusPairingCorrections::GetInstance() {
   if (!theInstance) theInstance = new G4CameronShellPlusPairingCorrections();
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfPairingCorrections.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfPairingCorrections.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfPairingCorrections.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronTruranHilfPairingCorrections.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronTruranHilfPairingCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -79,4 +79,7 @@
 {;}
 
+G4CameronTruranHilfPairingCorrections::~G4CameronTruranHilfPairingCorrections()
+{ delete theInstance; }
+
 G4CameronTruranHilfPairingCorrections* G4CameronTruranHilfPairingCorrections::GetInstance() {
   if (!theInstance) theInstance = new G4CameronTruranHilfPairingCorrections();
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfShellCorrections.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfShellCorrections.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfShellCorrections.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CameronTruranHilfShellCorrections.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CameronTruranHilfShellCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -81,4 +81,7 @@
 {;}
 
+G4CameronTruranHilfShellCorrections::~G4CameronTruranHilfShellCorrections()
+{ delete theInstance; }
+
 G4CameronTruranHilfShellCorrections* G4CameronTruranHilfShellCorrections::GetInstance() {
   if (!theInstance) theInstance = new G4CameronTruranHilfShellCorrections();
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4ConstantLevelDensityParameter.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4ConstantLevelDensityParameter.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4ConstantLevelDensityParameter.cc	(revision 1055)
@@ -42,4 +42,7 @@
 }
 
+G4ConstantLevelDensityParameter::~G4ConstantLevelDensityParameter()
+{
+}
 
 const G4ConstantLevelDensityParameter & G4ConstantLevelDensityParameter::
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookPairingCorrections.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookPairingCorrections.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookPairingCorrections.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CookPairingCorrections.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CookPairingCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -73,4 +73,7 @@
 {;}
 
+G4CookPairingCorrections::~G4CookPairingCorrections()
+{ delete theInstance; }
+
 G4CookPairingCorrections* G4CookPairingCorrections::GetInstance() {
   if (!theInstance) theInstance = new  G4CookPairingCorrections();
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookShellCorrections.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookShellCorrections.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookShellCorrections.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CookShellCorrections.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CookShellCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -73,4 +73,6 @@
 {;}
 
+G4CookShellCorrections::~G4CookShellCorrections()
+{ delete theInstance; }
 
 G4CookShellCorrections* G4CookShellCorrections::GetInstance() {
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4CoulombBarrier.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4CoulombBarrier.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4CoulombBarrier.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CoulombBarrier.cc,v 1.8 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4CoulombBarrier.cc,v 1.9 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -35,4 +35,12 @@
 #include "G4HadronicException.hh"
 #include <sstream>
+
+G4CoulombBarrier::G4CoulombBarrier()
+  : G4VCoulombBarrier(1,0) {}
+
+G4CoulombBarrier::G4CoulombBarrier(const G4int anA,const G4int aZ)
+  : G4VCoulombBarrier(anA,aZ) {}
+
+G4CoulombBarrier::~G4CoulombBarrier() {}
 
 G4CoulombBarrier::G4CoulombBarrier(const G4CoulombBarrier & ) : G4VCoulombBarrier()
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4EvaporationLevelDensityParameter.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4EvaporationLevelDensityParameter.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4EvaporationLevelDensityParameter.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4EvaporationLevelDensityParameter.cc,v 1.8 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4EvaporationLevelDensityParameter.cc,v 1.9 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -49,4 +49,6 @@
 const G4double G4EvaporationLevelDensityParameter::Bs = 1.0;
 
+G4EvaporationLevelDensityParameter::G4EvaporationLevelDensityParameter() {}
+G4EvaporationLevelDensityParameter::~G4EvaporationLevelDensityParameter() {}
 
 G4EvaporationLevelDensityParameter::
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4PairingCorrection.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4PairingCorrection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4PairingCorrection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4PairingCorrection.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4PairingCorrection.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -44,4 +44,7 @@
 }
 
+G4PairingCorrection::~G4PairingCorrection()
+{ delete theInstance; }
+
 G4PairingCorrection* G4PairingCorrection::GetInstance()
 {
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4ShellCorrection.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4ShellCorrection.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4ShellCorrection.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4ShellCorrection.cc,v 1.4 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4ShellCorrection.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -44,4 +44,8 @@
 }
 
+G4ShellCorrection::~G4ShellCorrection()
+{
+  delete theInstance;
+}
 
 G4ShellCorrection* G4ShellCorrection::GetInstance()
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4VCoulombBarrier.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4VCoulombBarrier.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4VCoulombBarrier.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VCoulombBarrier.cc,v 1.6 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VCoulombBarrier.cc,v 1.7 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -35,4 +35,10 @@
 #include "G4HadronicException.hh"
 #include <sstream>
+
+G4VCoulombBarrier::G4VCoulombBarrier()
+  : theA(1),theZ(0)
+{
+}
+
 
 G4VCoulombBarrier::G4VCoulombBarrier(const G4int anA, const G4int aZ)
@@ -49,4 +55,9 @@
 	throw G4HadronicException(__FILE__, __LINE__, errOs.str());
     }
+}
+
+
+G4VCoulombBarrier::~G4VCoulombBarrier()
+{
 }
 
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4VEmissionProbability.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4VEmissionProbability.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4VEmissionProbability.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VEmissionProbability.cc,v 1.6 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VEmissionProbability.cc,v 1.7 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -36,10 +36,13 @@
 #include "G4HadronicException.hh"
 
+
+G4VEmissionProbability::G4VEmissionProbability() {}
+G4VEmissionProbability::~G4VEmissionProbability() {}
+
+
 G4VEmissionProbability::G4VEmissionProbability(const G4VEmissionProbability &)
 {
     throw G4HadronicException(__FILE__, __LINE__, "G4VEmissionProbability::copy_constructor meant to not be accessable");
 }
-
-
 
 
Index: trunk/source/processes/hadronic/models/de_excitation/util/src/G4VLevelDensityParameter.cc
===================================================================
--- trunk/source/processes/hadronic/models/de_excitation/util/src/G4VLevelDensityParameter.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/de_excitation/util/src/G4VLevelDensityParameter.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VLevelDensityParameter.cc,v 1.5 2008/09/19 13:32:54 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VLevelDensityParameter.cc,v 1.6 2009/03/04 11:05:02 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear De-excitations
@@ -36,4 +36,8 @@
 
 
+G4VLevelDensityParameter::G4VLevelDensityParameter() {}
+G4VLevelDensityParameter::~G4VLevelDensityParameter() {}
+
+
 G4VLevelDensityParameter::
 G4VLevelDensityParameter(const G4VLevelDensityParameter &)
@@ -41,6 +45,4 @@
     throw G4HadronicException(__FILE__, __LINE__, "G4VLevelDensityParameter::copy_constructor meant to not be accessable");
 }
-
-
 
 
Index: trunk/source/processes/hadronic/models/management/History
===================================================================
--- trunk/source/processes/hadronic/models/management/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/management/History	(revision 1055)
@@ -15,8 +15,25 @@
      ---------------------------------------------------------------
 
+25 February 2009 - V.Ivanchenko (hadr-modman-V09-02-03)
+------------------------------------------------------
+-  G4HadronicInteractionRegistry - added protection to the Clean method
+
+14 February 2009 - V.Ivanchenko (hadr-modman-V09-02-02)
+------------------------------------------------------
+-  G4HadronicInteractionRegistry - added Clean method
+
+06 February 2009 - V.Ivanchenko (hadr-modman-V09-02-01)
+------------------------------------------------------
+
+23 January 2009 - V.Ivanchenko (hadr-modman-V09-02-00)
+------------------------------------------------------
+-  G4HadronicInteractionRegistry - make it as real singleton
+-  G4HadronicInteraction, G4InelasticInteraction - move constructor, 
+       destructor and some header files from header to source
+
 19 June 2008 - G.Cosmo  (hadr-modman-V09-01-03)
 -----------------------------------------------
 -  included change introduced in hadr-modman-V09-01-01 and
-   discarded by imstake in the last tag ...
+   discarded by mistake in the last tag ...
 
 19 June 2008 - V.Ivanchenko (hadr-modman-V09-01-02)
Index: trunk/source/processes/hadronic/models/management/include/G4HadronicInteraction.hh
===================================================================
--- trunk/source/processes/hadronic/models/management/include/G4HadronicInteraction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/management/include/G4HadronicInteraction.hh	(revision 1055)
@@ -25,23 +25,25 @@
 //
 //
-// $Id: G4HadronicInteraction.hh,v 1.8 2007/01/11 05:30:01 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4HadronicInteraction.hh,v 1.9 2009/01/24 11:56:27 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
- // Hadronic Interaction  abstract base class
- // This class is the base class for the model classes.
- // It sorts out the energy-range for the models and provides
- // class utilities.
- // original by H.P. Wellisch
- // Modified by J.L.Chuma, TRIUMF, 21-Mar-1997
- // Last modified: 3-Apr-1997
- // Added units to energy initialization: J.L. Chuma  04-Apr-97
- // Modified by J.L.Chuma, 05-May-97  to Initialize theBlockedCounter
- // Modified by J.L.Chuma, 08-Jul-97 to implement the Nucleus changes
- // Adding a registry for memory management of hadronic models, HPW 22-Mar-99
+// Hadronic Interaction  abstract base class
+// This class is the base class for the model classes.
+// It sorts out the energy-range for the models and provides
+// class utilities.
+// original by H.P. Wellisch
+// Modified by J.L.Chuma, TRIUMF, 21-Mar-1997
+// Last modified: 3-Apr-1997
+// Added units to energy initialization: J.L. Chuma  04-Apr-97
+// Modified by J.L.Chuma, 05-May-97  to Initialize theBlockedCounter
+// Modified by J.L.Chuma, 08-Jul-97 to implement the Nucleus changes
+// Adding a registry for memory management of hadronic models, HPW 22-Mar-99
+// 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body
+//                          and reorder methods in the header 
 
 // Class Description
 // This is the base class for all hadronic interaction models in geant4.
-// If you want to implement a new way of producing a final state, please inherit
-// from here.
+// If you want to implement a new way of producing a final state, please,
+//  inherit from here.
 // Class Description - End
  
@@ -50,5 +52,4 @@
  
 #include "G4HadFinalState.hh"
-#include "G4DynamicParticle.hh"
 #include "G4ReactionDynamics.hh"
 #include "G4Material.hh"
@@ -56,153 +57,133 @@
 #include "G4Track.hh"
 #include "G4HadProjectile.hh"
-#include "G4HadronicInteractionRegistry.hh"
-#include "G4HadronicException.hh"
 
- class G4HadronicInteraction
- {
- public:
+class G4HadronicInteraction
+{
+public: // With description
+
     
-    G4HadronicInteraction(const G4String& modelName = "HadronicModel") :
-      verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV), 
-      isBlocked(false), theModelName(modelName)
-    { 
-      G4HadronicInteractionRegistry::RegisterMe(this);
-    }
+  G4HadronicInteraction(const G4String& modelName = "HadronicModel");
     
-    virtual ~G4HadronicInteraction()
-    {
-      G4HadronicInteractionRegistry::RemoveMe(this);
-    }
+  virtual ~G4HadronicInteraction();
     
- private:
+  virtual G4HadFinalState *ApplyYourself(const G4HadProjectile &aTrack, 
+					 G4Nucleus & targetNucleus ) = 0;
+  // This is the interface to implement for final state production code.
+   
+  virtual G4bool IsApplicable(const G4HadProjectile &/*aTrack*/, 
+			      G4Nucleus & /*targetNucleus*/)
+  {  return true;}
+ 
+  inline G4double GetMinEnergy() const
+  { return theMinEnergy; }
     
-    inline G4HadronicInteraction(
-     const G4HadronicInteraction &right )
-    { *this = right; }
+  virtual G4double GetMinEnergy( const G4Material *aMaterial,
+				 const G4Element *anElement ) const;
+   
+  inline void SetMinEnergy( const G4double anEnergy )
+  { theMinEnergy = anEnergy; }
     
-    inline const G4HadronicInteraction & operator=(
-     const G4HadronicInteraction &right )
-    { 
-     G4String text = "unintended use of G4HadronicInteraction::operator=";
-     throw G4HadronicException(__FILE__, __LINE__, text); 
-     return right;
-    }
+  virtual void SetMinEnergy( G4double anEnergy, G4Element *anElement );
     
- public:
+  virtual void SetMinEnergy( G4double anEnergy, G4Material *aMaterial );
     
-    inline G4bool operator==(
-     const G4HadronicInteraction &right ) const
-    { return ( this == (G4HadronicInteraction *) &right ); }
+  inline G4double GetMaxEnergy() const
+  { return theMaxEnergy; }
     
-    inline G4bool operator!=(
-     const G4HadronicInteraction &right ) const
-    { return ( this != (G4HadronicInteraction *) &right ); }
+  virtual G4double GetMaxEnergy( const G4Material *aMaterial,
+				 const G4Element *anElement ) const;
     
-    inline G4double GetMinEnergy() const
-    { return theMinEnergy; }
+  inline void SetMaxEnergy( const G4double anEnergy )
+  { theMaxEnergy = anEnergy; }
     
-    virtual G4double GetMinEnergy( const G4Material *aMaterial,
-                                  const G4Element *anElement ) const;
+  virtual void SetMaxEnergy( G4double anEnergy, G4Element *anElement );
     
-    inline void SetMinEnergy( const G4double anEnergy )
-    { theMinEnergy = anEnergy; }
-    
-    virtual void SetMinEnergy( G4double anEnergy, G4Element *anElement );
-    
-    virtual void SetMinEnergy( G4double anEnergy, G4Material *aMaterial );
-    
-    inline G4double GetMaxEnergy() const
-    { return theMaxEnergy; }
-    
-    virtual G4double GetMaxEnergy( const G4Material *aMaterial,
-                                  const G4Element *anElement ) const;
-    
-    inline void SetMaxEnergy( const G4double anEnergy )
-    { theMaxEnergy = anEnergy; }
-    
-    virtual void SetMaxEnergy( G4double anEnergy, G4Element *anElement );
-    
-    virtual void SetMaxEnergy( G4double anEnergy, G4Material *aMaterial );
+  virtual void SetMaxEnergy( G4double anEnergy, G4Material *aMaterial );
   
-    inline const G4HadronicInteraction *GetMyPointer() const
-    { return this; }
+  inline const G4HadronicInteraction *GetMyPointer() const
+  { return this; }
 
-    inline G4int GetVerboseLevel() const
-    { return verboseLevel; }
+  inline G4int GetVerboseLevel() const
+  { return verboseLevel; }
 
-    inline void SetVerboseLevel( G4int value )
-    { verboseLevel = value; }
+  inline void SetVerboseLevel( G4int value )
+  { verboseLevel = value; }
 
-    inline const G4String& GetModelName() const
-    { return theModelName; }
-
-public: // With description
-    // This is the interface to implement for final state production code.
-    
-    virtual G4HadFinalState *ApplyYourself(
-            const G4HadProjectile &aTrack, G4Nucleus & targetNucleus ) = 0;
+  inline const G4String& GetModelName() const
+  { return theModelName; }
     
 public: // Without description
 
-    virtual void DeActivateFor( G4Material *aMaterial );
+  virtual void DeActivateFor( G4Material *aMaterial );
     
-    virtual void ActivateFor( G4Material *aMaterial ) 
-    { 
-      Block(); 
-      SetMaxEnergy(GetMaxEnergy(), aMaterial);
-      SetMinEnergy(GetMinEnergy(), aMaterial);
-    }
+  virtual void ActivateFor( G4Material *aMaterial ) 
+  { 
+    Block(); 
+    SetMaxEnergy(GetMaxEnergy(), aMaterial);
+    SetMinEnergy(GetMinEnergy(), aMaterial);
+  }
 
-    virtual void DeActivateFor( G4Element *anElement ); 
-    virtual void ActivateFor( G4Element *anElement )
-    { 
-      Block(); 
-      SetMaxEnergy(GetMaxEnergy(), anElement);
-      SetMinEnergy(GetMinEnergy(), anElement);
-    }
+  virtual void DeActivateFor( G4Element *anElement ); 
+  virtual void ActivateFor( G4Element *anElement )
+  { 
+    Block(); 
+    SetMaxEnergy(GetMaxEnergy(), anElement);
+    SetMinEnergy(GetMinEnergy(), anElement);
+  }
 
-    virtual G4bool IsBlocked( const G4Material *aMaterial ) const;
+  virtual G4bool IsBlocked( const G4Material *aMaterial ) const;
 
-    virtual G4bool IsBlocked( const G4Element *anElement) const;
+  virtual G4bool IsBlocked( const G4Element *anElement) const;
+
+  inline G4bool operator==(const G4HadronicInteraction &right ) const
+  { return ( this == (G4HadronicInteraction *) &right ); }
     
-    virtual G4bool IsApplicable(const G4HadProjectile &/*aTrack*/, 
-                               G4Nucleus & /*targetNucleus*/){  return true;}
- protected:
+  inline G4bool operator!=(const G4HadronicInteraction &right ) const
+  { return ( this != (G4HadronicInteraction *) &right ); }
     
-    G4HadFinalState theParticleChange;
-    // the G4HadFinalState object which is modified and returned
-    // by address by the ApplyYourself method,
-    // (instead of aParticleChange as found in G4VProcess)
+private:
     
-    G4int verboseLevel;
-    // control flag for output messages
-    // 0: silent
-    // 1: warning messages
-    // 2: more
-    // (instead of verboseLevel as found in G4VProcess)
+  G4HadronicInteraction(const G4HadronicInteraction &right );
     
-    G4ReactionDynamics theReactionDynamics;
+  const G4HadronicInteraction& operator=(const G4HadronicInteraction &right);
+
+protected:
+
+  inline G4bool IsBlocked() const { return isBlocked;}
+  inline void Block() { isBlocked = true; }
     
-    // these two have global validity
-    // units are assumed to be MeV
+  G4HadFinalState theParticleChange;
+  // the G4HadFinalState object which is modified and returned
+  // by address by the ApplyYourself method,
+  // (instead of aParticleChange as found in G4VProcess)
     
-    G4double theMinEnergy;
-    G4double theMaxEnergy;
+  G4int verboseLevel;
+  // control flag for output messages
+  // 0: silent
+  // 1: warning messages
+  // 2: more
+  // (instead of verboseLevel as found in G4VProcess)
     
-    G4bool IsBlocked() const { return isBlocked;}
-    void Block() { isBlocked = true; }
-    G4bool isBlocked;
+  G4ReactionDynamics theReactionDynamics;
+    
+  // these two have global validity
+  // units are assumed to be MeV
+    
+  G4double theMinEnergy;
+  G4double theMaxEnergy;
+    
+  G4bool isBlocked;
 
-    G4String theModelName;
+  G4String theModelName;
     
- private:
+private:
         
-    std::vector<std::pair<G4double, G4Material *> > theMinEnergyList;
-    std::vector<std::pair<G4double, G4Material *> > theMaxEnergyList;
-    std::vector<std::pair<G4double, G4Element *> > theMinEnergyListElements;
-    std::vector<std::pair<G4double, G4Element *> > theMaxEnergyListElements;
-    std::vector<G4Material *> theBlockedList;
-    std::vector<G4Element *> theBlockedListElements;
- };
+   std::vector<std::pair<G4double, G4Material *> > theMinEnergyList;
+   std::vector<std::pair<G4double, G4Material *> > theMaxEnergyList;
+   std::vector<std::pair<G4double, G4Element *> > theMinEnergyListElements;
+   std::vector<std::pair<G4double, G4Element *> > theMaxEnergyListElements;
+   std::vector<G4Material *> theBlockedList;
+   std::vector<G4Element *> theBlockedListElements;
+};
  
 #endif
Index: trunk/source/processes/hadronic/models/management/include/G4HadronicInteractionRegistry.hh
===================================================================
--- trunk/source/processes/hadronic/models/management/include/G4HadronicInteractionRegistry.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/management/include/G4HadronicInteractionRegistry.hh	(revision 1055)
@@ -24,4 +24,13 @@
 // ********************************************************************
 //
+// $Id: G4HadronicInteractionRegistry.hh,v 1.4 2009/02/14 19:24:52 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// 23-Jan-2009 V.Ivanchenko make the class to be a singleton
+
+// Class Description
+// This is the a singleton class to store all hadronic interactions
+// Class Description - End
+
 #ifndef G4HadronicInteractionRegistry_h
 #define G4HadronicInteractionRegistry_h 1
@@ -29,32 +38,30 @@
 #include <vector>
 #include "globals.hh"
+
 class G4HadronicInteraction;
 
 class G4HadronicInteractionRegistry
 {
-  public:
+public:
+
+  static G4HadronicInteractionRegistry* Instance();
+  // access 
   
   ~G4HadronicInteractionRegistry();
+
+  void Clean();
+  //delete models
   
-  static void RegisterMe(G4HadronicInteraction * aModel);
-  static void RemoveMe(G4HadronicInteraction * aModel);
+  void RegisterMe(G4HadronicInteraction * aModel);
+  //register new model
+
+  void RemoveMe(G4HadronicInteraction * aModel);
+  //deregister model
     
-  protected:
+private:
 
-  G4HadronicInteractionRegistry(G4String );
-  static G4HadronicInteractionRegistry & theRegistry();
+  G4HadronicInteractionRegistry();
 
-  private:
-
-  //  !!!  can not use "copy constructor" nor "default constructor" !!!!
-       G4HadronicInteractionRegistry(const G4HadronicInteractionRegistry &right) 
-       { nModels = right.nModels; }
-       G4HadronicInteractionRegistry() {nModels = 0;}
-
-  //  !!!  Assignment operation is forbidden !!!
-      const G4HadronicInteractionRegistry & operator=(const G4HadronicInteractionRegistry &) 
-      { return *this;}
-
-  void AddModel(G4HadronicInteraction * aModel);
+  static G4HadronicInteractionRegistry* theInstance;
   
   G4int nModels;
Index: trunk/source/processes/hadronic/models/management/include/G4InelasticInteraction.hh
===================================================================
--- trunk/source/processes/hadronic/models/management/include/G4InelasticInteraction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/management/include/G4InelasticInteraction.hh	(revision 1055)
@@ -25,20 +25,21 @@
 //
 //
-// $Id: G4InelasticInteraction.hh,v 1.5 2007/01/11 05:30:12 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4InelasticInteraction.hh,v 1.6 2009/01/24 11:56:27 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
- // Hadronic Process: Inelastic Interaction 
- // This class is an abstract base class, since the pure virtual
- // function ApplyYourself has not been defined yet.
- // original by H.P. Wellisch
- // Modified by J.L. Chuma, TRIUMF, 22-Nov-1996
- // Modified by J.L. Chuma  27-Mar-1997
- // Modified by J.L. Chuma  30-Apr-1997
- // Modified by J.L. Chuma  05-Aug-1997  to pass the original incident particle to
- //                                      CalculateMomenta
- // Modified by J.L. Chuma  05-Jun-1998  to include quasiElastic flag to allow for
- //                                      TwoBody to be called directly, bypassing
- //                                      TwoCluster, and allowing TwoCluster to be
- //                                      called with no secondaries
+// Hadronic Process: Inelastic Interaction 
+// This class is an abstract base class, since the pure virtual
+// function ApplyYourself has not been defined yet.
+// original by H.P. Wellisch
+// Modified by J.L. Chuma, TRIUMF, 22-Nov-1996
+// Modified by J.L. Chuma  27-Mar-1997
+// Modified by J.L. Chuma  30-Apr-1997
+// Modified by J.L. Chuma  05-Aug-1997  to pass the original incident particle to
+//                                      CalculateMomenta
+// Modified by J.L. Chuma  05-Jun-1998  to include quasiElastic flag to allow for
+//                                      TwoBody to be called directly, bypassing
+//                                      TwoCluster, and allowing TwoCluster to be
+//                                      called with no secondaries
+// 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body
  
 #ifndef G4InelasticInteraction_h
@@ -53,16 +54,13 @@
 #include "G4ReactionDynamics.hh"
 
- class G4InelasticInteraction : public G4HadronicInteraction
- {
- public:
+class G4InelasticInteraction : public G4HadronicInteraction
+{
+public:
     
-    G4InelasticInteraction(const G4String& modelName = "LEInelastic") 
-     : G4HadronicInteraction(modelName)
-    { cache = 0.0;}
+    G4InelasticInteraction(const G4String& modelName = "LEInelastic"); 
     
-    virtual ~G4InelasticInteraction()
-    { }
+    virtual ~G4InelasticInteraction();
     
- protected:
+protected:
     
     G4double Pmltpc( G4int np, G4int nm, G4int nz, G4int n,
@@ -100,10 +98,10 @@
                       G4ReactionProduct &targetParticle,
                       G4bool &incidentHasChanged );
-   private:
+private:
    
       G4double cache;
       G4ThreeVector what;
 
- };
+};
  
 #endif
Index: trunk/source/processes/hadronic/models/management/src/G4HadronicInteraction.cc
===================================================================
--- trunk/source/processes/hadronic/models/management/src/G4HadronicInteraction.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/management/src/G4HadronicInteraction.cc	(revision 1055)
@@ -24,27 +24,45 @@
 // ********************************************************************
 //
+// $Id: G4HadronicInteraction.cc,v 1.4 2009/01/24 11:56:27 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
- // Hadronic Interaction  base class
- // original by H.P. Wellisch
- // modified by J.L. Chuma, TRIUMF, 21-Mar-1997
- // Last modified: 04-Apr-1997
- // reimplemented 1.11.2003 JPW.
- 
+// Hadronic Interaction  base class
+// original by H.P. Wellisch
+// modified by J.L. Chuma, TRIUMF, 21-Mar-1997
+// Last modified: 04-Apr-1997
+// reimplemented 1.11.2003 JPW.
+// 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body
+
 #include "G4HadronicInteraction.hh"
- 
- G4double
-  G4HadronicInteraction::GetMinEnergy(
+#include "G4HadronicInteractionRegistry.hh"
+#include "G4HadronicException.hh"
+
+G4HadronicInteraction::G4HadronicInteraction(const G4String& modelName) :
+  verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV), 
+  isBlocked(false), theModelName(modelName)
+{ 
+  G4HadronicInteractionRegistry::Instance()->RegisterMe(this);
+}
+    
+G4HadronicInteraction::~G4HadronicInteraction()
+{
+  G4HadronicInteractionRegistry::Instance()->RemoveMe(this);
+}
+ 
+G4double G4HadronicInteraction::GetMinEnergy(
    const G4Material *aMaterial, const G4Element *anElement ) const
-  {
-    size_t i;
-    if( IsBlocked(aMaterial) )return 0.*GeV;
-    if( IsBlocked(anElement) )return 0.*GeV;
-    for( i=0; i<theMinEnergyListElements.size(); ++i )
-    {
-      if( anElement == theMinEnergyListElements[i].second )return theMinEnergyListElements[i].first;
+{
+  size_t i;
+  if( IsBlocked(aMaterial) )return 0.*GeV;
+  if( IsBlocked(anElement) )return 0.*GeV;
+  for( i=0; i<theMinEnergyListElements.size(); ++i )
+    {
+      if( anElement == theMinEnergyListElements[i].second )
+	return theMinEnergyListElements[i].first;
     }
     for( i=0; i<theMinEnergyList.size(); ++i )
     {
-      if( aMaterial == theMinEnergyList[i].second )return theMinEnergyList[i].first;
+      if( aMaterial == theMinEnergyList[i].second )
+	return theMinEnergyList[i].first;
     }
     if(IsBlocked()) return 0.*GeV;
@@ -54,17 +72,15 @@
            << " not found in min energy List" << G4endl;
     return theMinEnergy;
-  }
- 
- void
-  G4HadronicInteraction::SetMinEnergy(
-   G4double anEnergy,
-   G4Element *anElement )
-  {
-    if( IsBlocked(anElement) )
-      G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl
+}
+ 
+void G4HadronicInteraction::SetMinEnergy(G4double anEnergy,
+					 G4Element *anElement )
+{
+  if( IsBlocked(anElement) )
+    G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl
            << "    The model is not active for the Element  "
            << anElement->GetName() << "." << G4endl;
     
-    for( size_t i=0; i<theMinEnergyListElements.size(); ++i )
+  for( size_t i=0; i<theMinEnergyListElements.size(); ++i )
     {
       if( anElement == theMinEnergyListElements[i].second )
@@ -74,63 +90,60 @@
       }
     }
-    theMinEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement));
-  }
- 
- void
-  G4HadronicInteraction::SetMinEnergy(
-   G4double anEnergy,
-   G4Material *aMaterial )
-  {
-    if( IsBlocked(aMaterial) )
-      G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl
+  theMinEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement));
+}
+ 
+void G4HadronicInteraction::SetMinEnergy(G4double anEnergy,
+					 G4Material *aMaterial )
+{
+  if( IsBlocked(aMaterial) )
+    G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl
            << "    The model is not active for the Material "
            << aMaterial->GetName() << "." << G4endl;
     
-    for( size_t i=0; i<theMinEnergyList.size(); ++i )
+  for( size_t i=0; i<theMinEnergyList.size(); ++i )
     {
       if( aMaterial == theMinEnergyList[i].second )
-      {
-        theMinEnergyList[i].first = anEnergy;
-        return;
-      }
-    }
-    theMinEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));
-  }
- 
- G4double
-  G4HadronicInteraction::GetMaxEnergy(
-   const G4Material *aMaterial, const G4Element *anElement ) const
-  {
-    size_t i;
-    if( IsBlocked(aMaterial) )return 0.0*GeV;
-    if( IsBlocked(anElement) )return 0.0*GeV;
-    for( i=0; i<theMaxEnergyListElements.size(); ++i )
-    {
-      if( anElement == theMaxEnergyListElements[i].second )return theMaxEnergyListElements[i].first;
+	{
+	  theMinEnergyList[i].first = anEnergy;
+	  return;
+	}
+    }
+  theMinEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));
+}
+ 
+G4double G4HadronicInteraction::GetMaxEnergy(const G4Material *aMaterial, 
+					     const G4Element *anElement ) const
+{
+  size_t i;
+  if( IsBlocked(aMaterial) )return 0.0*GeV;
+  if( IsBlocked(anElement) )return 0.0*GeV;
+  for( i=0; i<theMaxEnergyListElements.size(); ++i )
+    {
+      if( anElement == theMaxEnergyListElements[i].second )
+	return theMaxEnergyListElements[i].first;
     }
     for( i=0; i<theMaxEnergyList.size(); ++i )
     {
-      if( aMaterial == theMaxEnergyList[i].second )return theMaxEnergyList[i].first;
+      if( aMaterial == theMaxEnergyList[i].second )
+	return theMaxEnergyList[i].first;
     }
     if(IsBlocked()) return 0.*GeV;
     if( verboseLevel > 0 )
       G4cout << "*** Warning from HadronicInteraction::GetMaxEnergy" << G4endl
-           << "    material " << aMaterial->GetName()
-           << " not found in min energy List" << G4endl;
+	     << "    material " << aMaterial->GetName()
+	     << " not found in min energy List" << G4endl;
     
     return theMaxEnergy;
-  }
- 
- void
-  G4HadronicInteraction::SetMaxEnergy(
-   G4double anEnergy,
-   G4Element *anElement ) 
-  {
-    if( IsBlocked(anElement) )
-      G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl
+}
+ 
+void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy,
+					 G4Element *anElement ) 
+{
+  if( IsBlocked(anElement) )
+    G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl
            << "Warning: The model is not active for the Element  "
            << anElement->GetName() << "." << G4endl;
     
-    for( size_t i=0; i<theMaxEnergyListElements.size(); ++i )
+  for( size_t i=0; i<theMaxEnergyListElements.size(); ++i )
     {
       if( anElement == theMaxEnergyListElements[i].second )
@@ -140,66 +153,73 @@
       }
     }
-    theMaxEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement));
-  }
-
- void
-  G4HadronicInteraction::SetMaxEnergy(
-   G4double anEnergy,
-   G4Material *aMaterial )
-  {
-    if( IsBlocked(aMaterial) ) 
-      G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl
+  theMaxEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement));
+}
+
+void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy,
+					 G4Material *aMaterial )
+{
+  if( IsBlocked(aMaterial) ) 
+    G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl
            << "Warning: The model is not active for the Material "
            << aMaterial->GetName() << "." << G4endl;
     
-    for( size_t i=0; i<theMaxEnergyList.size(); ++i )
+  for( size_t i=0; i<theMaxEnergyList.size(); ++i )
     {
       if( aMaterial == theMaxEnergyList[i].second )
-      {
+	{
         theMaxEnergyList[i].first = anEnergy;
         return;
-      }
-    }
-    theMaxEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));
-  }
-
- void 
-  G4HadronicInteraction::DeActivateFor( G4Material *aMaterial )
-  {
-    theBlockedList.push_back(aMaterial);
-  }
-
- void 
-  G4HadronicInteraction::DeActivateFor( G4Element *anElement )
-  {
-    theBlockedListElements.push_back(anElement);
-  }
-
- G4bool 
-  G4HadronicInteraction::IsBlocked( const G4Material *aMaterial ) const
-  {
-    for( size_t i=0; i<theBlockedList.size(); ++i )
+	}
+    }
+  theMaxEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));
+}
+
+void G4HadronicInteraction::DeActivateFor( G4Material *aMaterial )
+{
+  theBlockedList.push_back(aMaterial);
+}
+
+void G4HadronicInteraction::DeActivateFor( G4Element *anElement )
+{
+  theBlockedListElements.push_back(anElement);
+}
+
+G4bool G4HadronicInteraction::IsBlocked( const G4Material *aMaterial ) const
+{
+  for( size_t i=0; i<theBlockedList.size(); ++i )
     {
       if( aMaterial == theBlockedList[i] )
-      {
-        return true;
-      }
-    }
-    return false;
-  }
- 
- G4bool 
-  G4HadronicInteraction::IsBlocked( const G4Element *anElement ) const
-  {
-    for( size_t i=0; i<theBlockedListElements.size(); ++i )
+	{
+	  return true;
+	}
+    }
+  return false;
+}
+ 
+G4bool G4HadronicInteraction::IsBlocked( const G4Element *anElement ) const
+{
+  for( size_t i=0; i<theBlockedListElements.size(); ++i )
     {
       if( anElement == theBlockedListElements[i] )
-      {
-        return true;
-      }
-    }
-    return false;
-  }
- 
- /* end of file */
- 
+	{
+	  return true;
+	}
+    }
+  return false;
+}
+
+G4HadronicInteraction::G4HadronicInteraction(const G4HadronicInteraction &right )
+{ 
+  *this = right; 
+}
+    
+const G4HadronicInteraction& 
+G4HadronicInteraction::operator=(const G4HadronicInteraction &right )
+{ 
+  G4String text = "unintended use of G4HadronicInteraction::operator=";
+  throw G4HadronicException(__FILE__, __LINE__, text); 
+  return right;
+}
+ 
+/* end of file */
+ 
Index: trunk/source/processes/hadronic/models/management/src/G4HadronicInteractionRegistry.cc
===================================================================
--- trunk/source/processes/hadronic/models/management/src/G4HadronicInteractionRegistry.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/management/src/G4HadronicInteractionRegistry.cc	(revision 1055)
@@ -24,11 +24,48 @@
 // ********************************************************************
 //
+// $Id: G4HadronicInteractionRegistry.cc,v 1.7 2009/02/25 16:30:18 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// 23-Jan-2009 V.Ivanchenko make the class to be a singleton
+
 #include "G4HadronicInteractionRegistry.hh"
 #include "G4HadronicInteraction.hh"
 
-G4HadronicInteractionRegistry & G4HadronicInteractionRegistry::theRegistry()
+G4HadronicInteractionRegistry* G4HadronicInteractionRegistry::theInstance = 0;
+
+G4HadronicInteractionRegistry* G4HadronicInteractionRegistry::Instance()
 {
-  static G4HadronicInteractionRegistry theRegistryInstance;
-  return theRegistryInstance;
+  if(0 == theInstance) {
+    static G4HadronicInteractionRegistry manager;
+    theInstance = &manager;
+  }
+  return theInstance;
+}
+
+G4HadronicInteractionRegistry::G4HadronicInteractionRegistry()
+{
+  nModels = 0;
+}
+
+G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry()
+{
+  Clean();
+}
+
+void G4HadronicInteractionRegistry::Clean()
+{
+  //G4cout << "G4HadronicInteractionRegistry::Clean() start " << nModels << G4endl;
+  if(0 < nModels) {
+    for (G4int i=0; i<nModels; i++) {
+      if( allModels[i] ) {
+	//G4cout << "delete " << i << G4endl;
+        //G4cout << allModels[i]->GetModelName() << G4endl;
+	delete allModels[i];
+	allModels[i] = 0;
+      }
+    }
+  }
+  //G4cout << "G4HadronicInteractionRegistry::Clean() is done " << G4endl; 
+  nModels = 0;
 }
 
@@ -36,5 +73,13 @@
 RegisterMe(G4HadronicInteraction * aModel)
 {
-  theRegistry().AddModel(aModel);
+  if(nModels > 0) {
+    for (G4int i=0; i<nModels; i++) {
+      if( aModel == allModels[i] ) return;
+    }
+  }
+  //G4cout << "Register model <" << aModel->GetModelName() 
+  //<< ">  " << nModels << G4endl;
+  allModels.push_back(aModel);
+  nModels++;
 }
 
@@ -42,35 +87,13 @@
 RemoveMe(G4HadronicInteraction * aModel)
 {
-  theRegistry().allModels.erase(std::find(theRegistry().allModels.begin(),
-                                          theRegistry().allModels.end(), aModel));
-  theRegistry().nModels = theRegistry().allModels.size();
-}
-
-G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry()
-{
-  /*
-  while(allModels.size()!=0)
-  {
-    delete allModels.front();
-  }
-  */
-}
-
-void G4HadronicInteractionRegistry::
-AddModel(G4HadronicInteraction * aModel)
-{
-  G4bool alreadyThere = false;
-  for(G4int i=0; i<nModels; i++)
-  {
-    if(allModels[i]==aModel)
-    {
-      alreadyThere = true;
-      break;
+  if(nModels > 0) {
+    for (G4int i=0; i<nModels; i++) {
+      if( aModel == allModels[i] ) {
+	//G4cout << "DeRegister model <" << aModel->GetModelName() 
+	//<< ">  " << i << G4endl;
+	allModels[i] = 0;
+	return;
+      }
     }
   }
-  if(!alreadyThere)
-  {
-    nModels++;
-    allModels.push_back(aModel);
-  }
 }
Index: trunk/source/processes/hadronic/models/management/src/G4InelasticInteraction.cc
===================================================================
--- trunk/source/processes/hadronic/models/management/src/G4InelasticInteraction.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/management/src/G4InelasticInteraction.cc	(revision 1055)
@@ -24,26 +24,35 @@
 // ********************************************************************
 //
+// $Id: G4InelasticInteraction.cc,v 1.12 2009/01/24 11:56:27 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
-//
- // Hadronic Process: Inelastic Interaction 
- // original by H.P. Wellisch
- // modified by J.L. Chuma, TRIUMF, 22-Nov-1996
- // Last modified: 27-Mar-1997
- // J.P. Wellisch: 23-Apr-97: throw G4HadronicException(__FILE__, __LINE__,  removed
- // J.P. Wellisch: 24-Apr-97: correction for SetUpPions
- // Modified by J.L. Chuma, 30-Apr-97: added originalTarget to CalculateMomenta
- //                                    since TwoBody needed to reset the target particle
- // J.L. Chuma, 20-Jun-97: Modified CalculateMomenta to correct the decision process
- //                        for whether to use GenerateXandPt or TwoCluster
- // J.L. Chuma, 06-Aug-97: added original incident particle, before Fermi motion and
- //                        evaporation effects are included, needed for calculating
- //                        self absorption and corrections for single particle spectra
- // HPW removed misunderstanding of LocalEnergyDeposit, 11.04.98.
+// Hadronic Process: Inelastic Interaction 
+// original by H.P. Wellisch
+// modified by J.L. Chuma, TRIUMF, 22-Nov-1996
+// Last modified: 27-Mar-1997
+// J.P. Wellisch: 23-Apr-97: throw G4HadronicException(__FILE__, __LINE__,  removed
+// J.P. Wellisch: 24-Apr-97: correction for SetUpPions
+// Modified by J.L. Chuma, 30-Apr-97: added originalTarget to CalculateMomenta
+//                                    since TwoBody needed to reset the target particle
+// J.L. Chuma, 20-Jun-97: Modified CalculateMomenta to correct the decision process
+//                        for whether to use GenerateXandPt or TwoCluster
+// J.L. Chuma, 06-Aug-97: added original incident particle, before Fermi motion and
+//                        evaporation effects are included, needed for calculating
+//                        self absorption and corrections for single particle spectra
+// HPW removed misunderstanding of LocalEnergyDeposit, 11.04.98.
+// 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body
  
 #include "G4InelasticInteraction.hh"
 #include "Randomize.hh"
 #include "G4HadReentrentException.hh"
- 
- G4double
+
+G4InelasticInteraction::G4InelasticInteraction(const G4String& modelName) 
+  : G4HadronicInteraction(modelName)
+{ cache = 0.0;}
+    
+G4InelasticInteraction::~G4InelasticInteraction()
+{}
+ 
+G4double
   G4InelasticInteraction::Pmltpc(      // used in Cascade functions
    G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c )
@@ -63,5 +72,5 @@
   }
 
- G4bool
+G4bool
   G4InelasticInteraction::MarkLeadingStrangeParticle(
    const G4ReactionProduct &currentParticle,
@@ -92,5 +101,5 @@
   }
  
- void
+void
   G4InelasticInteraction::SetUpPions(
    const G4int np,
@@ -126,5 +135,5 @@
   }
  
- void
+void
   G4InelasticInteraction::GetNormalizationConstant(
    const G4double energy,  // MeV,  <0 means annihilation channels
@@ -170,5 +179,5 @@
   }
  
- void
+void
   G4InelasticInteraction::CalculateMomenta(
    G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
@@ -344,5 +353,5 @@
 
  
- void G4InelasticInteraction::
+void G4InelasticInteraction::
  Rotate(G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec, G4int &vecLen)
  {
@@ -358,5 +367,5 @@
  }      
 
- void
+void
   G4InelasticInteraction::SetUpChange(
    G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
Index: trunk/source/processes/hadronic/models/neutron_hp/History
===================================================================
--- trunk/source/processes/hadronic/models/neutron_hp/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/neutron_hp/History	(revision 1055)
@@ -14,4 +14,9 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+14 May 2009  Tatsumi Koi  (hadr-hpn-V09-02-00)
+- Fix bug in IC electron emissions: Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu)
+	G4NeutronHPPhotonDist.cc
+	G4NeutronHPInelasticCompFS.cc
 
 3 December 2008  Tatsumi Koi  (hadr-hpn-V09-01-28)
Index: trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc
===================================================================
--- trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc	(revision 1055)
@@ -36,4 +36,6 @@
 //        introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
+// 090514 Fix bug in IC electron emission case 
+//        Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu)
 //
 #include "G4NeutronHPInelasticCompFS.hh"
@@ -69,4 +71,5 @@
 void G4NeutronHPInelasticCompFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
 {
+
   gammaPath = "/Inelastic/Gammas/";
     if(!getenv("G4NEUTRONHPDATA")) 
@@ -460,5 +463,5 @@
 
       aHadron.SetMomentum( Vector*p ); 
-                                      
+
     }
 
@@ -577,5 +580,8 @@
       {
         theSec = new G4DynamicParticle;    
-        theSec->SetDefinition(G4Gamma::Gamma());
+        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 
+        //theSec->SetDefinition(G4Gamma::Gamma());
+        theSec->SetDefinition( thePhotons->operator[](i)->GetDefinition() );
+        //But never cause real effect at least with G4NDL3.13 TK
         theSec->SetMomentum(thePhotons->operator[](i)->GetMomentum());
         theResult.AddSecondary(theSec); 
Index: trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPPhotonDist.cc
===================================================================
--- trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPPhotonDist.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPPhotonDist.cc	(revision 1055)
@@ -36,4 +36,7 @@
 // 080801 Correcting data disorder which happened when both InitPartial 
 //        and InitAnglurar methods was called in a same instance by T. Koi
+// 090514 Fix bug in IC electron emission case 
+//        Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu)
+//        But it looks like never cause real effect in G4NDL3.13 (at least Natural elements) TK
 //
 // there is a lot of unused (and undebugged) code in this file. Kept for the moment just in case. @@
@@ -48,7 +51,9 @@
 G4bool G4NeutronHPPhotonDist::InitMean(std::ifstream & aDataFile)
 {
+
   G4bool result = true;
   if(aDataFile >> repFlag)
   {
+
     aDataFile >> targetMass;
     if(repFlag==1)
@@ -73,4 +78,5 @@
        theBaseEnergy*=eV;
        aDataFile >> theInternalConversionFlag;
+       // theInternalConversionFlag == 1 No IC, theInternalConversionFlag == 2 with IC 
        aDataFile >> nGammaEnergies;
        theLevelEnergies = new G4double[nGammaEnergies];
@@ -118,4 +124,5 @@
   if (isoFlag != 1)
   {
+if ( repFlag == 2 ) G4cout << "TKDB repFlag == 2 && isoFlag !=1  " << G4endl;
     aDataFile >> tabulationType >> nDiscrete2 >> nIso;
 //080731
@@ -547,7 +554,10 @@
     {
       theOne->SetDefinition(G4Electron::Electron());
+      //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 
+      //But never enter at least with G4NDL3.13
+      totalEnergy += G4Electron::Electron()->GetPDGMass(); //proposed correction: add this line for electron
     }
     theOne->SetTotalEnergy(totalEnergy);
-    if( isoFlag == 1)
+    if( isoFlag == 1 )
     {
       G4double costheta = 2.*G4UniformRand()-1;
@@ -555,5 +565,8 @@
       G4double phi = twopi*G4UniformRand();
       G4double sinth = std::sin(theta);
-      G4double en = theOne->GetTotalEnergy();
+      //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 
+      //G4double en = theOne->GetTotalEnergy();
+      G4double en = theOne->GetTotalMomentum();
+      //But never cause real effect at least with G4NDL3.13 TK
       G4ThreeVector temp(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
       theOne->SetMomentum( temp ) ;
@@ -569,9 +582,15 @@
       if(ii<nIso)
       {
+        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 
         // isotropic distribution
-        G4double theta = pi*G4UniformRand();
+        //G4double theta = pi*G4UniformRand();
+        G4double theta = std::acos(2.*G4UniformRand()-1.);
+        //But this is alos never cause real effect at least with G4NDL3.13 TK  not repFlag == 2 AND isoFlag != 1
         G4double phi = twopi*G4UniformRand();
         G4double sinth = std::sin(theta);
-        G4double en = theOne->GetTotalEnergy();
+        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 
+        //G4double en = theOne->GetTotalEnergy();
+        G4double en = theOne->GetTotalMomentum();
+        //But never cause real effect at least with G4NDL3.13 TK
         G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
         theOne->SetMomentum( tempVector ) ;
@@ -594,5 +613,8 @@
         G4double phi = twopi*G4UniformRand();
         G4double sinth = std::sin(theta);
-        G4double en = theOne->GetTotalEnergy();
+        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 
+        //G4double en = theOne->GetTotalEnergy();
+        G4double en = theOne->GetTotalMomentum();
+        //But never cause real effect at least with G4NDL3.13 TK
         G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
         theOne->SetMomentum( tempVector ) ;
@@ -612,5 +634,8 @@
         G4double phi = twopi*G4UniformRand();
         G4double sinth = std::sin(theta);
-        G4double en = theOne->GetTotalEnergy();
+        //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 
+        //G4double en = theOne->GetTotalEnergy();
+        G4double en = theOne->GetTotalMomentum();
+        //But never cause real effect at least with G4NDL3.13 TK
         G4ThreeVector tmpVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*costh );
         theOne->SetMomentum( tmpVector ) ;
Index: trunk/source/processes/hadronic/models/parton_string/hadronization/History
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/hadronization/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/hadronization/History	(revision 1055)
@@ -1,3 +1,3 @@
-$Id: History,v 1.5 2007/05/03 22:10:54 gunter Exp $
+$Id: History,v 1.7 2009/05/22 16:36:52 gunter Exp $
 -------------------------------------------------------------------
 
@@ -16,4 +16,18 @@
      ---------------------------------------------------------------
 
+22-May-2009   Gunter Folger             (had-hadronization-V09-02-01)
+- remove temporary workaround - fix is now in QGS
+- change pt sampling in G4LundStringFragmentation to avoid near endless
+  loop; this should improve overall performance slightly.
+  Affected G4VLongitudinalStringDecay, where SampleQuarkPt() is 
+  implemented; affected .hh and .cc for new optional argument of max Pt 
+  to SampleQuarkPt()
+
+18-May-2009   Gunter Folger             (had-hadronization-V09-02-00)
+---------------------------------------------------------------------
+- reset formatting changes by MK with tags hadr-prtn-hadr-V09-02-xx
+- temporary workaround for wrong PDG codes created on wrong input from QGS 
+   when used for e.g. antiproton.
+   
 2-May 2007    Gunter Folger             (had-hadronization-V08-02-03)
 ---------------------------------------------------------------------
Index: trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4HadronBuilder.hh
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4HadronBuilder.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4HadronBuilder.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HadronBuilder.hh,v 1.3 2006/06/29 20:54:46 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4HadronBuilder.hh,v 1.5 2009/05/18 09:43:40 gunter Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -----------------------------------------------------------------------------
Index: trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4VLongitudinalStringDecay.hh
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4VLongitudinalStringDecay.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4VLongitudinalStringDecay.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VLongitudinalStringDecay.hh,v 1.6 2008/06/23 08:35:54 vuzhinsk Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VLongitudinalStringDecay.hh,v 1.7 2009/05/22 16:35:47 gunter Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 // Maxim Komogorov
 //
@@ -116,5 +116,5 @@
 //   used by G4VKinkyStringDecy..
    G4int SampleQuarkFlavor(void);
-   G4ThreeVector SampleQuarkPt();
+   G4ThreeVector SampleQuarkPt(G4double ptMax=-1.); // -1. no limit on maxpt.
 
 protected:
Index: trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4ExcitedStringDecay.cc
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4ExcitedStringDecay.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4ExcitedStringDecay.cc	(revision 1055)
@@ -134,5 +134,5 @@
       }
     }
-    
+#ifdef debug_G4ExcitedStringDecay     
     if(!success)
     {
@@ -144,5 +144,5 @@
 //       throw G4HadronicException(__FILE__, __LINE__, "G4ExcitedStringDecay failed to correct...");
     }
-
+#endif     
     // Compute c.m.s. interaction velocity and KTV back boost   
     Beta = TotalCollisionMom.boostVector();
Index: trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4HadronBuilder.cc
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4HadronBuilder.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4HadronBuilder.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HadronBuilder.cc,v 1.7 2008/04/25 14:20:14 vuzhinsk Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4HadronBuilder.cc,v 1.10 2009/05/22 16:34:31 gunter Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -----------------------------------------------------------------------------
@@ -147,5 +147,5 @@
 	   if( (IsUp && IsAnti ) || (!IsUp && !IsAnti ) ) 
 	      PDGEncoding = - PDGEncoding;
-	}
+ 	}
 	   
 	   
Index: trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4LundStringFragmentation.cc
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4LundStringFragmentation.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4LundStringFragmentation.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4LundStringFragmentation.cc,v 1.13 2008/06/23 09:17:10 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-02 $ 1.8
+// $Id: G4LundStringFragmentation.cc,v 1.14 2009/05/22 16:36:46 gunter Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 1.8
 //
 // -----------------------------------------------------------------------------
@@ -508,6 +508,20 @@
    {
       do                                                                      
-      {                                                                     
-         Pt=SampleQuarkPt(); Pt.setZ(0); G4double Pt2=Pt.mag2();              
+      {  
+         // GF 22-May-09, limit sampled pt to allowed range
+         
+	 G4double termD = InitialMass*InitialMass -Mass*Mass - AntiMass*AntiMass;
+	 G4double termab = 4*sqr(Mass*AntiMass);
+	 G4double termN = 2*termD + 4*Mass*Mass + 4*AntiMass*AntiMass;
+	 G4double pt2max=(termD*termD - termab )/ termN ;
+	 
+//	 G4cout << " termD, ab, N " << termD << "  " << termab << "  " << termN 
+//	        <<  "   pt2max= " << pt2max ;
+	 	                                                                          
+         Pt=SampleQuarkPt(sqrt(pt2max)); Pt.setZ(0); G4double Pt2=Pt.mag2();
+
+	 
+//	 G4cout << " sampled Pt2 = " << Pt2 << "  " << pt2max-Pt2 << G4endl;              
+         // end.. GF
 
 //G4cout<<"Sample4Momentum Pt x y "<<Pt.getX()<<" "<<Pt.getY()<<G4endl;
@@ -521,5 +535,5 @@
                          4.*MassMt2*AntiMassMt2;                                
       }                                                                     
-      while(AvailablePz2 < 0.);                                               
+      while(AvailablePz2 < 0.);     // GF will occur only for numerical precision problem with limit in sampled pt                                               
                                                                             
       AvailablePz2 /=(4.*InitialMass*InitialMass);                            
Index: trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4VLongitudinalStringDecay.cc
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4VLongitudinalStringDecay.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4VLongitudinalStringDecay.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VLongitudinalStringDecay.cc,v 1.13 2008/06/23 08:35:55 vuzhinsk Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4VLongitudinalStringDecay.cc,v 1.14 2009/05/22 16:35:47 gunter Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // -----------------------------------------------------------------------------
@@ -485,7 +485,14 @@
 //    }
 
-G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt()
+G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt(G4double ptMax)
    {
-   G4double Pt = -std::log(G4UniformRand());
+   G4double Pt;
+   if ( ptMax < 0 ) {
+      // sample full gaussian
+      Pt = -std::log(G4UniformRand());
+   } else {
+      // sample in limited range
+      Pt = -std::log(CLHEP::RandFlat::shoot(exp(-sqr(ptMax)/sqr(SigmaQT)), 1.));
+   }
    Pt = SigmaQT * std::sqrt(Pt);
    G4double phi = 2.*pi*G4UniformRand();
Index: trunk/source/processes/hadronic/models/parton_string/qgsm/History
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/qgsm/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/qgsm/History	(revision 1055)
@@ -1,3 +1,3 @@
-$Id: History,v 1.6 2008/09/19 09:54:23 gunter Exp $
+$Id: History,v 1.8 2009/05/19 12:48:42 gunter Exp $
 -------------------------------------------------------------------
 
@@ -16,4 +16,19 @@
      ---------------------------------------------------------------
 
+19 May 2009, G.Folger		(hadr-qgsm-V09-02-02)
+-----------------------------------------------------
+- fix in G4SPBaryon: for antibaryon, a  diquark & quark was given instead of 
+      anti-diquark & antiquark; note the reverse order, too. 
+    Fixes problems with incident anti baryons, e.g. antiproton, manifesting
+    in problems with forming hadrons.
+
+29 Apr 2009 m. Kosov       (hadr-qgsm-V09-02-01)
+------------------------------------------------
+Very important bug fix in G4QGSParticipants.cc to let QGSC working from E=0
+Added by GF (19-May-09):
+- this very important "bug" fix modifies G4G4QGSParticipants.cc and
+   G4GammaParticipants.cc:
+     changing the value of Threshold from 0.45 GeV to 0.GeV, 
+     and disables an Exception if s < sqr(total mass + Threshold)
 
 15 Sep 2008 G.Folger       (hadr-qgsm-V09-01-01)
Index: trunk/source/processes/hadronic/models/parton_string/qgsm/include/G4QGSParticipants.hh
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/qgsm/include/G4QGSParticipants.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/qgsm/include/G4QGSParticipants.hh	(revision 1055)
@@ -83,6 +83,6 @@
     enum  { SOFT, DIFFRACTIVE };
     const G4int nCutMax; 
-    const G4double ThersholdParameter; 
-    const G4double QGSMThershold; 
+    const G4double ThresholdParameter; 
+    const G4double QGSMThreshold; 
     const G4double theNucleonRadius;
     
Index: trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4GammaParticipants.cc
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4GammaParticipants.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4GammaParticipants.cc	(revision 1055)
@@ -50,9 +50,10 @@
   G4double ThresholdMass = thePrimary.GetMass() + theTargetNuc[0]->GetDefinition()->GetPDGMass(); 
   ModelMode = SOFT;
-  if (sqr(ThresholdMass + ThersholdParameter) > s)
+  if (sqr(ThresholdMass + ThresholdParameter) > s)
   {
-    throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses.");
+    ModelMode = DIFFRACTIVE;
+    //throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses.");
   }
-  if (sqr(ThresholdMass + QGSMThershold) > s) // thus only diffractive in cascade!
+  if (sqr(ThresholdMass + QGSMThreshold) > s) // thus only diffractive in cascade!
   {
     ModelMode = DIFFRACTIVE;
Index: trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4QGSParticipants.cc
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4QGSParticipants.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4QGSParticipants.cc	(revision 1055)
@@ -36,6 +36,7 @@
 
 G4QGSParticipants::G4QGSParticipants() : theDiffExcitaton(), //0.7*GeV, 250*MeV, 250*MeV),
-                                         nCutMax(7),ThersholdParameter(0.45*GeV),
-                                         QGSMThershold(3*GeV),theNucleonRadius(1.5*fermi)
+                                         //nCutMax(7),ThresholdParameter(0.45*GeV),
+                                         nCutMax(7),ThresholdParameter(0.000*GeV),
+                                         QGSMThreshold(3*GeV),theNucleonRadius(1.5*fermi)
                                          
 {
@@ -43,6 +44,6 @@
 
 G4QGSParticipants::G4QGSParticipants(const G4QGSParticipants &right)
-: G4VParticipants(), nCutMax(right.nCutMax),ThersholdParameter(right.ThersholdParameter),
-  QGSMThershold(right.QGSMThershold),theNucleonRadius(right.theNucleonRadius)
+: G4VParticipants(), nCutMax(right.nCutMax),ThresholdParameter(right.ThresholdParameter),
+  QGSMThreshold(right.QGSMThreshold),theNucleonRadius(right.theNucleonRadius)
 {
 }
@@ -91,9 +92,10 @@
   G4double ThresholdMass = thePrimary.GetMass() + pNucleon->GetDefinition()->GetPDGMass(); 
   ModelMode = SOFT;
-  if (sqr(ThresholdMass + ThersholdParameter) > s)
-  {
-    throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses.");
-  }
-  if (sqr(ThresholdMass + QGSMThershold) > s) // thus only diffractive in cascade!
+  if (sqr(ThresholdMass + ThresholdParameter) > s)
+  {
+    ModelMode = DIFFRACTIVE;
+    //throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses.");
+  }
+  if (sqr(ThresholdMass + QGSMThreshold) > s) // thus only diffractive in cascade!
   {
     ModelMode = DIFFRACTIVE;
Index: trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4SPBaryon.cc
===================================================================
--- trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4SPBaryon.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4SPBaryon.cc	(revision 1055)
@@ -104,6 +104,6 @@
       if (theDefinition->GetPDGEncoding() < 0)
       {
-	quark = -(*i)->GetDiQuark();
-	diQuark = -(*i)->GetQuark();                   
+	quark = (*i)->GetDiQuark();
+	diQuark = (*i)->GetQuark();                   
       }
       else
Index: trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/History
===================================================================
--- trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/History	(revision 1055)
@@ -1,3 +1,3 @@
-$Id: History,v 1.6 2008/10/02 21:05:09 dennis Exp $
+$Id: History,v 1.8 2009/02/06 08:58:20 vnivanch Exp $
 -------------------------------------------------------------------
 
@@ -16,4 +16,11 @@
      ---------------------------------------------------------------
 
+06 Feb 2009 V.Ivantchenko (hadr-munuclear-V09-02-01)
+----------------------------------------------------
+
+24 Jan 2009 V.Ivantchenko (hadr-munuclear-V09-02-00)
+----------------------------------------------------
+- G4MuNuclearInteraction added deregistration of the process 
+
  4 Oct 2008 Dennis Wright (hadr-munuclear-V09-01-01)
 ----------------------------------------------------
@@ -21,11 +28,11 @@
   12 to fHadronInelastic
 
- 2 Sep 2008 V.Ivantchenko (hadr-munuclear-V09-01-00)
------------------------------------------------------------------------
+ 2 Sep 2008 V.Ivanchenko (hadr-munuclear-V09-01-00)
+---------------------------------------------------
 - G4MuNuclearInteraction added SubType and registration in the 
                          G4HadronicProcessStore; added PreparePhysicsTable
                          method and cleanup for readability 
 
- 4 Nov 2006 Dennis Wright for V. Ivantchenko (hadr-munuclear-V08-01-00)
+ 4 Nov 2006 Dennis Wright for V.Ivanchenko (hadr-munuclear-V08-01-00)
 -----------------------------------------------------------------------
 - G4MuNuclearInteraction::ComputeMicroscopicCrossSection: prevent NaN
Index: trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4MuNuclearInteraction.icc
===================================================================
--- trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4MuNuclearInteraction.icc	(revision 1007)
+++ trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4MuNuclearInteraction.icc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4MuNuclearInteraction.icc,v 1.3 2006/06/29 20:57:22 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02-ref-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // $Id: 
Index: trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4MuNuclearInteraction.cc
===================================================================
--- trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4MuNuclearInteraction.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4MuNuclearInteraction.cc	(revision 1055)
@@ -24,7 +24,6 @@
 // ********************************************************************
 //
-//
-// $Id: G4MuNuclearInteraction.cc,v 1.11 2008/10/02 21:04:54 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4MuNuclearInteraction.cc,v 1.12 2009/01/24 11:59:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // $Id: 
@@ -38,6 +37,8 @@
 //      added simple model for hadronic vertex, J.P. Wellisch, November 1998
 // --------------------------------------------------------------
-// 26/10/98: new corr.s from R.Kokoulin + cleanup , L.Urban
+// 26/10/1998: new corr.s from R.Kokoulin + cleanup , L.Urban
+// 23/01/2009  V.Ivanchenko Add deregistration
 //
+
 #include "G4MuNuclearInteraction.hh"
 #include "G4UnitsTable.hh"
@@ -74,4 +75,6 @@
 G4MuNuclearInteraction::~G4MuNuclearInteraction()
 {
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
+
   if (theMeanFreePathTable) {
     theMeanFreePathTable->clearAndDestroy();
Index: trunk/source/processes/hadronic/models/pre_equilibrium/History
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/History	(revision 1055)
@@ -14,4 +14,26 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+13-February 2009 V.Ivanchenko   hadr-pre-V09-02-03
+---------------------------------------------------
+G4PreCompoundXXX - changed the shape of probabilities (return back to 9.2)  
+                   for d, t, He3, alpha (JMQ)
+
+12-February 2009 V.Ivanchenko   hadr-pre-V09-02-02
+---------------------------------------------------
+G4PreCompoundXXX - changed the shape of probabilities 
+                   for d, t, He3, alpha near the Coulomb barrier (JMQ)
+
+11-February 2009 V.Ivanchenko   hadr-pre-V09-02-01
+---------------------------------------------------
+G4PreCompoundXXX - set default Opt3 back, add decrease Coulomb barrier
+                   for d, t, a, he3 (JMQ)
+
+10-February 2009 V.Ivanchenko   hadr-pre-V09-02-00
+---------------------------------------------------
+Some clean up of comments
+G4PreCompoundIon - fixed probability of light ion emmision (JMQ)
+G4PreCompoundXXX - by default Opt1 is used for d, t, a, he3, 
+                   Opt3 for n, p (JMQ)
 
 09-December 2008 A.Howard   hadr-pre-V09-01-15
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmission.icc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmission.icc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmission.icc	(revision 1055)
@@ -24,4 +24,11 @@
 // ********************************************************************
 //
+// $Id: G4PreCompoundEmission.icc,v 1.5 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+//
+// Author:         V.Lara
+//
+// Modified:  
 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 
 // cross section option
@@ -34,5 +41,4 @@
   return;
 }
-
 
 inline G4double G4PreCompoundEmission::GetTotalProbability(const G4Fragment & aFragment) 
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4PreCompoundFragmentVector.hh,v 1.4 2008/09/22 10:18:36 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4PreCompoundFragmentVector.hh,v 1.6 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear Preequilibrium
@@ -39,8 +39,5 @@
 #define G4PreCompoundFragmentVector_h 1
 
-
 #include "G4VPreCompoundFragment.hh"
-
-
 
 class G4PreCompoundFragmentVector 
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.icc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.icc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.icc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4PreCompoundFragmentVector.icc,v 1.4 2008/09/22 10:18:36 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02-ref-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear Preequilibrium
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.hh
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.hh	(revision 1055)
@@ -24,6 +24,10 @@
 // ********************************************************************
 //
-//J. M. Quesada (August 2008).  
-//Based  on previous work by V. Lara
+//
+// $Id: G4VPreCompoundFragment.hh,v 1.10 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// J. M. Quesada (August 2008).  
+// Based  on previous work by V. Lara
 //
 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 
@@ -31,5 +35,4 @@
 // JMQ (06 September 2008) Also external choice has been added for:
 //                      - superimposed Coulomb barrier (if useSICB=true) 
-
 
 #ifndef G4VPreCompoundFragment_h
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.icc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.icc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.icc	(revision 1055)
@@ -26,5 +26,5 @@
 //
 // $Id: G4VPreCompoundFragment.icc,v 1.7 2008/09/22 10:18:36 ahoward Exp $
-// GEANT4 tag $Name: geant4-09-02-ref-02 $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // by V. Lara
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundAlpha.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundAlpha.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundAlpha.cc	(revision 1055)
@@ -24,27 +24,39 @@
 // ********************************************************************
 //
-//J.M.Quesada (August 08). New source file
-// 
-// Modif (21 August 2008) by J. M. Quesada for external choice of inverse 
-// cross section option
+//
+// $Id: G4PreCompoundAlpha.cc,v 1.5 2009/02/13 18:57:32 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundAlpha
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 21.08.2008 J. M. Quesada add choice of options  
+// 10.02.2009 J. M. Quesada set default opt1  
+//
 
 #include "G4PreCompoundAlpha.hh"
 
-  G4ReactionProduct * G4PreCompoundAlpha::GetReactionProduct() const
-  {
-    G4ReactionProduct * theReactionProduct =
-      new G4ReactionProduct(G4Alpha::AlphaDefinition());
-    theReactionProduct->SetMomentum(GetMomentum().vect());
-    theReactionProduct->SetTotalEnergy(GetMomentum().e());
+G4ReactionProduct * G4PreCompoundAlpha::GetReactionProduct() const
+{
+  G4ReactionProduct * theReactionProduct =
+    new G4ReactionProduct(G4Alpha::AlphaDefinition());
+  theReactionProduct->SetMomentum(GetMomentum().vect());
+  theReactionProduct->SetTotalEnergy(GetMomentum().e());
 #ifdef PRECOMPOUND_TEST
-    theReactionProduct->SetCreatorModel("G4PrecompoundModel");
+  theReactionProduct->SetCreatorModel("G4PrecompoundModel");
 #endif
-    return theReactionProduct;
-  }   
-
-
-   G4double G4PreCompoundAlpha::FactorialFactor(const G4double N, const G4double P)
-  {
-     return 
+  return theReactionProduct;
+}   
+
+G4double G4PreCompoundAlpha::FactorialFactor(const G4double N, const G4double P)
+{
+  return 
       (N-4.0)*(P-3.0)*(
 		       (((N-3.0)*(P-2.0))/2.0) *(
@@ -54,23 +66,21 @@
 						 )
 		       );
+}
+  
+G4double G4PreCompoundAlpha::CoalescenceFactor(const G4double A)
+{
+  return 4096.0/(A*A*A);  
+}    
+
+G4double G4PreCompoundAlpha::GetRj(const G4int NumberParticles, const G4int NumberCharged)
+{
+  G4double rj = 0.0;
+  G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2)*(NumberParticles-3);
+  if(NumberCharged >=2 && (NumberParticles-NumberCharged) >=2 ) {
+    rj = 6.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)*
+				   (NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator);  
   }
-  
-   G4double G4PreCompoundAlpha::CoalescenceFactor(const G4double A)
-  {
-     return 4096.0/(A*A*A);  
-  }    
-
-
-
-   G4double G4PreCompoundAlpha::GetRj(const G4int NumberParticles, const G4int NumberCharged)
-  {
-    G4double rj = 0.0;
-    G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2)*(NumberParticles-3);
-    if(NumberCharged >=2 && (NumberParticles-NumberCharged) >=2 ) rj = 6.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)*(NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator);  
- return rj;
-  }
-
-
-
+  return rj;
+}
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -80,5 +90,5 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4PreCompoundAlpha::CrossSection(const  G4double K)
+G4double G4PreCompoundAlpha::CrossSection(const  G4double K)
 {
 
@@ -115,33 +125,33 @@
 //----------------
 //
- G4double G4PreCompoundAlpha::GetAlpha()
-  {
- G4double C = 0.0;
-    G4double aZ = GetZ() + GetRestZ();
-    if (aZ <= 30) 
-      {
-	C = 0.10;
-      } 
-    else if (aZ <= 50) 
-      {
-	C = 0.1 + -((aZ-50.)/20.)*0.02;
-      } 
-    else if (aZ < 70) 
-      {
-	C = 0.08 + -((aZ-70.)/20.)*0.02;
-      }
-    else 
-      {
-	C = 0.06;
-      }
-    return 1.0+C;
-  }
+G4double G4PreCompoundAlpha::GetAlpha()
+{
+  G4double C = 0.0;
+  G4double aZ = GetZ() + GetRestZ();
+  if (aZ <= 30) 
+    {
+      C = 0.10;
+    } 
+  else if (aZ <= 50) 
+    {
+      C = 0.1 + -((aZ-50.)/20.)*0.02;
+    } 
+  else if (aZ < 70) 
+    {
+      C = 0.08 + -((aZ-70.)/20.)*0.02;
+    }
+  else 
+    {
+      C = 0.06;
+    }
+  return 1.0+C;
+}
 //
 //--------------------
 // 
-  G4double G4PreCompoundAlpha::GetBeta() 
-  {
-      return -GetCoulombBarrier();
-  }
+G4double G4PreCompoundAlpha::GetBeta() 
+{
+  return -GetCoulombBarrier();
+}
 //
 //********************* OPT=1,2 : Chatterjee's cross section ************************ 
@@ -153,5 +163,5 @@
   G4double Kc=K;
 
-  // JMQ xsec is set constat above limit of validity
+  // JMQ xsec is set constant above limit of validity
   if (K>50) Kc=50;
 
@@ -213,5 +223,7 @@
   G4double      ra=1.20;
         
-  ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  //JMQ 13/02/09 increase of reduced radius to lower the barrier
+  // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra);
   ecsq = ec * ec;
   p = p0 + p1/ec + p2/ecsq;
@@ -236,5 +248,5 @@
   
   if (elab <= ec) { //start for E<Ec
-    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;    
+    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
   }           //end for E<Ec
   else {           //start for E>Ec
@@ -252,6 +264,2 @@
 
 //   ************************** end of cross sections ******************************* 
-
-
-
-
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundDeuteron.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundDeuteron.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundDeuteron.cc	(revision 1055)
@@ -24,44 +24,56 @@
 // ********************************************************************
 //
-//J.M.Quesada (August 08). New source file
-// 
-// Modif (21 August 2008) by J. M. Quesada for external choice of inverse 
-// cross section option
+// $Id: G4PreCompoundDeuteron.cc,v 1.5 2009/02/13 18:57:32 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundDeuteron
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 21.08.2008 J. M. Quesada add choice of options  
+// 10.02.2009 J. M. Quesada set default opt1  
+//
 
 #include "G4PreCompoundDeuteron.hh"
 
-
-
-  G4ReactionProduct * G4PreCompoundDeuteron::GetReactionProduct() const
-  {
-    G4ReactionProduct * theReactionProduct =
-      new G4ReactionProduct(G4Deuteron::DeuteronDefinition());
-    theReactionProduct->SetMomentum(GetMomentum().vect());
-    theReactionProduct->SetTotalEnergy(GetMomentum().e());
+G4ReactionProduct * G4PreCompoundDeuteron::GetReactionProduct() const
+{
+  G4ReactionProduct * theReactionProduct =
+    new G4ReactionProduct(G4Deuteron::DeuteronDefinition());
+  theReactionProduct->SetMomentum(GetMomentum().vect());
+  theReactionProduct->SetTotalEnergy(GetMomentum().e());
 #ifdef PRECOMPOUND_TEST
-    theReactionProduct->SetCreatorModel("G4PrecompoundModel");
+  theReactionProduct->SetCreatorModel("G4PrecompoundModel");
 #endif
-    return theReactionProduct;
-  }   
-
- 
-   G4double G4PreCompoundDeuteron::FactorialFactor(const G4double N, const G4double P)
-  {
-      return (N-1.0)*(N-2.0)*(P-1.0)*P/2.0;
+  return theReactionProduct;
+}   
+
+ 
+G4double G4PreCompoundDeuteron::FactorialFactor(const G4double N, const G4double P)
+{
+  return (N-1.0)*(N-2.0)*(P-1.0)*P/2.0;
+}
+  
+G4double G4PreCompoundDeuteron::CoalescenceFactor(const G4double A)
+{
+  return 16.0/A;
+}    
+
+G4double G4PreCompoundDeuteron::GetRj(const G4int NumberParticles, const G4int NumberCharged)
+{
+  G4double rj = 0.0;
+  G4double denominator = NumberParticles*(NumberParticles-1);
+  if(NumberCharged >=1 && (NumberParticles-NumberCharged) >=1) {
+    rj = 2.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged))
+      / static_cast<G4double>(denominator); 
   }
-  
-   G4double G4PreCompoundDeuteron::CoalescenceFactor(const G4double A)
-  {
-    return 16.0/A;
-  }    
-
-  G4double G4PreCompoundDeuteron::GetRj(const G4int NumberParticles, const G4int NumberCharged)
-  {
-    G4double rj = 0.0;
-    G4double denominator = NumberParticles*(NumberParticles-1);
-   if(NumberCharged >=1 && (NumberParticles-NumberCharged) >=1) rj = 2.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged))/static_cast<G4double>(denominator); 
-
-    return rj;
-  }
+  return rj;
+}
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -71,5 +83,5 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4PreCompoundDeuteron::CrossSection(const  G4double K)
+G4double G4PreCompoundDeuteron::CrossSection(const  G4double K)
 {
 
@@ -106,25 +118,25 @@
 //---------
 //
- G4double G4PreCompoundDeuteron::GetAlpha()
-  {
-G4double C = 0.0;
-    G4double aZ = GetZ() + GetRestZ();
-    if (aZ >= 70) 
-      {
-	C = 0.10;
-      } 
-    else 
-      {
-	C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 
-      }
-    return 1.0 + C/2.0;
-  }
+G4double G4PreCompoundDeuteron::GetAlpha()
+{
+  G4double C = 0.0;
+  G4double aZ = GetZ() + GetRestZ();
+  if (aZ >= 70) 
+    {
+      C = 0.10;
+    } 
+  else 
+    {
+      C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 
+    }
+  return 1.0 + C/2.0;
+}
 //
 //---------
 //
-  G4double G4PreCompoundDeuteron::GetBeta() 
-  {
-      return -GetCoulombBarrier();
-  }
+G4double G4PreCompoundDeuteron::GetBeta() 
+{
+  return -GetCoulombBarrier();
+}
 //
 //********************* OPT=1,2 : Chatterjee's cross section ************************ 
@@ -140,5 +152,5 @@
 
   G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs;
-//G4double Eo(0),epsilon1(0),epsilon2(0),discri(0);
+  //G4double Eo(0),epsilon1(0),epsilon2(0),discri(0);
 
  
@@ -174,7 +186,4 @@
 }
 
-
-
-
 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)*************
 G4double G4PreCompoundDeuteron::GetOpt34(const  G4double K)
@@ -205,5 +214,7 @@
   G4double     ra=0.80;
         
-  ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  //JMQ 13/02/09 increase of reduced radius to lower the barrier
+  // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra);
   ecsq = ec * ec;
   p = p0 + p1/ec + p2/ecsq;
@@ -226,7 +237,7 @@
   elab = K * FragmentA / ResidualA;
   sig = 0.;
- 
+
   if (elab <= ec) { //start for E<Ec
-    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;    
+    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
   }           //end for E<Ec
   else {           //start for E>Ec
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundEmission.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundEmission.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundEmission.cc	(revision 1055)
@@ -25,7 +25,18 @@
 //
 //
-// Hadronic Process: Nuclear Preequilibrium
-// by V. Lara 
-
+// $Id: G4PreCompoundEmission.cc,v 1.19 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundEmission
+//
+// Author:         V.Lara
+//
+// Modified:  
+//
 
 #include "G4PreCompoundEmission.hh"
@@ -42,10 +53,10 @@
 
 
-  G4bool G4PreCompoundEmission::operator==(const G4PreCompoundEmission &) const
+G4bool G4PreCompoundEmission::operator==(const G4PreCompoundEmission &) const
 {
   return false;
 }
 
-    G4bool G4PreCompoundEmission::operator!=(const G4PreCompoundEmission &) const
+G4bool G4PreCompoundEmission::operator!=(const G4PreCompoundEmission &) const
 {
   return true;
@@ -95,6 +106,4 @@
   return;
 }
-
-
 
 G4ReactionProduct * G4PreCompoundEmission::PerformEmission(G4Fragment & aFragment)
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragment.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragment.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragment.cc	(revision 1055)
@@ -24,6 +24,9 @@
 // ********************************************************************
 //
-//J. M. Quesada (August 2008).  
-//Based  on previous work by V. Lara
+// $Id: G4PreCompoundFragment.cc,v 1.8 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// J. M. Quesada (August 2008).  
+// Based  on previous work by V. Lara
 // JMQ (06 September 2008) Also external choice has been added for:
 //                      - superimposed Coulomb barrier (if useSICB=true) 
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragmentVector.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragmentVector.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragmentVector.cc	(revision 1055)
@@ -24,7 +24,6 @@
 // ********************************************************************
 //
-//
-// $Id: G4PreCompoundFragmentVector.cc,v 1.7 2008/05/08 10:36:03 quesada Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4PreCompoundFragmentVector.cc,v 1.11 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Hadronic Process: Nuclear Preequilibrium
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundHe3.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundHe3.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundHe3.cc	(revision 1055)
@@ -24,28 +24,39 @@
 // ********************************************************************
 //
-//J.M.Quesada (August 08). New source file
-// 
-// Modif (21 August 2008) by J. M. Quesada for external choice of inverse 
-// cross section option
+//
+// $Id: G4PreCompoundHe3.cc,v 1.5 2009/02/13 18:57:32 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundHe3
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 21.08.2008 J. M. Quesada add choice of options  
+// 10.02.2009 J. M. Quesada set default opt1  
+//
  
 #include "G4PreCompoundHe3.hh"
 
-
-  G4ReactionProduct * G4PreCompoundHe3::GetReactionProduct() const
-  {
-    G4ReactionProduct * theReactionProduct =
-      new G4ReactionProduct(G4He3::He3Definition());
-    theReactionProduct->SetMomentum(GetMomentum().vect());
-    theReactionProduct->SetTotalEnergy(GetMomentum().e());
+G4ReactionProduct * G4PreCompoundHe3::GetReactionProduct() const
+{
+  G4ReactionProduct * theReactionProduct =
+    new G4ReactionProduct(G4He3::He3Definition());
+  theReactionProduct->SetMomentum(GetMomentum().vect());
+  theReactionProduct->SetTotalEnergy(GetMomentum().e());
 #ifdef PRECOMPOUND_TEST
-    theReactionProduct->SetCreatorModel("G4PrecompoundModel");
+  theReactionProduct->SetCreatorModel("G4PrecompoundModel");
 #endif
-    return theReactionProduct;
-  }   
-
-
-   G4double G4PreCompoundHe3::FactorialFactor(const G4double N, const G4double P)
-  {
-     return 
+  return theReactionProduct;
+}   
+
+G4double G4PreCompoundHe3::FactorialFactor(const G4double N, const G4double P)
+{
+  return 
       (N-3.0)*(P-2.0)*(
 		       (((N-2.0)*(P-1.0))/2.0) *(
@@ -53,24 +64,21 @@
 						 )
 		       );
+}
+  
+G4double G4PreCompoundHe3::CoalescenceFactor(const G4double A)
+{
+  return 243.0/(A*A);
+}    
+
+G4double G4PreCompoundHe3::GetRj(const G4int NumberParticles, const G4int NumberCharged)
+{
+  G4double rj = 0.0;
+  G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2);
+  if(NumberCharged >=2 && (NumberParticles-NumberCharged) >= 1) {
+    rj = 3.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged))
+      / static_cast<G4double>(denominator);  
   }
-  
-  G4double G4PreCompoundHe3::CoalescenceFactor(const G4double A)
-  {
-         return 243.0/(A*A);
-  }    
-
-
-
-  G4double G4PreCompoundHe3::GetRj(const G4int NumberParticles, const G4int NumberCharged)
-  {
-    G4double rj = 0.0;
-    G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2);
-    if(NumberCharged >=2 && (NumberParticles-NumberCharged) >= 1) rj = 3.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged))/static_cast<G4double>(denominator);  
-    
-    return rj;
-  }
-
-
-
+  return rj;
+}
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -80,5 +88,5 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4PreCompoundHe3::CrossSection(const  G4double K)
+G4double G4PreCompoundHe3::CrossSection(const  G4double K)
 {
   ResidualA=GetRestA();
@@ -114,33 +122,33 @@
 //----------------
 //
-  G4double G4PreCompoundHe3::GetAlpha()
-  {
-    G4double C = 0.0;
-    G4double aZ = GetZ() + GetRestZ();
-    if (aZ <= 30) 
-      {
-	C = 0.10;
-      }
-    else if (aZ <= 50) 
-      {
-	C = 0.1 + -((aZ-50.)/20.)*0.02;
-      } 
-    else if (aZ < 70) 
-      {
-	C = 0.08 + -((aZ-70.)/20.)*0.02;
-      }
-    else 
-      {
-	C = 0.06;
-      }
-    return 1.0 + C*(4.0/3.0);
-  }
+G4double G4PreCompoundHe3::GetAlpha()
+{
+  G4double C = 0.0;
+  G4double aZ = GetZ() + GetRestZ();
+  if (aZ <= 30) 
+    {
+      C = 0.10;
+    }
+  else if (aZ <= 50) 
+    {
+      C = 0.1 + -((aZ-50.)/20.)*0.02;
+    } 
+  else if (aZ < 70) 
+    {
+      C = 0.08 + -((aZ-70.)/20.)*0.02;
+    }
+  else 
+    {
+      C = 0.06;
+    }
+  return 1.0 + C*(4.0/3.0);
+}
 //
 //--------------------
 // 
-   G4double G4PreCompoundHe3::GetBeta() 
-  {
-      return -GetCoulombBarrier();
-  }
+G4double G4PreCompoundHe3::GetBeta() 
+{
+  return -GetCoulombBarrier();
+}
 //
 //********************* OPT=1,2 : Chatterjee's cross section ************************ 
@@ -214,5 +222,7 @@
   G4double      ra=0.80;
         
-  ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  //JMQ 13/02/09 increase of reduced radius to lower the barrier
+  // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra);
   ecsq = ec * ec;
   p = p0 + p1/ec + p2/ecsq;
@@ -237,5 +247,5 @@
   
   if (elab <= ec) { //start for E<Ec
-    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;    
+    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
   }           //end for E<Ec
   else {           //start for E>Ec
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundIon.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundIon.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundIon.cc	(revision 1055)
@@ -24,6 +24,18 @@
 // ********************************************************************
 //
-//J. M. Quesada (August 2008).  
-//Based  on previous work by V. Lara
+// $Id: G4PreCompoundIon.cc,v 1.16 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundIon
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 10.02.2009 J. M. Quesada fixed bug in density level of light fragments  
 //
 
@@ -31,10 +43,10 @@
 #include "G4PreCompoundParameters.hh"
 
- G4bool G4PreCompoundIon::IsItPossible(const G4Fragment& aFragment) 
-  {
-    G4int pplus = aFragment.GetNumberOfCharged();   
-    G4int pneut = aFragment.GetNumberOfParticles()-pplus;
-    return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());
-  }
+G4bool G4PreCompoundIon::IsItPossible(const G4Fragment& aFragment) 
+{
+  G4int pplus = aFragment.GetNumberOfCharged();   
+  G4int pneut = aFragment.GetNumberOfParticles()-pplus;
+  return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());
+}
 
 G4double G4PreCompoundIon::
@@ -57,6 +69,9 @@
     G4PreCompoundParameters::GetAddress()->GetLevelDensity();
 
-  G4double gj = (6.0/pi2)*GetA() *
-    G4PreCompoundParameters::GetAddress()->GetLevelDensity();
+  //JMQ 06/02/209  This is  THE BUG that was killing cluster emission
+  // G4double gj = (6.0/pi2)*GetA() *
+  //   G4PreCompoundParameters::GetAddress()->GetLevelDensity();
+
+  G4double gj = g1;
 
   G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0; 
@@ -74,7 +89,10 @@
   G4double Ej = std::max(0.0,eKin + GetBindingEnergy() -Aj); 
 
-
- G4double pA = 1.e-25*(3.0/4.0) * std::sqrt(std::max(0.0, 2.0/(GetReducedMass()*
-(eKin+GetBindingEnergy()))))/(pi * r0 * r0 * std::pow(GetRestA(),2.0/3.0) )* eKin*CrossSection(eKin) /(r0*std::pow(GetRestA(),1.0/3.0)) * CoalescenceFactor(aFragment.GetA()) * FactorialFactor(N,P)* GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())  ;
+  // JMQ 10/02/09 reshaping of the formula (unnecessary std::pow elimitated)
+  G4double pA = (3.0/4.0) * std::sqrt(std::max(0.0, 2.0/(GetReducedMass()*
+		(eKin+GetBindingEnergy()))))/(pi * r0 * r0 *r0* GetRestA())* 
+                eKin*CrossSection(eKin)*millibarn* 
+                CoalescenceFactor(aFragment.GetA()) * FactorialFactor(N,P)* 
+                GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged());
 
   G4double pB = std::pow((g1*E1)/(g0*E0),N-GetA()-1.0)*(g1/g0);
@@ -82,13 +100,6 @@
   G4double pC = std::pow((gj*Ej)/(g0*E0),GetA()-1.0)*(gj/g0)/E0; 
 
-
   G4double Probability = pA * pB * pC;
 
   return Probability;
 }
-
-
-
-
-
-
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNeutron.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNeutron.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNeutron.cc	(revision 1055)
@@ -24,31 +24,43 @@
 // ********************************************************************
 //
-//J. M. Quesada (August 2008). New source file
-//
-// Modif (21 August 2008) by J. M. Quesada for external choice of inverse 
-// cross section option
+//
+// $Id: G4PreCompoundNeutron.cc,v 1.4 2009/02/11 18:06:00 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundNeutron
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 21.08.2008 J. M. Quesada add choice of options  
+// 10.02.2009 J. M. Quesada set default opt3
 // 
+
 #include "G4PreCompoundNeutron.hh"
 
-
-  G4ReactionProduct * G4PreCompoundNeutron::GetReactionProduct() const
-  {
-    G4ReactionProduct * theReactionProduct = 
-      new G4ReactionProduct(G4Neutron::NeutronDefinition());
-    theReactionProduct->SetMomentum(GetMomentum().vect());
-    theReactionProduct->SetTotalEnergy(GetMomentum().e());
+G4ReactionProduct * G4PreCompoundNeutron::GetReactionProduct() const
+{
+  G4ReactionProduct * theReactionProduct = 
+    new G4ReactionProduct(G4Neutron::NeutronDefinition());
+  theReactionProduct->SetMomentum(GetMomentum().vect());
+  theReactionProduct->SetTotalEnergy(GetMomentum().e());
 #ifdef PRECOMPOUND_TEST
-    theReactionProduct->SetCreatorModel("G4PrecompoundModel");
+  theReactionProduct->SetCreatorModel("G4PrecompoundModel");
 #endif
-    return theReactionProduct;
-  }
-
-
-   G4double G4PreCompoundNeutron::GetRj(const G4int NumberParticles, const G4int NumberCharged)
-  {
-    G4double rj = 0.0;
-    if(NumberParticles > 0) rj = static_cast<G4double>(NumberParticles - NumberCharged)/static_cast<G4double>(NumberParticles);
-    return rj;
-  }
+  return theReactionProduct;
+}
+
+G4double G4PreCompoundNeutron::GetRj(const G4int NumberParticles, const G4int NumberCharged)
+{
+  G4double rj = 0.0;
+  if(NumberParticles > 0) rj = static_cast<G4double>(NumberParticles - NumberCharged)/
+			    static_cast<G4double>(NumberParticles);
+  return rj;
+}
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -58,5 +70,5 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4PreCompoundNeutron::CrossSection(const  G4double K)
+G4double G4PreCompoundNeutron::CrossSection(const  G4double K)
 {
   ResidualA=GetRestA();
@@ -92,21 +104,18 @@
 //-------
 //
-  G4double G4PreCompoundNeutron::GetAlpha()
-  {
- //   return 0.76+2.2/std::pow(GetRestA(),1.0/3.0);
+G4double G4PreCompoundNeutron::GetAlpha()
+{
+  //   return 0.76+2.2/std::pow(GetRestA(),1.0/3.0);
   return 0.76+2.2/ResidualAthrd;
-  }
+}
 //
 //------------
 //
-  G4double G4PreCompoundNeutron::GetBeta() 
-  {
- //   return (2.12/std::pow(GetRestA(),2.0/3.0)-0.05)*MeV/GetAlpha();
- return (2.12/(ResidualAthrd*ResidualAthrd)-0.05)*MeV/GetAlpha();
-  }
-//
-
-  
-
+G4double G4PreCompoundNeutron::GetBeta() 
+{
+  //   return (2.12/std::pow(GetRestA(),2.0/3.0)-0.05)*MeV/GetAlpha();
+  return (2.12/(ResidualAthrd*ResidualAthrd)-0.05)*MeV/GetAlpha();
+}
+//
 
 //********************* OPT=1,2 : Chatterjee's cross section ************************ 
@@ -156,5 +165,5 @@
   G4double b,ecut,cut,ecut2,geom,elab;
 
-//safety initialization
+  //safety initialization
   landa0=0;
   landa1=0;
@@ -172,7 +181,5 @@
   spill= 1.0e+18; 
 
-
-
-// PRECO xs for neutrons is choosen
+  // PRECO xs for neutrons is choosen
 
   p0 = -312.;
@@ -201,9 +208,7 @@
   xnulam = 1.;
   etest = 32.;
-//          ** etest is the energy above which the rxn cross section is
-//          ** compared with the geometrical limit and the max taken.
-//          ** xnulam here is a dummy value to be used later.
-
-
+  //          ** etest is the energy above which the rxn cross section is
+  //          ** compared with the geometrical limit and the max taken.
+  //          ** xnulam here is a dummy value to be used later.
 
   a = -2.*p*ec + landa - nu/ecsq;
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc	(revision 1055)
@@ -24,6 +24,19 @@
 // ********************************************************************
 //
-//J. M. Quesada (August 2008).  
-//Based  on previous work by V. Lara
+//
+// $Id: G4PreCompoundNucleon.cc,v 1.13 2009/02/11 18:06:00 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundNucleon
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 10.02.2009 J. M. Quesada cleanup
 //
 
@@ -32,10 +45,9 @@
 
 G4bool G4PreCompoundNucleon::IsItPossible(const G4Fragment& aFragment) 
-  {
-    G4int pplus = aFragment.GetNumberOfCharged();   
-    G4int pneut = aFragment.GetNumberOfParticles()-pplus;
-    return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());
-  }
-
+{
+  G4int pplus = aFragment.GetNumberOfCharged();   
+  G4int pneut = aFragment.GetNumberOfParticles()-pplus;
+  return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());
+}
 
 G4double G4PreCompoundNucleon::
@@ -45,5 +57,4 @@
   if ( !IsItPossible(aFragment) ) return 0.0;
 
-
   G4double U = aFragment.GetExcitationEnergy();
   G4double P = aFragment.GetNumberOfParticles();
@@ -51,6 +62,4 @@
   G4double N = P + H;
   
-
-
   G4double g0 = (6.0/pi2)*aFragment.GetA() * 
     G4PreCompoundParameters::GetAddress()->GetLevelDensity();
@@ -58,6 +67,4 @@
   G4double g1 = (6.0/pi2)*GetRestA() * 
     G4PreCompoundParameters::GetAddress()->GetLevelDensity();
-
-
 
   G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0;
@@ -71,16 +78,18 @@
 
 
- G4double Probability =1.e-25* 1.0/pi2*2.0/(hbarc*hbarc*hbarc) * GetReducedMass()
-* GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())  * eKin*CrossSection(eKin) * P*(N-1.0) * std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0);
+  G4double Probability = 1.0/pi2*2.0/(hbarc*hbarc*hbarc) * GetReducedMass()
+    * GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())  
+    * eKin*CrossSection(eKin)*millibarn * P*(N-1.0) * std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0);
 
-
-if (GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<0.0 || CrossSection(eKin) <0)
-{  std::ostringstream errOs;
-   G4cout<<"WARNING:  NEGATIVE VALUES "<<G4endl;     
-        errOs << "Rj=" << GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<<G4endl;
-        errOs <<"  xsec("<<eKin<<" MeV) ="<<CrossSection(eKin)<<G4endl;
-        errOs <<"  A="<<GetA()<<"  Z="<<GetZ()<<G4endl;
-        throw G4HadronicException(__FILE__, __LINE__, errOs.str());
-              }
+  if (GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<0.0 
+      || CrossSection(eKin) <0) {  
+    std::ostringstream errOs;
+    G4cout<<"WARNING:  NEGATIVE VALUES "<<G4endl;     
+    errOs << "Rj=" << GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())
+	  <<G4endl;
+    errOs <<"  xsec("<<eKin<<" MeV) ="<<CrossSection(eKin)<<G4endl;
+    errOs <<"  A="<<GetA()<<"  Z="<<GetZ()<<G4endl;
+    throw G4HadronicException(__FILE__, __LINE__, errOs.str());
+  }
 
   return Probability;
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundProton.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundProton.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundProton.cc	(revision 1055)
@@ -24,35 +24,43 @@
 // ********************************************************************
 //
-//J.M.Quesada (August 08). New source file
-// 
-// Modif (21 August 2008) by J. M. Quesada for external choice of inverse 
-// cross section option
-// 
-// JMQ (06 September 2008) Also external choice has been added for:
-//                      - superimposed Coulomb barrier (if useSICB=true) 
+//
+// $Id: G4PreCompoundProton.cc,v 1.4 2009/02/11 18:06:00 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundProton
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 21.08.2008 J. M. Quesada added external choice of inverse cross section option
+// 21.08.2008 J. M. Quesada added external choice for superimposed Coulomb barrier 
+//                          (if useSICB=true) 
+//
 
 #include "G4PreCompoundProton.hh"
 
-  G4ReactionProduct * G4PreCompoundProton::GetReactionProduct() const
-  {
-    G4ReactionProduct * theReactionProduct = 
-      new G4ReactionProduct(G4Proton::ProtonDefinition());
-    theReactionProduct->SetMomentum(GetMomentum().vect());
-    theReactionProduct->SetTotalEnergy(GetMomentum().e());
+G4ReactionProduct * G4PreCompoundProton::GetReactionProduct() const
+{
+  G4ReactionProduct * theReactionProduct = 
+    new G4ReactionProduct(G4Proton::ProtonDefinition());
+  theReactionProduct->SetMomentum(GetMomentum().vect());
+  theReactionProduct->SetTotalEnergy(GetMomentum().e());
 #ifdef PRECOMPOUND_TEST
-    theReactionProduct->SetCreatorModel("G4PrecompoundModel");
+  theReactionProduct->SetCreatorModel("G4PrecompoundModel");
 #endif
-    return theReactionProduct;
-  }
-
-
-   G4double G4PreCompoundProton::GetRj(const G4int NumberParticles, const G4int NumberCharged)
-  {
-    G4double rj = 0.0;
-    if(NumberParticles > 0) rj = static_cast<G4double>(NumberCharged)/static_cast<G4double>(NumberParticles);
-    return rj;
-  }
-
-
+  return theReactionProduct;
+}
+
+G4double G4PreCompoundProton::GetRj(const G4int NumberParticles, const G4int NumberCharged)
+{
+  G4double rj = 0.0;
+  if(NumberParticles > 0) rj = static_cast<G4double>(NumberCharged)/static_cast<G4double>(NumberParticles);
+  return rj;
+}
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -63,5 +71,5 @@
 //OPT=3 Kalbach's parameterization 
 // 
- G4double G4PreCompoundProton::CrossSection(const  G4double K)
+G4double G4PreCompoundProton::CrossSection(const  G4double K)
 {
   //G4cout<<" In G4PreCompoundProton OPTxs="<<OPTxs<<G4endl;
@@ -75,6 +83,4 @@
   FragmentA=GetA()+GetRestA();
   FragmentAthrd=std::pow(FragmentA,0.33333);
-
-
 
   if (OPTxs==0) return GetOpt0(K);
@@ -94,37 +100,35 @@
 G4double G4PreCompoundProton::GetOpt0(const  G4double K)
 {
-const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
+  const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
   // cross section is now given in mb (r0 is in mm) for the sake of consistency
   //with the rest of the options
- return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
+  return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
 }
 //
 //------------
 //
-  G4double G4PreCompoundProton::GetAlpha()
-  {
- G4double aZ = static_cast<G4double>(GetRestZ());
-    G4double C = 0.0;
-    if (aZ >= 70) 
-      {
-	C = 0.10;
-      } 
-    else 
-      {
-	C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;
-      }
-    return 1.0 + C;
-  }
+G4double G4PreCompoundProton::GetAlpha()
+{
+  G4double aZ = static_cast<G4double>(GetRestZ());
+  G4double C = 0.0;
+  if (aZ >= 70) 
+    {
+      C = 0.10;
+    } 
+  else 
+    {
+      C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;
+    }
+  return 1.0 + C;
+}
 //
 //-------------------
 //  
-  G4double G4PreCompoundProton::GetBeta() 
-  {
+G4double G4PreCompoundProton::GetBeta() 
+{
   return -GetCoulombBarrier();
-  }
-//
-  
-
-
+}
+//
+  
 //********************* OPT=1 : Chatterjee's cross section ************************ 
 //(fitting to cross section from Bechetti & Greenles OM potential)
@@ -132,42 +136,40 @@
 G4double G4PreCompoundProton::GetOpt1(const  G4double K)
 {
- G4double Kc=K; 
-
-// JMQ  xsec is set constat above limit of validity
- if (K>50)  Kc=50;
-
- G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs;
- G4double p, p0, p1, p2,Ec,delta,q,r,ji;
-  
- p0 = 15.72;
- p1 = 9.65;
- p2 = -449.0;
- landa0 = 0.00437;
- landa1 = -16.58;
- mu0 = 244.7;
- mu1 = 0.503;
- nu0 = 273.1;
- nu1 = -182.4;
- nu2 = -1.872;  
- delta=0.;  
-
- Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta);
- p = p0 + p1/Ec + p2/(Ec*Ec);
- landa = landa0*ResidualA + landa1;
- mu = mu0*std::pow(ResidualA,mu1);
- nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec));
- q = landa - nu/(Ec*Ec) - 2*p*Ec;
- r = mu + 2*nu/Ec + p*(Ec*Ec);
-
- ji=std::max(Kc,Ec);
- if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;}
- else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;}
- if (xs <0.0) {xs=0.0;}
-
- return xs; 
-
-}
-
-
+  G4double Kc=K; 
+
+  // JMQ  xsec is set constat above limit of validity
+  if (K>50)  Kc=50;
+
+  G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs;
+  G4double p, p0, p1, p2,Ec,delta,q,r,ji;
+  
+  p0 = 15.72;
+  p1 = 9.65;
+  p2 = -449.0;
+  landa0 = 0.00437;
+  landa1 = -16.58;
+  mu0 = 244.7;
+  mu1 = 0.503;
+  nu0 = 273.1;
+  nu1 = -182.4;
+  nu2 = -1.872;  
+  delta=0.;  
+
+  Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta);
+  p = p0 + p1/Ec + p2/(Ec*Ec);
+  landa = landa0*ResidualA + landa1;
+  mu = mu0*std::pow(ResidualA,mu1);
+  nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec));
+  q = landa - nu/(Ec*Ec) - 2*p*Ec;
+  r = mu + 2*nu/Ec + p*(Ec*Ec);
+
+  ji=std::max(Kc,Ec);
+  if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;}
+  else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;}
+  if (xs <0.0) {xs=0.0;}
+
+  return xs; 
+
+}
 
 //************* OPT=2 : Welisch's proton reaction cross section ************************ 
@@ -178,6 +180,6 @@
   G4double rnpro,rnneu,eekin,ekin,ff1,ff2,ff3,r0,fac,fac1,fac2,b0,xine_th(0);
  
-//This is redundant when the Coulomb  barrier is overimposed to all cross sections 
-//It should be kept when Coulomb barrier only imposed at OPTxs=2
+  //This is redundant when the Coulomb  barrier is overimposed to all cross sections 
+  //It should be kept when Coulomb barrier only imposed at OPTxs=2
 
   if(!useSICB && K<=theCoulombBarrier) return xine_th=0.0;
@@ -316,7 +318,6 @@
   }   //end for E>Ec
 
-  return sig;}
-
-
+  return sig;
+}
 
 //   ************************** end of cross sections ******************************* 
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc	(revision 1055)
@@ -24,10 +24,22 @@
 // ********************************************************************
 //
-//
-//J. M. Quesada (Feb. 08). Base on previous work by V. Lara.
-// New transition probabilities. Several bugs fixed.
-// JMQ (06 September 2008) Also external choices have been added for:
+// $Id: G4PreCompoundTransitions.cc,v 1.20 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundIon
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 16.02.2008 J. M. Quesada fixed bugs 
+// 06.09.2008 J. M. Quesada added external choices for:
 //                      - "never go back"  hipothesis (useNGB=true) 
 //                      -  CEM transition probabilities (useCEMtr=true)
+
 #include "G4PreCompoundTransitions.hh"
 #include "G4HadronicException.hh"
@@ -184,5 +196,6 @@
     //  G4cout<<"N="<<N<<"  P="<<P<<"  H="<<H<<G4endl;
     //  G4cout<<"l+ ="<<TransitionProb1<<"  l- ="<< TransitionProb2<<"  l0 ="<< TransitionProb3<<G4endl; 
-    return TransitionProb1 + TransitionProb2 + TransitionProb3;}
+    return TransitionProb1 + TransitionProb2 + TransitionProb3;
+  }
   
   else  {
@@ -215,6 +228,4 @@
     return TransitionProb1 + TransitionProb2 + TransitionProb3;
   }
-
-
 }
 
@@ -237,17 +248,21 @@
     }
 
-  // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and in proportion to the number charges w.r.t. number of particles,  PROVIDED that there are charged particles
-  if(deltaN < 0 && G4UniformRand() <= static_cast<G4double>(result.GetNumberOfCharged())/static_cast<G4double>(result.GetNumberOfParticles()) && (result.GetNumberOfCharged() >= 1))
+  // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and in proportion 
+  // to the number charges w.r.t. number of particles,  PROVIDED that there are charged particles
+  if(deltaN < 0 && G4UniformRand() <= 
+     static_cast<G4double>(result.GetNumberOfCharged())/static_cast<G4double>(result.GetNumberOfParticles()) 
+     && (result.GetNumberOfCharged() >= 1)) {
     result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2); // deltaN is negative!
-
-
- //JMQ the following lines have to be before SetNumberOfCharged, otherwise the check on number of charged vs. number of particles fails
+  }
+
+  // JMQ the following lines have to be before SetNumberOfCharged, otherwise the check on 
+  // number of charged vs. number of particles fails
   result.SetNumberOfParticles(result.GetNumberOfParticles()+deltaN/2);
   result.SetNumberOfHoles(result.GetNumberOfHoles()+deltaN/2); 
 
- // With weight Z/A, number of charged particles is increased with +1
+  // With weight Z/A, number of charged particles is increased with +1
   if ( ( deltaN > 0 ) &&
       (G4UniformRand() <= static_cast<G4double>(result.GetZ()-result.GetNumberOfCharged())/
-		  std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.)))
+       std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.)))
     {
       result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2);
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTriton.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTriton.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTriton.cc	(revision 1055)
@@ -25,27 +25,39 @@
 //
 //
-//J.M.Quesada (August 08). New source file
-//
-// Modif (21 August 2008) by J. M. Quesada for external choice of inverse 
-// cross section option
+// $Id: G4PreCompoundTriton.cc,v 1.5 2009/02/13 18:57:32 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PreCompoundTriton
+//
+// Author:         V.Lara
+//
+// Modified:  
+// 21.08.2008 J. M. Quesada add choice of options  
+// 10.02.2009 J. M. Quesada set default opt1  
+//
  
 #include "G4PreCompoundTriton.hh"
 
 
-  G4ReactionProduct * G4PreCompoundTriton::GetReactionProduct() const
-  {
-    G4ReactionProduct * theReactionProduct =
-      new G4ReactionProduct(G4Triton::TritonDefinition());
-    theReactionProduct->SetMomentum(GetMomentum().vect());
-    theReactionProduct->SetTotalEnergy(GetMomentum().e());
+G4ReactionProduct * G4PreCompoundTriton::GetReactionProduct() const
+{
+  G4ReactionProduct * theReactionProduct =
+    new G4ReactionProduct(G4Triton::TritonDefinition());
+  theReactionProduct->SetMomentum(GetMomentum().vect());
+  theReactionProduct->SetTotalEnergy(GetMomentum().e());
 #ifdef PRECOMPOUND_TEST
-    theReactionProduct->SetCreatorModel("G4PrecompoundModel");
+  theReactionProduct->SetCreatorModel("G4PrecompoundModel");
 #endif
-    return theReactionProduct;
-  }   
-
-   G4double G4PreCompoundTriton::FactorialFactor(const G4double N, const G4double P)
-  {
-      return 
+  return theReactionProduct;
+}   
+
+G4double G4PreCompoundTriton::FactorialFactor(const G4double N, const G4double P)
+{
+  return 
       (N-3.0)*(P-2.0)*(
 		       (((N-2.0)*(P-1.0))/2.0) *(
@@ -53,22 +65,21 @@
 						 )
 		       );
+}
+  
+G4double G4PreCompoundTriton::CoalescenceFactor(const G4double A)
+{
+  return 243.0/(A*A);
+}    
+
+G4double G4PreCompoundTriton::GetRj(const G4int NumberParticles, const G4int NumberCharged)
+{
+  G4double rj = 0.0;
+  G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2);
+  if(NumberCharged >= 1 && (NumberParticles-NumberCharged) >= 2) {
+    rj = 3.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged)*(NumberParticles-NumberCharged-1))
+      /static_cast<G4double>(denominator); 
   }
-  
-   G4double G4PreCompoundTriton::CoalescenceFactor(const G4double A)
-  {
-     return 243.0/(A*A);
-  }    
-
-
-   G4double G4PreCompoundTriton::GetRj(const G4int NumberParticles, const G4int NumberCharged)
-  {
-    G4double rj = 0.0;
-    G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2);
-    if(NumberCharged >= 1 && (NumberParticles-NumberCharged) >= 2) rj = 3.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged)*(NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator); 
-    return rj;
-  }
-
-
-
+  return rj;
+}
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -78,5 +89,5 @@
 //OPT=3,4 Kalbach's parameterization 
 // 
- G4double G4PreCompoundTriton::CrossSection(const  G4double K)
+G4double G4PreCompoundTriton::CrossSection(const  G4double K)
 {
   ResidualA=GetRestA();
@@ -111,26 +122,26 @@
 //---------
 //
-  G4double G4PreCompoundTriton::GetAlpha()
-  {
-    G4double C = 0.0;
-    G4double aZ = GetZ() + GetRestZ();
-    if (aZ >= 70) 
-      {
-	C = 0.10;
-      } 
-    else 
-      {
-	C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 
-      }
- 
-    return 1.0 + C/3.0;
-  }
+G4double G4PreCompoundTriton::GetAlpha()
+{
+  G4double C = 0.0;
+  G4double aZ = GetZ() + GetRestZ();
+  if (aZ >= 70) 
+    {
+      C = 0.10;
+    } 
+  else 
+    {
+      C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 
+    }
+ 
+  return 1.0 + C/3.0;
+}
 //
 //-------------
 //
-   G4double G4PreCompoundTriton::GetBeta() 
-  {
-      return -GetCoulombBarrier();
-  }
+G4double G4PreCompoundTriton::GetBeta() 
+{
+  return -GetCoulombBarrier();
+}
 //
 //********************* OPT=1,2 : Chatterjee's cross section ************************ 
@@ -183,66 +194,64 @@
 
   G4double landa, mu, nu, p , signor(1.),sig;
-G4double ec,ecsq,xnulam,etest(0.),a; 
-G4double b,ecut,cut,ecut2,geom,elab;
-
-
- G4double     flow = 1.e-18;
- G4double     spill= 1.e+18;
-
-
- G4double     p0 = -21.45;
- G4double     p1 = 484.7;
- G4double     p2 = -1608.;
- G4double     landa0 = 0.0186;
- G4double     landa1 = -8.90;
- G4double     mu0 = 686.3;
- G4double     mu1 = 0.325;
- G4double     nu0 = 368.9;
- G4double     nu1 = -522.2;
- G4double     nu2 = -4.998;  
+  G4double ec,ecsq,xnulam,etest(0.),a; 
+  G4double b,ecut,cut,ecut2,geom,elab;
+
+
+  G4double     flow = 1.e-18;
+  G4double     spill= 1.e+18;
+
+
+  G4double     p0 = -21.45;
+  G4double     p1 = 484.7;
+  G4double     p2 = -1608.;
+  G4double     landa0 = 0.0186;
+  G4double     landa1 = -8.90;
+  G4double     mu0 = 686.3;
+  G4double     mu1 = 0.325;
+  G4double     nu0 = 368.9;
+  G4double     nu1 = -522.2;
+  G4double     nu2 = -4.998;  
   
- G4double      ra=0.80;
+  G4double      ra=0.80;
         
- ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
- ecsq = ec * ec;
- p = p0 + p1/ec + p2/ecsq;
- landa = landa0*ResidualA + landa1;
- a = std::pow(ResidualA,mu1);
- mu = mu0 * a;
- nu = a* (nu0+nu1*ec+nu2*ecsq);  
- xnulam = nu / landa;
- if (xnulam > spill) xnulam=0.;
- if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);
- 
- a = -2.*p*ec + landa - nu/ecsq;
- b = p*ecsq + mu + 2.*nu/ec;
- ecut = 0.;
- cut = a*a - 4.*p*b;
- if (cut > 0.) ecut = std::sqrt(cut);
- ecut = (ecut-a) / (p+p);
- ecut2 = ecut;
- if (cut < 0.) ecut2 = ecut - 2.;
- elab = K * FragmentA / ResidualA;
- sig = 0.;
- 
- if (elab <= ec) { //start for E<Ec
-   if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;    
- }           //end for E<Ec
- else {           //start for E>Ec
-   sig = (landa*elab+mu+nu/elab) * signor;
-   geom = 0.;
-   if (xnulam < flow || elab < etest) return sig;
-   geom = std::sqrt(theA*K);
-   geom = 1.23*ResidualAthrd + ra + 4.573/geom;
-   geom = 31.416 * geom * geom;
-   sig = std::max(geom,sig);
- }           //end for E>Ec
- return sig;
+  //JMQ 13/02/09 increase of reduced radius to lower the barrier
+  // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
+  ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra);
+  ecsq = ec * ec;
+  p = p0 + p1/ec + p2/ecsq;
+  landa = landa0*ResidualA + landa1;
+  a = std::pow(ResidualA,mu1);
+  mu = mu0 * a;
+  nu = a* (nu0+nu1*ec+nu2*ecsq);  
+  xnulam = nu / landa;
+  if (xnulam > spill) xnulam=0.;
+  if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);
+ 
+  a = -2.*p*ec + landa - nu/ecsq;
+  b = p*ecsq + mu + 2.*nu/ec;
+  ecut = 0.;
+  cut = a*a - 4.*p*b;
+  if (cut > 0.) ecut = std::sqrt(cut);
+  ecut = (ecut-a) / (p+p);
+  ecut2 = ecut;
+  if (cut < 0.) ecut2 = ecut - 2.;
+  elab = K * FragmentA / ResidualA;
+  sig = 0.;
+ 
+  if (elab <= ec) { //start for E<Ec
+    if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
+  }           //end for E<Ec
+  else {           //start for E>Ec
+    sig = (landa*elab+mu+nu/elab) * signor;
+    geom = 0.;
+    if (xnulam < flow || elab < etest) return sig;
+    geom = std::sqrt(theA*K);
+    geom = 1.23*ResidualAthrd + ra + 4.573/geom;
+    geom = 31.416 * geom * geom;
+    sig = std::max(geom,sig);
+  }           //end for E>Ec
+  return sig;
 
 }
 
 //   ************************** end of cross sections ******************************* 
-
-
-
-
Index: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundFragment.cc
===================================================================
--- trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundFragment.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundFragment.cc	(revision 1055)
@@ -24,7 +24,9 @@
 // ********************************************************************
 //
+// $Id: G4VPreCompoundFragment.cc,v 1.12 2009/02/10 16:01:37 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
-//J. M. Quesada (August 2008).  
-//Based  on previous work by V. Lara
+// J. M. Quesada (August 2008).  
+// Based  on previous work by V. Lara
 //
  
Index: trunk/source/processes/hadronic/models/qmd/GNUmakefile
===================================================================
--- trunk/source/processes/hadronic/models/qmd/GNUmakefile	(revision 1007)
+++ trunk/source/processes/hadronic/models/qmd/GNUmakefile	(revision 1055)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.1 2007/11/17 16:27:35 dennis Exp $
+# $Id: GNUmakefile,v 1.2 2008/11/22 06:30:46 tkoi Exp $
 # -----------------------------------------------------------
 # GNUmakefile for hadronic library.  Gabriele Cosmo, 18/9/96.
@@ -27,5 +27,13 @@
 	    -I$(G4BASE)/processes/hadronic/models/management/include \
 	    -I$(G4BASE)/processes/hadronic/models/util/include \
+	    -I$(G4BASE)/processes/hadronic/models/theo_high_energy/include \
+	    -I$(G4BASE)/processes/hadronic/models/binary_cascade/include \
 	    -I$(G4BASE)/processes/hadronic/models/im_r_matrix/include \
+	    -I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/interface/include \
+	    -I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/body/include \
+	    -I$(G4BASE)/processes/hadronic/models/parton_string/qgsm/include \
+	    -I$(G4BASE)/processes/hadronic/models/parton_string/diffraction/include \
+	    -I$(G4BASE)/processes/hadronic/models/parton_string/hadronization/include \
+	    -I$(G4BASE)/processes/hadronic/models/parton_string/management/include \
             -I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \
             -I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \
Index: trunk/source/processes/hadronic/models/qmd/History
===================================================================
--- trunk/source/processes/hadronic/models/qmd/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/qmd/History	(revision 1055)
@@ -13,4 +13,17 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+31-March-2009 Tatsumi Koi (hadr-qmd-V09-02-01)
+- Fix bug in gamma(mass zero) partiticpants
+	src/G4QMDCollision.cc  
+- Chnage meber object to pointer
+	include/G4QMDReaction.hh  
+	src/G4QMDReaction.cc  
+
+28-February-2009 Tatsumi Koi (hadr-qmd-V09-02-00)
+- Fix bug in Absorption 
+	src/G4QMDCollision.cc  
+- Add Be8 -> Alpha Alpha including opening angle by Q value  
+	src/G4QMDReaction.cc  
 
 20-November-2008 Tatsumi Koi (hadr-qmd-V09-01-08)
Index: trunk/source/processes/hadronic/models/qmd/include/G4QMDReaction.hh
===================================================================
--- trunk/source/processes/hadronic/models/qmd/include/G4QMDReaction.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/qmd/include/G4QMDReaction.hh	(revision 1055)
@@ -28,5 +28,5 @@
 //
 //
-//      File name:    G4QMDReaction.hh 
+//      File name: G4QMDReaction.hh 
 //
 //      Author: Koi, Tatsumi (tkoi@slac.stanford.edu)       
@@ -37,4 +37,5 @@
 // 081107 Add UnUseGEM (then use the default channel of G4Evaporation)
 //            UseFrag (chage criterion of a inelastic reaction)
+// 090331 Change member shenXS and genspaXS object to pointer 
 //
 
@@ -70,7 +71,10 @@
       void UseFRAG(){ frag = true; };
 
+      void EnableFermiG(){ heg = true; setHighEnergyModel(); };
+
    private:
 
       void setEvaporationCh();
+      void setHighEnergyModel();
 
       G4QMDMeanField* meanField;
@@ -107,9 +111,11 @@
       G4double coulomb_collision_pz_targ;
 
-      G4IonsShenCrossSection shenXS;
-      G4IonsShenCrossSection genspaXS;
+//090331
+      G4IonsShenCrossSection* shenXS;
+      G4GeneralSpaceNNCrossSection* genspaXS;
 
       G4bool gem;
       G4bool frag;
+      G4bool heg;
 
 };
Index: trunk/source/processes/hadronic/models/qmd/src/G4QMDCollision.cc
===================================================================
--- trunk/source/processes/hadronic/models/qmd/src/G4QMDCollision.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/qmd/src/G4QMDCollision.cc	(revision 1055)
@@ -28,7 +28,8 @@
 //        Add several required updating of Mean Filed 
 //        Modified handling of absorption case by T. Koi
+// 090126 Fix in absorption case by T. Koi  
+// 090331 Fix for gamma participant by T. Koi 
 //
 #include "G4QMDCollision.hh"
-#include "G4ParticleDefinition.hh"
 #include "G4Scatterer.hh"
 #include "Randomize.hh"
@@ -260,4 +261,6 @@
       G4double rmi =  theSystem->GetParticipant( i )->GetMass();
       G4ParticleDefinition* pdi =  theSystem->GetParticipant( i )->GetDefinition();
+//090331 gamma 
+      if ( pdi->GetPDGMass() == 0.0 ) continue;
 
       //std::cout << " p4i00 " << p4i << std::endl;
@@ -295,4 +298,6 @@
          G4double rmj =  theSystem->GetParticipant( j )->GetMass();
          G4ParticleDefinition* pdj =  theSystem->GetParticipant( j )->GetDefinition();
+//090331 gamma 
+         if ( pdj->GetPDGMass() == 0.0 ) continue;
 
          G4double rr2 = theMeanField->GetRR2( i , j );
@@ -332,5 +337,5 @@
          G4double pidr = p4i.vect()*dr;
          G4double pjdr = p4j.vect()*dr;
-  
+
          G4double aij = 1.0 - ( rmi*rmj /pij ) * ( rmi*rmj /pij ); 
          G4double bij = pidr / rmi - pjdr*rmi/pij;
@@ -660,5 +665,7 @@
       else 
       {
-         if ( theMeanField->IsPauliBlocked ( i ) == false ) 
+         //if ( theMeanField->IsPauliBlocked ( i ) == false ) 
+         //090126                            i-1 cause jth is erased
+         if ( theMeanField->IsPauliBlocked ( i-1 ) == false ) 
          { 
             //G4cout << "Absorption Happen " << theSystem->GetTotalNumberOfParticipant() << G4endl;
Index: trunk/source/processes/hadronic/models/qmd/src/G4QMDReaction.cc
===================================================================
--- trunk/source/processes/hadronic/models/qmd/src/G4QMDReaction.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/qmd/src/G4QMDReaction.cc	(revision 1055)
@@ -31,4 +31,6 @@
 //            UseFrag (chage criterion of a inelastic reaction)
 //        Fix bug in nucleon projectiles  by T. Koi    
+// 090122 Be8 -> Alpha + Alpha 
+// 090331 Change member shenXS and genspaXS object to pointer 
 //
 #include "G4QMDReaction.hh"
@@ -45,4 +47,8 @@
 , frag ( false )
 {
+
+   //090331
+   shenXS = new G4IonsShenCrossSection();
+   //genspaXS = new G4GeneralSpaceNNCrossSection();
    meanField = new G4QMDMeanField();
    collision = new G4QMDCollision();
@@ -99,6 +105,7 @@
      G4double aTemp = projectile.GetMaterial()->GetTemperature();
 
-     //G4double xs_0 = shenXS.GetCrossSection ( proj_dp , targ_ele , aTemp );
-     G4double xs_0 = genspaXS.GetCrossSection ( proj_dp , targ_ele , aTemp );
+     //090331
+     G4double xs_0 = shenXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
+     //G4double xs_0 = genspaXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
      G4double bmax_0 = std::sqrt( xs_0 / pi );
      //std::cout << "bmax_0 in fm (fermi) " <<  bmax_0/fermi << std::endl;
@@ -470,10 +477,42 @@
           // Secondary from this nucleus (*it) 
           G4ParticleDefinition* pd = (*itt)->GetDefinition();
+
           G4LorentzVector p4 ( (*itt)->GetMomentum()/GeV , (*itt)->GetTotalEnergy()/GeV );  //in nucleus(*it) rest system
           G4LorentzVector p4_CM = CLHEP::boostOf( p4 , -nucleus_p4CM.findBoostToCM() );  // Back to CM
           G4LorentzVector p4_LAB = CLHEP::boostOf( p4_CM , boostBackToLAB ); // Back to LAB  
 
-          G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );  
-          theParticleChange.AddSecondary( dp ); 
+
+//090122
+          //theParticleChange.AddSecondary( dp ); 
+          if ( !( pd->GetAtomicNumber() == 4 && pd->GetAtomicMass() == 8 ) )
+          {
+             G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );  
+             theParticleChange.AddSecondary( dp ); 
+          }
+          else
+          {
+             //Be8 -> Alpha + Alpha + Q
+             G4ThreeVector randomized_direction( G4UniformRand() , G4UniformRand() , G4UniformRand() );
+             randomized_direction = randomized_direction.unit();
+             G4double q_decay = (*itt)->GetMass() - 2*G4Alpha::Alpha()->GetPDGMass();
+             G4double p_decay = std::sqrt ( std::pow(G4Alpha::Alpha()->GetPDGMass()+q_decay/2,2) - std::pow(G4Alpha::Alpha()->GetPDGMass() , 2 ) ); 
+             G4LorentzVector p4_a1 ( p_decay*randomized_direction , G4Alpha::Alpha()->GetPDGMass()+q_decay/2 );  //in Be8 rest system
+             
+             G4LorentzVector p4_a1_Be8 = CLHEP::boostOf ( p4_a1/GeV , -p4.findBoostToCM() );
+             G4LorentzVector p4_a1_CM = CLHEP::boostOf ( p4_a1_Be8 , -nucleus_p4CM.findBoostToCM() );
+             G4LorentzVector p4_a1_LAB = CLHEP::boostOf ( p4_a1_CM , boostBackToLAB );
+
+             G4LorentzVector p4_a2 ( -p_decay*randomized_direction , G4Alpha::Alpha()->GetPDGMass()+q_decay/2 );  //in Be8 rest system
+             
+             G4LorentzVector p4_a2_Be8 = CLHEP::boostOf ( p4_a2/GeV , -p4.findBoostToCM() );
+             G4LorentzVector p4_a2_CM = CLHEP::boostOf ( p4_a2_Be8 , -nucleus_p4CM.findBoostToCM() );
+             G4LorentzVector p4_a2_LAB = CLHEP::boostOf ( p4_a2_CM , boostBackToLAB );
+             
+             G4DynamicParticle* dp1 = new G4DynamicParticle( G4Alpha::Alpha() , p4_a1_LAB*GeV );  
+             G4DynamicParticle* dp2 = new G4DynamicParticle( G4Alpha::Alpha() , p4_a2_LAB*GeV );  
+             theParticleChange.AddSecondary( dp1 ); 
+             theParticleChange.AddSecondary( dp2 ); 
+          }
+//090122
 
 /*
@@ -698,3 +737,2 @@
 
 }
-
Index: trunk/source/processes/hadronic/models/rpg/History
===================================================================
--- trunk/source/processes/hadronic/models/rpg/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/rpg/History	(revision 1055)
@@ -15,4 +15,10 @@
    ---------------------------------------------------------------
 
+25 May 2009 - Dennis Wright (hadr-rpg-V09-02-00)
+------------------------------------------------
+G4RPGInelastic:  fix MAC complaint about initialization order:
+   remove static array of G4ParticleDefinition pointers and
+   replace with local array 
+  
  9 June 2008 - Dennis Wright (hadr-rpg-V09-01-03)
 -------------------------------------------------
Index: trunk/source/processes/hadronic/models/rpg/include/G4RPGInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/rpg/include/G4RPGInelastic.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/rpg/include/G4RPGInelastic.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4RPGInelastic.hh,v 1.3 2008/02/22 22:17:25 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4RPGInelastic.hh,v 1.4 2009/05/25 19:06:59 dennis Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Author: D. H. Wright
@@ -55,7 +55,5 @@
  public:  // with description
     
-   G4RPGInelastic(const G4String& modelName = "RPGInelastic") 
-    : G4HadronicInteraction(modelName)
-   { cache = 0.0;}
+   G4RPGInelastic(const G4String& modelName = "RPGInelastic"); 
     
    virtual ~G4RPGInelastic()
@@ -124,5 +122,7 @@
          lam, sp, s0, sm, xi0, xim, om, ap, an};
 
-   static G4ParticleDefinition* particleDef[18];
+ protected:
+
+   G4ParticleDefinition* particleDef[18];
 
  private:
Index: trunk/source/processes/hadronic/models/rpg/include/G4RPGNucleonInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/rpg/include/G4RPGNucleonInelastic.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/rpg/include/G4RPGNucleonInelastic.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4RPGNucleonInelastic.hh,v 1.1 2008/01/04 23:27:45 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4RPGNucleonInelastic.hh,v 1.2 2009/05/25 19:05:19 dennis Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Author: D. H. Wright
@@ -48,4 +48,6 @@
     
    ~G4RPGNucleonInelastic() { }
+
+   //   void printCrossSections() const;
     
  protected:
Index: trunk/source/processes/hadronic/models/rpg/include/G4RPGPionInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/rpg/include/G4RPGPionInelastic.hh	(revision 1007)
+++ trunk/source/processes/hadronic/models/rpg/include/G4RPGPionInelastic.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4RPGPionInelastic.hh,v 1.1 2008/01/05 00:14:03 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4RPGPionInelastic.hh,v 1.2 2009/05/25 19:05:34 dennis Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Author: D. H. Wright
@@ -48,4 +48,6 @@
     
    ~G4RPGPionInelastic() { }
+
+   //   void printCrossSections() const;
     
  protected:
Index: trunk/source/processes/hadronic/models/rpg/src/G4RPGInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/rpg/src/G4RPGInelastic.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/rpg/src/G4RPGInelastic.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4RPGInelastic.cc,v 1.6 2008/03/22 00:03:24 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4RPGInelastic.cc,v 1.7 2009/05/25 19:07:15 dennis Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 
@@ -34,5 +34,30 @@
 #include "G4RPGTwoBody.hh"
 
- 
+
+G4RPGInelastic::G4RPGInelastic(const G4String& modelName)
+  : G4HadronicInteraction(modelName)
+{
+  cache = 0.0;
+  particleDef[0] = G4PionZero::PionZero();
+  particleDef[1] = G4PionPlus::PionPlus();
+  particleDef[2] = G4PionMinus::PionMinus();
+  particleDef[3] = G4KaonPlus::KaonPlus();
+  particleDef[4] = G4KaonMinus::KaonMinus();
+  particleDef[5] = G4KaonZero::KaonZero();
+  particleDef[6] = G4AntiKaonZero::AntiKaonZero();
+  particleDef[7] = G4Proton::Proton();
+  particleDef[8] = G4Neutron::Neutron();
+  particleDef[9] = G4Lambda::Lambda();
+  particleDef[10] = G4SigmaPlus::SigmaPlus();
+  particleDef[11] = G4SigmaZero::SigmaZero();
+  particleDef[12] = G4SigmaMinus::SigmaMinus();
+  particleDef[13] = G4XiZero::XiZero();
+  particleDef[14] = G4XiMinus::XiMinus();
+  particleDef[15] = G4OmegaMinus::OmegaMinus();
+  particleDef[16] = G4AntiProton::AntiProton();
+  particleDef[17] = G4AntiNeutron::AntiNeutron();
+}
+
+
 G4double G4RPGInelastic::Pmltpc(G4int np, G4int nm, G4int nz, 
                                 G4int n, G4double b, G4double c)
@@ -568,26 +593,4 @@
   2.4,  3.2,  4.2,   5.6,   7.5,   10.0,  13.0,  18.0,  24.0, 32.0 };
 
-G4ParticleDefinition* p0 = G4PionZero::PionZero();
-G4ParticleDefinition* p1 = G4PionPlus::PionPlus();
-G4ParticleDefinition* p2 = G4PionMinus::PionMinus();
-G4ParticleDefinition* p3 = G4KaonPlus::KaonPlus();
-G4ParticleDefinition* p4 = G4KaonMinus::KaonMinus();
-G4ParticleDefinition* p5 = G4KaonZero::KaonZero();
-G4ParticleDefinition* p6 = G4AntiKaonZero::AntiKaonZero();
-G4ParticleDefinition* p7 = G4Proton::Proton();
-G4ParticleDefinition* p8 = G4Neutron::Neutron();
-G4ParticleDefinition* p9 = G4Lambda::Lambda();
-G4ParticleDefinition* p10 = G4SigmaPlus::SigmaPlus();
-G4ParticleDefinition* p11 = G4SigmaZero::SigmaZero();
-G4ParticleDefinition* p12 = G4SigmaMinus::SigmaMinus();
-G4ParticleDefinition* p13 = G4XiZero::XiZero();
-G4ParticleDefinition* p14 = G4XiMinus::XiMinus();
-G4ParticleDefinition* p15 = G4OmegaMinus::OmegaMinus();
-G4ParticleDefinition* p16 = G4AntiProton::AntiProton();
-G4ParticleDefinition* p17 = G4AntiNeutron::AntiNeutron();
-
-G4ParticleDefinition* G4RPGInelastic::particleDef[18] = {
-  p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, 
-  p15, p16, p17 };
 
 /* end of file */
Index: trunk/source/processes/hadronic/models/rpg/src/G4RPGNucleonInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/rpg/src/G4RPGNucleonInelastic.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/rpg/src/G4RPGNucleonInelastic.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4RPGNucleonInelastic.cc,v 1.1 2008/01/04 23:28:10 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4RPGNucleonInelastic.cc,v 1.2 2009/05/25 19:06:03 dennis Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
  
@@ -70,6 +70,30 @@
     }
   }
+  
+  //  printCrossSections();
 
 }
+
+/*
+void G4RPGNucleonInelastic::printCrossSections() const
+{
+  G4cout << " pp total cross sections (mb) " << G4endl;
+  for (G4int i = 0; i < 5; i++) {
+    G4int istart = i*6;
+    G4int istop = istart + 6;
+    for (G4int t = istart; t < istop; t++) G4cout << pPtot[t] << "  " ;
+    G4cout << G4endl;
+  }
+  G4cout << G4endl;
+
+  G4cout << " pn total cross sections (mb) " << G4endl;
+  for (G4int i = 0; i < 5; i++) {
+    G4int istart = i*6;
+    G4int istop = istart + 6;
+    for (G4int t = istart; t < istop; t++) G4cout << pNtot[t] << "  " ;
+    G4cout << G4endl;
+  }
+}
+*/
 
 
Index: trunk/source/processes/hadronic/models/rpg/src/G4RPGPionInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/rpg/src/G4RPGPionInelastic.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/rpg/src/G4RPGPionInelastic.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4RPGPionInelastic.cc,v 1.1 2008/01/05 00:15:12 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4RPGPionInelastic.cc,v 1.2 2009/05/25 19:05:47 dennis Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
  
@@ -71,5 +71,30 @@
   }
 
+  //  printCrossSections();
+
 }
+
+
+/*
+void G4RPGPionInelastic::printCrossSections() const
+{
+  G4cout << " pi+ p total cross sections (mb) " << G4endl;
+  for (G4int i = 0; i < 5; i++) {
+    G4int istart = i*6;
+    G4int istop = istart + 6;
+    for (G4int t = istart; t < istop; t++) G4cout << pipPtot[t] << "  " ;
+    G4cout << G4endl;
+  }
+  G4cout << G4endl;
+
+  G4cout << " pi- p total cross sections (mb) " << G4endl;
+  for (G4int i = 0; i < 5; i++) {
+    G4int istart = i*6;
+    G4int istop = istart + 6;
+    for (G4int t = istart; t < istop; t++) G4cout << pimPtot[t] << "  " ;
+    G4cout << G4endl;
+  }
+}
+*/
 
 
Index: trunk/source/processes/hadronic/models/theo_high_energy/History
===================================================================
--- trunk/source/processes/hadronic/models/theo_high_energy/History	(revision 1007)
+++ trunk/source/processes/hadronic/models/theo_high_energy/History	(revision 1055)
@@ -14,4 +14,8 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+29-Apr-2009 M.Kosov         had-theo-HE-V09-02-02
+- Quasi Elastic part is made more used in QGSC at low energies to improve
+  the performance of QGSC at low energies
 
 8-Apr-2008  G.Folger        had-theo-HE-V09-01-01
Index: trunk/source/processes/hadronic/models/theo_high_energy/src/G4QuasiElasticChannel.cc
===================================================================
--- trunk/source/processes/hadronic/models/theo_high_energy/src/G4QuasiElasticChannel.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/theo_high_energy/src/G4QuasiElasticChannel.cc	(revision 1055)
@@ -25,9 +25,10 @@
 //
 //
-// $Id: G4QuasiElasticChannel.cc,v 1.4 2008/04/24 13:26:19 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4QuasiElasticChannel.cc,v 1.7 2009/04/09 08:28:42 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 
 // Author : Gunter Folger March 2007
+// Modified by Mikhail Kossov. Apr2009, E/M conservation: ResidualNucleus is added (ResNuc)
 // Class Description
 // Final state production model for theoretical models of hadron inelastic
@@ -42,5 +43,5 @@
 
 
-#include "G4HadTmpUtil.hh"		//lrint
+#include "G4HadTmpUtil.hh"  //lrint
 
 //#define debug_scatter
@@ -48,5 +49,5 @@
 G4QuasiElasticChannel::G4QuasiElasticChannel()
 {
-	theQuasiElastic=G4QuasiFreeRatios::GetPointer();
+ theQuasiElastic=G4QuasiFreeRatios::GetPointer();
 }
 
@@ -55,83 +56,129 @@
 
 G4double G4QuasiElasticChannel::GetFraction(G4Nucleus &theNucleus,
-				const G4DynamicParticle & thePrimary)
+    const G4DynamicParticle & thePrimary)
 {
-	std::pair<G4double,G4double> ratios;
-	ratios=theQuasiElastic->GetRatios(thePrimary.GetTotalMomentum(),
-			thePrimary.GetDefinition()->GetPDGEncoding(),
-			G4lrint(theNucleus.GetZ()),
-			G4lrint(theNucleus.GetN()-theNucleus.GetZ()));
-#ifdef debug_getFraction			
-	G4cout << "G4QuasiElasticChannel::ratios " << ratios.first << " x " <<ratios.second
-	       << "  = " << ratios.first*ratios.second << G4endl;
+  std::pair<G4double,G4double> ratios;
+#ifdef debug_scatter   
+  G4cout << "G4QuasiElasticChannel:: P=" << thePrimary.GetTotalMomentum()
+         << ", pPDG=" << thePrimary.GetDefinition()->GetPDGEncoding()
+         << ", Z = "  << G4lrint(theNucleus.GetZ())
+         << ", N = "  << G4lrint(theNucleus.GetN()-theNucleus.GetZ()) << G4endl;
 #endif
-	       
-	return ratios.first*ratios.second;       		
+  ratios=theQuasiElastic->GetRatios(thePrimary.GetTotalMomentum(),
+                                    thePrimary.GetDefinition()->GetPDGEncoding(),
+                                    G4lrint(theNucleus.GetZ()),
+                                    G4lrint(theNucleus.GetN()-theNucleus.GetZ()));
+#ifdef debug_scatter   
+  G4cout << "G4QuasiElasticChannel::ratios " << ratios.first << " x " <<ratios.second
+         << "  = " << ratios.first*ratios.second << G4endl;
+#endif
+        
+  return ratios.first*ratios.second;
+  //return 0.; // Switch off quasielastic (temporary) M.K.
+  //return 1.; // Only quasielastic (temporary) M.K. (DANGEROSE! Crashes at A=1!)
 }
 
 G4KineticTrackVector * G4QuasiElasticChannel::Scatter(G4Nucleus &theNucleus,
-					const G4DynamicParticle & thePrimary)
+                                                      const G4DynamicParticle & thePrimary)
 {
-	
-	
-	G4int A=G4lrint(theNucleus.GetN());
-//	G4int Z=G4lrint(theNucleus.GetZ());
-//   build Nucleus and choose random nucleon to scatter with
-	the3DNucleus.Init(theNucleus.GetN(),theNucleus.GetZ());
-	const std::vector<G4Nucleon *> nucleons=the3DNucleus.GetNucleons();
-	
-        G4int index;
-        do {
-	   index=G4lrint((A-1)*G4UniformRand());
-	   
-	} while (index < 0 || index >= static_cast<G4int>(nucleons.size()));
-	    
-//	G4double an=G4UniformRand()*A;
-	G4ParticleDefinition * pDef= nucleons[index]->GetDefinition();
-	
+  G4int A=G4lrint(theNucleus.GetN());
+  G4int Z=G4lrint(theNucleus.GetZ());                                 // M.K. ResNuc
+  //   build Nucleus and choose random nucleon to scatter with
+  the3DNucleus.Init(theNucleus.GetN(),theNucleus.GetZ());
 #ifdef debug_scatter
-	G4cout << " neutron - proton? A, Z, an, pdg" <<" "
-	       << A <<" "<<G4lrint(theNucleus.GetZ())
-	       << " "<<an <<" " << pDef->GetParticleName()<< G4endl;
+  G4cout<<"G4QElC::Scat: Before GetNucleons " << G4endl;
 #endif
-//	G4LorentzVector pNucleon(G4ThreeVector(0,0,0),pDef->GetPDGMass());
-	G4LorentzVector pNucleon=nucleons[index]->Get4Momentum();
-	
-	std::pair<G4LorentzVector,G4LorentzVector> result;
-	
-	result=theQuasiElastic->Scatter(pDef->GetPDGEncoding(),pNucleon,
-	                       thePrimary.GetDefinition()->GetPDGEncoding(),
-			        thePrimary.Get4Momentum());
-				
-	if (result.first.e() == 0.)
-	{
-	   G4cout << "Warning - G4QuasiElasticChannel::Scatter no scattering" << G4endl;
-	   return 0;       //no scatter
-	}
+  const std::vector<G4Nucleon *> nucleons=the3DNucleus.GetNucleons();
+  G4double targetNucleusMass=the3DNucleus.GetMass();                  // M.K. ResNuc
+#ifdef debug_scatter
+  G4cout<<"G4QElC::Scat: targetMass = " << targetNucleusMass << G4endl;
+#endif
+  G4LorentzVector targetNucleus4Mom(0.,0.,0.,targetNucleusMass);      // M.K. ResNuc
+  G4int index;
+  do
+  {
+    index=G4lrint((A-1)*G4UniformRand());
+  } while (index < 0 || index >= static_cast<G4int>(nucleons.size()));
+#ifdef debug_scatter
+  G4cout<<"G4QElC::Scat: index = " << index << G4endl;
+#endif
+  G4ParticleDefinition * pDef= nucleons[index]->GetDefinition();
+  G4int resA=A-1;                                                     // M.K. ResNuc
+  G4int resZ=Z-static_cast<int>(pDef->GetPDGCharge());                // M.K. ResNuc
+  G4ParticleDefinition* resDef=G4Neutron::Neutron(); // Resolve t-p=nn problem M.K. ResNuc
+  G4double residualNucleusMass=resDef->GetPDGMass();                  // M.K. ResNuc
+  if(resZ)
+  {
+    resDef=G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ);// M.K. ResNuc
+    residualNucleusMass=resDef->GetPDGMass();                         // M.K. ResNuc
+  }
+  else residualNucleusMass*=resA;                           // resA=resN M.K. ResNuc 
+#ifdef debug_scatter
+  G4cout<<"G4QElChan::Scatter: neutron - proton? A ="<<A<<", Z="<<Z<<", projName="
+        <<pDef->GetParticleName()<<G4endl;
+#endif
+  // G4LorentzVector pNucleon(G4ThreeVector(0,0,0),pDef->GetPDGMass());
+  G4LorentzVector pNucleon=nucleons[index]->Get4Momentum();
+  G4double residualNucleusEnergy=std::sqrt(residualNucleusMass*residualNucleusMass+
+                                           pNucleon.vect().mag2());   // M.K. ResNuc
+  pNucleon.setE(targetNucleusMass-residualNucleusEnergy);             // M.K. ResNuc
+  G4LorentzVector residualNucleus4Mom=targetNucleus4Mom-pNucleon;     // M.K. ResNuc
+ 
+  std::pair<G4LorentzVector,G4LorentzVector> result;
+ 
+  result=theQuasiElastic->Scatter(pDef->GetPDGEncoding(),pNucleon,
+                                  thePrimary.GetDefinition()->GetPDGEncoding(),
+  thePrimary.Get4Momentum());
+  G4LorentzVector scatteredHadron4Mom=result.second;                  // M.K. ResNuc
+  if (result.first.e() <= 0.)
+  {
+    //G4cout << "Warning - G4QuasiElasticChannel::Scatter no scattering" << G4endl;
+    //return 0;       //no scatter
+    G4LorentzVector scatteredHadron4Mom=thePrimary.Get4Momentum();   // M.K. ResNuc
+    residualNucleus4Mom=G4LorentzVector(0.,0.,0.,targetNucleusMass); // M.K. ResNuc
+    resDef=G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z);    // M.K. ResNuc
+  }
 
 #ifdef debug_scatter
-        G4LorentzVector EpConservation=pNucleon+thePrimary.Get4Momentum() 
-	                                - result.first - result.second;
-	if (   (EpConservation.vect().mag2() > 0.01*MeV*MeV )
-	    || 	(std::abs(EpConservation.e()) > 0.1 * MeV ) ) 
-	{
-	    G4cout << "Warning - G4QuasiElasticChannel::Scatter E-p non conservation : "
-	            << EpConservation << G4endl;
-	}    
+  G4LorentzVector EpConservation=pNucleon+thePrimary.Get4Momentum() 
+                                 - result.first - result.second;
+  if (   (EpConservation.vect().mag2() > .01*MeV*MeV )
+      || (std::abs(EpConservation.e()) > 0.1 * MeV ) ) 
+  {
+    G4cout << "Warning - G4QuasiElasticChannel::Scatter E-p non conservation : "
+           << EpConservation << G4endl;
+  }    
 #endif
 
-	G4KineticTrackVector * ktv;
-	ktv=new G4KineticTrackVector();
-	G4KineticTrack * sPrim=new G4KineticTrack(thePrimary.GetDefinition(),
-			0.,G4ThreeVector(0), result.second);
-	ktv->push_back(sPrim);
-	G4KineticTrack * sNuc=new G4KineticTrack(pDef,
-			0.,G4ThreeVector(0), result.first);
-	ktv->push_back(sNuc);
-	
+  G4KineticTrackVector * ktv;
+  ktv=new G4KineticTrackVector();
+  G4KineticTrack * sPrim=new G4KineticTrack(thePrimary.GetDefinition(),
+                                            0.,G4ThreeVector(0), scatteredHadron4Mom);
+  ktv->push_back(sPrim);
+  if (result.first.e() > 0.)
+  {
+    G4KineticTrack * sNuc=new G4KineticTrack(pDef, 0.,G4ThreeVector(0), result.first);
+    ktv->push_back(sNuc);
+  }
+  if(resZ || resA==1) // For the only neutron or for tnuclei with Z>0    M.K. ResNuc
+  {
+    G4KineticTrack * rNuc=new G4KineticTrack(resDef,
+                           0.,G4ThreeVector(0), residualNucleus4Mom); // M.K. ResNuc
+    ktv->push_back(rNuc);                                             // M.K. ResNuc
+  }
+  else // The residual nucleus consists of only neutrons                 M.K. ResNuc
+  {
+    residualNucleus4Mom/=resA;     // Split 4-mom of A*n system equally  M.K. ResNuc
+    for(G4int in=0; in<resA; in++) // Loop over neutrons in A*n system.  M.K. ResNuc
+    {
+      G4KineticTrack* rNuc=new G4KineticTrack(resDef,
+                           0.,G4ThreeVector(0), residualNucleus4Mom); // M.K. ResNuc
+      ktv->push_back(rNuc);                                           // M.K. ResNuc
+    }
+  }
 #ifdef debug_scatter
-	G4cout << " scattered Nucleon : " << result.first << " mass " <<result.first.mag() << G4endl;
-	G4cout << " scattered Project : " << result.second << " mass " <<result.second.mag() << G4endl;
+  G4cout<<"G4QElC::Scat: Nucleon: "<<result.first <<" mass "<<result.first.mag() << G4endl;
+  G4cout<<"G4QElC::Scat: Project: "<<result.second<<" mass "<<result.second.mag()<< G4endl;
 #endif
-	return ktv;			       
+  return ktv;
 }
Index: trunk/source/processes/hadronic/models/theo_high_energy/src/G4TheoFSGenerator.cc
===================================================================
--- trunk/source/processes/hadronic/models/theo_high_energy/src/G4TheoFSGenerator.cc	(revision 1007)
+++ trunk/source/processes/hadronic/models/theo_high_energy/src/G4TheoFSGenerator.cc	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4TheoFSGenerator.cc,v 1.9 2007/11/13 16:01:36 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4TheoFSGenerator.cc,v 1.11 2009/04/09 08:28:42 mkossov Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // G4TheoFSGenerator
@@ -91,5 +91,40 @@
      if ( theQuasielastic->GetFraction(theNucleus, *aPart) > G4UniformRand() )
      {
-        G4KineticTrackVector *result= theQuasielastic->Scatter(theNucleus, *aPart);
+       //G4cout<<"___G4TheoFSGenerator: before Scatter (1) QE=" << theQuasielastic<<G4endl;
+       G4KineticTrackVector *result= theQuasielastic->Scatter(theNucleus, *aPart);
+       //G4cout << "^^G4TheoFSGenerator: after Scatter (1) " << G4endl;
+       if (result)
+       {
+	    for(unsigned int  i=0; i<result->size(); i++)
+	    {
+	      G4DynamicParticle * aNew = 
+		 new G4DynamicParticle(result->operator[](i)->GetDefinition(),
+                        	       result->operator[](i)->Get4Momentum().e(),
+                        	       result->operator[](i)->Get4Momentum().vect());
+	      theParticleChange->AddSecondary(aNew);
+	      delete result->operator[](i);
+	    }
+	    delete result;
+	   
+       } else 
+       {
+	    theParticleChange->SetStatusChange(isAlive);
+	    theParticleChange->SetEnergyChange(thePrimary.GetKineticEnergy());
+	    theParticleChange->SetMomentumChange(thePrimary.Get4Momentum().vect().unit());
+ 
+       }
+	return theParticleChange;
+     } 
+  }
+  if ( theProjectileDiffraction) {
+  
+     if ( theProjectileDiffraction->GetFraction(theNucleus, *aPart) > G4UniformRand() )
+      // strictly, this returns fraction on inelastic, so quasielastic should 
+	//    already be substracted, ie. quasielastic should always be used
+	//     before diffractive
+     {
+       //G4cout << "____G4TheoFSGenerator: before Scatter (2) " << G4endl;
+       G4KineticTrackVector *result= theProjectileDiffraction->Scatter(theNucleus, *aPart);
+       //G4cout << "^^^^G4TheoFSGenerator: after Scatter (2) " << G4endl;
 	if (result)
 	{
@@ -115,39 +150,8 @@
      } 
   }
-  if ( theProjectileDiffraction) {
-  
-     if ( theProjectileDiffraction->GetFraction(theNucleus, *aPart) > G4UniformRand() )
-        // strictly, this returns fraction on inelastic, so quasielastic should 
-	//    already be substracted, ie. quasielastic should always be used
-	//     before diffractive
-     {
-        G4KineticTrackVector *result= theProjectileDiffraction->Scatter(theNucleus, *aPart);
-	if (result)
-	{
-	    for(unsigned int  i=0; i<result->size(); i++)
-	    {
-	      G4DynamicParticle * aNew = 
-		 new G4DynamicParticle(result->operator[](i)->GetDefinition(),
-                        	       result->operator[](i)->Get4Momentum().e(),
-                        	       result->operator[](i)->Get4Momentum().vect());
-	      theParticleChange->AddSecondary(aNew);
-	      delete result->operator[](i);
-	    }
-	    delete result;
-	   
-	} else 
-	{
-	    theParticleChange->SetStatusChange(isAlive);
-	    theParticleChange->SetEnergyChange(thePrimary.GetKineticEnergy());
-	    theParticleChange->SetMomentumChange(thePrimary.Get4Momentum().vect().unit());
- 
-	}
-	return theParticleChange;
-     } 
-  }
-
+  //G4cout << "____G4TheoFSGenerator: before Scatter (3) " << G4endl;
   G4KineticTrackVector * theInitialResult =
                theHighEnergyGenerator->Scatter(theNucleus, *aPart);
-  
+  //G4cout << "^^^^G4TheoFSGenerator: after Scatter (3) " << G4endl;
   
   G4ReactionProductVector * theTransportResult = NULL;
Index: trunk/source/processes/hadronic/processes/History
===================================================================
--- trunk/source/processes/hadronic/processes/History	(revision 1007)
+++ trunk/source/processes/hadronic/processes/History	(revision 1055)
@@ -1,4 +1,4 @@
 -------------------------------------------------------------------
-$Id: History,v 1.5 2008/10/02 20:40:16 dennis Exp $
+$Id: History,v 1.6 2009/03/31 19:16:38 vnivanch Exp $
 -------------------------------------------------------------------
 
@@ -16,4 +16,11 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+31 Mar 2009 Vladimir Ivanchenko (hadr-proc-V09-02-00)
+----------------------------------------------------
+- To fix bug #1056 cross section data set now are created by new in
+  G4PhotoNuclearProcess, G4ElectronNuclearProcess, and 
+  G4PositronNuclearProcess. For the last class inline constructor 
+  and destructors moved to source 
 
 2 Oct 2008 Dennis Wright (hadr-proc-V09-01-02)
Index: trunk/source/processes/hadronic/processes/include/G4ElectronNuclearProcess.hh
===================================================================
--- trunk/source/processes/hadronic/processes/include/G4ElectronNuclearProcess.hh	(revision 1007)
+++ trunk/source/processes/hadronic/processes/include/G4ElectronNuclearProcess.hh	(revision 1055)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4ElectronNuclearProcess.hh,v 1.5 2006/06/29 21:02:17 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4ElectronNuclearProcess.hh,v 1.6 2009/03/31 19:16:38 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Class Description:
@@ -42,18 +42,13 @@
  
 #include "G4HadronInelasticProcess.hh"
-#include "G4ElectroNuclearCrossSection.hh"
  
+class G4ElectronNuclearProcess : public G4HadronInelasticProcess
+{
+public:
+    
+  G4ElectronNuclearProcess( const G4String& processName = "ElectroNuclear" );
+  virtual ~G4ElectronNuclearProcess();
 
- class G4ElectronNuclearProcess : public G4HadronInelasticProcess
- {
- public:
-    
-    G4ElectronNuclearProcess( const G4String& processName = "ElectroNuclear" );
-    ~G4ElectronNuclearProcess();
-
- private:
- 
-   G4ElectroNuclearCrossSection theData;
- };
+};
 
 #endif
Index: trunk/source/processes/hadronic/processes/include/G4PhotoNuclearProcess.hh
===================================================================
--- trunk/source/processes/hadronic/processes/include/G4PhotoNuclearProcess.hh	(revision 1007)
+++ trunk/source/processes/hadronic/processes/include/G4PhotoNuclearProcess.hh	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4PhotoNuclearProcess.hh,v 1.8 2007/01/07 04:56:01 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4PhotoNuclearProcess.hh,v 1.9 2009/03/31 19:16:38 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 // Class Description
@@ -40,18 +40,13 @@
  
 #include "G4HadronInelasticProcess.hh"
-#include "G4PhotoNuclearCrossSection.hh"
  
+class G4PhotoNuclearProcess : public G4HadronInelasticProcess
+{
+public:
+    
+  G4PhotoNuclearProcess( const G4String& processName = "PhotonInelastic" );
+  virtual ~G4PhotoNuclearProcess();
 
- class G4PhotoNuclearProcess : public G4HadronInelasticProcess
- {
- public:
-    
-    G4PhotoNuclearProcess( const G4String& processName = "PhotonInelastic" );
-    ~G4PhotoNuclearProcess();
-
- private:
- 
-   G4PhotoNuclearCrossSection theData;
- };
+};
 
 #endif
Index: trunk/source/processes/hadronic/processes/include/G4PositronNuclearProcess.hh
===================================================================
--- trunk/source/processes/hadronic/processes/include/G4PositronNuclearProcess.hh	(revision 1007)
+++ trunk/source/processes/hadronic/processes/include/G4PositronNuclearProcess.hh	(revision 1055)
@@ -36,29 +36,15 @@
 // Class Description - End
 
-#include "G4HadronInelasticProcess.hh"
-#include "G4Positron.hh"
-#include "G4ElectroNuclearCrossSection.hh"
- 
+#include "G4HadronInelasticProcess.hh" 
 
- class G4PositronNuclearProcess : public G4HadronInelasticProcess
- {
- public:
+class G4PositronNuclearProcess : public G4HadronInelasticProcess
+{
+public:
     
-    G4PositronNuclearProcess(
-     const G4String& processName = "PositronNuclear" ) :
+  G4PositronNuclearProcess(const G4String& processName = "PositronNuclear" );
+    
+  virtual ~G4PositronNuclearProcess();
 
-    G4HadronInelasticProcess( processName, G4Positron::Positron() )
-    { 
-      G4CrossSectionDataStore * theStore = GetCrossSectionDataStore();
-      theStore->AddDataSet(&theData);
-    } 
-    
-    ~G4PositronNuclearProcess()
-    { }
-    
- private:
- 
-   G4ElectroNuclearCrossSection theData;
- };
+};
 
 #endif
Index: trunk/source/processes/hadronic/processes/src/G4ElectronNuclearProcess.cc
===================================================================
--- trunk/source/processes/hadronic/processes/src/G4ElectronNuclearProcess.cc	(revision 1007)
+++ trunk/source/processes/hadronic/processes/src/G4ElectronNuclearProcess.cc	(revision 1055)
@@ -25,10 +25,11 @@
 //
 //
-// $Id: G4ElectronNuclearProcess.cc,v 1.2 2006/06/29 21:03:02 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4ElectronNuclearProcess.cc,v 1.3 2009/03/31 19:16:38 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 
 #include "G4ElectronNuclearProcess.hh" 
 #include "G4Electron.hh"
+#include "G4ElectroNuclearCrossSection.hh"
 
 G4ElectronNuclearProcess::
@@ -37,5 +38,5 @@
 { 
   G4CrossSectionDataStore * theStore = GetCrossSectionDataStore();
-  theStore->AddDataSet(&theData);
+  theStore->AddDataSet(new G4ElectroNuclearCrossSection);
 } 
     
Index: trunk/source/processes/hadronic/processes/src/G4PhotoNuclearProcess.cc
===================================================================
--- trunk/source/processes/hadronic/processes/src/G4PhotoNuclearProcess.cc	(revision 1007)
+++ trunk/source/processes/hadronic/processes/src/G4PhotoNuclearProcess.cc	(revision 1055)
@@ -26,10 +26,11 @@
 //
 //
-// $Id: G4PhotoNuclearProcess.cc,v 1.2 2006/06/29 21:03:54 gunter Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4PhotoNuclearProcess.cc,v 1.3 2009/03/31 19:16:38 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 
 #include "G4PhotoNuclearProcess.hh"
 #include "G4Gamma.hh"
+#include "G4PhotoNuclearCrossSection.hh"
 
 G4PhotoNuclearProcess::
@@ -38,5 +39,5 @@
 { 
   G4CrossSectionDataStore * theStore = GetCrossSectionDataStore();
-  theStore->AddDataSet(&theData);
+  theStore->AddDataSet(new G4PhotoNuclearCrossSection);
 } 
     
Index: trunk/source/processes/hadronic/stopping/History
===================================================================
--- trunk/source/processes/hadronic/stopping/History	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/History	(revision 1055)
@@ -14,4 +14,12 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+02-Feb-2009 Vladimir Ivantchenko (hadr-stopping-V09-02-01)
+----------------------------------------------------------
+- added registration/deregistration to all LHEP processes
+
+23-Jan-2009 Vladimir Ivantchenko (hadr-stopping-V09-02-00)
+----------------------------------------------------------
+G4MuonMinusCaptureAtRest - added deregistration  
 
 22-Oct-2008 Dennis Wright (hadr-stopping-V09-01-05)
Index: trunk/source/processes/hadronic/stopping/include/G4AntiNeutronAnnihilationAtRest.hh
===================================================================
--- trunk/source/processes/hadronic/stopping/include/G4AntiNeutronAnnihilationAtRest.hh	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/include/G4AntiNeutronAnnihilationAtRest.hh	(revision 1055)
@@ -61,6 +61,7 @@
      G4bool IsApplicable(const G4ParticleDefinition&);
 
-  // null physics table
-     void BuildPhysicsTable(const G4ParticleDefinition&){}
+     void PreparePhysicsTable(const G4ParticleDefinition&);
+
+     void BuildPhysicsTable(const G4ParticleDefinition&);
 
      G4double AtRestGetPhysicalInteractionLength(const G4Track&,
Index: trunk/source/processes/hadronic/stopping/include/G4AntiProtonAnnihilationAtRest.hh
===================================================================
--- trunk/source/processes/hadronic/stopping/include/G4AntiProtonAnnihilationAtRest.hh	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/include/G4AntiProtonAnnihilationAtRest.hh	(revision 1055)
@@ -61,6 +61,7 @@
      G4bool IsApplicable(const G4ParticleDefinition&);
 
-  // null physics table
-     void BuildPhysicsTable(const G4ParticleDefinition&){}
+     void PreparePhysicsTable(const G4ParticleDefinition&);
+
+     void BuildPhysicsTable(const G4ParticleDefinition&);
 
      G4double AtRestGetPhysicalInteractionLength(const G4Track&,
Index: trunk/source/processes/hadronic/stopping/include/G4KaonMinusAbsorption.hh
===================================================================
--- trunk/source/processes/hadronic/stopping/include/G4KaonMinusAbsorption.hh	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/include/G4KaonMinusAbsorption.hh	(revision 1055)
@@ -62,6 +62,7 @@
      G4bool IsApplicable(const G4ParticleDefinition&);
 
-  // null physics table
-     void BuildPhysicsTable(const G4ParticleDefinition&){}
+     void PreparePhysicsTable(const G4ParticleDefinition&);
+
+     void BuildPhysicsTable(const G4ParticleDefinition&);
 
      G4double AtRestGetPhysicalInteractionLength(const G4Track&,
Index: trunk/source/processes/hadronic/stopping/include/G4KaonMinusAbsorptionAtRest.hh
===================================================================
--- trunk/source/processes/hadronic/stopping/include/G4KaonMinusAbsorptionAtRest.hh	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/include/G4KaonMinusAbsorptionAtRest.hh	(revision 1055)
@@ -69,4 +69,8 @@
                return( particle == *(G4KaonMinus::KaonMinus()) );
   }
+
+  void PreparePhysicsTable(const G4ParticleDefinition&);
+
+  void BuildPhysicsTable(const G4ParticleDefinition&);
 
   // the main method ...
Index: trunk/source/processes/hadronic/stopping/include/G4NeutronCaptureAtRest.hh
===================================================================
--- trunk/source/processes/hadronic/stopping/include/G4NeutronCaptureAtRest.hh	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/include/G4NeutronCaptureAtRest.hh	(revision 1055)
@@ -62,6 +62,8 @@
      G4bool IsApplicable(const G4ParticleDefinition&);
 
+     void PreparePhysicsTable(const G4ParticleDefinition&);
+
   // null physics table
-     void BuildPhysicsTable(const G4ParticleDefinition&){}
+     void BuildPhysicsTable(const G4ParticleDefinition&);
 
      G4double AtRestGetPhysicalInteractionLength(const G4Track&,
Index: trunk/source/processes/hadronic/stopping/include/G4PiMinusAbsorptionAtRest.hh
===================================================================
--- trunk/source/processes/hadronic/stopping/include/G4PiMinusAbsorptionAtRest.hh	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/include/G4PiMinusAbsorptionAtRest.hh	(revision 1055)
@@ -75,4 +75,8 @@
     { return ( particle == *(G4PionMinus::PionMinus()) ); }
 
+  void PreparePhysicsTable(const G4ParticleDefinition&);
+
+  void BuildPhysicsTable(const G4ParticleDefinition&);
+
   G4VParticleChange* AtRestDoIt(const G4Track& aTrack, const G4Step& aStep); 
 
Index: trunk/source/processes/hadronic/stopping/include/G4PionMinusAbsorptionAtRest.hh
===================================================================
--- trunk/source/processes/hadronic/stopping/include/G4PionMinusAbsorptionAtRest.hh	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/include/G4PionMinusAbsorptionAtRest.hh	(revision 1055)
@@ -61,6 +61,8 @@
      G4bool IsApplicable(const G4ParticleDefinition&);
 
+     void PreparePhysicsTable(const G4ParticleDefinition&);
+
   // null physics table
-     void BuildPhysicsTable(const G4ParticleDefinition&){}
+     void BuildPhysicsTable(const G4ParticleDefinition&);
 
      G4double AtRestGetPhysicalInteractionLength(const G4Track&,
Index: trunk/source/processes/hadronic/stopping/src/G4AntiNeutronAnnihilationAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4AntiNeutronAnnihilationAtRest.cc	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/src/G4AntiNeutronAnnihilationAtRest.cc	(revision 1055)
@@ -31,4 +31,5 @@
 #include "G4DynamicParticle.hh"
 #include "G4ParticleTypes.hh"
+#include "G4HadronicProcessStore.hh"
 #include "Randomize.hh" 
 #include <string.h>
@@ -68,4 +69,5 @@
   gkin = new G4GHEKinematicsVector [MAX_SECONDARIES];
 
+  G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
 }
  
@@ -74,4 +76,5 @@
 G4AntiNeutronAnnihilationAtRest::~G4AntiNeutronAnnihilationAtRest()
 {
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
   delete [] pv;
   delete [] eve;
@@ -79,4 +82,13 @@
 }
  
+void G4AntiNeutronAnnihilationAtRest::PreparePhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->RegisterParticleForExtraProcess(this, &p);
+}
+
+void G4AntiNeutronAnnihilationAtRest::BuildPhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->PrintInfo(&p);
+}
  
 // methods.............................................................................
@@ -89,5 +101,5 @@
 
 }
- 
+
 // Warning - this method may be optimized away if made "inline"
 G4int G4AntiNeutronAnnihilationAtRest::GetNumberOfSecondaries()
Index: trunk/source/processes/hadronic/stopping/src/G4AntiProtonAnnihilationAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4AntiProtonAnnihilationAtRest.cc	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/src/G4AntiProtonAnnihilationAtRest.cc	(revision 1055)
@@ -32,4 +32,5 @@
 #include "G4ParticleTypes.hh"
 #include "Randomize.hh" 
+#include "G4HadronicProcessStore.hh"
 #include <string.h>
 #include <cmath>
@@ -68,4 +69,5 @@
   gkin = new G4GHEKinematicsVector [MAX_SECONDARIES];
 
+  G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
 }
  
@@ -74,4 +76,5 @@
 G4AntiProtonAnnihilationAtRest::~G4AntiProtonAnnihilationAtRest()
 {
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
   delete [] pv;
   delete [] eve;
@@ -79,4 +82,13 @@
 }
  
+void G4AntiProtonAnnihilationAtRest::PreparePhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->RegisterParticleForExtraProcess(this, &p);
+}
+
+void G4AntiProtonAnnihilationAtRest::BuildPhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->PrintInfo(&p);
+}
  
 // methods.............................................................................
Index: trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorption.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorption.cc	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorption.cc	(revision 1055)
@@ -32,4 +32,5 @@
 #include "G4ParticleTypes.hh"
 #include "Randomize.hh" 
+#include "G4HadronicProcessStore.hh"
 #include <string.h>
 #include <cmath>
@@ -66,4 +67,5 @@
   gkin = new G4GHEKinematicsVector [MAX_SECONDARIES];
 
+  G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
 }
  
@@ -72,9 +74,19 @@
 G4KaonMinusAbsorption::~G4KaonMinusAbsorption()
 {
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
   delete [] pv;
   delete [] eve;
   delete [] gkin;
 }
- 
+
+void G4KaonMinusAbsorption::PreparePhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->RegisterParticleForExtraProcess(this, &p);
+}
+
+void G4KaonMinusAbsorption::BuildPhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->PrintInfo(&p);
+} 
  
 // methods.............................................................................
Index: trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorptionAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorptionAtRest.cc	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/src/G4KaonMinusAbsorptionAtRest.cc	(revision 1055)
@@ -43,4 +43,5 @@
 #include "G4StopDeexcitationAlgorithm.hh"
 #include "G4ReactionKinematics.hh"
+#include "G4HadronicProcessStore.hh"
 
 G4KaonMinusAbsorptionAtRest::G4KaonMinusAbsorptionAtRest(const G4String& processName,
@@ -80,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
Index: trunk/source/processes/hadronic/stopping/src/G4MuonMinusCaptureAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4MuonMinusCaptureAtRest.cc	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/src/G4MuonMinusCaptureAtRest.cc	(revision 1055)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4MuonMinusCaptureAtRest.cc,v 1.53 2008/10/02 20:57:52 dennis Exp $
-// GEANT4 tag $Name: geant4-09-02 $
+// $Id: G4MuonMinusCaptureAtRest.cc,v 1.54 2009/01/24 11:55:38 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
 //
 //   G4MuonMinusCaptureAtRest physics process
@@ -33,9 +33,10 @@
 //
 // Modifications: 
-// 18/08/2000  V.Ivanchenko Update description
+// 18/08/2000  V.Ivanchenko Update description 
 // 12/12/2003  H.P.Wellisch Completly rewrite mu-nuclear part
 // 17/05/2006  V.Ivanchenko Cleanup
 // 15/11/2006  V.Ivanchenko Review and rewrite all kinematics
 // 24/01/2007  V.Ivanchenko Force to work with integer Z and A
+// 23/01/2009  V.Ivanchenko Add deregistration
 //
 //-----------------------------------------------------------------------------
@@ -75,4 +76,5 @@
 G4MuonMinusCaptureAtRest::~G4MuonMinusCaptureAtRest()
 {
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
   delete [] Cascade;
   delete pSelector;
Index: trunk/source/processes/hadronic/stopping/src/G4NeutronCaptureAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4NeutronCaptureAtRest.cc	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/src/G4NeutronCaptureAtRest.cc	(revision 1055)
@@ -32,4 +32,5 @@
 #include "G4ParticleTypes.hh"
 #include "Randomize.hh" 
+#include "G4HadronicProcessStore.hh"
 #include <string.h>
 #include <cmath>
@@ -59,4 +60,5 @@
   gkin = new G4GHEKinematicsVector [MAX_SECONDARIES];
 
+  G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
 }
  
@@ -65,4 +67,5 @@
 G4NeutronCaptureAtRest::~G4NeutronCaptureAtRest()
 {
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
   delete [] pv;
   delete [] eve;
@@ -70,4 +73,13 @@
 }
  
+void G4NeutronCaptureAtRest::PreparePhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->RegisterParticleForExtraProcess(this, &p);
+}
+
+void G4NeutronCaptureAtRest::BuildPhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->PrintInfo(&p);
+}
  
 // methods.............................................................................
Index: trunk/source/processes/hadronic/stopping/src/G4PiMinusAbsorptionAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4PiMinusAbsorptionAtRest.cc	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/src/G4PiMinusAbsorptionAtRest.cc	(revision 1055)
@@ -57,4 +57,5 @@
 #include "G4ThreeVector.hh"
 #include "G4LorentzVector.hh"
+#include "G4HadronicProcessStore.hh"
 
 // Constructor
@@ -70,4 +71,5 @@
   if (verboseLevel>0) 
     { G4cout << GetProcessName() << " is created "<< G4endl; }
+  G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
 }
 
@@ -76,6 +78,17 @@
 
 G4PiMinusAbsorptionAtRest::~G4PiMinusAbsorptionAtRest()
-{}
-
+{
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
+}
+
+void G4PiMinusAbsorptionAtRest::PreparePhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->RegisterParticleForExtraProcess(this, &p);
+}
+
+void G4PiMinusAbsorptionAtRest::BuildPhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->PrintInfo(&p);
+}
 
 G4VParticleChange* G4PiMinusAbsorptionAtRest::AtRestDoIt(const G4Track& track, const G4Step& )
Index: trunk/source/processes/hadronic/stopping/src/G4PionMinusAbsorptionAtRest.cc
===================================================================
--- trunk/source/processes/hadronic/stopping/src/G4PionMinusAbsorptionAtRest.cc	(revision 1007)
+++ trunk/source/processes/hadronic/stopping/src/G4PionMinusAbsorptionAtRest.cc	(revision 1055)
@@ -32,4 +32,5 @@
 #include "G4ParticleTypes.hh"
 #include "Randomize.hh" 
+#include "G4HadronicProcessStore.hh"
 #include <string.h>
 #include <cmath>
@@ -61,4 +62,5 @@
   gkin = new G4GHEKinematicsVector [MAX_SECONDARIES];
 
+  G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
 }
  
@@ -67,4 +69,5 @@
 G4PionMinusAbsorptionAtRest::~G4PionMinusAbsorptionAtRest()
 {
+  G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this);
   delete [] pv;
   delete [] eve;
@@ -72,4 +75,13 @@
 }
  
+void G4PionMinusAbsorptionAtRest::PreparePhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->RegisterParticleForExtraProcess(this, &p);
+}
+
+void G4PionMinusAbsorptionAtRest::BuildPhysicsTable(const G4ParticleDefinition& p) 
+{
+  G4HadronicProcessStore::Instance()->PrintInfo(&p);
+}
  
 // methods.............................................................................
Index: trunk/source/processes/hadronic/util/History
===================================================================
--- trunk/source/processes/hadronic/util/History	(revision 1007)
+++ trunk/source/processes/hadronic/util/History	(revision 1055)
@@ -14,4 +14,8 @@
      * Please list in reverse chronological order (last date on top)
      ---------------------------------------------------------------
+
+06 Mar 2009 D.H. Wright for Tatsumi Koi (hadr-util-V09-02-00)
+-------------------------------------------------------------
+- G4StableIsotopes.cc - fill in missing isotope names
 
 23 Jul 2008 D.H. Wright for Vladimir Uzhinskiy (hadr-util-V09-01-01)
Index: trunk/source/processes/hadronic/util/src/G4StableIsotopes.cc
===================================================================
--- trunk/source/processes/hadronic/util/src/G4StableIsotopes.cc	(revision 1007)
+++ trunk/source/processes/hadronic/util/src/G4StableIsotopes.cc	(revision 1055)
@@ -25,9 +25,10 @@
 //
 //
+// 090227 Fill element symbols by T. Koi
 //
 #include "G4StableIsotopes.hh"
 
 const G4int G4StableIsotopes::protonCount[92] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92};
-const G4String G4StableIsotopes::elementName[92] = {"H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "", "Nb", "Mo", "", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd", "", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb", "Bi", "", "", "", "", "", "", "Th", "", "U"};
+const G4String G4StableIsotopes::elementName[92] = {"H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Th", "Pa", "U"};
 const G4int G4StableIsotopes::nIsotopes[92] = {2, 2, 2, 1, 2, 2, 2, 3, 1, 3, 1, 3, 1, 3, 1, 4, 2, 3, 3, 6, 1, 5, 2, 4, 1, 4, 1, 5, 2, 5, 2, 5, 1, 6, 2, 6, 2, 4, 1, 5, 1, 7, 0, 7, 1, 6, 2, 8, 2, 10, 2, 8, 1, 9, 1, 7, 2, 4, 1, 7, 0, 7, 2, 7, 1, 7, 1, 6, 1, 7, 2, 6, 2, 5, 2, 7, 2, 6, 1, 7, 2, 4, 1, 0, 0, 0, 0, 0, 0, 1, 0, 3};
 const G4int G4StableIsotopes::start[92] = {0, 2, 4, 6, 7, 9, 11, 13, 16, 17, 20, 21, 24, 25, 28, 29, 33, 35, 38, 41, 47, 48, 53, 55, 59, 60, 64, 65, 70, 72, 77, 79, 84, 85, 91, 93, 99, 101, 105, 106, 111, 112, 119, 119, 126, 127, 133, 135, 143, 145, 155, 157, 165, 166, 175, 176, 183, 185, 189, 190, 197, 197, 204, 206, 213, 214, 221, 222, 228, 229, 236, 238, 244, 246, 251, 253, 260, 262, 268, 269, 276, 278, 282, 283, 283, 283, 283, 283, 283, 283, 284, 284};
