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"}

Detailed Description

Definition at line 28 of file TauTruthMatchingWrapper.h.

Member Function Documentation

◆ addBranches()

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

Definition at line 23 of file TauTruthMatchingWrapper.cxx.

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

Member Data Documentation

◆ m_tauKey

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

Definition at line 37 of file TauTruthMatchingWrapper.h.

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

◆ m_tTauTruthMatchingTool

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

Definition at line 40 of file TauTruthMatchingWrapper.h.

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

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