From 7a69dec81b81be2fed3887563d29d42d61ca36b7 Mon Sep 17 00:00:00 2001 From: williams <sarah.louise.williams@cern.ch> Date: Thu, 6 Aug 2020 14:02:40 +0100 Subject: [PATCH] Trying to fix weird merges --- Control/AthenaConfiguration/python/AllConfigFlags.py | 10 +++++----- .../Jet/JetRecConfig/python/JetDefinition.py | 11 ++++++----- .../Jet/JetRecConfig/python/JetRecConfig.py | 10 ++++------ 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py index 91c332daaac..d72c5c885a4 100644 --- a/Control/AthenaConfiguration/python/AllConfigFlags.py +++ b/Control/AthenaConfiguration/python/AllConfigFlags.py @@ -182,16 +182,16 @@ def _createCfgFlags(): return createEgammaConfigFlags() _addFlagsCategory(acf, "Egamma", __egamma, 'egammaConfig' ) - def __pflow(): - from eflowRec.PFConfigFlags import createPFConfigFlags - return createPFConfigFlags() - _addFlagsCategory(acf,"PF",__pflow, 'eflowRec') - def __met(): from METReconstruction.METConfigFlags import createMETConfigFlags return createMETConfigFlags() _addFlagsCategory(acf,"MET",__met, 'METReconstruction') + def __pflow(): + from eflowRec.PFConfigFlags import createPFConfigFlags + return createPFConfigFlags() + _addFlagsCategory(acf,"PF",__pflow, 'eflowRec') + def __btagging(): from BTagging.BTaggingConfigFlags import createBTaggingConfigFlags return createBTaggingConfigFlags() diff --git a/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py b/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py index 9c72b6063f8..b492a539e4e 100644 --- a/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py +++ b/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py @@ -110,7 +110,12 @@ class JetConstit(object): # Jets could specify a filter e.g. pt cut or JVT?? modstring = "" if self.__modifiers: - modstring = "".join(self.__modifiers) + for mod in self.__modifiers: + # Handle special case of topocluster state + if mod in ["EM","LC"]: + self.label += mod + else: + modstring += mod self.label += labelnames[self.basetype] if self.basetype!=xAODType.Jet: @@ -118,10 +123,6 @@ class JetConstit(object): if self.basetype==xAODType.TruthParticle: self.label = self.label.replace("NoWZ","WZ") - if self.basetype==xAODType.CaloCluster: - self.label = self.label.replace("TopoEM","EMTopo") - self.label = self.label.replace("TopoLC","LCTopo") - containernames = { xAODType.CaloCluster: "TopoClusters", xAODType.ParticleFlow: "ParticleFlowObjects", diff --git a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py index 55dd9f7e4f7..a660b656524 100644 --- a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py +++ b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py @@ -65,14 +65,12 @@ def JetRecCfg(jetdef, configFlags, jetnameprefix="",jetnamesuffix="", jetnameove # will handle the details. Just merge the components. # # To facilitate running in serial mode, we also prepare - # the constituent PseudoJetAlgorithm here (needed for rho) inputcomps = JetInputCfg(deps["inputs"], configFlags, sequenceName=jetsfullname) - constitpjalg = inputcomps.getPrimary() constitpjkey = constitpjalg.OutputContainer - components.merge(inputcomps,sequencename) + components.merge(inputcomps) pjs = [constitpjkey] # Schedule the ghost PseudoJetAlgs @@ -248,13 +246,13 @@ def getEventShapeAlg( constit, constitpjkey, nameprefix="" ): # # This includes constituent modifications, track selection, copying of # input truth particles and event density calculations -def JetInputCfg(inputdeps, configFlags): +def JetInputCfg(inputdeps, configFlags, sequenceName): jetlog.info("Setting up jet inputs.") - components = ComponentAccumulator() + components = ComponentAccumulator(sequenceName) jetlog.info("Inspecting input file contents") filecontents = configFlags.Input.Collections - + constit = inputdeps[0] # Truth and track particle inputs are handled later if constit.basetype not in [xAODType.TruthParticle, xAODType.TrackParticle] and constit.inputname!=constit.rawname: -- GitLab