Index: trunk/examples/extended/electromagnetic/TestEm1/GNUmakefile
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/GNUmakefile	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/GNUmakefile	(revision 1230)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.13 2006/10/19 17:24:12 maire Exp $
+# $Id: GNUmakefile,v 1.14 2008/06/11 22:06:28 maire Exp $
 # --------------------------------------------------------------
 # GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
@@ -17,15 +17,5 @@
 #### G4ANALYSIS_USE := true
 
-ifdef G4ANALYSIS_USE
-  CPPFLAGS += -DG4ANALYSIS_USE
-endif
-
 include $(G4INSTALL)/config/architecture.gmk
-
-ifdef G4ANALYSIS_USE
-  # for the aida-config command see the README file
-  CPPFLAGS += `aida-config --include`
-  LOADLIBS += `aida-config --lib`  
-endif
 
 include $(G4INSTALL)/config/binmake.gmk
Index: trunk/examples/extended/electromagnetic/TestEm1/TestEm1.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/TestEm1.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/TestEm1.cc	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: TestEm1.cc,v 1.15 2007/06/21 17:10:11 maire Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/annihil.mac
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/annihil.mac	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/annihil.mac	(revision 1230)
@@ -1,3 +1,3 @@
-# $Id: annihil.mac,v 1.1 2006/01/25 13:56:40 maire Exp $
+# $Id: annihil.mac,v 1.2 2009/09/15 12:51:49 maire Exp $
 #
 # Macro file for "TestEm1.cc"
@@ -12,5 +12,5 @@
 /testem/det/setSize 20 cm
 #
-/testem/phys/addPhysics standard
+/testem/phys/addPhysics local
 #
 /run/initialize
Index: trunk/examples/extended/electromagnetic/TestEm1/brems.mac
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/brems.mac	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/brems.mac	(revision 1230)
@@ -1,3 +1,3 @@
-# $Id: brems.mac,v 1.3 2006/04/10 10:22:41 vnivanch Exp $
+# $Id: brems.mac,v 1.4 2009/09/15 12:51:49 maire Exp $
 #
 # Macro file for "TestEm1.cc"
@@ -12,5 +12,5 @@
 /testem/det/setSize 50 cm
 #
-/testem/phys/addPhysics standard
+/testem/phys/addPhysics local
 #
 /run/initialize
Index: trunk/examples/extended/electromagnetic/TestEm1/erange.mac
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/erange.mac	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/erange.mac	(revision 1230)
@@ -1,3 +1,3 @@
-# $Id: erange.mac,v 1.1 2007/06/20 15:26:33 maire Exp $
+# $Id: erange.mac,v 1.2 2009/09/15 12:51:49 maire Exp $
 #
 # Macro file for "TestEm1.cc"
@@ -10,7 +10,7 @@
 /testem/det/setMat Water
 #
-/testem/phys/addPhysics  standard
-###/testem/phys/addPhysics  penelope
-###/testem/phys/addPhysics  livermore
+/testem/phys/addPhysics  local
+###/testem/phys/addPhysics  empenelope
+###/testem/phys/addPhysics  emlivermore
 #
 /run/initialize
Index: trunk/examples/extended/electromagnetic/TestEm1/gammaconversion.mac
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/gammaconversion.mac	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/gammaconversion.mac	(revision 1230)
@@ -1,3 +1,3 @@
-# $Id: gammaconversion.mac,v 1.1 2006/01/25 13:56:40 maire Exp $
+# $Id: gammaconversion.mac,v 1.2 2009/09/15 12:51:49 maire Exp $
 #
 # Macro file for "TestEm1.cc"
@@ -12,5 +12,5 @@
 /testem/det/setSize 1 m
 #
-/testem/phys/addPhysics standard
+/testem/phys/addPhysics local
 #
 /run/initialize
Index: trunk/examples/extended/electromagnetic/TestEm1/include/DetectorConstruction.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/DetectorConstruction.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/DetectorConstruction.hh	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: DetectorConstruction.hh,v 1.2 2006/06/29 16:36:04 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 // 
Index: trunk/examples/extended/electromagnetic/TestEm1/include/DetectorMessenger.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/DetectorMessenger.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/DetectorMessenger.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.hh,v 1.3 2006/06/29 16:36:07 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/EventAction.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/EventAction.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/EventAction.hh	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: EventAction.hh,v 1.3 2006/06/29 16:36:10 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 // 
Index: trunk/examples/extended/electromagnetic/TestEm1/include/EventActionMessenger.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/EventActionMessenger.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/EventActionMessenger.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.hh,v 1.3 2006/06/29 16:36:13 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/HistoManager.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/HistoManager.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/HistoManager.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoManager.hh,v 1.6 2007/11/12 15:48:58 maire Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/HistoMessenger.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/HistoMessenger.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/HistoMessenger.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoMessenger.hh,v 1.4 2007/11/12 15:48:58 maire Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/PhysListEmStandard.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/PhysListEmStandard.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/PhysListEmStandard.hh	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: PhysListEmStandard.hh,v 1.5 2007/11/12 15:48:58 maire Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/PhysicsList.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/PhysicsList.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/PhysicsList.hh	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: PhysicsList.hh,v 1.4 2006/06/29 16:36:33 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/PhysicsListMessenger.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/PhysicsListMessenger.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/PhysicsListMessenger.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.hh,v 1.3 2006/06/29 16:36:35 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/PrimaryGeneratorAction.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/PrimaryGeneratorAction.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/PrimaryGeneratorAction.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorAction.hh,v 1.3 2006/06/29 16:36:37 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/PrimaryGeneratorMessenger.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/PrimaryGeneratorMessenger.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/PrimaryGeneratorMessenger.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorMessenger.hh,v 1.3 2006/06/29 16:36:39 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/ProcessesCount.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/ProcessesCount.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/ProcessesCount.hh	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: ProcessesCount.hh,v 1.10 2006/06/29 16:36:41 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/RunAction.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/RunAction.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/RunAction.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: RunAction.hh,v 1.8 2006/06/29 16:36:43 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/StepMax.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/StepMax.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/StepMax.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMax.hh,v 1.2 2006/06/29 16:36:45 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/StepMaxMessenger.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/StepMaxMessenger.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/StepMaxMessenger.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMaxMessenger.hh,v 1.2 2006/06/29 16:36:47 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/SteppingAction.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/SteppingAction.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/SteppingAction.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.hh,v 1.4 2006/06/29 16:36:49 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/include/SteppingVerbose.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/SteppingVerbose.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/SteppingVerbose.hh	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: SteppingVerbose.hh,v 1.2 2006/06/29 16:36:51 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //   This class manages the verbose outputs in G4SteppingManager. 
Index: trunk/examples/extended/electromagnetic/TestEm1/include/TrackingAction.hh
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/include/TrackingAction.hh	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/include/TrackingAction.hh	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: TrackingAction.hh,v 1.4 2006/06/29 16:36:53 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/ionis.mac
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/ionis.mac	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/ionis.mac	(revision 1230)
@@ -1,3 +1,3 @@
-# $Id: ionis.mac,v 1.2 2006/01/25 13:56:40 maire Exp $
+# $Id: ionis.mac,v 1.3 2009/09/15 12:51:49 maire Exp $
 #
 # Macro file for "TestEm1.cc"
@@ -12,5 +12,5 @@
 /testem/det/setSize 50 cm
 #
-/testem/phys/addPhysics standard
+/testem/phys/addPhysics local
 #
 /run/initialize
Index: trunk/examples/extended/electromagnetic/TestEm1/range.mac
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/range.mac	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/range.mac	(revision 1230)
@@ -1,3 +1,3 @@
-# $Id: range.mac,v 1.11 2007/06/20 15:26:33 maire Exp $
+# $Id: range.mac,v 1.12 2009/09/15 12:51:49 maire Exp $
 #
 # Macro file for "TestEm1.cc"
@@ -12,7 +12,7 @@
 /testem/det/setSize 10 cm
 #
-/testem/phys/addPhysics  standard
-###/testem/phys/addPhysics  penelope
-###/testem/phys/addPhysics  livermore
+/testem/phys/addPhysics  local
+###/testem/phys/addPhysics  empenelope
+###/testem/phys/addPhysics  emlivermore
 #
 /run/initialize
Index: trunk/examples/extended/electromagnetic/TestEm1/src/DetectorConstruction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/DetectorConstruction.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/DetectorConstruction.cc	(revision 1230)
@@ -27,5 +27,5 @@
 //
 // $Id: DetectorConstruction.cc,v 1.8 2007/11/12 15:48:58 maire Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 // 
Index: trunk/examples/extended/electromagnetic/TestEm1/src/DetectorMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/DetectorMessenger.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/DetectorMessenger.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.cc,v 1.3 2006/06/29 16:36:57 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/EventAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/EventAction.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/EventAction.cc	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: EventAction.cc,v 1.7 2007/11/12 15:48:58 maire Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 // 
Index: trunk/examples/extended/electromagnetic/TestEm1/src/EventActionMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/EventActionMessenger.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/EventActionMessenger.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.cc,v 1.3 2006/06/29 16:37:01 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/HistoManager.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/HistoManager.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/HistoManager.cc	(revision 1230)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: HistoManager.cc,v 1.10 2007/11/12 15:48:58 maire Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: HistoManager.cc,v 1.13 2008/09/12 16:32:25 maire Exp $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -54,6 +54,6 @@
  
   fileName[0] = "testem1";
-  fileType    = "hbook";
-  fileOption  = "--noErrors uncompress";
+  fileType    = "root";
+  fileOption  = "export=root";
   // histograms
   for (G4int k=0; k<MaxHisto; k++) {
@@ -215,5 +215,5 @@
 void HistoManager::PrintHisto(G4int ih)
 {
- if (ih < MaxHisto) ascii[ih] = true;
+ if (ih < MaxHisto) { ascii[ih] = true; ascii[0] = true; }
  else
     G4cout << "---> warning from HistoManager::PrintHisto() : histo " << ih
@@ -228,4 +228,6 @@
 {
 #ifdef G4ANALYSIS_USE
+
+ if (!ascii[0]) return;
  
  G4String name = fileName[0] + ".ascii";
@@ -241,5 +243,6 @@
       for (G4int iBin=0; iBin<Nbins[ih]; iBin++) {
          File << "  " << iBin << "\t" 
-              << histo[ih]->binMean(iBin) << "\t"
+	      << 0.5*(histo[ih]->axis().binLowerEdge(iBin) +
+	              histo[ih]->axis().binUpperEdge(iBin)) << "\t"
 	      << histo[ih]->binHeight(iBin) 
 	      << G4endl;
Index: trunk/examples/extended/electromagnetic/TestEm1/src/HistoMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/HistoMessenger.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/HistoMessenger.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoMessenger.cc,v 1.6 2007/11/12 15:48:58 maire Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/PhysListEmStandard.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/PhysListEmStandard.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/PhysListEmStandard.cc	(revision 1230)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: PhysListEmStandard.cc,v 1.14 2007/06/20 15:26:33 maire Exp $
-// GEANT4 tag $Name:  $
+// $Id: PhysListEmStandard.cc,v 1.21 2009/11/13 15:44:28 maire Exp $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,15 +39,20 @@
 #include "G4PhotoElectricEffect.hh"
 
-#include "G4MultipleScattering.hh"
-
+#include "G4eMultipleScattering.hh"
+#include "G4UrbanMscModel93.hh"
 #include "G4eIonisation.hh"
 #include "G4eBremsstrahlung.hh"
 #include "G4eplusAnnihilation.hh"
 
+#include "G4MuMultipleScattering.hh"
 #include "G4MuIonisation.hh"
 #include "G4MuBremsstrahlung.hh"
 #include "G4MuPairProduction.hh"
 
+#include "G4hMultipleScattering.hh"
 #include "G4hIonisation.hh"
+#include "G4hBremsstrahlung.hh"
+#include "G4hPairProduction.hh"
+
 #include "G4ionIonisation.hh"
 
@@ -86,28 +91,42 @@
     } else if (particleName == "e-") {
       //electron
-      pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1);
-      pmanager->AddProcess(new G4eIonisation,        -1, 2, 2);
-      pmanager->AddProcess(new G4eBremsstrahlung,    -1, 3, 3);
+      G4eMultipleScattering* msc = new G4eMultipleScattering();
+      msc->AddEmModel(0, new G4UrbanMscModel93());
+      pmanager->AddProcess(msc,                       -1, 1, 1);
+      pmanager->AddProcess(new G4eIonisation,         -1, 2, 2);
+      pmanager->AddProcess(new G4eBremsstrahlung,     -1, 3, 3);
 	    
     } else if (particleName == "e+") {
       //positron
-      pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1);
-      pmanager->AddProcess(new G4eIonisation,        -1, 2, 2);
-      pmanager->AddProcess(new G4eBremsstrahlung,    -1, 3, 3);
-      pmanager->AddProcess(new G4eplusAnnihilation,   0,-1, 4);
+      G4eMultipleScattering* msc = new G4eMultipleScattering();
+      msc->AddEmModel(0, new G4UrbanMscModel93());
+      pmanager->AddProcess(msc,                       -1, 1, 1);      
+      pmanager->AddProcess(new G4eIonisation,         -1, 2, 2);
+      pmanager->AddProcess(new G4eBremsstrahlung,     -1, 3, 3);
+      pmanager->AddProcess(new G4eplusAnnihilation,    0,-1, 4);
       
     } else if( particleName == "mu+" || 
                particleName == "mu-"    ) {
       //muon  
-      pmanager->AddProcess(new G4MultipleScattering,-1, 1, 1);
-      pmanager->AddProcess(new G4MuIonisation,      -1, 2, 2);
-      pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3, 3);
-      pmanager->AddProcess(new G4MuPairProduction,  -1, 4, 4);       
-     
-    } else if( particleName == "alpha" || particleName == "He3" 
-	       || particleName == "GenericIon" ) { 
+      pmanager->AddProcess(new G4MuMultipleScattering,-1, 1, 1);
+      pmanager->AddProcess(new G4MuIonisation,        -1, 2, 2);
+      pmanager->AddProcess(new G4MuBremsstrahlung,    -1, 3, 3);
+      pmanager->AddProcess(new G4MuPairProduction,    -1, 4, 4);       
+             
+    } else if( particleName == "proton" ||
+               particleName == "pi-" ||
+               particleName == "pi+"    ) {
+      //proton  
+      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
+      pmanager->AddProcess(new G4hIonisation,         -1, 2, 2);
+      pmanager->AddProcess(new G4hBremsstrahlung,     -1, 3, 3);
+      pmanager->AddProcess(new G4hPairProduction,     -1, 4, 4);       
+          
+    } else if( particleName == "alpha" ||
+               particleName == "He3" ||
+	       particleName == "GenericIon" ) { 
 
-      pmanager->AddProcess(new G4MultipleScattering,-1, 1, 1);
-      pmanager->AddProcess(new G4ionIonisation,     -1, 2, 2);
+      pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1);
+      pmanager->AddProcess(new G4ionIonisation,      -1, 2, 2);
 
     } else if ((!particle->IsShortLived()) &&
@@ -115,30 +134,39 @@
 	       (particle->GetParticleName() != "chargedgeantino")) {
       //all others charged particles except geantino
-      pmanager->AddProcess(new G4MultipleScattering,-1, 1, 1);
-      pmanager->AddProcess(new G4hIonisation,       -1, 2, 2);
+      pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1);
+      pmanager->AddProcess(new G4hIonisation,        -1, 2, 2);
     }
   }
-  
+
   // Em options
   //
+  // Main options and setting parameters are shown here.
+  // Several of them have default values.
+  //
   G4EmProcessOptions emOptions;
-    
-  //coulomb scattering
+  
+  //physics tables
   //
-  emOptions.SetMscStepLimitation(fUseDistanceToBoundary);   
-  emOptions.SetSkin(2.);
-  
+  emOptions.SetMinEnergy(100*eV);	//default    
+  emOptions.SetMaxEnergy(100*TeV);	//default  
+  emOptions.SetDEDXBinning(12*20);	//default=12*7  
+  emOptions.SetLambdaBinning(12*20);	//default=12*7
+  emOptions.SetSplineFlag(true);	//default
+      
+  //multiple coulomb scattering
+  //
+  emOptions.SetMscStepLimitation(fUseDistanceToBoundary);  //default=fUseSafety
+  emOptions.SetMscRangeFactor(0.04);	//default
+  emOptions.SetMscGeomFactor (2.5);	//default       
+  emOptions.SetSkin(3.);		//default
+      
   //energy loss
   //
-  emOptions.SetLinearLossLimit(1.e-6);
-  emOptions.SetStepFunction(0.2, 100*um); 
+  emOptions.SetStepFunction(0.2, 100*um);	//default=(0.2, 1*mm)   
+  emOptions.SetLinearLossLimit(1.e-2);		//default
    
   //ionization
   //
-  emOptions.SetSubCutoff(true);
-    
-  // define high energy threshold for bremstrahlung 
-  //
-  emOptions.SetBremsstrahlungTh(10.*GeV);
+  emOptions.SetSubCutoff(false);		//default=false  
 }
 
Index: trunk/examples/extended/electromagnetic/TestEm1/src/PhysicsList.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/PhysicsList.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/PhysicsList.cc	(revision 1230)
@@ -25,6 +25,6 @@
 //
 // 
-// $Id: PhysicsList.cc,v 1.10 2006/10/19 17:24:13 maire Exp $
-// GEANT4 tag $Name:  $
+// $Id: PhysicsList.cc,v 1.12 2009/09/15 12:51:49 maire Exp $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,6 +35,11 @@
  
 #include "PhysListEmStandard.hh"
-#include "PhysListEmLivermore.hh"
-#include "PhysListEmPenelope.hh"
+
+#include "G4EmStandardPhysics.hh"
+#include "G4EmStandardPhysics_option1.hh"
+#include "G4EmStandardPhysics_option2.hh"
+#include "G4EmStandardPhysics_option3.hh"
+#include "G4EmLivermorePhysics.hh"
+#include "G4EmPenelopePhysics.hh"
 
 #include "DetectorConstruction.hh"
@@ -61,5 +66,5 @@
 
   // EM physics
-  emName = G4String("standard");
+  emName = G4String("local");
   emPhysicsList = new PhysListEmStandard(emName);
 
@@ -189,5 +194,6 @@
   G4EmProcessOptions emOptions;
   emOptions.SetBuildCSDARange(true);
-  
+  emOptions.SetDEDXBinningForCSDARange(8*20);
+    
   // Decay Process
   //
@@ -209,22 +215,44 @@
   if (name == emName) return;
 
-  if (name == "standard") {
+  if (name == "local") {
 
     emName = name;
     delete emPhysicsList;
     emPhysicsList = new PhysListEmStandard(name);
- 
-  } else if (name == "livermore") {
-
-    emName = name;
-    delete emPhysicsList;
-    emPhysicsList = new PhysListEmLivermore(name);
     
-  } else if (name == "penelope") {
-
-    emName = name;
-    delete emPhysicsList;
-    emPhysicsList = new PhysListEmPenelope(name);
-        
+  } else if (name == "emstandard_opt0") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new G4EmStandardPhysics();
+
+  } else if (name == "emstandard_opt1") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new G4EmStandardPhysics_option1();
+
+  } else if (name == "emstandard_opt2") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new G4EmStandardPhysics_option2();
+
+  } else if (name == "emstandard_opt3") {
+
+    emName = name;
+    delete emPhysicsList;
+    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 {
 
Index: trunk/examples/extended/electromagnetic/TestEm1/src/PhysicsListMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/PhysicsListMessenger.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/PhysicsListMessenger.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 16:37:19 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/PrimaryGeneratorAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/PrimaryGeneratorAction.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/PrimaryGeneratorAction.cc	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: PrimaryGeneratorAction.cc,v 1.4 2006/06/29 16:37:21 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 // 
Index: trunk/examples/extended/electromagnetic/TestEm1/src/PrimaryGeneratorMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/PrimaryGeneratorMessenger.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/PrimaryGeneratorMessenger.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorMessenger.cc,v 1.4 2006/06/29 16:37:23 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/RunAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/RunAction.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/RunAction.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: RunAction.cc,v 1.19 2006/06/29 16:37:25 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/StepMax.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/StepMax.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/StepMax.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMax.cc,v 1.2 2006/06/29 16:37:27 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/StepMaxMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/StepMaxMessenger.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/StepMaxMessenger.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMaxMessenger.cc,v 1.2 2006/06/29 16:37:29 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/SteppingAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/SteppingAction.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/SteppingAction.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.cc,v 1.8 2006/06/29 16:37:31 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/SteppingVerbose.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/SteppingVerbose.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/SteppingVerbose.cc	(revision 1230)
@@ -26,5 +26,5 @@
 //
 // $Id: SteppingVerbose.cc,v 1.2 2006/06/29 16:37:34 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm1/src/TrackingAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm1/src/TrackingAction.cc	(revision 812)
+++ trunk/examples/extended/electromagnetic/TestEm1/src/TrackingAction.cc	(revision 1230)
@@ -25,5 +25,5 @@
 //
 // $Id: TrackingAction.cc,v 1.10 2006/06/29 16:37:36 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
