ATLAS Offline Software
Loading...
Searching...
No Matches
FJvtSelectionTool.cxx
Go to the documentation of this file.
3
4namespace {
5 const static std::map<std::string, float> workingPoints{{"Loose", 0.5}, {"Tight", 0.4}, {"Tighter", 0.2}};
6}
7
8namespace CP {
9
11 m_minEta = 2.5;
12 m_maxEta = 4.5;
13 }
14
16
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
34 if(!isInRange(jet)) return true;
35 // select jet if it passes fJvt requirement and timing cut (if configured)
38 return jvtHandle(*jet) <= m_jvtCut && ( m_timingCut > 0 ? std::abs( timingHandle(*jet) ) <= m_timingCut : true );
39 }
40
41} // namespace CP
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
Handle class for reading a decoration on an object.
FJvtSelectionTool(const std::string &name)
Gaudi::Property< float > m_jvtCut
Gaudi::Property< float > m_timingCut
Gaudi::Property< std::string > m_wp
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual bool select(const xAOD::IParticle *jet) const override
SG::ReadDecorHandleKey< xAOD::JetContainer > m_timingKey
virtual bool isInRange(const xAOD::IParticle *jet) const
Gaudi::Property< float > m_maxEta
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_jvtMomentKey
Gaudi::Property< float > m_minEta
Handle class for reading a decoration on an object.
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.