ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFramework::TauTruthMatchingWrapper Class Reference

#include <TauTruthMatchingWrapper.h>

Inheritance diagram for DerivationFramework::TauTruthMatchingWrapper:
Collaboration diagram for DerivationFramework::TauTruthMatchingWrapper:

Public Member Functions

virtual StatusCode initialize () override final
virtual StatusCode addBranches (const EventContext &ctx) const override final

Private Attributes

SG::ReadHandleKey< xAOD::TauJetContainerm_tauKey {this, "TauContainerName", "TauJets", "ReadHandleKey for input TauJetContainer"}
ToolHandle< TauAnalysisTools::ITauTruthMatchingToolm_tTauTruthMatchingTool {this, "TauTruthMatchingTool", "TauAnalysisTools::TauTruthMatchingTool"}
SG::WriteDecorHandleKey< xAOD::TauJetContainerm_isTruthMatchedKey {this, "IsTruthMatchedKey", m_tauKey, "IsTruthMatched", "WriteDecorHandleKey for IsTruthMatched decoration"}
SG::WriteDecorHandleKey< xAOD::TauJetContainerm_truthJetLinkKey {this, "TruthJetLinkKey", m_tauKey, "truthJetLink", "WriteDecorHandleKey for truthJetLink decoration"}
SG::WriteDecorHandleKey< xAOD::TauJetContainerm_truthParticleLinkKey {this, "TruthParticleLinkKey", m_tauKey, "truthParticleLink", "WriteDecorHandleKey for truthParticleLink decoration"}

Detailed Description

Definition at line 29 of file TauTruthMatchingWrapper.h.

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::TauTruthMatchingWrapper::addBranches ( const EventContext & ctx) const
finaloverridevirtual

Definition at line 26 of file TauTruthMatchingWrapper.cxx.

27 {
28 // Event context
29
30 // Read handle
31 SG::ReadHandle<xAOD::TauJetContainer> xTauContainer(m_tauKey,ctx);
32 if (!xTauContainer.isValid()) {
33 ATH_MSG_ERROR("Couldn't retrieve TauJetContainer with name " << m_tauKey);
34 return StatusCode::FAILURE;
35 }
36
37 // Loop over taus
38 std::unique_ptr<TauAnalysisTools::ITauTruthMatchingTool::ITruthTausEvent>
39 truthTausEvent = m_tTauTruthMatchingTool->getEvent();
40 for(auto xTau : *xTauContainer)
41 m_tTauTruthMatchingTool->getTruth(*xTau, *truthTausEvent);
42 ATH_CHECK( m_tTauTruthMatchingTool->lockDecorations(*xTauContainer) );
43
44 return StatusCode::SUCCESS;
45 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauKey
ToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_tTauTruthMatchingTool

◆ initialize()

StatusCode DerivationFramework::TauTruthMatchingWrapper::initialize ( )
finaloverridevirtual

Definition at line 15 of file TauTruthMatchingWrapper.cxx.

16 {
17 ATH_CHECK(m_tauKey.initialize());
18 ATH_CHECK(m_isTruthMatchedKey.initialize());
19 ATH_CHECK(m_truthJetLinkKey.initialize());
21 CHECK( m_tTauTruthMatchingTool.retrieve() );
22 return StatusCode::SUCCESS;
23 }
#define CHECK(...)
Evaluate an expression and check for errors.
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_truthParticleLinkKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_isTruthMatchedKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_truthJetLinkKey

Member Data Documentation

◆ m_isTruthMatchedKey

SG::WriteDecorHandleKey<xAOD::TauJetContainer> DerivationFramework::TauTruthMatchingWrapper::m_isTruthMatchedKey {this, "IsTruthMatchedKey", m_tauKey, "IsTruthMatched", "WriteDecorHandleKey for IsTruthMatched decoration"}
private

Definition at line 43 of file TauTruthMatchingWrapper.h.

44{this, "IsTruthMatchedKey", m_tauKey, "IsTruthMatched", "WriteDecorHandleKey for IsTruthMatched decoration"};

◆ m_tauKey

SG::ReadHandleKey<xAOD::TauJetContainer> DerivationFramework::TauTruthMatchingWrapper::m_tauKey {this, "TauContainerName", "TauJets", "ReadHandleKey for input TauJetContainer"}
private

Definition at line 38 of file TauTruthMatchingWrapper.h.

39{this, "TauContainerName", "TauJets", "ReadHandleKey for input TauJetContainer"};

◆ m_truthJetLinkKey

SG::WriteDecorHandleKey<xAOD::TauJetContainer> DerivationFramework::TauTruthMatchingWrapper::m_truthJetLinkKey {this, "TruthJetLinkKey", m_tauKey, "truthJetLink", "WriteDecorHandleKey for truthJetLink decoration"}
private

Definition at line 46 of file TauTruthMatchingWrapper.h.

47{this, "TruthJetLinkKey", m_tauKey, "truthJetLink", "WriteDecorHandleKey for truthJetLink decoration"};

◆ m_truthParticleLinkKey

SG::WriteDecorHandleKey<xAOD::TauJetContainer> DerivationFramework::TauTruthMatchingWrapper::m_truthParticleLinkKey {this, "TruthParticleLinkKey", m_tauKey, "truthParticleLink", "WriteDecorHandleKey for truthParticleLink decoration"}
private

Definition at line 49 of file TauTruthMatchingWrapper.h.

50{this, "TruthParticleLinkKey", m_tauKey, "truthParticleLink", "WriteDecorHandleKey for truthParticleLink decoration"};

◆ m_tTauTruthMatchingTool

ToolHandle< TauAnalysisTools::ITauTruthMatchingTool > DerivationFramework::TauTruthMatchingWrapper::m_tTauTruthMatchingTool {this, "TauTruthMatchingTool", "TauAnalysisTools::TauTruthMatchingTool"}
private

Definition at line 41 of file TauTruthMatchingWrapper.h.

41{this, "TauTruthMatchingTool", "TauAnalysisTools::TauTruthMatchingTool"};

The documentation for this class was generated from the following files: