ATLAS Offline Software
METRefinerTool.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // METRefinerTool.cxx
8 // Implementation file for class METRefinerTool
9 //
10 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
11 //
12 // Author: P Loch, S Resconi, TJ Khoo
14 
15 // METReconstruction includes
17 
18 // MET EDM
22 
23 // For DeltaR
25 
26 namespace met {
27 
28  using xAOD::MissingET;
31 
33  // Public methods:
35 
36  // Constructors
38  METRefinerTool::METRefinerTool(const std::string& name) :
39  AsgTool(name)
40  {
41  declareProperty( "MissingETKey", m_output_met_key );
42  declareProperty( "UseRapidity", m_useRapidity = false );
43  }
44 
45  // Destructor
48  = default;
49 
50  // Athena algtool's Hooks
53  {
54  ATH_MSG_DEBUG ("Initializing " << name() << "...");
55 
56  return StatusCode::SUCCESS;
57  }
58 
60  {
61  ATH_MSG_DEBUG ("In execute: " << name() << "...");
62 
63  if( metTerm==nullptr ) {
64  ATH_MSG_ERROR("Invalid input MissingET pointer provided!");
65  return StatusCode::FAILURE;
66  }
67  if( metMap==nullptr ) {
68  ATH_MSG_ERROR("Invalid input MissingETComponentMap pointer provided!");
69  return StatusCode::FAILURE;
70  }
71 
72  metTerm->setName(m_output_met_key);
73  return this->executeTool(metTerm,metMap);
74  }
75 
77  {
78  ATH_MSG_INFO ("Finalizing " << name() << "...");
79 
80  return StatusCode::SUCCESS;
81  }
82 
83 }
xAOD::MissingETComponentMap_v1
Definition: MissingETComponentMap_v1.h:25
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAODP4Helpers.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
met::METRefinerTool::m_output_met_key
std::string m_output_met_key
Definition: METRefinerTool.h:63
xAOD::MissingET
MissingET_v1 MissingET
Version control by type defintion.
Definition: Event/xAOD/xAODMissingET/xAODMissingET/MissingET.h:15
MissingETComposition
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current MissingETComposition
Definition: RecTPCnv.cxx:86
met::METRefinerTool::executeTool
virtual StatusCode executeTool(xAOD::MissingET *metTerm, xAOD::MissingETComponentMap *metMap) const =0
xAOD::MissingET_v1::setName
void setName(const std::string &name)
Set the name of the MET object.
met::METRefinerTool::finalize
virtual StatusCode finalize()
Definition: METRefinerTool.cxx:76
met
Definition: IMETSignificance.h:24
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
met::METRefinerTool::execute
virtual StatusCode execute(xAOD::MissingET *metTerm, xAOD::MissingETComponentMap *metMap) const
Definition: METRefinerTool.cxx:59
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
met::METRefinerTool::METRefinerTool
METRefinerTool()
Default constructor:
METRefinerTool.h
MissingETComponentMap.h
xAOD::MissingETComponentMap
MissingETComponentMap_v1 MissingETComponentMap
Version control by type definition.
Definition: MissingETComponentMap.h:16
MissingETComposition.h
MissingETContainer.h
met::METRefinerTool::~METRefinerTool
virtual ~METRefinerTool()
met::METRefinerTool::m_useRapidity
bool m_useRapidity
Definition: METRefinerTool.h:64
met::METRefinerTool::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: METRefinerTool.cxx:52