7#include "GaudiKernel/EventContext.h"
43 return StatusCode::SUCCESS;
90 if (tPL.isPresent() && tPL(*el).isValid()) {
91 tPdgID(*el) = (*tPL(*el))->pdgId();
98 firstEgMotherTT(*el) = 0;
99 firstEgMotherTO(*el) = 0;
100 firstEgMotherTC(*el) = 0;
102 firstEgMotherPdgID(*el) = 0;
109 firstEgMotherTT(*el) =
res.first;
110 firstEgMotherTO(*el) =
res.second;
112 firstEgMotherPdgID(*el) = firstElTruth->
pdgId();
114 firstElTruth, *truthContainer, ctx);
115 firstEgMotherTPL(*el) = link;
120 lastEgMotherTT(*el) = 0;
121 lastEgMotherTO(*el) = 0;
122 lastEgMotherTC(*el) = 0;
124 lastEgMotherPdgID(*el) = 0;
130 lastEgMotherTT(*el) =
res.first;
131 lastEgMotherTO(*el) =
res.second;
133 lastEgMotherPdgID(*el) = lastElTruth->
pdgId();
135 lastElTruth, *truthContainer, ctx);
136 lastEgMotherTPL(*el) = link;
139 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
std::pair< std::vector< unsigned int >, bool > res
Handle class for reading a decoration on an object.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherTruthOrigin
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContainer
input electron container
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_truthPdgId
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherTruthParticleLink
virtual StatusCode addBranches(const EventContext &ctx) const override final
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthContainer
Input truth particle container.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherTruthClassification
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherPdgId
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherTruthType
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherTruthOrigin
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherTruthParticleLink
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherTruthType
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherPdgId
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronTruthParticleLink
ToolHandle< IMCTruthClassifier > m_mcTruthClassifier
MCTruthClassifier.
virtual StatusCode initialize() override final
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherTruthClassification
ElementLink implementation for ROOT usage.
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
int pdgId() const
PDG ID code.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::tuple< unsigned int, T > defOrigOfParticle(T thePart)
const xAOD::TruthParticle * getBkgElectronMother(const xAOD::Electron *el, const bool allTheWayBack=true)
Helper wrapper function for calling the function above extracting the truth from a reco electron.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
TruthParticle_v1 TruthParticle
Typedef to implementation.
Electron_v1 Electron
Definition of the current "egamma version".