ATLAS Offline Software
configureRecoForPFlow.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
4 
5  #Given we rebuild topoclusters from the ESD, we should also redo the matching between topoclusters and muon clusters.
6  #The resulting links are used to create the global GPF muon-FE links.
7  from AthenaConfiguration.ComponentFactory import CompFactory
8  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9  cfg = ComponentAccumulator()
10  cfg.addEventAlgo(CompFactory.ClusterMatching.CaloClusterMatchLinkAlg("MuonTCLinks", ClustersToDecorate="MuonClusterCollection"))
11 
12  from JetRecConfig.JetRecConfig import JetRecCfg
13  from JetRecConfig.StandardSmallRJets import AntiKt4EMPFlow, AntiKt4LCTopo
14  cfg.merge( JetRecCfg(cfgFlags,AntiKt4EMPFlow) )
15  cfg.merge( JetRecCfg(cfgFlags,AntiKt4LCTopo) )
16 
17  #Now do MET config
18 
19  #The MET soft term needs the EM and LC origin topoclusters.
20  #Since we rebuilt the topoclusters, we must also rebuild these.
21  from JetRecConfig.JetRecConfig import JetInputCfg
22  from JetRecConfig.StandardJetConstits import stdConstitDic as cst
23  cfg.merge(JetInputCfg(cfgFlags,cst.EMTopoOrigin))
24  cfg.merge(JetInputCfg(cfgFlags,cst.LCTopoOrigin))
25 
26  from eflowRec.PFCfg import PFGlobalFlowElementLinkingCfg
27  cfg.merge(PFGlobalFlowElementLinkingCfg(cfgFlags))
28 
29  from tauRec.TauConfig import TauReconstructionCfg
30  cfg.merge(TauReconstructionCfg(cfgFlags))
31 
32  from eflowRec.PFTauRemaps import PFTauRemaps
33  tauRemaps = PFTauRemaps()
34  for mapping in tauRemaps:
35  cfg.merge(mapping)
36 
37  #Now build the pflow MET association map and then add the METMaker algorithm
38  from METReconstruction.METAssociatorCfg import METAssociatorCfg
39  cfg.merge(METAssociatorCfg(cfgFlags, 'AntiKt4EMPFlow'))
40 
41  from METUtilities.METMakerConfig import getMETMakerAlg
42  metCA=ComponentAccumulator()
43  metCA.addEventAlgo(getMETMakerAlg('AntiKt4EMPFlow'))
44  cfg.merge(metCA)
45 
46  #This is needed to ensure the convertor is correctly configured for each LHC period
47  #Otherwise a default convertor is provided that is not correctly configured for e.g Run4
48  from TrkEventCnvTools.TrkEventCnvToolsConfig import TrkEventCnvSuperToolCfg
49  cfg.merge(TrkEventCnvSuperToolCfg(cfgFlags))
50 
51  #Add metadata data to xAOD such that we can create physval.root from the output AOD
52  from AthenaConfiguration.Enums import MetadataCategory
53  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
54 
55  cfg.merge(
57  cfgFlags,
58  "AOD",
59  createMetadata=[
60  MetadataCategory.ByteStreamMetaData,
61  MetadataCategory.LumiBlockMetaData,
62  MetadataCategory.TruthMetaData,
63  MetadataCategory.IOVMetaData,
64  ],
65  )
66  )
67 
68 
69  return cfg
70 
configureRecoForPFlow.configureRecoForPFlowCfg
def configureRecoForPFlowCfg(cfgFlags)
Definition: configureRecoForPFlow.py:3
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
METMakerConfig.getMETMakerAlg
def getMETMakerAlg(suffix, jetSelection="Tier0", jetColl="")
Definition: METMakerConfig.py:41
METAssociatorCfg
Definition: METAssociatorCfg.py:1
python.TrkEventCnvToolsConfig.TrkEventCnvSuperToolCfg
def TrkEventCnvSuperToolCfg(flags, name='EventCnvSuperTool', **kwargs)
Definition: TrkEventCnvToolsConfig.py:51
TauConfig.TauReconstructionCfg
def TauReconstructionCfg(flags)
Definition: TauConfig.py:261
python.JetRecConfig.JetRecCfg
def JetRecCfg(flags, jetdef, returnConfiguredDef=False)
Top level functions returning ComponentAccumulator out of JetDefinition.
Definition: JetRecConfig.py:36
PFTauRemaps
Definition: PFTauRemaps.py:1
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:219
JetRecAlgTestCfg.JetInputCfg
def JetInputCfg(flags)
Definition: JetRecAlgTestCfg.py:44
PFCfg.PFGlobalFlowElementLinkingCfg
def PFGlobalFlowElementLinkingCfg(inputFlags, **kwargs)
Definition: PFCfg.py:468