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

 TauTruthMatchingWrapper (const std::string &t, const std::string &n, const IInterface *p)
 
StatusCode initialize ()
 
StatusCode finalize ()
 
virtual StatusCode addBranches () const
 

Private Attributes

SG::ReadHandleKey< xAOD::TauJetContainerm_tauKey {this, "TauContainerName", "TauJets", "ReadHandleKey for input TauJetContainer"}
 
ToolHandle< TauAnalysisTools::ITauTruthMatchingToolm_tTauTruthMatchingTool
 

Detailed Description

Definition at line 28 of file TauTruthMatchingWrapper.h.

Constructor & Destructor Documentation

◆ TauTruthMatchingWrapper()

DerivationFramework::TauTruthMatchingWrapper::TauTruthMatchingWrapper ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 15 of file TauTruthMatchingWrapper.cxx.

15  :
16  base_class(t,n,p),
17  m_tauKey("TauJets"),
18  m_tTauTruthMatchingTool("TauAnalysisTools::TauTruthMatchingTool")
19  {
20  declareProperty("TauContainerName", m_tauKey);
21  declareProperty("TauTruthMatchingTool", m_tTauTruthMatchingTool);
22  }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::TauTruthMatchingWrapper::addBranches ( ) const
virtual

Definition at line 36 of file TauTruthMatchingWrapper.cxx.

37  {
38  // Event context
39  const EventContext& ctx = Gaudi::Hive::currentContext();
40 
41  // Read handle
43  if (!xTauContainer.isValid()) {
44  ATH_MSG_ERROR("Couldn't retrieve TauJetContainer with name " << m_tauKey);
45  return StatusCode::FAILURE;
46  }
47 
48  // Loop over taus
49  std::unique_ptr<TauAnalysisTools::ITauTruthMatchingTool::ITruthTausEvent>
50  truthTausEvent = m_tTauTruthMatchingTool->getEvent();
51  for(auto xTau : *xTauContainer)
52  m_tTauTruthMatchingTool->getTruth(*xTau, *truthTausEvent);
53  ATH_CHECK( m_tTauTruthMatchingTool->lockDecorations(*xTauContainer) );
54 
55  return StatusCode::SUCCESS;
56  }

◆ finalize()

StatusCode DerivationFramework::TauTruthMatchingWrapper::finalize ( )

Definition at line 31 of file TauTruthMatchingWrapper.cxx.

32  {
33  return StatusCode::SUCCESS;
34  }

◆ initialize()

StatusCode DerivationFramework::TauTruthMatchingWrapper::initialize ( )

Definition at line 24 of file TauTruthMatchingWrapper.cxx.

25  {
26  ATH_CHECK(m_tauKey.initialize());
27  CHECK( m_tTauTruthMatchingTool.retrieve() );
28  return StatusCode::SUCCESS;
29  }

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
private

Definition at line 41 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:41
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
beamspotman.n
n
Definition: beamspotman.py:731
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