ATLAS Offline Software
Loading...
Searching...
No Matches
ColumnarMETMaker.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

namespace ADD_CMODE (met)

Function Documentation

◆ ADD_CMODE()

namespace ADD_CMODE ( met )

Constructor with parameters:

Destructor:

Default constructor:

Definition at line 1 of file ColumnarMETMaker.h.

44 {
45
46 // typedefs
48
49 class ColumnarMETMaker
50 : public asg::AsgTool, public columnar::ColumnarTool<>,
51 virtual public IMETMaker
52
53 {
54 // This macro defines the constructor with the interface declaration
55 ASG_TOOL_CLASS(ColumnarMETMaker, IMETMaker)
56
57
58 // Public methods:
60 public:
61
62 // Copy constructor:
63
65 ColumnarMETMaker(const std::string& name);
66
68 virtual ~ColumnarMETMaker();
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,
78 xAOD::MissingETAssociationHelper& helper,
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(
89 xAOD::MissingET* met,
90 const xAOD::IParticleContainer* collection,
91 xAOD::MissingETAssociationHelper& helper,
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(
100 xAOD::MissingET* met,
101 const xAOD::IParticleContainer* collection,
102 xAOD::MissingETAssociationHelper& helper,
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,
121 xAOD::MissingETAssociationHelper& helper,
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,
139 xAOD::MissingETAssociationHelper& helper,
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,
153 xAOD::MissingETAssociationHelper& helper,
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,
180 xAOD::MissingETAssociationHelper& helper,
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,
193 xAOD::MissingETAssociationHelper& helper,
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,
207 xAOD::MissingETAssociationHelper& helper,
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
219 bool acceptTrack(const xAOD::TrackParticle* trk, const xAOD::Vertex* vx) const;
220 const xAOD::Vertex* getPV() const;
221
222
223 SG::ReadHandleKey<xAOD::VertexContainer> m_PVkey;
224
225 // pT threshold for suppressing warnings of objects missing in association map
226 float m_missObjWarningPtThreshold;
227
228 bool m_jetCorrectPhi{};
229 double m_jetMinEfrac{};
230 double m_jetMinWeightedPt{};
231 std::string m_jetConstitScaleMom;
232 std::string m_jetJvtMomentName;
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
244 double m_customCenJetPtCut{},m_customFwdJetPtCut{};
245 double m_customJvtPtMax{};
246 std::string m_customJvtWP;
247
248 bool m_doPFlow{};
249 bool m_doSoftTruth{};
250 bool m_doConstJet{};
251
252 bool m_useGhostMuons{};
253 bool m_doRemoveMuonJets{};
254 bool m_doRemoveElecTrks{};
255 bool m_doRemoveElecTrksEM{};
256 bool m_doSetMuonJetEMScale{};
257 bool m_skipSystematicJetSelection{};
258
259 bool m_muEloss{};
260 bool m_orCaloTaggedMuon{};
261 bool m_greedyPhotons{};
262 bool m_veryGreedyPhotons{};
263
264 // muon overlap variables
265 int m_jetTrkNMuOlap{};
266 double m_jetWidthMuOlap{};
267 double m_jetPsEMuOlap{};
268 double m_jetEmfMuOlap{};
269 double m_jetTrkPtMuPt{};
270 double m_muIDPTJetPtRatioMuOlap{};
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
278 ColumnarMETMaker();
279
280 columnar::MutableMetAccessor<columnar::ObjectColumn> m_outputMetHandle {*this, "OutputMET"};
281 columnar::Met1Accessor<columnar::ObjectColumn> m_inputMetHandle {*this, "METCore", {.addMTDependency=true}};
282 columnar::ColumnAccessor<columnar::MetAssociationDef,columnar::ObjectColumn> m_metAssocHandle {*this, "MetAssoc", {.addMTDependency=true}};
283 columnar::ParticleAccessor<columnar::ObjectColumn> m_particlesHandle {*this, "Particles"};
284 columnar::JetAccessor<columnar::ObjectColumn> m_jetsHandle {*this, "Jets"};
285 columnar::ElectronAccessor<columnar::ObjectColumn> m_electronsHandle {*this, "Electrons"};
286 columnar::PhotonAccessor<columnar::ObjectColumn> m_photonsHandle {*this, "Photons"};
287 columnar::MuonAccessor<columnar::ObjectColumn> m_muonsHandle {*this, "Muons"};
288
289 columnar::MutableMetAccessor<std::string> m_outputMetNameAcc {*this, "name"};
290 columnar::MetHelpers::MapLookupAccessor<columnar::MutableMetDef> m_outputMetMapAcc {*this};
291 columnar::MetHelpers::MetMomentumAccessors<columnar::MutableMetDef> m_outputMetMomAcc {*this};
292
293 columnar::Met1Accessor<std::string> m_inputMetNameAcc {*this, "name"};
294 columnar::MetHelpers::MapLookupAccessor<columnar::Met1Def> m_inputMetMapAcc {*this};
295 columnar::MetHelpers::MetMomentumAccessors<columnar::Met1Def> m_inputMetMomAcc {*this};
296 columnar::Met1Accessor<MissingETBase::Types::bitmask_t> m_inputMetSourceAcc {*this, "source"};
297
298 columnar::MetAssocationAccessors<> m_assocAcc {*this};
299
300 columnar::MetHelpers::InputMomentumAccessors<> m_inputMomAcc {*this};
301 Gaudi::Property<std::string> m_inputPreselectionName {this, "inputPreselection", ""};
302 std::optional<columnar::ParticleAccessor<char>> m_inputPreselectionAcc;
303 columnar::ParticleAccessor<columnar::RetypeColumn<xAOD::Muon::MuonType,std::uint16_t>> m_inputMuonTypeAcc {*this, "muonType", {.isOptional = true}};
304 columnar::MetHelpers::ObjectTypeAccessor<columnar::ParticleDef> m_inputObjTypeAcc {*this, "objectType"};
305
306 columnar::MetHelpers::ObjectWeightDecorator<> m_outputMetWeightDecRegular {*this, "", true};
307
308 columnar::MetHelpers::InputMomentumAccessors<columnar::JetDef> m_jetMomAcc {*this};
309 columnar::JetAccessor<float> m_acc_emf {*this, "EMFrac"};
310 columnar::JetAccessor<float> m_acc_psf {*this, "PSFrac"};
311 columnar::JetAccessor<float> m_acc_width {*this, "Width"};
312 columnar::JetAccessor<std::vector<int>> m_acc_trkN {*this, "NumTrkPt500"};
313 columnar::JetAccessor<std::vector<float>> m_acc_trksumpt {*this, "SumPtTrkPt500"};
314 columnar::JetAccessor<std::vector<float>> m_acc_sampleE {*this, "EnergyPerSampling"};
315
316 std::optional<columnar::MetHelpers::InputMomentumAccessors<columnar::JetDef>> m_jetConstitScaleMomAcc;
317 std::optional<columnar::MetHelpers::InputMomentumAccessors<columnar::JetDef>> m_jetConstitScaleMomFixedAcc;
318 std::optional<columnar::JetAccessor<char>> m_acc_jetRejectionDec;
319
320 columnar::MetHelpers::ObjectWeightDecorator<columnar::MutableMetDef,columnar::JetDef> m_jetOutputMetWeightDecRegular {*this, "", true};
321 columnar::MetHelpers::ObjectWeightDecorator<columnar::MutableMetDef,columnar::JetDef> m_jetOutputMetWeightDecSoft {*this, "Soft", false};
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 ADD_CMODE(met)
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
ObjectType
Definition BaseObject.h:11
boost::graph_traits< boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS > >::vertex_descriptor Vertex
JetContainer_v1 JetContainer
Definition of the current "jet container version".
MissingETContainer_v1 MissingETContainer
DataVector< IParticle > IParticleContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
RootType Type
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition AsgTool.h:133
the base class for all columnar components
::StatusCode StatusCode
StatusCode definition for legacy code.
AccessorTemplate< CI, CT, ColumnAccessMode::input, CM > ColumnAccessor
AccessorTemplate< PhotonDef, CT, ColumnAccessMode::input, CM > PhotonAccessor
Definition EgammaDef.h:43
ObjectRange< EventContextDef > EventContextRange
AccessorTemplate< ParticleDef, CT, ColumnAccessMode::input, CM > ParticleAccessor
Definition ParticleDef.h:35
AccessorTemplate< MutableMetDef, CT, ColumnAccessMode::input, CM > MutableMetAccessor
Definition MetDef.h:67
AccessorTemplate< JetDef, CT, ColumnAccessMode::input, CM > JetAccessor
Definition JetDef.h:25
AccessorTemplate< ElectronDef, CT, ColumnAccessMode::input, CM > ElectronAccessor
Definition EgammaDef.h:37
AccessorTemplate< MuonDef, CT, ColumnAccessMode::input, CM > MuonAccessor
Definition MuonDef.h:24
AccessorTemplate< Met1Def, CT, ColumnAccessMode::input, CM > Met1Accessor
Definition MetDef.h:61
#define private
Definition testRead.cxx:27