ATLAS Offline Software
Loading...
Searching...
No Matches
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
7
8namespace {
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
14namespace CP {
15
17 ATH_MSG_WARNING("Jvt is deprecated, please move to using NNJvt");
18
20
21 if (m_wp != "Custom") {
22 if (m_wp == "Default")
23 m_wp = m_isPFlow.value() ? "Tight" : "Medium";
24 m_jvtCutBorder = (!m_isPFlow.value() && m_wp == "Medium") ? 0.11 : -2.;
25 const auto &map = m_isPFlow.value() ? pflowWPMap : topoWPMap;
26 auto itr = map.find(m_wp);
27 if (itr == map.end()) {
28 ATH_MSG_ERROR("Invalid Jvt working point name");
29 return StatusCode::FAILURE;
30 }
31 m_jvtCut = itr->second;
32 }
33
34 return StatusCode::SUCCESS;
35 }
36
38 if(!isInRange(jet)) return true;
40 float eta = m_etaAcc(*jet);
41 if (std::abs(eta) > 2.4 && std::abs(eta) < 2.5)
42 return jvtHandle(*jet) > m_jvtCutBorder;
43 return jvtHandle(*jet) > m_jvtCut;
44 }
45
46} // namespace CP
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
Handle class for reading a decoration on an object.
virtual bool isInRange(const xAOD::IParticle *jet) const
SG::ConstAccessor< float > m_etaAcc
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_jvtMomentKey
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual bool select(const xAOD::IParticle *jet) const override
Gaudi::Property< bool > m_isPFlow
Gaudi::Property< std::string > m_wp
Gaudi::Property< float > m_jvtCutBorder
Gaudi::Property< float > m_jvtCut
Handle class for reading a decoration on an object.
STL class.
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.