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 //
47 //
49 //
50 #include <memory>
51 #include <string>
52 
54 {
55 public:
57  egammaForwardBuilder(const std::string& name, ISvcLocator* pSvcLocator);
58 
60  ~egammaForwardBuilder() = default;
61 
63  virtual StatusCode initialize() override final;
64 
66  virtual StatusCode finalize() override final;
67 
69  virtual StatusCode execute(const EventContext& ctx) const override final;
70 
71 private:
74 
77  xAOD::Electron *el,
78  const std::array<xAOD::EgammaParameters::TrackCaloMatchType, 4> &match_parameters,
79  const std::array<double, 4> &match_values
80  ) const;
81 
83  std::unique_ptr<xAOD::CaloCluster> cookieCut(
84  const xAOD::CaloCluster& cluster,
87  ) const;
88 
91  this,
92  "ObjectQualityTool",
93  "",
94  "Name of the object quality tool (empty tool name ignored)"
95  };
96 
98  ToolHandle<IEMTrackMatchBuilder> m_trackMatchBuilder{
99  this,
100  "TrackMatchBuilderTool",
101  "EMTrackMatchBuilder",
102  "Tool that matches tracks to egammaRecs (Fwd)"
103  };
104 
107  this,
108  "TopoClusterName",
109  "",
110  "Name of the input cluster collection"
111  };
112 
115  this,
116  "CaloDetDescrManager",
117  "CaloDetDescrManager",
118  "SG Key for CaloDetDescrManager in the Condition Store"
119  };
120 
123  this,
124  "ElectronOutputName",
125  "",
126  "Name of Electron Container to be created"
127  };
128 
131  this,
132  "ClusterContainerName",
133  ""
134  "Name of the output EM cluster container"
135  };
136 
139 
141  Gaudi::Property<bool> m_doTrackMatching {
142  this,
143  "doTrackMatching",
144  false,
145  "Boolean to do track matching"
146  };
147 
149  Gaudi::Property<bool> m_doCookieCutting {
150  this,
151  "doCookieCutting",
152  false,
153  "Boolean to do cookie cutting"
154  };
155 
157  Gaudi::Property<int> m_maxDelEtaCells{
158  this,
159  "MaxWindowDelEtaCells",
160  3,
161  "Size of maximum search window in eta"
162  };
163 
165  Gaudi::Property<int> m_maxDelPhiCells{
166  this,
167  "MaxWindowDelPhiCells",
168  3,
169  "Size of maximum search window in phi"
170  };
171 
173  Gaudi::Property<float> m_maxDelR{
174  this,
175  "MaxWindowDelR",
176  0.3,
177  "Cone size to collect cells around hottest-cell FCAL"
178  };
179 
180  mutable Gaudi::Accumulators::Counter<> m_AllClusters {};
181  mutable Gaudi::Accumulators::Counter<> m_MatchedClusters {};
182 
183  float m_maxDelEta {};
184  float m_maxDelPhi {};
185  float m_maxDelR2 {};
186 
187 protected:
189  ToolHandleArray<IAsgForwardElectronIsEMSelector> m_forwardElectronIsEMSelectors {
190  this,
191  "forwardelectronIsEMselectors",
192  {},
193  "The selectors that we need to apply to the FwdElectron object"
194  };
195 
196  Gaudi::Property<std::vector<std::string>> m_forwardElectronIsEMSelectorResultNames {
197  this,
198  "forwardelectronIsEMselectorResultNames",
199  {},
200  "The selector result names"
201  };
202 };
203 #endif
204 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
egammaForwardBuilder::m_maxDelEta
float m_maxDelEta
Definition: egammaForwardBuilder.h:183
IAsgForwardElectronIsEMSelector.h
ParticleTest.eg
eg
Definition: ParticleTest.py:29
egammaForwardBuilder
Definition: egammaForwardBuilder.h:54
egammaForwardBuilder::m_forwardElectronIsEMSelectors
ToolHandleArray< IAsgForwardElectronIsEMSelector > m_forwardElectronIsEMSelectors
Handle to the selectors.
Definition: egammaForwardBuilder.h:189
Egamma
Definition: ClusMomentumPlots.cxx:11
egammaForwardBuilder::egammaForwardBuilder
egammaForwardBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: egammaForwardBuilder.cxx:44
egammaForwardBuilder::m_AllClusters
Gaudi::Accumulators::Counter m_AllClusters
Definition: egammaForwardBuilder.h:180
egammaForwardBuilder::m_doCookieCutting
Gaudi::Property< bool > m_doCookieCutting
Private member flag to do cookie cutting.
Definition: egammaForwardBuilder.h:149
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:289
egammaForwardBuilder::ExecObjectQualityTool
StatusCode ExecObjectQualityTool(const EventContext &ctx, xAOD::Egamma *eg) const
Definition: egammaForwardBuilder.cxx:278
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:196
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
egammaForwardBuilder::m_maxDelR
Gaudi::Property< float > m_maxDelR
Size of cone to cookie cut on FCal.
Definition: egammaForwardBuilder.h:173
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
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:138
IegammaOQFlagsBuilder
Definition: IegammaOQFlagsBuilder.h:28
egammaForwardBuilder::initialize
virtual StatusCode initialize() override final
Initialize method.
Definition: egammaForwardBuilder.cxx:49
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:104
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:141
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:165
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
CaloCluster
Principal data class for CaloCell clusters.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
egammaForwardBuilder::m_outClusterContainerKey
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outClusterContainerKey
Output cluster container.
Definition: egammaForwardBuilder.h:130
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:93
egammaForwardBuilder::m_trackMatchBuilder
ToolHandle< IEMTrackMatchBuilder > m_trackMatchBuilder
Tool to perform track-cluster matching.
Definition: egammaForwardBuilder.h:98
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IegammaBaseTool.h
egammaForwardBuilder::cookieCut
std::unique_ptr< xAOD::CaloCluster > cookieCut(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &mgr, const DataLink< CaloCellContainer > &cellCont) const
Remove cells that are too far from the center of mass.
Definition: egammaForwardBuilder.cxx:309
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
SG::ReadCondHandleKey< CaloDetDescrManager >
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
Electron
Class describing an electron.
egammaForwardBuilder::m_topoClusterKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_topoClusterKey
Input topo cluster type.
Definition: egammaForwardBuilder.h:106
CaloClusterContainer.h
egammaForwardBuilder::m_caloDetDescrMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Calorimeter description.
Definition: egammaForwardBuilder.h:114
IEMTrackMatchBuilder.h
egammaForwardBuilder::m_MatchedClusters
Gaudi::Accumulators::Counter m_MatchedClusters
Definition: egammaForwardBuilder.h:181
egammaForwardBuilder::m_maxDelPhi
float m_maxDelPhi
Definition: egammaForwardBuilder.h:184
egammaForwardBuilder::m_objectQualityTool
ToolHandle< IegammaOQFlagsBuilder > m_objectQualityTool
Tool to perform object quality.
Definition: egammaForwardBuilder.h:90
egammaForwardBuilder::m_maxDelR2
float m_maxDelR2
Definition: egammaForwardBuilder.h:185
egammaForwardBuilder::m_maxDelEtaCells
Gaudi::Property< int > m_maxDelEtaCells
Size of maximum search window in eta.
Definition: egammaForwardBuilder.h:157
egammaForwardBuilder::m_electronOutputKey
SG::WriteHandleKey< xAOD::ElectronContainer > m_electronOutputKey
Output electron container.
Definition: egammaForwardBuilder.h:122