ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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
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  }

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

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.

◆ m_tTauTruthMatchingTool

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

Definition at line 40 of file TauTruthMatchingWrapper.h.


The documentation for this class was generated from the following files:
DerivationFramework::TauTruthMatchingWrapper::m_tTauTruthMatchingTool
ToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_tTauTruthMatchingTool
Definition: TauTruthMatchingWrapper.h:40
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
DerivationFramework::TauTruthMatchingWrapper::m_tauKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauKey
Definition: TauTruthMatchingWrapper.h:38