ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
FlavorTagInference
Root
GNNTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
FlavorTagInference/GNNTool.h
"
6
#include "
FlavorTagInference/GNN.h
"
7
#include "
FlavorTagInference/GNNOptions.h
"
8
9
namespace
FlavorTagInference
{
10
11
GNNTool::GNNTool(
const
std::string& name):
12
asg::AsgTool(
name
),
13
m_props()
14
{
15
declareProperty(
"nnFile"
, m_nn_file,
16
"the path to the netowrk file used to run inference"
);
17
propify
(*
this
, &m_props);
18
}
19
20
GNNTool::~GNNTool
() {}
21
22
StatusCode
GNNTool::initialize
() {
23
24
auto
opts =
getOptions
(
m_props
);
25
if
(!
m_nnsvc
.empty()) {
26
ATH_CHECK
(
m_nnsvc
.retrieve());
27
m_gnn
=
m_nnsvc
->get(
m_nn_file
, opts);
28
}
else
{
29
ATH_MSG_INFO
(
"Initialize bTagging Tool (GNN) from: "
+
m_nn_file
);
30
m_gnn
.reset(
new
GNN
(
m_nn_file
, opts));
31
}
32
33
return
StatusCode::SUCCESS;
34
}
35
36
void
GNNTool::decorate
(
const
xAOD::IParticle
& i_jet)
const
{
37
m_gnn
->decorate(i_jet);
38
}
39
void
GNNTool::decorateWithDefaults
(
const
xAOD::IParticle
& i_jet)
const
{
40
m_gnn
->decorateWithDefaults(i_jet);
41
}
42
43
// Dependencies
44
FTagDataDependencyNames
GNNTool::getDependencies
()
const
{
45
return
m_gnn
->getDependencies();
46
}
47
48
}
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:45
GNNOptions.h
GNNTool.h
GNN.h
FlavorTagInference::GNNTool::decorateWithDefaults
virtual void decorateWithDefaults(const xAOD::IParticle &i_jet) const override
Method to decorate a jet with defaults.
Definition
GNNTool.cxx:39
FlavorTagInference::GNNTool::m_nnsvc
ServiceHandle< INNSharingSvc > m_nnsvc
Definition
GNNTool.h:50
FlavorTagInference::GNNTool::m_gnn
std::shared_ptr< const GNN > m_gnn
Definition
GNNTool.h:54
FlavorTagInference::GNNTool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
GNNTool.cxx:22
FlavorTagInference::GNNTool::m_props
GNNToolProperties m_props
Definition
GNNTool.h:53
FlavorTagInference::GNNTool::decorate
virtual void decorate(const xAOD::IParticle &i_jet) const override
Method to decorate a jet.
Definition
GNNTool.cxx:36
FlavorTagInference::GNNTool::m_nn_file
std::string m_nn_file
Definition
GNNTool.h:52
FlavorTagInference::GNNTool::getDependencies
virtual FTagDataDependencyNames getDependencies() const override
Definition
GNNTool.cxx:44
FlavorTagInference::GNNTool::~GNNTool
ASG_TOOL_CLASS(GNNTool, IJetTagConditionalDecorator) public ~GNNTool()
Definition
GNNTool.cxx:20
FlavorTagInference::GNN
Definition
GNN.h:36
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
FlavorTagInference
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition
CaloClusterLoader.h:27
FlavorTagInference::getOptions
GNNOptions getOptions(const GNNToolProperties &)
Definition
GNNToolifiers.cxx:24
FlavorTagInference::propify
void propify(asg::AsgTool &tool, GNNToolProperties *props)
Definition
GNNToolifiers.cxx:12
extractSporadic.name
name
Definition
extractSporadic.py:101
FlavorTagInference::FTagDataDependencyNames
Definition
FTagDataDependencyNames.h:12
Generated on
for ATLAS Offline Software by
1.17.0