ATLAS Offline Software
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 
24 #include <Gaudi/Accumulators.h>
25 
27 #include "GaudiKernel/EventContext.h"
28 #include "GaudiKernel/ServiceHandle.h"
29 #include "GaudiKernel/ToolHandle.h"
30 //
31 #include "EventKernel/IParticle.h"
35 //
40 //
41 #include "xAODEgamma/Egamma.h"
43 //
46 //
48 //
53 
55 //
56 #include <memory>
57 #include <string>
58 
60 {
61 public:
63  egammaForwardBuilder(const std::string& name, ISvcLocator* pSvcLocator);
64 
66  ~egammaForwardBuilder() = default;
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 
77 private:
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 
218 protected:
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 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
egammaForwardBuilder::m_eiKey
SG::ReadHandleKey< xAOD::EventInfo > m_eiKey
Input EventInfo for fwd energy calibration.
Definition: egammaForwardBuilder.h:122
egammaForwardBuilder::m_CookieCutPars
egammaClusterCookieCut::CookieCutPars m_CookieCutPars
Definition: egammaForwardBuilder.h:216
IAsgForwardElectronIsEMSelector.h
ParticleTest.eg
eg
Definition: ParticleTest.py:29
egammaForwardBuilder
Definition: egammaForwardBuilder.h:60
egammaForwardBuilder::m_forwardElectronIsEMSelectors
ToolHandleArray< IAsgForwardElectronIsEMSelector > m_forwardElectronIsEMSelectors
Handle to the selectors.
Definition: egammaForwardBuilder.h:220
Egamma
Definition: ClusMomentumPlots.cxx:11
egammaForwardBuilder::egammaForwardBuilder
egammaForwardBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: egammaForwardBuilder.cxx:28
egammaForwardBuilder::m_AllClusters
Gaudi::Accumulators::Counter m_AllClusters
Definition: egammaForwardBuilder.h:213
egammaForwardBuilder::m_doCookieCutting
Gaudi::Property< bool > m_doCookieCutting
Private member flag to do cookie cutting.
Definition: egammaForwardBuilder.h:182
IegammaOQFlagsBuilder.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
egammaForwardBuilder::RetrieveEMTrackMatchBuilder
StatusCode RetrieveEMTrackMatchBuilder()
Definition: egammaForwardBuilder.cxx:297
egammaForwardBuilder::ExecObjectQualityTool
StatusCode ExecObjectQualityTool(const EventContext &ctx, xAOD::Egamma *eg) const
Definition: egammaForwardBuilder.cxx:286
IParticle.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
egammaForwardBuilder::m_forwardElectronIsEMSelectorResultNames
Gaudi::Property< std::vector< std::string > > m_forwardElectronIsEMSelectorResultNames
Definition: egammaForwardBuilder.h:227
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
egammaForwardBuilder::m_maxDelR
Gaudi::Property< float > m_maxDelR
Size of cone to cookie cut on FCal.
Definition: egammaForwardBuilder.h:206
egammaForwardBuilder::~egammaForwardBuilder
~egammaForwardBuilder()=default
Destructor.
Egamma.h
egammaForwardBuilder::m_outClusterContainerCellLinkKey
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_outClusterContainerCellLinkKey
Output cluster container cell links: name taken from containter name.
Definition: egammaForwardBuilder.h:168
egammaClusterCookieCut.h
IegammaOQFlagsBuilder
Definition: IegammaOQFlagsBuilder.h:28
egammaForwardBuilder::initialize
virtual StatusCode initialize() override final
Initialize method.
Definition: egammaForwardBuilder.cxx:33
xAOD::EgammaParameters::TrackCaloMatchType
TrackCaloMatchType
Definition: EgammaEnums.h:174
SG::WriteHandleKey< xAOD::ElectronContainer >
ElectronContainer.h
egammaForwardBuilder::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Execute method.
Definition: egammaForwardBuilder.cxx:97
IegammaMVASvc.h
CaloCluster.h
egammaForwardBuilder::m_doEnergyCal
Gaudi::Property< bool > m_doEnergyCal
Private member flag to do energy calibration.
Definition: egammaForwardBuilder.h:107
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
egammaForwardBuilder::m_doTrackMatching
Gaudi::Property< bool > m_doTrackMatching
Private member flag to do the track matching.
Definition: egammaForwardBuilder.h:174
egammaForwardBuilder::setAllTrackCaloMatchValues
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.
egammaForwardBuilder::m_maxDelPhiCells
Gaudi::Property< int > m_maxDelPhiCells
Size of maximum search window in phi.
Definition: egammaForwardBuilder.h:198
python.getProblemFolderFromLogs.el
dictionary el
Definition: getProblemFolderFromLogs.py:48
columnar::final
CM final
Definition: ColumnAccessor.h:106
egammaForwardBuilder::m_outClusterContainerKey
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outClusterContainerKey
Output cluster container.
Definition: egammaForwardBuilder.h:160
ReadCondHandleKey.h
AthReentrantAlgorithm.h
lumiFormat.array
array
Definition: lumiFormat.py:91
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
egammaForwardBuilder::finalize
virtual StatusCode finalize() override final
Finalize method.
Definition: egammaForwardBuilder.cxx:86
egammaForwardBuilder::m_trackMatchBuilder
ToolHandle< IEMTrackMatchBuilder > m_trackMatchBuilder
Tool to perform track-cluster matching.
Definition: egammaForwardBuilder.h:99
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IegammaBaseTool.h
EventInfo.h
egammaForwardBuilder::getnPVmu
std::pair< unsigned int, float > getnPVmu(const EventContext &ctx) const
Definition: egammaForwardBuilder.cxx:317
SG::ReadCondHandleKey< CaloDetDescrManager >
VertexContainer.h
Electron
Class describing an electron.
egammaForwardBuilder::m_topoClusterKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_topoClusterKey
Input topo cluster type.
Definition: egammaForwardBuilder.h:136
CaloClusterContainer.h
private
#define private
Definition: xAODTruthCnvAlg.h:20
egammaForwardBuilder::m_pVtxKey
SG::ReadHandleKey< xAOD::VertexContainer > m_pVtxKey
Input primary vertices for fwd energy calibration.
Definition: egammaForwardBuilder.h:115
egammaForwardBuilder::m_caloDetDescrMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Calorimeter description.
Definition: egammaForwardBuilder.h:144
IEMTrackMatchBuilder.h
egammaForwardBuilder::m_MVACalibSvc
ServiceHandle< IegammaMVASvc > m_MVACalibSvc
Handle to the MVA calibration service.
Definition: egammaForwardBuilder.h:129
egammaForwardBuilder::m_MatchedClusters
Gaudi::Accumulators::Counter m_MatchedClusters
Definition: egammaForwardBuilder.h:214
egammaForwardBuilder::m_objectQualityTool
ToolHandle< IegammaOQFlagsBuilder > m_objectQualityTool
Tool to perform object quality.
Definition: egammaForwardBuilder.h:91
egammaClusterCookieCut::CookieCutPars
Definition: egammaClusterCookieCut.h:11
egammaForwardBuilder::m_maxDelEtaCells
Gaudi::Property< int > m_maxDelEtaCells
Size of maximum search window in eta.
Definition: egammaForwardBuilder.h:190
egammaForwardBuilder::m_electronOutputKey
SG::WriteHandleKey< xAOD::ElectronContainer > m_electronOutputKey
Output electron container.
Definition: egammaForwardBuilder.h:152
ServiceHandle< IegammaMVASvc >