Index: trunk/examples/extended/electromagnetic/TestEm8/GNUmakefile
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/GNUmakefile	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/GNUmakefile	(revision 1342)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.8 2008/06/11 22:27:45 maire Exp $
+# $Id: GNUmakefile,v 1.9 2010/09/28 19:07:32 vnivanch Exp $
 # --------------------------------------------------------------
 # GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
@@ -20,2 +20,6 @@
 
 include $(G4INSTALL)/config/binmake.gmk
+
+histclean:
+	rm ${G4WORKDIR}/tmp/${G4SYSTEM}/${G4TARGET}/Histo.o
+
Index: trunk/examples/extended/electromagnetic/TestEm8/History
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/History	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/History	(revision 1342)
@@ -1,3 +1,3 @@
-$Id: History,v 1.37 2010/06/06 04:31:28 perl Exp $
+$Id: History,v 1.40 2010/10/27 14:52:07 vnivanch Exp $
 -------------------------------------------------------------------
 
@@ -15,4 +15,16 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
+
+27-10-10 V.Ivant (testem8-V09-03-06)
+- DetectorConstruction - added more printout
+- DetectorMessenger - fixed state (added G4State_PreInit)
+- PhysicsList - fixed UI commands for step limiter
+
+28-09-10 V.Ivant (testem8-V09-03-05)
+- GNUmakefile - added histclean option 
+
+08-09-10 V.Ivant (testem8-V09-03-04)
+- The example is completely rewritten: physics, scoring, histograms,
+  README
 
 04-06-10 J.Perl (testem8-V09-03-03)
Index: trunk/examples/extended/electromagnetic/TestEm8/README
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/README	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/README	(revision 1342)
@@ -1,3 +1,3 @@
-$Id: README,v 1.4 2003/11/24 18:09:22 vnivanch Exp $
+$Id: README,v 1.5 2010/09/08 11:22:01 vnivanch Exp $
 -------------------------------------------------------------------
 
@@ -9,25 +9,32 @@
                             -------
 
-    Test for investigation of ionisation in thin absorbers, transition 
-    and synchrotron radiations.
-
+    Example for investigation of ionisation in thin absorbers and gaseous
+    detectors
 	
  1- GEOMETRY DEFINITION
  
- 	The "absorber" is a tube made of a given material.                
+ 	The target is a cilinder made of a given material placed inside
+        cilindrical container, which is placed inside the world volume.
  	
- 	Three parameters define the absorber :
- 	- the material of the absorber,
-	- the thickness of an absorber,
- 	- the transverse size of the absorber (the input face is a square). 
-    
-        The volume "World" contains the "absorber". 
-        In this test the parameters of the "World" can be changed , too.
+ 	Following parameters define the geometry:
+ 	- the material of the target,
+	- the thickness of the target,
+ 	- the radius of the target, 
+ 	- the material of the container,
+	- the thickness of the container,
+ 	- the material of the world.
+ 	
+        The list of materials used in gaseous detectors are built inside
+        the DetectorConstruction class, also NIST materials are availabe. 
+ 	The default geometry is provided but all parameters can be changed via
+ 	UI commands defined in the DetectorMessenger class, for example,
 
- 	In addition a transverse uniform magnetic field can be applied.
- 	
- 	The default geometry is constructed in DetectorConstruction class,
- 	but all the parameters can be changed via
- 	the commands defined in the DetectorMessenger class.
+    /testem/setGasMat      XeCH4C3H8
+    /testem/setWindowMat   G4_MYLAR
+    /testem/setWorldMat    G4_AIR
+    /testem/setGasThick    10 cm
+    /testem/setGasRad      20 cm
+    /testem/setWindowThick 50 um
+
  	
  2- AN EVENT : THE PRIMARY GENERATOR
@@ -35,52 +42,30 @@
  	The primary kinematic consists of a single particle which hits the
  	absorber perpendicular to the input face. The type of the particle
- 	and its energy are set in the PrimaryGeneratorAction class, and can
- 	be changed via the G4 build-in commands of ParticleGun class (see
- 	the macros provided with this example).
- 	
+ 	and its energy can be set via the G4 build-in commands of ParticleGun 
  	A RUN is a set of events.
  	
  3- DETECTOR RESPONSE
 
-        Here we test G4PAIionisation , G4IonisationByLogicalVolume and 
-        transition radiation processes
- 
- 	A HIT is a record, event per event , of all the 
- 	informations needed to simulate and analyse the detector response.
- 	
- 	In this example a CalorHit is defined as a set of 2 informations:
- 	- the total energy deposit in the absorber,
- 	- the total tracklength of all charged particles in the absorber,  
- 	
- 	Therefore  the absorber is declared
- 	'sensitive detector' (SD), which means they can contribute to the hit.
- 	
- 	At the end of a run, from the histogram(s), one can study 
-	different physics quantities such as :
-                                - angle distribution,
-				- energy deposit,
- 				- transmission/backscattering,
- 				-  ...
-        
-        The test contains 10 built-in histograms, which can be activated by
-        interactive commands (see the macros runxx.mac for details).
+        The TargetSD class sending information about each step inside the target
+        to the HistoManager class scoring of energy deposition in the detector.
+        Additionally at each step of a particle inside the target the number of 
+        ionisation clusters is sampled using G4ElectronIonPair helper class. The
+        parameter of transformation of energy into ionisation clusters can be
+        set via UI command:
 
-        The histogram files can be viewed using PAW e.g with the commands 
-
-                paw> h/file 1 geant4.plot01 or g4.p11
-                paw> option stat
-                paw> h/pl 1
-
+      /testem/setPairEnergy 19 eV
 
  				
- 4- PHYSICS DEMO
+ 4- PHYSICS 
  
  	The particle's type and the physic processes which will be available
- 	in this example are set in PhysicsList class.
- 	
- 	The  messenger classes introduce interactive commands . Using these
-        commands the geometry of the detector, the data of the primary
-        particle, the limits of the histograms , etc. can be changed.
- 	
+ 	in this example are set in PhysicsList class, which uses Geant4
+        EM physics constructors providing in the physics_list library.
+
+ 	The  messenger classes introduce interactive commands. In particular,
+        PAI ionisation model can be added using G4EmConfurator helper class,
+        which is invokated by the UI command
+
+      /testem/phys/addPhysics pai
 
  5- HOW TO START ?
@@ -91,5 +76,5 @@
  		
  	- execute TestEm8 in 'batch' mode from macro files e.g.
- 		% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8   run11.mac
+ 		% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8  TestEm8.in
 		
  	- execute TestEm8 in 'interactive' mode with visualization e.g.
Index: trunk/examples/extended/electromagnetic/TestEm8/TestEm8.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/TestEm8.cc	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/TestEm8.cc	(revision 1342)
@@ -24,7 +24,6 @@
 // ********************************************************************
 //
-//
-// $Id: TestEm8.cc,v 1.9 2010/05/21 18:15:04 maire Exp $
-// GEANT4 tag $Name: geant4-09-04-beta-01 $
+// $Id: TestEm8.cc,v 1.10 2010/09/08 09:12:10 vnivanch Exp $
+// GEANT4 tag $Name: examples-V09-03-09 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,11 +34,9 @@
 #include "Randomize.hh"
 
-#include "Em8DetectorConstruction.hh"
+#include "DetectorConstruction.hh"
 #include "PhysicsList.hh"
-#include "Em8PrimaryGeneratorAction.hh"
-#include "Em8RunAction.hh"
-#include "Em8EventAction.hh"
-#include "Em8SteppingAction.hh"
-#include "Em8SteppingVerbose.hh"
+#include "PrimaryGeneratorAction.hh"
+#include "RunAction.hh"
+#include "EventAction.hh"
 
 #ifdef G4VIS_USE
@@ -55,40 +52,19 @@
 int main(int argc,char** argv) 
 {
-
   //choose the Random engine
-
   CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
   
-  //my Verbose output class
-
-  G4VSteppingVerbose::SetInstance(new Em8SteppingVerbose);
-    
   // Construct the default run manager
-
   G4RunManager * runManager = new G4RunManager;
 
   // set mandatory initialization classes
-
-  Em8DetectorConstruction* detector;
-  detector = new Em8DetectorConstruction;
-  runManager->SetUserInitialization(detector);
   runManager->SetUserInitialization(new PhysicsList);
+  PrimaryGeneratorAction* gun = new PrimaryGeneratorAction();
+  runManager->SetUserInitialization(new DetectorConstruction(gun));
  
   // set user action classes
-
-  runManager->SetUserAction(new Em8PrimaryGeneratorAction(detector));
-
-  Em8RunAction* runAction = new Em8RunAction;
-
-  runManager->SetUserAction(runAction);
-
-  Em8EventAction* eventAction = new Em8EventAction(runAction);
-
-  runManager->SetUserAction(eventAction);
-
-  Em8SteppingAction* steppingAction = new Em8SteppingAction(detector,
-                                                            eventAction, 
-                                                            runAction);
-  runManager->SetUserAction(steppingAction);
+  runManager->SetUserAction(gun);
+  runManager->SetUserAction(new RunAction());
+  runManager->SetUserAction(new EventAction());
   
   G4UImanager* UI = G4UImanager::GetUIpointer();  
@@ -96,7 +72,7 @@
   if (argc!=1)   // batch mode  
     {
-     G4String command = "/control/execute ";
-     G4String fileName = argv[1];
-     UI->ApplyCommand(command+fileName);
+      G4String command = "/control/execute ";
+      G4String fileName = argv[1];
+      UI->ApplyCommand(command+fileName);
     }
     
@@ -104,6 +80,6 @@
     { 
 #ifdef G4VIS_USE
-   G4VisManager* visManager = new G4VisExecutive;
-   visManager->Initialize();
+      G4VisManager* visManager = new G4VisExecutive;
+      visManager->Initialize();
 #endif    
      
@@ -115,5 +91,5 @@
      
 #ifdef G4VIS_USE
-     delete visManager;
+      delete visManager;
 #endif     
     } 
Index: trunk/examples/extended/electromagnetic/TestEm8/TestEm8.in
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/TestEm8.in	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/TestEm8.in	(revision 1342)
@@ -13,13 +13,8 @@
 #/testem/phys/addPhysics  pai_photon
 #
-/testem/phys/setCuts    1 mm
 #/testem/stepMax         10 mm
 #
-#  PLOT: energy deposit distribution in absorber
-#
-/plots/setnbinEn 20
-/plots/setEnlow 0.0 MeV
-/plots/setEnhigh 0.060  MeV  
-/plots/sethistName g4.p11
+/testem/phys/setNbinsE 20
+/testem/phys/setMaxE 0.060  MeV  
 #
 /run/initialize
@@ -37,9 +32,4 @@
 /gun/energy 200000.00 MeV
 #
-#/gun/energy 200.0 MeV
-#
-#/tracking/verbose 1
-#
-/event/printModulo 100
 /run/beamOn 1000
 #
Index: trunk/examples/extended/electromagnetic/TestEm8/TestEm8.large_N.in
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/TestEm8.large_N.in	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/TestEm8.large_N.in	(revision 1342)
@@ -8,34 +8,17 @@
 #/tracking/verbose 2
 #
-#
 #  select EM PhysicsList
 #
-/testem/phys/addPhysics  standard
+/testem/phys/addPhysics  pai
+#/testem/phys/addPhysics  standard
 #
-#/testem/phys/addPhysics model
-#
-/testem/phys/setCuts    1 mm
-#/testem/phys/VertexCuts 0.1 mm
-#/testem/phys/MuonCuts  10.0 mm
-#/testem/stepMax         10 mm
-#
-#/process/eLoss/preciseRange  true
-#/process/eLoss/integral      true
-#
-#  hist file name
-#
-/plots/sethistName g4.p11
-#
-#  PLOT: energy deposit distribution in absorber
-#
-/plots/setnbinEn 20
-/plots/setEnlow 0.0 MeV
-/plots/setEnhigh 0.060  MeV  
-#
+/testem/phys/setNbinsE 20
+/testem/phys/setMaxE 0.060  MeV  
 #
 /run/initialize
+#
+/run/setCut  1 mm
+/run/setCutForRegion GasDetector 0.2 mm
 /run/particle/dumpCutValues
-#
-#/gun/particle e-
 #
 /gun/particle proton
@@ -49,7 +32,5 @@
 #/tracking/verbose 1
 #
-/event/printModulo 1000
 /run/beamOn 10000
-#
 #
 
Index: trunk/examples/extended/electromagnetic/TestEm8/TestEm8.out
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/TestEm8.out	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/TestEm8.out	(revision 1342)
@@ -5,5 +5,5 @@
 
 *************************************************************
- Geant4 version Name: geant4-09-03-ref-06    (25-June-2010)
+ Geant4 version Name: geant4-09-03-ref-09    (25-June-2010)
                       Copyright : Geant4 Collaboration
                       Reference : NIM A 506 (2003), 250-303
@@ -11,4 +11,227 @@
 *************************************************************
 
+
+***** Table : Nb of materials = 19 *****
+
+ Material:    G4_Ar     density:  1.662 mg/cm3  RadL: 117.621 m    Nucl.Int.Length: 719.260 m    Imean: 188.000 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Ar (Ar)   Z = 18.0   N =  40.0   A =  39.95 g/mole
+   --->  Isotope:  Ar36   Z = 18   N =  36   A =  35.97 g/mole   abundance:   0.34 %
+   --->  Isotope:  Ar38   Z = 18   N =  38   A =  37.96 g/mole   abundance:   0.06 %
+   --->  Isotope:  Ar40   Z = 18   N =  40   A =  39.96 g/mole   abundance:  99.60 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material:    G4_Kr     density:  3.478 mg/cm3  RadL:  32.694 m    Nucl.Int.Length: 439.629 m    Imean: 352.000 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Kr (Kr)   Z = 36.0   N =  83.9   A =  83.80 g/mole
+   --->  Isotope:  Kr78   Z = 36   N =  78   A =  77.92 g/mole   abundance:   0.35 %
+   --->  Isotope:  Kr80   Z = 36   N =  80   A =  79.92 g/mole   abundance:   2.28 %
+   --->  Isotope:  Kr82   Z = 36   N =  82   A =  81.91 g/mole   abundance:  11.58 %
+   --->  Isotope:  Kr83   Z = 36   N =  83   A =  82.91 g/mole   abundance:  11.49 %
+   --->  Isotope:  Kr84   Z = 36   N =  84   A =  83.91 g/mole   abundance:  57.00 %
+   --->  Isotope:  Kr86   Z = 36   N =  86   A =  85.91 g/mole   abundance:  17.30 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material:    G4_Xe     density:  5.485 mg/cm3  RadL:  15.462 m    Nucl.Int.Length: 324.779 m    Imean: 482.000 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Xe (Xe)   Z = 54.0   N = 131.4   A = 131.29 g/mole
+   --->  Isotope: Xe124   Z = 54   N = 124   A = 123.91 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe126   Z = 54   N = 126   A = 125.90 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe128   Z = 54   N = 128   A = 127.90 g/mole   abundance:   1.92 %
+   --->  Isotope: Xe129   Z = 54   N = 129   A = 128.91 g/mole   abundance:  26.44 %
+   --->  Isotope: Xe130   Z = 54   N = 130   A = 129.90 g/mole   abundance:   4.08 %
+   --->  Isotope: Xe131   Z = 54   N = 131   A = 130.90 g/mole   abundance:  21.18 %
+   --->  Isotope: Xe132   Z = 54   N = 132   A = 131.90 g/mole   abundance:  26.89 %
+   --->  Isotope: Xe134   Z = 54   N = 134   A = 133.91 g/mole   abundance:  10.44 %
+   --->  Isotope: Xe136   Z = 54   N = 136   A = 135.91 g/mole   abundance:   8.87 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material: G4_CARBON_DIOXIDE CO_2   density:  1.842 mg/cm3  RadL: 196.486 m    Nucl.Int.Length: 466.077 m    Imean:  85.000 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  27.29 %  ElmAbundance  33.33 %
+   --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  72.71 %  ElmAbundance  66.67 %
+
+ Material: G4_MYLAR     density:  1.400 g/cm3   RadL:  28.536 cm   Nucl.Int.Length:  55.985 cm   Imean:  78.700 eV 
+   --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:   4.20 %  ElmAbundance  36.36 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  62.50 %  ElmAbundance  45.46 %
+   --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  33.30 %  ElmAbundance  18.18 %
+
+ Material: G4_METHANE     density:  0.667 kg/m3   RadL: 696.479 m    Nucl.Int.Length: 910.708 m    Imean:  41.700 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:  25.13 %  ElmAbundance  80.00 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  74.87 %  ElmAbundance  20.00 %
+
+ Material: G4_PROPANE     density:  1.879 mg/cm3  RadL: 241.434 m    Nucl.Int.Length: 346.143 m    Imean:  47.100 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:  18.29 %  ElmAbundance  72.73 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  81.71 %  ElmAbundance  27.27 %
+
+ Material: G4_Galactic     density:  0.000 kg/m3   RadL: 204310101.835 pc   Nucl.Int.Length: 114327973.206 pc   Imean:  21.800 eV   temperature:   2.73 K  pressure:   0.00 atm
+   --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material:   Kr7CH4     density:  3.491 mg/cm3  RadL:  32.924 m    Nucl.Int.Length: 428.924 m    Imean: 337.765 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Kr (Kr)   Z = 36.0   N =  83.9   A =  83.80 g/mole
+   --->  Isotope:  Kr78   Z = 36   N =  78   A =  77.92 g/mole   abundance:   0.35 %
+   --->  Isotope:  Kr80   Z = 36   N =  80   A =  79.92 g/mole   abundance:   2.28 %
+   --->  Isotope:  Kr82   Z = 36   N =  82   A =  81.91 g/mole   abundance:  11.58 %
+   --->  Isotope:  Kr83   Z = 36   N =  83   A =  82.91 g/mole   abundance:  11.49 %
+   --->  Isotope:  Kr84   Z = 36   N =  84   A =  83.91 g/mole   abundance:  57.00 %
+   --->  Isotope:  Kr86   Z = 36   N =  86   A =  85.91 g/mole   abundance:  17.30 %  ElmMassFraction:  98.60 %  ElmAbundance  72.95 %
+   --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:   0.35 %  ElmAbundance  21.64 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   1.05 %  ElmAbundance   5.41 %
+
+ Material:   TRT_Xe     density:  5.485 mg/cm3  RadL:  15.463 m    Nucl.Int.Length: 324.801 m    Imean: 482.000 eV   temperature: 293.15 K  pressure:   1.00 atm
+   --->  Element: Xe (Xe)   Z = 54.0   N = 131.4   A = 131.29 g/mole
+   --->  Isotope: Xe124   Z = 54   N = 124   A = 123.91 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe126   Z = 54   N = 126   A = 125.90 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe128   Z = 54   N = 128   A = 127.90 g/mole   abundance:   1.92 %
+   --->  Isotope: Xe129   Z = 54   N = 129   A = 128.91 g/mole   abundance:  26.44 %
+   --->  Isotope: Xe130   Z = 54   N = 130   A = 129.90 g/mole   abundance:   4.08 %
+   --->  Isotope: Xe131   Z = 54   N = 131   A = 130.90 g/mole   abundance:  21.18 %
+   --->  Isotope: Xe132   Z = 54   N = 132   A = 131.90 g/mole   abundance:  26.89 %
+   --->  Isotope: Xe134   Z = 54   N = 134   A = 133.91 g/mole   abundance:  10.44 %
+   --->  Isotope: Xe136   Z = 54   N = 136   A = 135.91 g/mole   abundance:   8.87 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material:  TRT_CO2     density:  1.842 mg/cm3  RadL: 196.499 m    Nucl.Int.Length: 466.107 m    Imean:  90.958 eV   temperature: 293.15 K  pressure:   1.00 atm
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  27.29 %  ElmAbundance  33.33 %
+   --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  72.71 %  ElmAbundance  66.67 %
+
+ Material:  TRT_CF4     density:  3.900 mg/cm3  RadL:  87.158 m    Nucl.Int.Length: 234.197 m    Imean: 109.384 eV   temperature: 293.15 K  pressure:   1.00 atm
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  13.65 %  ElmAbundance  20.00 %
+   --->  Element: F (F)   Z =  9.0   N =  19.0   A =  19.00 g/mole
+   --->  Isotope:   F19   Z =  9   N =  19   A =  19.00 g/mole   abundance: 100.00 %  ElmMassFraction:  86.35 %  ElmAbundance  80.00 %
+
+ Material: XeCO2CF4     density:  4.760 mg/cm3  RadL:  20.851 m    Nucl.Int.Length: 314.963 m    Imean: 345.469 eV   temperature: 293.15 K  pressure:   1.00 atm
+   --->  Element: Xe (Xe)   Z = 54.0   N = 131.4   A = 131.29 g/mole
+   --->  Isotope: Xe124   Z = 54   N = 124   A = 123.91 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe126   Z = 54   N = 126   A = 125.90 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe128   Z = 54   N = 128   A = 127.90 g/mole   abundance:   1.92 %
+   --->  Isotope: Xe129   Z = 54   N = 129   A = 128.91 g/mole   abundance:  26.44 %
+   --->  Isotope: Xe130   Z = 54   N = 130   A = 129.90 g/mole   abundance:   4.08 %
+   --->  Isotope: Xe131   Z = 54   N = 131   A = 130.90 g/mole   abundance:  21.18 %
+   --->  Isotope: Xe132   Z = 54   N = 132   A = 131.90 g/mole   abundance:  26.89 %
+   --->  Isotope: Xe134   Z = 54   N = 134   A = 133.91 g/mole   abundance:  10.44 %
+   --->  Isotope: Xe136   Z = 54   N = 136   A = 135.91 g/mole   abundance:   8.87 %  ElmMassFraction:  80.70 %  ElmAbundance  35.01 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   3.17 %  ElmAbundance  15.02 %
+   --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:   2.84 %  ElmAbundance  10.10 %
+   --->  Element: F (F)   Z =  9.0   N =  19.0   A =  19.00 g/mole
+   --->  Isotope:   F19   Z =  9   N =  19   A =  19.00 g/mole   abundance: 100.00 %  ElmMassFraction:  13.30 %  ElmAbundance  39.87 %
+
+ Material:     C3H8     density:  3.758 mg/cm3  RadL: 120.742 m    Nucl.Int.Length: 173.106 m    Imean:  52.014 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  81.71 %  ElmAbundance  27.27 %
+   --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:  18.29 %  ElmAbundance  72.73 %
+
+ Material: XeCH4C3H8     density:  4.920 mg/cm3  RadL:  17.657 m    Nucl.Int.Length: 344.114 m    Imean: 438.263 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Xe (Xe)   Z = 54.0   N = 131.4   A = 131.29 g/mole
+   --->  Isotope: Xe124   Z = 54   N = 124   A = 123.91 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe126   Z = 54   N = 126   A = 125.90 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe128   Z = 54   N = 128   A = 127.90 g/mole   abundance:   1.92 %
+   --->  Isotope: Xe129   Z = 54   N = 129   A = 128.91 g/mole   abundance:  26.44 %
+   --->  Isotope: Xe130   Z = 54   N = 130   A = 129.90 g/mole   abundance:   4.08 %
+   --->  Isotope: Xe131   Z = 54   N = 131   A = 130.90 g/mole   abundance:  21.18 %
+   --->  Isotope: Xe132   Z = 54   N = 132   A = 131.90 g/mole   abundance:  26.89 %
+   --->  Isotope: Xe134   Z = 54   N = 134   A = 133.91 g/mole   abundance:  10.44 %
+   --->  Isotope: Xe136   Z = 54   N = 136   A = 135.91 g/mole   abundance:   8.87 %  ElmMassFraction:  97.10 %  ElmAbundance  48.49 %
+   --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:   0.60 %  ElmAbundance  38.95 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   2.30 %  ElmAbundance  12.56 %
+
+ Material:   Ar7CH4     density:  1.709 mg/cm3  RadL: 116.342 m    Nucl.Int.Length: 680.394 m    Imean: 177.716 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Ar (Ar)   Z = 18.0   N =  40.0   A =  39.95 g/mole
+   --->  Isotope:  Ar36   Z = 18   N =  36   A =  35.97 g/mole   abundance:   0.34 %
+   --->  Isotope:  Ar38   Z = 18   N =  38   A =  37.96 g/mole   abundance:   0.06 %
+   --->  Isotope:  Ar40   Z = 18   N =  40   A =  39.96 g/mole   abundance:  99.60 %  ElmMassFraction:  97.10 %  ElmAbundance  72.89 %
+   --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:   0.73 %  ElmAbundance  21.68 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   2.17 %  ElmAbundance   5.42 %
+
+ Material:    ArCO2     density:  1.822 mg/cm3  RadL: 119.168 m    Nucl.Int.Length: 604.526 m    Imean: 158.492 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Ar (Ar)   Z = 18.0   N =  40.0   A =  39.95 g/mole
+   --->  Isotope:  Ar36   Z = 18   N =  36   A =  35.97 g/mole   abundance:   0.34 %
+   --->  Isotope:  Ar38   Z = 18   N =  38   A =  37.96 g/mole   abundance:   0.06 %
+   --->  Isotope:  Ar40   Z = 18   N =  40   A =  39.96 g/mole   abundance:  99.60 %  ElmMassFraction:  78.30 %  ElmAbundance  56.99 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   5.92 %  ElmAbundance  14.34 %
+   --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  15.78 %  ElmAbundance  28.67 %
+
+ Material:  Xe20CO2     density:  5.082 mg/cm3  RadL:  17.750 m    Nucl.Int.Length: 323.450 m    Imean: 412.596 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Xe (Xe)   Z = 54.0   N = 131.4   A = 131.29 g/mole
+   --->  Isotope: Xe124   Z = 54   N = 124   A = 123.91 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe126   Z = 54   N = 126   A = 125.90 g/mole   abundance:   0.09 %
+   --->  Isotope: Xe128   Z = 54   N = 128   A = 127.90 g/mole   abundance:   1.92 %
+   --->  Isotope: Xe129   Z = 54   N = 129   A = 128.91 g/mole   abundance:  26.44 %
+   --->  Isotope: Xe130   Z = 54   N = 130   A = 129.90 g/mole   abundance:   4.08 %
+   --->  Isotope: Xe131   Z = 54   N = 131   A = 130.90 g/mole   abundance:  21.18 %
+   --->  Isotope: Xe132   Z = 54   N = 132   A = 131.90 g/mole   abundance:  26.89 %
+   --->  Isotope: Xe134   Z = 54   N = 134   A = 133.91 g/mole   abundance:  10.44 %
+   --->  Isotope: Xe136   Z = 54   N = 136   A = 135.91 g/mole   abundance:   8.87 %  ElmMassFraction:  92.20 %  ElmAbundance  56.91 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   2.13 %  ElmAbundance  14.36 %
+   --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:   5.67 %  ElmAbundance  28.73 %
+
+ Material:  Kr20CO2     density:  3.601 mg/cm3  RadL:  34.157 m    Nucl.Int.Length: 391.053 m    Imean: 296.925 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Element: Kr (Kr)   Z = 36.0   N =  83.9   A =  83.80 g/mole
+   --->  Isotope:  Kr78   Z = 36   N =  78   A =  77.92 g/mole   abundance:   0.35 %
+   --->  Isotope:  Kr80   Z = 36   N =  80   A =  79.92 g/mole   abundance:   2.28 %
+   --->  Isotope:  Kr82   Z = 36   N =  82   A =  81.91 g/mole   abundance:  11.58 %
+   --->  Isotope:  Kr83   Z = 36   N =  83   A =  82.91 g/mole   abundance:  11.49 %
+   --->  Isotope:  Kr84   Z = 36   N =  84   A =  83.91 g/mole   abundance:  57.00 %
+   --->  Isotope:  Kr86   Z = 36   N =  86   A =  85.91 g/mole   abundance:  17.30 %  ElmMassFraction:  89.00 %  ElmAbundance  58.62 %
+   --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   3.00 %  ElmAbundance  13.79 %
+   --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:   8.00 %  ElmAbundance  27.59 %
+
+
 /run/verbose 2
 #/tracking/verbose 2
@@ -19,24 +242,15 @@
 #/testem/phys/addPhysics  pai_photon
 #
-/testem/phys/setCuts 1 mm
 #/testem/stepMax         10 mm
 #
-#  PLOT: energy deposit distribution in absorber
-#
-/plots/setnbinEn 20
- Nb of bins in Edep plot = 20
-/plots/setEnlow 0.0 MeV
- Elow  in the  Edep plot = 0
-/plots/setEnhigh 0.060 MeV
- Ehigh in the  Edep plot = 0.06
-/plots/sethistName g4.p11
- hist file = g4.p11
+/testem/phys/setNbinsE 20
+/testem/phys/setMaxE 0.060 MeV
 #
 /run/initialize
 userDetector->Construct() start.
 
- The  WORLD   is made of 23.1022mm of Mylar, the transverse size (R) of the world is 100 mm. 
- The ABSORBER is made of 23mm of XeCH4C3H8, the transverse size (R) is 100 mm. 
- Z position of the (middle of the) absorber 0  mm.
+ The  WORLD   is made of 27.7224mm of G4_Galactic, the transverse size (R) of the world is 120.122 mm. 
+ The CONTAINER is made of 0.051mm of G4_MYLAR
+ The TARGET is made of 23mm of XeCH4C3H8, the transverse size (R) is 100 mm. 
 
 World is registered to the default region.
@@ -59,31 +273,19 @@
 /gun/energy 200000.00 MeV
 #
-#/gun/energy 200.0 MeV
-#
-#/tracking/verbose 1
-#
-/event/printModulo 100
 /run/beamOn 1000
-G4PAIModel::Initialise for e+
-G4PAIModel::Initialise for e-
-G4PAIModel::Initialise for mu+
-G4PAIModel::Initialise for mu-
-G4PAIModel::Initialise for pi+
-G4PAIModel::Initialise for pi-
-G4PAIModel::Initialise for proton
 
 phot:   for  gamma    SubType= 12
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-       PhotoElectric :     Emin=          0 eV         Emax=   10 TeV
+       PhotoElectric :   Emin=        0 eV       Emax=         10 TeV
 
 compt:   for  gamma    SubType= 13
       Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-       Klein-Nishina :     Emin=          0 eV         Emax=   10 TeV
+       Klein-Nishina :   Emin=        0 eV       Emax=         10 TeV
 
 conv:   for  gamma    SubType= 14
       Lambda tables from 1.022 MeV to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-       Bethe-Heitler :     Emin=          0 eV         Emax=   10 TeV
+        BetheHeitler :   Emin=        0 eV       Emax=         10 TeV
 
 msc:   for e-    SubType= 10
@@ -91,5 +293,5 @@
       RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-          UrbanMsc93 :     Emin=          0 eV         Emax=   10 TeV
+          UrbanMsc93 :   Emin=        0 eV       Emax=         10 TeV
 
 eIoni:   for  e-    SubType= 2
@@ -98,7 +300,7 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-        MollerBhabha :     Emin=          0 eV         Emax=   10 TeV
+        MollerBhabha :   Emin=        0 eV       Emax=         10 TeV
       ===== EM models for the G4Region  GasDetector ======
-            PAIModel :     Emin=          0 eV         Emax=   10 TeV
+            PAIModel :   Emin=        0 eV       Emax=         10 TeV
 
 eBrem:   for  e-    SubType= 3
@@ -107,6 +309,6 @@
       LPM flag: 1 for E > 1 GeV
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               eBrem :     Emin=          0 eV         Emax=   1 GeV
-            eBremRel :     Emin=          1 GeV        Emax=   10 TeV
+               eBrem :   Emin=        0 eV       Emax=          1 GeV  AngularGenUrban
+            eBremLPM :   Emin=        1 GeV      Emax=         10 TeV  AngularGenUrban
 
 eIoni:   for  e+    SubType= 2
@@ -115,7 +317,7 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-        MollerBhabha :     Emin=          0 eV         Emax=   10 TeV
+        MollerBhabha :   Emin=        0 eV       Emax=         10 TeV
       ===== EM models for the G4Region  GasDetector ======
-            PAIModel :     Emin=          0 eV         Emax=   10 TeV
+            PAIModel :   Emin=        0 eV       Emax=         10 TeV
 
 eBrem:   for  e+    SubType= 3
@@ -124,11 +326,11 @@
       LPM flag: 1 for E > 1 GeV
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               eBrem :     Emin=          0 eV         Emax=   1 GeV
-            eBremRel :     Emin=          1 GeV        Emax=   10 TeV
+               eBrem :   Emin=        0 eV       Emax=          1 GeV  AngularGenUrban
+            eBremLPM :   Emin=        1 GeV      Emax=         10 TeV  AngularGenUrban
 
 annihil:   for  e+    SubType= 5
       Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-            eplus2gg :     Emin=          0 eV         Emax=   10 TeV
+            eplus2gg :   Emin=        0 eV       Emax=         10 TeV
 
 msc:   for proton    SubType= 10
@@ -136,5 +338,5 @@
       RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-          UrbanMsc90 :     Emin=          0 eV         Emax=   10 TeV
+          UrbanMsc90 :   Emin=        0 eV       Emax=         10 TeV
 
 hIoni:   for  proton    SubType= 2
@@ -143,8 +345,8 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               Bragg :     Emin=          0 eV         Emax=   2 MeV
-          BetheBloch :     Emin=          2 MeV        Emax=   10 TeV
+               Bragg :   Emin=        0 eV       Emax=          2 MeV
+          BetheBloch :   Emin=        2 MeV      Emax=         10 TeV
       ===== EM models for the G4Region  GasDetector ======
-            PAIModel :     Emin=          0 eV         Emax=   10 TeV
+            PAIModel :   Emin=        0 eV       Emax=         10 TeV
 
 hBrems:   for  proton    SubType= 3
@@ -152,5 +354,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               hBrem :     Emin=          0 eV         Emax=   10 TeV
+               hBrem :   Emin=        0 eV       Emax=         10 TeV
 
 hPairProd:   for  proton    SubType= 4
@@ -158,10 +360,10 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-           hPairProd :     Emin=          0 eV         Emax=   10 TeV
+           hPairProd :   Emin=        0 eV       Emax=         10 TeV
 
 msc:   for GenericIon    SubType= 10
       RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-          UrbanMsc90 :     Emin=          0 eV         Emax=   10 TeV
+          UrbanMsc90 :   Emin=        0 eV       Emax=         10 TeV
 
 ionIoni:   for  GenericIon    SubType= 2
@@ -169,8 +371,8 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       finalRange(mm)= 0.1, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02
-      Stopping Power data for 17 ion/material pairs, nuclearStopping: 1
-      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-            BraggIon :     Emin=          0 eV         Emax=   2 MeV
-          BetheBloch :     Emin=          2 MeV        Emax=   10 TeV
+      Stopping Power data for 17 ion/material pairs 
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+            BraggIon :   Emin=        0 eV       Emax=          2 MeV
+          BetheBloch :   Emin=        2 MeV      Emax=         10 TeV
 
 hIoni:   for  anti_proton    SubType= 2
@@ -179,6 +381,12 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-            ICRU73QO :     Emin=          0 eV         Emax=   2 MeV
-          BetheBloch :     Emin=          2 MeV        Emax=   10 TeV
+            ICRU73QO :   Emin=        0 eV       Emax=          2 MeV
+          BetheBloch :   Emin=        2 MeV      Emax=         10 TeV
+
+msc:   for kaon+    SubType= 10
+      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
+      RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+          UrbanMsc90 :   Emin=        0 eV       Emax=         10 TeV
 
 hIoni:   for  kaon+    SubType= 2
@@ -187,6 +395,6 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               Bragg :     Emin=          0 eV         Emax=   1.05231 MeV
-          BetheBloch :     Emin=    1.05231 MeV        Emax=   10 TeV
+               Bragg :   Emin=        0 eV       Emax=    1.05231 MeV
+          BetheBloch :   Emin=  1.05231 MeV      Emax=         10 TeV
 
 hBrems:   for  kaon+    SubType= 3
@@ -194,5 +402,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               hBrem :     Emin=          0 eV         Emax=   10 TeV
+               hBrem :   Emin=        0 eV       Emax=         10 TeV
 
 hPairProd:   for  kaon+    SubType= 4
@@ -200,5 +408,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-           hPairProd :     Emin=          0 eV         Emax=   10 TeV
+           hPairProd :   Emin=        0 eV       Emax=         10 TeV
 
 hIoni:   for  kaon-    SubType= 2
@@ -207,6 +415,6 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-            ICRU73QO :     Emin=          0 eV         Emax=   1.05231 MeV
-          BetheBloch :     Emin=    1.05231 MeV        Emax=   10 TeV
+            ICRU73QO :   Emin=        0 eV       Emax=    1.05231 MeV
+          BetheBloch :   Emin=  1.05231 MeV      Emax=         10 TeV
 
 hBrems:   for  kaon-    SubType= 3
@@ -214,5 +422,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               hBrem :     Emin=          0 eV         Emax=   10 TeV
+               hBrem :   Emin=        0 eV       Emax=         10 TeV
 
 hPairProd:   for  kaon-    SubType= 4
@@ -220,11 +428,11 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-           hPairProd :     Emin=          0 eV         Emax=   10 TeV
+           hPairProd :   Emin=        0 eV       Emax=         10 TeV
 
 muMsc:   for mu+    SubType= 10
       Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
-      RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 0
-      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-          UrbanMsc90 :     Emin=          0 eV         Emax=   10 TeV
+      RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 11.4592
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+        WentzelVIUni :   Emin=        0 eV       Emax=         10 TeV
 
 muIoni:   for  mu+    SubType= 2
@@ -233,9 +441,9 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               Bragg :     Emin=          0 eV         Emax=   200 keV
-          BetheBloch :     Emin=        200 keV        Emax=   1 GeV
-        MuBetheBloch :     Emin=          1 GeV        Emax=   10 TeV
+               Bragg :   Emin=        0 eV       Emax=        200 keV
+          BetheBloch :   Emin=      200 keV      Emax=          1 GeV
+        MuBetheBloch :   Emin=        1 GeV      Emax=         10 TeV
       ===== EM models for the G4Region  GasDetector ======
-            PAIModel :     Emin=          0 eV         Emax=   10 TeV
+            PAIModel :   Emin=        0 eV       Emax=         10 TeV
 
 muBrems:   for  mu+    SubType= 3
@@ -243,5 +451,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-              MuBrem :     Emin=          0 eV         Emax=   10 TeV
+              MuBrem :   Emin=        0 eV       Emax=         10 TeV
 
 muPairProd:   for  mu+    SubType= 4
@@ -249,5 +457,11 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-          muPairProd :     Emin=          0 eV         Emax=   10 TeV
+          muPairProd :   Emin=        0 eV       Emax=         10 TeV
+
+CoulombScat:   for  mu+    SubType= 1
+      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
+      11.4592 < Theta(degree) < 180, Eth(MeV)= 10; pLimit(GeV^1)= 0.139531
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+  eCoulombScattering :   Emin=        0 eV       Emax=         10 TeV
 
 muIoni:   for  mu-    SubType= 2
@@ -256,9 +470,9 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-            ICRU73QO :     Emin=          0 eV         Emax=   200 keV
-          BetheBloch :     Emin=        200 keV        Emax=   1 GeV
-        MuBetheBloch :     Emin=          1 GeV        Emax=   10 TeV
+            ICRU73QO :   Emin=        0 eV       Emax=        200 keV
+          BetheBloch :   Emin=      200 keV      Emax=          1 GeV
+        MuBetheBloch :   Emin=        1 GeV      Emax=         10 TeV
       ===== EM models for the G4Region  GasDetector ======
-            PAIModel :     Emin=          0 eV         Emax=   10 TeV
+            PAIModel :   Emin=        0 eV       Emax=         10 TeV
 
 muBrems:   for  mu-    SubType= 3
@@ -266,5 +480,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-              MuBrem :     Emin=          0 eV         Emax=   10 TeV
+              MuBrem :   Emin=        0 eV       Emax=         10 TeV
 
 muPairProd:   for  mu-    SubType= 4
@@ -272,5 +486,11 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-          muPairProd :     Emin=          0 eV         Emax=   10 TeV
+          muPairProd :   Emin=        0 eV       Emax=         10 TeV
+
+CoulombScat:   for  mu-    SubType= 1
+      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
+      11.4592 < Theta(degree) < 180, Eth(MeV)= 10; pLimit(GeV^1)= 0.139531
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+  eCoulombScattering :   Emin=        0 eV       Emax=         10 TeV
 
 hIoni:   for  pi+    SubType= 2
@@ -279,8 +499,8 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               Bragg :     Emin=          0 eV         Emax=   297.504 keV
-          BetheBloch :     Emin=    297.504 keV        Emax=   10 TeV
+               Bragg :   Emin=        0 eV       Emax=    297.505 keV
+          BetheBloch :   Emin=  297.505 keV      Emax=         10 TeV
       ===== EM models for the G4Region  GasDetector ======
-            PAIModel :     Emin=          0 eV         Emax=   10 TeV
+            PAIModel :   Emin=        0 eV       Emax=         10 TeV
 
 hBrems:   for  pi+    SubType= 3
@@ -288,5 +508,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               hBrem :     Emin=          0 eV         Emax=   10 TeV
+               hBrem :   Emin=        0 eV       Emax=         10 TeV
 
 hPairProd:   for  pi+    SubType= 4
@@ -294,5 +514,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-           hPairProd :     Emin=          0 eV         Emax=   10 TeV
+           hPairProd :   Emin=        0 eV       Emax=         10 TeV
 
 msc:   for pi-    SubType= 10
@@ -300,5 +520,5 @@
       RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-          UrbanMsc90 :     Emin=          0 eV         Emax=   10 TeV
+          UrbanMsc90 :   Emin=        0 eV       Emax=         10 TeV
 
 hIoni:   for  pi-    SubType= 2
@@ -307,8 +527,8 @@
       finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-            ICRU73QO :     Emin=          0 eV         Emax=   297.504 keV
-          BetheBloch :     Emin=    297.504 keV        Emax=   10 TeV
+            ICRU73QO :   Emin=        0 eV       Emax=    297.505 keV
+          BetheBloch :   Emin=  297.505 keV      Emax=         10 TeV
       ===== EM models for the G4Region  GasDetector ======
-            PAIModel :     Emin=          0 eV         Emax=   10 TeV
+            PAIModel :   Emin=        0 eV       Emax=         10 TeV
 
 hBrems:   for  pi-    SubType= 3
@@ -316,5 +536,5 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-               hBrem :     Emin=          0 eV         Emax=   10 TeV
+               hBrem :   Emin=        0 eV       Emax=         10 TeV
 
 hPairProd:   for  pi-    SubType= 4
@@ -322,14 +542,14 @@
       Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
       ===== EM models for the G4Region  DefaultRegionForTheWorld ======
-           hPairProd :     Emin=          0 eV         Emax=   10 TeV
+           hPairProd :   Emin=        0 eV       Emax=         10 TeV
 
 Region <DefaultRegionForTheWorld> -- appears in <World> world volume
  Root logical volume(s) : World 
  Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
- Materials : Mylar 
+ Materials : G4_Galactic G4_MYLAR 
  Production cuts :   gamma 500 um      e- 500 um      e+ 500 um  proton 500 um 
 
 Region <GasDetector> -- appears in <World> world volume
- Root logical volume(s) : Absorber 
+ Root logical volume(s) : Gas 
  Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
  Materials : XeCH4C3H8 
@@ -339,11 +559,18 @@
 
 Index : 0     used in the geometry : Yes     recalculation needed : No 
- Material : Mylar
+ Material : G4_Galactic
  Range cuts        :  gamma  500 um     e-  500 um     e+  500 um  proton 500 um 
- Energy thresholds :  gamma  2.27786 keV    e-  261.805 keV    e+  258.31 keV proton 50 keV
+ Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 50 keV
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
 
 Index : 1     used in the geometry : Yes     recalculation needed : No 
+ Material : G4_MYLAR
+ Range cuts        :  gamma  500 um     e-  500 um     e+  500 um  proton 500 um 
+ Energy thresholds :  gamma  2.27786 keV    e-  263.57 keV    e+  258.31 keV proton 50 keV
+ Region(s) which use this couple : 
+    DefaultRegionForTheWorld
+
+Index : 2     used in the geometry : Yes     recalculation needed : No 
  Material : XeCH4C3H8
  Range cuts        :  gamma  1.8 mm     e-  1.8 mm     e+  1.8 mm  proton 1.8 mm 
@@ -359,83 +586,44 @@
     Total memory consumed for geometry optimisation:   0 kByte
     Total CPU time elapsed for geometry optimisation: 0 seconds
-### Run 0 start.
-
---------- Ranecu engine status ---------
- Initial seed (index) = 0
- Current couple of seeds = 9876, 54321
-----------------------------------------
+### Run 0 start
+HistoManager: Histograms are booked and run has been started
 Start Run processing.
-
----> Begin of Event: 0
-
----> Begin of Event: 100
-
----> Begin of Event: 200
-
----> Begin of Event: 300
-
----> Begin of Event: 400
-
----> Begin of Event: 500
-
----> Begin of Event: 600
-
----> Begin of Event: 700
-
----> Begin of Event: 800
-
----> Begin of Event: 900
+### PrimaryGeneratorAction::GeneratePrimaries ##########
+### proton  E(MeV)= 200000
+########################################################
 Run terminated.
 Run Summary
   Number of events processed : 1000
-  User=0.11s Real=0.1s Sys=0s
+  User=0.11s Real=0.11s Sys=0s
+RunAction: End of run actions are started
  ================== run summary =====================
- end of Run TotNbofEvents = 1000
-    mean charged track length   in absorber=24.2704 +- 0.310817  mm  
-
-            mean energy deposit in absorber=0.0160189 +- 0.000378691  MeV 
-
- mean number of steps in absorber (charged) =0.898 +- 0.0848269      
- mean number of steps in absorber (neutral) =0.002 +- 0.0014128      
-
-   mean number of charged secondaries = 0.257 +- 0.0163997
-
-   mean number of neutral secondaries = 0.002 +- 0.0014128
-
-   mean number of e-s =0.257  and e+s =0
-
-(number) transmission coeff=1  reflection coeff=0
-
- energy deposit distribution 
-#entries=1000    #underflows=0    #overflows=12
+   End of Run TotNbofEvents = 1000
+
+   Mean energy deposit in absorber = 15.134 +- 0.24587 keV;    RMS/Emean = 0.51376
+   Mean number of steps in absorber= 1.253;  mean number of ion-clusters = 794.89
+
+ ====== Energy deposit distribution   Noverflows= 0.009 ====== 
  bin nb      Elow      entries     normalized 
     0         0           0           0
-    1         3           4       0.004
-    2         6          95       0.095
-    3         9         270        0.27
-    4        12         251       0.251
-    5        15         146       0.146
-    6        18          90        0.09
-    7        21          49       0.049
-    8        24          30        0.03
-    9        27          16       0.016
+    1         3           5       0.005
+    2         6         105       0.105
+    3         9         278       0.278
+    4        12         238       0.238
+    5        15         141       0.141
+    6        18          75       0.075
+    7        21          50        0.05
+    8        24          32       0.032
+    9        27          21       0.021
    10        30          13       0.013
-   11        33           5       0.005
-   12        36           5       0.005
-   13        39           9       0.009
-   14        42           1       0.001
+   11        33           6       0.006
+   12        36           9       0.009
+   13        39           3       0.003
+   14        42           2       0.002
    15        45           2       0.002
    16        48           1       0.001
-   17        51           0           0
-   18        54           0           0
-   19        57           1       0.001
-
- Emp =           0.009   width=          0.006  MeV 
-
-
---------- Ranecu engine status ---------
- Initial seed (index) = 0
- Current couple of seeds = 1481926969, 852281434
-----------------------------------------
+   17        51           2       0.002
+   18        54           5       0.005
+   19        57           3       0.003
+ ================== run end ==========================
 #
 UserDetectorConstruction deleted.
Index: trunk/examples/extended/electromagnetic/TestEm8/include/PhysicsList.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/include/PhysicsList.hh	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/include/PhysicsList.hh	(revision 1342)
@@ -24,14 +24,17 @@
 // ********************************************************************
 //
+// $Id: PhysicsList.hh,v 1.5 2010/09/08 09:12:10 vnivanch Exp $
+// GEANT4 tag $Name: examples-V09-03-09 $
 //
-// $Id: PhysicsList.hh,v 1.4 2010/04/13 08:12:23 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-04-beta-01 $
+//---------------------------------------------------------------------------
 //
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+// ClassName:   PhysicsList
 //
-// 14.10.02 (V.Ivanchenko) provide modular list on base of old PhysicsList
+// Description: EM physics with a possibility to add PAI model
 //
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+// Author:      V.Ivanchenko 01.09.2010
+//
+//----------------------------------------------------------------------------
+//
 
 #ifndef PhysicsList_h
@@ -51,4 +54,5 @@
 {
 public:
+
   PhysicsList();
   virtual ~PhysicsList();
@@ -60,10 +64,10 @@
   void SetCutForElectron(G4double);
   void SetCutForPositron(G4double);
+  void SetCutForProton(G4double);
         
   void AddPhysicsList(const G4String& name);
   void ConstructProcess();
     
-  void AddStepMax();       
-  //StepMax* GetStepMaxProcess() {return stepMaxProcess;};
+  void AddStepMax(); 
 
 private:
@@ -78,4 +82,5 @@
   G4double cutForElectron;
   G4double cutForPositron;
+  G4double cutForProton;
 
   G4VPhysicsConstructor*  emPhysicsList;
Index: trunk/examples/extended/electromagnetic/TestEm8/include/PhysicsListMessenger.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/include/PhysicsListMessenger.hh	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/include/PhysicsListMessenger.hh	(revision 1342)
@@ -25,7 +25,16 @@
 //
 //
-// $Id: PhysicsListMessenger.hh,v 1.2 2006/06/29 16:59:49 gunter Exp $
-// GEANT4 tag $Name: geant4-09-04-beta-01 $
+// $Id: PhysicsListMessenger.hh,v 1.3 2010/09/08 09:12:10 vnivanch Exp $
+// GEANT4 tag $Name: examples-V09-03-09 $
 //
+//---------------------------------------------------------------------------
+//
+// ClassName:   PhysicsListMessenger
+//
+// Description: EM physics with a possibility to add PAI model
+//
+// Author:      V.Ivanchenko 01.09.2010
+//
+//----------------------------------------------------------------------------
 // 
 
@@ -42,4 +51,5 @@
 class G4UIcmdWithADoubleAndUnit;
 class G4UIcmdWithAString;
+class G4UIcmdWithAnInteger;
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -47,20 +57,19 @@
 class PhysicsListMessenger: public G4UImessenger
 {
-  public:
+public:
   
-    PhysicsListMessenger(PhysicsList* );
-   ~PhysicsListMessenger();
+  PhysicsListMessenger(PhysicsList* );
+  virtual ~PhysicsListMessenger();
     
-    void SetNewValue(G4UIcommand*, G4String);
+  void SetNewValue(G4UIcommand*, G4String);
     
-  private:
+private:
   
-    PhysicsList* pPhysicsList;
+  PhysicsList* pPhysicsList;
     
-    G4UIcmdWithADoubleAndUnit* gammaCutCmd;
-    G4UIcmdWithADoubleAndUnit* electCutCmd;
-    G4UIcmdWithADoubleAndUnit* protoCutCmd;    
-    G4UIcmdWithADoubleAndUnit* allCutCmd;    
-    G4UIcmdWithAString*        pListCmd;
+  G4UIcmdWithADoubleAndUnit* eCmd;
+  G4UIcmdWithAnInteger*      ebCmd;
+  G4UIcmdWithAnInteger*      cbCmd;
+  G4UIcmdWithAString*        pListCmd;
     
 };
Index: trunk/examples/extended/electromagnetic/TestEm8/src/PhysicsList.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/src/PhysicsList.cc	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/src/PhysicsList.cc	(revision 1342)
@@ -24,7 +24,16 @@
 // ********************************************************************
 //
-//
-// $Id: PhysicsList.cc,v 1.19 2010/06/04 17:08:15 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-04-beta-01 $
+// $Id: PhysicsList.cc,v 1.21 2010/10/27 14:52:07 vnivanch Exp $
+// GEANT4 tag $Name: examples-V09-03-09 $
+//
+//---------------------------------------------------------------------------
+//
+// ClassName:   PhysicsList
+//
+// Description: EM physics with a possibility to add PAI model
+//
+// Author:      V.Ivanchenko 01.09.2010
+//
+//----------------------------------------------------------------------------
 //
 
@@ -39,4 +48,6 @@
 #include "G4EmStandardPhysics_option2.hh"
 #include "G4EmStandardPhysics_option3.hh"
+#include "G4EmLivermorePhysics.hh"
+#include "G4EmPenelopePhysics.hh"
 #include "G4DecayPhysics.hh"
 
@@ -47,4 +58,5 @@
 #include "G4Electron.hh"
 #include "G4Positron.hh"
+#include "G4Proton.hh"
 
 #include "G4UnitsTable.hh"
@@ -67,8 +79,9 @@
   cutForElectron  = defaultCutValue;
   cutForPositron  = defaultCutValue;
-
-  stepMaxProcess  = 0;
+  cutForProton    = defaultCutValue;
 
   pMessenger = new PhysicsListMessenger(this);
+
+  stepMaxProcess = new StepMax();
 
   // Decay Physics is always defined
@@ -140,4 +153,16 @@
     emPhysicsList = new G4EmStandardPhysics_option3();
 
+  } else if (name == "emlivermore") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new G4EmLivermorePhysics();
+
+  } else if (name == "empenelope") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new G4EmPenelopePhysics();
+
   } else if (name == "pai") {
 
@@ -163,5 +188,4 @@
 {
   // Step limitation seen as a process
-  stepMaxProcess = new StepMax();
 
   theParticleIterator->reset();
@@ -195,4 +219,5 @@
   SetCutValue(cutForElectron, "e-");
   SetCutValue(cutForPositron, "e+");
+  SetCutValue(cutForProton, "proton");
 
   if ( verboseLevel > 0 ) { DumpCutValuesTable(); }
@@ -221,4 +246,12 @@
   cutForPositron = cut;
   SetParticleCuts(cutForPositron, G4Positron::Positron());
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::SetCutForProton(G4double cut)
+{
+  cutForPositron = cut;
+  SetParticleCuts(cutForProton, G4Proton::Proton());
 }
 
Index: trunk/examples/extended/electromagnetic/TestEm8/src/PhysicsListMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm8/src/PhysicsListMessenger.cc	(revision 1337)
+++ trunk/examples/extended/electromagnetic/TestEm8/src/PhysicsListMessenger.cc	(revision 1342)
@@ -24,8 +24,16 @@
 // ********************************************************************
 //
+// $Id: PhysicsListMessenger.cc,v 1.3 2010/09/08 09:12:10 vnivanch Exp $
+// GEANT4 tag $Name: examples-V09-03-09 $
 //
-// $Id: PhysicsListMessenger.cc,v 1.2 2006/06/29 17:00:47 gunter Exp $
-// GEANT4 tag $Name: geant4-09-04-beta-01 $
+//---------------------------------------------------------------------------
 //
+// ClassName:   PhysicsListMessenger
+//
+// Description: EM physics with a possibility to add PAI model
+//
+// Author:      V.Ivanchenko 01.09.2010
+//
+//----------------------------------------------------------------------------
 // 
 
@@ -38,4 +46,6 @@
 #include "G4UIcmdWithADoubleAndUnit.hh"
 #include "G4UIcmdWithAString.hh"
+#include "G4UIcmdWithAnInteger.hh"
+#include "HistoManager.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -44,31 +54,22 @@
 :pPhysicsList(pPhys)
 {   
-  gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);  
-  gammaCutCmd->SetGuidance("Set gamma cut.");
-  gammaCutCmd->SetParameterName("Gcut",false);
-  gammaCutCmd->SetUnitCategory("Length");
-  gammaCutCmd->SetRange("Gcut>0.0");
-  gammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+  eCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setMaxE",this);  
+  eCmd->SetGuidance("Set max energy deposit");
+  eCmd->SetParameterName("Emax",false);
+  eCmd->SetUnitCategory("Energy");
+  eCmd->SetRange("Emax>0.0");
+  eCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
 
-  electCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);  
-  electCutCmd->SetGuidance("Set electron cut.");
-  electCutCmd->SetParameterName("Ecut",false);
-  electCutCmd->SetUnitCategory("Length");
-  electCutCmd->SetRange("Ecut>0.0");
-  electCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+  ebCmd = new G4UIcmdWithAnInteger("/testem/phys/setNbinsE",this);  
+  ebCmd->SetGuidance("Set number of bins in energy.");
+  ebCmd->SetParameterName("Ebins",false);
+  ebCmd->SetRange("Ebins>0");
+  ebCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
   
-  protoCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);  
-  protoCutCmd->SetGuidance("Set positron cut.");
-  protoCutCmd->SetParameterName("Pcut",false);
-  protoCutCmd->SetUnitCategory("Length");
-  protoCutCmd->SetRange("Pcut>0.0");
-  protoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);  
-
-  allCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setCuts",this);  
-  allCutCmd->SetGuidance("Set cut for all.");
-  allCutCmd->SetParameterName("cut",false);
-  allCutCmd->SetUnitCategory("Length");
-  allCutCmd->SetRange("cut>0.0");
-  allCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);  
+  cbCmd = new G4UIcmdWithAnInteger("/testem/phys/setNbinsCl",this);  
+  cbCmd->SetGuidance("Set max number of clusters.");
+  cbCmd->SetParameterName("Cbins",false);
+  cbCmd->SetRange("Cbins>0");
+  cbCmd->AvailableForStates(G4State_PreInit,G4State_Idle);  
 
   pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);  
@@ -82,8 +83,7 @@
 PhysicsListMessenger::~PhysicsListMessenger()
 {
-  delete gammaCutCmd;
-  delete electCutCmd;
-  delete protoCutCmd;
-  delete allCutCmd;
+  delete eCmd;
+  delete ebCmd;
+  delete cbCmd;
   delete pListCmd;
 }
@@ -94,20 +94,13 @@
                                           G4String newValue)
 {       
-  if( command == gammaCutCmd )
-   { pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
+  HistoManager* man = HistoManager::GetPointer();
+  if( command == eCmd )
+   { man->SetMaxEnergy(eCmd->GetNewDoubleValue(newValue));}
      
-  if( command == electCutCmd )
-   { pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
+  if( command == ebCmd )
+   { man->SetNumberBins(ebCmd->GetNewIntValue(newValue));}
      
-  if( command == protoCutCmd )
-   { pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
-
-  if( command == allCutCmd )
-    {
-      G4double cut = allCutCmd->GetNewDoubleValue(newValue);
-      pPhysicsList->SetCutForGamma(cut);
-      pPhysicsList->SetCutForElectron(cut);
-      pPhysicsList->SetCutForPositron(cut);
-    } 
+  if( command == cbCmd )
+   { man->SetNumberBinsCluster(cbCmd->GetNewIntValue(newValue));}
 
   if( command == pListCmd )
