ATLAS Offline Software
MissingETAssociationMap_v1.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef XAODMISSINGET_VERSIONS_MISSINGETASSOCIATIONMAP_V1_H
8 #define XAODMISSINGET_VERSIONS_MISSINGETASSOCIATIONMAP_V1_H
9 
11 
12 #include "xAODJet/Jet.h"
14 
15 #include <string>
16 #include <vector>
17 #include <map>
18 
19 #include <iostream>
20 
21 namespace xAOD
22 {
23 
24  // Forward declarations
25  class MissingETAssociation_v1;
26  class MissingETAssociationHelper;
27 
28  class MissingETAssociationMap_v1 : public DataVector<MissingETAssociation_v1>
29  {
30  public:
31 
40 
50  const_iterator find(const Jet* pJet) const;
58  iterator find(const Jet* pJet);
59  size_t findIndex(const Jet* pJet) const;
60  //
68  const_iterator findByJetConst(const IParticle* pConst) const;
76  iterator findByJetConst(const IParticle* pConst);
93  size_t findIndexByJetConst(const IParticle* pConst) const;
94  size_t findIndexByJetConst(const ElementLink<IParticleContainer>& pConstLink) const;
111  bool setJetConstituents(const Jet* pJet);
119  bool setJetConstituents(const std::vector<ElementLink<IParticleContainer> >& constLinks, const Jet* pJet);
127  bool setJetConstituents(const std::vector<ElementLink<IParticleContainer> >& constLinks, size_t jetIndex);
133  bool identifyOverlaps();
134  void clearOverlaps();
153  protected:
154 
155  void f_setJetConstMap(std::map<ElementLink<IParticleContainer>, size_t> map);
156  void f_clearJetConstMap();
157  std::map<ElementLink<IParticleContainer>, size_t> m_jetConstLinks;
174  const_iterator f_findConst(const Jet* pJet) const;
175  iterator f_find(const Jet* pJet);
179  }; // class xAOD::MissingETAssociationMap_v1
180 } // namespace xAOD
181 
182 #include "xAODCore/BaseInfo.h"
184 
185 #endif
xAOD::MissingETAssociationMap_v1::setJetConstituents
bool setJetConstituents(const Jet *pJet)
Set constituent map for a jet.
Definition: MissingETAssociationMap_v1.cxx:103
xAOD::MissingETAssociationMap_v1::findIndexByJetConst
size_t findIndexByJetConst(const IParticle *pConst) const
Definition: MissingETAssociationMap_v1.cxx:161
Jet.h
xAOD::MissingETAssociationMap_v1::m_jetConstLinks
std::map< ElementLink< IParticleContainer >, size_t > m_jetConstLinks
Map jet constituents to the jet index.
Definition: MissingETAssociationMap_v1.h:157
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::MissingETAssociation_v1
MET association descriptor contains object links and corresponding parameters.
Definition: MissingETAssociation_v1.h:29
xAOD::MissingETAssociationMap_v1::getOverlapRemovedSignals
const IParticleContainer * getOverlapRemovedSignals(const MissingETAssociationHelper &helper, const IParticleContainer *signals, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::TrackCluster) const
Extract a container of constituents that do not overlap physics objects.
Definition: MissingETAssociationMap_v1.cxx:269
BaseInfo.h
SG::DEFAULT_TRACK_INDICES
@ DEFAULT_TRACK_INDICES
Default value.
Definition: IndexTrackingPolicy.h:40
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
MissingETAssociation_v1.h
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::MissingETAssociationMap_v1::f_findConst
const_iterator f_findConst(const Jet *pJet) const
Find contribution by reference jet pointer.
Definition: MissingETAssociationMap_v1.cxx:72
xAOD::MissingETAssociationMap_v1
Definition: MissingETAssociationMap_v1.h:29
SG::OwnershipPolicy
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
Definition: OwnershipPolicy.h:16
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
xAOD::MissingETAssociationMap_v1::MissingETAssociationMap_v1
MissingETAssociationMap_v1(SG::OwnershipPolicy own=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
Default constructor.
Definition: MissingETAssociationMap_v1.cxx:31
xAOD::MissingETAssociationMap_v1::f_clearJetConstMap
void f_clearJetConstMap()
Definition: MissingETAssociationMap_v1.cxx:98
xAOD::MissingETAssociationMap_v1::f_setJetConstMap
void f_setJetConstMap(std::map< ElementLink< IParticleContainer >, size_t > map)
Definition: MissingETAssociationMap_v1.cxx:92
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::MissingETAssociationMap_v1::findIndex
size_t findIndex(const Jet *pJet) const
Definition: MissingETAssociationMap_v1.cxx:60
xAOD::MissingETAssociationMap_v1::~MissingETAssociationMap_v1
virtual ~MissingETAssociationMap_v1()
Base class destructor.
Definition: MissingETAssociationMap_v1.cxx:43
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
SG::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: OwnershipPolicy.h:17
xAOD::MissingETAssociationMap_v1::find
const_iterator find(const Jet *pJet) const
Find association from jet pointer.
Definition: MissingETAssociationMap_v1.cxx:50
xAOD::MissingETAssociationMap_v1::getUniqueSignals
const IParticleContainer * getUniqueSignals(const IParticleContainer *signals, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::TrackCluster) const
Extract a container of constituents that are not in jets.
Definition: MissingETAssociationMap_v1.cxx:218
xAOD::MissingETAssociationMap_v1::findByJetConst
const_iterator findByJetConst(const IParticle *pConst) const
Find association from jet constituent.
Definition: MissingETAssociationMap_v1.cxx:127
xAOD::MissingETAssociationMap_v1::getMiscAssociation
const MissingETAssociation_v1 * getMiscAssociation() const
Get an association for miscellaneous objects not associated to jets.
Definition: MissingETAssociationMap_v1.cxx:186
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
python.L1.Config.LegacyTopoMergerMap.signals
signals
Definition: LegacyTopoMergerMap.py:13
MissingETBase::UsageHandler::TrackCluster
@ TrackCluster
Both cluster and track based.
Definition: MissingETCompositionBase.h:186
MissingETBase::UsageHandler::Policy
Policy
Policies on usage checks.
Definition: MissingETCompositionBase.h:182
SG_BASE
SG_BASE(xAOD::MissingETAssociationMap_v1, DataVector< xAOD::MissingETAssociation_v1 >)
xAOD::MissingETAssociationMap_v1::f_find
iterator f_find(const Jet *pJet)
Definition: MissingETAssociationMap_v1.cxx:80
xAOD::MissingETAssociationMap_v1::identifyOverlaps
bool identifyOverlaps()
Do overlap-finding in all associations.
Definition: MissingETAssociationMap_v1.cxx:202
xAOD::MissingETAssociationHelper
Definition: MissingETAssociationHelper.h:26
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
xAOD::MissingETAssociationMap_v1::clearOverlaps
void clearOverlaps()
Definition: MissingETAssociationMap_v1.cxx:211
DeMoScan.first
bool first
Definition: DeMoScan.py:536
SG::IndexTrackingPolicy
IndexTrackingPolicy
Definition: IndexTrackingPolicy.h:37