From b874b411b426ccc22bb23b17622471ce72547072 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Wed, 1 Aug 2018 13:09:11 +0200
Subject: [PATCH] ddsim: fix bug when using a UserParticleHandler

---
 DDG4/python/DDSim/DD4hepSimulation.py       | 2 +-
 DDG4/python/DDSim/Helper/ParticleHandler.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py
index 0548a71f4..5a8c7d752 100644
--- a/DDG4/python/DDSim/DD4hepSimulation.py
+++ b/DDG4/python/DDSim/DD4hepSimulation.py
@@ -418,7 +418,7 @@ class DD4hepSimulation(object):
     if self.part.enableDetailedHitsAndParticleInfo:
       self.part.setDumpDetailedParticleInfo( kernel, DDG4 )
 
-    self.part.setupUserParticleHandler(part)
+    self.part.setupUserParticleHandler(part, kernel, DDG4)
 
     #=================================================================================
 
diff --git a/DDG4/python/DDSim/Helper/ParticleHandler.py b/DDG4/python/DDSim/Helper/ParticleHandler.py
index aaabea68f..5b0ee9a7c 100644
--- a/DDG4/python/DDSim/Helper/ParticleHandler.py
+++ b/DDG4/python/DDSim/Helper/ParticleHandler.py
@@ -102,7 +102,7 @@ class ParticleHandler( ConfigHelper ):
     kernel.eventAction().adopt(evt)
     evt.enableUI()
 
-  def setupUserParticleHandler(self, part):
+  def setupUserParticleHandler(self, part, kernel, DDG4):
     """Create the UserParticleHandler and configure it.
 
     FIXME: this is not extensible at the moment
-- 
GitLab