diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index f037833f8..4fd0f2b51 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)