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 //
45 //
49 //
51 //
52 #include <memory>
53 #include <string>
54 
56 {
57 public:
59  egammaForwardBuilder(const std::string& name, ISvcLocator* pSvcLocator);
60 
62  ~egammaForwardBuilder() = default;
63 
65  virtual StatusCode initialize() override final;
66 
68  virtual StatusCode finalize() override final;
69 
71  virtual StatusCode execute(const EventContext& ctx) const override final;
72 
73 private:
76 
79  xAOD::Electron *el,
80  const std::array<xAOD::EgammaParameters::TrackCaloMatchType, 4> &match_parameters,
81  const std::array<double, 4> &match_values
82  ) const;
83 
84 
87  this,
88  "ObjectQualityTool",
89  "",
90  "Name of the object quality tool (empty tool name ignored)"
91  };
92 
94  ToolHandle<IEMTrackMatchBuilder> m_trackMatchBuilder{
95  this,
96  "TrackMatchBuilderTool",
97  "EMTrackMatchBuilder",
98  "Tool that matches tracks to egammaRecs (Fwd)"
99  };
100 
103  this,
104  "TopoClusterName",
105  "",
106  "Name of the input cluster collection"
107  };
108 
111  this,
112  "CaloDetDescrManager",
113  "CaloDetDescrManager",
114  "SG Key for CaloDetDescrManager in the Condition Store"
115  };
116 
119  this,
120  "ElectronOutputName",
121  "",
122  "Name of Electron Container to be created"
123  };
124 
127  this,
128  "ClusterContainerName",
129  ""
130  "Name of the output EM cluster container"
131  };
132 
135  this,
136  "ClusterContainerLinks", "",
137  "Key of the output cluster container cell links; Taken from associated container"};
138 
140  Gaudi::Property<bool> m_doTrackMatching {
141  this,
142  "doTrackMatching",
143  false,
144  "Boolean to do track matching"
145  };
146 
148  Gaudi::Property<bool> m_doCookieCutting {
149  this,
150  "doCookieCutting",
151  false,
152  "Boolean to do cookie cutting"
153  };
154 
156  Gaudi::Property<int> m_maxDelEtaCells{
157  this,
158  "MaxWindowDelEtaCells",
159  3,
160  "Size of maximum search window in eta"
161  };
162 
164  Gaudi::Property<int> m_maxDelPhiCells{
165  this,
166  "MaxWindowDelPhiCells",
167  3,
168  "Size of maximum search window in phi"
169  };
170 
172  Gaudi::Property<float> m_maxDelR{
173  this,
174  "MaxWindowDelR",
175  0.3,
176  "Cone size to collect cells around hottest-cell FCAL"
177  };
178 
179  mutable Gaudi::Accumulators::Counter<> m_AllClusters {};
180  mutable Gaudi::Accumulators::Counter<> m_MatchedClusters {};
181 
183 
184 protected:
186  ToolHandleArray<IAsgForwardElectronIsEMSelector> m_forwardElectronIsEMSelectors {
187  this,
188  "forwardelectronIsEMselectors",
189  {},
190  "The selectors that we need to apply to the FwdElectron object"
191  };
192 
193  Gaudi::Property<std::vector<std::string>> m_forwardElectronIsEMSelectorResultNames {
194  this,
195  "forwardelectronIsEMselectorResultNames",
196  {},
197  "The selector result names"
198  };
199 };
200 #endif
201 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
egammaForwardBuilder::m_CookieCutPars
egammaClusterCookieCut::CookieCutPars m_CookieCutPars
Definition: egammaForwardBuilder.h:182
IAsgForwardElectronIsEMSelector.h
ParticleTest.eg
eg
Definition: ParticleTest.py:29
egammaForwardBuilder
Definition: egammaForwardBuilder.h:56
egammaForwardBuilder::m_forwardElectronIsEMSelectors
ToolHandleArray< IAsgForwardElectronIsEMSelector > m_forwardElectronIsEMSelectors
Handle to the selectors.
Definition: egammaForwardBuilder.h:186
Egamma
Definition: ClusMomentumPlots.cxx:11
egammaForwardBuilder::egammaForwardBuilder
egammaForwardBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: egammaForwardBuilder.cxx:29
egammaForwardBuilder::m_AllClusters
Gaudi::Accumulators::Counter m_AllClusters
Definition: egammaForwardBuilder.h:179
egammaForwardBuilder::m_doCookieCutting
Gaudi::Property< bool > m_doCookieCutting
Private member flag to do cookie cutting.
Definition: egammaForwardBuilder.h:148
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:277
egammaForwardBuilder::ExecObjectQualityTool
StatusCode ExecObjectQualityTool(const EventContext &ctx, xAOD::Egamma *eg) const
Definition: egammaForwardBuilder.cxx:266
IParticle.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< xAOD::CaloClusterContainer >
egammaForwardBuilder::m_forwardElectronIsEMSelectorResultNames
Gaudi::Property< std::vector< std::string > > m_forwardElectronIsEMSelectorResultNames
Definition: egammaForwardBuilder.h:193
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:172
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:134
egammaClusterCookieCut.h
IegammaOQFlagsBuilder
Definition: IegammaOQFlagsBuilder.h:28
egammaForwardBuilder::initialize
virtual StatusCode initialize() override final
Initialize method.
Definition: egammaForwardBuilder.cxx:34
xAOD::EgammaParameters::TrackCaloMatchType
TrackCaloMatchType
Definition: EgammaEnums.h:173
SG::WriteHandleKey< xAOD::ElectronContainer >
ElectronContainer.h
egammaForwardBuilder::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Execute method.
Definition: egammaForwardBuilder.cxx:91
CaloCluster.h
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:140
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:164
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
columnar::final
CM final
Definition: ColumnAccessor.h:106
egammaForwardBuilder::m_outClusterContainerKey
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outClusterContainerKey
Output cluster container.
Definition: egammaForwardBuilder.h:126
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:80
egammaForwardBuilder::m_trackMatchBuilder
ToolHandle< IEMTrackMatchBuilder > m_trackMatchBuilder
Tool to perform track-cluster matching.
Definition: egammaForwardBuilder.h:94
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IegammaBaseTool.h
SG::ReadCondHandleKey< CaloDetDescrManager >
Electron
Class describing an electron.
egammaForwardBuilder::m_topoClusterKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_topoClusterKey
Input topo cluster type.
Definition: egammaForwardBuilder.h:102
CaloClusterContainer.h
private
#define private
Definition: xAODTruthCnvAlg.h:20
egammaForwardBuilder::m_caloDetDescrMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Calorimeter description.
Definition: egammaForwardBuilder.h:110
IEMTrackMatchBuilder.h
egammaForwardBuilder::m_MatchedClusters
Gaudi::Accumulators::Counter m_MatchedClusters
Definition: egammaForwardBuilder.h:180
egammaForwardBuilder::m_objectQualityTool
ToolHandle< IegammaOQFlagsBuilder > m_objectQualityTool
Tool to perform object quality.
Definition: egammaForwardBuilder.h:86
egammaClusterCookieCut::CookieCutPars
Definition: egammaClusterCookieCut.h:11
egammaForwardBuilder::m_maxDelEtaCells
Gaudi::Property< int > m_maxDelEtaCells
Size of maximum search window in eta.
Definition: egammaForwardBuilder.h:156
egammaForwardBuilder::m_electronOutputKey
SG::WriteHandleKey< xAOD::ElectronContainer > m_electronOutputKey
Output electron container.
Definition: egammaForwardBuilder.h:118