ATLAS Offline Software
Loading...
Searching...
No Matches
TVAAugmentationTool.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4
7
8namespace DerivationFramework {
9
11 {
12 ATH_MSG_DEBUG("Initialising TVAAugmentationTool " << name() );
13 ATH_CHECK( m_trackName.initialize() );
14 ATH_CHECK( m_vertexName.initialize() );
15 ATH_CHECK(m_vtxDec_key.initialize());
16 ATH_CHECK( m_tool.retrieve() );
17
18 return StatusCode::SUCCESS;
19 }
20
21 StatusCode TVAAugmentationTool::addBranches(const EventContext& ctx) const
22 {
24
27
28 xAOD::TrackVertexAssociationMap matchMap = m_tool->getMatchMap(*tracks, *vertices);
29
30 for (const xAOD::Vertex* ivtx : *vertices)
31 for (const xAOD::TrackParticle* itrk : matchMap[ivtx])
32 vtxDec_handle(*itrk).toContainedElement(*vertices, ivtx);
33
34 return StatusCode::SUCCESS;
35 }
36} //> end namespace DerivationFramework
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_vtxDec_key
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackName
virtual StatusCode initialize() override final
virtual StatusCode addBranches(const EventContext &ctx) const override final
PublicToolHandle< CP::ITrackVertexAssociationTool > m_tool
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexName
Handle class for adding a decoration to an object.
THE reconstruction tool.
std::map< const xAOD::Vertex *, xAOD::TrackVertexAssociationList > TrackVertexAssociationMap
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.