ATLAS Offline Software
Loading...
Searching...
No Matches
JvtSelectionToolBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9namespace CP {
12 m_cutPos = m_info.addCut("Jvt", "Whether the jet passes the Jvt selection");
13
14 ATH_CHECK(m_jetContainer.initialize());
15 ATH_CHECK(m_jvtMomentKey.initialize());
17
18 return StatusCode::SUCCESS;
19 }
20
22
28
30 if (jet->pt() < m_minPtForJvt || jet->pt() > m_maxPtForJvt)
31 return false;
32 float eta = m_etaAcc(*jet);
33 return std::abs(eta) >= m_minEta && std::abs(eta) <= m_maxEta;
34 }
35
36 StatusCode JvtSelectionToolBase::decorate(const xAOD::JetContainer& jets) const {
37 if(m_passJvtKey.key().empty()){
38 ATH_MSG_ERROR("Attempted to decorate jets with JVT decision, but decoration name was not configured!");
39 return StatusCode::FAILURE;
40 }
42 for(const xAOD::Jet* jet : jets) passJvtHandle(*jet) = select(jet);
43 return StatusCode::SUCCESS;
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)
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
virtual bool isInRange(const xAOD::IParticle *jet) const
SG::ConstAccessor< float > m_etaAcc
Gaudi::Property< float > m_maxEta
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_jvtMomentKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_passJvtKey
virtual asg::AcceptData accept(const xAOD::IParticle *jet) const override
The main accept method: the actual cuts are applied here.
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer
Gaudi::Property< float > m_minPtForJvt
Gaudi::Property< float > m_minEta
virtual bool select(const xAOD::IParticle *jet) const =0
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
Gaudi::Property< float > m_maxPtForJvt
Gaudi::Property< std::string > m_jetEtaName
Helper class to provide constant type-safe access to aux data.
Handle class for adding a decoration to an object.
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".