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 if(m_isPFlow.value()){
18 ATH_MSG_WARNING("Jvt is deprecated, please move to using NNJvt");
19 }
20
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
40 if(!isInRange(jet)) return true;
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
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.