From c5f40f963971955527600c5f9a9824976979b375 Mon Sep 17 00:00:00 2001 From: Benjamin Huth Date: Wed, 21 Aug 2024 15:35:15 +0200 Subject: [PATCH] add check --- Examples/Python/python/acts/examples/simulation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Examples/Python/python/acts/examples/simulation.py b/Examples/Python/python/acts/examples/simulation.py index 3a135b225ad..d3ee7d1b77a 100644 --- a/Examples/Python/python/acts/examples/simulation.py +++ b/Examples/Python/python/acts/examples/simulation.py @@ -609,8 +609,10 @@ def getG4DetectorConstructionFactory( print(e) try: + from acts import geomodel as gm from acts.examples.geant4.geomodel import GeoModelDetectorConstructionFactory - return GeoModelDetectorConstructionFactory(detector, regionList) + if type(detector) is gm.GeoModelTree: + return GeoModelDetectorConstructionFactory(detector, regionList) except Exception as e: print(e)