ATLAS Offline Software
Loading...
Searching...
No Matches
egammaForwardBuilder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef EGAMMAALGS_EGAMMAFORWARDBUILDER_H
6#define EGAMMAALGS_EGAMMAFORWARDBUILDER_H
7
23
24#include <Gaudi/Accumulators.h>
25
27#include "GaudiKernel/EventContext.h"
28#include "GaudiKernel/ServiceHandle.h"
29#include "GaudiKernel/ToolHandle.h"
30//
35//
40//
41#include "xAODEgamma/Egamma.h"
43//
46//
48//
53
54
58//
59#include <memory>
60#include <string>
61
62
63
64
66{
67public:
69 egammaForwardBuilder(const std::string& name, ISvcLocator* pSvcLocator);
70
73
75 virtual StatusCode initialize() override final;
76
78 virtual StatusCode finalize() override final;
79
81 virtual StatusCode execute(const EventContext& ctx) const override final;
82
84 StatusCode RetrieveEMTrackMatchBuilder();
85 StatusCode ExecObjectQualityTool(const EventContext& ctx, xAOD::Egamma* eg) const;
86 std::pair<unsigned int, float> getnPVmu(const EventContext& ctx) const;
87
90 xAOD::Electron *el,
91 const std::array<xAOD::EgammaParameters::TrackCaloMatchType, 4> &match_parameters,
92 const std::array<double, 4> &match_values
93 ) const;
94
95
98 this,
99 "ObjectQualityTool",
100 "",
101 "Name of the object quality tool (empty tool name ignored)"
102 };
103
105 ToolHandle<IEMTrackMatchBuilder> m_trackMatchBuilder{
106 this,
107 "TrackMatchBuilderTool",
108 "EMTrackMatchBuilder",
109 "Tool that matches tracks to egammaRecs (Fwd)"
110 };
111
113 Gaudi::Property<bool> m_doEnergyCal {
114 this,
115 "doEnergyCal",
116 false,
117 "Boolean to do energy calibration"
118 };
119
120
122 Gaudi::Property<bool> m_dopTCal {
123 this,
124 "dopTCal",
125 false,
126 "Boolean to do pT calibration"
127 };
128
129 Gaudi::Property<bool> m_fwdDNN {
130 this,
131 "dofwdDNN",
132 false,
133 "Boolean to do forward DNN identification"
134 };
135
136
139 this,
140 "PrimaryVerticesContainerKey",
141 "",
142 "Name of the primary vertex container" };
143
146 this,
147 "EventInfoKey",
148 "",
149 "Name of the EventInfo object" };
150
153 this,
154 "MVACalibSvc",
155 "egammaMVASvc",
156 "calibration service" };
157
160 this,
161 "TopoClusterName",
162 "",
163 "Name of the input cluster collection"
164 };
165
168 this,
169 "CaloDetDescrManager",
170 "CaloDetDescrManager",
171 "SG Key for CaloDetDescrManager in the Condition Store"
172 };
173
176 this,
177 "ElectronOutputName",
178 "",
179 "Name of Electron Container to be created"
180 };
181
184 this,
185 "ClusterContainerName",
186 ""
187 "Name of the output EM cluster container"
188 };
189
192 this,
193 "ClusterContainerLinks", "",
194 "Key of the output cluster container cell links; Taken from associated container"};
195
197 Gaudi::Property<bool> m_doTrackMatching {
198 this,
199 "doTrackMatching",
200 false,
201 "Boolean to do track matching"
202 };
203
205 Gaudi::Property<bool> m_doCookieCutting {
206 this,
207 "doCookieCutting",
208 false,
209 "Boolean to do cookie cutting"
210 };
211
213 Gaudi::Property<int> m_maxDelEtaCells{
214 this,
215 "MaxWindowDelEtaCells",
216 3,
217 "Size of maximum search window in eta"
218 };
219
221 Gaudi::Property<int> m_maxDelPhiCells{
222 this,
223 "MaxWindowDelPhiCells",
224 3,
225 "Size of maximum search window in phi"
226 };
227
229 Gaudi::Property<float> m_maxDelR{
230 this,
231 "MaxWindowDelR",
232 0.3,
233 "Cone size to collect cells around hottest-cell FCAL"
234 };
235
236 mutable Gaudi::Accumulators::Counter<> m_AllClusters {};
237 mutable Gaudi::Accumulators::Counter<> m_MatchedClusters {};
238
240
241protected:
243 ToolHandleArray<IAsgForwardElectronIsEMSelector> m_forwardElectronIsEMSelectors {
244 this,
245 "forwardelectronIsEMselectors",
246 {},
247 "The selectors that we need to apply to the FwdElectron object"
248 };
249
250 ToolHandleArray<IAsgElectronLikelihoodTool> m_forwardElectronNNSelectors {
251 this,
252 "forwardelectronNNselectors",
253 {},
254 "The selectors that we need to apply to the FwdElectron object"
255 };
256
257
258 ToolHandle<IForwardElectronCalib> m_forwardElectronpTCalib {
259 this,
260 "forwardelectronNNCalib",
261 {},
262 "The tool that we need to calibrate the pT of the FwdElectron object"
263 };
264
265
266 Gaudi::Property<std::vector<std::string>> m_forwardElectronIsEMSelectorResultNames {
267 this,
268 "forwardelectronIsEMselectorResultNames",
269 {},
270 "The selector result names"
271 };
272
273 Gaudi::Property<std::vector<std::string>> m_forwardElectronNNSelectorResultNames {
274 this,
275 "forwardelectronNNselectorResultNames",
276 {},
277 "The selector result names"
278 };
279
280};
281#endif
282
Definition of CaloDetDescrManager.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
ToolHandle< IForwardElectronCalib > m_forwardElectronpTCalib
ToolHandleArray< IAsgForwardElectronIsEMSelector > m_forwardElectronIsEMSelectors
Handle to the selectors.
Gaudi::Property< bool > m_dopTCal
Private member flag to do pT calibration.
std::pair< unsigned int, float > getnPVmu(const EventContext &ctx) const
Gaudi::Property< bool > m_doCookieCutting
Private member flag to do cookie cutting.
virtual StatusCode execute(const EventContext &ctx) const override final
Execute method.
Gaudi::Property< float > m_maxDelR
Size of cone to cookie cut on FCal.
Gaudi::Accumulators::Counter m_AllClusters
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_topoClusterKey
Input topo cluster type.
ServiceHandle< IegammaMVASvc > m_MVACalibSvc
Handle to the MVA calibration service.
Gaudi::Property< int > m_maxDelEtaCells
Size of maximum search window in eta.
SG::ReadHandleKey< xAOD::EventInfo > m_eiKey
Input EventInfo for fwd energy calibration.
Gaudi::Property< bool > m_doEnergyCal
Private member flag to do energy calibration.
egammaClusterCookieCut::CookieCutPars m_CookieCutPars
ToolHandleArray< IAsgElectronLikelihoodTool > m_forwardElectronNNSelectors
SG::ReadHandleKey< xAOD::VertexContainer > m_pVtxKey
Input primary vertices for fwd energy calibration.
Gaudi::Property< bool > m_fwdDNN
StatusCode ExecObjectQualityTool(const EventContext &ctx, xAOD::Egamma *eg) const
ToolHandle< IegammaOQFlagsBuilder > m_objectQualityTool
Tool to perform object quality.
virtual StatusCode finalize() override final
Finalize method.
virtual StatusCode initialize() override final
Initialize method.
void setAllTrackCaloMatchValues(xAOD::Electron *el, const std::array< xAOD::EgammaParameters::TrackCaloMatchType, 4 > &match_parameters, const std::array< double, 4 > &match_values) const
Convinience wrapper to set track match values in all samplings.
SG::WriteHandleKey< xAOD::ElectronContainer > m_electronOutputKey
Output electron container.
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outClusterContainerKey
Output cluster container.
ToolHandle< IEMTrackMatchBuilder > m_trackMatchBuilder
Tool to perform track-cluster matching.
Gaudi::Property< bool > m_doTrackMatching
Private member flag to do the track matching.
egammaForwardBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
~egammaForwardBuilder()=default
Destructor.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Calorimeter description.
Gaudi::Accumulators::Counter m_MatchedClusters
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_outClusterContainerCellLinkKey
Output cluster container cell links: name taken from containter name.
Gaudi::Property< std::vector< std::string > > m_forwardElectronNNSelectorResultNames
Gaudi::Property< std::vector< std::string > > m_forwardElectronIsEMSelectorResultNames
Gaudi::Property< int > m_maxDelPhiCells
Size of maximum search window in phi.
STL class.
Class describing an electron.
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
#define private
Definition testRead.cxx:27