Index: trunk/source/processes/hadronic/models/high_energy/History
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/History	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/History	(revision 962)
@@ -15,12 +15,35 @@
   ---------------------------------------------------------------
 
-23 Apr 2008 - Gabriele Cosmo (hadr-hep-V09-00-02)
----------------------------------------------------
- Tag for release 9.1.p02.
+23 July 2008 - Dennis Wright for Vladimir Uzhinskiy (hadr-hep-V09-01-04)
+------------------------------------------------------------------------
+ G4HEInelastic::HighEnergyCascading: fix bug in momentum sampling which 
+   caused oscillatory behavior in spectrum.
+   Replace
+     xval = Amin(1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1])/2.));
+   with 
+     xval = Amin(1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1])));
 
+  G4HEInelastic::MediumEnergyCascading: same as above
+
+9 July 2008 - Dennis Wright (hadr-hep-V09-01-03)
+------------------------------------------------
+ G4HEInelastic::Factorial: replace exit with G4Exception.
+
+9 June 2008 - Dennis Wright (hadr-hep-V09-01-02)
+------------------------------------------------
+ G4HEInelastic::NBodyPhaseSpace: remove error message "total mass > total energy"
+ and replace with message only when verbosity is > 1
+
+15 May 2008 - Dennis Wright (hadr-hep-V09-01-01)
+------------------------------------------------
+ G4HEInelastic::TuningOfHighEnergyCascade: remove abnormally high pt 
+ secondaries due to incident strange particles by prohibiting the 
+ assignment of leading particle to anything that goes backward in the 
+ CM frame.   
+ 
 17 Mar 2008 - Dennis Wright (hadr-hep-V09-01-00)
 ------------------------------------------------
  Add braces around single-statement if/else blocks to fix warning from 
-  gcc-4.3 compiler.  Nearly all files affected.
+ gcc-4.3 compiler.  Nearly all files affected.
 
 19 Nov 2007 - Dennis Wright (hadr-hep-V09-00-01)
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiKaonZeroInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiKaonZeroInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiKaonZeroInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiKaonZeroInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiLambdaInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiLambdaInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiLambdaInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiLambdaInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiNeutronInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiNeutronInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiNeutronInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiNeutronInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiOmegaMinusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiOmegaMinusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiOmegaMinusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiOmegaMinusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiProtonInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiProtonInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiProtonInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiProtonInelastic.hh,v 1.15 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaMinusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaMinusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaMinusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiSigmaMinusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaPlusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaPlusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaPlusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiSigmaPlusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaZeroInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaZeroInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaZeroInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiSigmaZeroInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiXiMinusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiXiMinusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiXiMinusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiXiMinusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiXiZeroInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiXiZeroInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiXiZeroInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiXiZeroInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonMinusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonMinusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonMinusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEKaonMinusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonPlusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonPlusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonPlusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEKaonPlusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEKaonZeroInelastic.hh,v 1.13 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroLongInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroLongInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroLongInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEKaonZeroLongInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroShortInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroShortInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroShortInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEKaonZeroShortInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HELambdaInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HELambdaInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HELambdaInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HELambdaInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HENeutronInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HENeutronInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HENeutronInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HENeutronInelastic.hh,v 1.15 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEOmegaMinusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEOmegaMinusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEOmegaMinusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEOmegaMinusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEPionMinusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEPionMinusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEPionMinusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEPionMinusInelastic.hh,v 1.15 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEPionPlusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEPionPlusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEPionPlusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEPionPlusInelastic.hh,v 1.15 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEPlot.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEPlot.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEPlot.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEPlot.hh,v 1.9 2006/06/29 20:29:37 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEProtonInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEProtonInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEProtonInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEProtonInelastic.hh,v 1.15 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaMinusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaMinusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaMinusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HESigmaMinusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaPlusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaPlusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaPlusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HESigmaPlusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaZeroInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaZeroInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaZeroInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HESigmaZeroInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEVector.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEVector.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEVector.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEVector.hh,v 1.12 2006/06/29 20:29:48 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEXiMinusInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEXiMinusInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEXiMinusInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEXiMinusInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/include/G4HEXiZeroInelastic.hh
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/include/G4HEXiZeroInelastic.hh	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/include/G4HEXiZeroInelastic.hh	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEXiZeroInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiKaonZeroInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiKaonZeroInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiKaonZeroInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiKaonZeroInelastic.cc,v 1.14.2.1 2008/04/23 16:31:21 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiKaonZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiLambdaInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiLambdaInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiLambdaInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiLambdaInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiLambdaInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiNeutronInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiNeutronInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiNeutronInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiNeutronInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiNeutronInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiOmegaMinusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiOmegaMinusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiOmegaMinusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiProtonInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiProtonInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiProtonInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiProtonInelastic.cc,v 1.13.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiProtonInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaMinusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaMinusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaMinusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaPlusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaPlusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaPlusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaZeroInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaZeroInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaZeroInelastic.cc	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEAntiSigmaZeroInelastic.cc,v 1.10 2006/06/29 20:30:08 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiMinusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiMinusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiMinusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiXiMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiXiMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiZeroInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiZeroInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiZeroInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEAntiXiZeroInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEAntiXiZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEInelastic.cc	(revision 962)
@@ -248,11 +248,14 @@
  }
 
+
 G4int G4HEInelastic::Factorial(G4int n)
- { 
-   G4int result = 1;
-   if(n<0) exit(EXIT_FAILURE);
-   while(n>1) result *= n--;
-   return result;
- } 
+{ 
+  G4int result = 1;
+  if (n < 0) G4Exception("G4HEInelastic::Factorial()", "601",
+                         FatalException, "Negative factorial argument");
+  while (n > 1) result *= n--;
+  return result;
+} 
+
 
 G4double G4HEInelastic::normal()
@@ -1161,5 +1164,5 @@
                       while( ( ran >= dndl[l] ) && ( l < 20 ) )l++;
                       l = Imin( 19, l );
-                      xval = Amin( 1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1])/2.) );
+                      xval = Amin( 1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1]) ) );
                       if( pv[i].getSide() < 0 ) xval *= -1.;
                       pv[i].setMomentumAndUpdate( xval*et );  // Set the z-momentum
@@ -1782,40 +1785,39 @@
 
 void
-G4HEInelastic::TuningOfHighEnergyCascading( G4HEVector pv[],
-                                            G4int &vecLen,
-                                            G4HEVector incidentParticle,
-                                            G4HEVector targetParticle,
-                                            G4double atomicWeight,
-                                            G4double atomicNumber)
- {
-   G4int i,j;
-   G4double incidentKineticEnergy   = incidentParticle.getKineticEnergy();
-   G4double incidentTotalMomentum   = incidentParticle.getTotalMomentum();
-   G4double incidentCharge          = incidentParticle.getCharge(); 
-   G4double incidentMass            = incidentParticle.getMass();
-   G4double targetMass              = targetParticle.getMass();
-   G4int    pionPlusCode            = PionPlus.getCode();
-   G4int    pionMinusCode           = PionMinus.getCode();
-   G4int    pionZeroCode            = PionZero.getCode();  
-   G4int    protonCode              = Proton.getCode();
-   G4int    neutronCode             = Neutron.getCode();
-   G4HEVector *pvmx   = new G4HEVector [10];
-   G4double   *reddec = new G4double [7];
-
-   if ( incidentKineticEnergy > (25.+G4UniformRand()*75.) )
-     {
-       G4double reden = -0.7 + 0.29*std::log10(incidentKineticEnergy);
+G4HEInelastic::TuningOfHighEnergyCascading(G4HEVector pv[],
+                                           G4int &vecLen,
+                                           G4HEVector incidentParticle,
+                                           G4HEVector targetParticle,
+                                           G4double atomicWeight,
+                                           G4double atomicNumber)
+{
+  G4int i,j;
+  G4double incidentKineticEnergy   = incidentParticle.getKineticEnergy();
+  G4double incidentTotalMomentum   = incidentParticle.getTotalMomentum();
+  G4double incidentCharge          = incidentParticle.getCharge(); 
+  G4double incidentMass            = incidentParticle.getMass();
+  G4double targetMass              = targetParticle.getMass();
+  G4int    pionPlusCode            = PionPlus.getCode();
+  G4int    pionMinusCode           = PionMinus.getCode();
+  G4int    pionZeroCode            = PionZero.getCode();  
+  G4int    protonCode              = Proton.getCode();
+  G4int    neutronCode             = Neutron.getCode();
+  G4HEVector *pvmx   = new G4HEVector [10];
+  G4double   *reddec = new G4double [7];
+
+  if (incidentKineticEnergy > (25.+G4UniformRand()*75.) ) {
+    G4double reden = -0.7 + 0.29*std::log10(incidentKineticEnergy);
 //       G4double redat =  1.0 - 0.40*std::log10(atomicWeight);
 //       G4double redat = 0.5 - 0.18*std::log10(atomicWeight);
-       G4double redat = 0.722 - 0.278*std::log10(atomicWeight);
-       G4double pmax   = -200.;
-       G4double pmapim = -200.;
-       G4double pmapi0 = -200.;
-       G4double pmapip = -200.;
-       G4int ipmax  = 0;
-       G4int maxpim = 0;
-       G4int maxpi0 = 0;
-       G4int maxpip = 0;
-       G4int iphmf; 
+    G4double redat = 0.722 - 0.278*std::log10(atomicWeight);
+    G4double pmax   = -200.;
+    G4double pmapim = -200.;
+    G4double pmapi0 = -200.;
+    G4double pmapip = -200.;
+    G4int ipmax  = 0;
+    G4int maxpim = 0;
+    G4int maxpi0 = 0;
+    G4int maxpip = 0;
+    G4int iphmf; 
        if (   (G4UniformRand() > (atomicWeight/100.-0.28)) 
            && (std::fabs(incidentCharge) > 0.) )
@@ -1934,128 +1936,143 @@
          }
        vecLen = j;     
-     }
-
-   pvmx[0] = incidentParticle;
-   pvmx[1] = targetParticle;
-   pvmx[8].setZero();
-   pvmx[2].Add(pvmx[0], pvmx[1]);
-   pvmx[3].Lor(pvmx[0], pvmx[2]);
-   pvmx[4].Lor(pvmx[1], pvmx[2]);
-   
-   if(verboseLevel > 1)
-     {
-       pvmx[0].Print(0);
-       incidentParticle.Print(0);
-       pvmx[1].Print(1);
-       targetParticle.Print(1);
-       pvmx[2].Print(2);
-       pvmx[3].Print(3);
-       pvmx[4].Print(4);
-     }
+  }
+
+  pvmx[0] = incidentParticle;
+  pvmx[1] = targetParticle;
+  pvmx[8].setZero();
+  pvmx[2].Add(pvmx[0], pvmx[1]);
+  pvmx[3].Lor(pvmx[0], pvmx[2]);
+  pvmx[4].Lor(pvmx[1], pvmx[2]);
+   
+  if (verboseLevel > 1) {
+    pvmx[0].Print(0);
+    incidentParticle.Print(0);
+    pvmx[1].Print(1);
+    targetParticle.Print(1);
+    pvmx[2].Print(2);
+    pvmx[3].Print(3);
+    pvmx[4].Print(4);
+  }
+
+  // Calculate leading particle effect in which a single final state 
+  // particle carries away nearly the maximum allowed momentum, while
+  // all other secondaries have reduced momentum.  A secondary is 
+  // proportionately less likely to be a leading particle as the 
+  // difference of its quantum numbers with the primary increases.
  
-   G4int ledpar = -1;
-   G4double redpar = 0.;
-   G4double gespar = 0.;
-   G4int incidentS = incidentParticle.getStrangenessNumber();
-   if(incidentParticle.getName() == "KaonZeroShort" || incidentParticle.getName() == "KaonZeroLong")
-     {
-       if(G4UniformRand() < 0.5) { incidentS = 1;}
-       else                      { incidentS = -1;}
-     }
-   G4int incidentB =   incidentParticle.getBaryonNumber();   
-
-   if(verboseLevel > 1)
-     {
-       G4cout << " incidentS, incidentB " << incidentS << " " << incidentB << G4endl;
-     }
-
-   for (i=0; i<vecLen; i++)
-     { G4int iphmf = pv[i].getCode();
-       G4double ppp   = pv[i].Length();
-       if (ppp > 1.e-3)
-         { 
-           pvmx[5].Lor( pv[i], pvmx[2] );
-           G4double cost = pvmx[3].CosAng( pvmx[5] );
-           G4int particleS =   pv[i].getStrangenessNumber();
-           if(pv[i].getName() == "KaonZeroShort" || pv[i].getName() == "KaonZeroLong")
-             {
-               if(G4UniformRand() < 0.5) { particleS = 1;}
-               else                      { particleS = -1;}
-             } 
-           G4int particleB =   pv[i].getBaryonNumber();
-           G4double hfmass;
-           if (cost > 0.)
-             { 
-               reddec[0] = std::fabs( incidentMass - pv[i].getMass() );
-               reddec[1] = std::fabs( incidentCharge - pv[i].getCharge());
-               reddec[2] = std::fabs( G4double(incidentS - particleS) ); // cast for aCC
-               reddec[3] = std::fabs( G4double(incidentB - particleB) ); // cast for aCC
-               hfmass = incidentMass;  
-             }
-           else
-             { 
-               reddec[0] = std::fabs( targetMass - pv[i].getMass() );
-               reddec[1] = std::fabs( atomicNumber/atomicWeight - pv[i].getCharge());
-               reddec[2] = std::fabs( G4double(particleS) ); // cast for aCC
-               reddec[3] = std::fabs( 1. - particleB );
-               hfmass = targetMass;  
-             } 
-           reddec[5] = reddec[0]+reddec[1]+reddec[2]+reddec[3];
-           G4double sbqwgt = reddec[5];
-           if ( hfmass < 0.2)
-             { 
-               sbqwgt = (sbqwgt-2.5)*0.10;
-               if(pv[i].getCode() == pionZeroCode) sbqwgt = 0.15; 
-             } 
-           else if (hfmass < 0.6)
-               sbqwgt = (sbqwgt-3.0)*0.10;
-           else 
-             { 
-               sbqwgt = (sbqwgt-2.0)*0.10;
-               if(pv[i].getCode() == pionZeroCode) sbqwgt = 0.15;  
-             }
-           ppp = pvmx[5].Length();
-           if ( (sbqwgt>0.) && (ppp>1.e-6) )
-             { 
-               G4double pthmf = ppp*std::sqrt(1.-cost*cost);
-               G4double plhmf = ppp*cost*(1.-sbqwgt);
-               pvmx[7].Cross( pvmx[3], pvmx[5] );
-               pvmx[7].Cross( pvmx[7], pvmx[3] );
-               if(pvmx[3].Length() > 0.)
-                 pvmx[6].SmulAndUpdate( pvmx[3], plhmf/pvmx[3].Length() );
-               else if(verboseLevel > 1)
-                 G4cout << "NaNQ in Tuning of High Energy Hadronic Interactions" << G4endl;
-               if(pvmx[7].Length() > 0.)    
-                 pvmx[7].SmulAndUpdate( pvmx[7], pthmf/pvmx[7].Length() );
-               else if(verboseLevel > 1)
-                 G4cout << "NaNQ in Tuning of High Energy Hadronic Interactions" << G4endl;
-               pvmx[5].Add3(pvmx[6], pvmx[7] );
-               pvmx[5].setEnergy( std::sqrt(sqr(pvmx[5].Length()) + sqr(pv[i].getMass())));
-               pv[i].Lor( pvmx[5], pvmx[4] );
-               if(verboseLevel > 1) 
-                 {
-                   G4cout << " Particle Momentum changed to: " << G4endl;
-                   pv[i].Print(i); 
-		 }
-             }    
-
-	   // Neither pi0s, backward nucleons from intra-nuclear cascade,
-	   // nor evaporation fragments can be leading particles
-
-           if (iphmf != pionZeroCode && pv[i].getSide() > -3)
-             { 
-               pvmx[7].Sub3( incidentParticle, pv[i] );
-               reddec[4] = pvmx[7].Length()/incidentTotalMomentum;
-               reddec[6] = reddec[4]*2./3. + reddec[5]/12.;
-               reddec[6] = Amax(0., 1. - reddec[6]);
-               gespar   += reddec[6];
-               if ( (reddec[5] <= 3.75) && (reddec[6] > redpar) )
-                 { ledpar = i;
-                   redpar = reddec[6]; 
-                 }   
-             } 
-         }
-       pvmx[8].Add3(pvmx[8], pv[i] );
-     } 
+  G4int ledpar = -1;
+  G4double redpar = 0.;
+  G4int incidentS = incidentParticle.getStrangenessNumber();
+  if (incidentParticle.getName() == "KaonZeroShort" || 
+      incidentParticle.getName() == "KaonZeroLong") {
+    if(G4UniformRand() < 0.5) { 
+      incidentS = 1;
+    } else { 
+      incidentS = -1;
+    }
+  }
+
+  G4int incidentB =   incidentParticle.getBaryonNumber();   
+
+  for (i=0; i<vecLen; i++) { 
+    G4int iphmf = pv[i].getCode();
+    G4double ppp = pv[i].Length();
+
+    if (ppp > 1.e-3) { 
+      pvmx[5].Lor( pv[i], pvmx[2] );  // secondary in CM frame
+      G4double cost = pvmx[3].CosAng( pvmx[5] );
+
+      // For each secondary, find the sum of the differences of its 
+      // quantum numbers with that of the incident particle 
+      // (dM + dQ + dS + dB)
+
+      G4int particleS = pv[i].getStrangenessNumber();
+
+      if (pv[i].getName() == "KaonZeroShort" || 
+          pv[i].getName() == "KaonZeroLong") {
+        if (G4UniformRand() < 0.5) { 
+          particleS = 1;
+        } else { 
+          particleS = -1;
+        }
+      } 
+      G4int particleB = pv[i].getBaryonNumber();
+      G4double hfmass;
+      if (cost > 0.) { 
+        reddec[0] = std::fabs( incidentMass - pv[i].getMass() );
+        reddec[1] = std::fabs( incidentCharge - pv[i].getCharge());
+        reddec[2] = std::fabs( G4double(incidentS - particleS) ); // cast for aCC
+        reddec[3] = std::fabs( G4double(incidentB - particleB) ); // cast for aCC
+        hfmass = incidentMass;
+
+      } else { 
+        reddec[0] = std::fabs( targetMass - pv[i].getMass() );
+        reddec[1] = std::fabs( atomicNumber/atomicWeight - pv[i].getCharge());
+        reddec[2] = std::fabs( G4double(particleS) ); // cast for aCC
+        reddec[3] = std::fabs( 1. - particleB );
+        hfmass = targetMass;  
+      }
+
+      reddec[5] = reddec[0]+reddec[1]+reddec[2]+reddec[3];
+      G4double sbqwgt = reddec[5];
+      if (hfmass < 0.2) { 
+        sbqwgt = (sbqwgt-2.5)*0.10;
+        if(pv[i].getCode() == pionZeroCode) sbqwgt = 0.15; 
+      } else if (hfmass < 0.6) {
+        sbqwgt = (sbqwgt-3.0)*0.10;
+      } else { 
+        sbqwgt = (sbqwgt-2.0)*0.10;
+        if(pv[i].getCode() == pionZeroCode) sbqwgt = 0.15;
+      }
+           
+      ppp = pvmx[5].Length();
+
+      // Reduce the longitudinal momentum of the secondary by a factor 
+      // which is a function of the sum of the differences
+
+      if (sbqwgt > 0. && ppp > 1.e-6) { 
+        G4double pthmf = ppp*std::sqrt(1.-cost*cost);
+        G4double plhmf = ppp*cost*(1.-sbqwgt);
+        pvmx[7].Cross( pvmx[3], pvmx[5] );
+        pvmx[7].Cross( pvmx[7], pvmx[3] );
+
+        if (pvmx[3].Length() > 0.)
+          pvmx[6].SmulAndUpdate( pvmx[3], plhmf/pvmx[3].Length() );
+        else if(verboseLevel > 1)
+          G4cout << "NaNQ in Tuning of High Energy Hadronic Interactions" << G4endl;
+
+        if (pvmx[7].Length() > 0.)    
+          pvmx[7].SmulAndUpdate( pvmx[7], pthmf/pvmx[7].Length() );
+        else if(verboseLevel > 1)
+          G4cout << "NaNQ in Tuning of High Energy Hadronic Interactions" << G4endl;
+
+        pvmx[5].Add3(pvmx[6], pvmx[7] );
+        pvmx[5].setEnergy( std::sqrt(sqr(pvmx[5].Length()) + sqr(pv[i].getMass())));
+        pv[i].Lor( pvmx[5], pvmx[4] );
+        if (verboseLevel > 1) {
+          G4cout << " Particle Momentum changed to: " << G4endl;
+          pv[i].Print(i); 
+	}
+      }
+
+      // Choose leading particle
+      // Neither pi0s, backward nucleons from intra-nuclear cascade,
+      // nor evaporation fragments can be leading particles
+
+      G4int ss = -3;
+      if (incidentS != 0) ss = 0;
+      if (iphmf != pionZeroCode && pv[i].getSide() > ss) { 
+        pvmx[7].Sub3( incidentParticle, pv[i] );
+        reddec[4] = pvmx[7].Length()/incidentTotalMomentum;
+        reddec[6] = reddec[4]*2./3. + reddec[5]/12.;
+        reddec[6] = Amax(0., 1. - reddec[6]);
+        if ( (reddec[5] <= 3.75) && (reddec[6] > redpar) ) { 
+          ledpar = i;
+          redpar = reddec[6]; 
+        }   
+      } 
+    }
+    pvmx[8].Add3(pvmx[8], pv[i] );
+  }
 
   if(false) if (ledpar >= 0)
@@ -2079,20 +2096,21 @@
        }  
      }
-  if(conserveEnergy)
-  {
+
+  if (conserveEnergy) {
     G4double ekinhf = 0.;
-    for(i=0; i<vecLen; i++)
-    {
+    for (i=0; i<vecLen; i++) {
       ekinhf += pv[i].getKineticEnergy();
       if(pv[i].getMass() < 0.7) ekinhf += pv[i].getMass();
     }
     if(incidentParticle.getMass() < 0.7) ekinhf -= incidentParticle.getMass();
-    if(ledpar < 0)
-    {
+
+    if(ledpar < 0) {   // no leading particle chosen
       ekinhf = incidentParticle.getKineticEnergy()/ekinhf;
-      for(i=0; i<vecLen; i++) pv[i].setKineticEnergyAndUpdate(ekinhf*pv[i].getKineticEnergy());
-    }
-    else
-    {
+      for (i=0; i<vecLen; i++) 
+        pv[i].setKineticEnergyAndUpdate(ekinhf*pv[i].getKineticEnergy());
+
+    } else {   
+      // take the energy removed from non-leading particles and
+      // give it to the leading particle
       ekinhf = incidentParticle.getKineticEnergy() - ekinhf;
       ekinhf += pv[ledpar].getKineticEnergy();
@@ -2100,7 +2118,9 @@
       pv[ledpar].setKineticEnergyAndUpdate(ekinhf);
     }
-  }  
+  }
+
   delete [] reddec;
   delete [] pvmx;
+
   return;
  }     
@@ -3451,5 +3471,5 @@
                       while( ( ran >= dndl[l] ) && ( l < 20 ) )l++;
                       l = Imin( 19, l );
-                      xval = Amin( 1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1])/2.) );
+                      xval = Amin( 1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1]) ) );
                       if( pv[i].getSide() < 0 ) xval *= -1.;
                       pv[i].setMomentumAndUpdate( xval*et );   // set the z-momentum
@@ -5496,8 +5516,11 @@
       sm[i] = totalMass;
     }
+
     if( totalMass >= totalEnergy ) {
-      G4cerr << "*** Error in G4HEInelastic::GenerateNBodyEvent" << G4endl;
-      G4cerr << "    total mass (" << totalMass << ") >= total energy ("
-           << totalEnergy << ")" << G4endl;
+      if (verboseLevel > 1) {
+        G4cout << "*** Error in G4HEInelastic::GenerateNBodyEvent" << G4endl;
+        G4cout << "    total mass (" << totalMass << ") >= total energy ("
+               << totalEnergy << ")" << G4endl;
+      }
       delete [] mass;
       delete [] energy;
@@ -5507,4 +5530,5 @@
       return -1.0;
     }
+
     G4double kineticEnergy = totalEnergy - totalMass;
     G4double* emm = new G4double [vecLen];
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonMinusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonMinusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonMinusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEKaonMinusInelastic.cc,v 1.13.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEKaonMinusInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonPlusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonPlusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonPlusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEKaonPlusInelastic.cc,v 1.13.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEKaonPlusInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEKaonZeroInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEKaonZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroLongInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroLongInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroLongInelastic.cc	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEKaonZeroLongInelastic.cc,v 1.10 2006/06/29 20:30:22 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroShortInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroShortInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroShortInelastic.cc	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEKaonZeroShortInelastic.cc,v 1.10 2006/06/29 20:30:24 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HELambdaInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HELambdaInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HELambdaInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HELambdaInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HELambdaInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HENeutronInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HENeutronInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HENeutronInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HENeutronInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HENeutronInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEOmegaMinusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEOmegaMinusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEOmegaMinusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEOmegaMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEOmegaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEPionMinusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEPionMinusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEPionMinusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEPionMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEPionMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 
 // 11-OCT-2007 F.W. Jones: fixed incorrect Imax (should be Imin) in
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEPionPlusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEPionPlusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEPionPlusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEPionPlusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEPionPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEPlot.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEPlot.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEPlot.cc	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEPlot.cc,v 1.11 2006/06/29 20:30:36 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEProtonInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEProtonInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEProtonInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEProtonInelastic.cc,v 1.13.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEProtonInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaMinusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaMinusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaMinusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HESigmaMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HESigmaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaPlusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaPlusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaPlusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HESigmaPlusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HESigmaPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaZeroInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaZeroInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaZeroInelastic.cc	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HESigmaZeroInelastic.cc,v 1.11 2006/06/29 20:30:44 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEVector.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEVector.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEVector.cc	(revision 962)
@@ -26,5 +26,5 @@
 //
 // $Id: G4HEVector.cc,v 1.20 2006/11/22 23:52:32 dennis Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEXiMinusInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEXiMinusInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEXiMinusInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEXiMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEXiMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
Index: trunk/source/processes/hadronic/models/high_energy/src/G4HEXiZeroInelastic.cc
===================================================================
--- trunk/source/processes/hadronic/models/high_energy/src/G4HEXiZeroInelastic.cc	(revision 819)
+++ trunk/source/processes/hadronic/models/high_energy/src/G4HEXiZeroInelastic.cc	(revision 962)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4HEXiZeroInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4HEXiZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 //
