ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetJvtEfficiency
Root
JvtSelectionTool.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 "
JetJvtEfficiency/JvtSelectionTool.h
"
6
#include "
AsgDataHandles/ReadDecorHandle.h
"
7
8
namespace
{
9
const
static
std::map<std::string, float> pflowWPMap{{
"Medium"
, 0.2}, {
"Tight"
, 0.5}};
10
const
static
std::map<std::string, float> topoWPMap{
11
{
"Loose"
, 0.11}, {
"Medium"
, 0.59}, {
"Tight"
, 0.91}};
12
}
// namespace
13
14
namespace
CP
{
15
16
StatusCode
JvtSelectionTool::initialize
() {
17
if
(
m_isPFlow
.value()){
18
ATH_MSG_WARNING
(
"Jvt is deprecated, please move to using NNJvt"
);
19
}
20
21
ATH_CHECK
(
JvtSelectionToolBase::initialize
());
22
23
if
(
m_wp
!=
"Custom"
) {
24
if
(
m_wp
==
"Default"
)
25
m_wp
=
m_isPFlow
.value() ?
"Tight"
:
"Medium"
;
26
m_jvtCutBorder
= (!
m_isPFlow
.value() &&
m_wp
==
"Medium"
) ? 0.11 : -2.;
27
const
auto
&
map
=
m_isPFlow
.value() ? pflowWPMap : topoWPMap;
28
auto
itr =
map
.find(
m_wp
);
29
if
(itr ==
map
.end()) {
30
ATH_MSG_ERROR
(
"Invalid Jvt working point name"
);
31
return
StatusCode::FAILURE;
32
}
33
m_jvtCut
= itr->second;
34
}
35
36
return
StatusCode::SUCCESS;
37
}
38
39
bool
JvtSelectionTool::select
(
const
xAOD::IParticle
*
jet
)
const
{
40
if
(!
isInRange
(
jet
))
return
true
;
41
SG::ReadDecorHandle<xAOD::JetContainer, float>
jvtHandle(
m_jvtMomentKey
);
42
float
eta
=
m_etaAcc
(*
jet
);
43
if
(std::abs(
eta
) > 2.4 && std::abs(
eta
) < 2.5)
44
return
jvtHandle(*
jet
) >
m_jvtCutBorder
;
45
return
jvtHandle(*
jet
) >
m_jvtCut
;
46
}
47
48
}
// namespace CP
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
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
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ReadDecorHandle.h
Handle class for reading a decoration on an object.
JvtSelectionTool.h
CP::JvtSelectionToolBase::isInRange
virtual bool isInRange(const xAOD::IParticle *jet) const
Definition
JvtSelectionToolBase.cxx:29
CP::JvtSelectionToolBase::m_etaAcc
SG::ConstAccessor< float > m_etaAcc
Definition
JvtSelectionToolBase.h:56
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::JvtSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
JvtSelectionTool.cxx:16
CP::JvtSelectionTool::select
virtual bool select(const xAOD::IParticle *jet) const override
Definition
JvtSelectionTool.cxx:39
CP::JvtSelectionTool::m_isPFlow
Gaudi::Property< bool > m_isPFlow
Definition
JvtSelectionTool.h:22
CP::JvtSelectionTool::m_wp
Gaudi::Property< std::string > m_wp
Definition
JvtSelectionTool.h:26
CP::JvtSelectionTool::m_jvtCutBorder
Gaudi::Property< float > m_jvtCutBorder
Definition
JvtSelectionTool.h:29
CP::JvtSelectionTool::m_jvtCut
Gaudi::Property< float > m_jvtCut
Definition
JvtSelectionTool.h:32
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition
StoreGate/StoreGate/ReadDecorHandle.h:94
map
STL class.
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
Generated on
for ATLAS Offline Software by
1.17.0