Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 ()
 
virtual StatusCode addBranches () const
 

Private Types

using vtxLink_t = ElementLink< xAOD::VertexContainer >
 

Private Attributes

std::string m_linkName
 
std::string m_trackName
 
std::string m_vertexName
 
ToolHandle< CP::ITrackVertexAssociationToolm_tool
 
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_vtxDec_key {this, "vtxDecKey", "", "Decoration for associated vertex"}
 

Detailed Description

Definition at line 17 of file TVAAugmentationTool.h.

Member Typedef Documentation

◆ vtxLink_t

Definition at line 31 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 11 of file TVAAugmentationTool.cxx.

14  :
15  base_class(t, n, p)
16  {
17  declareProperty("LinkName", m_linkName, "The name of the output links");
18  declareProperty("TrackName", m_trackName="InDetTrackParticles");
19  declareProperty("VertexName", m_vertexName="PrimaryVertices");
20  declareProperty("TVATool", m_tool);
21  }

Member Function Documentation

◆ addBranches()

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

Definition at line 34 of file TVAAugmentationTool.cxx.

35  {
36 
38 
39  const xAOD::VertexContainer* vertices = nullptr;
40  ATH_CHECK(evtStore()->retrieve(vertices, m_vertexName) );
41  const xAOD::TrackParticleContainer* tracks = nullptr;
42  ATH_CHECK(evtStore()->retrieve(tracks, m_trackName) );
43 
44  xAOD::TrackVertexAssociationMap matchMap = m_tool->getMatchMap(*tracks, *vertices);
45 
46  for (const xAOD::Vertex* ivtx : *vertices)
47  for (const xAOD::TrackParticle* itrk : matchMap[ivtx])
48  vtxDec_handle(*itrk).toContainedElement(*vertices, ivtx);
49 
50  return StatusCode::SUCCESS;
51  }

◆ initialize()

StatusCode DerivationFramework::TVAAugmentationTool::initialize ( )
virtual

Definition at line 23 of file TVAAugmentationTool.cxx.

24  {
25  ATH_MSG_INFO("Initialising TVAAugmentationTool " << name() );
26  ATH_CHECK( m_tool.retrieve() );
27 
30 
31  return StatusCode::SUCCESS;
32  }

Member Data Documentation

◆ m_linkName

std::string DerivationFramework::TVAAugmentationTool::m_linkName
private

Definition at line 26 of file TVAAugmentationTool.h.

◆ m_tool

ToolHandle<CP::ITrackVertexAssociationTool> DerivationFramework::TVAAugmentationTool::m_tool
private

Definition at line 29 of file TVAAugmentationTool.h.

◆ m_trackName

std::string DerivationFramework::TVAAugmentationTool::m_trackName
private

Definition at line 27 of file TVAAugmentationTool.h.

◆ m_vertexName

std::string DerivationFramework::TVAAugmentationTool::m_vertexName
private

Definition at line 28 of file TVAAugmentationTool.h.

◆ m_vtxDec_key

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

Definition at line 32 of file TVAAugmentationTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::TVAAugmentationTool::m_vertexName
std::string m_vertexName
Definition: TVAAugmentationTool.h:28
DerivationFramework::TVAAugmentationTool::m_tool
ToolHandle< CP::ITrackVertexAssociationTool > m_tool
Definition: TVAAugmentationTool.h:29
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
DerivationFramework::TVAAugmentationTool::m_linkName
std::string m_linkName
Definition: TVAAugmentationTool.h:26
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
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
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
DerivationFramework::TVAAugmentationTool::m_vtxDec_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_vtxDec_key
Definition: TVAAugmentationTool.h:32
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
DerivationFramework::TVAAugmentationTool::m_trackName
std::string m_trackName
Definition: TVAAugmentationTool.h:27