ATLAS Offline Software
EventCleaningTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JETSELECTORTOOLS_EVENTCLEANINGTOOL_H
6 #define JETSELECTORTOOLS_EVENTCLEANINGTOOL_H
7 
16 // Stdlib includes
17 #include <string>
18 #include <vector>
19 #include <unordered_map>
20 
21 // Base classes
22 #include "AsgTools/AsgTool.h"
23 #include "AsgTools/AnaToolHandle.h"
26 
27 // Local includes
28 #include "IEventCleaningTool.h"
29 #include "xAODJet/Jet.h"
33 
34 namespace ECUtils
35 {
36 
37 class EventCleaningTool : public virtual IEventCleaningTool,
38  public asg::AsgTool
39 {
40 
43 
44  public:
45 
47  EventCleaningTool(const std::string& name="EventCleaningTool");
48 
50  virtual ~EventCleaningTool();
51 
53  virtual StatusCode initialize() override;
54 
55  virtual bool acceptEvent(const xAOD::JetContainer* jets) const override;
56 
57  virtual int keepJet(const xAOD::Jet& jet) const override;
58 
59  private:
60  Gaudi::Property<double> m_pt {this, "PtCut" , 20000., "Jet pt cut"};
61  Gaudi::Property<double> m_eta {this, "EtaCut" , 4.5, "Jet eta cut"};
62  Gaudi::Property<std::string> m_prefix {this, "JetCleanPrefix", "", "Jet cleaning decoration prefix"};
63  Gaudi::Property<bool> m_decorate {this, "DoDecorations", true, "Decorate jets with cleaning decision?"};
64  Gaudi::Property<bool> m_useDecorations {this, "UseDecorations", false, "Use decorations in cleaning tool?"};
65  Gaudi::Property<std::string> m_cleaningLevel {this, "CleaningLevel", "LooseBad", "Jet cleaning level"};
66  Gaudi::Property<bool> m_suppressInputDeps{this, "SuppressInputDependence", false, "Will passOR be created in the same algorithm that uses this tool?"};
67  Gaudi::Property<bool> m_suppressOutputDeps{this, "SuppressOutputDependence", false, "Create output dependencies?"};
69 
70  Gaudi::Property<std::string> m_jetContainerName {this, "JetContainer", "", "Input jet container key"};
71  SG::ReadDecorHandleKey<xAOD::JetContainer> m_passJvtKey {this, "JvtDecorator", "passJvt", "JVT decision decoration key"};
72  SG::ReadDecorHandleKey<xAOD::JetContainer> m_passORKey {this, "OrDecorator" , "passOR", "Overlap removal decision decoration key"};
73  SG::WriteDecorHandleKey<xAOD::JetContainer> m_jetCleanKey{this, "JetCleanKey" , "", "Jet-level cleaning decoration key (autoconfigured)"};
74 
75 }; // End: class definition
76 }//ECUtils
77 
78 #endif
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
Jet.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
asg::AnaToolHandle< IJetSelector >
IEventCleaningTool.h
ECUtils::EventCleaningTool::m_pt
Gaudi::Property< double > m_pt
Definition: EventCleaningTool.h:60
ECUtils::EventCleaningTool::m_cleaningLevel
Gaudi::Property< std::string > m_cleaningLevel
Definition: EventCleaningTool.h:65
ECUtils::IEventCleaningTool
Interface for the event cleaning tool.
Definition: IEventCleaningTool.h:24
ECUtils::EventCleaningTool::initialize
virtual StatusCode initialize() override
Initialize method.
Definition: EventCleaningTool.cxx:65
ECUtils::EventCleaningTool
Definition: EventCleaningTool.h:39
ECUtils::EventCleaningTool::m_useDecorations
Gaudi::Property< bool > m_useDecorations
Definition: EventCleaningTool.h:64
IJetSelector.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ECUtils::EventCleaningTool::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: EventCleaningTool.h:62
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
ECUtils::EventCleaningTool::m_jetCleanKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetCleanKey
Definition: EventCleaningTool.h:73
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ECUtils::EventCleaningTool::keepJet
virtual int keepJet(const xAOD::Jet &jet) const override
Definition: EventCleaningTool.cxx:144
JetCleaningTool.h
ECUtils::EventCleaningTool::m_decorate
Gaudi::Property< bool > m_decorate
Definition: EventCleaningTool.h:63
ECUtils::EventCleaningTool::acceptEvent
virtual bool acceptEvent(const xAOD::JetContainer *jets) const override
Declare the interface.
Definition: EventCleaningTool.cxx:110
ECUtils::EventCleaningTool::m_suppressInputDeps
Gaudi::Property< bool > m_suppressInputDeps
Definition: EventCleaningTool.h:66
ECUtils::EventCleaningTool::m_suppressOutputDeps
Gaudi::Property< bool > m_suppressOutputDeps
Definition: EventCleaningTool.h:67
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AnaToolHandle.h
ECUtils::EventCleaningTool::m_eta
Gaudi::Property< double > m_eta
Definition: EventCleaningTool.h:61
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ECUtils::EventCleaningTool::m_passJvtKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_passJvtKey
Definition: EventCleaningTool.h:71
ECUtils::EventCleaningTool::m_jetCleaningTool
asg::AnaToolHandle< IJetSelector > m_jetCleaningTool
Definition: EventCleaningTool.h:68
EventInfo.h
WriteDecorHandleKey.h
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
ECUtils::EventCleaningTool::m_passORKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_passORKey
Definition: EventCleaningTool.h:72
ECUtils::EventCleaningTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition: EventCleaningTool.h:70
ECUtils::EventCleaningTool::~EventCleaningTool
virtual ~EventCleaningTool()
Standard destructor.
Definition: EventCleaningTool.cxx:60
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
ECUtils
Definition: EventCleaningTool.h:35
AsgTool.h
ECUtils::EventCleaningTool::EventCleaningTool
EventCleaningTool(const std::string &name="EventCleaningTool")
Create a proper constructor for Athena.
Definition: EventCleaningTool.cxx:49