5#ifndef ASSOCIATIONUTILS_FEASSOCIATIONTOOL_H
6#define ASSOCIATIONUTILS_FEASSOCIATIONTOOL_H
13#ifndef XAOD_STANDALONE
29#include <unordered_map>
30#include <unordered_set>
35namespace ADD_CMODE(ORUtils)
39 virtual public IFEAssociationTool
44 FEAssociationTool(
const std::string& name);
45 virtual ~FEAssociationTool()
override =
default;
49#ifndef XAOD_STANDALONE
50 virtual StatusCode buildAssociations(
const EventContext& ctx)
const override;
52 virtual StatusCode buildAssociations()
override;
74 std::unordered_set<const xAOD::FlowElement*> cSet;
75 std::unordered_set<const xAOD::FlowElement*> nSet;
91 bool operator==(
const PairKey& o)
const noexcept;
96 std::size_t
operator()(
const PairKey& k)
const noexcept;
113#ifndef XAOD_STANDALONE
114 virtual StatusCode collectObjects(
const EventContext& ctx,
115 std::vector<ObjView>& objects)
const;
117 virtual StatusCode collectObjects(std::vector<ObjView>& objects)
const;
120#ifndef XAOD_STANDALONE
121 void collectFEsFromIndex(
const EventContext& ctx,
122 const ObjView::Type type,
125 ObjView& view)
const;
127 void collectFEsFromIndex(
const ObjView::Type type,
130 ObjView& view)
const;
133#ifndef XAOD_STANDALONE
134 virtual StatusCode buildMapFromPairs(
const EventContext& ctx,
135 const std::vector<ObjView>& objects)
const;
137 virtual StatusCode buildMapFromPairs(
const std::vector<ObjView>& objects);
140 SG::ReadHandleKey<xAOD::ElectronContainer> m_elKey{
141 this,
"ElectronContainer",
"Electrons",
"Input electron container"
143 SG::ReadHandleKey<xAOD::MuonContainer> m_muKey{
144 this,
"MuonContainer",
"Muons",
"Input muon container"
146 SG::ReadHandleKey<xAOD::PhotonContainer> m_phKey{
147 this,
"PhotonContainer",
"Photons",
"Input photon container"
149 SG::ReadHandleKey<xAOD::TauJetContainer> m_tauKey{
150 this,
"TauContainer",
"TauJets",
"Input tau container"
152 SG::ReadHandleKey<xAOD::JetContainer> m_srjKey{
153 this,
"SmallRJetContainer",
"AntiKt4EMPFlowJets",
"Input small-R jet container"
155 SG::ReadHandleKey<xAOD::JetContainer> m_lrjKey{
156 this,
"LargeRJetContainer",
"AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
"Input large-R jet container"
159#ifndef XAOD_STANDALONE
160 SG::ReadDecorHandleKey<xAOD::ElectronContainer> m_elChargedFELinksKey{
161 this,
"ElectronChargedFELinksDecorKey",
162 "Electrons.chargedGlobalFELinks",
163 "Electron charged global FE links decoration"
165 SG::ReadDecorHandleKey<xAOD::ElectronContainer> m_elNeutralFELinksKey{
166 this,
"ElectronNeutralFELinksDecorKey",
167 "Electrons.neutralGlobalFELinks",
168 "Electron neutral global FE links decoration"
171 SG::ReadDecorHandleKey<xAOD::MuonContainer> m_muChargedFELinksKey{
172 this,
"MuonChargedFELinksDecorKey",
173 "Muons.chargedGlobalFELinks",
174 "Muon charged global FE links decoration"
176 SG::ReadDecorHandleKey<xAOD::MuonContainer> m_muNeutralFELinksKey{
177 this,
"MuonNeutralFELinksDecorKey",
178 "Muons.neutralGlobalFELinks",
179 "Muon neutral global FE links decoration"
182 SG::ReadDecorHandleKey<xAOD::PhotonContainer> m_phChargedFELinksKey{
183 this,
"PhotonChargedFELinksDecorKey",
184 "Photons.chargedGlobalFELinks",
185 "Photon charged global FE links decoration"
187 SG::ReadDecorHandleKey<xAOD::PhotonContainer> m_phNeutralFELinksKey{
188 this,
"PhotonNeutralFELinksDecorKey",
189 "Photons.neutralGlobalFELinks",
190 "Photon neutral global FE links decoration"
193 SG::ReadDecorHandleKey<xAOD::TauJetContainer> m_tauChargedFELinksKey{
194 this,
"TauChargedFELinksDecorKey",
195 "TauJets.chargedGlobalFELinks",
196 "Tau charged global FE links decoration"
198 SG::ReadDecorHandleKey<xAOD::TauJetContainer> m_tauNeutralFELinksKey{
199 this,
"TauNeutralFELinksDecorKey",
200 "TauJets.neutralGlobalFELinks",
201 "Tau neutral global FE links decoration"
204 SG::ReadDecorHandleKey<xAOD::JetContainer> m_srjChargedFELinksKey{
205 this,
"SmallRJetChargedFELinksDecorKey",
206 "AntiKt4EMPFlowJets.chargedGlobalFELinks",
207 "Small-R jet charged global FE links decoration"
209 SG::ReadDecorHandleKey<xAOD::JetContainer> m_srjNeutralFELinksKey{
210 this,
"SmallRJetNeutralFELinksDecorKey",
211 "AntiKt4EMPFlowJets.neutralGlobalFELinks",
212 "Small-R jet neutral global FE links decoration"
215 SG::ReadDecorHandleKey<xAOD::JetContainer> m_lrjChargedFELinksKey{
216 this,
"LargeRJetChargedFELinksDecorKey",
217 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.chargedGlobalFELinks",
218 "Large-R jet charged global FE links decoration"
220 SG::ReadDecorHandleKey<xAOD::JetContainer> m_lrjNeutralFELinksKey{
221 this,
"LargeRJetNeutralFELinksDecorKey",
222 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.neutralGlobalFELinks",
223 "Large-R jet neutral global FE links decoration"
226 SG::ReadDecorHandleKey<xAOD::FlowElementContainer> m_chargedOriginalObjectLinkKey{
227 this,
"ChargedOriginalObjectLinkDecorKey",
228 "CHSGChargedParticleFlowObjects.originalObjectLink",
229 "Charged FlowElement originalObjectLink decoration"
232 SG::ReadDecorHandleKey<xAOD::FlowElementContainer> m_neutralOriginalObjectLinkKey{
233 this,
"NeutralOriginalObjectLinkDecorKey",
234 "CHSGNeutralParticleFlowObjects.originalObjectLink",
235 "Neutral FlowElement originalObjectLink decoration"
238 SG::ReadDecorHandleKey<xAOD::FlowElementContainer> m_lrchargedOriginalObjectLinkKey{
239 this,
"ChargedLROriginalObjectLinkDecorKey",
240 "CSSKGChargedParticleFlowObjects.originalObjectLink",
241 "Charged large-R FlowElement originalObjectLink decoration"
244 SG::ReadDecorHandleKey<xAOD::FlowElementContainer> m_lrneutralOriginalObjectLinkKey{
245 this,
"NeutralLROriginalObjectLinkDecorKey",
246 "CSSKGNeutralParticleFlowObjects.originalObjectLink",
247 "Neutral large-R FlowElement originalObjectLink decoration"
251 SG::WriteHandleKey<xAOD::MissingETAssociationMap> m_outputMapKey{
252 this,
"OutputMap",
"FEAssociationMap",
"Output MissingETAssociationMap"