Index: trunk/source/processes/electromagnetic/utils/include/G4VEmModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/utils/include/G4VEmModel.hh	(revision 1005)
+++ trunk/source/processes/electromagnetic/utils/include/G4VEmModel.hh	(revision 1007)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4VEmModel.hh,v 1.66 2009/02/19 09:57:36 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-02-ref-02 $
+// $Id: G4VEmModel.hh,v 1.59 2008/11/13 19:29:41 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-02 $
 //
 // -------------------------------------------------------------------
@@ -65,5 +65,4 @@
 // 12-09-08 Added methods GetParticleCharge, GetChargeSquareRatio, 
 //          CorrectionsAlongStep, ActivateNuclearStopping (VI)
-// 16-02-09 Move implementations of virtual methods to source (VI)
 //
 // Class Description:
@@ -121,4 +120,10 @@
   //------------------------------------------------------------------------
 
+  // dEdx per unit length
+  virtual G4double ComputeDEDX(const G4MaterialCutsCouple*,
+			       const G4ParticleDefinition*,
+			       G4double kineticEnergy,
+			       G4double cutEnergy = DBL_MAX);
+
   // main method to compute dEdx
   virtual G4double ComputeDEDXPerVolume(const G4Material*,
@@ -126,4 +131,11 @@
 					G4double kineticEnergy,
 					G4double cutEnergy = DBL_MAX);
+
+  // cross section per volume
+  virtual G4double CrossSection(const G4MaterialCutsCouple*,
+				const G4ParticleDefinition*,
+				G4double kineticEnergy,
+				G4double cutEnergy = 0.0,
+				G4double maxEnergy = DBL_MAX);
 
   // main method to compute cross section per Volume
@@ -163,9 +175,4 @@
 				    G4double length);
 
-  // sample PIXE deexcitation
-  virtual void SampleDeexcitationAlongStep(const G4Material*,
-					   const G4Track&,
-                                           G4double& eloss);
-
 protected:
 
@@ -205,23 +212,10 @@
 				  const G4DataVector&);
 
-  // dEdx per unit length
-  inline G4double ComputeDEDX(const G4MaterialCutsCouple*,
-			      const G4ParticleDefinition*,
-			      G4double kineticEnergy,
-			      G4double cutEnergy = DBL_MAX);
-
-  // cross section per volume
-  inline G4double CrossSection(const G4MaterialCutsCouple*,
-				const G4ParticleDefinition*,
-				G4double kineticEnergy,
-				G4double cutEnergy = 0.0,
-				G4double maxEnergy = DBL_MAX);
-
   // compute mean free path via cross section per volume
-  inline G4double ComputeMeanFreePath(const G4ParticleDefinition*,
-				      G4double kineticEnergy,
-				      const G4Material*,    
-				      G4double cutEnergy = 0.0,
-				      G4double maxEnergy = DBL_MAX);
+  G4double ComputeMeanFreePath(const G4ParticleDefinition*,
+			       G4double kineticEnergy,
+			       const G4Material*,    
+			       G4double cutEnergy = 0.0,
+			       G4double maxEnergy = DBL_MAX);
 
   // generic cross section per element
@@ -239,5 +233,6 @@
 					   G4double maxEnergy = DBL_MAX);
 
-  // to select atom cross section per volume is recomputed for each element 
+  // this method can be used only in the case if generic method to compute
+  // cross section per volume is used and not overwritten in derived class 
   inline const G4Element* SelectRandomAtom(const G4Material*,
 					   const G4ParticleDefinition*,
@@ -265,6 +260,4 @@
   inline G4bool LPMFlag() const;
 
-  inline G4bool DeexcitationFlag() const;
-
   inline void SetHighEnergyLimit(G4double);
 
@@ -277,6 +270,4 @@
   inline void SetLPMFlag(G4bool val);
 
-  inline void SetDeexcitationFlag(G4bool val);
-
   inline void ActivateNuclearStopping(G4bool);
 
@@ -287,13 +278,9 @@
   inline void SetParticleChange(G4VParticleChange*, G4VEmFluctuationModel*);
 
-  inline void SetCurrentCouple(const G4MaterialCutsCouple*);
-
 protected:
 
-  inline const G4MaterialCutsCouple* CurrentCouple() const;
+  inline const G4Element* GetCurrentElement() const;
 
   inline void SetCurrentElement(const G4Element*);
-
-  inline const G4Element* GetCurrentElement() const;
 
 private:
@@ -328,9 +315,6 @@
 private:
 
-  const G4MaterialCutsCouple* currentCouple;
-  const G4Element*            currentElement;
-
+  const G4Element* currentElement;
   G4int                  nsec;
-  G4bool                 flagDeexcitation;
   std::vector<G4double>  xsec;
 
@@ -340,37 +324,77 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
-inline G4double G4VEmModel::ComputeDEDX(const G4MaterialCutsCouple* c,
-                                        const G4ParticleDefinition* p,
-					G4double kinEnergy,
-					G4double cutEnergy)
-{
-  currentCouple = c;
-  return ComputeDEDXPerVolume(c->GetMaterial(),p,kinEnergy,cutEnergy);
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline G4double G4VEmModel::CrossSection(const G4MaterialCutsCouple* c,
-                                         const G4ParticleDefinition* p,
-					 G4double kinEnergy,
-					 G4double cutEnergy,
-					 G4double maxEnergy)
-{
-  currentCouple = c;
-  return CrossSectionPerVolume(c->GetMaterial(),p,kinEnergy,cutEnergy,maxEnergy);
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline G4double G4VEmModel::ComputeMeanFreePath(const G4ParticleDefinition* p,
-						G4double ekin,
-						const G4Material* material,     
-						G4double emin,
-						G4double emax)
-{
-  G4double mfp = DBL_MAX;
-  G4double cross = CrossSectionPerVolume(material,p,ekin,emin,emax);
-  if (cross > DBL_MIN) mfp = 1./cross;
-  return mfp;
+inline G4double G4VEmModel::HighEnergyLimit() const
+{
+  return highLimit;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::LowEnergyLimit() const
+{
+  return lowLimit;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::PolarAngleLimit() const
+{
+  return polarAngleLimit;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::SecondaryThreshold() const
+{
+  return secondaryThreshold;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+inline G4bool G4VEmModel::LPMFlag() const 
+{
+  return theLPMflag;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::SetHighEnergyLimit(G4double val)
+{
+  highLimit = val;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::SetLowEnergyLimit(G4double val)
+{
+  lowLimit = val;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::SetPolarAngleLimit(G4double val)
+{
+  polarAngleLimit = val;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::SetSecondaryThreshold(G4double val) 
+{
+  secondaryThreshold = val;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+inline void G4VEmModel::SetLPMFlag(G4bool val) 
+{
+  theLPMflag = val;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+inline void G4VEmModel::ActivateNuclearStopping(G4bool val)
+{
+  nuclearStopping = val;
 }
 
@@ -391,4 +415,94 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
+inline void G4VEmModel::SetParticleChange(G4VParticleChange* p,  
+                                          G4VEmFluctuationModel* f = 0)
+{
+  if(p && pParticleChange != p) pParticleChange = p;
+  fluc = f;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+
+inline G4VEmFluctuationModel* G4VEmModel::GetModelOfFluctuations()
+{
+  return fluc;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::MinEnergyCut(const G4ParticleDefinition*,
+                                         const G4MaterialCutsCouple*)
+{
+  return 0.0;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::GetChargeSquareRatio(const G4ParticleDefinition* p,
+						 const G4Material*, G4double)
+{
+  G4double q = p->GetPDGCharge()/CLHEP::eplus;
+  return q*q;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::GetParticleCharge(const G4ParticleDefinition* p,
+					      const G4Material*, G4double)
+{
+  return p->GetPDGCharge();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::CorrectionsAlongStep(const G4MaterialCutsCouple*,
+					     const G4DynamicParticle*,
+					     G4double&,G4double&,G4double)
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::ComputeDEDXPerVolume(const G4Material*,
+						 const G4ParticleDefinition*,
+						 G4double,G4double)
+{
+  return 0.0;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::ComputeDEDX(const G4MaterialCutsCouple* c,
+                                        const G4ParticleDefinition* p,
+					G4double kinEnergy,
+					G4double cutEnergy)
+{
+  return ComputeDEDXPerVolume(c->GetMaterial(),p,kinEnergy,cutEnergy);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::CrossSection(const G4MaterialCutsCouple* c,
+                                         const G4ParticleDefinition* p,
+					 G4double kinEnergy,
+					 G4double cutEnergy,
+					 G4double maxEnergy)
+{
+  return CrossSectionPerVolume(c->GetMaterial(),p,
+			       kinEnergy,cutEnergy,maxEnergy);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::ComputeCrossSectionPerAtom(
+                                         const G4ParticleDefinition*,
+					 G4double, G4double, G4double,
+					 G4double, G4double)
+{
+  return 0.0;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 inline 
 const G4Element* G4VEmModel::SelectRandomAtom(const G4MaterialCutsCouple* couple,
@@ -398,5 +512,4 @@
 					      G4double maxEnergy)
 {
-  currentCouple = couple;
   if(nSelectors > 0) {
     currentElement = 
@@ -458,98 +571,14 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
-inline G4VEmFluctuationModel* G4VEmModel::GetModelOfFluctuations()
-{
-  return fluc;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline G4double G4VEmModel::HighEnergyLimit() const
-{
-  return highLimit;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline G4double G4VEmModel::LowEnergyLimit() const
-{
-  return lowLimit;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline G4double G4VEmModel::PolarAngleLimit() const
-{
-  return polarAngleLimit;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline G4double G4VEmModel::SecondaryThreshold() const
-{
-  return secondaryThreshold;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-inline G4bool G4VEmModel::LPMFlag() const 
-{
-  return theLPMflag;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-inline G4bool G4VEmModel::DeexcitationFlag() const 
-{
-  return flagDeexcitation;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline void G4VEmModel::SetHighEnergyLimit(G4double val)
-{
-  highLimit = val;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline void G4VEmModel::SetLowEnergyLimit(G4double val)
-{
-  lowLimit = val;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline void G4VEmModel::SetPolarAngleLimit(G4double val)
-{
-  polarAngleLimit = val;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline void G4VEmModel::SetSecondaryThreshold(G4double val) 
-{
-  secondaryThreshold = val;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-inline void G4VEmModel::SetLPMFlag(G4bool val) 
-{
-  theLPMflag = val;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-inline void G4VEmModel::SetDeexcitationFlag(G4bool val) 
-{
-  flagDeexcitation = val;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-inline void G4VEmModel::ActivateNuclearStopping(G4bool val)
-{
-  nuclearStopping = val;
+inline const G4Element* G4VEmModel::GetCurrentElement() const
+{
+  return currentElement;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::SetCurrentElement(const G4Element* elm)
+{
+  currentElement = elm;
 }
 
@@ -565,4 +594,12 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
+inline G4double G4VEmModel::MaxSecondaryEnergy(const G4ParticleDefinition*,
+					       G4double kineticEnergy)
+{
+  return kineticEnergy;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 inline const G4String& G4VEmModel::GetName() const 
 {
@@ -571,39 +608,44 @@
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline void G4VEmModel::SetParticleChange(G4VParticleChange* p,  
-                                          G4VEmFluctuationModel* f = 0)
-{
-  if(p && pParticleChange != p) pParticleChange = p;
-  fluc = f;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline void G4VEmModel::SetCurrentCouple(const G4MaterialCutsCouple* p)
-{
-  currentCouple = p;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline const G4MaterialCutsCouple* G4VEmModel::CurrentCouple() const
-{
-  return currentCouple;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline void G4VEmModel::SetCurrentElement(const G4Element* elm)
-{
-  currentElement = elm;
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-inline const G4Element* G4VEmModel::GetCurrentElement() const
-{
-  return currentElement;
-}
+// Methods for msc simulation
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::SampleScattering(const G4DynamicParticle*, G4double)
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::ComputeTruePathLengthLimit(
+                                const G4Track&, 
+				G4PhysicsTable*, 
+				G4double)
+{
+  return DBL_MAX;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::ComputeGeomPathLength(G4double truePathLength)
+{
+  return truePathLength;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline G4double G4VEmModel::ComputeTrueStepLength(G4double geomPathLength)
+{
+  return geomPathLength;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::DefineForRegion(const G4Region*) 
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+inline void G4VEmModel::SetupForMaterial(const G4ParticleDefinition*,
+					 const G4Material*, G4double)
+{}
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
