|
ATLAS Offline Software
|
Go to the documentation of this file.
18 #include "Gaudi/Property.h"
34 ISvcLocator* pSvcLocator ) :
54 return StatusCode::SUCCESS;
61 return StatusCode::SUCCESS;
76 return StatusCode::FAILURE;
80 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::isCompatible...");
88 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::getMatchMap...");
90 ATH_MSG_INFO(
"Number of vertices for track-vertex association: " << trkvxassoMap.size());
91 for (
const auto& assoc: trkvxassoMap) {
94 setprecision(4) << setfill(
' ') <<
95 setw(10) << vx->
x() <<
", " << setw(10) << vx->
y() <<
", " << setw(10) << vx->
z() <<
96 " has " << assoc.second.size() <<
" associated tracks");
100 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::getUniqueMatchVertex...");
101 std::vector<const xAOD::Vertex* > v_vx;
103 for(
const auto *
vertex : *vxCont) {
106 if(!trkCont->
empty())
109 ATH_MSG_INFO(
"Unique match vertex for first track: " << vx);
113 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::getUniqueMatchVertexLink...");
114 if(trkCont->
size() > 2)
120 ATH_MSG_INFO(
"Uniquely matched vertex for third track - ");
121 ATH_MSG_INFO(
"Vertex ElementLink address: " << match_vx );
128 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::getUniqueMatchMap...");
130 ATH_MSG_INFO(
"Number of vertices for track-vertex association: " << trkvxassoUniqueMap.size());
131 for (
const auto& assoc: trkvxassoUniqueMap) {
134 setprecision(4) << setfill(
' ') <<
135 setw(10) << vx->
x() <<
", " << setw(10) << vx->
y() <<
", " << setw(10) << vx->
z() <<
136 " has " << assoc.second.size() <<
" uniquely associated tracks");
147 return StatusCode::SUCCESS;
float x() const
Returns the x position.
virtual StatusCode execute()
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trkContname
Containers.
virtual StatusCode finalize()
bool isMatched(int matchInfo)
ToolHandle< CP::ITrackVertexAssociationTool > m_TVATool
std::map< const xAOD::Vertex *, xAOD::TrackVertexAssociationList > TrackVertexAssociationMap
bool isValid() const
Test to see if the link can be dereferenced.
::StatusCode StatusCode
StatusCode definition for legacy code.
TrackVertexAssoTestAlg()
Default constructor:
#define CHECK(...)
Evaluate an expression and check for errors.
float z() const
Returns the z position.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual ~TrackVertexAssoTestAlg()
Destructor:
ElementLink implementation for ROOT usage.
Class describing a Vertex.
float y() const
Returns the y position.
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContname
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
virtual StatusCode initialize()