Index: trunk/examples/extended/electromagnetic/TestEm3/src/DetectorConstruction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/DetectorConstruction.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/DetectorConstruction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorConstruction.cc,v 1.23 2009/03/04 18:49:17 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/DetectorMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/DetectorMessenger.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/DetectorMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.cc,v 1.11 2006/06/29 16:52:26 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/EmAcceptance.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/EmAcceptance.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/EmAcceptance.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EmAcceptance.cc,v 1.6 2006/06/29 16:52:28 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/EventAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/EventAction.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/EventAction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: EventAction.cc,v 1.16 2008/05/29 16:59:27 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: EventAction.cc,v 1.18 2010/06/07 05:40:46 perl Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,7 +37,4 @@
 
 #include "G4Event.hh"
-#include "G4TrajectoryContainer.hh"
-#include "G4Trajectory.hh"
-#include "G4VVisManager.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -78,5 +75,5 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
-void EventAction::EndOfEventAction(const G4Event* evt)
+void EventAction::EndOfEventAction(const G4Event*)
 {
   for (G4int k=1; k<=detector->GetNbOfAbsor(); k++) {
@@ -84,18 +81,4 @@
      if (energyDeposit[k] > 0.) histoManager->FillHisto(k, energyDeposit[k]);
   }
-
-  if (G4VVisManager::GetConcreteInstance())
-    {
-     G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
-     G4int n_trajectories = 0;
-     if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
-     for (G4int i=0; i<n_trajectories; i++) 
-        { G4Trajectory* trj = (G4Trajectory*)
-	                             ((*(evt->GetTrajectoryContainer()))[i]);
-          if (drawFlag == "all") trj->DrawTrajectory(100);
-          else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
-                                  trj->DrawTrajectory(100); 
-        }
-    }
 }
 
Index: trunk/examples/extended/electromagnetic/TestEm3/src/EventActionMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/EventActionMessenger.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/EventActionMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.cc,v 1.4 2006/06/29 16:52:38 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/HistoManager.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/HistoManager.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/HistoManager.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoManager.cc,v 1.17 2009/03/04 18:49:17 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/HistoMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/HistoMessenger.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/HistoMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoMessenger.cc,v 1.9 2007/11/12 17:04:55 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/PhysListEmStandard.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/PhysListEmStandard.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/PhysListEmStandard.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysListEmStandard.cc,v 1.23 2009/11/13 17:01:44 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/PhysicsList.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/PhysicsList.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/PhysicsList.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: PhysicsList.cc,v 1.30 2009/11/13 17:01:44 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PhysicsList.cc,v 1.32 2010/04/13 08:10:19 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -42,6 +42,8 @@
 #include "G4EmPenelopePhysics.hh"
 
+#include "PhysListEmStandardGS.hh"
+#include "PhysListEmStandardWVI.hh"
+
 #include "G4UnitsTable.hh"
-#include "G4UrbanMscModel.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -255,4 +257,16 @@
     emPhysicsList = new G4EmPenelopePhysics();
 
+  } else if (name == "standardGS") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new PhysListEmStandardGS(name);
+
+  } else if (name == "standardWVI") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new PhysListEmStandardWVI(name);
+
   } else {
 
@@ -298,4 +312,8 @@
   SetCutValue(cutForElectron, "e-");
   SetCutValue(cutForPositron, "e+");   
+
+  // Cut for proton not used in EM processes except single scattering
+  // so electron cut is used in this example
+  SetCutValue(cutForElectron, "proton");
     
   if (verboseLevel>0) DumpCutValuesTable();
Index: trunk/examples/extended/electromagnetic/TestEm3/src/PhysicsListMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/PhysicsListMessenger.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/PhysicsListMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 16:52:57 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/PrimaryGeneratorAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/PrimaryGeneratorAction.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/PrimaryGeneratorAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorAction.cc,v 1.7 2006/06/29 16:53:00 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/PrimaryGeneratorMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/PrimaryGeneratorMessenger.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/PrimaryGeneratorMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorMessenger.cc,v 1.3 2006/06/29 16:53:02 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/RunAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/RunAction.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/RunAction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: RunAction.cc,v 1.37 2008/05/29 16:59:27 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: RunAction.cc,v 1.38 2010/01/24 17:25:07 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,4 +41,13 @@
 #include "G4UnitsTable.hh"
 
+#include "G4ParticleTable.hh"
+#include "G4ParticleDefinition.hh"
+#include "G4Track.hh"
+#include "G4Gamma.hh"
+#include "G4Electron.hh"
+#include "G4Positron.hh"
+#include "G4ProductionCutsTable.hh"
+#include "G4LossTableManager.hh"
+
 #include "Randomize.hh"
 
@@ -81,4 +90,8 @@
     energyDeposit[k].clear();  
   }
+
+  n_gamma = 0;
+  n_elec  = 0;
+  n_pos   = 0;
 
   //initialize Eflow
@@ -195,4 +208,8 @@
     GetParticleDefinition()->GetParticleName()
 	 << "  E = " << G4BestUnit(beamEnergy,"Energy") << G4endl;
+  G4cout << " Mean number of gamma  " << (G4double)n_gamma*norm << G4endl;
+  G4cout << " Mean number of e-     " << (G4double)n_elec*norm << G4endl;
+  G4cout << " Mean number of e+     " << (G4double)n_pos*norm << G4endl;
+  G4cout << "------------------------------------------------------------\n";
   
   //Energy flow
@@ -263,13 +280,4 @@
   CLHEP::HepRandom::showEngineStatus();
 }
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-#include "G4ParticleTable.hh"
-#include "G4ParticleDefinition.hh"
-#include "G4Gamma.hh"
-#include "G4Electron.hh"
-#include "G4ProductionCutsTable.hh"
-#include "G4LossTableManager.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -364,4 +372,14 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
+void RunAction::AddSecondaryTrack(const G4Track* track)
+{
+  const G4ParticleDefinition* d = track->GetDefinition();
+  if(d == G4Gamma::Gamma()) { ++n_gamma; }
+  else if (d == G4Electron::Electron()) { ++n_elec; }
+  else if (d == G4Positron::Positron()) { ++n_pos; }
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 void RunAction::SetEdepAndRMS(G4int i, G4double edep, G4double rms, G4double lim)
 {
Index: trunk/examples/extended/electromagnetic/TestEm3/src/RunActionMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/RunActionMessenger.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/RunActionMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: RunActionMessenger.cc,v 1.13 2007/04/25 10:07:27 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/StepMax.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/StepMax.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/StepMax.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMax.cc,v 1.4 2006/06/29 16:53:19 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/StepMaxMessenger.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/StepMaxMessenger.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/StepMaxMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMaxMessenger.cc,v 1.3 2006/06/29 16:53:21 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/SteppingAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/SteppingAction.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/SteppingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.cc,v 1.28 2008/05/29 16:59:27 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/SteppingVerbose.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/SteppingVerbose.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/SteppingVerbose.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingVerbose.cc,v 1.4 2006/06/29 16:53:25 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/electromagnetic/TestEm3/src/TrackingAction.cc
===================================================================
--- trunk/examples/extended/electromagnetic/TestEm3/src/TrackingAction.cc	(revision 1230)
+++ trunk/examples/extended/electromagnetic/TestEm3/src/TrackingAction.cc	(revision 1337)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: TrackingAction.cc,v 1.2 2006/06/29 16:53:27 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: TrackingAction.cc,v 1.3 2010/01/24 17:25:07 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -69,5 +69,7 @@
          
     //flux artefact, if primary vertex is inside the calorimeter   
-    for (G4int pl=1; pl<=Idnow; pl++) runAct->sumEnergyFlow(pl, Eflow);
+    for (G4int pl=1; pl<=Idnow; pl++) {runAct->sumEnergyFlow(pl, Eflow);}
+  } else {
+    runAct->AddSecondaryTrack(track);
   }
 }
