ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
MET
METReconstruction
Root
METBuilderTool.cxx
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// METBuilderTool.cxx
8
// Implementation file for class METBuilderTool
9
//
10
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
11
//
12
// Author: P Loch, S Resconi, TJ Khoo
14
15
// METReconstruction includes
16
#include "
METReconstruction/METBuilderTool.h
"
17
18
// MET EDM
19
#include "
xAODMissingET/MissingETContainer.h
"
20
#include "
xAODMissingET/MissingETComposition.h
"
21
#include "
xAODMissingET/MissingETComponentMap.h
"
22
23
// For DeltaR
24
#include "
FourMomUtils/xAODP4Helpers.h
"
25
26
namespace
met
{
27
28
using
xAOD::MissingET
;
29
using
xAOD::MissingETComposition
;
30
using
xAOD::MissingETComponentMap
;
31
33
// Public methods:
35
36
// Constructors
38
METBuilderTool::METBuilderTool
(
const
std::string&
name
) :
39
AsgTool
(
name
)
40
{
41
}
42
43
// Athena algtool's Hooks
45
StatusCode
METBuilderTool::initialize
()
46
{
47
ATH_MSG_DEBUG
(
"Initializing "
<<
name
() <<
"..."
);
48
49
// Determine if modified clusters are used for jet inputs
50
m_useModClus
= !
m_mod_clus_key
.empty();
51
52
return
StatusCode::SUCCESS;
53
}
54
55
StatusCode
METBuilderTool::execute
(
xAOD::MissingET
* metTerm,
xAOD::MissingETComponentMap
* metMap)
const
56
{
57
ATH_MSG_DEBUG
(
"In execute: "
<<
name
() <<
"..."
);
58
59
if
( metTerm==
nullptr
) {
60
ATH_MSG_ERROR
(
"Invalid input MissingET pointer provided!"
);
61
return
StatusCode::FAILURE;
62
}
63
if
( metMap==
nullptr
) {
64
ATH_MSG_ERROR
(
"Invalid input MissingETComponentMap pointer provided!"
);
65
return
StatusCode::FAILURE;
66
}
67
68
metTerm->
setName
(
m_output_met_key
);
69
return
this->
executeTool
(metTerm,metMap);
70
}
71
72
74
// Protected methods:
76
77
bool
METBuilderTool::addToMET
(
const
xAOD::IParticle
*
object
,
78
const
std::vector<const xAOD::IParticle*>& acceptedSignals,
79
xAOD::MissingET
* metTerm,
80
xAOD::MissingETComponentMap
* metMap,
81
MissingETBase::Types::weight_t
& objWeight,
82
MissingETBase::UsageHandler::Policy
p)
const
83
{
84
85
metTerm->
add
(object->pt()*cos(object->phi())*objWeight.
wpx
(),
86
object->pt()*sin(object->phi())*objWeight.
wpy
(),
87
object->pt()*objWeight.
wet
());
// or actually ET?)
88
89
return
MissingETComposition::insert
(metMap,metTerm,
object
,acceptedSignals,objWeight,p);
90
}
91
92
93
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
MissingETComposition.h
MissingETContainer.h
METBuilderTool.h
MissingETComponentMap.h
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
met::METBuilderTool::m_mod_clus_key
Gaudi::Property< std::string > m_mod_clus_key
Definition
METBuilderTool.h:63
met::METBuilderTool::m_useModClus
bool m_useModClus
Definition
METBuilderTool.h:65
met::METBuilderTool::m_output_met_key
Gaudi::Property< std::string > m_output_met_key
Definition
METBuilderTool.h:62
met::METBuilderTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
METBuilderTool.cxx:45
met::METBuilderTool::METBuilderTool
METBuilderTool()
Default constructor:
met::METBuilderTool::addToMET
virtual bool addToMET(const xAOD::IParticle *object, const std::vector< const xAOD::IParticle * > &acceptedSignals, xAOD::MissingET *metTerm, xAOD::MissingETComponentMap *metMap, MissingETBase::Types::weight_t &objWeight, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::TrackCluster) const
Definition
METBuilderTool.cxx:77
met::METBuilderTool::executeTool
virtual StatusCode executeTool(xAOD::MissingET *metTerm, xAOD::MissingETComponentMap *metMap) const =0
met::METBuilderTool::execute
virtual StatusCode execute(xAOD::MissingET *metTerm, xAOD::MissingETComponentMap *metMap) const override
Definition
METBuilderTool.cxx:55
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::MissingETComponent_v1::Weight::wpx
double wpx() const
Returns .
xAOD::MissingETComponent_v1::Weight::wpy
double wpy() const
Returns .
xAOD::MissingETComponent_v1::Weight::wet
double wet() const
Returns .
xAOD::MissingET_v1::add
void add(const IParticle *particle)
Add particle kinematics to MET.
Definition
MissingET_v1.cxx:77
xAOD::MissingET_v1::setName
void setName(const std::string &name)
Set the name of the MET object.
MissingETBase::Types::weight_t
xAOD::MissingETComponent_v1::Weight weight_t
Type for kinematic weight.
Definition
MissingETComponent_v1.h:264
MissingETBase::UsageHandler::Policy
Policy
Policies on usage checks.
Definition
MissingETCompositionBase.h:182
met
Definition
IMETSignificance.h:24
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
xAOD::MissingETComponentMap
MissingETComponentMap_v1 MissingETComponentMap
Version control by type definition.
Definition
MissingETComponentMap.h:16
xAOD::MissingET
MissingET_v1 MissingET
Version control by type defintion.
Definition
Event/xAOD/xAODMissingET/xAODMissingET/MissingET.h:15
met::MissingETComposition::insert
static bool insert(MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, MissingETBase::Types::weight_t weight=MissingETBase::Types::weight_t())
Insert contributing signal or physics object by pointer, with optional kinematic weight object.
Definition
Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:42
xAOD::MissingETComposition
Collection of functions managing the MET composition map and association map.
Definition
Event/xAOD/xAODMissingET/xAODMissingET/MissingETComposition.h:22
xAODP4Helpers.h
Generated on
for ATLAS Offline Software by
1.17.0