Index: trunk/examples/extended/hadronic/Hadr01/GNUmakefile
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/GNUmakefile	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/GNUmakefile	(revision 1337)
@@ -1,4 +1,4 @@
-# $Id: GNUmakefile,v 1.8 2008/06/13 15:41:34 vnivanch Exp $
-# GEANT4 tag $Name: geant4-09-03-cand-01 $
+# $Id: GNUmakefile,v 1.9 2010/01/11 16:41:02 gcosmo Exp $
+# GEANT4 tag $Name: geant4-09-04-beta-01 $
 # --------------------------------------------------------------
 # GNUmakefile for examples module with AIDA interface
@@ -10,5 +10,5 @@
 
 ifndef G4INSTALL
-  G4INSTALL = ../../../
+  G4INSTALL = ../../../..
 endif
 
Index: trunk/examples/extended/hadronic/Hadr01/History
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/History	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/History	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: History,v 1.23 2007/12/12 12:00:23 vnivanch Exp $
+$Id: History,v 1.39 2010/06/11 17:01:26 vnivanch Exp $
 -------------------------------------------------------------------
 
@@ -15,4 +15,55 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
+
+11-06-10  V.Ivant (exhadr01-V09-03-06)
+- Fixed memory leak at destruction
+- Cleanup PhysList according to update of physics_list library
+
+06-06-10 J.Perl (exhadr01-V09-03-05)
+- Remove unused variable in EventAction 
+
+04-06-10 J.Perl (exhadr01-V09-03-04)
+- Updated vis usage 
+
+26-05-10 J.Allsion (exhadr01-V09-03-03)
+- Introduced G4UIExecutive.
+
+26-05-10 J.Allsion (exhadr01-V09-03-02)
+- Tag name spoiled by finger trouble in tags database..
+
+13-01-10  V.Ivant (exhadr01-V09-03-01)
+- Fixed problem of counting of particles leaked from the target
+
+29-12-09  V.Ivant (exhadr01-V09-03-00)
+- When PhysList defined via PHYSLIST environment variable still
+  make local PhysList messenger available to avoid crash in old macro
+
+25-09-09  V.Ivant (exhadr01-V09-02-03)
+- Update Physics List choices according to 9.3 configurations
+
+02-09-09  V.Ivant (exhadr01-V09-02-02)
+- Added histograms on energy depositions: total, electromagnetic,
+  pion, proton
+
+23-06-09  V.Ivant (exhadr01-V09-02-01)
+- FB68 substituted by FTFP_BERT_TRV
+
+15-05-09  V.Ivant (exhadr01-V09-02-00)
+- update to physics_lists lists
+
+20-11-08  V.Ivant (exhadr01-V09-01-04)
+- added charge exchange
+
+17-09-08  V.Ivant (exhadr01-V09-01-03)
+- improved Physics List output
+
+25-06-08  V.Ivant (exhadr01-V09-01-02)
+
+13-06-08  V.Ivant (exhadr01-V09-01-01)
+- remove usage of AIDA in GNUmakefile
+- added FTF_BIC Physics Lists
+
+19-05-08  V.Ivant (exhadr01-V09-01-00)
+- remove usage of obsolete G4HadronProcessStore
 
 12-12-07  V.Ivant (exhadr01-V09-00-03)
Index: trunk/examples/extended/hadronic/Hadr01/README
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/README	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/README	(revision 1337)
@@ -15,5 +15,5 @@
 simulation of proton or ion beam interaction with a water target. Different 
 aspects of beam target interaction are demonstrating in the example including 
-logitudinal profile of energy deposition, spectra of secondary  particles,
+longitudinal profile of energy deposition, spectra of secondary  particles,
 spectra of particles leaving the target. The results are presenting in a form
 of average numbers and histograms. 
@@ -22,12 +22,12 @@
                            GEOMETRY
 
-The Target volume is a cilinder placed inside Check cilindrical volume. The 
+The Target volume is a cylinder placed inside Check cylindrical volume. The 
 Check volume is placed inside the World volume. The radius and the length of
-the Check volume are 1 mm larger than the radiaus and the length of the Target.
+the Check volume are 1 mm larger than the radius and the length of the Target.
 The material of the Check volume is the same as the World material.  The World
-volume has the sizes 10 mm larger than that of the Target volume.  Any naterial
+volume has the sizes 10 mm larger than that of the Target volume.  Any material
 from the Geant4 database can be defined. The default World  material is
 G4Galactic and the default  Target material is aluminum. The Target is
-subdivided on number of equal slices. Follwoing UI commands are available to
+subdivided on number of equal slices. Following UI commands are available to
 modify the geometry:
 
@@ -38,10 +38,10 @@
 /testhadr/NumberDivZ    200
 
-If geometry was changed between two runs, then the follwoing command need to
+If geometry was changed between two runs, then the following command need to
 be executed:
 
 /testhadr/Update
 
-Beam direction coinsides with the target axis and is Z axis in the global
+Beam direction coincides with the target axis and is Z axis in the global
 coordinate system. The beam starts 5 mm in front of the target. G4ParticleGun
 is used as a primary generator. The energy and the type of the beam can be
@@ -84,23 +84,22 @@
 
 PhysicsList of the application uses components, which are distributed with
-Geant4 in /geant4/physics_lists subdirectory. So, before compiling hadro01 it
-is necessary to compile physics_lists
+Geant4 in /geant4/physics_lists subdirectory. 
 
-The choice of the physics is provided by the UI command:
+There is a possibility directly use one of reference Physics Lists if 
+using the environment variable PHYSLIST. Alternatively the name of the reference
+Physics List can be given via parameter of the the application as following:
 
-/testhadr/Physics     QGSP
+$G4BIN/Linux++/hadr01 QGSP_BERT my.macro
 
-The command 
+Finally it is possible to use UI commands (PHYSLIST environment variable is not 
+defined). The choice of the physics is provided by the UI command:
 
-/testhadr/Physics     PHYSLIST
+/testhadr/Physics     QGSP_BIC
 
-allows allows to download a physics configuration defined by an environment
-variable PHYSLIST. 
-
-To see the list of available configurations one can use
+To see the list of available configurations with UI one can use
 
 /testhadr/ListPhysics
 
-The cuts for electromagnetic phsyics can be established via
+The cuts for electromagnetic physics can be established via
 
 /testhadr/CutsAll       1 mm
@@ -109,6 +108,9 @@
 /testhadr/CutsPos     0.3 mm
 
+Note that testhadr UI commands are not available in the case when PHYSLIST 
+environment variable is defined. 
 
-                          VISUALISATION
+
+                          VISUALIZATION
 
 For interactive mode G4 visualization options and variables should be
@@ -166,7 +168,7 @@
 subdirectory.
 
-To show the contence of a histogram ID=i the commands may be applied:
+To show the content of a histogram ID=i the commands may be applied:
 
 /testhadr/HistoPrint  i
 
-All histograms are normalised to the number of events.
+All histograms are normalized to the number of events.
Index: trunk/examples/extended/hadronic/Hadr01/hadr01.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/hadr01.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/hadr01.cc	(revision 1337)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: hadr01.cc,v 1.9 2006/11/24 16:48:57 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: hadr01.cc,v 1.12 2010/05/26 11:53:40 allison Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 // -------------------------------------------------------------
@@ -37,4 +37,5 @@
 //
 //  Modified: 
+//  29.12.2009 V.Ivanchenko introduced access to reference PhysLists
 //
 // -------------------------------------------------------------
@@ -46,13 +47,12 @@
 #include "G4RunManager.hh"
 #include "G4UImanager.hh"
-#include "G4UIterminal.hh"
-#include "G4UItcsh.hh"
 #include "Randomize.hh"
 
 #include "DetectorConstruction.hh"
 #include "PhysicsList.hh"
-#include "QBBC.hh"
-#include "QGSP.hh"
+#include "G4PhysListFactory.hh"
+#include "G4VModularPhysicsList.hh"
 #include "PrimaryGeneratorAction.hh"
+#include "PhysicsListMessenger.hh"
 
 #include "RunAction.hh"
@@ -60,5 +60,11 @@
 #include "StackingAction.hh"
 
+#ifdef G4VIS_USE
 #include "G4VisExecutive.hh"
+#endif
+
+#ifdef G4UI_USE
+#include "G4UIExecutive.hh"
+#endif
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -75,8 +81,27 @@
   runManager->SetUserInitialization(new DetectorConstruction());
 
-  runManager->SetUserInitialization(new PhysicsList);
-  //runManager->SetUserInitialization(new QBBC(1,"QBEC_HP"));
-  //runManager->SetUserInitialization(new QGSP);
+  G4PhysListFactory factory;
+  G4VModularPhysicsList* phys = 0;
+  PhysicsListMessenger* mess = 0;
+  G4String physName = "";
 
+  // Physics List name defined via 2nd argument
+  if (argc==3) { physName = argv[2]; }
+
+  // Physics List name defined via environment variable
+  char* path = getenv("PHYSLIST");
+  if (path) { physName = G4String(path); }
+
+  // reference PhysicsList via its name
+  if(factory.IsReferencePhysList(physName)) {
+    phys = factory.GetReferencePhysList(physName);
+    mess = new PhysicsListMessenger();
+  } 
+
+  // local Physics List
+  if(!phys) { phys = new PhysicsList(); }
+
+  // define physics
+  runManager->SetUserInitialization(phys);
   runManager->SetUserAction(new PrimaryGeneratorAction());
 
@@ -87,5 +112,5 @@
 
   //get the pointer to the User Interface manager
-  G4UImanager* UI = G4UImanager::GetUIpointer();
+  G4UImanager* UImanager = G4UImanager::GetUIpointer();
   G4VisManager* visManager = 0;
 
@@ -97,23 +122,21 @@
       visManager->Initialize();
 #endif
-      G4UIsession* session = 0;
-#ifdef G4UI_USE_TCSH
-      session = new G4UIterminal(new G4UItcsh);
-#else
-      session = new G4UIterminal();
+#ifdef G4UI_USE
+      G4UIExecutive* ui = new G4UIExecutive(argc, argv);
+      ui->SessionStart();
+      delete ui;
 #endif
-      session->SessionStart();
-      delete session;
     }
   else           // Batch mode
     {
-     G4String command = "/control/execute ";
-     G4String fileName = argv[1];
-     UI->ApplyCommand(command+fileName);
+      G4String command = "/control/execute ";
+      G4String fileName = argv[1];
+      UImanager->ApplyCommand(command+fileName);
     }
 
   //job termination
-  if(visManager) delete visManager;
+  delete visManager;
   delete runManager;
+  delete mess;
 
   return 0;
Index: trunk/examples/extended/hadronic/Hadr01/hadr01.out
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/hadr01.out	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/hadr01.out	(revision 1337)
@@ -1,5 +1,9 @@
+
+        ############################################
+        !!! WARNING - FPE detection is activated !!!
+        ############################################
 
 *************************************************************
- Geant4 version Name: global-V09-00-03    (9-May-2008)
+ Geant4 version Name: geant4-09-03-ref-06    (25-June-2010)
                       Copyright : Geant4 Collaboration
                       Reference : NIM A 506 (2003), 250-303
@@ -19,5 +23,5 @@
 /testhadr/Physics QBBC
 PhysicsList::AddPhysicsList: <QBBC>
-### HadronInelasticQBBC
+PhysicsList::AddPhysicsList: <emstandard_opt2>
 #
 /run/initialize
@@ -26,69 +30,18 @@
 ***** Table : Nb of materials = 2 *****
 
- Material:    G4_Al     density:  2.699 g/cm3   RadL:   8.896 cm   Imean: 166.000 eV 
+ Material:    G4_Al     density:  2.699 g/cm3   RadL:   8.896 cm   Nucl.Int.Length:  38.877 cm   Imean: 166.000 eV 
    --->  Element: Al (Al)   Z = 13.0   N =  27.0   A =  26.98 g/mole
-   --->  Isotope:    Al   Z = 13   N =  27   A =  26.98 g/mole   abundance: 100.00 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
-
- Material: G4_Galactic     density:  0.000 mg/cm3  RadL: 204311173.221 pc   Imean:  21.800 eV   temperature:   2.73 K  pressure:   0.00 atm
+   --->  Isotope:  Al27   Z = 13   N =  27   A =  26.98 g/mole   abundance: 100.00 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material: G4_Galactic     density:  0.000 kg/m3   RadL: 204310101.835 pc   Nucl.Int.Length: 114319208.901 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:     H   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
-   --->  Isotope:     H   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
-
-
-Thank you for using G4BinaryCascade. 
-### Adding Neutron tracking cut for neutron
-###  cut value is 10 microseconds
-Thank you for using G4BinaryCascade. 
-Thank you for using G4BinaryCascade. 
-===========================================================================================
-
-       Hadronic Processes for anti_neutron
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         FTF      Emin(GeV)=     6      Emax(GeV)=  100000
-                                   CHIPS      Emin(GeV)=     0      Emax(GeV)=       9
-
-       Hadronic Processes for anti_proton
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         FTF      Emin(GeV)=     6      Emax(GeV)=  100000
-                                   CHIPS      Emin(GeV)=     0      Emax(GeV)=       9
-
-       Hadronic Processes for kaon+
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         FTF      Emin(GeV)=     6      Emax(GeV)=  100000
-                                 Bertini      Emin(GeV)=     0      Emax(GeV)=       9
-
-       Hadronic Processes for kaon-
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         FTF      Emin(GeV)=     6      Emax(GeV)=  100000
-                                 Bertini      Emin(GeV)=     0      Emax(GeV)=       9
-
-       Hadronic Processes for lambda
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         FTF      Emin(GeV)=     6      Emax(GeV)=  100000
-                                 Bertini      Emin(GeV)=     0      Emax(GeV)=       9
-
-       Hadronic Processes for neutron
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         QGS      Emin(GeV)=     6      Emax(GeV)=  100000
-                                  Binary      Emin(GeV)=     0      Emax(GeV)=       9
-  nCapture           Models:    LCapture      Emin(GeV)=     0      Emax(GeV)= 1.79769e+305
-  nFission           Models:    LFission      Emin(GeV)=     0      Emax(GeV)= 1.79769e+305
-
-       Hadronic Processes for pi+
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         QGS      Emin(GeV)=     6      Emax(GeV)=  100000
-                                 Bertini      Emin(GeV)=     0      Emax(GeV)=       9
-
-       Hadronic Processes for pi-
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         QGS      Emin(GeV)=     6      Emax(GeV)=  100000
-                                 Bertini      Emin(GeV)=     0      Emax(GeV)=       9
-
-       Hadronic Processes for proton
-  hElastic           Models:     elastic      Emin(GeV)=     0      Emax(GeV)=  100000
-hInelastic           Models:         QGS      Emin(GeV)=     6      Emax(GeV)=  100000
-                                  Binary      Emin(GeV)=     0      Emax(GeV)=       9
-===========================================================================================
-PhysicsList::SetCuts:CutLength : 1 mm 
+   --->  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 %
+
+
+### Adding tracking cuts for neutron  TimeCut(ns)= 10000  KinEnergyCut(MeV)= 0
+G4NeutronInelasticXS::G4NeutronInelasticXS: Initialise 
+G4NeutronCaptureXS::G4NeutronCaptureXS: Initialise 
+PhysicsList::SetCuts:CutLength : 700 um 
 #
 /gun/particle proton
@@ -96,5 +49,335 @@
 /run/beamOn 100
 
-G4UHadronElasticProcess for neutron PDGcode= 2112  Elow(MeV)= 19  Elowest(eV)= 0
+phot:   for  gamma, applyCuts: 1     SubType= 12
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+       PhotoElectric :     Emin=          0 eV         Emax=   10 TeV
+
+compt:   for  gamma, applyCuts: 1     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
+
+conv:   for  gamma, applyCuts: 1     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
+
+msc:   for e-    SubType= 10
+      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
+      RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+        WentzelVIUni :     Emin=          0 eV         Emax=   10 TeV
+
+eIoni:   for  e-    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+eBrem:   for  e-    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+CoulombScat:   for  e-, applyCuts: 1     SubType= 1
+      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
+      11.4592 < Theta(degree) < 180, Eth(MeV)= 10000; pLimit(GeV^1)= 0.139531
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+  eCoulombScattering :     Emin=          0 eV         Emax=   10 TeV
+
+eIoni:   for  e+    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+eBrem:   for  e+    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+annihil:   for  e+, applyCuts: 1     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
+
+CoulombScat:   for  e+, applyCuts: 1     SubType= 1
+      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
+      11.4592 < Theta(degree) < 180, Eth(MeV)= 10000; pLimit(GeV^1)= 0.139531
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+  eCoulombScattering :     Emin=          0 eV         Emax=   10 TeV
+
+msc:   for proton    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  proton    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+hBrems:   for  proton    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+hPairProd:   for  proton    SubType= 4
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+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
+
+ionIoni:   for  GenericIon    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+hIoni:   for  anti_proton    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+hIoni:   for  kaon+    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+hBrems:   for  kaon+    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+hPairProd:   for  kaon+    SubType= 4
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+hIoni:   for  kaon-    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+hBrems:   for  kaon-    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+hPairProd:   for  kaon-    SubType= 4
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+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)= 11.4592
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+        WentzelVIUni :     Emin=          0 eV         Emax=   10 TeV
+
+muIoni:   for  mu+    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+muBrems:   for  mu+    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+muPairProd:   for  mu+    SubType= 4
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+CoulombScat:   for  mu+, applyCuts: 1     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
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+muBrems:   for  mu-    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+muPairProd:   for  mu-    SubType= 4
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+CoulombScat:   for  mu-, applyCuts: 1     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
+G4NeutronInelasticXS::BuildPhysicsTable: 
+neutron
+G4NEUTRONXSDATA environment variable not set
+G4NeutronCaptureXS::BuildPhysicsTable: 
+neutron
+G4NEUTRONXSDATA environment variable not set
+
+hIoni:   for  pi+    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+hBrems:   for  pi+    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+hPairProd:   for  pi+    SubType= 4
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+msc:   for pi-    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  pi-    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
+      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
+
+hBrems:   for  pi-    SubType= 3
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+
+hPairProd:   for  pi-    SubType= 4
+      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
+      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
+============================================================================================
+             HADRONIC PROCESSES SUMMARY (verbose level 1)
+
+                     Hadronic Processes for <anti_neutron>
+          hadElastic  Models:              hElasticLHEP: Emin(GeV)=     0  Emax(GeV)= 100000
+          CHIPS_Inelastic
+
+                     Hadronic Processes for <anti_proton>
+          hadElastic  Models:              hElasticLHEP: Emin(GeV)=     0  Emax(GeV)= 100000
+          CHIPS_Inelastic
+
+                     Hadronic Processes for <e->
+      ElectroNuclear  Models:                     CHIPS: Emin(GeV)=     0  Emax(GeV)= 30000
+
+                     Hadronic Processes for <gamma>
+     PhotonInelastic  Models:                     CHIPS: Emin(GeV)=     0  Emax(GeV)= 3.5
+                                        TheoFSGenerator: Emin(GeV)=     3  Emax(GeV)= 100000
+
+                     Hadronic Processes for <kaon+>
+          hadElastic  Models:              hElasticLHEP: Emin(GeV)=     0  Emax(GeV)= 100000
+          hInelastic  Models:                      FTFP: Emin(GeV)=     4  Emax(GeV)= 100000
+                                        Bertini Cascade: Emin(GeV)=     0  Emax(GeV)= 5
+
+                     Hadronic Processes for <kaon->
+          hadElastic  Models:              hElasticLHEP: Emin(GeV)=     0  Emax(GeV)= 100000
+          hInelastic  Models:                      FTFP: Emin(GeV)=     4  Emax(GeV)= 100000
+                                        Bertini Cascade: Emin(GeV)=     0  Emax(GeV)= 5
+
+                     Hadronic Processes for <lambda>
+          hadElastic  Models:              hElasticLHEP: Emin(GeV)=     0  Emax(GeV)= 100000
+          hInelastic  Models:                      FTFP: Emin(GeV)=     4  Emax(GeV)= 100000
+                                        Bertini Cascade: Emin(GeV)=     0  Emax(GeV)= 5
+
+                     Hadronic Processes for <mu->
+          muMinusCaptureAtRest
+
+                     Hadronic Processes for <neutron>
+          hadElastic  Models:             hElasticCHIPS: Emin(GeV)=     0  Emax(GeV)= 100000
+          hInelastic  Models:                      QGSP: Emin(GeV)=  12.5  Emax(GeV)= 100000
+                                                   FTFP: Emin(GeV)=     4  Emax(GeV)= 25
+                                        Bertini Cascade: Emin(GeV)=     1  Emax(GeV)= 5
+                                         Binary Cascade: Emin(GeV)=     0  Emax(GeV)= 1.5
+            nCapture  Models:               nRadCapture: Emin(GeV)=     0  Emax(GeV)= 100000
+
+                     Hadronic Processes for <pi+>
+          hadElastic  Models:              hElasticLHEP: Emin(GeV)=     0  Emax(GeV)= 1
+                                        hElasticGlauber: Emin(GeV)=     1  Emax(GeV)= 100000
+          hInelastic  Models:                      QGSP: Emin(GeV)=  12.5  Emax(GeV)= 100000
+                                                   FTFP: Emin(GeV)=     4  Emax(GeV)= 25
+                                        Bertini Cascade: Emin(GeV)=     0  Emax(GeV)= 5
+
+                     Hadronic Processes for <pi->
+          hadElastic  Models:              hElasticLHEP: Emin(GeV)=     0  Emax(GeV)= 1
+                                        hElasticGlauber: Emin(GeV)=     1  Emax(GeV)= 100000
+          hInelastic  Models:                      QGSP: Emin(GeV)=  12.5  Emax(GeV)= 100000
+                                                   FTFP: Emin(GeV)=     4  Emax(GeV)= 25
+                                        Bertini Cascade: Emin(GeV)=     0  Emax(GeV)= 5
+
+                     Hadronic Processes for <proton>
+          hadElastic  Models:             hElasticCHIPS: Emin(GeV)=     0  Emax(GeV)= 100000
+          hInelastic  Models:                      QGSP: Emin(GeV)=  12.5  Emax(GeV)= 100000
+                                                   FTFP: Emin(GeV)=     4  Emax(GeV)= 25
+                                        Bertini Cascade: Emin(GeV)=     1  Emax(GeV)= 5
+                                         Binary Cascade: Emin(GeV)=     0  Emax(GeV)= 1.5
+============================================================================================
 
 ========= Table of registered couples ==============================
@@ -102,6 +385,6 @@
 Index : 0     used in the geometry : Yes     recalculation needed : No 
  Material : G4_Galactic
- Range cuts        :  gamma 1 mm     e- 1 mm     e+ 1 mm 
- Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV 
+ Range cuts        :  gamma  1 mm     e-  1 mm     e+  1 mm  proton 1 mm 
+ Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 100 keV
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -109,6 +392,6 @@
 Index : 1     used in the geometry : Yes     recalculation needed : No 
  Material : G4_Al
- Range cuts        :  gamma 1 mm     e- 1 mm     e+ 1 mm 
- Energy thresholds :  gamma 6.88731 keV    e- 596.68 keV    e+ 568.011 keV
+ Range cuts        :  gamma  1 mm     e-  1 mm     e+  1 mm  proton 1 mm 
+ Energy thresholds :  gamma  6.90363 keV    e-  598.345 keV    e+  570.85 keV proton 100 keV
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -131,5 +414,5 @@
 Run Summary
   Number of events processed : 100
-  User=0.73s Real=0.74s Sys=0.01s
+  User=0.37s Real=0.38s Sys=0s
 RunAction: End of run actions are started
 HistoManager: End of run actions are started
@@ -138,26 +421,27 @@
 Beam Energy(MeV)                     3000
 Number of events                     100
-Average energy deposit (MeV)         57.73   RMS(MeV) 48.33
-Average number of steps              267.1
-Average number of gamma              2.63
-Average number of e-                 4.28
-Average number of e+                 0.05
-Average number of neutrons           0.78
-Average number of protons            0.87
+Average energy deposit (MeV)         69.45   RMS(MeV) 55
+Average number of steps              360.1
+Average number of gamma              2.24
+Average number of e-                 3.14
+Average number of e+                 0.07
+Average number of neutrons           1.36
+Average number of protons            1.39
 Average number of antiprotons        0
-Average number of pi+ & pi-          0.33
-Average number of pi0                0.2
-Average number of kaons              0.01
-Average number of muons              0
-Average number of deuterons+tritons  0.01
-Average number of He3+alpha          0.1
-Average number of ions               0.57
+Average number of pi+ & pi-          0.49
+Average number of pi0                0.21
+Average number of kaons              0
+Average number of muons              0.02
+Average number of deuterons+tritons  0.11
+Average number of He3+alpha          0.2
+Average number of ions               0.68
 Average number of forward neutrons   0.1
-Average number of reflected neutrons 0
-Average number of leaked neutrons    0.62
-Average number of proton leak        0.33
-Average number of pion leak          0.3
+Average number of reflected neutrons 1.2
+Average number of leaked neutrons    0.06
+Average number of proton leak        0.61
+Average number of pion leak          0.45
 ========================================================
 
 #
 G4 kernel has come to Quit state.
+
Index: trunk/examples/extended/hadronic/Hadr01/include/CheckVolumeSD.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/CheckVolumeSD.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/CheckVolumeSD.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: CheckVolumeSD.hh,v 1.3 2006/06/29 17:23:25 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/include/DetectorConstruction.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/DetectorConstruction.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/DetectorConstruction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorConstruction.hh,v 1.4 2006/06/29 17:23:28 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/include/DetectorMessenger.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/DetectorMessenger.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/DetectorMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.hh,v 1.7 2007/05/16 11:43:30 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/include/EventAction.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/EventAction.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/EventAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventAction.hh,v 1.3 2006/06/29 17:23:34 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/include/EventActionMessenger.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/EventActionMessenger.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/EventActionMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.hh,v 1.3 2006/06/29 17:23:36 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/include/Histo.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/Histo.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/Histo.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: Histo.hh,v 1.6 2007/05/24 13:52:31 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 
 #ifndef Histo_h
Index: trunk/examples/extended/hadronic/Hadr01/include/HistoManager.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/HistoManager.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/HistoManager.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoManager.hh,v 1.9 2009/08/28 09:21:34 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //---------------------------------------------------------------------------
Index: trunk/examples/extended/hadronic/Hadr01/include/HistoMessenger.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/HistoMessenger.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/HistoMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoMessenger.hh,v 1.5 2006/11/15 14:58:10 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/include/PhysicsList.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/PhysicsList.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/PhysicsList.hh	(revision 1337)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: PhysicsList.hh,v 1.6 2007/11/14 18:59:08 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PhysicsList.hh,v 1.7 2009/11/25 19:56:36 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
@@ -64,4 +64,5 @@
   void SetCutForElectron(G4double);
   void SetCutForPositron(G4double);
+  void SetCutForProton(G4double);
         
   void AddPhysicsList(const G4String& name);
@@ -82,4 +83,5 @@
   G4double cutForElectron;
   G4double cutForPositron;
+  G4double cutForProton;
 
   G4VPhysicsConstructor*  emPhysicsList;
Index: trunk/examples/extended/hadronic/Hadr01/include/PhysicsListMessenger.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/PhysicsListMessenger.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/PhysicsListMessenger.hh	(revision 1337)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: PhysicsListMessenger.hh,v 1.3 2006/06/29 17:23:50 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PhysicsListMessenger.hh,v 1.4 2009/12/29 19:23:26 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //
@@ -58,5 +58,5 @@
 public:
   
-  PhysicsListMessenger(PhysicsList* );
+  PhysicsListMessenger(PhysicsList* p = 0);
   virtual ~PhysicsListMessenger();
     
@@ -70,4 +70,5 @@
   G4UIcmdWithADoubleAndUnit* electCutCmd;
   G4UIcmdWithADoubleAndUnit* posCutCmd;
+  G4UIcmdWithADoubleAndUnit* pCutCmd;
   G4UIcmdWithADoubleAndUnit* allCutCmd;
   G4UIcmdWithAString*        pListCmd;
Index: trunk/examples/extended/hadronic/Hadr01/include/PrimaryGeneratorAction.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/PrimaryGeneratorAction.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/PrimaryGeneratorAction.hh	(revision 1337)
@@ -26,5 +26,5 @@
 //
 // $Id: PrimaryGeneratorAction.hh,v 1.3 2006/06/29 17:23:52 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //
Index: trunk/examples/extended/hadronic/Hadr01/include/StackingAction.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/StackingAction.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/StackingAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StackingAction.hh,v 1.3 2006/06/29 17:23:56 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/include/StackingMessenger.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/StackingMessenger.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/StackingMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StackingMessenger.hh,v 1.3 2006/06/29 17:23:58 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //
Index: trunk/examples/extended/hadronic/Hadr01/include/TargetSD.hh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/include/TargetSD.hh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/include/TargetSD.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: TargetSD.hh,v 1.4 2006/06/29 17:24:00 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/p_pb.in
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/p_pb.in	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/p_pb.in	(revision 1337)
@@ -14,8 +14,7 @@
 #
 /testhadr/CutsAll          0.7 mm
-/testhadr/Physics          PHYSLIST
+#/testhadr/Physics          PHYSLIST
 #
 /run/initialize
-#/process/eLoss/MscStepLimit 0.2 false
 #/testhadr/HistoName        p_pb_20GeV
 /testhadr/MaxEdep          10 GeV
Index: trunk/examples/extended/hadronic/Hadr01/run.csh
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/run.csh	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/run.csh	(revision 1337)
@@ -1,5 +1,5 @@
 #/bin/csh
 
-setenv HISTODIR 20071127
+setenv HISTODIR 20091229
 mkdir -p $HISTODIR
 
@@ -7,14 +7,8 @@
 $G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
 
-setenv PHYSLIST QGSP
+setenv PHYSLIST QGSP_BERT_EMV
 $G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
 
-setenv PHYSLIST QGSP_EMV
-$G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
-
-setenv PHYSLIST QGSP_EMX
-$G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
-
-setenv PHYSLIST QGSC
+setenv PHYSLIST QGSP_BERT_EMX
 $G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
 
@@ -28,8 +22,17 @@
 $G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
 
-setenv PHYSLIST QBBC_HEL
+setenv PHYSLIST QBBC_XGG
 $G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
 
-setenv PHYSLIST QBBC_DEL
+setenv PHYSLIST QBBC_XGGSN
+$G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
+
+setenv PHYSLIST FTFP_BERT
+$G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
+
+setenv PHYSLIST QGSP_FTFP_BERT
+$G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
+
+setenv PHYSLIST CHIPS
 $G4MY/hadr01 p_pb.in >& $HISTODIR/$PHYSLIST.out
 
Index: trunk/examples/extended/hadronic/Hadr01/src/CheckVolumeSD.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/CheckVolumeSD.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/CheckVolumeSD.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: CheckVolumeSD.cc,v 1.3 2006/06/29 17:24:02 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/src/DetectorConstruction.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/DetectorConstruction.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/DetectorConstruction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: DetectorConstruction.cc,v 1.6 2006/10/04 09:56:03 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: DetectorConstruction.cc,v 1.7 2010/06/11 17:01:26 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
@@ -151,11 +151,12 @@
 
   // colors
-  logicWorld->SetVisAttributes(G4VisAttributes::Invisible);
-
-  G4VisAttributes* regWcolor = new G4VisAttributes(G4Colour(0.3, 0.3, 0.3));
-  logicCheck->SetVisAttributes(regWcolor);
-
-  G4VisAttributes* regCcolor = new G4VisAttributes(G4Colour(0., 0.3, 0.7));
-  logicTarget->SetVisAttributes(regCcolor);
+  G4VisAttributes zero = G4VisAttributes::Invisible;
+  logicWorld->SetVisAttributes(&zero);
+
+  G4VisAttributes regWcolor(G4Colour(0.3, 0.3, 0.3));
+  logicCheck->SetVisAttributes(&regWcolor);
+
+  G4VisAttributes regCcolor(G4Colour(0., 0.3, 0.7));
+  logicTarget->SetVisAttributes(&regCcolor);
 
   G4cout << *(G4Material::GetMaterialTable()) << G4endl;
Index: trunk/examples/extended/hadronic/Hadr01/src/DetectorMessenger.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/DetectorMessenger.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/DetectorMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.cc,v 1.7 2007/05/16 11:43:30 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/src/EventAction.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/EventAction.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/EventAction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: EventAction.cc,v 1.4 2007/05/16 11:43:30 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: EventAction.cc,v 1.6 2010/06/07 05:40:46 perl Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
@@ -45,7 +45,4 @@
 
 #include "G4UImanager.hh"
-#include "G4TrajectoryContainer.hh"
-#include "G4Trajectory.hh"
-#include "G4VVisManager.hh"
 #include "G4ios.hh"
 
@@ -99,26 +96,6 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
-void EventAction::EndOfEventAction(const G4Event* evt)
+void EventAction::EndOfEventAction(const G4Event*)
 {
-  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
-
-  if(pVVisManager) {
-    G4TrajectoryContainer* trjc = evt->GetTrajectoryContainer();
-    G4int n_trajectories = 0;
-    if (trjc) n_trajectories = trjc->entries();
-
-    for(G4int i=0; i<n_trajectories; i++) {
-      G4Trajectory* t = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
-      if (drawFlag == "all") t->DrawTrajectory(1000);
-      else if ((drawFlag == "charged")&&(t->GetCharge() != 0.))
-                             t->DrawTrajectory(1000);
-      else if ((drawFlag == "neutral")&&(t->GetCharge() == 0.))
-                             t->DrawTrajectory(1000);
-      else if ((drawFlag == "charged+n")&&((t->GetCharge() != 0.)||
-                                           (t->GetCharge()==0.&&t->GetParticleName()=="neutron")))
-                             t->DrawTrajectory(1000);
-    }
-  }
-
   if(debugStarted) {
     UI->ApplyCommand("/tracking/verbose  0");
Index: trunk/examples/extended/hadronic/Hadr01/src/EventActionMessenger.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/EventActionMessenger.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/EventActionMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.cc,v 1.3 2006/06/29 17:24:11 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/src/HistoManager.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/HistoManager.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/HistoManager.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: HistoManager.cc,v 1.16 2009/09/02 10:21:32 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: HistoManager.cc,v 1.17 2010/01/13 15:53:44 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //---------------------------------------------------------------------------
@@ -422,6 +422,7 @@
   // Forward 
   if(z > -absZ0 && dir.z() > 0.0) {
+    isLeaking = true;
     if(pd == neutron) {
-      n_neu_forw++;
+      ++n_neu_forw;
       histo->fill(15,e,1.0);
     } else isLeaking = true;
@@ -429,6 +430,7 @@
     // Backward
   } else if (z < absZ0 && dir.z() < 0.0) {
+    isLeaking = true;
     if(pd == neutron) {
-      n_neu_leak++;
+      ++n_neu_back;
       histo->fill(16,e,1.0);
     } else isLeaking = true;
@@ -438,5 +440,5 @@
     isLeaking = true;
     if(pd == neutron) {
-      n_neu_back++;
+      ++n_neu_leak;
       histo->fill(14,e,1.0);
     } else isLeaking = true;
@@ -447,8 +449,8 @@
     if(pd == G4Proton::Proton()) {
       histo->fill(17,e,1.0);
-      n_prot_leak++;
+      ++n_prot_leak;
     } else if (pd == G4PionPlus::PionPlus() || pd == G4PionMinus::PionMinus()) {
       histo->fill(18,e,1.0);
-      n_pion_leak++;
+      ++n_pion_leak;
     }
   }
Index: trunk/examples/extended/hadronic/Hadr01/src/HistoMessenger.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/HistoMessenger.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/HistoMessenger.cc	(revision 1337)
@@ -26,5 +26,5 @@
 //
 // $Id: HistoMessenger.cc,v 1.5 2006/06/29 17:24:18 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/src/PhysicsList.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/PhysicsList.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/PhysicsList.cc	(revision 1337)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: PhysicsList.cc,v 1.31 2009/08/28 09:21:34 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PhysicsList.cc,v 1.33 2010/06/11 17:01:26 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
@@ -45,11 +45,15 @@
 
 #include "G4DecayPhysics.hh"
+#include "G4EmStandardPhysics.hh"
+#include "G4EmStandardPhysics_option1.hh"
+#include "G4EmStandardPhysics_option2.hh"
 #include "G4EmStandardPhysics_option3.hh"
-#include "G4EmStandardPhysics_option2.hh"
-#include "G4EmStandardPhysics_option1.hh"
-#include "G4EmStandardPhysics.hh"
+#include "G4EmLivermorePhysics.hh"
+#include "G4EmPenelopePhysics.hh"
 #include "G4HadronElasticPhysics.hh"
 #include "G4HadronDElasticPhysics.hh"
 #include "G4HadronQElasticPhysics.hh"
+#include "G4HadronElasticPhysicsHP.hh"
+#include "G4HadronElasticPhysicsLHEP.hh"
 #include "G4HadronHElasticPhysics.hh"
 #include "G4ChargeExchangePhysics.hh"
@@ -92,4 +96,5 @@
 #include "G4Electron.hh"
 #include "G4Positron.hh"
+#include "G4Proton.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -98,9 +103,9 @@
 {
   G4LossTableManager::Instance();
-  defaultCutValue = 1.*mm;
+  defaultCutValue = 0.7*mm;
   cutForGamma     = defaultCutValue;
   cutForElectron  = defaultCutValue;
   cutForPositron  = defaultCutValue;
-  dump            = false;
+  cutForProton    = defaultCutValue;
   verboseLevel    = 1;
 
@@ -167,4 +172,9 @@
     emPhysicsList = new G4EmStandardPhysics_option1();
 
+  } else if (name == "emstandard_opt0") {
+
+    delete emPhysicsList;
+    emPhysicsList = new G4EmStandardPhysics();
+
   } else if (name == "FTFP_BERT_EMV") {
 
@@ -177,33 +187,23 @@
     AddPhysicsList("FTFP_BERT");
 
-  } else if (name == "FTFP") {
+  } else if (name == "FTFP_BERT") {
 
     SetBuilderList1();
-    hadronPhys.push_back( new HadronPhysicsFTFP("hadron",true));
-    dump = true;
-
-  } else if (name == "FTFP_BERT") {
+    hadronPhys.push_back( new HadronPhysicsFTFP_BERT());
+
+  } else if (name == "FTFP_BERT_TRV") {
 
     SetBuilderList1();
-    hadronPhys.push_back( new HadronPhysicsFTFP_BERT("hadron",true));
-    dump = true;
-
-  } else if (name == "FTFP_BERT_TRV") {
-
-    SetBuilderList1();
-    hadronPhys.push_back( new HadronPhysicsFTFP_BERT_TRV("hadron",true));
-    dump = true;
+    hadronPhys.push_back( new HadronPhysicsFTFP_BERT_TRV());
 
   } else if (name == "FTF_BIC") {
 
     SetBuilderList0();
-    hadronPhys.push_back( new HadronPhysicsFTF_BIC("hadron",true));
-    dump = true;
+    hadronPhys.push_back( new HadronPhysicsFTF_BIC());
 
   } else if (name == "LHEP") {
 
     SetBuilderList2();
-    hadronPhys.push_back( new HadronPhysicsLHEP("hadron"));
-    dump = true;
+    hadronPhys.push_back( new HadronPhysicsLHEP());
 
   } else if (name == "LHEP_EMV") {
@@ -211,89 +211,44 @@
     AddPhysicsList("emstandard_opt1");
     SetBuilderList3();
-    hadronPhys.push_back( new HadronPhysicsLHEP_EMV("hadron"));
-    dump = true;
+    hadronPhys.push_back( new HadronPhysicsLHEP_EMV());
 
   } else if (name == "QBBC") {
 
-    SetBuilderList0();
-    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
-						    false,true,false,false,false));
-
-  } else if (name == "QBBCG") {
-
-    SetBuilderList0();
-    hadronPhys.push_back( new G4ChargeExchangePhysics(verboseLevel,false));
-    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
-						    false,true,false,false,true));
-  } else if (name == "QBBCF") {
-
-    SetBuilderList0();
-    hadronPhys.push_back( new G4ChargeExchangePhysics(verboseLevel,false));
-    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
-						    false,true,false,false,false));
-
-  } else if (name == "QBBC_DEL") {
-
-    SetBuilderList5();
-    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
-						    false,false,false,false,true));
-
-  } else if (name == "QBBC_HEL") {
-
+    AddPhysicsList("emstandard_opt2");
     SetBuilderList6();
-    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
-						    false,false,false,false,true));
-
-  } else if (name == "QBBC_HP") {
-
-    SetBuilderList0(true);
-    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
-						    false,false,false,true,true));
-  } else if (name == "QGSC") {
+    hadronPhys.push_back( new G4HadronInelasticQBBC());
+
+  } else if (name == "QBBC_XGG") {
+
+    AddPhysicsList("emstandard_opt2");
+    SetBuilderList6();
+    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC_XGG",verboseLevel));
+
+  } else if (name == "QBBC_XGGSN") {
+
+    AddPhysicsList("emstandard_opt2");
+    SetBuilderList6();
+    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC_XGG",verboseLevel));
+
+
+  } else if (name == "QGSC_BERT") {
 
     SetBuilderList4();
-    hadronPhys.push_back( new HadronPhysicsQGSC("hadron",true));
-    dump = true;
-
-  } else if (name == "QGSC_BERT") {
+    hadronPhys.push_back( new HadronPhysicsQGSC_BERT());
+
+  } else if (name == "QGSC_CHIPS") {
 
     SetBuilderList4();
-    hadronPhys.push_back( new HadronPhysicsQGSC_BERT("hadron",true));
-    dump = true;
-
-  } else if (name == "QGSC_CHIPS") {
-
-    SetBuilderList4();
-    hadronPhys.push_back( new HadronPhysicsQGSC_CHIPS("hadron",true));
-    dump = true;
-
-  } else if (name == "QGSC_QGSC") {
-
-    SetBuilderList4();
-    hadronPhys.push_back( new HadronPhysicsQGSC_QGSC("hadron",true));
-    dump = true;
-
-  } else if (name == "QGSC_EMV") {
-
-    AddPhysicsList("emstandard_opt1");
-    AddPhysicsList("QGSC");
-
-  } else if (name == "QGSP") {
+    hadronPhys.push_back( new HadronPhysicsQGSC_CHIPS());
+
+  } else if (name == "QGSP_BERT") {
 
     SetBuilderList1();
-    hadronPhys.push_back( new HadronPhysicsQGSP("hadron",true));
-    dump = true;
-
-  } else if (name == "QGSP_BERT") {
+    hadronPhys.push_back( new HadronPhysicsQGSP_BERT());
+
+  } else if (name == "QGSP_FTFP_BERT") {
 
     SetBuilderList1();
-    hadronPhys.push_back( new HadronPhysicsQGSP_BERT("hadron",true));
-    dump = true;
-
-  } else if (name == "QGSP_FTFP_BERT") {
-
-    SetBuilderList1();
-    hadronPhys.push_back( new HadronPhysicsQGSP_FTFP_BERT("hadron",true));
-    dump = true;
+    hadronPhys.push_back( new HadronPhysicsQGSP_FTFP_BERT());
 
   } else if (name == "QGSP_BERT_EMV") {
@@ -310,23 +265,26 @@
 
     SetBuilderList1(true);
-    hadronPhys.push_back( new HadronPhysicsQGSP_BERT_HP("hadron",true));
+    hadronPhys.push_back( new HadronPhysicsQGSP_BERT_HP());
 
   } else if (name == "QGSP_BIC") {
 
     SetBuilderList0();
-    hadronPhys.push_back( new HadronPhysicsQGSP_BIC("hadron",true));
-    dump = true;
+    hadronPhys.push_back( new HadronPhysicsQGSP_BIC());
+
+  } else if (name == "QGSP_BIC_EMY") {
+
+    AddPhysicsList("emstandard_opt3");
+    SetBuilderList0();
+    hadronPhys.push_back( new HadronPhysicsQGSP_BIC());
 
   } else if (name == "QGS_BIC") {
 
     SetBuilderList0();
-    hadronPhys.push_back( new HadronPhysicsQGS_BIC("hadron",true));
-    dump = true;
+    hadronPhys.push_back( new HadronPhysicsQGS_BIC());
 
   } else if (name == "QGSP_BIC_HP") {
 
     SetBuilderList0(true);
-    hadronPhys.push_back( new HadronPhysicsQGSP_BIC_HP("hadron",true));
-    dump = true;
+    hadronPhys.push_back( new HadronPhysicsQGSP_BIC_HP());
 
   } else if (name == "QGSP_BIC_EMY") {
@@ -347,10 +305,13 @@
 void PhysicsList::SetBuilderList0(G4bool flagHP)
 {
-  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
-  hadronPhys.push_back( new G4HadronElasticPhysics("elastic",verboseLevel,
-						    flagHP));
-  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
-  hadronPhys.push_back( new G4IonBinaryCascadePhysics("ionBIC"));
-  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
+  hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
+  if(flagHP) {
+    hadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
+  } else {
+    hadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
+  }
+  hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
+  hadronPhys.push_back( new G4IonBinaryCascadePhysics(verboseLevel));
+  hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
 }
 
@@ -359,31 +320,32 @@
 void PhysicsList::SetBuilderList1(G4bool flagHP)
 {
-  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
-  hadronPhys.push_back( new G4HadronElasticPhysics("elastic",verboseLevel,
-						    flagHP));
-  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
-  hadronPhys.push_back( new G4IonPhysics("ion"));
-  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
-
-void PhysicsList::SetBuilderList2(G4bool flagHP)
-{
-  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
-  hadronPhys.push_back( new G4HadronElasticPhysics("LElastic",verboseLevel,
-						    flagHP));
-  hadronPhys.push_back( new G4IonPhysics("ion"));
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
-
-void PhysicsList::SetBuilderList3(G4bool flagHP)
-{
-  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
-  hadronPhys.push_back( new G4HadronElasticPhysics("LElastic",verboseLevel,
-						    flagHP));
-  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
-  hadronPhys.push_back( new G4IonPhysics("ion"));
+  hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
+  if(flagHP) {
+    hadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
+  } else {
+    hadronPhys.push_back( new G4HadronHElasticPhysics(verboseLevel) );
+  }
+  hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
+  hadronPhys.push_back( new G4IonPhysics(verboseLevel));
+  hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
+
+void PhysicsList::SetBuilderList2(G4bool)
+{
+  hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
+  hadronPhys.push_back( new G4HadronElasticPhysicsLHEP(verboseLevel));
+  hadronPhys.push_back( new G4IonPhysics(verboseLevel));
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
+
+void PhysicsList::SetBuilderList3(G4bool)
+{
+  hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
+  hadronPhys.push_back( new G4HadronElasticPhysicsLHEP(verboseLevel));
+  hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
+  hadronPhys.push_back( new G4IonPhysics(verboseLevel));
 }
 
@@ -392,31 +354,31 @@
 void PhysicsList::SetBuilderList4(G4bool)
 {
-  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
-  hadronPhys.push_back( new G4HadronQElasticPhysics("elastic",verboseLevel));
-  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
-  hadronPhys.push_back( new G4IonPhysics("ion"));
-  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
-
-void PhysicsList::SetBuilderList5(G4bool flagHP)
-{
-  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
-  hadronPhys.push_back( new G4HadronDElasticPhysics(verboseLevel,flagHP));
-  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
-  hadronPhys.push_back( new G4IonBinaryCascadePhysics("ionBIC"));
-  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
-
-void PhysicsList::SetBuilderList6(G4bool flagHP)
-{
-  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
-  hadronPhys.push_back( new G4HadronHElasticPhysics(verboseLevel,flagHP));
-  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
-  hadronPhys.push_back( new G4IonBinaryCascadePhysics("ionBIC"));
-  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
+  hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
+  hadronPhys.push_back( new G4HadronQElasticPhysics(verboseLevel));
+  hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
+  hadronPhys.push_back( new G4IonPhysics(verboseLevel));
+  hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
+
+void PhysicsList::SetBuilderList5(G4bool)
+{
+  hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
+  hadronPhys.push_back( new G4HadronDElasticPhysics(verboseLevel));
+  hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
+  hadronPhys.push_back( new G4IonBinaryCascadePhysics(verboseLevel));
+  hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
+
+void PhysicsList::SetBuilderList6(G4bool)
+{
+  hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
+  hadronPhys.push_back( new G4HadronHElasticPhysics(verboseLevel));
+  hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
+  hadronPhys.push_back( new G4IonBinaryCascadePhysics(verboseLevel));
+  hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
 }
 
@@ -436,4 +398,5 @@
   SetCutValue(cutForElectron, "e-");
   SetCutValue(cutForPositron, "e+");
+  SetCutValue(cutForProton, "proton");
 
   if (verboseLevel>0) DumpCutValuesTable();
@@ -464,13 +427,21 @@
 }
 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::SetCutForProton(G4double cut)
+{
+  cutForProton = cut;
+  SetParticleCuts(cutForProton, G4Proton::Proton());
+}
+
 void PhysicsList::List()
 {
-  G4cout << "### PhysicsLists available: FTFP FTFP_BERT FTFP_BERT_EMV FTFP_BERT_EMX FTFP_BERT_TRV FTF_BIC LHEP LHEP_EMV"
+  G4cout << "### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV FTFP_BERT_EMX FTFP_BERT_TRV FTF_BIC"
 	 << G4endl;
-  G4cout << "                            QBBC QBBC_DEL QBBC_HEL QBBC_HP QGSC "
+  G4cout << "                            LHEP LHEP_EMV QBBC QBBC_XGG QBBC_XGGSN"
 	 << G4endl; 
-  G4cout << "                            QGSC_BERT QGSC_CHIPS QGSC_QGSC QGSC_EMV QGSP QGSP_BERT QGSP_BER_EMV "
+  G4cout << "                            QGSC_BERT QGSC_CHIPS QGSP_BERT QGSP_BERT_EMV QGSP_BIC_EMY"
 	 << G4endl; 
-  G4cout << "                            QGSP_BERT_EMX QGSP_BERT_HP QGSP_BIC QGSP_BIC_HP QGSP_FTFP_BERT " 
+  G4cout << "                            QGSP_BERT_EMX QGSP_BERT_HP QGSP_BIC QGSP_BIC_HP" 
 	 << G4endl; 
 }
Index: trunk/examples/extended/hadronic/Hadr01/src/PhysicsListMessenger.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/PhysicsListMessenger.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/PhysicsListMessenger.cc	(revision 1337)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: PhysicsListMessenger.cc,v 1.4 2006/08/11 14:38:11 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PhysicsListMessenger.cc,v 1.7 2010/01/13 15:53:44 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //
@@ -48,4 +48,5 @@
 #include "G4UIcmdWithAString.hh"
 #include "G4UIcmdWithoutParameter.hh"
+#include "G4UImanager.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -58,5 +59,5 @@
   gammaCutCmd->SetParameterName("Gcut",false);
   gammaCutCmd->SetUnitCategory("Length");
-  gammaCutCmd->SetRange("Gcut>0.0");
+  gammaCutCmd->SetRange("Gcut>=0.0");
   gammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
 
@@ -65,5 +66,5 @@
   electCutCmd->SetParameterName("Ecut",false);
   electCutCmd->SetUnitCategory("Length");
-  electCutCmd->SetRange("Ecut>0.0");
+  electCutCmd->SetRange("Ecut>=0.0");
   electCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
   
@@ -72,6 +73,13 @@
   posCutCmd->SetParameterName("Pcut",false);
   posCutCmd->SetUnitCategory("Length");
-  posCutCmd->SetRange("Pcut>0.0");
+  posCutCmd->SetRange("Pcut>=0.0");
   posCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+
+  pCutCmd = new G4UIcmdWithADoubleAndUnit("/testhadr/CutProt",this);
+  pCutCmd->SetGuidance("Set proton cut.");
+  pCutCmd->SetParameterName("ProtCut",false);
+  pCutCmd->SetUnitCategory("Length");
+  pCutCmd->SetRange("ProtCut>=0.0");
+  pCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
 
   allCutCmd = new G4UIcmdWithADoubleAndUnit("/testhadr/CutsAll",this);
@@ -79,5 +87,5 @@
   allCutCmd->SetParameterName("cut",false);
   allCutCmd->SetUnitCategory("Length");
-  allCutCmd->SetRange("cut>0.0");
+  allCutCmd->SetRange("cut>=0.0");
   allCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
 
@@ -100,4 +108,5 @@
   delete electCutCmd;
   delete posCutCmd;
+  delete pCutCmd;
   delete allCutCmd;
   delete pListCmd;
@@ -107,42 +116,76 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
-void PhysicsListMessenger::SetNewValue(G4UIcommand* command,
-                                          G4String newValue)
+void PhysicsListMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
 {
-  if( command == gammaCutCmd )
-    pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));
+  G4UImanager* UI = G4UImanager::GetUIpointer();
+  if( command == gammaCutCmd ) {
+    if(pPhysicsList) {
+      pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));
+    } else {
+      UI->ApplyCommand("/run/setCutForAGivenParticle gamma " + newValue);
+    }
 
-  if( command == electCutCmd )
-    pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));
+  } else if( command == electCutCmd ) {
+    if(pPhysicsList) {
+      pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));
+    } else {
+      UI->ApplyCommand("/run/setCutForAGivenParticle e- " + newValue);
+    }
 
-  if( command == posCutCmd )
-   pPhysicsList->SetCutForPositron(posCutCmd->GetNewDoubleValue(newValue));
+  } else if( command == posCutCmd ) {
+    if(pPhysicsList) {
+      pPhysicsList->SetCutForPositron(posCutCmd->GetNewDoubleValue(newValue));
+    } else {
+      UI->ApplyCommand("/run/setCutForAGivenParticle e+ " + newValue);
+    }
 
-  if( command == allCutCmd )
-    {
+  } else if( command == pCutCmd ) {
+    if(pPhysicsList) {
+      pPhysicsList->SetCutForProton(pCutCmd->GetNewDoubleValue(newValue));
+    } else {
+      UI->ApplyCommand("/run/setCutForAGivenParticle proton " + newValue);
+    }
+
+  } else if( command == allCutCmd ) {
+
+    if(pPhysicsList) {
       G4double cut = allCutCmd->GetNewDoubleValue(newValue);
       pPhysicsList->SetCutForGamma(cut);
       pPhysicsList->SetCutForElectron(cut);
       pPhysicsList->SetCutForPositron(cut);
+      pPhysicsList->SetCutForProton(cut);
+    } else {
+      UI->ApplyCommand("/run/setCut " + newValue);
     }
 
-  if( command == pListCmd ) {
-    G4String name = newValue;
-    if(name == "PHYSLIST") {
-      char* path = getenv(name);
-      if (path) name = G4String(path);
-      else {
-        G4cout << "### PhysicsListMessenger WARNING: "
-	       << " environment variable PHYSLIST is not defined"
-	       << G4endl;
-	return; 
+  } else if( command == pListCmd ) {
+    if(pPhysicsList) {
+      G4String name = newValue;
+      if(name == "PHYSLIST") {
+	char* path = getenv(name);
+	if (path) name = G4String(path);
+	else {
+	  G4cout << "### PhysicsListMessenger WARNING: "
+		 << " environment variable PHYSLIST is not defined"
+		 << G4endl;
+	  return; 
+	}
       }
+      pPhysicsList->AddPhysicsList(name);
+    } else {
+      G4cout << "### PhysicsListMessenger WARNING: "
+	     << " /testhadr/Physics UI command is not available "
+	     << "for reference Physics List" << G4endl;
     }
-    pPhysicsList->AddPhysicsList(name);
+
+  } else if( command == listCmd ) {
+    if(pPhysicsList) {
+      pPhysicsList->List();
+    } else { 
+      G4cout << "### PhysicsListMessenger WARNING: "
+	     << " /testhadr/ListPhysics UI command is not available "
+	     << "for reference Physics List" << G4endl;
+    }
   }
-
-  if( command == listCmd )
-    pPhysicsList->List();
-
 }
 
Index: trunk/examples/extended/hadronic/Hadr01/src/PrimaryGeneratorAction.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/PrimaryGeneratorAction.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/PrimaryGeneratorAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorAction.cc,v 1.4 2006/11/15 14:58:10 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/src/StackingAction.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/StackingAction.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/StackingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StackingAction.cc,v 1.5 2006/10/04 09:56:03 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/src/StackingMessenger.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/StackingMessenger.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/StackingMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StackingMessenger.cc,v 1.3 2006/06/29 17:24:32 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/src/TargetSD.cc
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/src/TargetSD.cc	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/src/TargetSD.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: TargetSD.cc,v 1.4 2006/06/29 17:24:34 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 /////////////////////////////////////////////////////////////////////////
Index: trunk/examples/extended/hadronic/Hadr01/vis.mac
===================================================================
--- trunk/examples/extended/hadronic/Hadr01/vis.mac	(revision 1230)
+++ trunk/examples/extended/hadronic/Hadr01/vis.mac	(revision 1337)
@@ -1,42 +1,81 @@
-#
-# Macro file for the initialization phase of "TestEm9.cc"
-#
-# Sets some default verbose
-# and initializes the graphic.
-#
 /control/verbose 2
 /run/verbose 2
 #
-# Create empty scene ("world" is default)
-/vis/scene/create
-#
-# Create a scene handler for a specific graphics system
-# Edit the next line(s) to choose another graphic system
-#
-/vis/open OGLIX
-#/vis/open OGLIXm
-#
-#/vis/open DAWNFILE
-#
-# Draw scene
-/vis/viewer/set/viewpointThetaPhi 90 0 deg
-/vis/viewer/zoom 1.0
-/vis/viewer/flush
-#
-# for drawing the tracks
-# if too many tracks cause core dump => storeTrajectory 0
-/tracking/storeTrajectory 1
-/vis/scene/endOfEventAction accumulate
-#
-#/testhadr/DrawTracks      charged
 /testhadr/TargetMat        G4_Al 
 /testhadr/TargetRadius     1  cm
 /testhadr/TargetLength     10 cm
-/testhadr/NumberDivZ       100
+#/testhadr/NumberDivZ       100
 /testhadr/DrawTracks       all
-/testhadr/CutsAll          1 mm
-/testhadr/Physics          QBBC
+#/testhadr/CutsAll          1 mm
+#/testhadr/Physics          QBBC
 #
 /run/initialize
 #
-
+# Use this open statement to create an OpenGL view:
+/vis/open OGL 600x600-0+0
+#
+# Use this open statement to create a .prim file suitable for
+# viewing in DAWN:
+#/vis/open DAWNFILE
+#
+# Use this open statement to create a .heprep file suitable for
+# viewing in HepRApp:
+#/vis/open HepRepFile
+#
+# Use this open statement to create a .wrl file suitable for
+# viewing in a VRML viewer:
+#/vis/open VRML2FILE
+#
+# Disable auto refresh and quieten vis messages whilst scene and
+# trajectories are established:
+/vis/viewer/set/autoRefresh false
+/vis/verbose errors
+#
+# Draw geometry:
+/vis/drawVolume
+#
+# Specify view angle:
+/vis/viewer/set/viewpointThetaPhi 90. 0.
+#
+# Specify zoom value:
+#/vis/viewer/zoom 2.
+#
+# Specify style (surface or wireframe):
+#/vis/viewer/set/style wireframe
+#
+# Draw coordinate axes:
+#/vis/scene/add/axes 0 0 0 1 m
+#
+# Draw smooth trajectories at end of event, showing trajectory points
+# as markers 2 pixels wide:
+/vis/scene/add/trajectories smooth
+/vis/modeling/trajectories/create/drawByCharge
+#/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
+#/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
+# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
+#
+# Draw hits at end of event:
+#/vis/scene/add/hits
+#
+# To draw only gammas:
+#/vis/filtering/trajectories/create/particleFilter
+#/vis/filtering/trajectories/particleFilter-0/add gamma
+#
+# To invert the above, drawing all particles except gammas,
+# keep the above two lines but also add:
+#/vis/filtering/trajectories/particleFilter-0/invert true
+#
+# Many other options are available with /vis/modeling and /vis/filtering.
+# For example, to select colour by particle ID:
+#/vis/modeling/trajectories/create/drawByParticleID
+#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
+#
+# To superimpose all of the events from a given run:
+/vis/scene/endOfEventAction accumulate
+#
+# Re-establish auto refreshing and verbosity:
+/vis/viewer/set/autoRefresh true
+/vis/verbose warnings
+#
+# For file-based drivers, use this to create an empty detector view:
+#/vis/viewer/flush
