ATLAS Offline Software
METElectronAssociator.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // METElectronAssociator.cxx
8 // Implementation file for class METElectronAssociator
9 //
10 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
11 //
12 // Author: P Loch, S Resconi, TJ Khoo, AS Mete
14 
15 // METReconstruction includes
17 
18 // Egamma EDM
20 #include "xAODEgamma/Photon.h"
21 
22 namespace met {
23 
24  using namespace xAOD;
25 
26  // Constructors
29  AsgTool(name),
32  {
33  }
34 
35  // Athena algtool's Hooks
38  {
39  ATH_MSG_VERBOSE ("Initializing " << name() << "...");
42 
43  if (m_usePFOLinks) {
48  }
49  if (m_useFELinks) {
54  }
55 
56  return StatusCode::SUCCESS;
57  }
58 
59 
60  // executeTool
63  {
64  ATH_MSG_VERBOSE ("In execute: " << name() << "...");
65 
67  if (!elCont.isValid()) {
68  ATH_MSG_WARNING("Unable to retrieve input electron container " << m_elContKey.key());
69  return StatusCode::FAILURE;
70  }
71 
72  ATH_MSG_DEBUG("Successfully retrieved electron collection");
73  if (fillAssocMap(metMap,elCont.cptr()).isFailure()) {
74  ATH_MSG_WARNING("Unable to fill map with electron container " << m_elContKey.key());
75  return StatusCode::FAILURE;
76  }
77 
78  return StatusCode::SUCCESS;
79  }
80 
81 }
met::METAssociator::m_neutralPFOLinksKey
std::string m_neutralPFOLinksKey
Definition: METAssociator.h:91
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
met::METAssociator::m_useFELinks
bool m_useFELinks
Definition: METAssociator.h:94
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
met::METEgammaAssociator::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: METEgammaAssociator.cxx:60
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
met::METAssociator::m_chargedPFOLinksKey
std::string m_chargedPFOLinksKey
Definition: METAssociator.h:92
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAOD::MissingETAssociationMap_v1
Definition: MissingETAssociationMap_v1.h:29
met
Definition: IMETSignificance.h:24
ElectronContainer.h
Photon.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
met::METElectronAssociator::METElectronAssociator
METElectronAssociator()
Default constructor:
met::METElectronAssociator::executeTool
StatusCode executeTool(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const final
Definition: METElectronAssociator.cxx:62
met::METAssociator::m_neutralFELinksKey
std::string m_neutralFELinksKey
Definition: METAssociator.h:89
met::METAssociator::m_chargedFELinksKey
std::string m_chargedFELinksKey
Definition: METAssociator.h:90
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
met::METEgammaAssociator::m_electronNeutralFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronNeutralFEReadDecorKey
Definition: METEgammaAssociator.h:111
met::METElectronAssociator::m_elContKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_elContKey
Definition: METElectronAssociator.h:56
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
met::METEgammaAssociator::m_electronNeutralPFOReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronNeutralPFOReadDecorKey
Definition: METEgammaAssociator.h:109
met::METAssociator
Definition: METAssociator.h:55
xAOD::MissingETContainer_v1
Container for xAOD::MissingET_v1 objects.
Definition: MissingETContainer_v1.h:21
met::METEgammaAssociator::m_electronChargedFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronChargedFEReadDecorKey
Definition: METEgammaAssociator.h:112
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
met::METAssociator::fillAssocMap
virtual StatusCode fillAssocMap(xAOD::MissingETAssociationMap *metMap, const xAOD::IParticleContainer *hardObjs) const
Definition: METAssociator.cxx:295
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
met::METEgammaAssociator
Definition: METEgammaAssociator.h:30
met::METAssociator::m_usePFOLinks
bool m_usePFOLinks
Definition: METAssociator.h:93
met::METElectronAssociator::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: METElectronAssociator.cxx:37
met::METEgammaAssociator::m_electronChargedPFOReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronChargedPFOReadDecorKey
Definition: METEgammaAssociator.h:110
METElectronAssociator.h