52 ATH_MSG_ERROR(
"AMVF finding and vertex merging is not possible");
53 return StatusCode::FAILURE;
68 return StatusCode::SUCCESS;
76 const EventContext& ctx = Gaudi::Hive::currentContext();
82 std::pair<xAOD::VertexContainer*,xAOD::VertexAuxContainer*> theXAODContainers
83 = std::make_pair( theXAODContainer, theXAODAuxContainer );
109 ATH_MSG_WARNING(
"couldn't retrieve Primary vertex, keeping privtx_z0 = 0 ");
112 std::unique_ptr<Trk::VxSecVertexInfo> foundVrts;
115 if(trackParticleCollection.
isValid()){
130 return StatusCode::SUCCESS;
141 ATH_MSG_WARNING(
"Please use ISV for vertex finding with trackCollection ");
148 return StatusCode::SUCCESS;
157 std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> myVxContainers = std::make_pair( myVertexContainer, myVertexAuxContainer );
158 ATH_MSG_DEBUG(
"Vertexing done, sorting the vertex container");
159 if (theXAODContainers.first) {
164 delete theXAODContainers.first;
165 delete theXAODContainers.second;
166 theXAODContainers = myVxContainers;
169 myVxContainers.first = theXAODContainers.first;
170 myVxContainers.second = theXAODContainers.second;
172 if (myVxContainers.first == 0) {
175 return StatusCode::SUCCESS;
178 if (not myVxContainers.first->hasStore()) {
181 return StatusCode::SUCCESS;
184 ATH_MSG_DEBUG(
"Successfully reconstructed " << myVxContainers.first->size()-1 <<
" vertices (excluding dummy)");
189 ATH_CHECK(outputVertices.
record(std::unique_ptr<xAOD::VertexContainer>(myVxContainers.first),std::unique_ptr<xAOD::VertexAuxContainer>(myVxContainers.second)));
194 return StatusCode::SUCCESS;
199 ATH_MSG_DEBUG(
"Summary from Secondary Vertex Finder (InnerDetector/InDetRecAlgs/InDetSecVtxFinder)");
206 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 with parameters:
unsigned int m_numEventsProcessed
BooleanProperty m_useTrackParticles
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputTrackParticles
BooleanProperty m_doVertexMerging
ToolHandle< ISecVertexFinder > m_InclusiveVertexFinderTool
SG::ReadHandleKey< TrackCollection > m_inputTrackCollection
unsigned int m_totalNumVerticesWithoutDummy
ToolHandle< InDet::IAdaptiveMultiSecVertexFinder > m_AdaptiveMultiVertexFinderTool
SG::WriteHandleKey< xAOD::VertexContainer > m_outputSecondaryVertices
SG::ReadHandleKey< xAOD::VertexContainer > m_inputPrimaryVertices
ToolHandle< Trk::IVertexMergingTool > m_VertexMergingTool
StringProperty m_FinderTool
InDetSecVtxFinder(const std::string &name, ISvcLocator *pSvcLocator)
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.