ATLAS Offline Software
Loading...
Searching...
No Matches
Reconstruction
Jet
JetJvtEfficiency
Root
FJvtSelectionTool.cxx
Go to the documentation of this file.
1
#include "
JetJvtEfficiency/FJvtSelectionTool.h
"
2
#include "
AsgDataHandles/ReadDecorHandle.h
"
3
4
namespace
{
5
const
static
std::map<std::string, float> workingPoints{{
"Loose"
, 0.5}, {
"Tight"
, 0.4}, {
"Tighter"
, 0.2}};
6
}
7
8
namespace
CP
{
9
10
FJvtSelectionTool::FJvtSelectionTool
(
const
std::string &
name
) :
JvtSelectionToolBase
(
name
) {
11
m_minEta
= 2.5;
12
m_maxEta
= 4.5;
13
}
14
15
StatusCode
FJvtSelectionTool::initialize
() {
16
17
ATH_CHECK
(
JvtSelectionToolBase::initialize
());
18
19
ATH_CHECK
(
m_timingKey
.initialize());
20
21
if
(
m_wp
!=
"Custom"
) {
22
auto
itr = workingPoints.find(
m_wp
);
23
if
(itr == workingPoints.end()) {
24
ATH_MSG_ERROR
(
"Invalid fJvt working point name"
);
25
return
StatusCode::FAILURE;
26
}
27
m_jvtCut
= itr->second;
28
}
29
30
return
StatusCode::SUCCESS;
31
}
32
33
bool
FJvtSelectionTool::select
(
const
xAOD::IParticle
*
jet
)
const
{
34
if
(!
isInRange
(
jet
))
return
true
;
35
// select jet if it passes fJvt requirement and timing cut (if configured)
36
SG::ReadDecorHandle<xAOD::JetContainer, float>
jvtHandle(
m_jvtMomentKey
);
37
SG::ReadDecorHandle<xAOD::JetContainer, float>
timingHandle(
m_timingKey
);
38
return
jvtHandle(*
jet
) <=
m_jvtCut
&& (
m_timingCut
> 0 ? std::abs( timingHandle(*
jet
) ) <=
m_timingCut
: true );
39
}
40
41
}
// namespace CP
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ReadDecorHandle.h
Handle class for reading a decoration on an object.
FJvtSelectionTool.h
CP::FJvtSelectionTool::FJvtSelectionTool
FJvtSelectionTool(const std::string &name)
Definition
FJvtSelectionTool.cxx:10
CP::FJvtSelectionTool::m_jvtCut
Gaudi::Property< float > m_jvtCut
Definition
FJvtSelectionTool.h:24
CP::FJvtSelectionTool::m_timingCut
Gaudi::Property< float > m_timingCut
Definition
FJvtSelectionTool.h:28
CP::FJvtSelectionTool::m_wp
Gaudi::Property< std::string > m_wp
Definition
FJvtSelectionTool.h:21
CP::FJvtSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
FJvtSelectionTool.cxx:15
CP::FJvtSelectionTool::select
virtual bool select(const xAOD::IParticle *jet) const override
Definition
FJvtSelectionTool.cxx:33
CP::FJvtSelectionTool::m_timingKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_timingKey
Definition
FJvtSelectionTool.h:26
CP::JvtSelectionToolBase
Definition
JvtSelectionToolBase.h:17
CP::JvtSelectionToolBase::isInRange
virtual bool isInRange(const xAOD::IParticle *jet) const
Definition
JvtSelectionToolBase.cxx:29
CP::JvtSelectionToolBase::m_maxEta
Gaudi::Property< float > m_maxEta
Definition
JvtSelectionToolBase.h:37
CP::JvtSelectionToolBase::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
JvtSelectionToolBase.cxx:10
CP::JvtSelectionToolBase::m_jvtMomentKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_jvtMomentKey
Definition
JvtSelectionToolBase.h:45
CP::JvtSelectionToolBase::m_minEta
Gaudi::Property< float > m_minEta
Definition
JvtSelectionToolBase.h:35
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition
StoreGate/StoreGate/ReadDecorHandle.h:94
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
Generated on
for ATLAS Offline Software by
1.14.0