ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
MET
METReconstruction
Root
METPhotonAssociator.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
// METPhotonAssociator.cxx
8
// Implementation file for class METPhotonAssociator
9
//
10
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
11
//
12
// Author: P Loch, S Resconi, TJ Khoo, AS Mete
14
15
// METReconstruction includes
16
#include "
METReconstruction/METPhotonAssociator.h
"
17
18
// Egamma EDM
19
#include "
xAODEgamma/PhotonContainer.h
"
20
#include "
xAODEgamma/EgammaxAODHelpers.h
"
21
22
namespace
met
{
23
24
using namespace
xAOD;
25
26
// Constructors
28
METPhotonAssociator::METPhotonAssociator
(
const
std::string&
name
) :
29
AsgTool
(
name
),
30
METAssociator
(
name
),
31
METEgammaAssociator
(
name
)
32
{
33
}
34
35
// Athena algtool's Hooks
37
StatusCode
METPhotonAssociator::initialize
()
38
{
39
ATH_MSG_VERBOSE
(
"Initializing "
<<
name
() <<
"..."
);
40
ATH_CHECK
(
m_phContKey
.initialize());
41
ATH_CHECK
(
METEgammaAssociator::initialize
() );
42
43
ATH_CHECK
(
m_photonNeutralPFOReadDecorKey
.initialize(
m_usePFOLinks
));
44
ATH_CHECK
(
m_photonChargedPFOReadDecorKey
.initialize(
m_usePFOLinks
));
45
ATH_CHECK
(
m_photonNeutralFEReadDecorKey
.initialize(
m_useFELinks
));
46
ATH_CHECK
(
m_photonChargedFEReadDecorKey
.initialize(
m_useFELinks
));
47
ATH_CHECK
(
m_electronNeutralPFOReadDecorKey
.initialize(
false
));
48
ATH_CHECK
(
m_electronChargedPFOReadDecorKey
.initialize(
false
));
49
ATH_CHECK
(
m_electronNeutralFEReadDecorKey
.initialize(
false
));
50
ATH_CHECK
(
m_electronChargedFEReadDecorKey
.initialize(
false
));
51
52
return
StatusCode::SUCCESS;
53
}
54
55
56
// executeTool
58
StatusCode
METPhotonAssociator::executeTool
(
xAOD::MissingETContainer
*
/*metCont*/
,
xAOD::MissingETAssociationMap
* metMap,
const
EventContext& ctx)
const
59
{
60
ATH_MSG_VERBOSE
(
"In execute: "
<<
name
() <<
"..."
);
61
62
SG::ReadHandle<xAOD::PhotonContainer>
phCont(
m_phContKey
, ctx);
63
if
(!phCont.
isValid
()) {
64
ATH_MSG_WARNING
(
"Unable to retrieve input photon container "
<<
m_phContKey
.key());
65
return
StatusCode::FAILURE;
66
}
67
68
ATH_MSG_DEBUG
(
"Successfully retrieved photon collection"
);
69
70
if
(
fillAssocMap
(metMap,phCont.
cptr
(), ctx).isFailure()) {
71
ATH_MSG_WARNING
(
"Unable to fill map with photon container "
<<
m_phContKey
.key());
72
return
StatusCode::FAILURE;
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
EgammaxAODHelpers.h
PhotonContainer.h
METPhotonAssociator.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::METPhotonAssociator::executeTool
StatusCode executeTool(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap, const EventContext &ctx) const final
Definition
METPhotonAssociator.cxx:58
met::METPhotonAssociator::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
METPhotonAssociator.cxx:37
met::METPhotonAssociator::METPhotonAssociator
METPhotonAssociator()
Default constructor:
met::METPhotonAssociator::m_phContKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_phContKey
Definition
METPhotonAssociator.h:53
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