ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
MetAnalysisAlgorithms
Root
MetBuilderAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
//
10
// includes
11
//
12
13
#include <
MetAnalysisAlgorithms/MetBuilderAlg.h
>
14
15
#include <
METUtilities/METHelpers.h
>
16
17
//
18
// method implementations
19
//
20
21
namespace
CP
22
{
23
// accessors and decorators
24
// these are done at file-level to register types with output algorithms
25
const
static
SG::Decorator<float>
met_met_dec
(
"met"
);
26
const
static
SG::Decorator<float>
met_phi_dec
(
"phi"
);
27
28
StatusCode MetBuilderAlg ::
29
initialize ()
30
{
31
ANA_CHECK
(
m_metHandle
.initialize (
m_systematicsList
));
32
ANA_CHECK
(
m_systematicsList
.initialize());
33
return
StatusCode::SUCCESS;
34
}
35
36
37
38
StatusCode MetBuilderAlg ::
39
execute (
const
EventContext& ctx)
40
{
41
for
(
const
auto
& sys :
m_systematicsList
.systematicsVector())
42
{
43
xAOD::MissingETContainer
*
met
{};
44
ANA_CHECK
(
m_metHandle
.getCopy (
met
, sys, ctx));
45
46
xAOD::MissingET
*softTerm = (*met)[
m_softTerm
];
47
if
(softTerm ==
nullptr
)
48
{
49
ANA_MSG_ERROR
(
"could not find MET soft-term: "
<<
m_softTerm
);
50
return
StatusCode::FAILURE;
51
}
52
ANA_CHECK
(
met::buildMETSum
(
m_finalKey
,
met
, softTerm->
source
()));
53
54
for
(
const
xAOD::MissingET
*metTerm : (*
met
))
55
{
56
if
(!metTerm)
57
{
58
ANA_MSG_WARNING
(
"failed to retrieve MET term to decorate met and phi aux vars!"
);
59
continue
;
60
}
61
met_met_dec
(*metTerm) = metTerm->met();
62
met_phi_dec
(*metTerm) = metTerm->phi();
63
}
64
}
65
66
return
StatusCode::SUCCESS;
67
}
68
}
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
ANA_MSG_WARNING
#define ANA_MSG_WARNING(xmsg)
Macro printing warning messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:292
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
METHelpers.h
MetBuilderAlg.h
CP::MetBuilderAlg::m_finalKey
Gaudi::Property< std::string > m_finalKey
the key for the final met term
Definition
MetBuilderAlg.h:43
CP::MetBuilderAlg::m_softTerm
Gaudi::Property< std::string > m_softTerm
the key for the soft term
Definition
MetBuilderAlg.h:47
CP::MetBuilderAlg::m_metHandle
SysCopyHandle< xAOD::MissingETContainer > m_metHandle
the met collection we run on
Definition
MetBuilderAlg.h:38
CP::MetBuilderAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
MetBuilderAlg.h:34
xAOD::MissingET_v1::source
MissingETBase::Types::bitmask_t source() const
MET object source tag.
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::met_phi_dec
static const SG::Decorator< float > met_phi_dec("phi")
CP::met_met_dec
static const SG::Decorator< float > met_met_dec("met")
SG::Decorator
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition
AuxElement.h:576
met
Definition
IMETSignificance.h:24
met::buildMETSum
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
Definition
METHelpers.cxx:65
xAOD::MissingET
MissingET_v1 MissingET
Version control by type defintion.
Definition
Event/xAOD/xAODMissingET/xAODMissingET/MissingET.h:15
xAOD::MissingETContainer
MissingETContainer_v1 MissingETContainer
Definition
Event/xAOD/xAODMissingET/xAODMissingET/MissingETContainer.h:16
Generated on
for ATLAS Offline Software by
1.17.0