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
55//
56#include <memory>
57#include <string>
58
60{
61public:
63 egammaForwardBuilder(const std::string& name, ISvcLocator* pSvcLocator);
64
67
69 virtual StatusCode initialize() override final;
70
72 virtual StatusCode finalize() override final;
73
75 virtual StatusCode execute(const EventContext& ctx) const override final;
76
78 StatusCode RetrieveEMTrackMatchBuilder();
79 StatusCode ExecObjectQualityTool(const EventContext& ctx, xAOD::Egamma* eg) const;
80 std::pair<unsigned int, float> getnPVmu(const EventContext& ctx) const;
81
84 xAOD::Electron *el,
85 const std::array<xAOD::EgammaParameters::TrackCaloMatchType, 4> &match_parameters,
86 const std::array<double, 4> &match_values
87 ) const;
88
89
92 this,
93 "ObjectQualityTool",
94 "",
95 "Name of the object quality tool (empty tool name ignored)"
96 };
97
99 ToolHandle<IEMTrackMatchBuilder> m_trackMatchBuilder{
100 this,
101 "TrackMatchBuilderTool",
102 "EMTrackMatchBuilder",
103 "Tool that matches tracks to egammaRecs (Fwd)"
104 };
105
107 Gaudi::Property<bool> m_doEnergyCal {
108 this,
109 "doEnergyCal",
110 false,
111 "Boolean to do energy calibration"
112 };
113
116 this,
117 "PrimaryVerticesContainerKey",
118 "",
119 "Name of the primary vertex container" };
120
123 this,
124 "EventInfoKey",
125 "",
126 "Name of the EventInfo object" };
127
130 this,
131 "MVACalibSvc",
132 "egammaMVASvc",
133 "calibration service" };
134
137 this,
138 "TopoClusterName",
139 "",
140 "Name of the input cluster collection"
141 };
142
145 this,
146 "CaloDetDescrManager",
147 "CaloDetDescrManager",
148 "SG Key for CaloDetDescrManager in the Condition Store"
149 };
150
153 this,
154 "ElectronOutputName",
155 "",
156 "Name of Electron Container to be created"
157 };
158
161 this,
162 "ClusterContainerName",
163 ""
164 "Name of the output EM cluster container"
165 };
166
169 this,
170 "ClusterContainerLinks", "",
171 "Key of the output cluster container cell links; Taken from associated container"};
172
174 Gaudi::Property<bool> m_doTrackMatching {
175 this,
176 "doTrackMatching",
177 false,
178 "Boolean to do track matching"
179 };
180
182 Gaudi::Property<bool> m_doCookieCutting {
183 this,
184 "doCookieCutting",
185 false,
186 "Boolean to do cookie cutting"
187 };
188
190 Gaudi::Property<int> m_maxDelEtaCells{
191 this,
192 "MaxWindowDelEtaCells",
193 3,
194 "Size of maximum search window in eta"
195 };
196
198 Gaudi::Property<int> m_maxDelPhiCells{
199 this,
200 "MaxWindowDelPhiCells",
201 3,
202 "Size of maximum search window in phi"
203 };
204
206 Gaudi::Property<float> m_maxDelR{
207 this,
208 "MaxWindowDelR",
209 0.3,
210 "Cone size to collect cells around hottest-cell FCAL"
211 };
212
213 mutable Gaudi::Accumulators::Counter<> m_AllClusters {};
214 mutable Gaudi::Accumulators::Counter<> m_MatchedClusters {};
215
217
218protected:
220 ToolHandleArray<IAsgForwardElectronIsEMSelector> m_forwardElectronIsEMSelectors {
221 this,
222 "forwardelectronIsEMselectors",
223 {},
224 "The selectors that we need to apply to the FwdElectron object"
225 };
226
227 Gaudi::Property<std::vector<std::string>> m_forwardElectronIsEMSelectorResultNames {
228 this,
229 "forwardelectronIsEMselectorResultNames",
230 {},
231 "The selector result names"
232 };
233};
234#endif
235
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.
ToolHandleArray< IAsgForwardElectronIsEMSelector > m_forwardElectronIsEMSelectors
Handle to the selectors.
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
SG::ReadHandleKey< xAOD::VertexContainer > m_pVtxKey
Input primary vertices for fwd energy calibration.
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_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