diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py index f53ba5d5266b711116b7e8380677d50feea1bdef..23e1fa45fa640db11537251c8ee036a2a389fe79 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py @@ -549,15 +549,15 @@ def makeEGammaDFCommon(): EGAugmentationTools.append(TruthEgptIsolationTool) # Compute the truth-particle-level energy density in the central eta region - from EventShapeTools.EventDensityConfig import ( - configEventDensityTool, EventDensityAthAlg) + from EventShapeTools.EventDensityConfig import configEventDensityTool + from AthenaConfiguration.ComponentFactory import CompFactory - # Schedule PseudoJetTruth from JetRecConfig.JetRecConfig import getInputAlgs,getConstitPJGAlg,reOrderAlgs from JetRecConfig.StandardJetConstits import stdConstitDic as cst from AthenaConfiguration.ComponentAccumulator import conf2toConfigurable from AthenaConfiguration.AllConfigFlags import ConfigFlags + # Schedule PseudoJetTruth constit_algs = getInputAlgs(cst.Truth, configFlags=ConfigFlags) constit_algs = reOrderAlgs( [a for a in constit_algs if a is not None]) @@ -588,8 +588,8 @@ def makeEGammaDFCommon(): ) ToolSvc += tf - DerivationFrameworkJob += EventDensityAthAlg("EDTruthCentralAlg", EventDensityTool=tc) - DerivationFrameworkJob += EventDensityAthAlg("EDTruthForwardAlg", EventDensityTool=tf) + DerivationFrameworkJob += CompFactory.EventDensityAthAlg("EDTruthCentralAlg", EventDensityTool=tc) + DerivationFrameworkJob += CompFactory.EventDensityAthAlg("EDTruthForwardAlg", EventDensityTool=tf) # ======================================= # CREATE THE DERIVATION KERNEL ALGORITHM diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py index 0b3043ef113378d960714a6fa49ef4aa7bf689a0..3a77eea619c0131b10c2ef76316fbcb57bdf6609 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py @@ -153,6 +153,10 @@ def addDAODJets(jetlist,sequence): from AthenaConfiguration.ComponentAccumulator import conf2toConfigurable from AthenaConfiguration.AllConfigFlags import ConfigFlags + from JetRecConfig.JetConfigFlags import jetInternalFlags + # This setting implies that jet components failing job condition (ex: truth-related calculation in data job) are automatically removed + jetInternalFlags.isRecoJob = True + for jd in jetlist: algs, jetdef_i = getJetAlgs(ConfigFlags, jd, True) algs = reOrderAlgs( [a for a in algs if a is not None]) diff --git a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py index 04204a9bafebb6342e0974b20c7aa64f5b823cbc..cdf68d4c4a82b61634bc036bdc82c73a2418064b 100644 --- a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py +++ b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py @@ -25,6 +25,7 @@ from AthenaConfiguration.ComponentFactory import CompFactory from JetRecConfig.JetDefinition import JetDefinition, JetInputConstitSeq, JetInputConstit, JetInputExternal from JetRecConfig.JetGrooming import GroomingDefinition from JetRecConfig.DependencyHelper import solveDependencies, solveGroomingDependencies, aliasToModDef +from JetRecConfig.JetConfigFlags import jetInternalFlags __all__ = ["JetRecCfg", "JetInputCfg"] @@ -142,9 +143,9 @@ def getJetDefAlgs(configFlags, jetdef , returnConfiguredDef=False, monTool=None # check if the conditions are compatible with the inputs & modifiers of this jetdef_i. - # if in standardRecoMode we will remove whatever is incompatible and still try to run + # if in reco job we will remove whatever is incompatible and still try to run # if not, we raise an exception - canrun = removeComponentFailingConditions(jetdef_i, raiseOnFailure= not jetdef_i.standardRecoMode) + canrun = removeComponentFailingConditions(jetdef_i, raiseOnFailure= not jetInternalFlags.isRecoJob) if not canrun : if returnConfiguredDef: return [], jetdef_i @@ -205,7 +206,7 @@ def getJetGroomAlgs(configFlags, groomdef, returnConfiguredDef=False, monTool=No groomdef_i._ungroomeddef = ungroomeddef_i # set directly the internal members to avoid complication. This is fine, since we've been cloning definitions. #Filter the modifiers based on the configFlags - removeGroomModifFailingConditions(groomdef_i, configFlags, raiseOnFailure = not groomdef_i.ungroomeddef.standardRecoMode) + removeGroomModifFailingConditions(groomdef_i, configFlags, raiseOnFailure = not jetInternalFlags.isRecoJob) algs += [ getJetRecGroomAlg(groomdef_i, monTool=monTool) ] @@ -300,7 +301,7 @@ def getInputAlgs(jetOrConstitdef, configFlags=None, context="default", monTool=N jetlog.info("Setting up jet inputs from JetInputConstit : "+jetOrConstitdef.name) jetdef = solveDependencies( JetDefinition('Kt', 0., jetOrConstitdef, context=context) ) jetdef._cflags = configFlags - canrun = removeComponentFailingConditions(jetdef, raiseOnFailure= not jetdef.standardRecoMode) + canrun = removeComponentFailingConditions(jetdef, raiseOnFailure = not jetInternalFlags.isRecoJob) if not canrun: return [] else: diff --git a/Reconstruction/Jet/JetRecConfig/python/StandardJetConstits.py b/Reconstruction/Jet/JetRecConfig/python/StandardJetConstits.py index cccc260c15a3fef231c7ced018e89246bf133c25..04ffa09936c3601550e8cb88f4179ebbce2dc35e 100644 --- a/Reconstruction/Jet/JetRecConfig/python/StandardJetConstits.py +++ b/Reconstruction/Jet/JetRecConfig/python/StandardJetConstits.py @@ -112,7 +112,7 @@ _stdInputList = [ JetInputExternal("PrimaryVertices", xAODType.Vertex, prereqs = ["input:InDetTrackParticles"], - filterfn = lambda flags : (flags.Beam.Type == BeamType.Collisions, f"No vertexing with {BeamType.Collisions}"), # should be changed when a reliable "EnableVertexing" flag exists + filterfn = lambda flags : (flags.Beam.Type == BeamType.Collisions, f"No vertexing with {flags.Beam.Type}"), # should be changed when a reliable "EnableVertexing" flag exists ), # No quality criteria are applied to the tracks, used for ghosts for example JetInputExternal("JetSelectedTracks", xAODType.TrackParticle, diff --git a/Reconstruction/Jet/JetRecConfig/python/StandardSmallRJets.py b/Reconstruction/Jet/JetRecConfig/python/StandardSmallRJets.py index a66f7eb60dae3567f77b8e421a1869e1fd7b2c73..8a37a42be522a61ae1b5c54600142d508e428270 100644 --- a/Reconstruction/Jet/JetRecConfig/python/StandardSmallRJets.py +++ b/Reconstruction/Jet/JetRecConfig/python/StandardSmallRJets.py @@ -54,7 +54,6 @@ pflowmods = () AntiKtVR30Rmax4Rmin02PV0Track = JetDefinition("AntiKt", 0.4, cst.PV0Track, modifiers = ("Sort","JetDeltaRLabel:4500","JetGhostLabel","vr"), ptmin=4000, - standardRecoMode = True, VRMinR = 0.02, VRMassSc = 30000, lock = True) @@ -66,8 +65,7 @@ registerAsInputConstit(AntiKtVR30Rmax4Rmin02PV0Track) AntiKt4PV0Track = JetDefinition("AntiKt", 0.4, cst.PV0Track, modifiers = ("Sort",)+truthmods, ptmin=2000, - standardRecoMode = True, - lock = True) + lock = True) # ********************************************************* @@ -78,7 +76,6 @@ AntiKt4PV0Track = JetDefinition("AntiKt", 0.4, cst.PV0Track, AntiKt4EMPFlow = JetDefinition("AntiKt",0.4,cst.GPFlow, ghostdefs = standardghosts+flavourghosts, modifiers = calibmods+("Filter:10000",)+truthmods+standardmods, - standardRecoMode = True, lock = True ) @@ -88,7 +85,6 @@ AntiKt4EMPFlow = JetDefinition("AntiKt",0.4,cst.GPFlow, AntiKt4LCTopo = JetDefinition("AntiKt",0.4,cst.LCTopoOrigin, ghostdefs = standardghosts+flavourghosts, modifiers = calibmods+("Filter_ifnotESD:15000","OriginSetPV")+standardmods+clustermods, - standardRecoMode = True, lock = True, ) @@ -97,7 +93,6 @@ AntiKt4LCTopo = JetDefinition("AntiKt",0.4,cst.LCTopoOrigin, AntiKt4EMTopo = JetDefinition("AntiKt",0.4,cst.EMTopoOrigin, ghostdefs = standardghosts+["TrackLRT"]+flavourghosts, modifiers = calibmods+("Filter:15000",)+truthmods+standardmods+clustermods, - standardRecoMode = True, lock = True, ) @@ -108,7 +103,6 @@ AntiKt4EMPFlowCSSK = JetDefinition("AntiKt",0.4,cst.GPFlowCSSK, ghostdefs = standardghosts+flavourghosts, modifiers = ("ConstitFourMom","CaloEnergies","Sort","Filter:1","JetPtAssociation")+truthmods+standardmods, ptmin = 2000, - standardRecoMode = True, lock = True ) @@ -120,7 +114,6 @@ AntiKt4EMPFlowNoPtCut = JetDefinition("AntiKt",0.4,cst.GPFlow, ghostdefs = standardghosts+flavourghosts, modifiers = calibmods_lowCut+("Filter:2000",)+truthmods+standardmods+("JetPtAssociation",), ptmin = 1, - standardRecoMode = True, lock = True ) @@ -130,7 +123,6 @@ AntiKt4EMTopoNoPtCut = JetDefinition("AntiKt",0.4,cst.EMTopoOrigin, ghostdefs = standardghosts+flavourghosts, modifiers = calibmods_lowCut+("Filter:1",)+truthmods+standardmods+clustermods+("JetPtAssociation",), ptmin = 1, - standardRecoMode = True, lock = True ) @@ -139,7 +131,6 @@ AntiKt4EMPFlowLowPt = JetDefinition("AntiKt",0.4,cst.GPFlow, ghostdefs = standardghosts+flavourghosts, modifiers = calibmods_lowCut+("Filter:2000",)+truthmods+standardmods+("JetPtAssociation",), ptmin = 2000, - standardRecoMode = True, lock = True ) @@ -148,7 +139,6 @@ AntiKt4EMTopoLowPt = JetDefinition("AntiKt",0.4,cst.EMTopoOrigin, ghostdefs = standardghosts+flavourghosts, modifiers = calibmods_lowCut+("Filter:2000",)+truthmods+standardmods+clustermods+("JetPtAssociation",), ptmin = 2000, - standardRecoMode = True, lock = True ) @@ -159,21 +149,18 @@ AntiKt4EMTopoLowPt = JetDefinition("AntiKt",0.4,cst.EMTopoOrigin, AntiKt4Truth = JetDefinition("AntiKt",0.4, cst.Truth, ghostdefs = flavourghosts, modifiers = ("Sort", "Width")+truthmods, - standardRecoMode = True, lock = True, ) AntiKt4TruthWZ = JetDefinition("AntiKt",0.4, cst.TruthWZ, ghostdefs = flavourghosts, modifiers = ("Sort", "Width")+truthmods, - standardRecoMode = True, lock = True, ) AntiKt4TruthDressedWZ = JetDefinition("AntiKt",0.4, cst.TruthDressedWZ, ghostdefs = flavourghosts, modifiers = ("Sort", "Width")+truthmods, - standardRecoMode = True, lock = True, ) @@ -182,7 +169,6 @@ AntiKtVRTruthCharged = JetDefinition("AntiKt",0.4, cst.TruthCharged, modifiers = ("Sort",)+truthmods, VRMinR = 0.02, VRMassSc = 30000, - standardRecoMode = True, lock = True ) diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py index 09abb574caad54d38f7e79ac22e8c3f9c047ee1e..e88761396841aba9792ad5db9fac841409c37fa1 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py @@ -432,7 +432,9 @@ if recAlgs.doEFlow(): if False == jobproperties.eflowRecFlags.usePFFlowElementAssoc: ConfigFlags.PF.useElPhotLinks = False ConfigFlags.PF.useMuLinks = False - +else: + ConfigFlags.Reco.EnablePFlow = False + HIDict = {} if rec.doHeavyIon(): # This is copy from the old style to the new diff --git a/Reconstruction/RecJobTransforms/share/new_jo_raw_reco_aod_digest.ref b/Reconstruction/RecJobTransforms/share/new_jo_raw_reco_aod_digest.ref index f5a9d9a08875410230a0c865ffd4ea6986109295..241347639ca974a60c89e48a6898968f4df0cd8d 100644 --- a/Reconstruction/RecJobTransforms/share/new_jo_raw_reco_aod_digest.ref +++ b/Reconstruction/RecJobTransforms/share/new_jo_raw_reco_aod_digest.ref @@ -1,6 +1,6 @@ run event nTopo nIdTracks nTauTracks nTaus nMuons nElec nTrueElec nFakeElec nPhot nTruePhot nFakePhot - 327265 186524665 510 420 84 10 1 2 0 2 16 0 16 - 327265 186525031 522 439 69 8 1 2 0 2 8 0 8 - 327265 186542447 419 296 24 5 0 2 0 2 7 0 7 - 327265 186543405 511 319 42 7 0 2 0 2 11 0 11 - 327265 186548387 653 514 112 11 0 4 0 4 20 0 20 + 327265 186524665 510 420 233 35 1 2 0 2 16 0 16 + 327265 186525031 522 439 287 42 1 2 0 2 8 0 8 + 327265 186542447 419 296 117 25 0 2 0 2 7 0 7 + 327265 186543405 511 319 176 35 0 2 0 2 11 0 11 + 327265 186548387 653 514 380 48 0 4 0 4 20 0 20 diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsolationSteeringConfig.py b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsolationSteeringConfig.py index d1b12d40fe921d5b1fa8630451be16c8528a3037..ff07ae8c1c83ffaa3556e91ff2dfd060ab10de33 100644 --- a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsolationSteeringConfig.py +++ b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsolationSteeringConfig.py @@ -25,7 +25,7 @@ def IsolationSteeringCfg(flags, name = 'IsolationSteering'): acc.merge(NFlowInputAlgCfg(flags)) acc.merge(DensityForIsoAlgCfg(flags,name='CentralDensityForNFlowIso')) acc.merge(DensityForIsoAlgCfg(flags,name='ForwardDensityForNFlowIso')) - + from IsolationAlgs.IsolationBuilderConfig import egIsolationCfg, muIsolationCfg if flags.Reco.EnableEgamma: acc.merge(egIsolationCfg(flags,name = 'photonIsolation'))