ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetMonitoring
src
JetHistoVarTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetMonitoring/JetHistoVarTool.h
"
6
7
8
JetHistoVarTool::JetHistoVarTool
(
const
std::string&
type
,
const
std::string & name ,
const
IInterface* parent):
9
AthAlgTool
(
type
, name, parent )
10
11
{
12
declareInterface<IJetHistoVarTool>(
this
);
13
14
15
}
16
17
StatusCode
JetHistoVarTool::initialize
() {
18
19
if
(
m_name
==
""
)
m_name
= name();
20
m_v
=
JetVar::Variable::create
(
m_name
,
m_type
,
m_index
);
21
22
if
(!
bool
(
m_v
) ) {
23
ATH_MSG_ERROR
(
" could not create Jet Variable "
<<
m_name
<<
" type: "
<<
m_type
<<
" index="
<<
m_index
);
24
return
StatusCode::FAILURE;
25
}
26
m_v
->setScale(
m_scale
);
27
return
StatusCode::SUCCESS;
28
29
}
30
31
32
float
JetHistoVarTool::value
(
const
xAOD::Jet
&j)
const
{
33
return
m_v
->value(j) ;
34
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
JetHistoVarTool.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
JetHistoVarTool::m_scale
Gaudi::Property< float > m_scale
Definition
JetHistoVarTool.h:66
JetHistoVarTool::initialize
virtual StatusCode initialize()
Definition
JetHistoVarTool.cxx:17
JetHistoVarTool::value
virtual float value(const xAOD::Jet &) const
the value of the variable for a given Jet
Definition
JetHistoVarTool.cxx:32
JetHistoVarTool::m_index
Gaudi::Property< int > m_index
Definition
JetHistoVarTool.h:65
JetHistoVarTool::m_v
std::unique_ptr< JetVar::Variable > m_v
Definition
JetHistoVarTool.h:61
JetHistoVarTool::m_name
Gaudi::Property< std::string > m_name
Definition
JetHistoVarTool.h:63
JetHistoVarTool::JetHistoVarTool
JetHistoVarTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
JetHistoVarTool.cxx:8
JetHistoVarTool::m_type
Gaudi::Property< std::string > m_type
Definition
JetHistoVarTool.h:64
JetVar::Variable::create
static std::unique_ptr< Variable > create(const std::string &name, const std::string &type="float", int index=-1)
create and return a new Variable of a given name & type.
Definition
JetVariable.cxx:10
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
type
Generated on
for ATLAS Offline Software by
1.17.0