ATLAS Offline Software
Loading...
Searching...
No Matches
ColumnarMETMaker.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7// ColumnarMETMaker.h
8// Header file for class ColumnarMETMaker
9// Author: T.J.Khoo<khoo@cern.ch>
11#ifndef METUTILITIES_COLUMNAR_MET_METMAKER_H
12#define METUTILITIES_COLUMNAR_MET_METMAKER_H 1
13
14// STL includes
15#include <string>
16
17// FrameWork includes
19#include "AsgTools/ToolHandle.h"
20#include "AsgTools/AsgTool.h"
21
22// METInterface includes
24
25// EDM includes
28
29// Tracking Tool
31
37#include <ColumnarJet/JetDef.h>
41
42// Forward declaration
43
44namespace met {
45
46 // typedefs
48
50 : public asg::AsgTool, public columnar::ColumnarTool<>,
51 virtual public IMETMaker
52
53 {
54 // This macro defines the constructor with the interface declaration
56
57
58 // Public methods:
60 public:
61
62 // Copy constructor:
63
65 ColumnarMETMaker(const std::string& name);
66
69
70 // Athena algtool's Hooks
71 virtual StatusCode initialize() override final;
72
73 virtual StatusCode rebuildMET(
74 const std::string& metKey,
75 xAOD::Type::ObjectType metType,
76 xAOD::MissingETContainer* metCont,
77 const xAOD::IParticleContainer* collection,
79 MissingETBase::UsageHandler::Policy objScale) const override final;
80 StatusCode rebuildMET(
81 const std::string& metKey,
82 xAOD::Type::ObjectType metType,
83 columnar::MutableMetRange metCont,
84 columnar::ParticleRange collection,
85 columnar::MetAssociationHelper<> helper,
86 MissingETBase::UsageHandler::Policy objScale) const;
87 //
88 virtual StatusCode rebuildMET(
90 const xAOD::IParticleContainer* collection,
92 MissingETBase::UsageHandler::Policy objScale) const override final;
93 StatusCode rebuildMET(
94 columnar::MutableMetId met,
95 columnar::ParticleRange collection,
96 columnar::MetAssociationHelper<> helper,
97 MissingETBase::UsageHandler::Policy objScale) const;
98 //
99 virtual StatusCode rebuildMET(
101 const xAOD::IParticleContainer* collection,
103 MissingETBase::UsageHandler::Policy p,
104 bool removeOverlap,
105 MissingETBase::UsageHandler::Policy objScale) const override final;
106 StatusCode rebuildMET(
107 columnar::MutableMetId met,
108 columnar::ParticleRange collection,
109 columnar::MetAssociationHelper<> helper,
110 MissingETBase::UsageHandler::Policy p,
111 bool removeOverlap,
112 MissingETBase::UsageHandler::Policy objScale) const;
113
114 virtual StatusCode rebuildJetMET(
115 const std::string& metJetKey,
116 const std::string& softClusKey,
117 const std::string& softTrkKey,
118 xAOD::MissingETContainer* metCont,
119 const xAOD::JetContainer* jets,
120 const xAOD::MissingETContainer* metCoreCont,
122 bool doJetJVT) const override final;
123 StatusCode rebuildJetMET(
124 const std::string& metJetKey,
125 const std::string& softClusKey,
126 const std::string& softTrkKey,
127 columnar::MutableMetRange metCont,
128 columnar::JetRange jets,
129 columnar::Met1Range metCoreCont,
130 columnar::MetAssociationHelper<> helper,
131 bool doJetJVT) const;
132
133 virtual StatusCode rebuildJetMET(
134 const std::string& metJetKey,
135 const std::string& metSoftKey,
136 xAOD::MissingETContainer* metCont,
137 const xAOD::JetContainer* jets,
138 const xAOD::MissingETContainer* metCoreCont,
140 bool doJetJVT) const override final;
141 StatusCode rebuildJetMET(
142 const std::string& metJetKey,
143 const std::string& metSoftKey,
144 columnar::MutableMetRange metCont,
145 columnar::JetRange jets,
146 columnar::Met1Range metCoreCont,
147 columnar::MetAssociationHelper<> helper,
148 bool doJetJVT) const;
149
150 virtual StatusCode rebuildJetMET(
151 xAOD::MissingET* metJet,
152 const xAOD::JetContainer* jets,
154 xAOD::MissingET* metSoftClus,
155 const xAOD::MissingET* coreSoftClus,
156 xAOD::MissingET* metSoftTrk,
157 const xAOD::MissingET* coreSoftTrk,
158 bool doJetJVT,
159 bool tracksForHardJets = false,
160 std::vector<const xAOD::IParticle*>* softConst = 0) const override final;
161 StatusCode rebuildJetMET(
162 columnar::MutableMetId metJet,
163 columnar::MutableMetRange metCont,
164 columnar::JetRange jets,
165 columnar::MetAssociationHelper<> helper,
166 columnar::OptMutableMetId metSoftClus,
167 columnar::OptMet1Id coreSoftClus,
168 columnar::OptMutableMetId metSoftTrk,
169 columnar::OptMet1Id coreSoftTrk,
170 bool doJetJVT,
171 bool tracksForHardJets = false,
172 std::vector<const xAOD::IParticle*>* softConst = 0) const;
173
174 virtual StatusCode rebuildTrackMET(
175 const std::string& metJetKey,
176 const std::string& softTrkKey,
177 xAOD::MissingETContainer* metCont,
178 const xAOD::JetContainer* jets,
179 const xAOD::MissingETContainer* metCoreCont,
181 bool doJetJVT) const override final;
182 StatusCode rebuildTrackMET(
183 const std::string& metJetKey,
184 const std::string& softTrkKey,
185 columnar::MutableMetRange metCont,
186 columnar::JetRange jets,
187 columnar::Met1Range metCoreCont,
188 columnar::MetAssociationHelper<> helper,
189 bool doJetJVT) const;
190
191 virtual StatusCode rebuildTrackMET(xAOD::MissingET* metJet,
192 const xAOD::JetContainer* jets,
194 xAOD::MissingET* metSoftTrk,
195 const xAOD::MissingET* coreSoftTrk,
196 bool doJetJVT) const override final;
197 StatusCode rebuildTrackMET(columnar::MutableMetId metJet,
198 columnar::MutableMetRange metCont,
199 columnar::JetRange jets,
200 columnar::MetAssociationHelper<> helper,
201 columnar::MutableMetId metSoftTrk,
202 columnar::Met1Id coreSoftTrk,
203 bool doJetJVT) const;
204
205 virtual StatusCode markInvisible(
206 const xAOD::IParticleContainer* collection,
208 xAOD::MissingETContainer* metCont) const override final;
209 StatusCode markInvisible(
210 columnar::ParticleRange collection,
211 columnar::MetAssociationHelper<> helper,
212 columnar::MutableMetRange metCont) const;
213
215 // Private data:
217 private:
218
221
222
223 SG::ReadHandleKey<xAOD::VertexContainer> m_PVkey;
224
225 // pT threshold for suppressing warnings of objects missing in association map
227
233 std::string m_jetRejectionDec;
234
235 double m_CenJetPtCut{}, m_FwdJetPtCut{} ; // jet pt cut for central/forward jets
236 double m_JvtCut{}, m_JvtPtMax{}; // JVT cut and pt region of jets to apply a JVT selection
237 double m_JetEtaMax{};
238 double m_JetEtaForw{};
239
240 std::string m_jetSelection;
241 std::string m_JvtWP;
242
243 // Extra configurables for custom WP
246 std::string m_customJvtWP;
247
248 bool m_doPFlow{};
251
258
259 bool m_muEloss{};
263
264 // muon overlap variables
271
272 ToolHandle<InDet::IInDetTrackSelectionTool> m_trkseltool;
273 ToolHandle<IAsgSelectionTool> m_JvtTool;
274
275 SG::ReadHandleKey<xAOD::JetContainer> m_jetContainer{this, "JetContainer", "", "Name of input jet container (required if JVT decisions computed by internal tool)"};
276
279
281 columnar::Met1Accessor<columnar::ObjectColumn> m_inputMetHandle {*this, "METCore", {.addMTDependency=true}};
288
292
297
299
301 Gaudi::Property<std::string> m_inputPreselectionName {this, "inputPreselection", ""};
302 std::optional<columnar::ParticleAccessor<char>> m_inputPreselectionAcc;
305
307
315
316 std::optional<columnar::MetHelpers::InputMomentumAccessors<columnar::ContainerId::jet>> m_jetConstitScaleMomAcc;
317 std::optional<columnar::MetHelpers::InputMomentumAccessors<columnar::ContainerId::jet>> m_jetConstitScaleMomFixedAcc;
318 std::optional<columnar::JetAccessor<char>> m_acc_jetRejectionDec;
319
322
324
325 Gaudi::Property<unsigned> m_columnarOperation {this, "columnarOperation", 0};
326 Gaudi::Property<std::string> m_columnarTermName {this, "columnarTermName", ""};
327 Gaudi::Property<unsigned> m_columnarParticleType {this, "columnarParticleType", 0};
328 Gaudi::Property<std::string> m_columnarJetKey {this, "columnarJetKey", ""};
329 Gaudi::Property<std::string> m_columnarSoftClusKey {this, "columnarSoftClusKey", ""};
330 Gaudi::Property<bool> m_columnarDoJetJVT {this, "columnarDoJetJVT", false};
331 void callEvents (columnar::EventContextRange events) const override;
332 };
333
334} //> end namespace met
335#endif //> !METUTILITIES_MET_METMAKER_H
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Property holding a SG store/key/clid from which a ReadHandle is made.
ObjectType
Definition BaseObject.h:11
Property holding a SG store/key/clid from which a ReadHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
the base class for all columnar components
the accessors MetAssociationHelper needs to implement its operations
a special "accessor" that allows to do the MET term lookup by name
Definition MetHelpers.h:38
a special "decorator" for decorating the weight an object contributes to a MET term
Definition MetOutput.h:31
Gaudi::Property< std::string > m_inputPreselectionName
columnar::MetHelpers::MapLookupAccessor< columnar::ContainerId::mutableMet > m_outputMetMapAcc
void callEvents(columnar::EventContextRange events) const override
Gaudi::Property< std::string > m_columnarJetKey
bool acceptTrack(const xAOD::TrackParticle *trk, const xAOD::Vertex *vx) const
columnar::MetHelpers::ObjectWeightDecorator< columnar::ContainerId::mutableMet, columnar::ContainerId::jet > m_jetOutputMetWeightDecSoft
columnar::JetAccessor< float > m_acc_width
columnar::JetAccessor< std::vector< int > > m_acc_trkN
std::optional< columnar::ParticleAccessor< char > > m_inputPreselectionAcc
columnar::Met1Accessor< std::string > m_inputMetNameAcc
columnar::ElectronAccessor< columnar::ObjectColumn > m_electronsHandle
columnar::MetAssocationAccessors m_assocAcc
virtual ~ColumnarMETMaker()
Destructor:
virtual StatusCode markInvisible(const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, xAOD::MissingETContainer *metCont) const override final
virtual StatusCode initialize() override final
Dummy implementation of the initialisation function.
columnar::MetHelpers::MetMomentumAccessors< columnar::ContainerId::mutableMet > m_outputMetMomAcc
columnar::Met1Accessor< columnar::ObjectColumn > m_inputMetHandle
columnar::ColumnAccessor< columnar::ContainerId::metAssociation, columnar::ObjectColumn > m_metAssocHandle
columnar::ParticleAccessor< columnar::RetypeColumn< xAOD::Muon::MuonType, std::uint16_t > > m_inputMuonTypeAcc
columnar::MutableMetAccessor< std::string > m_outputMetNameAcc
columnar::JetAccessor< float > m_acc_emf
std::optional< columnar::MetHelpers::InputMomentumAccessors< columnar::ContainerId::jet > > m_jetConstitScaleMomFixedAcc
columnar::MetHelpers::MapLookupAccessor< columnar::ContainerId::met1 > m_inputMetMapAcc
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkseltool
columnar::JetAccessor< columnar::ObjectColumn > m_jetsHandle
columnar::MutableMetAccessor< columnar::ObjectColumn > m_outputMetHandle
ColumnarMETMaker(const std::string &name)
Constructor with parameters:
virtual StatusCode rebuildTrackMET(const std::string &metJetKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
Gaudi::Property< bool > m_columnarDoJetJVT
columnar::JetAccessor< std::vector< float > > m_acc_trksumpt
columnar::MetHelpers::ObjectTypeAccessor< columnar::ContainerId::particle > m_inputObjTypeAcc
columnar::Met1Accessor< MissingETBase::Types::bitmask_t > m_inputMetSourceAcc
Gaudi::Property< std::string > m_columnarTermName
columnar::MetHelpers::MetMomentumAccessors< columnar::ContainerId::met1 > m_inputMetMomAcc
SG::ReadHandleKey< xAOD::VertexContainer > m_PVkey
columnar::JetAccessor< std::vector< float > > m_acc_sampleE
virtual StatusCode rebuildJetMET(const std::string &metJetKey, const std::string &softClusKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
columnar::MetHelpers::InputMomentumAccessors m_inputMomAcc
columnar::MuonAccessor< columnar::ObjectColumn > m_muonsHandle
columnar::MetHelpers::ObjectWeightDecorator m_outputMetWeightDecRegular
columnar::JetAccessor< float > m_acc_psf
const xAOD::Vertex * getPV() const
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer
columnar::PhotonAccessor< columnar::ObjectColumn > m_photonsHandle
columnar::ParticleAccessor< columnar::ObjectColumn > m_particlesHandle
ColumnarMETMaker()
Default constructor:
Gaudi::Property< unsigned > m_columnarOperation
ToolHandle< IAsgSelectionTool > m_JvtTool
columnar::ElectronAccessor< columnar::RetypeColumn< double, float > > m_electronPtAcc
std::optional< columnar::MetHelpers::InputMomentumAccessors< columnar::ContainerId::jet > > m_jetConstitScaleMomAcc
Gaudi::Property< std::string > m_columnarSoftClusKey
std::optional< columnar::JetAccessor< char > > m_acc_jetRejectionDec
columnar::MetHelpers::InputMomentumAccessors< columnar::ContainerId::jet > m_jetMomAcc
Gaudi::Property< unsigned > m_columnarParticleType
columnar::MetHelpers::ObjectWeightDecorator< columnar::ContainerId::mutableMet, columnar::ContainerId::jet > m_jetOutputMetWeightDecRegular
virtual StatusCode rebuildMET(const std::string &metKey, xAOD::Type::ObjectType metType, xAOD::MissingETContainer *metCont, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale) const override final
Class providing the definition of the 4-vector interface.
General namespace for MET EDM software.
Forward declaration.
AccessorTemplate< CI, CT, ColumnAccessMode::input, CM > ColumnAccessor
AccessorTemplate< ContainerId::electron, CT, ColumnAccessMode::input, CM > ElectronAccessor
Definition EgammaDef.h:40
AccessorTemplate< ContainerId::photon, CT, ColumnAccessMode::input, CM > PhotonAccessor
Definition EgammaDef.h:46
AccessorTemplate< ContainerId::jet, CT, ColumnAccessMode::input, CM > JetAccessor
Definition JetDef.h:28
ObjectRange< ContainerId::eventContext > EventContextRange
AccessorTemplate< ContainerId::particle, CT, ColumnAccessMode::input, CM > ParticleAccessor
Definition ParticleDef.h:38
AccessorTemplate< ContainerId::mutableMet, CT, ColumnAccessMode::input, CM > MutableMetAccessor
Definition MetDef.h:70
AccessorTemplate< ContainerId::met1, CT, ColumnAccessMode::input, CM > Met1Accessor
Definition MetDef.h:64
AccessorTemplate< ContainerId::muon, CT, ColumnAccessMode::input, CM > MuonAccessor
Definition MuonDef.h:27
ElementLink< xAOD::IParticleContainer > obj_link_t
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
MissingET_v1 MissingET
Version control by type defintion.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
a class that provides all the accessors needed to access object momentum variables
Definition MetInput.h:33
a special accessor for the MET momentum
Definition MetHelpers.h:168
an accessor that allows to access the xAOD object type of an input object
Definition MetInput.h:169
#define private