From e12fa35ad1debb618df45ffbd8ad801b18b2afa6 Mon Sep 17 00:00:00 2001
From: Frank Gaede <frank.gaede@desy.de>
Date: Mon, 5 Mar 2018 13:08:39 +0100
Subject: [PATCH]  activate G4StepLimiterPhysics in DDSim

---
 DDSim/DD4hepSimulation.py | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/DDSim/DD4hepSimulation.py b/DDSim/DD4hepSimulation.py
index bfc4e87a2..5395fe189 100644
--- a/DDSim/DD4hepSimulation.py
+++ b/DDSim/DD4hepSimulation.py
@@ -474,15 +474,10 @@ class DD4hepSimulation(object):
     # Now build the physics list:
     _phys = self.physics.setupPhysics( kernel, name=self.physicsList )
 
-    #fg: do we need these really ?
-    #fg:  ph = DDG4.PhysicsList(kernel,'Geant4PhysicsList/Myphysics')
-    #fg:  ph.addParticleConstructor('G4BosonConstructor')
-    #fg:  ph.addParticleConstructor('G4LeptonConstructor')
-    #fg:  ph.addParticleProcess('e[+-]','G4eMultipleScattering',-1,1,1)
-    #fg:  ph.addPhysicsConstructor('G4OpticalPhysics')
-    #fg:  ph.enableUI()
-    #fg:  phys.add(ph)
-    #fg:  phys.dump()
+    ## add the G4StepLimiterPhysics to activate the max step limits in volumes
+    ph = DDG4.PhysicsList(kernel,'Geant4PhysicsList/Myphysics')
+    ph.addPhysicsConstructor('G4StepLimiterPhysics')
+    _phys.add(ph)
 
     DD4hep.setPrintLevel(self.printLevel)
 
-- 
GitLab