ATLAS Offline Software
xAODEgammaBuilder.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_XAODEGAMMABUILDER_H
6 #define EGAMMAALGS_XAODEGAMMABUILDER_H
7 
61 #include "GaudiKernel/ToolHandle.h"
62 
66 
68 
69 #include "xAODEgamma/ElectronFwd.h"
70 #include "xAODEgamma/PhotonFwd.h"
74 
82 
83 #include <memory>
84 
85 class egammaRec;
86 
88 {
89 public:
90 
91  xAODEgammaBuilder(const std::string& name, ISvcLocator* pSvcLocator);
92 
93  StatusCode initialize() override final;
94  StatusCode finalize() override final;
95  StatusCode execute(const EventContext& ctx) const override final;
96 
97 private:
102  const unsigned int author, const uint8_t type) const;
103 
108  const unsigned int author, uint8_t type) const;
109 
111  template <typename T>
112  StatusCode CallTool(const EventContext& ctx,
113  const ToolHandle<IegammaBaseTool>& tool,
114  DataVector<T> *container) const;
115 
117  ToolHandleArray<IegammaBaseTool> m_electronTools {this,
118  "ElectronTools", {}, "Tools for dressing ONLY electrons"};
119 
121  ToolHandleArray<IegammaBaseTool> m_photonTools {this,
122  "PhotonTools", {}, "Tools for dressing ONLY photons"};
123 
125  ToolHandle<IEMClusterTool> m_clusterTool {this,
126  "EMClusterTool", "egammaTools/EMClusterTool",
127  "Tool that does electron/photon final cluster building"};
128 
130  ToolHandle<IEMShowerBuilder> m_ShowerTool {this,
131  "EMShowerTool", "egammaTools/EMShowerBuilder",
132  "Tool that does electron/photon shower shape building"};
133 
135  ToolHandle<IEGammaAmbiguityTool> m_ambiguityTool {this,
136  "AmbiguityTool", "EGammaAmbiguityTool/egammaambiguitytool",
137  "Tool that does electron/photon ambiguity resolution"};
138 
140  ToolHandle<IegammaOQFlagsBuilder> m_egammaOQTool {this,
141  "ObjectQualityTool", {},
142  "Tool that adds electron/photon Object Quality info"};
143 
144  // Read/Write handlers
145 
148  "ElectronOutputName", "ElectronContainer",
149  "Name of Electron Container to be created"};
150 
153  "PhotonOutputName", "PhotonContainer",
154  "Name of Photon Container to be created"};
155 
158  "InputElectronRecCollectionName",
159  "ElectronSuperRecCollection",
160  "Input container for electron Super Cluster egammaRec objects"};
161 
164  "InputPhotonRecCollectionName",
165  "PhotonSuperRecCollection",
166  "Input container for electron Super Cluster egammaRec objects"};
167 
169  this,
170  "CaloDetDescrManager",
171  "CaloDetDescrManager",
172  "SG Key for CaloDetDescrManager in the Condition Store"
173  };
174 
177  "DummyElectronOutputName", "",
178  "Name of Dummy Electron Container to be created"};
179 
180  //
181  // Other properties.
183  Gaudi::Property<bool> m_isTruth {this, "isTruth", false, "is truth"};
184  Gaudi::Property<bool> m_doPhotons {this, "doPhotons", true, "Run the Photon reconstruction"};
185  Gaudi::Property<bool> m_doElectrons {this, "doElectrons", true, "Run the Electron reconstruction"};
186  std::unique_ptr<electronPearShapeAlignmentCorrection> m_deltaEta1Pear;
188  bool m_doOQ{};
189  bool m_doDummyElectrons = false;
190 };
191 
192 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
electronContainer
xAOD::ElectronContainer * electronContainer
Definition: TrigGlobEffCorrValidation.cxx:187
xAODEgammaBuilder::m_photonClusterRecContainerKey
SG::ReadHandleKey< EgammaRecContainer > m_photonClusterRecContainerKey
Name of input super cluster photon egammaRec container.
Definition: xAODEgammaBuilder.h:163
IEMShowerBuilder.h
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAODEgammaBuilder::m_photonTools
ToolHandleArray< IegammaBaseTool > m_photonTools
Vector of tools for dressing ONLY photons.
Definition: xAODEgammaBuilder.h:121
xAODEgammaBuilder::initialize
StatusCode initialize() override final
Definition: xAODEgammaBuilder.cxx:82
xAODEgammaBuilder::m_doPhotons
Gaudi::Property< bool > m_doPhotons
Definition: xAODEgammaBuilder.h:184
electronPearShapeAlignmentCorrection.h
xAODEgammaBuilder::CallTool
StatusCode CallTool(const EventContext &ctx, const ToolHandle< IegammaBaseTool > &tool, DataVector< T > *container) const
Call a tool using contExecute and an electron or photon container.
Definition: xAODEgammaBuilder.cxx:322
xAODEgammaBuilder::m_electronTools
ToolHandleArray< IegammaBaseTool > m_electronTools
Vector of tools for dressing ONLY electrons.
Definition: xAODEgammaBuilder.h:117
xAODEgammaBuilder::m_clusterTool
ToolHandle< IEMClusterTool > m_clusterTool
Tool to do the final electron/photon cluster building.
Definition: xAODEgammaBuilder.h:125
PhotonFwd.h
IegammaOQFlagsBuilder.h
xAODEgammaBuilder::m_doOQ
bool m_doOQ
Definition: xAODEgammaBuilder.h:188
xAODEgammaBuilder::execute
StatusCode execute(const EventContext &ctx) const override final
Definition: xAODEgammaBuilder.cxx:128
xAODEgammaBuilder::m_doAmbiguity
bool m_doAmbiguity
Definition: xAODEgammaBuilder.h:187
xAODEgammaBuilder::getElectron
bool getElectron(const egammaRec *egRec, xAOD::ElectronContainer *electronContainer, const unsigned int author, const uint8_t type) const
Given an egammaRec object, a pointer to the electron container and the author, create and dress an el...
Definition: xAODEgammaBuilder.cxx:337
xAODEgammaBuilder::finalize
StatusCode finalize() override final
Definition: xAODEgammaBuilder.cxx:122
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
xAODEgammaBuilder::m_electronOutputKey
SG::WriteHandleKey< xAOD::ElectronContainer > m_electronOutputKey
Name of the electron output collection.
Definition: xAODEgammaBuilder.h:147
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
xAODEgammaBuilder::m_ambiguityTool
ToolHandle< IEGammaAmbiguityTool > m_ambiguityTool
Tool to resolve electron/photon ambiguity.
Definition: xAODEgammaBuilder.h:135
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
IEGammaAmbiguityTool.h
xAODEgammaBuilder::m_deltaEta1Pear
std::unique_ptr< electronPearShapeAlignmentCorrection > m_deltaEta1Pear
Definition: xAODEgammaBuilder.h:186
xAODEgammaBuilder::xAODEgammaBuilder
xAODEgammaBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Definition: xAODEgammaBuilder.cxx:76
xAODEgammaBuilder::m_electronClusterRecContainerKey
SG::ReadHandleKey< EgammaRecContainer > m_electronClusterRecContainerKey
Name of input super cluster electron egammaRec container.
Definition: xAODEgammaBuilder.h:157
SG::WriteHandleKey< xAOD::ElectronContainer >
ElectronContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ElectronFwd.h
IEMClusterTool.h
xAODEgammaBuilder::m_dummyElectronOutputKey
SG::WriteHandleKey< xAOD::ElectronContainer > m_dummyElectronOutputKey
Name of the dummy electron output collection.
Definition: xAODEgammaBuilder.h:176
xAODEgammaBuilder
Definition: xAODEgammaBuilder.h:88
xAODEgammaBuilder::m_isTruth
Gaudi::Property< bool > m_isTruth
Option to do truth.
Definition: xAODEgammaBuilder.h:183
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
xAODEgammaBuilder::m_ShowerTool
ToolHandle< IEMShowerBuilder > m_ShowerTool
Tool to compute shower shapes.
Definition: xAODEgammaBuilder.h:130
photonContainer
xAOD::PhotonContainer * photonContainer
Definition: TrigGlobEffCorrValidation.cxx:189
ReadCondHandleKey.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
xAODEgammaBuilder::m_doElectrons
Gaudi::Property< bool > m_doElectrons
Definition: xAODEgammaBuilder.h:185
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IegammaBaseTool.h
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
SG::ReadCondHandleKey< CaloDetDescrManager >
xAODEgammaBuilder::getPhoton
bool getPhoton(const egammaRec *egRec, xAOD::PhotonContainer *photonContainer, const unsigned int author, uint8_t type) const
Given an egammaRec object, a pointer to the photon container and the author, create and dress a photo...
Definition: xAODEgammaBuilder.cxx:377
xAODEgammaBuilder::m_egammaOQTool
ToolHandle< IegammaOQFlagsBuilder > m_egammaOQTool
Tool to add electron/photon Object Quality info.
Definition: xAODEgammaBuilder.h:140
xAODEgammaBuilder::m_doDummyElectrons
bool m_doDummyElectrons
Definition: xAODEgammaBuilder.h:189
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:26
CaloClusterContainer.h
egammaRec
Definition: egammaRec.h:31
egammaRecContainer.h
xAODEgammaBuilder::m_photonOutputKey
SG::WriteHandleKey< xAOD::PhotonContainer > m_photonOutputKey
Name of the photon output collection.
Definition: xAODEgammaBuilder.h:152
PhotonContainer.h
xAODEgammaBuilder::m_caloDetDescrMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Definition: xAODEgammaBuilder.h:168