From 9dd2fbeb9a2a4db1f932372e04ee0776007f916a Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Fri, 13 Dec 2024 17:28:10 +0100 Subject: [PATCH] DDSim: allow EDM4hep File reader --- DDG4/python/DDSim/DD4hepSimulation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index 2272c1736..e9506cd11 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -49,6 +49,7 @@ ".stdhep", ".slcio", ".HEPEvt", ".hepevt", ".pairs", ".hepmc", + ".root", ] + HEPMC3_SUPPORTED_EXTENSIONS @@ -445,6 +446,9 @@ def run(self): gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/GuineaPig%d" % index) gen.Input = "Geant4EventReaderGuineaPig|" + inputFile gen.Parameters = self.guineapig.getParameters() + elif inputFile.endswith(".root"): + gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/EDM4hep%d" % index) + gen.Input = "EDM4hepFileReader|" + inputFile else: # this should never happen because we already check at the top, but in case of some LogicError... raise RuntimeError("Unknown input file type: %s" % inputFile)