ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetValidation
InDetTruthVertexValidation
src
InDetVertexTruthMatchAlgorithm.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
InDetVertexTruthMatchAlgorithm.h
"
6
7
#include "
xAODTracking/VertexContainer.h
"
8
9
10
InDetVertexTruthMatchAlgorithm::InDetVertexTruthMatchAlgorithm
(
const
std::string& name, ISvcLocator* svcLoc )
11
:
AthAlgorithm
( name, svcLoc ),
12
m_matchTool
(
"InDetVertexTruthMatchTool/InDetVertexTruthMatchTool"
, this ) {
13
14
declareProperty
(
"SGKey"
,
m_sgKey
=
"PrimaryVertices"
);
15
16
declareProperty
(
"VertexTruthMatchTool"
,
m_matchTool
);
17
}
18
19
StatusCode
InDetVertexTruthMatchAlgorithm::initialize
() {
20
21
// Greet the user:
22
ATH_MSG_INFO
(
"Initialising"
);
23
ATH_MSG_DEBUG
(
"SGKey = "
<<
m_sgKey
);
24
25
// Retrieve the tools:
26
ATH_CHECK
(
m_matchTool
.retrieve() );
27
28
// Return gracefully:
29
return
StatusCode::SUCCESS;
30
}
31
32
StatusCode
InDetVertexTruthMatchAlgorithm::execute
(
const
EventContext&
/*ctx*/
) {
33
34
//Retrieve the vertices:
35
const
xAOD::VertexContainer
* vxContainer =
nullptr
;
36
ATH_CHECK
(
evtStore
()->retrieve( vxContainer,
m_sgKey
) );
37
38
//pass to the tool for decoration:
39
ATH_CHECK
(
m_matchTool
->matchVertices( *vxContainer ) );
40
41
return
StatusCode::SUCCESS;
42
43
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
InDetVertexTruthMatchAlgorithm.h
VertexContainer.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
AthCommonAlgorithm< Gaudi::Algorithm >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
InDetVertexTruthMatchAlgorithm::m_matchTool
ToolHandle< IInDetVertexTruthMatchTool > m_matchTool
Definition
InDetVertexTruthMatchAlgorithm.h:30
InDetVertexTruthMatchAlgorithm::execute
virtual StatusCode execute(const EventContext &ctx) override final
Function executing the algorithm.
Definition
InDetVertexTruthMatchAlgorithm.cxx:32
InDetVertexTruthMatchAlgorithm::m_sgKey
std::string m_sgKey
StoreGate key for the muon container to investigate.
Definition
InDetVertexTruthMatchAlgorithm.h:28
InDetVertexTruthMatchAlgorithm::InDetVertexTruthMatchAlgorithm
InDetVertexTruthMatchAlgorithm(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition
InDetVertexTruthMatchAlgorithm.cxx:10
InDetVertexTruthMatchAlgorithm::initialize
virtual StatusCode initialize() override final
Function initialising the algorithm.
Definition
InDetVertexTruthMatchAlgorithm.cxx:19
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition
VertexContainer.h:14
Generated on
for ATLAS Offline Software by
1.17.0