ATLAS Offline Software
Public Member Functions | Private Types | Private Attributes | List of all members
DerivationFramework::TVAAugmentationTool Class Reference

#include <TVAAugmentationTool.h>

Inheritance diagram for DerivationFramework::TVAAugmentationTool:
Collaboration diagram for DerivationFramework::TVAAugmentationTool:

Public Member Functions

 TVAAugmentationTool (const std::string &t, const std::string &n, const IInterface *p)
 
virtual StatusCode initialize () override final
 
virtual StatusCode addBranches (const EventContext &ctx) const override final
 

Private Types

using vtxLink_t = ElementLink< xAOD::VertexContainer >
 

Private Attributes

SG::ReadHandleKey< xAOD::TrackParticleContainerm_trackName {this, "TrackName", "InDetTrackParticles"}
 
SG::ReadHandleKey< xAOD::VertexContainerm_vertexName {this, "VertexName", "PrimaryVertices"}
 
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_vtxDec_key {this, "LinkName", m_trackName, "", "Decoration for associated vertex"}
 
PublicToolHandle< CP::ITrackVertexAssociationToolm_tool {this, "TVATool", ""}
 

Detailed Description

Definition at line 18 of file TVAAugmentationTool.h.

Member Typedef Documentation

◆ vtxLink_t

Definition at line 32 of file TVAAugmentationTool.h.

Constructor & Destructor Documentation

◆ TVAAugmentationTool()

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

Definition at line 10 of file TVAAugmentationTool.cxx.

13  :
14  base_class(t, n, p)
15  {
16  }

Member Function Documentation

◆ addBranches()

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

Definition at line 29 of file TVAAugmentationTool.cxx.

30  {
32 
35 
36  xAOD::TrackVertexAssociationMap matchMap = m_tool->getMatchMap(*tracks, *vertices);
37 
38  for (const xAOD::Vertex* ivtx : *vertices)
39  for (const xAOD::TrackParticle* itrk : matchMap[ivtx])
40  vtxDec_handle(*itrk).toContainedElement(*vertices, ivtx);
41 
42  return StatusCode::SUCCESS;
43  }

◆ initialize()

StatusCode DerivationFramework::TVAAugmentationTool::initialize ( )
finaloverridevirtual

Definition at line 18 of file TVAAugmentationTool.cxx.

19  {
20  ATH_MSG_DEBUG("Initialising TVAAugmentationTool " << name() );
22  ATH_CHECK( m_vertexName.initialize() );
24  ATH_CHECK( m_tool.retrieve() );
25 
26  return StatusCode::SUCCESS;
27  }

Member Data Documentation

◆ m_tool

PublicToolHandle<CP::ITrackVertexAssociationTool> DerivationFramework::TVAAugmentationTool::m_tool {this, "TVATool", ""}
private

Definition at line 30 of file TVAAugmentationTool.h.

◆ m_trackName

SG::ReadHandleKey<xAOD::TrackParticleContainer> DerivationFramework::TVAAugmentationTool::m_trackName {this, "TrackName", "InDetTrackParticles"}
private

Definition at line 27 of file TVAAugmentationTool.h.

◆ m_vertexName

SG::ReadHandleKey<xAOD::VertexContainer> DerivationFramework::TVAAugmentationTool::m_vertexName {this, "VertexName", "PrimaryVertices"}
private

Definition at line 28 of file TVAAugmentationTool.h.

◆ m_vtxDec_key

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> DerivationFramework::TVAAugmentationTool::m_vtxDec_key {this, "LinkName", m_trackName, "", "Decoration for associated vertex"}
private

Definition at line 29 of file TVAAugmentationTool.h.


The documentation for this class was generated from the following files:
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
xAOD::TrackVertexAssociationMap
std::map< const xAOD::Vertex *, xAOD::TrackVertexAssociationList > TrackVertexAssociationMap
Definition: TrackVertexAssociationMap.h:19
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
beamspotman.n
n
Definition: beamspotman.py:727
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DerivationFramework::TVAAugmentationTool::m_vertexName
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexName
Definition: TVAAugmentationTool.h:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
DerivationFramework::TVAAugmentationTool::m_trackName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackName
Definition: TVAAugmentationTool.h:27
DerivationFramework::TVAAugmentationTool::m_tool
PublicToolHandle< CP::ITrackVertexAssociationTool > m_tool
Definition: TVAAugmentationTool.h:30
DerivationFramework::TVAAugmentationTool::m_vtxDec_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_vtxDec_key
Definition: TVAAugmentationTool.h:29
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43