25#include "GaudiKernel/EventContext.h"
51 return StatusCode::SUCCESS;
64 std::pair<xAOD::VertexContainer*,xAOD::VertexAuxContainer*> theXAODContainers
65 = std::make_pair( theXAODContainer, theXAODAuxContainer );
83 ATH_MSG_WARNING(
"couldn't retrieve Primary vertex, keeping privtx_z0 = 0 ");
86 std::unique_ptr<Trk::VxSecVertexInfo> foundVrts;
94 std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> myVxContainers = std::make_pair( myVertexContainer, myVertexAuxContainer );
95 ATH_MSG_DEBUG(
"Vertexing done, sorting the vertex container");
96 if (theXAODContainers.first) {
99 myVxContainers.first = theXAODContainers.first;
100 myVxContainers.second = theXAODContainers.second;
102 if (myVxContainers.first == 0) {
105 return StatusCode::SUCCESS;
108 if (not myVxContainers.first->hasStore()) {
111 return StatusCode::SUCCESS;
114 ATH_MSG_DEBUG(
"Successfully reconstructed " << myVxContainers.first->size()-1 <<
" vertices (excluding dummy)");
119 ATH_CHECK(outputVertices.
record(std::unique_ptr<xAOD::VertexContainer>(myVxContainers.first),std::unique_ptr<xAOD::VertexAuxContainer>(myVxContainers.second)));
124 return StatusCode::SUCCESS;
129 ATH_MSG_DEBUG(
"Summary from Secondary Vertex Finder (InnerDetector/InDetRecAlgs/InDetSecVtxFinder)");
136 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helper class to provide constant type-safe access to aux data.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
unsigned int m_numEventsProcessed
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputTrackParticles
unsigned int m_totalNumVerticesWithoutDummy
ToolHandle< InDet::IAdaptiveMultiSecVertexFinder > m_AdaptiveMultiVertexFinderTool
SG::WriteHandleKey< xAOD::VertexContainer > m_outputSecondaryVertices
SG::ReadHandleKey< xAOD::VertexContainer > m_inputPrimaryVertices
InDetSecVtxFinder(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode execute(const EventContext &ctx)
Execute method.
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
VxType::VertexType vertexType() const
The type of the vertex.
const Amg::Vector3D & position() const
Returns the 3-pos.
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.