ATLAS Offline Software
METCaloRegionsTool.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 // METCaloRegionsTool.h
8 // Header file for class METCaloRegionsTool
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, AS Mete
17 #ifndef METRECONSTRUCTION_METCALOREGIONSTOOL_H
18 #define METRECONSTRUCTION_METCALOREGIONSTOOL_H 1
19 
20 // STL includes
21 #include <string>
22 
23 // FrameWork includes
24 #include "AsgTools/ToolHandle.h"
25 #include "AsgTools/AsgTool.h"
27 
28 
29 // MET EDM
31 
32 // METRecoInterface includes
34 
35 // Forward declarations
38 
39 class CaloCellContainer;
40 
41 // MET EDM
42 #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
43 #else
45 #endif
46 
47 
48 
49 namespace met{
50 
52  : public asg::AsgTool,
53  virtual public IMETToolBase
54  {
55  // This macro defines the constructor with the interface declaration
57 
58 
59 
60  // Public methods:
62  public:
63 
64  // Constructor with name (does this have to be a non-const
65  // std::string and not a const reference?)
66  METCaloRegionsTool(const std::string& name);
67  ~METCaloRegionsTool() = default;
68 
69  // AsgTool Hooks
70  virtual StatusCode initialize() override;
71  virtual StatusCode execute(xAOD::MissingET* metTerm, xAOD::MissingETComponentMap* metMap) const override;
72 
74  // Private data:
76  protected:
77 
78  // Internal variables
79  std::string m_input_data_key;
80  std::string m_output_met_key;
81  Gaudi::Property<bool> m_calo_useCells{this, "UseCells", true, ""};
82  Gaudi::Property<bool> m_calo_doTriggerMet{this, "DoTriggerMET", true, ""};
83  // Accept functions
84  bool accept (const xAOD::IParticle* object) const;
85  // Overlap resolver function
86  bool resolveOverlap (const xAOD::IParticle* object,
88  std::vector<const xAOD::IParticle*>& acceptedSignals,
89  MissingETBase::Types::weight_t& objWeight) const;
90  // Fill Cell MET
92  const CaloCellContainer* caloCellContainer ) const;
93  // Fill Cluster MET
95  const xAOD::CaloClusterContainer* caloClusContainer) const;
96  // Find MET term for a given sampling
99  // CaloRegions enum - do NOT mess w/ the order
100  enum CaloRegions {
101  EMB = 0,
109  };
110  // CaloRegions human-readable names for enums
111  const static std::string s_CaloRegionNames[];
112 
113  private:
114  // Default constructor:
116 
117  #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
118  #else
119  SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
120  #endif
121  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_caloClusterKey{this,"CaloClusterKey","","SG Key of Calo Cluster Collection"};
122  SG::ReadHandleKey<CaloCellContainer> m_caloCellKey{this,"CaloCellKey","","SG Key of Calo Cell Container"};
123  };
124 
125 }
126 
127 #endif //> !METRECONSTRUCTION_METCALOREGIONSTOOL_H
xAOD::MissingETComponentMap_v1
Definition: MissingETComponentMap_v1.h:25
met::METCaloRegionsTool::findMetTerm
static xAOD::MissingET * findMetTerm(xAOD::MissingETContainer *metContainer, CaloSampling::CaloSample sample)
Definition: METCaloRegionsTool.cxx:165
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
met::METCaloRegionsTool::~METCaloRegionsTool
~METCaloRegionsTool()=default
met::METCaloRegionsTool::REGIONS_TOTAL
@ REGIONS_TOTAL
Definition: METCaloRegionsTool.h:108
met::METCaloRegionsTool::EME
@ EME
Definition: METCaloRegionsTool.h:102
met::METCaloRegionsTool::m_calo_doTriggerMet
Gaudi::Property< bool > m_calo_doTriggerMet
Definition: METCaloRegionsTool.h:82
met::METCaloRegionsTool::PEME
@ PEME
Definition: METCaloRegionsTool.h:106
met::METCaloRegionsTool::HEC
@ HEC
Definition: METCaloRegionsTool.h:104
met::METCaloRegionsTool::m_output_met_key
std::string m_output_met_key
Definition: METCaloRegionsTool.h:80
met::METCaloRegionsTool::execute
virtual StatusCode execute(xAOD::MissingET *metTerm, xAOD::MissingETComponentMap *metMap) const override
Definition: METCaloRegionsTool.cxx:80
SG::ReadHandleKey< xAOD::CaloClusterContainer >
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
met::METCaloRegionsTool::s_CaloRegionNames
static const std::string s_CaloRegionNames[]
Definition: METCaloRegionsTool.h:111
IMETToolBase
Definition: IMETToolBase.h:25
met::METCaloRegionsTool::resolveOverlap
bool resolveOverlap(const xAOD::IParticle *object, xAOD::MissingETComponentMap *metMap, std::vector< const xAOD::IParticle * > &acceptedSignals, MissingETBase::Types::weight_t &objWeight) const
met::METCaloRegionsTool::EMB
@ EMB
Definition: METCaloRegionsTool.h:101
met
Definition: IMETSignificance.h:24
CaloClusterFwd.h
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
met::METCaloRegionsTool::m_caloClusterKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterKey
Definition: METCaloRegionsTool.h:121
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
met::METCaloRegionsTool::m_calo_useCells
Gaudi::Property< bool > m_calo_useCells
Definition: METCaloRegionsTool.h:81
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ReadCondHandleKey.h
xAOD::MissingETContainer_v1
Container for xAOD::MissingET_v1 objects.
Definition: MissingETContainer_v1.h:21
met::METCaloRegionsTool::m_input_data_key
std::string m_input_data_key
Definition: METCaloRegionsTool.h:79
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
met::METCaloRegionsTool
Definition: METCaloRegionsTool.h:54
CaloNoise.h
met::METCaloRegionsTool::accept
bool accept(const xAOD::IParticle *object) const
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
met::METCaloRegionsTool::fillCellMet
StatusCode fillCellMet(xAOD::MissingETContainer *metContainer, const CaloCellContainer *caloCellContainer) const
Definition: METCaloRegionsTool.cxx:211
SG::ReadCondHandleKey< CaloNoise >
met::METCaloRegionsTool::m_noiseCDOKey
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Definition: METCaloRegionsTool.h:119
met::METCaloRegionsTool::CaloRegions
CaloRegions
Definition: METCaloRegionsTool.h:100
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
CaloClusterContainer.h
xAOD::MissingETComponent_v1::Weight
Kinematic weight descriptor.
Definition: MissingETComponent_v1.h:28
met::METCaloRegionsTool::METCaloRegionsTool
METCaloRegionsTool()
ToolHandle.h
IMETToolBase.h
AsgTool.h
met::METCaloRegionsTool::m_caloCellKey
SG::ReadHandleKey< CaloCellContainer > m_caloCellKey
Definition: METCaloRegionsTool.h:122
MissingETContainer.h
met::METCaloRegionsTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: METCaloRegionsTool.cxx:62
met::METCaloRegionsTool::TILE
@ TILE
Definition: METCaloRegionsTool.h:107
met::METCaloRegionsTool::PEMB
@ PEMB
Definition: METCaloRegionsTool.h:105
met::METCaloRegionsTool::fillClusterMet
StatusCode fillClusterMet(xAOD::MissingETContainer *metContainer, const xAOD::CaloClusterContainer *caloClusContainer) const
Definition: METCaloRegionsTool.cxx:270
met::METCaloRegionsTool::FCAL
@ FCAL
Definition: METCaloRegionsTool.h:103