 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/EventContext.h"
33 ISvcLocator* pSvcLocator)
40 m_deltaEta1Pear = std::make_unique<electronPearShapeAlignmentCorrection>();
74 return StatusCode::SUCCESS;
80 return StatusCode::SUCCESS;
102 inputElRecs = electronSuperRecs.
ptr();
106 std::make_unique<xAOD::ElectronContainer>(),
107 std::make_unique<xAOD::ElectronAuxContainer>()));
115 inputPhRecs = photonSuperRecs.
ptr();
120 std::make_unique<xAOD::PhotonAuxContainer>()));
130 for (
const egammaRec* electronRec : *inputElRecs) {
132 if (electronRec->getNumberOfTrackParticles() == 0) {
140 const double elEta0 = elClus->
eta0();
141 const double elPhi0 = elClus->
phi0();
142 for (
const egammaRec* photonRec : *inputPhRecs) {
145 if (elEta0 == phClus->
eta0() && elPhi0 == phClus->
phi0()) {
150 electronRec->trackParticle(),
164 return StatusCode::FAILURE;
171 for (
const egammaRec* photonRec : *inputPhRecs) {
177 const double phEta0 = phClus->
eta0();
178 const double phPhi0 = phClus->
phi0();
179 for (
const egammaRec* electronRec : *inputElRecs) {
182 if (phEta0 == elClus->
eta0() && phPhi0 == elClus->
phi0()) {
187 electronRec->trackParticle(),
201 return StatusCode::FAILURE;
210 ATH_CHECK(caloDetDescrMgrHandle.isValid());
267 std::make_unique<xAOD::ElectronContainer>(),
268 std::make_unique<xAOD::ElectronAuxContainer>()));
270 dummyElectronContainer->
push_back(std::unique_ptr<xAOD::Electron>());
273 return StatusCode::SUCCESS;
276 template <
typename T>
279 const EventContext& ctx,
280 const ToolHandle<IegammaBaseTool>&
tool,
289 return StatusCode::SUCCESS;
295 const unsigned int author,
335 const unsigned int author,
353 if (!
photon->setVertexCaloMatchValue(
358 if (!
photon->setVertexCaloMatchValue(
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
flt_t phi0() const
Returns raw of cluster seed.
const std::array< double, 4 > & deltaPhiRescaled() const
deltaPhi for rescaled momentum extrapolation from the perigee.
xAOD::ElectronContainer * electronContainer
SG::ReadHandleKey< EgammaRecContainer > m_photonClusterRecContainerKey
Name of input super cluster photon egammaRec container.
ToolHandleArray< IegammaBaseTool > m_photonTools
Vector of tools for dressing ONLY photons.
Helper class to provide type-safe access to aux data.
float charge() const
Returns the charge.
StatusCode initialize() override final
Gaudi::Property< bool > m_doPhotons
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
StatusCode CallTool(const EventContext &ctx, const ToolHandle< IegammaBaseTool > &tool, DataVector< T > *container) const
Call a tool using contExecute and an electron or photon container.
ToolHandleArray< IegammaBaseTool > m_electronTools
Vector of tools for dressing ONLY electrons.
ToolHandle< IEMClusterTool > m_clusterTool
Tool to do the final electron/photon cluster building.
StatusCode execute(const EventContext &ctx) const override final
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...
const std::vector< ElementLink< xAOD::TrackParticleContainer > > & trackParticleElementLinks() const
Get a reference to the track particle links.
StatusCode finalize() override final
bool empty() const
Test if the key is blank.
SG::WriteHandleKey< xAOD::ElectronContainer > m_electronOutputKey
Name of the electron output collection.
const std::array< double, 4 > & deltaEta() const
deltaEta at pre sampler(0) -> 3rd sampling(3)
Definition of CaloDetDescrManager.
ToolHandle< IEGammaAmbiguityTool > m_ambiguityTool
Tool to resolve electron/photon ambiguity.
An algorithm that can be simultaneously executed in multiple threads.
std::unique_ptr< electronPearShapeAlignmentCorrection > m_deltaEta1Pear
Handle class for recording to StoreGate.
xAODEgammaBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Description of a calorimeter cluster.
const std::array< double, 4 > & deltaPhi() const
deltaPhi at pre sampler(0) -> 3rd sampling(3)
SG::ReadHandleKey< EgammaRecContainer > m_electronClusterRecContainerKey
Name of input super cluster electron egammaRec container.
double deltaPhiLast() const
deltaPhi from Last measurement
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
const std::vector< ElementLink< xAOD::CaloClusterContainer > > & caloClusterElementLinks() const
Get a reference to the calo cluster links.
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
::StatusCode StatusCode
StatusCode definition for legacy code.
float deltaPhiVtx() const
deltaPhiVtx
SG::WriteHandleKey< xAOD::ElectronContainer > m_dummyElectronOutputKey
Name of the dummy electron output collection.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Property< bool > m_isTruth
Option to do truth.
@ convMatchDeltaPhi1
difference between the cluster phi and the phi of the first track of the vertex extrapolated to the s...
ToolHandle< IEMShowerBuilder > m_ShowerTool
Tool to compute shower shapes.
xAOD::PhotonContainer * photonContainer
void calculate(xAOD::Electron &electron)
Gaudi::Property< bool > m_doElectrons
Helpers for checking error return status codes and reporting errors.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
const std::vector< ElementLink< xAOD::VertexContainer > > & vertexElementLinks() const
Get a reference to the vertix links.
const_pointer_type ptr()
Dereference the pointer.
flt_t eta0() const
Returns raw of cluster seed.
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...
ToolHandle< IegammaOQFlagsBuilder > m_egammaOQTool
Tool to add electron/photon Object Quality info.
This class provides the client interface for accessing the detector description information common to...
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
@ convMatchDeltaEta1
difference between the cluster eta and the eta of the first track of the vertex extrapolated to the s...
const uint16_t AuthorPhoton
Object Reconstructed by standard cluster-based algorithm.
iterator emplace(iterator position, value_type pElem)
Add a new element to the collection.
Class describing a TrackParticle.
SG::WriteHandleKey< xAOD::PhotonContainer > m_photonOutputKey
Name of the photon output collection.
Handle class for reading from StoreGate.
size_type size() const noexcept
Returns the number of elements in the collection.
float deltaEtaVtx() const
deltaEtaVtx
const uint16_t AuthorElectron
Object Reconstructed by standard cluster-based algorithm.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
void doAmbiguityLinks(const EventContext &ctx, DataVector< SrcT > *srcContainer, DataVector< DestT > *destContainer)