|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/EventContext.h"
21 declareInterface<DerivationFramework::IAugmentationTool>(
this);
41 baseName +
".firstEgMotherTruthParticleLink";
63 return StatusCode::SUCCESS;
70 const EventContext& ctx = Gaudi::Hive::currentContext();
80 tPL(
"truthParticleLink");
109 if (tPL.isAvailable(*
el) && tPL(*el).isValid()) {
110 tPdgID(*
el) = (*tPL(*
el))->pdgId();
117 firstEgMotherTT(*
el) = 0;
118 firstEgMotherTO(*
el) = 0;
120 firstEgMotherPdgID(*
el) = 0;
127 firstEgMotherTT(*
el) =
res.first;
128 firstEgMotherTO(*
el) =
res.second;
129 firstEgMotherPdgID(*
el) = firstElTruth->
pdgId();
131 firstElTruth, *truthContainer, ctx);
132 firstEgMotherTPL(*
el) = link;
137 lastEgMotherTT(*
el) = 0;
138 lastEgMotherTO(*
el) = 0;
140 lastEgMotherPdgID(*
el) = 0;
146 lastEgMotherTT(*
el) =
res.first;
147 lastEgMotherTO(*
el) =
res.second;
148 lastEgMotherPdgID(*
el) = lastElTruth->
pdgId();
150 lastElTruth, *truthContainer, ctx);
151 lastEgMotherTPL(*
el) = link;
154 return StatusCode::SUCCESS;
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherPdgId
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthContainer
Input truth particle container.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherTruthType
Helper class to provide type-safe access to aux data.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherTruthOrigin
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherTruthOrigin
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherTruthParticleLink
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContainer
input electron container
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherTruthType
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.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_firstEgMotherPdgId
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_truthPdgId
virtual StatusCode initialize() override final
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
Handle class for adding a decoration to an object.
std::pair< std::vector< unsigned int >, bool > res
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode addBranches() const override final
Pass the thinning service
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
ElementLink implementation for ROOT usage.
BkgElectronClassification(const std::string &t, const std::string &n, const IInterface *p)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ToolHandle< IMCTruthClassifier > m_mcTruthClassifier
MCTruthClassifier.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lastEgMotherTruthParticleLink
int pdgId() const
PDG ID code.