ATLAS Offline Software
Loading...
Searching...
No Matches
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
10#include "AsgTools/AsgTool.h"
15
16namespace CP {
17 class JvtSelectionToolBase : public asg::AsgTool, virtual public IAsgSelectionTool, virtual public IJetDecorator {
18 public:
20 virtual ~JvtSelectionToolBase() = default;
21
22 virtual StatusCode initialize() override;
23
24 virtual const asg::AcceptInfo &getAcceptInfo() const override;
25
26 virtual asg::AcceptData accept(const xAOD::IParticle *jet) const override;
27
28 virtual StatusCode decorate(const xAOD::JetContainer& jets) const override;
29
30 protected:
31 Gaudi::Property<float> m_minPtForJvt{
32 this, "MinPtForJvt", 20e3, "Accept all jets with pT below this"};
33 Gaudi::Property<float> m_maxPtForJvt{
34 this, "MaxPtForJvt", 60e3, "Accept all jets with pT above this"};
35 Gaudi::Property<float> m_minEta{
36 this, "MinEtaForJvt", -1, "Accept all jets with |eta| below this"};
37 Gaudi::Property<float> m_maxEta{
38 this, "MaxEtaForJvt", 2.5, "Accept all jets with |eta| above this"};
39 // NB: Use a string not a read handle key as this is not written with a write handle key
40 Gaudi::Property<std::string> m_jetEtaName{
41 this, "JetEtaName", "eta", "The name of the jet eta to use."};
42
44 this, "JetContainer", "", "The name of the jet container"};
46 this, "JvtMomentName", m_jetContainer, "", "The name of the Jvt moment to use"};
48 this, "PassFlagName", m_jetContainer, "", "SG key for output pass-JVT decoration"};
49
50
51 // The template AcceptInfo object
53 // The index to set in the info. I suspect that this is always 0 but better to be safe
54 int m_cutPos = 0;
55 // The accessor for the jet eta
57 // Check the range
58 virtual bool isInRange(const xAOD::IParticle *jet) const;
59 // Check the score
60 virtual bool select(const xAOD::IParticle *jet) const = 0;
61
62 };
63} // namespace CP
64
65#endif //> !JETJVTEFFICIENCY_JVTSELECTIONTOOL_H
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
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
virtual ~JvtSelectionToolBase()=default
Gaudi::Property< std::string > m_jetEtaName
Interface for adding a decoration to a jet container.
Helper class to provide constant type-safe access to aux data.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
JetContainer_v1 JetContainer
Definition of the current "jet container version".