ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkVertexFitter
TrkVertexWeightCalculators
src
GNNVertexWeightCalculator.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
TrkVertexWeightCalculators/GNNVertexWeightCalculator.h
"
5
6
#include "
xAODTracking/Vertex.h
"
7
#include "
xAODTracking/VertexContainer.h
"
8
#include "
StoreGate/ReadDecorHandle.h
"
9
10
// class constructor implementation
11
GNNVertexWeightCalculator::GNNVertexWeightCalculator
(
const
std::string& t,
12
const
std::string& n,
13
const
IInterface* p)
14
:
AthAlgTool
(t, n, p)
15
{
16
declareInterface<IVertexWeightCalculator>(
this
);
17
}
18
19
GNNVertexWeightCalculator::~GNNVertexWeightCalculator
() =
default
;
20
21
StatusCode
GNNVertexWeightCalculator::initialize
() {
22
ATH_MSG_DEBUG
(
"Initializing "
<< name() <<
"..."
);
23
24
ATH_CHECK
(
m_gnnScoreKey
.initialize());
25
26
return
StatusCode::SUCCESS;
27
}
28
29
double
GNNVertexWeightCalculator::estimateSignalCompatibility
(
30
const
xAOD::Vertex
&vertex)
const
{
31
32
const
EventContext &ctx = Gaudi::Hive::currentContext();
33
SG::ReadDecorHandle<xAOD::VertexContainer, float>
acc_gnnScore(
m_gnnScoreKey
,
34
ctx);
35
36
if
(acc_gnnScore.
isAvailable
()) {
37
return
acc_gnnScore(vertex);
38
}
else
{
39
return
-1;
40
}
41
42
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
Vertex.h
GNNVertexWeightCalculator.h
ReadDecorHandle.h
Handle class for reading a decoration on an object.
VertexContainer.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
GNNVertexWeightCalculator::initialize
virtual StatusCode initialize() override
Definition
GNNVertexWeightCalculator.cxx:21
GNNVertexWeightCalculator::estimateSignalCompatibility
virtual double estimateSignalCompatibility(const xAOD::Vertex &vertex) const override
Estimate the compatibility of the vertex with a hard scatter vertex, with respect to pileup vertices.
Definition
GNNVertexWeightCalculator.cxx:29
GNNVertexWeightCalculator::GNNVertexWeightCalculator
GNNVertexWeightCalculator(const std::string &t, const std::string &n, const IInterface *p)
Definition
GNNVertexWeightCalculator.cxx:11
GNNVertexWeightCalculator::~GNNVertexWeightCalculator
virtual ~GNNVertexWeightCalculator() override
GNNVertexWeightCalculator::m_gnnScoreKey
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_gnnScoreKey
Definition
GNNVertexWeightCalculator.h:43
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition
StoreGate/StoreGate/ReadDecorHandle.h:94
SG::ReadDecorHandle::isAvailable
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition
Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
Generated on
for ATLAS Offline Software by
1.17.0