ATLAS Offline Software
JetWidthTool.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 // JetWidthTool.h
6 
7 #ifndef JetMomentTools_JetWidthTool_H
8 #define JetMomentTools_JetWidthTool_H
9 
14 
16 #include "AsgTools/AsgTool.h"
18 #include "AsgTools/ToolHandle.h"
20 
22 
23 class JetWidthTool : public asg::AsgTool,
24  virtual public IJetDecorator {
26 
27 public:
28 
29  // Constructor from tool name.
30  JetWidthTool(const std::string& myname);
31 
32  virtual StatusCode initialize() override;
33 
34  // Inherited method to decorate a jet container.
35  // Calls width and puts the result on the jets.
36  virtual StatusCode decorate(const xAOD::JetContainer& jets) const override;
37 
38  // Local method to calculate and return the width.
39  float width(const xAOD::Jet& jet, float& widthEta, float& widthPhi) const;
40 
41 private:
42 
43  Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "",
44  "SG key for the input jet container"};
45 
47  "SG key for width decoration (not including jet container name)"};
49  "SG key for width phi decoration (not including jet container name)"};
50 };
51 
52 #endif
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
JetWidthTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetWidthTool.cxx:22
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
JetWidthTool::m_widthPhiKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_widthPhiKey
Definition: JetWidthTool.h:48
JetWidthTool::m_widthKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_widthKey
Definition: JetWidthTool.h:46
IJetDecorator
Interface for adding a decoration to a jet container.
Definition: IJetDecorator.h:21
JetWidthTool::JetWidthTool
JetWidthTool(const std::string &myname)
Definition: JetWidthTool.cxx:15
IWeightPFOTool.h
IJetDecorator.h
JetWidthTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition: JetWidthTool.h:43
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
JetWidthTool::width
float width(const xAOD::Jet &jet, float &widthEta, float &widthPhi) const
Definition: JetWidthTool.cxx:55
WriteDecorHandleKey.h
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
JetWidthTool
Steven Schramm and David Adams February 2014.
Definition: JetWidthTool.h:24
JetWidthTool::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
Definition: JetWidthTool.cxx:40
ToolHandle.h
AsgTool.h