ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
FlavorTagDiscriminants
Root
DL2Tool.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 "
FlavorTagDiscriminants/DL2Tool.h
"
6
#include "
FlavorTagDiscriminants/DL2HighLevel.h
"
7
8
namespace
FlavorTagDiscriminants
{
9
10
DL2Tool::DL2Tool
(
const
std::string& name):
11
asg
::
AsgTool
(name),
12
m_props
(),
13
m_dl2
(nullptr)
14
{
15
declareProperty
(
"nnFile"
,
m_props
.nnFile);
16
declareProperty
(
"flipTagConfig"
,
m_props
.flipTagConfig);
17
declareProperty
(
"variableRemapping"
,
m_props
.variableRemapping);
18
declareProperty
(
"defaultOutputValue"
,
m_props
.default_output_value);
19
}
20
DL2Tool::~DL2Tool
() {}
21
22
StatusCode
DL2Tool::initialize
() {
23
ATH_MSG_INFO
(
"Initialize DL2 from: "
+
m_props
.nnFile);
24
FlipTagConfig
flipConfig = FlipTagConfig::STANDARD;
25
if
(
m_props
.flipTagConfig.size() > 0) {
26
flipConfig =
FlavorTagInference::flipTagConfigFromString
(
m_props
.flipTagConfig);
27
}
28
m_dl2
.reset(
29
new
DL2HighLevel
(
30
m_props
.nnFile,
31
flipConfig,
32
m_props
.variableRemapping
33
)
34
);
35
return
StatusCode::SUCCESS;
36
}
37
38
void
DL2Tool::decorate
(
const
xAOD::IParticle
& i_jet)
const
{
39
ATH_MSG_DEBUG
(
"Decorating i_jet from: "
+
m_props
.nnFile);
40
m_dl2
->decorate(i_jet);
41
ATH_MSG_VERBOSE
(
"Decorated i_jet"
);
42
}
43
void
DL2Tool::decorateWithDefaults
(
const
xAOD::IParticle
& i_jet)
const
{
44
ATH_MSG_DEBUG
(
"Decorating i_jet with defaults from: "
+
m_props
.nnFile);
45
m_dl2
->decorateWithDefaults(i_jet);
46
ATH_MSG_VERBOSE
(
"Decorated i_jet with defaults"
);
47
}
48
49
FTagDataDependencyNames
DL2Tool::getDependencies
()
const
{
50
return
m_dl2
->getDataDependencyNames();
51
}
52
53
}
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
DL2HighLevel.h
DL2Tool.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
FlavorTagDiscriminants::DL2HighLevel
Definition
DL2HighLevel.h:29
FlavorTagDiscriminants::DL2Tool::~DL2Tool
~DL2Tool()
Definition
DL2Tool.cxx:20
FlavorTagDiscriminants::DL2Tool::DL2Tool
DL2Tool(const std::string &name)
Definition
DL2Tool.cxx:10
FlavorTagDiscriminants::DL2Tool::decorate
virtual void decorate(const xAOD::IParticle &i_jet) const override
Method to decorate a jet.
Definition
DL2Tool.cxx:38
FlavorTagDiscriminants::DL2Tool::decorateWithDefaults
virtual void decorateWithDefaults(const xAOD::IParticle &i_jet) const override
Method to decorate a jet with defaults.
Definition
DL2Tool.cxx:43
FlavorTagDiscriminants::DL2Tool::m_props
DL2Properties m_props
Definition
DL2Tool.h:42
FlavorTagDiscriminants::DL2Tool::m_dl2
std::unique_ptr< DL2HighLevel > m_dl2
Definition
DL2Tool.h:43
FlavorTagDiscriminants::DL2Tool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
DL2Tool.cxx:22
FlavorTagDiscriminants::DL2Tool::getDependencies
virtual DataDependencyNames getDependencies() const override
Definition
DL2Tool.cxx:49
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
FlavorTagDiscriminants
Definition
DL2.h:18
FlavorTagInference::flipTagConfigFromString
FlipTagConfig flipTagConfigFromString(const std::string &)
Definition
FlipTagEnums.cxx:15
FlavorTagInference::FlipTagConfig
FlipTagConfig
Definition
FlipTagEnums.h:14
asg
Definition
DataHandleTestTool.h:28
FlavorTagInference::FTagDataDependencyNames
Definition
FTagDataDependencyNames.h:12
Generated on
for ATLAS Offline Software by
1.14.0