ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MSVertexReconstruction
MSVertexRecoAlg
src
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
7
#include "
MSVertexUtils/MSVertex.h
"
8
#include "
MSVertexUtils/Tracklet.h
"
9
10
//** ----------------------------------------------------------------------------------------------------------------- **//
11
12
MSVertexRecoAlg::MSVertexRecoAlg
(
const
std::string& name, ISvcLocator* pSvcLocator) :
AthReentrantAlgorithm
(name, pSvcLocator) {}
13
14
//** ----------------------------------------------------------------------------------------------------------------- **//
15
16
StatusCode
MSVertexRecoAlg::initialize
() {
17
//* Retrieve MSVertexRecoTool *//
18
ATH_CHECK
(
m_vertexRecoTool
.retrieve());
19
ATH_MSG_DEBUG
(
"Retrieved tool "
<<
m_vertexRecoTool
);
20
21
//* Retrieve MSVertexTrackletTool *//
22
ATH_CHECK
(
m_vertexTrackletTool
.retrieve());
23
ATH_MSG_DEBUG
(
"Retrieved tool "
<<
m_vertexTrackletTool
);
24
25
return
StatusCode::SUCCESS;
26
}
27
28
//** ----------------------------------------------------------------------------------------------------------------- **//
29
30
StatusCode
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
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition
AthMsgStreamMacros.h:34
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
MSVertexRecoAlg.h
MSVertex.h
Tracklet.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
MSVertexRecoAlg::initialize
virtual StatusCode initialize() override
Definition
MSVertexRecoAlg.cxx:16
MSVertexRecoAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
MSVertexRecoAlg.cxx:30
MSVertexRecoAlg::m_vertexTrackletTool
ToolHandle< Muon::IMSVertexTrackletTool > m_vertexTrackletTool
Definition
MSVertexRecoAlg.h:21
MSVertexRecoAlg::MSVertexRecoAlg
MSVertexRecoAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
MSVertexRecoAlg.cxx:12
MSVertexRecoAlg::m_vertexRecoTool
ToolHandle< Muon::IMSVertexRecoTool > m_vertexRecoTool
Definition
MSVertexRecoAlg.h:23
Generated on
for ATLAS Offline Software by
1.17.0