Index: trunk/source/processes/electromagnetic/standard/include/G4ASTARStopping.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4ASTARStopping.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4ASTARStopping.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4ASTARStopping.hh,v 1.6 2008/11/13 12:04:37 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4ASTARStopping.hh,v 1.8 2010/04/26 17:22:08 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 
 #ifndef G4ASTARStopping_h
@@ -55,4 +55,6 @@
 
 #include "globals.hh"
+#include "G4LPhysicsFreeVector.hh"
+#include <vector>
 
 class G4Material;
@@ -76,14 +78,16 @@
   void Initialise();
 
+  void AddData(G4double* e, G4double* s, G4int idx);
+
   // hide assignment operator
   G4ASTARStopping & operator=(const  G4ASTARStopping &right);
   G4ASTARStopping(const  G4ASTARStopping&);
 
+  G4int matIndex;
   const G4Material* currentMaterial;
-  G4int index, matIndex;
-  G4String name[74];
-  G4double currentE, res;
-  G4double e[74][78], kinE[78];
-  G4double effZ[74]; 
+  G4double emin;
+  std::vector<G4String> name;
+  std::vector<G4double> effZ; 
+  std::vector<G4LPhysicsFreeVector*> sdata;
 };
 
@@ -97,5 +101,5 @@
 {
   return effZ[idx];
-}
+} 
 
 #endif
Index: trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4BetheBlochModel.hh,v 1.20 2009/04/23 17:44:43 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4BetheBlochModel.hh,v 1.23 2010/05/27 14:26:17 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -116,8 +116,8 @@
 				     G4double kineticEnergy);
 
-  virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
-				    const G4DynamicParticle*,
+  virtual void CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
+				    const G4DynamicParticle* dp,
 				    G4double& eloss,
-				    G4double& niel,
+				    G4double&,
 				    G4double length);
 
@@ -133,7 +133,11 @@
 				      G4double kinEnergy);
 
+  inline G4double GetChargeSquareRatio() const;
+
+  inline void SetChargeSquareRatio(G4double val);
+
 private:
 
-  inline void SetupParameters();
+  void SetupParameters();
 
   inline void SetParticle(const G4ParticleDefinition* p);
@@ -169,33 +173,10 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
-inline void G4BetheBlochModel::SetupParameters()
-{
-  mass = particle->GetPDGMass();
-  spin = particle->GetPDGSpin();
-  G4double q = particle->GetPDGCharge()/eplus;
-  chargeSquare = q*q;
-  ratio = electron_mass_c2/mass;
-  G4double magmom = particle->GetPDGMagneticMoment()*mass/(0.5*eplus*hbar_Planck*c_squared);
-  magMoment2 = magmom*magmom - 1.0;
-  formfact = 0.0;
-  if(particle->GetLeptonNumber() == 0) {
-    G4double x = 0.8426*GeV;
-    if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;}
-    else if(mass > GeV) {
-      x /= nist->GetZ13(mass/proton_mass_c2);
-      //	tlimit = 51.2*GeV*A13[iz]*A13[iz];
-    }
-    formfact = 2.0*electron_mass_c2/(x*x);
-    tlimit   = 2.0/formfact;
-  }
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
 inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p)
 {
   if(particle != p) {
     particle = p;
-    if (p->GetPDGCharge()/eplus > 1.5 && p->GetBaryonNumber() > 2) isIon = true;
+    if (p->GetPDGCharge()/eplus > 1.5 && p->GetBaryonNumber() > 2) 
+      { isIon = true; }
     SetupParameters();
   }
@@ -206,8 +187,24 @@
 inline void G4BetheBlochModel::SetGenericIon(const G4ParticleDefinition* p)
 {
-  if(p && particle != p) {
-    if(p->GetParticleName() == "GenericIon") isIon = true;
+  if(p && particle != p) { 
+    if(p->GetParticleName() == "GenericIon") { isIon = true; }
   }
 }
 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+inline G4double G4BetheBlochModel::GetChargeSquareRatio() const
+{
+  return chargeSquare;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+inline void G4BetheBlochModel::SetChargeSquareRatio(G4double val)
+{
+  chargeSquare = val;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
 #endif
Index: trunk/source/processes/electromagnetic/standard/include/G4BraggModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4BraggModel.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4BraggModel.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4BraggModel.hh,v 1.14 2009/11/10 19:25:47 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4BraggModel.hh,v 1.15 2010/05/27 10:08:58 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -121,12 +121,4 @@
 				     const G4Material* mat,
 				     G4double kineticEnergy);
-  /*
-  // add correction to energy loss and compute non-ionizing energy loss
-  virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
-				    const G4DynamicParticle*,
-				    G4double& eloss,
-				    G4double& niel,
-				    G4double length);
-  */
 
 protected:
@@ -134,4 +126,8 @@
   virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
 				      G4double kinEnergy);
+
+  inline G4double GetChargeSquareRatio() const;
+
+  inline void SetChargeSquareRatio(G4double val);
 
 private:
@@ -197,4 +193,14 @@
 }
 
+inline G4double G4BraggModel::GetChargeSquareRatio() const
+{
+  return chargeSquare;
+}
+
+inline void G4BraggModel::SetChargeSquareRatio(G4double val)
+{
+  chargeSquare = val;
+}
+
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
Index: trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4CoulombScattering.hh,v 1.13 2009/05/07 18:41:45 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4CoulombScattering.hh,v 1.14 2010/02/17 18:59:22 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -73,7 +73,4 @@
   // Set energy above which high energy model will be used
   inline void SetHEModelLimit(G4double);
-
-  // obsolete method to be removed
-  inline void SetBuildTableFlag(G4bool);
 
   // Print out of the class parameters
@@ -125,9 +122,4 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
-inline void G4CoulombScattering::SetBuildTableFlag(G4bool)
-{}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
 inline void G4CoulombScattering::SetHEModelLimit(G4double val)
 {
Index: trunk/source/processes/electromagnetic/standard/include/G4CoulombScatteringModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4CoulombScatteringModel.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4CoulombScatteringModel.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4CoulombScatteringModel.hh,v 1.15 2008/07/31 13:11:34 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4CoulombScatteringModel.hh,v 1.17 2010/05/27 14:22:05 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -45,4 +45,6 @@
 // 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e- 
 // 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class
+// 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to
+//              compute cross sections and sample scattering angle
 //
 // Class Description:
Index: trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonMscModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonMscModel.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonMscModel.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4GoudsmitSaundersonMscModel.hh,v 1.2 2009/06/04 13:45:49 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4GoudsmitSaundersonMscModel.hh,v 1.4 2010/05/17 15:11:30 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -41,4 +41,5 @@
 // Modifications:
 // 04.03.2009 V.Ivanchenko cleanup and format according to Geant4 EM style
+// 12.05.2010 O.Kadri: adding Qn1 and Qn12 as private doubles
 //
 // Class description:
@@ -54,5 +55,5 @@
 //Ref.5:F. Salvat et al.,"ELSEPA--Dirac partial ...molecules", Comp. Phys. Comm. 165 (2005) pp 157-190;
 //Ref.6:G4UrbanMscModel G4_v9.1Ref09; 
-//Ref.7:G4eCoulombScatteringModel G4_v9.1Ref09.
+//Ref.7:G4WentzelVIModel G4_v9.3.
 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 
@@ -63,5 +64,4 @@
 #include "G4PhysicsTable.hh"
 #include "globals.hh"
-#include "G4DataInterpolation.hh"
 
 class G4DataVector;
@@ -114,6 +114,6 @@
   G4GoudsmitSaundersonMscModel(const  G4GoudsmitSaundersonMscModel&);
 
-  G4double		lowKEnergy;
-  G4double		highKEnergy;
+  G4double lowKEnergy;
+  G4double highKEnergy;
   G4double currentKinEnergy;
   G4double currentRange; 
@@ -125,7 +125,6 @@
   G4double charge,lambdalimit;
   G4double tPathLength,stepmin ;
-  G4double lambda1,lambda11;
+  G4double lambda0,lambda1,lambda11,Qn1,Qn12;
   G4double mass;
-  G4double lambda0;
   G4int    currentMaterialIndex;
 
@@ -139,5 +138,4 @@
   const G4ParticleDefinition* particle;
   G4ParticleChangeForMSC*     fParticleChange;
-  G4DataInterpolation* MyValue;
   const G4MaterialCutsCouple* currentCouple;
 
Index: trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonTable.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonTable.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonTable.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4GoudsmitSaundersonTable.hh,v 1.3 2009/06/18 18:43:09 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4GoudsmitSaundersonTable.hh,v 1.4 2010/02/19 09:29:53 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/electromagnetic/standard/include/G4PSTARStopping.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4PSTARStopping.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4PSTARStopping.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4PSTARStopping.hh,v 1.5 2008/11/13 12:04:37 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4PSTARStopping.hh,v 1.7 2010/04/26 17:22:08 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 
 #ifndef G4PSTARStopping_h
@@ -56,4 +56,6 @@
 
 #include "globals.hh"
+#include "G4LPhysicsFreeVector.hh"
+#include <vector>
 
 class G4Material;
@@ -76,13 +78,15 @@
   void Initialise();
 
+  void AddData(G4double* e, G4double* s, G4int idx);
+
   // hide assignment operator
   G4PSTARStopping & operator=(const  G4PSTARStopping &right);
   G4PSTARStopping(const  G4PSTARStopping&);
 
+  G4int matIndex;
   const G4Material* currentMaterial;
-  G4int index, matIndex;
-  G4String name[74];
-  G4double currentE, res;
-  G4double e[74][60], kinE[60]; 
+  G4double emin;
+  std::vector<G4String> name;
+  std::vector<G4LPhysicsFreeVector*> sdata;
 };
 
Index: trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel93.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel93.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel93.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4UrbanMscModel93.hh,v 1.1 2009/11/01 13:04:12 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4UrbanMscModel93.hh,v 1.4 2009/12/14 06:57:12 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
Index: trunk/source/processes/electromagnetic/standard/include/G4WaterStopping.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4WaterStopping.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4WaterStopping.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4WaterStopping.hh,v 1.7 2009/06/19 10:39:48 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4WaterStopping.hh,v 1.8 2010/04/26 17:22:08 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 
 #ifndef G4WaterStopping_h
@@ -79,4 +79,5 @@
   G4int    Z[17];
   G4double A[17];
+  G4double emin;
   std::vector<G4LPhysicsFreeVector*>  dedx;
 };
Index: trunk/source/processes/electromagnetic/standard/include/G4WentzelVIModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4WentzelVIModel.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4WentzelVIModel.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4WentzelVIModel.hh,v 1.21 2009/10/10 15:16:57 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4WentzelVIModel.hh,v 1.29 2010/05/27 14:22:05 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -40,5 +40,6 @@
 //
 // Modifications:
-//
+// 27-05-2010 V.Ivanchenko added G4WentzelOKandVIxSection class to
+//              compute cross sections and sample scattering angle
 //
 // Class Description:
@@ -60,11 +61,10 @@
 #include "G4VMscModel.hh"
 #include "G4PhysicsTable.hh"
-#include "G4MscStepLimitType.hh"
 #include "G4MaterialCutsCouple.hh"
-#include "G4NistManager.hh"
-
+#include "G4WentzelOKandVIxSection.hh"
+
+class G4ParticleDefinition;
 class G4LossTableManager;
-class G4ParticleChangeForMSC;
-class G4ParticleDefinition;
+class G4Pow;
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -100,17 +100,9 @@
 private:
 
-  G4double ComputeTransportXSectionPerAtom();
-
   G4double ComputeXSectionPerVolume();
 
-  void ComputeMaxElectronScattering(G4double cut);
-
   inline G4double GetLambda(G4double kinEnergy);
 
   inline void SetupParticle(const G4ParticleDefinition*);
-
-  inline void SetupKinematic(G4double kinEnergy, G4double cut);
-  
-  inline void SetupTarget(G4double Z, G4double kinEnergy);
 
   inline void DefineMaterial(const G4MaterialCutsCouple*);
@@ -120,33 +112,23 @@
   G4WentzelVIModel(const  G4WentzelVIModel&);
 
-  const G4ParticleDefinition* theProton;
-  const G4ParticleDefinition* theElectron;
-  const G4ParticleDefinition* thePositron;
-
+  G4LossTableManager*       theManager;
   G4ParticleChangeForMSC*   fParticleChange;
+  G4WentzelOKandVIxSection* wokvi;
+  G4Pow*                    fG4pow;
 
   G4PhysicsTable*           theLambdaTable;
-  G4PhysicsTable*           theLambda2Table;
-  G4LossTableManager*       theManager;
   const G4DataVector*       currentCuts;
 
-  G4NistManager*            fNistManager;
-
-  G4double numlimit;
   G4double tlimitminfix;
   G4double invsqrt12;
 
-  // cash
+  // cache kinematics
   G4double preKinEnergy;
-  G4double ecut;
-  G4double lambda0;
   G4double tPathLength;
   G4double zPathLength;
   G4double lambdaeff;
   G4double currentRange; 
-  G4double par1;
-  G4double par2;
-  G4double par3;
-
+
+  // data for single scattering mode
   G4double xtsec;
   std::vector<G4double> xsecn;
@@ -154,46 +136,19 @@
   G4int    nelments;
 
-  G4int    nbins;
-  G4int    nwarnings;
-  G4int    nwarnlimit;
-
+  G4double numlimit;
+
+  // cache material
   G4int    currentMaterialIndex;
-
   const G4MaterialCutsCouple* currentCouple;
   const G4Material* currentMaterial;
 
   // single scattering parameters
-  G4double coeff;
   G4double cosThetaMin;
   G4double cosThetaMax;
   G4double cosTetMaxNuc;
-  G4double cosTetMaxNuc2;
-  G4double cosTetMaxElec;
-  G4double cosTetMaxElec2;
-  G4double q2Limit;
-  G4double alpha2;
 
   // projectile
   const G4ParticleDefinition* particle;
-
-  G4double chargeSquare;
-  G4double spin;
-  G4double mass;
-  G4double tkin;
-  G4double mom2;
-  G4double invbeta2;
-  G4double kinFactor;
-  G4double etag;
   G4double lowEnergyLimit;
-
-  // target
-  G4double targetZ;
-  G4double targetMass;
-  G4double screenZ;
-  G4double formfactA;
-  G4int    iz;
-
-  static G4double ScreenRSquare[100];
-  static G4double FormFactor[100];
 
   // flags
@@ -222,12 +177,11 @@
   G4double x;
   if(theLambdaTable) {
-    G4bool b;
-    x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b);
+    x = ((*theLambdaTable)[currentMaterialIndex])->Value(e);
   } else {
     x = CrossSection(currentCouple,particle,e,
 		     (*currentCuts)[currentMaterialIndex]);
   }
-  if(x > DBL_MIN) x = 1./x;
-  else            x = DBL_MAX;
+  if(x > DBL_MIN) { x = 1./x; }
+  else            { x = DBL_MAX; }
   return x;
 }
@@ -240,49 +194,8 @@
   if(p != particle) {
     particle = p;
-    mass = particle->GetPDGMass();
-    spin = particle->GetPDGSpin();
-    G4double q = particle->GetPDGCharge()/eplus;
-    chargeSquare = q*q;
-    tkin = 0.0;
+    wokvi->SetupParticle(p);
   }
 }
 
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-inline void G4WentzelVIModel::SetupKinematic(G4double ekin, G4double cut)
-{
-  if(ekin != tkin || ecut != cut) {
-    tkin  = ekin;
-    mom2  = tkin*(tkin + 2.0*mass);
-    invbeta2 = 1.0 +  mass*mass/mom2;
-    cosTetMaxNuc = cosThetaMax;
-    if(mass < MeV && ekin <= 10.*cut) {
-      cosTetMaxNuc = ekin*(cosThetaMax + 1.0)/(10.*cut) - 1.0;
-    }
-    ComputeMaxElectronScattering(cut);
-  } 
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-  
-inline void G4WentzelVIModel::SetupTarget(G4double Z, G4double e)
-{
-  if(Z != targetZ || e != etag) {
-    etag    = e; 
-    targetZ = Z;
-    iz = G4int(Z);
-    if(iz > 99) iz = 99;
-    targetMass = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
-    screenZ = ScreenRSquare[iz]/mom2;
-    G4double meff = targetMass/(mass+targetMass);
-    kinFactor = coeff*targetZ*chargeSquare*invbeta2/(mom2*meff*meff);
-    screenZ *=(1.13 + std::min(1.0,3.76*Z*Z*invbeta2*alpha2));
-    if(mass > MeV) { screenZ *= 2.0; } 
-    formfactA = FormFactor[iz]*mom2;
-    cosTetMaxNuc2 = cosTetMaxNuc;
-    cosTetMaxElec2 = cosTetMaxElec;
-  } 
-} 
-
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
Index: trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4eCoulombScatteringModel.hh,v 1.49 2009/10/10 15:16:57 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4eCoulombScatteringModel.hh,v 1.56 2010/05/27 14:22:05 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -47,4 +47,6 @@
 // 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion 
 // 17.06.09 C.Consoalndi modified SetupTarget method - remove kinFactor
+// 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to
+//              compute cross sections and sample scattering angle
 //				       
 //
@@ -66,11 +68,12 @@
 
 #include "G4VEmModel.hh"
-#include "G4PhysicsTable.hh"
 #include "globals.hh"
-#include "G4NistManager.hh"
-#include <vector>
+#include "G4MaterialCutsCouple.hh"
+#include "G4WentzelOKandVIxSection.hh"
 
 class G4ParticleChangeForGamma;
 class G4ParticleDefinition;
+class G4ParticleTable;
+class G4NistManager;
 
 class G4eCoulombScatteringModel : public G4VEmModel
@@ -99,11 +102,11 @@
 				 G4double maxEnergy);
 
+  // defines low energy limit of the model
+  inline void SetLowEnergyLimit(G4double val);
+
+  // obsolete method
   inline void SetRecoilThreshold(G4double eth);
 
 protected:
-
-  G4double CrossSectionPerAtom();
-
-  G4double SampleCosineTheta();
 
   inline void DefineMaterial(const G4MaterialCutsCouple*);
@@ -111,11 +114,5 @@
   inline void SetupParticle(const G4ParticleDefinition*);
 
-  inline void SetupKinematic(G4double kinEnergy, G4double cut);
-  
-  inline void SetupTarget(G4double Z, G4double kinEnergy); 
-
 private:
-
-  void ComputeMaxElectronScattering(G4double cut);
 
   // hide assignment operator
@@ -125,10 +122,7 @@
 protected:
  
-  const G4ParticleDefinition* theProton;
-  const G4ParticleDefinition* theElectron;
-  const G4ParticleDefinition* thePositron;
-
-  G4ParticleTable*          theParticleTable; 
+  G4ParticleTable*          theParticleTable;
   G4ParticleChangeForGamma* fParticleChange;
+  G4WentzelOKandVIxSection* wokvi;
   G4NistManager*            fNistManager;
 
@@ -140,45 +134,19 @@
   G4int                       currentMaterialIndex;
 
-  G4double                  coeff;
   G4double                  cosThetaMin;
   G4double                  cosThetaMax;
   G4double                  cosTetMinNuc;
   G4double                  cosTetMaxNuc;
-  G4double                  cosTetMaxNuc2;
-  G4double                  cosTetMaxElec;
-  G4double                  cosTetMaxElec2;
-  G4double                  q2Limit;
   G4double                  recoilThreshold;
-  G4double                  elecXSection;
-  G4double                  nucXSection;
-  G4double                  ecut;
+  G4double                  elecRatio;
+  G4double                  mass;
 
   // projectile
   const G4ParticleDefinition* particle;
+  const G4ParticleDefinition* theProton;
 
-  G4double                  chargeSquare;
-  G4double                  spin;
-  G4double                  mass;
-  G4double                  tkin;
-  G4double                  mom2;
-  G4double                  invbeta2;
-  G4double                  etag;
   G4double                  lowEnergyLimit;
 
-  // target
-  G4double                  targetZ;
-  G4double                  targetMass;
-  G4double                  screenZ;
-  G4double                  formfactA;
-  G4int                     idxelm;
-  G4int                     iz;
-
 private:
-
-  G4double                  alpha2;
-  G4double                  faclim;
-
-  static G4double ScreenRSquare[100];
-  static G4double FormFactor[100];
 
   G4bool                    isInitialised;             
@@ -206,8 +174,5 @@
     particle = p;
     mass = particle->GetPDGMass();
-    spin = particle->GetPDGSpin();
-    G4double q = particle->GetPDGCharge()/eplus;
-    chargeSquare = q*q;
-    tkin = 0.0;
+    wokvi->SetupParticle(p);
   }
 }
@@ -215,41 +180,8 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
-inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin, 
-						      G4double cut)
+inline void G4eCoulombScatteringModel::SetLowEnergyLimit(G4double val)
 {
-  if(ekin != tkin || ecut != cut) {
-    tkin = ekin;
-    mom2 = tkin*(tkin + 2.0*mass);
-    invbeta2 = 1.0 +  mass*mass/mom2;
-    cosTetMinNuc = cosThetaMin;
-    cosTetMaxNuc = cosThetaMax;
-    if(mass < MeV && cosThetaMin < 1.0 && ekin <= 10.*cut) {
-      cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0;
-    }
-    ComputeMaxElectronScattering(cut);
-  }
+  lowEnergyLimit = val;
 }
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-  
-inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double e)
-{
-  if(Z != targetZ || e != etag) {
-    etag    = e; 
-    targetZ = Z;
-    iz= G4int(Z);
-    if(iz > 99) iz = 99;
-    targetMass = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
-    screenZ = ScreenRSquare[iz]/mom2;
-    screenZ *=(1.13 + std::min(1.0,3.76*Z*Z*invbeta2*alpha2));
-    if(mass > MeV) { screenZ *= 2.0; }
-    formfactA = FormFactor[iz]*mom2;
-    cosTetMaxNuc2 = cosTetMaxNuc;
-    if(1 == iz && particle == theProton && cosTetMaxNuc2 < 0.0) {
-      cosTetMaxNuc2 = 0.0;
-    }
-    cosTetMaxElec2 = cosTetMaxElec;
-  } 
-} 
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Index: trunk/source/processes/electromagnetic/standard/include/G4hIonisation.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4hIonisation.hh	(revision 1228)
+++ trunk/source/processes/electromagnetic/standard/include/G4hIonisation.hh	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4hIonisation.hh,v 1.42 2009/02/20 12:06:37 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03 $
+// $Id: G4hIonisation.hh,v 1.44 2010/05/27 10:25:23 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // -------------------------------------------------------------------
@@ -101,4 +101,5 @@
   virtual void PrintInfo();
 
+  // obsolete method
   void ActivateNuclearStopping(G4bool);
 
@@ -115,5 +116,4 @@
 
   G4bool     isInitialised;
-  G4bool     nuclearStopping;
 
   G4double   mass;
@@ -124,10 +124,3 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
-inline void G4hIonisation::ActivateNuclearStopping(G4bool val)
-{
-  nuclearStopping = val;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
 #endif
