ATLAS Offline Software
Loading...
Searching...
No Matches
MSVertexRecoAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "MSVertexRecoAlg.h"
6
9
10//** ----------------------------------------------------------------------------------------------------------------- **//
11
12MSVertexRecoAlg::MSVertexRecoAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator) {}
13
14//** ----------------------------------------------------------------------------------------------------------------- **//
15
17 //* Retrieve MSVertexRecoTool *//
18 ATH_CHECK(m_vertexRecoTool.retrieve());
19 ATH_MSG_DEBUG("Retrieved tool " << m_vertexRecoTool);
20
21 //* Retrieve MSVertexTrackletTool *//
23 ATH_MSG_DEBUG("Retrieved tool " << m_vertexTrackletTool);
24
25 return StatusCode::SUCCESS;
26}
27
28//** ----------------------------------------------------------------------------------------------------------------- **//
29
30StatusCode MSVertexRecoAlg::execute(const EventContext& ctx) const {
31 std::vector<Tracklet> tracklets;
32 std::vector<std::unique_ptr<MSVertex>> vertices;
33
34 StatusCode sc = m_vertexTrackletTool->findTracklets(tracklets, ctx);
35 if (sc.isFailure()) {
36 ATH_MSG_FATAL("Failed vertex tracklet ");
37 return StatusCode::FAILURE;
38 } else
39 ATH_MSG_DEBUG("Tracklet reconstruction tool called");
40
41 sc = m_vertexRecoTool->findMSvertices(tracklets, vertices, ctx);
42 if (sc.isFailure()) {
43 ATH_MSG_FATAL("Failed vertex reco ");
44 return StatusCode::FAILURE;
45 } else
46 ATH_MSG_DEBUG("Vertex reconstruction tool called");
47
48 ATH_MSG_DEBUG("Found " << tracklets.size() << " tracklets and " << vertices.size() << " vertices in the MS");
49
50 return StatusCode::SUCCESS;
51}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &ctx) const override
ToolHandle< Muon::IMSVertexTrackletTool > m_vertexTrackletTool
MSVertexRecoAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< Muon::IMSVertexRecoTool > m_vertexRecoTool