ATLAS Offline Software
METAssociationTool.h
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 // METAssociationTool.h
8 // Header file for class METAssociationTool
9 //
10 // This is a scheduler for the MET Reconstruction, and sets up
11 // the sequence in which the individual terms are constructed.
12 //
13 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
14 //
15 // Author: P Loch, S Resconi, TJ Khoo
17 #ifndef METRECONSTRUCTION_METASSOCIATIONTOOL_H
18 #define METRECONSTRUCTION_METASSOCIATIONTOOL_H 1
19 
20 // STL includes
21 #include <string>
22 
23 // FrameWork includes
24 #include "AsgTools/ToolHandle.h"
25 #include "AsgTools/AsgTool.h"
27 #include "StoreGate/DataHandle.h"
28 
29 
30 // METRecoInterface includes
33 
34 // EDM includes
38 
39 // Timing
40 #include "TStopwatch.h"
41 
42 // Forward declaration
43 
44 namespace met{
45  /* @brief Top-level class scheduling MET reconstruction tools
46  *
47  * @author Peter Loch <loch_AT_physics.arizona.edu>
48  * @author Silvia Resconi <Silvia.Resconi_AT_cern.ch>
49  * @author Teng Jian Khoo <Teng.Jian.Khoo_AT_cern.ch>
50  *
51  * @date Nov. 21, 2013
52  * @version v1.0
53  *
54  * The METAssociationTool can be called within an Athena algorithm or a ROOT programme
55  * to carry out the reconstruction of a MET configuration, and will produce a
56  * MissingETContainer, the contents of which will be the MissingET objects produced
57  * by the various tools scheduled by METAssociationTool.
58  *
59  */
60  class METAssociationTool final
61  // ^ the (optional) use of TStopwatch makes this not thread-safe
62  : public asg::AsgTool,
63  virtual public IMETRecoTool
64  {
65  // This macro defines the constructor with the interface declaration
67 
68 
69 
70  // Public methods:
72  public:
73 
74  // Constructor with name (does this have to be a non-const
75  // std::string and not a const reference?)
76  METAssociationTool(const std::string& name);
77 
78  // AsgTool Hooks
79  virtual StatusCode initialize() override;
80  virtual StatusCode execute() const override;
81  virtual StatusCode finalize() override;
82 
84  // Private data:
86  private:
87 
90 
91  // Run the MET tools here
93 
94  // Data members
95  Gaudi::Property<std::string> m_metSuffix{this, "METSuffix", "AntiKt4LCTopo", "MET suffix"};
97  SG::WriteHandleKey<xAOD::MissingETAssociationMap> m_mapKey{this, "AssociationOutputKey", "", ""};
98 
99  ToolHandleArray<IMETAssocToolBase> m_metAssociators{this, "METAssociators", {}, ""};
100 
101  mutable std::atomic<unsigned int> m_nevt{};
102  };
103 
104 }
105 
106 #endif //> !METRECONSTRUCTION_METASSOCIATIONTOOL_H
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
met::METAssociationTool::execute
virtual StatusCode execute() const override
Definition: METAssociationTool.cxx:76
met::METAssociationTool::finalize
virtual StatusCode finalize() override
Definition: METAssociationTool.cxx:105
met::METAssociationTool::m_metAssociators
ToolHandleArray< IMETAssocToolBase > m_metAssociators
Definition: METAssociationTool.h:99
DataHandle.h
met::METAssociationTool::buildMET
StatusCode buildMET(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const
Definition: METAssociationTool.cxx:116
xAOD::MissingETAssociationMap_v1
Definition: MissingETAssociationMap_v1.h:29
IMETRecoTool
Definition: IMETRecoTool.h:23
met::METAssociationTool::m_nevt
std::atomic< unsigned int > m_nevt
Definition: METAssociationTool.h:101
met
Definition: IMETSignificance.h:24
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IMETAssocToolBase.h
met::METAssociationTool
Definition: METAssociationTool.h:64
xAOD::MissingETContainer_v1
Container for xAOD::MissingET_v1 objects.
Definition: MissingETContainer_v1.h:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MissingETAuxAssociationMap.h
IMETRecoTool.h
met::METAssociationTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: METAssociationTool.cxx:52
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
met::METAssociationTool::METAssociationTool
METAssociationTool()
Default constructor:
met::METAssociationTool::m_coreKey
SG::WriteHandleKey< xAOD::MissingETContainer > m_coreKey
Definition: METAssociationTool.h:96
MissingETAssociationMap.h
ToolHandle.h
AsgTool.h
checker_macros.h
Define macros for attributes used to control the static checker.
met::METAssociationTool::m_metSuffix
Gaudi::Property< std::string > m_metSuffix
Definition: METAssociationTool.h:95
MissingETContainer.h
met::METAssociationTool::m_mapKey
SG::WriteHandleKey< xAOD::MissingETAssociationMap > m_mapKey
Definition: METAssociationTool.h:97