Index: trunk/source/processes/electromagnetic/standard/CMakeLists.txt
===================================================================
--- trunk/source/processes/electromagnetic/standard/CMakeLists.txt	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/CMakeLists.txt	(revision 1350)
@@ -0,0 +1,18 @@
+#------------------------------------------------------------------------------
+# CMakeLists.txt
+# Module : G4emstandard
+# Package: Geant4.src.G4processes.G4electromagnetic.G4emstandard
+#
+# CMakeLists.txt for building a single granular library.
+#
+# Generated on : 24/9/2010
+#
+# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:53:57 bmorgan Exp $
+#
+#------------------------------------------------------------------------------
+
+if(GEANT4_BUILD_GRANULAR_LIBS)
+    include(Geant4MacroLibraryTargets)
+    GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
+endif()
+
Index: trunk/source/processes/electromagnetic/standard/include/G4IonCoulombCrossSection.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4IonCoulombCrossSection.hh	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/include/G4IonCoulombCrossSection.hh	(revision 1350)
@@ -0,0 +1,182 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//	G4IonCoulombCrossSection.hh
+//-------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+// File name:    G4IonCoulombCrossSection
+//
+// Author:      Cristina Consolandi
+//
+// Creation date: 05.10.2010 from G4eCoulombScatteringModel
+//
+// Class Description:
+//      Computation of Screen-Coulomb Cross Section
+//      for protons, alpha and heavy Ions
+//
+//
+// Reference:
+//      M.J. Boschini et al. "Nuclear and Non-Ionizing Energy-Loss
+//      for Coulomb Scattered Particles from Low Energy up to Relativistic
+//      Regime in Space Radiation Environment"
+//      Accepted for publication in the Proceedings of  the  ICATPP Conference
+//      on Cosmic Rays for Particle and Astroparticle Physics, Villa  Olmo, 7-8
+//      October,  2010, to be published by World Scientific (Singapore).
+//
+//      Available for downloading at:
+//      http://arxiv.org/abs/1011.4822
+//
+// -------------------------------------------------------------------
+
+//
+#ifndef G4IonCoulombCrossSection_h
+#define G4IonCoulombCrossSection_h 1
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "globals.hh"
+#include "G4Material.hh"
+#include "G4Element.hh"
+#include "G4ElementVector.hh"
+#include "G4NistManager.hh"
+#include "G4ThreeVector.hh"
+#include "G4Pow.hh"
+#include "G4LossTableManager.hh"
+
+class G4ParticleDefinition;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class G4IonCoulombCrossSection
+{
+
+public:
+
+  	G4IonCoulombCrossSection();
+
+  	virtual ~G4IonCoulombCrossSection();
+
+   	void Initialise(const G4ParticleDefinition*, G4double cosThetaLim);
+
+  	G4double NuclearCrossSection();
+
+  	G4double SampleCosineTheta();
+
+  	inline void SetupParticle(const G4ParticleDefinition*);
+
+  	void SetupKinematic(G4double kinEnergy, G4double cut,G4int iz);
+
+  	void SetupTarget(G4double Z, G4double kinEnergy,G4int heavycorr);
+
+	inline G4double GetMomentum2();
+
+private:
+         void   SetScreenRSquare(G4int iz);
+
+
+ 	G4IonCoulombCrossSection & operator=(const  G4IonCoulombCrossSection &right);
+  	G4IonCoulombCrossSection(const  G4IonCoulombCrossSection&);
+
+
+
+  	const G4ParticleDefinition* theProton;  
+
+  	G4NistManager*  fNistManager;		
+
+protected:
+  	G4double                coeff;	  
+
+	//cost - min - max 
+        G4double                cosThetaMin;// def 1.0
+        G4double                cosThetaMax;// def -1.0
+
+						//SetupTarget
+        G4double                cosTetMinNuc;// -->cosThetaMin
+        G4double                cosTetMaxNuc;// -->cosThetaMax
+
+
+	//cross section
+  	G4double                nucXSection;    	
+
+	//energy cut
+  	G4double                ecut;	    
+   	G4double                etag;	    
+
+	// projectile........................
+ 	const G4ParticleDefinition* particle;
+
+  	G4double                chargeSquare;  
+ 	G4double                spin;	   
+  	G4double                mass;	   
+
+	//lab of incedent particle 
+        G4double                tkinLab;
+        G4double                momLab2;
+        G4double                invbetaLab2;
+
+	//relative system with nucleus
+ 	G4double                tkin;	   
+  	G4double                mom2;	   
+  	G4double                invbeta2;	   
+
+  	// target nucleus
+  	G4double                targetZ;    
+  	G4double                targetMass; 
+  	G4double                screenZ; 
+  
+
+private:
+
+  	G4double                alpha2;
+  	G4double 		ScreenRSquare;  
+
+};
+
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+inline void G4IonCoulombCrossSection::SetupParticle(const G4ParticleDefinition* p)
+{
+  	particle = p;
+  	mass = particle->GetPDGMass();
+  	spin = particle->GetPDGSpin();
+  		if(0.0 != spin) { spin = 0.5; }
+  	G4double q = std::fabs(particle->GetPDGCharge()/eplus);
+  	chargeSquare = q*q;
+  	tkin = 0.0;
+}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+
+inline G4double G4IonCoulombCrossSection::GetMomentum2(){
+	return mom2;
+}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#endif
+
+
Index: trunk/source/processes/electromagnetic/standard/include/G4IonCoulombScatteringModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4IonCoulombScatteringModel.hh	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/include/G4IonCoulombScatteringModel.hh	(revision 1350)
@@ -0,0 +1,187 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//	G4IonCoulombScatteringModel.hh
+// -------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+// File name:    G4IonCoulombScatteringModel 
+//
+// Author:	Cristina Consolandi
+//
+// Creation date: 05.10.2010 from G4eCoulombScatteringModel 
+//				& G4CoulombScatteringModel
+//
+//
+// Class Description:
+//	Single Scattering Model for
+//      for protons, alpha and heavy Ions
+//
+// Reference:		
+//	M.J. Boschini et al. "Nuclear and Non-Ionizing Energy-Loss 
+//	for Coulomb ScatteredParticles from Low Energy up to Relativistic 
+//	Regime in Space	Radiation Environment"
+//	Accepted for publication in the Proceedings of  the  ICATPP Conference
+//	on Cosmic Rays for Particle and Astroparticle Physics, Villa  Olmo, 7-8
+//	October,  2010, to be published by World Scientific (Singapore).
+//
+//      Available for downloading at:
+//      http://arxiv.org/abs/1011.4822
+//
+// -------------------------------------------------------------------
+//
+
+#ifndef G4IonCoulombScatteringModel_h
+#define G4IonCoulombScatteringModel_h 1
+
+#include "G4VEmModel.hh"
+#include "globals.hh"
+#include "G4NistManager.hh"
+#include "G4IonCoulombCrossSection.hh"
+
+#include <vector>
+using namespace std;
+
+class G4ParticleChangeForGamma;
+class G4ParticleDefinition;
+
+class G4IonCoulombScatteringModel : public G4VEmModel
+{
+
+public:
+
+  	G4IonCoulombScatteringModel(const G4String& nam = "IonCoulombScattering");
+ 
+  	virtual ~G4IonCoulombScatteringModel();
+
+  	virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
+ 
+  	virtual G4double ComputeCrossSectionPerAtom(
+                                const G4ParticleDefinition*,
+				G4double kinEnergy, 
+				G4double Z, 
+				G4double A, 
+				G4double cut,
+				G4double emax);
+
+  	virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
+				 const G4MaterialCutsCouple*,
+				 const G4DynamicParticle*,
+				 G4double tmin,
+				 G4double maxEnergy);
+
+
+  	
+  	inline void SetRecoilThreshold(G4double eth);
+        void        SetHeavyIonCorr(G4int b) {heavycorr=b; };
+        G4int       GetHeavyIonCorr() {return heavycorr; };
+
+
+
+
+protected: 
+
+	 
+  	inline void DefineMaterial(const G4MaterialCutsCouple*);
+  
+  	inline void SetupParticle(const G4ParticleDefinition*);
+
+
+
+private:
+
+
+  	// hide assignment operator
+  G4IonCoulombScatteringModel & operator=(const G4IonCoulombScatteringModel &right);
+  G4IonCoulombScatteringModel(const  G4IonCoulombScatteringModel&);
+
+
+protected:
+
+
+  	G4ParticleTable*          theParticleTable;
+  	G4ParticleChangeForGamma* fParticleChange; 
+  	G4NistManager*            fNistManager;
+  	G4IonCoulombCrossSection* ioncross;	  
+
+        const std::vector<G4double>* pCuts;
+  	const G4MaterialCutsCouple* currentCouple; 
+  	const G4Material*           currentMaterial;
+  	const G4Element*            currentElement;
+        G4int                       currentMaterialIndex;
+
+
+	G4int 			  heavycorr;
+
+  	G4double                  cosThetaMin;
+  	G4double                  recoilThreshold;
+				
+
+	// projectile
+  	const G4ParticleDefinition* particle;		
+  	const G4ParticleDefinition* theProton;	
+  	G4double                  mass;		
+ 	G4double                  lowEnergyLimit;
+
+
+private:
+
+  	G4bool                    isInitialised;	
+
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+void G4IonCoulombScatteringModel::DefineMaterial(const G4MaterialCutsCouple* cup)
+{ 
+  	if(cup != currentCouple) {
+    		currentCouple = cup;
+    		currentMaterial = cup->GetMaterial();
+                currentMaterialIndex = currentCouple->GetIndex();
+
+  		}
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+inline
+void G4IonCoulombScatteringModel::SetupParticle(const G4ParticleDefinition* p)
+{
+  	if(p != particle) {
+    		particle = p;
+    		mass = particle->GetPDGMass();
+		ioncross->SetupParticle(p);
+  		}
+}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+inline void G4IonCoulombScatteringModel::SetRecoilThreshold(G4double eth)
+{
+  	recoilThreshold = eth;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#endif
Index: trunk/source/processes/electromagnetic/standard/include/G4KleinNishinaModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4KleinNishinaModel.hh	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/include/G4KleinNishinaModel.hh	(revision 1350)
@@ -0,0 +1,104 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4KleinNishinaModel.hh,v 1.1 2010/09/03 14:11:58 vnivanch Exp $
+// GEANT4 tag $Name: emstand-V09-03-24 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+//
+// File name:     G4KleinNishinaModel
+//
+// Author:        Vladimir Ivanchenko on base of G4KleinNishinaCompton
+//
+// Creation date: 13.06.2010
+//
+// Modifications:
+//
+// Class Description:
+//
+// Implementation of gamma Compton scattering with atomic effects 
+// 
+
+// -------------------------------------------------------------------
+//
+
+#ifndef G4KleinNishinaModel_h
+#define G4KleinNishinaModel_h 1
+
+#include "G4VEmModel.hh"
+#include <vector>
+
+class G4ParticleChangeForGamma;
+class G4VAtomDeexcitation;
+
+class G4KleinNishinaModel : public G4VEmModel
+{
+
+public:
+
+  G4KleinNishinaModel(const G4String& nam = "KleinNishina");
+
+  virtual ~G4KleinNishinaModel();
+
+  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
+
+  virtual G4double ComputeCrossSectionPerAtom(
+                                const G4ParticleDefinition*,
+                                      G4double kinEnergy, 
+                                      G4double Z, 
+                                      G4double A, 
+                                      G4double cut,
+                                      G4double emax);
+
+  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
+				 const G4MaterialCutsCouple*,
+				 const G4DynamicParticle*,
+				 G4double tmin,
+				 G4double maxEnergy);
+
+protected:
+
+  G4ParticleDefinition*     theGamma;
+  G4ParticleDefinition*     theElectron;
+  G4ParticleChangeForGamma* fParticleChange;
+  G4double                  lowestGammaEnergy;
+
+private:
+
+  // hide assignment operator
+  G4KleinNishinaModel & operator=(const  G4KleinNishinaModel &right);
+  G4KleinNishinaModel(const  G4KleinNishinaModel&);
+
+  G4VAtomDeexcitation*      fAtomDeexcitation;
+  G4bool                    isInitialized;
+  std::vector<G4double>     fProbabilities;
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#endif
Index: trunk/source/processes/electromagnetic/standard/include/G4ModifiedTsai.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4ModifiedTsai.hh	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/include/G4ModifiedTsai.hh	(revision 1350)
@@ -0,0 +1,90 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4ModifiedTsai.hh,v 1.1 2010/10/14 15:17:48 vnivanch Exp $
+// GEANT4 tag $Name: emstand-V09-03-24 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+//
+// File name:  G4ModifiedTsai
+//
+// Author:     Andreia Trindade (andreia@lip.pt)
+//             Pedro Rodrigues  (psilva@lip.pt)
+//             Luis Peralta     (luis@lip.pt)
+// 
+// Creation date: 21 March 2003
+//
+// Modifications: 
+// 21 Mar 2003 A.Trindade First implementation acording with new design
+// 24 Mar 2003 A.Trindade Fix in Tsai generator in order to prevent theta 
+//                        generation above pi
+// 13 Oct 2010  V.Ivanchenko  Moved to standard and improved comment
+//
+// Class Description: 
+//
+// Bremsstrahlung Angular Distribution Generation 
+// suggested by L.Urban (Geant3 manual (1993) Phys211)
+// Derived from Tsai distribution (Rev Mod Phys 49,421(1977))
+//
+// -------------------------------------------------------------------
+//
+
+#ifndef G4ModifiedTsai_h
+#define G4ModifiedTsai_h 1
+
+#include "G4ios.hh"
+#include "globals.hh"
+#include "G4VBremAngularDistribution.hh"
+
+class G4ModifiedTsai : public G4VBremAngularDistribution
+{
+
+public:
+
+  G4ModifiedTsai(const G4String& name = "");
+
+  virtual ~G4ModifiedTsai();
+
+  G4double PolarAngle(const G4double initial_energy,
+		      const G4double final_energy,
+		      const G4int Z);
+
+  void PrintGeneratorInformation() const;
+
+protected:
+
+private:
+
+  // hide assignment operator 
+     G4ModifiedTsai & operator=(const  G4ModifiedTsai &right);
+     G4ModifiedTsai(const  G4ModifiedTsai&);
+
+};
+
+#endif
+
Index: trunk/source/processes/electromagnetic/standard/include/G4PEEffectFluoModel.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4PEEffectFluoModel.hh	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/include/G4PEEffectFluoModel.hh	(revision 1350)
@@ -0,0 +1,105 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4PEEffectFluoModel.hh,v 1.1 2010/09/03 14:11:16 vnivanch Exp $
+// GEANT4 tag $Name: emstand-V09-03-24 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+//
+// File name:     G4PEEffectFluoModel
+//
+// Author:        Vladimir Ivanchenko on base of G4PEEffectModel
+//
+// Creation date: 13.06.2010
+//
+// Modifications:
+//
+// Class Description:
+//
+// Implementation of the photo-electric effect with deexcitation
+//
+
+// -------------------------------------------------------------------
+//
+
+#ifndef G4PEEffectFluoModel_h
+#define G4PEEffectFluoModel_h 1
+
+#include "G4VEmModel.hh"
+
+class G4ParticleChangeForGamma;
+class G4VAtomDeexcitation;
+
+class G4PEEffectFluoModel : public G4VEmModel
+{
+
+public:
+
+  G4PEEffectFluoModel(const G4String& nam = "PhotoElectric");
+
+  virtual ~G4PEEffectFluoModel();
+
+  virtual 
+  void Initialise(const G4ParticleDefinition*, const G4DataVector&);
+
+  virtual 
+  G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
+				      G4double kinEnergy,
+				      G4double Z,
+				      G4double A,
+				      G4double, G4double);
+				      
+  virtual G4double CrossSectionPerVolume(const G4Material*,
+					 const G4ParticleDefinition*,
+					 G4double kineticEnergy,
+					 G4double cutEnergy,
+					 G4double maxEnergy);
+
+  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
+				 const G4MaterialCutsCouple*,
+				 const G4DynamicParticle*,
+				 G4double tmin,
+				 G4double maxEnergy);
+protected:
+
+  virtual G4double ElecCosThetaDistribution(G4double ElecKineEnergy);
+
+private:
+
+  G4ParticleDefinition*     theGamma;
+  G4ParticleDefinition*     theElectron;
+  G4ParticleChangeForGamma* fParticleChange;
+  G4VAtomDeexcitation*      fAtomDeexcitation;
+
+  G4double                  fminimalEnergy;
+  G4bool                    isInitialized;
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#endif
Index: trunk/source/processes/electromagnetic/standard/include/G4UniversalFluctuation93.hh
===================================================================
--- trunk/source/processes/electromagnetic/standard/include/G4UniversalFluctuation93.hh	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/include/G4UniversalFluctuation93.hh	(revision 1350)
@@ -0,0 +1,127 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4UniversalFluctuation93.hh,v 1.2 2010/10/26 10:06:12 vnivanch Exp $
+// GEANT4 tag $Name: emstand-V09-03-24 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+//
+// File name:     G4UniversalFluctuation93
+//
+// Author:        V.Ivanchenko make a class with the Laszlo Urban model
+//
+// Creation date: 03.01.2002
+//
+// Modifications:
+//
+// 09-12-02 remove warnings (V.Ivanchenko)
+// 28-12-02 add method Dispersion (V.Ivanchenko)
+// 07-02-03 change signature (V.Ivanchenko)
+// 13-02-03 Add name (V.Ivanchenko)
+// 16-10-03 Changed interface to Initialisation (V.Ivanchenko)
+// 07-02-05 define problim = 5.e-3 (mma)
+// 14-06-10 saved version of 9.3 model with the name G4UniversalFluctuation93
+//
+// Class Description:
+//
+// Implementation of energy loss fluctuations
+
+// -------------------------------------------------------------------
+//
+
+#ifndef G4UniversalFluctuation93_h
+#define G4UniversalFluctuation93_h 1
+
+
+#include "G4VEmFluctuationModel.hh"
+#include "G4ParticleDefinition.hh"
+
+class G4UniversalFluctuation93 : public G4VEmFluctuationModel
+{
+
+public:
+
+  G4UniversalFluctuation93(const G4String& nam = "UniFluc93");
+
+  virtual ~G4UniversalFluctuation93();
+
+  virtual G4double SampleFluctuations(const G4Material*,
+				      const G4DynamicParticle*,
+				      G4double&,
+				      G4double&,
+				      G4double&);
+
+  virtual G4double Dispersion(    const G4Material*,
+				  const G4DynamicParticle*,
+				  G4double&,
+				  G4double&);
+
+  virtual void InitialiseMe(const G4ParticleDefinition*);
+
+  // Initialisation prestep
+  virtual void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
+
+private:
+
+  // hide assignment operator
+  G4UniversalFluctuation93 & operator=(const  G4UniversalFluctuation93 &right);
+  G4UniversalFluctuation93(const  G4UniversalFluctuation93&);
+
+  const G4ParticleDefinition* particle;
+  const G4Material* lastMaterial;
+
+  G4double particleMass;
+  G4double chargeSquare;
+
+  // data members to speed up the fluctuation calculation
+  G4double ipotFluct;
+  G4double electronDensity;
+  
+  G4double f1Fluct;
+  G4double f2Fluct;
+  G4double e1Fluct;
+  G4double e2Fluct;
+  G4double e1LogFluct;
+  G4double e2LogFluct;
+  G4double ipotLogFluct;
+  G4double e0;
+
+  G4double e1,e2;
+
+  G4double minNumberInteractionsBohr;
+  G4double theBohrBeta2;
+  G4double minLoss;
+  G4double nmaxCont1;
+  G4double nmaxCont2;
+
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
+
Index: trunk/source/processes/electromagnetic/standard/sources.cmake
===================================================================
--- trunk/source/processes/electromagnetic/standard/sources.cmake	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/sources.cmake	(revision 1350)
@@ -0,0 +1,191 @@
+#------------------------------------------------------------------------------
+# sources.cmake
+# Module : G4emstandard
+# Package: Geant4.src.G4processes.G4electromagnetic.G4emstandard
+#
+# Sources description for a library.
+# Lists the sources and headers of the code explicitely.
+# Lists include paths needed.
+# Lists the internal granular and global dependencies of the library.
+# Source specific properties should be added at the end.
+#
+# Generated on : 24/9/2010
+#
+# $Id: sources.cmake,v 1.4 2010/11/29 17:35:45 bmorgan Exp $
+# GEANT4 Tag $Name: geant4-09-04-ref-00 $
+#
+#------------------------------------------------------------------------------
+
+# List external includes needed.
+include_directories(${CLHEP_INCLUDE_DIRS})
+
+# List internal includes needed.
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
+
+#
+# Define the Geant4 Module.
+#
+include(Geant4MacroDefineModule)
+GEANT4_DEFINE_MODULE(NAME G4emstandard
+    HEADERS
+        G4ASTARStopping.hh
+        G4BetheBlochIonGasModel.hh
+        G4BetheBlochModel.hh
+        G4BetheHeitlerModel.hh
+        G4BohrFluctuations.hh
+        G4BraggIonGasModel.hh
+        G4BraggIonModel.hh
+        G4BraggModel.hh
+        G4ComptonScattering.hh
+        G4CoulombScattering.hh
+        G4CoulombScatteringModel.hh
+        G4GammaConversion.hh
+        G4GoudsmitSaundersonMscModel.hh
+        G4GoudsmitSaundersonTable.hh
+        G4HeatedKleinNishinaCompton.hh
+        G4ICRU49NuclearStoppingModel.hh
+        G4ICRU73QOModel.hh
+        G4InitXscPAI.hh
+        G4IonCoulombCrossSection.hh
+        G4IonCoulombScatteringModel.hh
+        G4IonFluctuations.hh
+        G4KleinNishinaCompton.hh
+        G4KleinNishinaModel.hh
+        G4ModifiedTsai.hh
+        G4MollerBhabhaModel.hh
+        G4NuclearStopping.hh
+        G4PAIModel.hh
+        G4PAIPhotonModel.hh
+        G4PAIxSection.hh
+        G4PAIySection.hh
+        G4PEEffectFluoModel.hh
+        G4PEEffectModel.hh
+        G4PSTARStopping.hh
+        G4PairProductionRelModel.hh
+        G4PhotoElectricEffect.hh
+        G4UniversalFluctuation.hh
+        G4UniversalFluctuation93.hh
+        G4UrbanMscModel90.hh
+        G4UrbanMscModel92.hh
+        G4UrbanMscModel93.hh
+        G4WaterStopping.hh
+        G4WentzelOKandVIxSection.hh
+        G4WentzelVIModel.hh
+        G4alphaIonisation.hh
+        G4eBremsstrahlung.hh
+        G4eBremsstrahlungModel.hh
+        G4eBremsstrahlungRelModel.hh
+        G4eCoulombScatteringModel.hh
+        G4eIonisation.hh
+        G4eMultipleScattering.hh
+        G4eeToTwoGammaModel.hh
+        G4eplusAnnihilation.hh
+        G4hIonisation.hh
+        G4hMultipleScattering.hh
+        G4ionGasIonisation.hh
+        G4ionIonisation.hh
+    SOURCES
+        G4ASTARStopping.cc
+        G4BetheBlochIonGasModel.cc
+        G4BetheBlochModel.cc
+        G4BetheHeitlerModel.cc
+        G4BohrFluctuations.cc
+        G4BraggIonGasModel.cc
+        G4BraggIonModel.cc
+        G4BraggModel.cc
+        G4ComptonScattering.cc
+        G4CoulombScattering.cc
+        G4CoulombScatteringModel.cc
+        G4GammaConversion.cc
+        G4GoudsmitSaundersonMscModel.cc
+        G4GoudsmitSaundersonTable.cc
+        G4HeatedKleinNishinaCompton.cc
+        G4ICRU49NuclearStoppingModel.cc
+        G4ICRU73QOModel.cc
+        G4InitXscPAI.cc
+        G4IonCoulombCrossSection.cc
+        G4IonCoulombScatteringModel.cc
+        G4IonFluctuations.cc
+        G4KleinNishinaCompton.cc
+        G4KleinNishinaModel.cc
+        G4ModifiedTsai.cc
+        G4MollerBhabhaModel.cc
+        G4NuclearStopping.cc
+        G4PAIModel.cc
+        G4PAIPhotonModel.cc
+        G4PAIxSection.cc
+        G4PAIySection.cc
+        G4PEEffectFluoModel.cc
+        G4PEEffectModel.cc
+        G4PSTARStopping.cc
+        G4PairProductionRelModel.cc
+        G4PhotoElectricEffect.cc
+        G4UniversalFluctuation.cc
+        G4UniversalFluctuation93.cc
+        G4UrbanMscModel90.cc
+        G4UrbanMscModel92.cc
+        G4UrbanMscModel93.cc
+        G4WaterStopping.cc
+        G4WentzelOKandVIxSection.cc
+        G4WentzelVIModel.cc
+        G4alphaIonisation.cc
+        G4eBremsstrahlung.cc
+        G4eBremsstrahlungModel.cc
+        G4eBremsstrahlungRelModel.cc
+        G4eCoulombScatteringModel.cc
+        G4eIonisation.cc
+        G4eMultipleScattering.cc
+        G4eeToTwoGammaModel.cc
+        G4eplusAnnihilation.cc
+        G4hIonisation.cc
+        G4hMultipleScattering.cc
+        G4ionGasIonisation.cc
+        G4ionIonisation.cc
+    GRANULAR_DEPENDENCIES
+        G4baryons
+        G4bosons
+        G4cuts
+        G4emutils
+        G4geometrymng
+        G4globman
+        G4hepnumerics
+        G4intercoms
+        G4ions
+        G4leptons
+        G4materials
+        G4mesons
+        G4navigation
+        G4partman
+        G4procman
+        G4track
+        G4volumes
+    GLOBAL_DEPENDENCIES
+        G4geometry
+        G4global
+        G4intercoms
+        G4materials
+        G4particles
+        G4track
+    LINK_LIBRARIES
+)
+
+# List any source specific properties here
+
Index: trunk/source/processes/electromagnetic/standard/src/G4IonCoulombCrossSection.cc
===================================================================
--- trunk/source/processes/electromagnetic/standard/src/G4IonCoulombCrossSection.cc	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/src/G4IonCoulombCrossSection.cc	(revision 1350)
@@ -0,0 +1,257 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//      G4IonCoulombCrossSection.cc
+//-------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+// File name:    G4IonCoulombCrossSection
+//
+// Author:      Cristina Consolandi
+//
+// Creation date: 05.10.2010 from G4eCoulombScatteringModel 
+//                                 
+// Class Description:
+//	Computation of Screen-Coulomb Cross Section 
+//	for protons, alpha and heavy Ions
+//
+//
+// Reference:
+//      M.J. Boschini et al. "Nuclear and Non-Ionizing Energy-Loss 
+//      for Coulomb Scattered Particles from Low Energy up to Relativistic 
+//      Regime in Space Radiation Environment"
+//      Accepted for publication in the Proceedings of  the  ICATPP Conference
+//      on Cosmic Rays for Particle and Astroparticle Physics, Villa  Olmo, 7-8
+//      October,  2010, to be published by World Scientific (Singapore).
+//
+//      Available for downloading at:
+//      http://arxiv.org/abs/1011.4822
+//
+// -------------------------------------------------------------------
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+#include "G4IonCoulombCrossSection.hh"
+#include "Randomize.hh"
+#include "G4Proton.hh"
+#include "G4LossTableManager.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+
+using namespace std;
+
+G4IonCoulombCrossSection::G4IonCoulombCrossSection():
+   cosThetaMin(1.0),
+   cosThetaMax(-1.0),
+   alpha2(fine_structure_const*fine_structure_const)
+{
+  	fNistManager = G4NistManager::Instance();
+        theProton   = G4Proton::Proton();
+        particle=0;
+
+  	G4double p0 = electron_mass_c2*classic_electr_radius;
+  	coeff  = twopi*p0*p0;
+
+	cosTetMinNuc=0;
+	cosTetMaxNuc=0;
+	nucXSection =0;
+
+
+	chargeSquare = spin = mass =0;
+	tkinLab = momLab2 = invbetaLab2=0;
+        tkin = mom2 = invbeta2=0;
+
+	targetZ = targetMass = screenZ =0;
+        ScreenRSquare=0.;
+
+	etag = ecut = 0.0;
+
+}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+G4IonCoulombCrossSection::~G4IonCoulombCrossSection()
+{}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void G4IonCoulombCrossSection::Initialise(const G4ParticleDefinition* p,
+                                          G4double CosThetaLim)
+{
+
+	SetupParticle(p);
+  	nucXSection = 0.0;
+  	tkin = targetZ = mom2 = DBL_MIN;
+  	ecut = etag = DBL_MAX;
+  	particle = p;
+
+		
+  	cosThetaMin = CosThetaLim; 
+
+}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void G4IonCoulombCrossSection::SetupKinematic(G4double ekin,
+                                                     G4double cut,G4int iz )
+{
+        if(ekin != tkinLab || ecut != cut) {
+
+                // lab
+                tkinLab = ekin;
+                momLab2 = tkinLab*(tkinLab + 2.0*mass);
+                invbetaLab2 = 1.0 +  mass*mass/momLab2;
+
+                G4double etot = tkinLab + mass;
+                G4double ptot = sqrt(momLab2);
+                G4double m12  = mass*mass;
+
+                targetMass=fNistManager->GetAtomicMassAmu(iz)*amu_c2;
+                G4double m2   = targetMass;
+
+        // relativistic reduced mass from publucation
+        // A.P. Martynenko, R.N. Faustov, Teoret. mat. Fiz. 64 (1985) 179
+        
+		//incident particle & target nucleus
+	        G4double Ecm=sqrt(m12 + m2*m2 + 2.0*etot*m2);
+                G4double mu_rel=mass*m2/Ecm;
+                G4double momCM= ptot*m2/Ecm;
+                // relative system
+                mom2 = momCM*momCM;
+                invbeta2 = 1.0 +  mu_rel*mu_rel/mom2;
+                tkin = momCM*sqrt(invbeta2) - mu_rel;//Ekin of mu_rel
+                //.........................................................
+
+                cosTetMinNuc = cosThetaMin;
+                cosTetMaxNuc = cosThetaMax;
+
+        }
+
+}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+
+void G4IonCoulombCrossSection::SetupTarget(G4double Z, G4double e, G4int heavycorr)
+{
+        if(Z != targetZ || e != etag) {
+                etag    = e;
+                targetZ = Z;
+                G4int iz= G4int(Z);
+
+                SetScreenRSquare(iz);
+  		screenZ =0;
+        	screenZ = ScreenRSquare/mom2;
+
+	//	G4cout<< "heavycorr "<<heavycorr<<G4endl;
+
+		if(heavycorr!=0 && particle != theProton){
+			G4double corr=5.*twopi*Z*std::sqrt(chargeSquare*alpha2);
+			corr=std::pow(corr,0.12);
+			screenZ *=(1.13 + corr*3.76*Z*Z*chargeSquare*invbeta2*alpha2)/2.;
+//			G4cout<<" heavycorr Z e corr....2As "<< heavycorr << "\t"
+//				<<Z <<"\t"<<e/MeV <<"\t"<<screenZ<<G4endl;
+
+		}else{ screenZ *=(1.13 + 3.76*Z*Z*chargeSquare*invbeta2*alpha2)/2.;
+//                        G4cout<<"  heavycorr Z e....2As "<< heavycorr << "\t"
+//				<<Z <<"\t"<< e/MeV <<"\t"  <<screenZ<<G4endl;
+		}
+
+                if(1 == iz && particle == theProton && cosTetMaxNuc < 0.0) {
+                        cosTetMaxNuc = 0.0;
+                }
+
+        }
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+void G4IonCoulombCrossSection::SetScreenRSquare(G4int iz){
+
+                G4double a0 = electron_mass_c2/0.88534;
+
+                //target nucleus
+       	        G4double Z1=std::sqrt(chargeSquare);
+                G4double Z2=targetZ;
+        
+               	G4double Z1023=std::pow(Z1,0.23);
+        	G4double Z2023=std::pow(Z2,0.23);
+        
+		// Universal screening length
+		G4double x=a0*(Z1023+Z2023);
+
+        	//for proton Thomas-Fermi screening length	
+		if(particle == theProton){ 
+				x = a0*fNistManager->GetZ13(iz);
+                 		}		
+                ScreenRSquare  = alpha2*x*x;
+
+	 
+}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+G4double G4IonCoulombCrossSection::NuclearCrossSection()
+{
+  	// This method needs initialisation before be called
+
+	// scattering with target nucleus
+        G4double fac = coeff*targetZ*targetZ*chargeSquare*invbeta2/mom2;
+
+  	nucXSection  = 0.0;
+
+  	G4double x  = 1.0 - cosTetMinNuc;
+  	G4double x1 = x + screenZ;
+
+	// scattering with nucleus
+  	if(cosTetMaxNuc < cosTetMinNuc) {
+
+		nucXSection =fac*(cosTetMinNuc - cosTetMaxNuc)/
+                        (x1*(1.0 - cosTetMaxNuc + screenZ));
+
+    		}
+
+  return nucXSection;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+G4double G4IonCoulombCrossSection::SampleCosineTheta()
+{
+  	
+  	if(cosTetMaxNuc >= cosTetMinNuc) return 0.0;
+
+  	G4double x1 = 1. - cosTetMinNuc + screenZ;
+  	G4double x2 = 1. - cosTetMaxNuc + screenZ;
+  	G4double dx = cosTetMinNuc - cosTetMaxNuc;
+  	G4double grej, z1;
+
+    		z1 = x1*x2/(x1 + G4UniformRand()*dx) - screenZ;
+                grej = 1.0/(1.0 + z1);
+  
+
+  return z1;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+
+
+
Index: trunk/source/processes/electromagnetic/standard/src/G4IonCoulombScatteringModel.cc
===================================================================
--- trunk/source/processes/electromagnetic/standard/src/G4IonCoulombScatteringModel.cc	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/src/G4IonCoulombScatteringModel.cc	(revision 1350)
@@ -0,0 +1,259 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//	G4IonCoulombScatteringModel.cc
+// -------------------------------------------------------------------
+//
+// GEANT4 Class header file
+//
+// File name:    G4IonCoulombScatteringModel
+//
+// Author:      Cristina Consolandi
+//
+// Creation date: 05.10.2010 from G4eCoulombScatteringModel 
+//                               & G4CoulombScatteringModel
+//
+// Class Description:
+//      Single Scattering Model for
+//      for protons, alpha and heavy Ions
+//
+// Reference:
+//      M.J. Boschini et al. "Nuclear and Non-Ionizing Energy-Loss 
+//      for Coulomb ScatteredParticles from Low Energy up to Relativistic 
+//      Regime in Space Radiation Environment"
+//      Accepted for publication in the Proceedings of  the  ICATPP Conference
+//      on Cosmic Rays for Particle and Astroparticle Physics, Villa  Olmo, 7-8
+//      October,  2010, to be published by World Scientific (Singapore).
+//
+//      Available for downloading at:
+//	http://arxiv.org/abs/1011.4822
+//
+// -------------------------------------------------------------------
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+
+#include "G4IonCoulombScatteringModel.hh"
+#include "Randomize.hh"
+//#include "G4DataVector.hh"
+#include "G4ParticleChangeForGamma.hh"
+#include "G4Proton.hh"
+#include "G4ProductionCutsTable.hh"
+#include "G4NucleiProperties.hh"
+
+#include "G4UnitsTable.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+using namespace std;
+
+G4IonCoulombScatteringModel::G4IonCoulombScatteringModel(const G4String& nam)
+  : G4VEmModel(nam),
+
+    cosThetaMin(1.0),
+    isInitialised(false)
+{
+  	fNistManager = G4NistManager::Instance();
+  	theParticleTable = G4ParticleTable::GetParticleTable();
+  	theProton   = G4Proton::Proton();
+
+	pCuts=0;
+  	currentMaterial = 0;
+  	currentElement  = 0;
+        currentCouple = 0;
+
+        lowEnergyLimit  = 100*eV;
+  	recoilThreshold = 0.*eV;
+	heavycorr =0;
+  	particle = 0;
+	mass=0;
+
+  	ioncross = new G4IonCoulombCrossSection(); 
+
+}
+
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+G4IonCoulombScatteringModel::~G4IonCoulombScatteringModel()
+{ delete  ioncross;}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void G4IonCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
+                                           const G4DataVector&  )
+{
+  	SetupParticle(p);
+  	currentCouple = 0;
+  	cosThetaMin = cos(PolarAngleLimit());
+  	ioncross->Initialise(p,cosThetaMin);
+ 
+        pCuts = G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(3);
+
+
+  	if(!isInitialised) {
+    		isInitialised = true;
+    		fParticleChange = GetParticleChangeForGamma();
+  		}
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4double G4IonCoulombScatteringModel::ComputeCrossSectionPerAtom(
+                                const G4ParticleDefinition* p,
+				G4double kinEnergy, 
+				G4double Z, 
+				G4double, 
+				G4double cutEnergy,
+				G4double)
+{
+
+  	SetupParticle(p);
+ 
+  	G4double xsec =0.0;
+  		if(kinEnergy < lowEnergyLimit) return xsec;
+
+  	DefineMaterial(CurrentCouple());
+
+        G4int iz          = G4int(Z);
+
+	//from lab to pCM & mu_rel of effective particle
+        ioncross->SetupKinematic(kinEnergy, cutEnergy,iz);
+
+
+        ioncross->SetupTarget(Z, kinEnergy, heavycorr);
+
+
+  	xsec = ioncross->NuclearCrossSection();
+
+//cout<< "..........xsec "<<G4BestUnit(xsec,"Surface") <<endl;
+  return xsec;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void G4IonCoulombScatteringModel::SampleSecondaries(
+			       std::vector<G4DynamicParticle*>* fvect,
+			       const G4MaterialCutsCouple* couple,
+			       const G4DynamicParticle* dp,
+			       G4double cutEnergy, 
+			       G4double)
+{
+  	G4double kinEnergy = dp->GetKineticEnergy();
+
+  	if(kinEnergy < lowEnergyLimit) return;
+	
+  	DefineMaterial(couple);
+
+  	SetupParticle(dp->GetDefinition());
+
+	// Choose nucleus
+  	currentElement = SelectRandomAtom(couple,particle,
+                                    kinEnergy,cutEnergy,kinEnergy);
+
+	G4double Z  = currentElement->GetZ();
+  	G4int iz          = G4int(Z);
+  	G4int ia = SelectIsotopeNumber(currentElement);
+  	G4double m2 = G4NucleiProperties::GetNuclearMass(ia, iz);
+
+
+
+	G4double xsec= ComputeCrossSectionPerAtom(particle,kinEnergy, Z,
+                                kinEnergy, cutEnergy, kinEnergy) ;
+	if(xsec == 0.0)return;
+    
+	//scattering angle, z1 == (1-cost)
+  	G4double z1 = ioncross->SampleCosineTheta(); 
+
+  	if(z1 <= 0.0) { return; }
+
+  	G4double cost = 1.0 - z1;
+  	G4double sint = sqrt(z1*(1.0 + cost));
+  	G4double phi  = twopi * G4UniformRand();
+
+
+  	// kinematics in the Lab system
+  	G4double etot = kinEnergy + mass;
+  	G4double mom2=  kinEnergy*(kinEnergy+2.0*mass);
+  	G4double ptot = sqrt(mom2);
+
+	//CM particle 1
+  	G4double bet  = ptot/(etot + m2);
+  	G4double gam  = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
+
+	//CM 	
+  	G4double momCM2= ioncross->GetMomentum2();
+  	G4double momCM =std::sqrt(momCM2); 
+        //energy & momentum after scattering of incident particle
+	G4double pxCM = momCM*sint*cos(phi);
+        G4double pyCM = momCM*sint*sin(phi);
+        G4double pzCM = momCM*cost;
+  	G4double eCM  = sqrt(momCM2 + mass*mass);
+
+	//CM--->Lab
+  	G4ThreeVector v1(pxCM , pyCM, gam*(pzCM + bet*eCM));
+  	G4ThreeVector dir = dp->GetMomentumDirection(); 
+
+  	G4ThreeVector newDirection = v1.unit();
+  	newDirection.rotateUz(dir);   
+  
+	fParticleChange->ProposeMomentumDirection(newDirection);   
+  
+	// recoil.......................................
+	G4double trec =(1.0 - cost)* m2*(etot*etot - mass*mass )/
+				(mass*mass + m2*m2+ 2.*m2*etot);
+
+        G4double finalT = kinEnergy - trec;
+
+
+  	if(finalT <= lowEnergyLimit) { 
+    		trec = kinEnergy;  
+    		finalT = 0.0;
+  		} 
+    
+  	fParticleChange->SetProposedKineticEnergy(finalT);
+
+  	G4double tcut = recoilThreshold;
+        if(pCuts) { tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]); 
+
+			//G4cout<<" tcut eV "<<tcut/eV<<endl;
+			}
+ 
+  	if(trec > tcut) {
+    		G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz);
+    		G4double plab = sqrt(finalT*(finalT + 2.0*mass));
+    		G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit();
+    		G4DynamicParticle* newdp  = new G4DynamicParticle(ion, p2, trec);
+    			fvect->push_back(newdp);
+  	} else if(trec > 0.0) {
+    		fParticleChange->ProposeLocalEnergyDeposit(trec);
+    		fParticleChange->ProposeNonIonizingEnergyDeposit(trec);
+  	}
+
+
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+		
Index: trunk/source/processes/electromagnetic/standard/src/G4KleinNishinaModel.cc
===================================================================
--- trunk/source/processes/electromagnetic/standard/src/G4KleinNishinaModel.cc	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/src/G4KleinNishinaModel.cc	(revision 1350)
@@ -0,0 +1,285 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4KleinNishinaModel.cc,v 1.1 2010/09/03 14:11:16 vnivanch Exp $
+// GEANT4 tag $Name: emstand-V09-03-24 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4KleinNishinaModel
+//
+// Author:        Vladimir Ivanchenko on base of G4KleinNishinaCompton
+//
+// Creation date: 13.06.2010
+//
+// Modifications:
+//
+// Class Description:
+//
+// -------------------------------------------------------------------
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#include "G4KleinNishinaModel.hh"
+#include "G4Electron.hh"
+#include "G4Gamma.hh"
+#include "Randomize.hh"
+#include "G4RandomDirection.hh"
+#include "G4DataVector.hh"
+#include "G4ParticleChangeForGamma.hh"
+#include "G4VAtomDeexcitation.hh"
+#include "G4LossTableManager.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+using namespace std;
+
+G4KleinNishinaModel::G4KleinNishinaModel(const G4String& nam)
+  : G4VEmModel(nam),isInitialized(false)
+{
+  theGamma = G4Gamma::Gamma();
+  theElectron = G4Electron::Electron();
+  lowestGammaEnergy = 1.0*eV;
+  fProbabilities.resize(9,0.0);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+G4KleinNishinaModel::~G4KleinNishinaModel()
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void G4KleinNishinaModel::Initialise(const G4ParticleDefinition* p,
+				     const G4DataVector& cuts)
+{
+  fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
+  InitialiseElementSelectors(p, cuts);
+
+  if (isInitialized) { return; }
+  fParticleChange = GetParticleChangeForGamma();
+  isInitialized = true;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+G4double 
+G4KleinNishinaModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
+						G4double GammaEnergy,
+						G4double Z, G4double,
+						G4double, G4double)
+{
+  G4double CrossSection = 0.0 ;
+  if ( Z < 0.9999 || GammaEnergy < 0.1*keV) { return CrossSection; }
+
+  static const G4double a = 20.0 , b = 230.0 , c = 440.0;
+  
+  static const G4double
+    d1= 2.7965e-1*barn, d2=-1.8300e-1*barn, d3= 6.7527   *barn, d4=-1.9798e+1*barn,
+    e1= 1.9756e-5*barn, e2=-1.0205e-2*barn, e3=-7.3913e-2*barn, e4= 2.7079e-2*barn,
+    f1=-3.9178e-7*barn, f2= 6.8241e-5*barn, f3= 6.0480e-5*barn, f4= 3.0274e-4*barn;
+     
+  G4double p1Z = Z*(d1 + e1*Z + f1*Z*Z), p2Z = Z*(d2 + e2*Z + f2*Z*Z),
+           p3Z = Z*(d3 + e3*Z + f3*Z*Z), p4Z = Z*(d4 + e4*Z + f4*Z*Z);
+
+  G4double T0  = 15.0*keV; 
+  if (Z < 1.5) { T0 = 40.0*keV; } 
+
+  G4double X   = max(GammaEnergy, T0) / electron_mass_c2;
+  CrossSection = p1Z*std::log(1.+2.*X)/X
+               + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
+		
+  //  modification for low energy. (special case for Hydrogen)
+  if (GammaEnergy < T0) {
+    G4double dT0 = keV;
+    X = (T0+dT0) / electron_mass_c2 ;
+    G4double sigma = p1Z*log(1.+2*X)/X
+                    + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
+    G4double   c1 = -T0*(sigma-CrossSection)/(CrossSection*dT0);             
+    G4double   c2 = 0.150; 
+    if (Z > 1.5) { c2 = 0.375-0.0556*log(Z); }
+    G4double    y = log(GammaEnergy/T0);
+    CrossSection *= exp(-y*(c1+c2*y));          
+  }
+  //  G4cout << "e= " << GammaEnergy << " Z= " << Z 
+  //  << " cross= " << CrossSection << G4endl;
+  return CrossSection;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void G4KleinNishinaModel::SampleSecondaries(
+			     std::vector<G4DynamicParticle*>* fvect,
+			     const G4MaterialCutsCouple* couple,
+			     const G4DynamicParticle* aDynamicGamma,
+			     G4double,
+			     G4double)
+{
+  G4double energy = aDynamicGamma->GetKineticEnergy();
+  G4ThreeVector direction = aDynamicGamma->GetMomentumDirection();
+
+  // select atom
+  const G4Element* elm = SelectRandomAtom(couple, theGamma, energy);
+
+  // select shell first
+  G4int Z = (G4int)elm->GetZ();
+  G4int nShells = elm->GetNbOfAtomicShells();
+  if(nShells > (G4int)fProbabilities.size()) { fProbabilities.resize(nShells); }
+  G4double totprob = 0.0;
+  G4int i = 0;
+  for(; i<nShells; ++i) {
+    G4double prob = 0.0;
+    if(energy > elm->GetAtomicShell(i)) { 
+      prob = (G4double)elm->GetNbOfShellElectrons(i);
+    }
+    totprob += prob;
+    fProbabilities[i] = totprob; 
+  }
+  if(totprob == 0.0) { return; }
+
+  G4LorentzVector lv1, lv2, lv3;
+  G4LorentzVector lv0(energy*direction.x(),energy*direction.y(),
+		      energy*direction.z(),energy);
+  G4double eKinEnergy = 0.0;
+  G4double gamEnergy1 = 0.0;
+
+  // Loop on sampling
+  do {
+    G4double xprob = totprob*G4UniformRand();
+
+    for(i=0; i<nShells; ++i) { if(xprob <= fProbabilities[i]) {break;} }
+    if( i == nShells ) { return; }
+   
+    G4double bindingEnergy  = elm->GetAtomicShell(i);
+    G4double tkin =  bindingEnergy*0.5;
+    G4double eEnergy = tkin + electron_mass_c2;
+    G4double eTotMomentum = sqrt(tkin*(tkin + electron_mass_c2*2));
+    G4ThreeVector eDir = G4RandomDirection();
+    lv1 = lv0;
+    lv2.set(eTotMomentum*eDir.x(),eTotMomentum*eDir.y(),
+	    eTotMomentum*eDir.z(),eEnergy);
+    G4ThreeVector bst = lv2.boostVector();
+    lv1.boost(-bst);
+
+    // In the rest frame of an electron
+    // The scattered gamma energy is sampled according to Klein - Nishina formula.
+    // The random number techniques of Butcher & Messel are used 
+    // (Nuc Phys 20(1960),15).
+ 
+    G4double gamEnergy0 = lv1.e();
+    G4double E0_m = gamEnergy0 / electron_mass_c2 ;
+
+    G4ThreeVector gamDirection0 = (lv1.vect()).unit();
+
+    //
+    // sample the energy rate of the scattered gamma 
+    //
+
+    G4double epsilon, epsilonsq, onecost, sint2, greject ;
+
+    G4double epsilon0   = 1./(1. + 2.*E0_m);
+    G4double epsilon0sq = epsilon0*epsilon0;
+    G4double alpha1     = - log(epsilon0);
+    G4double alpha2     = 0.5*(1.- epsilon0sq);
+
+    do {
+      if ( alpha1/(alpha1+alpha2) > G4UniformRand() ) {
+	epsilon   = exp(-alpha1*G4UniformRand());   // epsilon0**r
+	epsilonsq = epsilon*epsilon; 
+
+      } else {
+	epsilonsq = epsilon0sq + (1.- epsilon0sq)*G4UniformRand();
+	epsilon   = sqrt(epsilonsq);
+      };
+
+      onecost = (1.- epsilon)/(epsilon*E0_m);
+      sint2   = onecost*(2.-onecost);
+      greject = 1. - epsilon*sint2/(1.+ epsilonsq);
+
+    } while (greject < G4UniformRand());
+ 
+    //
+    // scattered gamma angles. ( Z - axis along the parent gamma)
+    //
+
+    G4double cosTeta = 1. - onecost; 
+    G4double sinTeta = sqrt (sint2);
+    G4double Phi     = twopi * G4UniformRand();
+    G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
+
+    //
+    // update G4VParticleChange for the scattered gamma
+    //
+   
+    G4ThreeVector gamDirection1 ( dirx,diry,dirz );
+    gamDirection1.rotateUz(gamDirection0);
+    gamEnergy1 = epsilon*gamEnergy0;
+
+    // before scattering
+    lv2.set(0.0,0.0,0.0,electron_mass_c2);
+    lv2 += lv1;
+ 
+    // after scattering
+    lv1.set(gamEnergy1*gamDirection1.x(),gamEnergy1*gamDirection1.y(),
+	    gamEnergy1*gamDirection1.z(),gamEnergy1);
+    lv2 -= lv1;
+    lv2.boost(bst);
+    lv1.boost(bst);
+    eKinEnergy = lv2.e() - electron_mass_c2 - bindingEnergy;
+  } while ( eKinEnergy < 0.0 );
+
+  // gamma kinematics
+  gamEnergy1 = lv1.e();
+  if(gamEnergy1 > lowestGammaEnergy) {
+    fParticleChange->SetProposedKineticEnergy(gamEnergy1);
+    fParticleChange->ProposeMomentumDirection((lv1.vect()).unit());
+  } else { 
+    fParticleChange->ProposeTrackStatus(fStopAndKill);
+    fParticleChange->ProposeLocalEnergyDeposit(gamEnergy1);
+  }
+
+  //
+  // kinematic of the scattered electron
+  //
+  if(eKinEnergy > DBL_MIN) {
+    G4ThreeVector eDirection = (lv2.vect()).unit();
+    G4DynamicParticle* dp = new G4DynamicParticle(theElectron,eDirection,eKinEnergy);
+    fvect->push_back(dp);
+  }
+  // sample deexcitation
+  //
+  if(fAtomDeexcitation) {
+    G4AtomicShellEnumerator as = G4AtomicShellEnumerator(i);
+    const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);    
+    fAtomDeexcitation->GenerateParticles(fvect, shell, Z, couple->GetIndex());
+  }
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
Index: trunk/source/processes/electromagnetic/standard/src/G4ModifiedTsai.cc
===================================================================
--- trunk/source/processes/electromagnetic/standard/src/G4ModifiedTsai.cc	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/src/G4ModifiedTsai.cc	(revision 1350)
@@ -0,0 +1,102 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4ModifiedTsai.cc,v 1.1 2010/10/14 15:17:48 vnivanch Exp $
+// GEANT4 tag $Name: emstand-V09-03-24 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4ModifiedTsai
+//
+// Author:        Andreia Trindade (andreia@lip.pt)
+//                Pedro Rodrigues  (psilva@lip.pt)
+//                Luis Peralta     (luis@lip.pt)
+// 
+// Creation date: 21 March 2003
+//
+// Modifications: 
+// 21 Mar 2003 A.Trindade First implementation acording with new design
+// 24 Mar 2003 A.Trindade Fix in Tsai generator in order to prevent theta 
+//                        generation above pi
+// 13 Oct 2010  V.Ivanchenko  Moved to standard and improved comment
+//
+// Class Description: 
+//
+// Bremsstrahlung Angular Distribution Generation 
+// suggested by L.Urban (Geant3 manual (1993) Phys211)
+// Derived from Tsai distribution (Rev Mod Phys 49,421(1977))
+//
+// Class Description: End 
+//
+// -------------------------------------------------------------------
+//
+
+#include "G4ModifiedTsai.hh"
+#include "Randomize.hh"
+
+G4ModifiedTsai::G4ModifiedTsai(const G4String&)
+  : G4VBremAngularDistribution("AngularGenUrban")
+{}    
+
+G4ModifiedTsai::~G4ModifiedTsai() 
+{}
+
+G4double G4ModifiedTsai::PolarAngle(const G4double initial_energy,
+				    const G4double, // final_energy
+				    const G4int ) // Z
+{
+  // Sample gamma angle (Z - axis along the parent particle).
+  // Universal distribution suggested by L. Urban (Geant3 manual (1993) 
+  // Phys211) derived from Tsai distribution (Rev Mod Phys 49,421(1977))
+
+  G4double totalEnergy = initial_energy + electron_mass_c2;   
+
+  const G4double a1 = 0.625, a2 = 3.*a1, d = 27.;
+  G4double u, theta = 0;
+
+  do{
+    u = - std::log(G4UniformRand()*G4UniformRand());
+
+    if (9./(9.+d) > G4UniformRand()) { u /= a1; }
+    else                             { u /= a2; }
+    
+    theta = u*electron_mass_c2/totalEnergy;
+  } while(u*electron_mass_c2 > totalEnergy*pi);
+
+  return theta;
+}
+
+void G4ModifiedTsai::PrintGeneratorInformation() const
+{
+  G4cout << "\n" << G4endl;
+  G4cout << "Bremsstrahlung Angular Generator is Modified Tsai" << G4endl;
+  G4cout << "Distribution suggested by L.Urban (Geant3 manual (1993) Phys211)" 
+	 << G4endl;
+  G4cout << "Derived from Tsai distribution (Rev Mod Phys 49,421(1977)) \n" 
+	 << G4endl;
+} 
Index: trunk/source/processes/electromagnetic/standard/src/G4PEEffectFluoModel.cc
===================================================================
--- trunk/source/processes/electromagnetic/standard/src/G4PEEffectFluoModel.cc	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/src/G4PEEffectFluoModel.cc	(revision 1350)
@@ -0,0 +1,214 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4PEEffectFluoModel.cc,v 1.1 2010/09/03 14:11:16 vnivanch Exp $
+// GEANT4 tag $Name: emstand-V09-03-24 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4PEEffectFluoModel
+//
+// Author:        Vladimir Ivanchenko on base of G4PEEffectModel
+//
+// Creation date: 13.06.2010
+//
+// Modifications:
+//
+// Class Description:
+// Implementation of the photo-electric effect with deexcitation
+//
+// -------------------------------------------------------------------
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#include "G4PEEffectFluoModel.hh"
+#include "G4Electron.hh"
+#include "G4Gamma.hh"
+#include "Randomize.hh"
+#include "G4DataVector.hh"
+#include "G4ParticleChangeForGamma.hh"
+#include "G4VAtomDeexcitation.hh"
+#include "G4LossTableManager.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+using namespace std;
+
+G4PEEffectFluoModel::G4PEEffectFluoModel(const G4String& nam)
+  : G4VEmModel(nam),isInitialized(false)
+{
+  theGamma    = G4Gamma::Gamma();
+  theElectron = G4Electron::Electron();
+  fminimalEnergy = 1.0*eV;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+G4PEEffectFluoModel::~G4PEEffectFluoModel()
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void G4PEEffectFluoModel::Initialise(const G4ParticleDefinition*,
+				     const G4DataVector&)
+{
+  fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
+
+  if (isInitialized) return;
+  fParticleChange = GetParticleChangeForGamma();
+  isInitialized = true;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
+
+G4double 
+G4PEEffectFluoModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
+						G4double energy,
+						G4double Z, G4double,
+						G4double, G4double)
+{
+  G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy);
+
+  G4double energy2 = energy*energy;
+  G4double energy3 = energy*energy2;
+  G4double energy4 = energy2*energy2;
+
+  return SandiaCof[0]/energy  + SandiaCof[1]/energy2 +
+    SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+G4double 
+G4PEEffectFluoModel::CrossSectionPerVolume(const G4Material* material,
+					   const G4ParticleDefinition*,
+					   G4double energy,
+					   G4double, G4double)
+{
+  G4double* SandiaCof = 
+    material->GetSandiaTable()->GetSandiaCofForMaterial(energy);
+				
+  G4double energy2 = energy*energy;
+  G4double energy3 = energy*energy2;
+  G4double energy4 = energy2*energy2;
+	  
+  return SandiaCof[0]/energy  + SandiaCof[1]/energy2 +
+    SandiaCof[2]/energy3 + SandiaCof[3]/energy4; 
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void 
+G4PEEffectFluoModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
+				       const G4MaterialCutsCouple* couple,
+				       const G4DynamicParticle* aDynamicPhoton,
+				       G4double,
+				       G4double)
+{
+  const G4Material* aMaterial = couple->GetMaterial();
+
+  G4double energy = aDynamicPhoton->GetKineticEnergy();
+  G4ParticleMomentum PhotonDirection = aDynamicPhoton->GetMomentumDirection();
+
+  // select randomly one element constituing the material.
+  const G4Element* anElement = SelectRandomAtom(aMaterial,theGamma,energy);
+  
+  //
+  // Photo electron
+  //
+
+  // Select atomic shell
+  G4int nShells = anElement->GetNbOfAtomicShells();
+  G4int i  = 0;  
+  while ((i<nShells) && (energy<anElement->GetAtomicShell(i))) { ++i; }
+
+  // no shell available
+  if (i == nShells) { return; }
+  
+  G4double bindingEnergy  = anElement->GetAtomicShell(i);
+  G4double ElecKineEnergy = energy - bindingEnergy;
+
+  // create photo electron
+  //
+  if (ElecKineEnergy > fminimalEnergy) {
+    G4double cosTeta = ElecCosThetaDistribution(ElecKineEnergy);
+    G4double sinTeta = sqrt(1.-cosTeta*cosTeta);
+    G4double Phi     = twopi * G4UniformRand();
+    G4double dirx = sinTeta*cos(Phi),diry = sinTeta*sin(Phi),dirz = cosTeta;
+    G4ThreeVector ElecDirection(dirx,diry,dirz);
+    ElecDirection.rotateUz(PhotonDirection);
+    //
+    G4DynamicParticle* aParticle = new G4DynamicParticle (
+                       theElectron,ElecDirection, ElecKineEnergy);
+    fvect->push_back(aParticle);
+  } 
+
+  // sample deexcitation
+  //
+  if(fAtomDeexcitation) {
+    G4int Z = (G4int)anElement->GetZ();
+    G4AtomicShellEnumerator as = G4AtomicShellEnumerator(i);
+    const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);    
+    fAtomDeexcitation->GenerateParticles(fvect, shell, Z, couple->GetIndex());
+  }
+
+  // kill primary photon
+  fParticleChange->SetProposedKineticEnergy(0.);
+  fParticleChange->ProposeTrackStatus(fStopAndKill);
+  fParticleChange->ProposeLocalEnergyDeposit(bindingEnergy);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4double G4PEEffectFluoModel::ElecCosThetaDistribution(G4double kineEnergy)
+{
+  // Compute Theta distribution of the emitted electron, with respect to the
+  // incident Gamma.
+  // The Sauter-Gavrila distribution for the K-shell is used.
+  //
+  G4double costeta = 1.;
+  G4double gamma   = 1. + kineEnergy/electron_mass_c2;
+  if (gamma > 5.) return costeta;
+  G4double beta  = sqrt(gamma*gamma-1.)/gamma;
+  G4double b     = 0.5*gamma*(gamma-1.)*(gamma-2);
+
+  G4double rndm,term,greject,grejsup;
+  if (gamma < 2.) grejsup = gamma*gamma*(1.+b-beta*b);
+  else            grejsup = gamma*gamma*(1.+b+beta*b);
+
+  do { rndm = 1.-2*G4UniformRand();
+       costeta = (rndm+beta)/(rndm*beta+1.);
+       term = 1.-beta*costeta;
+       greject = (1.-costeta*costeta)*(1.+b*term)/(term*term);
+  } while(greject < G4UniformRand()*grejsup);
+
+  return costeta;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/source/processes/electromagnetic/standard/src/G4UniversalFluctuation93.cc
===================================================================
--- trunk/source/processes/electromagnetic/standard/src/G4UniversalFluctuation93.cc	(revision 1350)
+++ trunk/source/processes/electromagnetic/standard/src/G4UniversalFluctuation93.cc	(revision 1350)
@@ -0,0 +1,333 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4UniversalFluctuation93.cc,v 1.2 2010/10/26 10:06:12 vnivanch Exp $
+// GEANT4 tag $Name: emstand-V09-03-24 $
+//
+// -------------------------------------------------------------------
+//
+// GEANT4 Class file
+//
+//
+// File name:     G4UniversalFluctuation93
+//
+// Author:        V.Ivanchenko make a class with the Laszlo Urban model
+// 
+// Creation date: 03.01.2002
+//
+// Modifications: 
+//
+// 28-12-02 add method Dispersion (V.Ivanchenko)
+// 07-02-03 change signature (V.Ivanchenko)
+// 13-02-03 Add name (V.Ivanchenko)
+// 16-10-03 Changed interface to Initialisation (V.Ivanchenko)
+// 07-11-03 Fix problem of rounding of double 
+// 06-02-04 Add control on big sigma > 2*meanLoss (V.Ivanchenko)
+// 26-04-04 Comment out the case of very small step (V.Ivanchenko)
+// 07-02-05 define problim = 5.e-3 (mma)
+// 03-05-05 conditions of Gaussian fluctuation changed (bugfix)
+//          + smearing for very small loss (L.Urban)
+// 03-10-05 energy dependent rate -> cut dependence of the
+//          distribution is much weaker (L.Urban)
+// 17-10-05 correction for very small loss (L.Urban)
+// 20-03-07 'GLANDZ' part rewritten completely, no 'very small loss'
+//          regime any more (L.Urban)
+// 03-04-07 correction to get better width of eloss distr.(L.Urban)
+// 13-07-07 add protection for very small step or low-density material (VI)
+// 19-03-09 new width correction (does not depend on previous steps) (L.Urban)
+// 20-03-09 modification in the width correction (L.Urban)
+// 14-06-10 saved version of 9.3 model with the name G4UniversalFluctuation93
+//
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "G4UniversalFluctuation93.hh"
+#include "Randomize.hh"
+#include "G4Poisson.hh"
+#include "G4Step.hh"
+#include "G4Material.hh"
+#include "G4DynamicParticle.hh"
+#include "G4ParticleDefinition.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+using namespace std;
+
+G4UniversalFluctuation93::G4UniversalFluctuation93(const G4String& nam)
+ :G4VEmFluctuationModel(nam),
+  particle(0),
+  minNumberInteractionsBohr(10.0),
+  theBohrBeta2(50.0*keV/proton_mass_c2),
+  minLoss(10.*eV),
+  nmaxCont1(4.),
+  nmaxCont2(16.)
+{
+  lastMaterial = 0;
+
+  particleMass = chargeSquare = ipotFluct = electronDensity = f1Fluct = f2Fluct 
+    = e1Fluct = e2Fluct = e1LogFluct = e2LogFluct = ipotLogFluct = e0  
+    = e1 = e2 = 0;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4UniversalFluctuation93::~G4UniversalFluctuation93()
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void G4UniversalFluctuation93::InitialiseMe(const G4ParticleDefinition* part)
+{
+  particle       = part;
+  particleMass   = part->GetPDGMass();
+  G4double q     = part->GetPDGCharge()/eplus;
+  chargeSquare   = q*q;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4double 
+G4UniversalFluctuation93::SampleFluctuations(const G4Material* material,
+					     const G4DynamicParticle* dp,
+					     G4double& tmax,
+					     G4double& length,
+					     G4double& meanLoss)
+{
+// Calculate actual loss from the mean loss.
+// The model used to get the fluctuations is essentially the same
+// as in Glandz in Geant3 (Cern program library W5013, phys332).
+// L. Urban et al. NIM A362, p.416 (1995) and Geant4 Physics Reference Manual
+
+  // shortcut for very very small loss (out of validity of the model)
+  //
+  if (meanLoss < minLoss)
+    return meanLoss;
+
+  if(!particle) InitialiseMe(dp->GetDefinition());
+
+  G4double tau   = dp->GetKineticEnergy()/particleMass;
+  G4double gam   = tau + 1.0;
+  G4double gam2  = gam*gam;
+  G4double beta2 = tau*(tau + 2.0)/gam2;
+
+  G4double loss(0.), siga(0.);
+  
+  // Gaussian regime
+  // for heavy particles only and conditions
+  // for Gauusian fluct. has been changed 
+  //
+  if ((particleMass > electron_mass_c2) &&
+      (meanLoss >= minNumberInteractionsBohr*tmax))
+  {
+    G4double massrate = electron_mass_c2/particleMass ;
+    G4double tmaxkine = 2.*electron_mass_c2*beta2*gam2/
+                        (1.+massrate*(2.*gam+massrate)) ;
+    if (tmaxkine <= 2.*tmax)   
+    {
+      electronDensity = material->GetElectronDensity();
+      siga  = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
+                                * electronDensity * chargeSquare;
+      siga = sqrt(siga);
+      G4double twomeanLoss = meanLoss + meanLoss;
+      if (twomeanLoss < siga) {
+        G4double x;
+        do {
+          loss = twomeanLoss*G4UniformRand();
+       	  x = (loss - meanLoss)/siga;
+        } while (1.0 - 0.5*x*x < G4UniformRand());
+      } else {
+        do {
+          loss = G4RandGauss::shoot(meanLoss,siga);
+        } while (loss < 0. || loss > twomeanLoss);
+      }
+      return loss;
+    }
+  }
+
+  // Glandz regime : initialisation
+  //
+  if (material != lastMaterial) {
+    f1Fluct      = material->GetIonisation()->GetF1fluct();
+    f2Fluct      = material->GetIonisation()->GetF2fluct();
+    e1Fluct      = material->GetIonisation()->GetEnergy1fluct();
+    e2Fluct      = material->GetIonisation()->GetEnergy2fluct();
+    e1LogFluct   = material->GetIonisation()->GetLogEnergy1fluct();
+    e2LogFluct   = material->GetIonisation()->GetLogEnergy2fluct();
+    ipotFluct    = material->GetIonisation()->GetMeanExcitationEnergy();
+    ipotLogFluct = material->GetIonisation()->GetLogMeanExcEnergy();
+    e0 = material->GetIonisation()->GetEnergy0fluct();
+    lastMaterial = material;
+  
+    // modification of some model parameters
+    // (this part should go to materials later)
+    G4double p = 1.40;
+    f2Fluct *= p;
+    f1Fluct = 1.-f2Fluct;
+    G4double q = 1.00;
+    e2Fluct *= q;
+    e2LogFluct = log(e2Fluct);
+    e1LogFluct = (ipotLogFluct-f2Fluct*e2LogFluct)/f1Fluct;
+    e1Fluct = exp(e1LogFluct);
+  }
+
+  // very small step or low-density material
+  if(tmax <= e0) return meanLoss;
+
+  G4double a1 = 0. , a2 = 0., a3 = 0. ;
+
+  // cut and material dependent rate 
+  G4double rate = 1.0;
+  if(tmax > ipotFluct) {
+    G4double w2 = log(2.*electron_mass_c2*beta2*gam2)-beta2;
+
+    if(w2 > ipotLogFluct && w2 > e2LogFluct) {
+
+      rate = 0.03+0.23*log(log(tmax/ipotFluct));
+      G4double C = meanLoss*(1.-rate)/(w2-ipotLogFluct);
+      a1 = C*f1Fluct*(w2-e1LogFluct)/e1Fluct;
+      a2 = C*f2Fluct*(w2-e2LogFluct)/e2Fluct;
+      // correction in order to get better FWHM values
+      // ( scale parameters a1 and e1)
+      G4double width = 1.;
+      if(meanLoss > 10.*e1Fluct)
+      {
+        width = 3.1623/sqrt(meanLoss/e1Fluct);
+        if(width < a2/a1)
+        width = a2/a1;
+      } 
+      a1 *= width;
+      e1 = e1Fluct/width;
+      e2 = e2Fluct;
+    }
+  }
+
+  G4double w1 = tmax/e0;
+  if(tmax > e0) 
+    a3 = rate*meanLoss*(tmax-e0)/(e0*tmax*log(w1));
+
+  //'nearly' Gaussian fluctuation if a1>nmaxCont2&&a2>nmaxCont2&&a3>nmaxCont2  
+  G4double emean = 0.;
+  G4double sig2e = 0., sige = 0.;
+  G4double p1 = 0., p2 = 0., p3 = 0.;
+ 
+  // excitation of type 1
+  if(a1 > nmaxCont2)
+  {
+    emean += a1*e1;
+    sig2e += a1*e1*e1;
+  }
+  else if(a1 > 0.)
+  {
+    p1 = G4double(G4Poisson(a1));
+    loss += p1*e1;
+    if(p1 > 0.) 
+      loss += (1.-2.*G4UniformRand())*e1;
+  }
+
+  // excitation of type 2
+  if(a2 > nmaxCont2)
+  {
+    emean += a2*e2;
+    sig2e += a2*e2*e2;
+  }
+  else if(a2 > 0.)
+  {
+    p2 = G4double(G4Poisson(a2));
+    loss += p2*e2;
+    if(p2 > 0.) 
+      loss += (1.-2.*G4UniformRand())*e2;
+  }
+
+  // ionisation 
+  G4double lossc = 0.;
+  if(a3 > 0.)
+  {
+    p3 = a3;
+    G4double alfa = 1.;
+    if(a3 > nmaxCont2)
+    {
+       alfa            = w1*(nmaxCont2+a3)/(w1*nmaxCont2+a3);
+       G4double alfa1  = alfa*log(alfa)/(alfa-1.);
+       G4double namean = a3*w1*(alfa-1.)/((w1-1.)*alfa);
+       emean          += namean*e0*alfa1;
+       sig2e          += e0*e0*namean*(alfa-alfa1*alfa1);
+       p3              = a3-namean;
+    }
+
+    G4double w2 = alfa*e0;
+    G4double w  = (tmax-w2)/tmax;
+    G4int nb = G4Poisson(p3);
+    if(nb > 0)
+      for (G4int k=0; k<nb; k++) lossc += w2/(1.-w*G4UniformRand());
+  }
+
+  if(emean > 0.)
+  {
+    sige   = sqrt(sig2e);
+    loss += max(0.,G4RandGauss::shoot(emean,sige));
+  }
+
+  loss += lossc;
+
+  return loss;
+
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+
+G4double G4UniversalFluctuation93::Dispersion(
+                          const G4Material* material,
+                          const G4DynamicParticle* dp,
+ 				G4double& tmax,
+			        G4double& length)
+{
+  if(!particle) InitialiseMe(dp->GetDefinition());
+
+  electronDensity = material->GetElectronDensity();
+
+  G4double gam   = (dp->GetKineticEnergy())/particleMass + 1.0;
+  G4double beta2 = 1.0 - 1.0/(gam*gam);
+
+  G4double siga  = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
+                 * electronDensity * chargeSquare;
+
+  return siga;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void G4UniversalFluctuation93::SetParticleAndCharge(
+          const G4ParticleDefinition* part, G4double q2)
+{
+  if(part != particle) {
+    particle       = part;
+    particleMass   = part->GetPDGMass();
+  }
+  chargeSquare = q2;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
