ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
MET
METReconstruction
Root
METElectronAssociator.cxx
Go to the documentation of this file.
1
2
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
16
#include "
METReconstruction/METElectronAssociator.h
"
17
18
// Egamma EDM
19
#include "
xAODEgamma/ElectronContainer.h
"
20
#include "
xAODEgamma/Photon.h
"
21
22
namespace
met
{
23
24
using namespace
xAOD;
25
26
// Constructors
28
METElectronAssociator::METElectronAssociator
(
const
std::string&
name
) :
29
AsgTool
(
name
),
30
METAssociator
(
name
),
31
METEgammaAssociator
(
name
)
32
{
33
}
34
35
// Athena algtool's Hooks
37
StatusCode
METElectronAssociator::initialize
()
38
{
39
ATH_MSG_VERBOSE
(
"Initializing "
<<
name
() <<
"..."
);
40
ATH_CHECK
(
m_elContKey
.initialize());
41
ATH_CHECK
(
METEgammaAssociator::initialize
() );
42
43
ATH_CHECK
(
m_electronNeutralPFOReadDecorKey
.initialize(
m_usePFOLinks
));
44
ATH_CHECK
(
m_electronChargedPFOReadDecorKey
.initialize(
m_usePFOLinks
));
45
ATH_CHECK
(
m_electronNeutralFEReadDecorKey
.initialize(
m_useFELinks
));
46
ATH_CHECK
(
m_electronChargedFEReadDecorKey
.initialize(
m_useFELinks
));
47
ATH_CHECK
(
m_photonNeutralPFOReadDecorKey
.initialize(
false
));
48
ATH_CHECK
(
m_photonChargedPFOReadDecorKey
.initialize(
false
));
49
ATH_CHECK
(
m_photonNeutralFEReadDecorKey
.initialize(
false
));
50
ATH_CHECK
(
m_photonChargedFEReadDecorKey
.initialize(
false
));
51
52
return
StatusCode::SUCCESS;
53
}
54
55
56
// executeTool
58
StatusCode
METElectronAssociator::executeTool
(
xAOD::MissingETContainer
*
/*metCont*/
,
xAOD::MissingETAssociationMap
* metMap,
const
EventContext& ctx)
const
59
{
60
ATH_MSG_VERBOSE
(
"In execute: "
<<
name
() <<
"..."
);
61
62
SG::ReadHandle<xAOD::ElectronContainer>
elCont(
m_elContKey
, ctx);
63
if
(!elCont.
isValid
()) {
64
ATH_MSG_WARNING
(
"Unable to retrieve input electron container "
<<
m_elContKey
.key());
65
return
StatusCode::FAILURE;
66
}
67
68
ATH_MSG_DEBUG
(
"Successfully retrieved electron collection"
);
69
if
(
fillAssocMap
(metMap,elCont.
cptr
(), ctx).isFailure()) {
70
ATH_MSG_WARNING
(
"Unable to fill map with electron container "
<<
m_elContKey
.key());
71
return
StatusCode::FAILURE;
72
}
73
74
return
StatusCode::SUCCESS;
75
}
76
77
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ElectronContainer.h
Photon.h
METElectronAssociator.h
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
met::METAssociator
Definition
METAssociator.h:51
met::METAssociator::m_useFELinks
Gaudi::Property< bool > m_useFELinks
Definition
METAssociator.h:90
met::METAssociator::m_usePFOLinks
Gaudi::Property< bool > m_usePFOLinks
Definition
METAssociator.h:89
met::METAssociator::fillAssocMap
virtual StatusCode fillAssocMap(xAOD::MissingETAssociationMap *metMap, const xAOD::IParticleContainer *hardObjs, const EventContext &ctx) const
Definition
METAssociator.cxx:278
met::METEgammaAssociator::m_photonNeutralFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photonNeutralFEReadDecorKey
Definition
METEgammaAssociator.h:112
met::METEgammaAssociator::m_electronNeutralPFOReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronNeutralPFOReadDecorKey
Definition
METEgammaAssociator.h:115
met::METEgammaAssociator::m_electronChargedFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronChargedFEReadDecorKey
Definition
METEgammaAssociator.h:118
met::METEgammaAssociator::m_electronChargedPFOReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronChargedPFOReadDecorKey
Definition
METEgammaAssociator.h:116
met::METEgammaAssociator::METEgammaAssociator
METEgammaAssociator(const std::string &name)
Definition
METEgammaAssociator.cxx:43
met::METEgammaAssociator::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition
METEgammaAssociator.cxx:63
met::METEgammaAssociator::m_photonNeutralPFOReadDecorKey
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photonNeutralPFOReadDecorKey
Definition
METEgammaAssociator.h:110
met::METEgammaAssociator::m_photonChargedPFOReadDecorKey
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photonChargedPFOReadDecorKey
Definition
METEgammaAssociator.h:111
met::METEgammaAssociator::m_electronNeutralFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronNeutralFEReadDecorKey
Definition
METEgammaAssociator.h:117
met::METEgammaAssociator::m_photonChargedFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photonChargedFEReadDecorKey
Definition
METEgammaAssociator.h:113
met::METElectronAssociator::executeTool
StatusCode executeTool(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap, const EventContext &ctx) const final
Definition
METElectronAssociator.cxx:58
met::METElectronAssociator::m_elContKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_elContKey
Definition
METElectronAssociator.h:53
met::METElectronAssociator::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
METElectronAssociator.cxx:37
met::METElectronAssociator::METElectronAssociator
METElectronAssociator()
Default constructor:
met
Definition
IMETSignificance.h:24
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
xAOD::MissingETContainer
MissingETContainer_v1 MissingETContainer
Definition
Event/xAOD/xAODMissingET/xAODMissingET/MissingETContainer.h:16
xAOD::MissingETAssociationMap
MissingETAssociationMap_v1 MissingETAssociationMap
Version control by type defintion.
Definition
MissingETAssociationMap.h:16
Generated on
for ATLAS Offline Software by
1.17.0