Index: trunk/source/processes/hadronic/cross_sections/History
===================================================================
--- trunk/source/processes/hadronic/cross_sections/History	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/History	(revision 1347)
@@ -15,10 +15,96 @@
      ---------------------------------------------------------------
 
-24 October 2010 Vladimir Ivanchenko (hadr-cross-V09-03-12)
+ 9 December 2010 Dennis Wright (hadr-cross-V09-03-21)
+-----------------------------------------------------
+- G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy() : remove
+  initialization of array Y[]. This forced expensive re-calculation 
+  at each call.
+ 
+26 November 2010 Vladimir Ivanchenko (hadr-cross-V09-03-20)
+----------------------------------------------------------
+- G4BGGPionElasticXS, G4BGGNucleonElasticXS,G4BGGNucleonInelasticXS 
+        fixed low-energy (E < 20 MeV) models
+- G4TripathiLightCrossSection - J.M.Quesada fix for threshold shape
+
+23 November 2010 Vladimir Ivanchenko (hadr-cross-V09-03-19)
+----------------------------------------------------------
+- added G4CrossSectionInelastic and G4CrossSectionElastic - wrappers 
+	for components
+
+19 November 2010 Gunter Folger       (hadr-cross-V09-03-18)
+- replace leftover calls to GetIsoZACrossSection by  GetZandACrossSection, and 
+   IsZAApplicable by IsIsoApplicable.
+
+18 November 2010 Vladimir Ivanchenko (hadr-cross-V09-03-17)
+----------------------------------------------------------
+- G4NeutronCaptureXS, G4NeutronElasticXS, G4NeutronInelasticXS - do
+  not use G4Element, only G4NistManager 
+- G4ComponentAntiNuclNuclearXS - new class (A.Galoyan)
+
+13 November 2010 Gunter Folger (hadr-cross-V09-03-16)
+------------------------------------------------------
+- Fix bug from Integer A&Z transition:
+  - G4VCrossSectionDataSet.cc: 
+  make new methods (IsIsoApplicable, GetZandACrossSection) forward to old 
+  methods (IsZAApplicable, GetIsoZACrossSection); old methods print a obsolete
+   warning once.
+  - G4CrossSectionDataStore.cc: use new methods only. 
+
+12 November 2010  Gunter Folger (hadr-cross-V09-03-15)
+------------------------------------------------------
+- Add new class G4CrossSectionPairGG to extend a given cross-section with
+   a scaled G4GlauberGribovCrossSection. Scaling result in smooth transition.
+
+11 November 2010  Dennis Wright (hadr-cross-V09-03-14)
+------------------------------------------------------
+Back out memory leak fixes of G4NeutronElasticXS.cc and G4NeutronInelasticXS.cc
+Not a memory leak after all.
+
+10 November 2010  Dennis Wright (hadr-cross-V09-03-13)
+------------------------------------------------------
+NOTE: this tag deals exclusively with fixes of CoVerity-identified 
+bugs
+
+- G4HadronCrossSections.hh : fix uninitialized variable prevElement in ctor
+
+- Initialize arrays theGlauberFac and theCoulombFac in ctors of 
+  G4BGGNucleonElasticXS.cc, G4BGGNucleonInelasticXS.cc, G4BGGPionElasticXS.cc,
+  G4BGGPionInelasticXS.cc
+
+- Initialize all elements of array Y[nE] to 0.0 in 
+  G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy()
+
+- Initialize fTotalXsc, fElasticXsc, fInelasticXsc, fProductionXsc,
+  fDiffractionXsc, fHadronNucleonXsc to 0.0 in ctors of 
+  G4GlauberGribovCrossSection.cc, G4GGNuclNuclCrossSection.cc
+
+- Initialize fTotalXsc, fElasticXsc, fInelasticXsc, fHadronNucleonXsc to 0.0
+  in ctor of G4HadronNucleonXsc,  
+
+- fix memory leak in G4NeutronElasticXS:Initialise and
+  G4NeutronInelasticXS:Initialise :
+   const G4Element* Elem = 
+     G4Element* G4NistManager::FindOrBuildElement(G4int Z, G4bool isotopes)
+  Elem goes out of scope, so delete it
+
+- Initialize fTotalXsc, fElasticXsc to 0.0 in ctors of
+  G4NucleonNuclearCrossSection.cc, G4PiNuclearCrossSection.cc
+
+- Initialize array theFac in ctors of
+  G4UElasticCrossSection.cc, G4UInelasticCrossSection.cc
+
+
+09 November 2010 Vladimir Ivanchenko (hadr-cross-V09-03-12)
+-----------------------------------------------------------
 - G4VComponentCrossSection - use G4ParticleDefinition and kinetic 
    energy instead of G4DynamicParticle
+- G4EMDissociationCrossSection - is now applicable for Hydrogen but 
+   cross section for Hydrogen is zero 
+
 
 20 October 2010 Gunter Folger (hadr-cross-V09-03-11)
+----------------------------------------------------
 - add missing inline for GetCrossSection in G4BGGPionElasticXS.hh
+
 
 15 October 2010 Dennis Wright (hadr-cross-V09-03-10)
Index: trunk/source/processes/hadronic/cross_sections/src/G4EMDissociationCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4EMDissociationCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4EMDissociationCrossSection.cc	(revision 1347)
@@ -56,6 +56,8 @@
 // Beta release
 //
-// 30. May 2005, J.P. Wellisch removed a compilation warning on gcc 3.4 for 
+// 30 May 2005, J.P. Wellisch removed a compilation warning on gcc 3.4 for 
 //               geant4 7.1.
+// 09 November 2010, V.Ivanchenko make class applicable for Hydrogen but 
+//                   set cross section for Hydrogen to zero  
 //
 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -97,5 +99,5 @@
 G4bool
 G4EMDissociationCrossSection::IsIsoApplicable(const G4DynamicParticle* theDynamicParticle,
-                                              G4int /*ZZ*/, G4int AA)
+                                              G4int /*ZZ*/, G4int/* AA*/)
 {
 //
@@ -107,5 +109,5 @@
 //
   if (G4ParticleTable::GetParticleTable()->GetIonTable()->
-    IsIon(theDynamicParticle->GetDefinition()) && AA > 1)
+      IsIon(theDynamicParticle->GetDefinition()) /*&& AA > 1*/)
     return true;
   else
@@ -127,4 +129,7 @@
   G4int nIso = theElement->GetNumberOfIsotopes();
   G4double crossSection = 0;
+
+  // VI protection for Hydrogen
+  if(theElement->GetZ() < 1.5) { return crossSection; }
      
   if (nIso) {
@@ -156,4 +161,7 @@
                                                    G4int ZZ, G4int AA, G4double /*temperature*/)
 {
+  // VI protection for Hydrogen
+  if(ZZ <= 1) { return 0.0; }
+
 //
 // Get relevant information about the projectile and target (A, Z) and
Index: trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc	(revision 1347)
@@ -24,5 +24,4 @@
 // ********************************************************************
 //
-//
 // 24.11.08 V. Grichine - first implementation
 //
@@ -36,12 +35,10 @@
 
 
-///////////////////////////////////////////////////////////////////////////////
-//
-//
-
 G4GGNuclNuclCrossSection::G4GGNuclNuclCrossSection() 
 : fUpperLimit( 100000 * GeV ),
   fLowerLimit( 0.1 * MeV ),
-  fRadiusConst( 1.08*fermi )  // 1.1, 1.3 ?
+  fRadiusConst( 1.08*fermi ),  // 1.1, 1.3 ?
+  fTotalXsc(0.0), fElasticXsc(0.0), fInelasticXsc(0.0), fProductionXsc(0.0),
+  fDiffractionXsc(0.0), fHadronNucleonXsc(0.0)
 {
   theProton   = G4Proton::Proton();
@@ -49,14 +46,7 @@
 }
 
-///////////////////////////////////////////////////////////////////////////////
-//
-//
 
 G4GGNuclNuclCrossSection::~G4GGNuclNuclCrossSection()
 {}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//
 
 
Index: trunk/source/processes/hadronic/cross_sections/src/G4GlauberGribovCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4GlauberGribovCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4GlauberGribovCrossSection.cc	(revision 1347)
@@ -37,6 +37,5 @@
 #include "G4ParticleDefinition.hh"
 
-//////////////////////////////////////////////////////////////////////////////////////
-//
+///////////////////////////////////////////////////////////////////////////////
 //
 
@@ -218,8 +217,5 @@
 
 
-
-
-////////////////////////////////////////////////////////////////////////////////
-//
+//////////////////////////////////////////////////////////////////////////////
 //
 
@@ -227,5 +223,7 @@
 : fUpperLimit( 100000 * GeV ),
   fLowerLimit( 3 * GeV ),
-  fRadiusConst( 1.08*fermi )  // 1.1, 1.3 ?
+  fRadiusConst( 1.08*fermi ),  // 1.1, 1.3 ?
+  fTotalXsc(0.0), fElasticXsc(0.0), fInelasticXsc(0.0), fProductionXsc(0.0),
+  fDiffractionXsc(0.0), fHadronNucleonXsc(0.0)
 {
   theGamma    = G4Gamma::Gamma();
Index: trunk/source/processes/hadronic/cross_sections/src/G4HadronNucleonXsc.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4HadronNucleonXsc.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4HadronNucleonXsc.cc	(revision 1347)
@@ -24,5 +24,4 @@
 // ********************************************************************
 //
-//
 // 14.03.07 V. Grichine - first implementation
 //
@@ -38,5 +37,6 @@
 G4HadronNucleonXsc::G4HadronNucleonXsc() 
 : fUpperLimit( 10000 * GeV ),
-  fLowerLimit( 0.03 * MeV )
+  fLowerLimit( 0.03 * MeV ),
+  fTotalXsc(0.0), fElasticXsc(0.0), fInelasticXsc(0.0), fHadronNucleonXsc(0.0)
 {
   theGamma    = G4Gamma::Gamma();
@@ -72,15 +72,7 @@
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-//
 
 G4HadronNucleonXsc::~G4HadronNucleonXsc()
 {}
-
-
-////////////////////////////////////////////////////////////////////////////////////////
-//
-//
 
 
Index: trunk/source/processes/hadronic/cross_sections/src/G4IonsKoxCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4IonsKoxCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4IonsKoxCrossSection.cc	(revision 1347)
@@ -107,5 +107,5 @@
     G4int ZZ = G4lrint(anElement->GetZ());
     G4int AA = G4lrint(anElement->GetN());
-    xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
+    xsection = GetZandACrossSection(aParticle, ZZ, AA, temperature);
   }
     
Index: trunk/source/processes/hadronic/cross_sections/src/G4IonsShenCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4IonsShenCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4IonsShenCrossSection.cc	(revision 1347)
@@ -109,5 +109,5 @@
       ZZ = (*isoVector)[i]->GetZ();
       AA = (*isoVector)[i]->GetN();
-      sig = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
+      sig = GetZandACrossSection(aParticle, ZZ, AA, temperature);
       xsection += sig*abundVector[i];
     }
@@ -116,5 +116,5 @@
     G4int ZZ = G4lrint(anElement->GetZ());
     G4int AA = G4lrint(anElement->GetN());
-    xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
+    xsection = GetZandACrossSection(aParticle, ZZ, AA, temperature);
   }
   
Index: trunk/source/processes/hadronic/cross_sections/src/G4IonsSihverCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4IonsSihverCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4IonsSihverCrossSection.cc	(revision 1347)
@@ -73,5 +73,5 @@
       ZZ = (*isoVector)[i]->GetZ();
       AA = (*isoVector)[i]->GetN();
-      sig = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
+      sig = GetZandACrossSection(aParticle, ZZ, AA, temperature);
       xsection += sig*abundVector[i];
     }
@@ -80,5 +80,5 @@
     G4int ZZ = G4lrint(anElement->GetZ());
     G4int AA = G4lrint(anElement->GetN());
-    xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
+    xsection = GetZandACrossSection(aParticle, ZZ, AA, temperature);
   }
    
Index: trunk/source/processes/hadronic/cross_sections/src/G4NucleonNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4NucleonNuclearCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4NucleonNuclearCrossSection.cc	(revision 1347)
@@ -449,8 +449,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
-//
-//
 
 G4NucleonNuclearCrossSection::G4NucleonNuclearCrossSection()
+ :fTotalXsc(0.0), fElasticXsc(0.0)
 {
   theNeutron = G4Neutron::Neutron();
Index: trunk/source/processes/hadronic/cross_sections/src/G4PiNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4PiNuclearCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4PiNuclearCrossSection.cc	(revision 1347)
@@ -301,6 +301,7 @@
   1970, 1980, 1950, 1978, 1830, 1780};
 
- G4PiNuclearCrossSection::
- G4PiNuclearCrossSection()
+
+G4PiNuclearCrossSection::G4PiNuclearCrossSection()
+  : fTotalXsc(0.0), fElasticXsc(0.0)
  {
    thePimData.push_back(new G4PiData(he_t,   he_in,  e1, 38));
Index: trunk/source/processes/hadronic/cross_sections/src/G4TripathiCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4TripathiCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4TripathiCrossSection.cc	(revision 1347)
@@ -169,5 +169,5 @@
     G4int ZZ = G4lrint(anEle->GetZ());
     G4int AA = G4lrint(anEle->GetN());
-    xsection = GetIsoZACrossSection(aPart, ZZ, AA, temperature);
+    xsection = GetZandACrossSection(aPart, ZZ, AA, temperature);
   }
 
Index: trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.cc	(revision 1347)
@@ -55,4 +55,7 @@
 // 15 March 2004, P R Truscott, QinetiQ Ltd, UK
 // Beta release
+//
+// J. M. Quesada 24 November 2010 bug fixed in X_m 
+//(according to eq. 14 in  R.K. Tripathi et al. Nucl. Instr. and Meth. in Phys. Res. B 155 (1999) 349-356)
 //
 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -247,5 +250,7 @@
   }
   G4double S_L = 1.2 + 1.6*(1.0-std::exp(-E/15.0));
-  G4double X_m = 1.0 - X1*std::exp(-E/X1*S_L);
+//JMQ 241110 bug fixed 
+//  G4double X_m = 1.0 - X1*std::exp(-E/X1*S_L);
+  G4double X_m = 1.0 - X1*std::exp(-E/(X1*S_L));
 //
 //
@@ -341,5 +346,5 @@
     G4int ZZ = G4lrint(theTarget->GetZ());
     G4int AA = G4lrint(theTarget->GetN());
-    xsection = GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
+    xsection = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
   }
     
Index: trunk/source/processes/hadronic/cross_sections/src/G4UElasticCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4UElasticCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4UElasticCrossSection.cc	(revision 1347)
@@ -30,6 +30,4 @@
 // 06.03.07 V.Ivanchenko - add Initialise function
 //
-//
-
 
 #include "G4UElasticCrossSection.hh"
@@ -48,5 +46,4 @@
 #include "G4NistManager.hh"
 
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
 G4UElasticCrossSection::G4UElasticCrossSection(const G4ParticleDefinition*) 
@@ -55,4 +52,5 @@
   hasGlauber = false;
   thEnergy   = 90.*GeV;
+  for (G4int i = 0; i < 93; i++) theFac[i] = 0.0;
   fGlauber   = new G4GlauberGribovCrossSection();
   fGheisha   = G4HadronCrossSections::Instance();
@@ -61,5 +59,4 @@
 }
 
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
 G4UElasticCrossSection::~G4UElasticCrossSection()
@@ -75,5 +72,5 @@
 					      const G4Element*  elm)
 {
-  return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
+  return IsIsoApplicable(dp, G4lrint(elm->GetZ()), G4lrint(elm->GetN()));
 }
 
@@ -186,5 +183,5 @@
   G4int A = G4lrint(nist->GetAtomicMassAmu(2));
 
-  if(fGlauber->IsZAApplicable(&dp, 2.0, A)) {
+  if(fGlauber->IsIsoApplicable(&dp, 2, A)) {
     hasGlauber = true;
 
Index: trunk/source/processes/hadronic/cross_sections/src/G4UInelasticCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4UInelasticCrossSection.cc	(revision 1340)
+++ trunk/source/processes/hadronic/cross_sections/src/G4UInelasticCrossSection.cc	(revision 1347)
@@ -30,5 +30,4 @@
 // 06.03.07 V.Ivanchenko - add Initialise function
 //
-//
 
 
@@ -48,5 +47,4 @@
 #include "G4NistManager.hh"
 
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
 G4UInelasticCrossSection::G4UInelasticCrossSection(const G4ParticleDefinition*) 
@@ -55,4 +53,5 @@
   hasGlauber = false;
   thEnergy   = 90.*GeV;
+  for (G4int i = 0; i < 93; i++) theFac[i] = 0.0;
   fGlauber   = new G4GlauberGribovCrossSection();
   fGheisha   = G4HadronCrossSections::Instance();
@@ -61,5 +60,4 @@
 }
 
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
 G4UInelasticCrossSection::~G4UInelasticCrossSection()
@@ -75,5 +73,5 @@
 					      const G4Element*  elm)
 {
-  return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
+  return IsIsoApplicable(dp, G4lrint(elm->GetZ()), G4lrint(elm->GetN()));
 }
 
@@ -102,5 +100,5 @@
   G4int Z = G4lrint(elm->GetZ());
   G4int N = G4lrint(elm->GetN());
-  return GetIsoZACrossSection(dp, Z, N, temp);
+  return GetZandACrossSection(dp, Z, N, temp);
 }
 
@@ -121,5 +119,5 @@
       cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
     } else {
-      cross = fNucleon->GetIsoZACrossSection(dp, Z, A);
+      cross = fNucleon->GetZandACrossSection(dp, Z, A);
     }
 
@@ -195,5 +193,5 @@
       // proton and neutron
       if(fNucleon) { 
-	csdn = fNucleon->GetIsoZACrossSection(&dp, iz, A);
+	csdn = fNucleon->GetZandACrossSection(&dp, iz, A);
 
 	// pions
