ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetMonitoring
Root
JetSelectorAttribute.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetMonitoring/JetSelectorAttribute.h
"
6
#include "
JetMonitoring/JetVariable.h
"
7
8
9
JetSelectorAttribute::JetSelectorAttribute
(
const
std::string &t)
10
:
asg
::
AsgTool
(t)
11
,
m_var
(this)
12
{
13
declareProperty
(
"CutMin"
,
m_min
);
14
declareProperty
(
"CutMax"
,
m_max
);
15
declareProperty
(
"Var"
,
m_var
);
16
}
17
18
JetSelectorAttribute:: ~JetSelectorAttribute
()=
default
;
19
20
StatusCode
JetSelectorAttribute::initialize
() {
21
22
for
(
unsigned
int
it = 0; it <
m_var
.size(); it++) {
23
ATH_CHECK
(
m_var
[it].retrieve());
24
ATH_MSG_DEBUG
(
"Selecting on var ("
<<
m_var
[it]->describe() <<
") in ["
<<
m_min
.at(it) <<
" , "
<<
m_max
.at(it)<<
"]"
);
25
}
26
return
StatusCode::SUCCESS;
27
}
28
29
int
JetSelectorAttribute::keep
(
const
xAOD::Jet
&
jet
)
const
{
30
31
for
(
unsigned
int
it = 0; it <
m_var
.size(); it++) {
32
float
v =
m_var
[it]->value(
jet
);
33
if
((
m_min
.at(it) > v) || (
m_max
.at(it) < v))
return
false
;
34
}
35
return
true
;
36
}
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
JetSelectorAttribute.h
JetVariable.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
JetSelectorAttribute::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition
JetSelectorAttribute.cxx:20
JetSelectorAttribute::m_min
std::vector< float > m_min
Definition
JetSelectorAttribute.h:33
JetSelectorAttribute::keep
int keep(const xAOD::Jet &jet) const
Method to select.
Definition
JetSelectorAttribute.cxx:29
JetSelectorAttribute::m_max
std::vector< float > m_max
Definition
JetSelectorAttribute.h:34
JetSelectorAttribute::JetSelectorAttribute
JetSelectorAttribute(const std::string &t)
Definition
JetSelectorAttribute.cxx:9
JetSelectorAttribute::~JetSelectorAttribute
virtual ~JetSelectorAttribute()
JetSelectorAttribute::m_var
ToolHandleArray< IJetHistoVarTool > m_var
Definition
JetSelectorAttribute.h:36
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
asg
Definition
DataHandleTestTool.h:28
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
Generated on
for ATLAS Offline Software by
1.17.0