Skip to content
Snippets Groups Projects
Commit 2f495173 authored by scott snyder's avatar scott snyder
Browse files

JetRecConfig: python 3 fixes

 - Relative imports
 - Comparisons of JetGhost
parent 2c419ac3
No related branches found
No related tags found
No related merge requests found
...@@ -154,7 +154,7 @@ def resolveDependencies(jetdef): ...@@ -154,7 +154,7 @@ def resolveDependencies(jetdef):
# Accumulate prerequisites of the ghost-associated types # Accumulate prerequisites of the ghost-associated types
jetlog.info(" Full list of ghosts: ") 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)) jetlog.info(" " + str(ghostdef))
gprereqs = getGhostPrereqs(ghostdef) gprereqs = getGhostPrereqs(ghostdef)
prereqdict["input"].update( [req.split(':',1)[1] for req in gprereqs] ) prereqdict["input"].update( [req.split(':',1)[1] for req in gprereqs] )
...@@ -263,7 +263,7 @@ def JetInputCfg(inputdeps, configFlags, sequenceName): ...@@ -263,7 +263,7 @@ def JetInputCfg(inputdeps, configFlags, sequenceName):
jetlog.debug("Preparing Constit Mods for label {0} from {1}".format(constit.label,constit.inputname)) jetlog.debug("Preparing Constit Mods for label {0} from {1}".format(constit.label,constit.inputname))
# May need to generate constituent modifier sequences to # May need to generate constituent modifier sequences to
# produce the input collection # produce the input collection
import ConstModHelpers from . import ConstModHelpers
constitalg = ConstModHelpers.getConstitModAlg(constit) constitalg = ConstModHelpers.getConstitModAlg(constit)
if constitalg: if constitalg:
components.addEventAlgo(constitalg) components.addEventAlgo(constitalg)
......
# 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 @@ ...@@ -17,7 +17,7 @@
######################################################################## ########################################################################
# Typical jet constituents # Typical jet constituents
from JetDefinition import xAODType, JetConstit from .JetDefinition import xAODType, JetConstit
from copy import deepcopy from copy import deepcopy
# Topoclusters with origin correction. # Topoclusters with origin correction.
...@@ -53,7 +53,7 @@ TruthWZ = JetConstit(xAODType.TruthParticle,["NoWZ"]) ...@@ -53,7 +53,7 @@ TruthWZ = JetConstit(xAODType.TruthParticle,["NoWZ"])
# Typical jet algorithm definitions # Typical jet algorithm definitions
# Filter pts, ghost lists and modifier lists can be updated by the user, # Filter pts, ghost lists and modifier lists can be updated by the user,
# though there is some risk of overwriting... # though there is some risk of overwriting...
from JetDefinition import JetDefinition from .JetDefinition import JetDefinition
# Standard small-radius (0.4) AntiKt jets # Standard small-radius (0.4) AntiKt jets
AntiKt4LCTopo = JetDefinition("AntiKt",0.4,LCTopoOrigin) AntiKt4LCTopo = JetDefinition("AntiKt",0.4,LCTopoOrigin)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment