ATLAS Offline Software
HIJetConstituentSubtractionTool.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 // HIJetConstituentSubtractionTool.h
6 
7 #ifndef HIJETREC_HIJETCONSTITUENTSUBTRACTIONTOOL_H
8 #define HIJETREC_HIJETCONSTITUENTSUBTRACTIONTOOL_H
9 
28 
29 #include <string>
30 #include "JetRec/JetModifierBase.h"
31 #include "HIJetRec/HIJetRecDefs.h"
34 #include "AsgTools/ToolHandle.h"
36 
39 
42 
44 {
45 
47 
48 public:
49 
50  HIJetConstituentSubtractionTool(const std::string& t);
51 
52  virtual StatusCode initialize() override;
53 
55  virtual StatusCode modify(xAOD::JetContainer& jets) const override;
56 
58  virtual int modifyJet(xAOD::Jet&) const override {return 1;};
59 
60 private:
61 
62  // Migration to data handles
64  SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_eventShapeKey { this, "EventShapeKey", "", "The input HI Event Shape"};
65 
66  //That looks useless. commented out for the moment
67  //std::string m_modulation_key;
72  Gaudi::Property< std::string > m_momentName { this, "MomentName", HIJetRec::subtractedJetState(), "Subtracted Jet Kineamtics are stored using this string like a signal/state moment" } ;
73 
77  Gaudi::Property< bool > m_momentOnly { this, "SetMomentOnly", true,
78  "If this flag is set, the primary jet kinematics are also set to reflect this subtraction eventually do this w/ a signal state" } ;
81  ToolHandle<IHISubtractorTool> m_subtractorTool { this, "Subtractor", "HIJetClusterSubtractorTool", "" };
82  ToolHandle<IHIUEModulatorTool> m_modulatorTool { this, "Modulator" , "HIUEModulatorTool ", "" };
83  ToolHandle<IHIEventShapeMapTool> m_eventShapeMapTool { this, "EventShapeMapTool", "HIEventShapeMapTool", "Handle to Event Shape Map Tool"};
84 
85  Gaudi::Property< bool > m_originCorrection { this, "ApplyOriginCorrection", false, "Apply Origin Correction boolean switch"};
86 
87 protected:
91  //That looks useless. commented out for the moment
92  //inline std::string ModulationKey() const {return m_modulation_key;};
93  inline const std::string& momentName() const { return m_momentName; };
94  inline bool momentOnly() const { return m_momentOnly; };
95 
97  inline void setMomentName(const std::string& key) { m_momentName=key; };
98  inline void setMomentOnly(bool x) { m_momentOnly=x; };
99 
100 };
101 
102 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
HIEventShapeMapTool.h
HIJetConstituentSubtractionTool::EventShapeKey
SG::ReadHandleKey< xAOD::HIEventShapeContainer > EventShapeKey()
Protected set/get functions provide access to private data members in derived classes.
Definition: HIJetConstituentSubtractionTool.h:90
HIJetConstituentSubtractionTool::m_subtractorTool
ToolHandle< IHISubtractorTool > m_subtractorTool
handle to IHISubtractorTool that determines the subtracted kinematics for each constituent
Definition: HIJetConstituentSubtractionTool.h:81
HIJetConstituentSubtractionTool::m_momentOnly
Gaudi::Property< bool > m_momentOnly
if this flag is set, the primary jet kinematics are also set to reflect this subtraction eventually d...
Definition: HIJetConstituentSubtractionTool.h:77
HIJetConstituentSubtractionTool::m_eventShapeMapTool
ToolHandle< IHIEventShapeMapTool > m_eventShapeMapTool
Definition: HIJetConstituentSubtractionTool.h:83
HIJetConstituentSubtractionTool::HIJetConstituentSubtractionTool
HIJetConstituentSubtractionTool(const std::string &t)
Definition: HIJetConstituentSubtractionTool.cxx:17
HIJetConstituentSubtractionTool::setEventShapeKey
void setEventShapeKey(const SG::ReadHandleKey< xAOD::HIEventShapeContainer > &key)
Definition: HIJetConstituentSubtractionTool.h:96
HIJetConstituentSubtractionTool::m_eventShapeKey
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_eventShapeKey
Name of HIEventShapeContainer.
Definition: HIJetConstituentSubtractionTool.h:64
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
x
#define x
HIJetConstituentSubtractionTool
JetModifier that actual does the background subtraction. This tool is the most important one applied ...
Definition: HIJetConstituentSubtractionTool.h:44
HIJetConstituentSubtractionTool::m_momentName
Gaudi::Property< std::string > m_momentName
Subtracted jet kinematics are stored using this string like a signal state/moment Jet::setJetP4 ( std...
Definition: HIJetConstituentSubtractionTool.h:72
HIJetConstituentSubtractionTool::setMomentOnly
void setMomentOnly(bool x)
Definition: HIJetConstituentSubtractionTool.h:98
HIJetConstituentSubtractionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: HIJetConstituentSubtractionTool.cxx:23
HIJetConstituentSubtractionTool::m_modulatorTool
ToolHandle< IHIUEModulatorTool > m_modulatorTool
Definition: HIJetConstituentSubtractionTool.h:82
HIJetRec::subtractedJetState
constexpr const char * subtractedJetState()
Definition: HIJetRecDefs.h:19
HIJetConstituentSubtractionTool::momentOnly
bool momentOnly() const
Definition: HIJetConstituentSubtractionTool.h:94
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HIEventShapeContainer.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
JetModifierBase.h
HIJetConstituentSubtractionTool::momentName
const std::string & momentName() const
Definition: HIJetConstituentSubtractionTool.h:93
HIJetConstituentSubtractionTool::modify
virtual StatusCode modify(xAOD::JetContainer &jets) const override
Implementing abstract methods from base.
Definition: HIJetConstituentSubtractionTool.cxx:33
IHISubtractorTool.h
HIJetConstituentSubtractionTool::modifyJet
virtual int modifyJet(xAOD::Jet &) const override
Implementing abstract methods from base, not used.
Definition: HIJetConstituentSubtractionTool.h:58
HIJetConstituentSubtractionTool::m_originCorrection
Gaudi::Property< bool > m_originCorrection
Definition: HIJetConstituentSubtractionTool.h:85
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
VertexContainer.h
HIJetConstituentSubtractionTool::ASG_TOOL_CLASS0
ASG_TOOL_CLASS0(HIJetConstituentSubtractionTool)
IHIUEModulatorTool.h
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
HIJetConstituentSubtractionTool::setMomentName
void setMomentName(const std::string &key)
Definition: HIJetConstituentSubtractionTool.h:97
HIJetRecDefs.h
ToolHandle.h
JetModifierBase
Definition: JetModifierBase.h:22
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37