diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py b/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py index 08bcc38ffc54562f90444bfeaed0c35ce18e5c30..6f7478c462fb631db72596e8d3ee9d0a220e3418 100644 --- a/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py +++ b/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py @@ -87,9 +87,12 @@ def FaserTruthServiceCfg(ConfigFlags, name="FaserISF_TruthService", **kwargs): kwargs.setdefault('SkipIfNoChildren', True) kwargs.setdefault('SkipIfNoParentBarcode', True) - import ROOT, cppyy - cppyy.loadDictionary('FaserDetDescrDict') - FaserRegion = ROOT.FaserDetDescr + import PyUtils.RootUtils as rootUtils + ROOT = rootUtils.import_root() + + import cppyy + cppyy.load_library('FaserDetDescrDict') + from ROOT.FaserDetDescr import FaserRegion kwargs.setdefault('ForceEndVtxInRegions', [FaserRegion.fFaserNeutrino, FaserRegion.fFaserScintillator, diff --git a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py index 5555ef8ba30741c6892fbe82079fc10ed98d8487..4d84c137bf0bc566fb530127c5304d9d4332eb8a 100644 --- a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py +++ b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py @@ -155,9 +155,12 @@ def FaserParticleGenericFilterCfg(ConfigFlags, name="ISF_FaserGenericFilter", ** def FaserDipoleTruthStrategyCfg(ConfigFlags, name="ISF_FaserDipoleTruthStrategy", **kwargs): result = ComponentAccumulator() - import ROOT, cppyy - cppyy.loadDictionary('FaserDetDescrDict') - FaserRegion = ROOT.FaserDetDescr + + import PyUtils.RootUtils as rootUtils + ROOT = rootUtils.import_root() + import cppyy + cppyy.load_library('FaserDetDescrDict') + from ROOT.FaserDetDescr import FaserRegion # # Save truth in Dipole region # @@ -170,9 +173,13 @@ def FaserDipoleTruthStrategyCfg(ConfigFlags, name="ISF_FaserDipoleTruthStrategy" def FaserTruthStrategyCfg(ConfigFlags, name="ISF_FaserTruthStrategy", **kwargs): result = ComponentAccumulator() - import ROOT, cppyy - cppyy.loadDictionary('FaserDetDescrDict') - FaserRegion = ROOT.FaserDetDescr + + import PyUtils.RootUtils as rootUtils + ROOT = rootUtils.import_root() + + import cppyy + cppyy.load_library('FaserDetDescrDict') + from ROOT.FaserDetDescr import FaserRegion # # Save truth in all regions except Dipole #