ATLAS Offline Software
xAODRetrieversConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 
7 def xAODElectronRetrieverCfg(flags, **kwargs):
8  result = ComponentAccumulator()
9  the_tool = CompFactory.JiveXML.xAODElectronRetriever(
10  name="xAODElectronRetriever",
11  StoreGateKey="Electrons",
12  OtherCollections=["Electrons"],
13  )
14  result.addPublicTool(the_tool, primary=True)
15  return result
16 
17 
18 def xAODMissingETRetrieverCfg(flags, **kwargs):
19  result = ComponentAccumulator()
20  the_tool = CompFactory.JiveXML.xAODMissingETRetriever(
21  name="xAODMissingETRetriever",
22  FavouriteMETCollection="MET_Reference_AntiKt4EMPFlow",
23  OtherMETCollections=[
24  "MET_Reference_AntiKt4EMTopo",
25  "MET_Calo",
26  "MET_LocHadTopo",
27  "MET_Core_AntiKt4LCTopo",
28  ],
29  )
30  result.addPublicTool(the_tool, primary=True)
31  return result
32 
33 
34 def xAODMuonRetrieverCfg(flags, **kwargs):
35  result = ComponentAccumulator()
36  the_tool = CompFactory.JiveXML.xAODMuonRetriever(
37  name="xAODMuonRetriever", StoreGateKey="Muons", OtherCollections=["Muons"]
38  )
39  result.addPublicTool(the_tool, primary=True)
40  return result
41 
42 
43 def xAODPhotonRetrieverCfg(flags, **kwargs):
44  result = ComponentAccumulator()
45  the_tool = CompFactory.JiveXML.xAODPhotonRetriever(
46  name="xAODPhotonRetriever",
47  StoreGateKey="Photons",
48  OtherCollections=["Photons"],
49  )
50  result.addPublicTool(the_tool, primary=True)
51  return result
52 
53 
54 def xAODJetRetrieverCfg(flags, **kwargs):
55  result = ComponentAccumulator()
56  the_tool = CompFactory.JiveXML.xAODJetRetriever(
57  name="xAODJetRetriever",
58  FavouriteJetCollection="AntiKt4EMPFlowJets",
59  OtherJetCollections=[
60  "AntiKt4EMTopoJets",
61  "AntiKt4LCTopoJets",
62  "AntiKt10LCTopoJets",
63  "AntiKt10UFOCSSKJets",
64  ],
65  BTaggerNames=[
66  "DL1dv01",
67  "GN2v01",
68  ],
69  CDIPaths=[
70  "xAODBTaggingEfficiency/13p6TeV/2023-22-13p6TeV-MC21-CDI_Test_2023-08-1_v1.root",
71  "xAODBTaggingEfficiency/13p6TeV/2023-02_MC23_CDI_GN2v01-noSF.root",
72  ]
73  )
74  result.addPublicTool(the_tool, primary=True)
75  return result
76 
77 
78 def xAODTauRetrieverCfg(flags, **kwargs):
79  result = ComponentAccumulator()
80  the_tool = CompFactory.JiveXML.xAODTauRetriever(
81  name="xAODTauRetriever", StoreGateKey="TauJets"
82  )
83  result.addPublicTool(the_tool, primary=True)
84  return result
85 
86 
87 def xAODTrackParticleRetrieverCfg(flags, **kwargs):
88  result = ComponentAccumulator()
89  the_tool = CompFactory.JiveXML.xAODTrackParticleRetriever(
90  name="xAODTrackParticleRetriever",
91  StoreGateKey="InDetTrackParticles",
92  OtherTrackCollections=[
93  "InDetLargeD0TrackParticles",
94  "CombinedMuonTrackParticles",
95  "GSFTrackParticles",
96  ],
97  )
98  result.addPublicTool(the_tool, primary=True)
99  return result
100 
101 
102 def xAODVertexRetrieverCfg(flags, **kwargs):
103  result = ComponentAccumulator()
104  the_tool = CompFactory.JiveXML.xAODVertexRetriever(
105  name="xAODVertexRetriever",
106  PrimaryVertexCollection="PrimaryVertices",
107  SecondaryVertexCollection="BTagging_AntiKt2TrackSecVtx",
108  )
109  result.addPublicTool(the_tool, primary=True)
110  return result
111 
112 
113 def xAODCaloClusterRetrieverCfg(flags, **kwargs):
114  result = ComponentAccumulator()
115  the_tool = CompFactory.JiveXML.xAODCaloClusterRetriever(
116  name="xAODCaloClusterRetriever",
117  FavouriteClusterCollection="egammaClusters",
118  OtherClusterCollections=["CaloCalTopoClusters"],
119  )
120  result.addPublicTool(the_tool, primary=True)
121  return result
122 
123 
124 def xAODRetrieversCfg(flags):
125  # Based on xAODJiveXML_DataTypes.py
126  result = ComponentAccumulator()
127  tools = []
128  # It's not really necessary to configure these, since nothing depends on flags.
129  # We could just make all this the default in cpp (if it is not already)
130  tools += [result.getPrimaryAndMerge(xAODElectronRetrieverCfg(flags))]
131  tools += [result.getPrimaryAndMerge(xAODMissingETRetrieverCfg(flags))]
132  tools += [result.getPrimaryAndMerge(xAODMuonRetrieverCfg(flags))]
133  tools += [result.getPrimaryAndMerge(xAODPhotonRetrieverCfg(flags))]
134  tools += [result.getPrimaryAndMerge(xAODJetRetrieverCfg(flags))]
135  tools += [result.getPrimaryAndMerge(xAODTauRetrieverCfg(flags))]
136  tools += [result.getPrimaryAndMerge(xAODTrackParticleRetrieverCfg(flags))]
137  tools += [result.getPrimaryAndMerge(xAODVertexRetrieverCfg(flags))]#
138  tools += [result.getPrimaryAndMerge(xAODCaloClusterRetrieverCfg(flags))]
139 
140  return result, tools
xAODRetrieversConfig.xAODJetRetrieverCfg
def xAODJetRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:54
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
xAODRetrieversConfig.xAODMuonRetrieverCfg
def xAODMuonRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:34
xAODRetrieversConfig.xAODTrackParticleRetrieverCfg
def xAODTrackParticleRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:87
xAODRetrieversConfig.xAODVertexRetrieverCfg
def xAODVertexRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:102
xAODRetrieversConfig.xAODPhotonRetrieverCfg
def xAODPhotonRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:43
xAODRetrieversConfig.xAODRetrieversCfg
def xAODRetrieversCfg(flags)
Definition: xAODRetrieversConfig.py:124
xAODRetrieversConfig.xAODTauRetrieverCfg
def xAODTauRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:78
xAODRetrieversConfig.xAODElectronRetrieverCfg
def xAODElectronRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:7
xAODRetrieversConfig.xAODMissingETRetrieverCfg
def xAODMissingETRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:18
xAODRetrieversConfig.xAODCaloClusterRetrieverCfg
def xAODCaloClusterRetrieverCfg(flags, **kwargs)
Definition: xAODRetrieversConfig.py:113