From 2f495173c43645122ec9b27b7b070d0f7f46e18c Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 20 May 2020 17:47:22 +0200 Subject: [PATCH] JetRecConfig: python 3 fixes - Relative imports - Comparisons of JetGhost --- Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py | 4 ++-- Reconstruction/Jet/JetRecConfig/python/StandardJetDefs.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py index 1af16bd0689..878aed02ad2 100644 --- a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py +++ b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py @@ -154,7 +154,7 @@ def resolveDependencies(jetdef): # Accumulate prerequisites of the ghost-associated types jetlog.info(" Full list of ghosts: ") - for ghostdef in sorted(list(ghostdefs)): + for ghostdef in sorted(list(ghostdefs), key=lambda g: g.inputtype): jetlog.info(" " + str(ghostdef)) gprereqs = getGhostPrereqs(ghostdef) prereqdict["input"].update( [req.split(':',1)[1] for req in gprereqs] ) @@ -263,7 +263,7 @@ def JetInputCfg(inputdeps, configFlags, sequenceName): jetlog.debug("Preparing Constit Mods for label {0} from {1}".format(constit.label,constit.inputname)) # May need to generate constituent modifier sequences to # produce the input collection - import ConstModHelpers + from . import ConstModHelpers constitalg = ConstModHelpers.getConstitModAlg(constit) if constitalg: components.addEventAlgo(constitalg) diff --git a/Reconstruction/Jet/JetRecConfig/python/StandardJetDefs.py b/Reconstruction/Jet/JetRecConfig/python/StandardJetDefs.py index 4db5a37a93f..a79186d6bac 100644 --- a/Reconstruction/Jet/JetRecConfig/python/StandardJetDefs.py +++ b/Reconstruction/Jet/JetRecConfig/python/StandardJetDefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ######################################################################## # # @@ -17,7 +17,7 @@ ######################################################################## # Typical jet constituents -from JetDefinition import xAODType, JetConstit +from .JetDefinition import xAODType, JetConstit from copy import deepcopy # Topoclusters with origin correction. @@ -53,7 +53,7 @@ TruthWZ = JetConstit(xAODType.TruthParticle,["NoWZ"]) # Typical jet algorithm definitions # Filter pts, ghost lists and modifier lists can be updated by the user, # though there is some risk of overwriting... -from JetDefinition import JetDefinition +from .JetDefinition import JetDefinition # Standard small-radius (0.4) AntiKt jets AntiKt4LCTopo = JetDefinition("AntiKt",0.4,LCTopoOrigin) -- GitLab