ATLAS Offline Software
JvtSelectionToolBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JETJVTEFFICIENCY_JVTSELECTIONTOOLBASE_H
6 #define JETJVTEFFICIENCY_JVTSELECTIONTOOLBASE_H
7 
9 #include "AsgTools/AsgTool.h"
12 #include "xAODJet/JetContainer.h"
13 
14 namespace CP {
15  class JvtSelectionToolBase : public asg::AsgTool, virtual public IAsgSelectionTool {
16  public:
18  virtual ~JvtSelectionToolBase() = default;
19 
20  virtual StatusCode initialize() override;
21 
22  virtual const asg::AcceptInfo &getAcceptInfo() const override;
23 
24  virtual asg::AcceptData accept(const xAOD::IParticle *jet) const override;
25 
26  protected:
27  Gaudi::Property<float> m_minPtForJvt{
28  this, "MinPtForJvt", 20e3, "Accept all jets with pT below this"};
29  Gaudi::Property<float> m_maxPtForJvt{
30  this, "MaxPtForJvt", 60e3, "Accept all jets with pT above this"};
31  Gaudi::Property<float> m_minEta{
32  this, "MinEtaForJvt", -1, "Accept all jets with |eta| below this"};
33  Gaudi::Property<float> m_maxEta{
34  this, "MaxEtaForJvt", 2.5, "Accept all jets with |eta| above this"};
35  // NB: Use a string not a read handle key as this is not written with a write handle key
36  Gaudi::Property<std::string> m_jetEtaName{
37  this, "JetEtaName", "eta", "The name of the jet eta to use."};
38 
39  // The template AcceptInfo object
41  // The index to set in the info. I suspect that this is always 0 but better to be safe
42  int m_cutPos = 0;
43  // The accessor for the jet eta
45  // Check the range
46  virtual bool isInRange(const xAOD::IParticle *jet) const;
47  // Check the score
48  virtual bool select(const xAOD::IParticle *jet) const = 0;
49  };
50 } // namespace CP
51 
52 #endif //> !JETJVTEFFICIENCY_JVTSELECTIONTOOL_H
CP::JvtSelectionToolBase::select
virtual bool select(const xAOD::IParticle *jet) const =0
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
CP::JvtSelectionToolBase::m_minPtForJvt
Gaudi::Property< float > m_minPtForJvt
Definition: JvtSelectionToolBase.h:27
CP::JvtSelectionToolBase::m_maxPtForJvt
Gaudi::Property< float > m_maxPtForJvt
Definition: JvtSelectionToolBase.h:29
CP::JvtSelectionToolBase::m_minEta
Gaudi::Property< float > m_minEta
Definition: JvtSelectionToolBase.h:31
SG::ConstAccessor< float >
IAsgSelectionTool
Definition: IAsgSelectionTool.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
IAsgSelectionTool.h
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::JvtSelectionToolBase::~JvtSelectionToolBase
virtual ~JvtSelectionToolBase()=default
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
CP::JvtSelectionToolBase
Definition: JvtSelectionToolBase.h:15
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
asg::AcceptInfo
Definition: AcceptInfo.h:28
CP::JvtSelectionToolBase::accept
virtual asg::AcceptData accept(const xAOD::IParticle *jet) const override
The main accept method: the actual cuts are applied here.
Definition: JvtSelectionToolBase.cxx:18
CP::JvtSelectionToolBase::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JvtSelectionToolBase.cxx:9
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::JvtSelectionToolBase::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
Definition: JvtSelectionToolBase.cxx:16
CP::JvtSelectionToolBase::m_jetEtaName
Gaudi::Property< std::string > m_jetEtaName
Definition: JvtSelectionToolBase.h:36
CP::JvtSelectionToolBase::m_info
asg::AcceptInfo m_info
Definition: JvtSelectionToolBase.h:40
CP::JvtSelectionToolBase::isInRange
virtual bool isInRange(const xAOD::IParticle *jet) const
Definition: JvtSelectionToolBase.cxx:28
JetContainer.h
CP::JvtSelectionToolBase::m_cutPos
int m_cutPos
Definition: JvtSelectionToolBase.h:42
AsgTool.h
asg::AcceptData
Definition: AcceptData.h:30
CP::JvtSelectionToolBase::m_etaAcc
SG::ConstAccessor< float > m_etaAcc
Definition: JvtSelectionToolBase.h:44
CP::JvtSelectionToolBase::m_maxEta
Gaudi::Property< float > m_maxEta
Definition: JvtSelectionToolBase.h:33