|
ATLAS Offline Software
|
Go to the documentation of this file.
18 #include "Gaudi/Property.h"
34 ISvcLocator* pSvcLocator ) :
60 return StatusCode::SUCCESS;
67 return StatusCode::SUCCESS;
82 return StatusCode::FAILURE;
86 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::isCompatible...");
94 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::getMatchMap...");
96 ATH_MSG_INFO(
"Number of vertices for track-vertex association: " << trkvxassoMap.size());
97 for (
const auto& assoc: trkvxassoMap) {
100 setprecision(4) << setfill(
' ') <<
101 setw(10) << vx->
x() <<
", " << setw(10) << vx->
y() <<
", " << setw(10) << vx->
z() <<
102 " has " << assoc.second.size() <<
" associated tracks");
106 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::getUniqueMatchVertex...");
107 std::vector<const xAOD::Vertex* > v_vx;
109 for(
const auto *
vertex : *vxCont) {
112 if(!trkCont->
empty())
115 ATH_MSG_INFO(
"Unique match vertex for first track: " << vx);
119 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::getUniqueMatchVertexLink...");
120 if(trkCont->
size() > 2)
126 ATH_MSG_INFO(
"Uniquely matched vertex for third track - ");
127 ATH_MSG_INFO(
"Vertex ElementLink address: " << match_vx );
134 ATH_MSG_INFO(
"Testing TrackVertexAssociationTool::getUniqueMatchMap...");
136 ATH_MSG_INFO(
"Number of vertices for track-vertex association: " << trkvxassoUniqueMap.size());
137 for (
const auto& assoc: trkvxassoUniqueMap) {
140 setprecision(4) << setfill(
' ') <<
141 setw(10) << vx->
x() <<
", " << setw(10) << vx->
y() <<
", " << setw(10) << vx->
z() <<
142 " has " << assoc.second.size() <<
" uniquely associated tracks");
153 return StatusCode::SUCCESS;
float x() const
Returns the x position.
virtual StatusCode execute()
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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()