ATLAS Offline Software
Loading...
Searching...
No Matches
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
24 virtual public IJetDecorator {
26
27public:
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
41private:
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
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
const double width
Interface for adding a decoration to a jet container.
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_widthPhiKey
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
JetWidthTool(const std::string &myname)
Gaudi::Property< std::string > m_jetContainerName
SG::WriteDecorHandleKey< xAOD::JetContainer > m_widthKey
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
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".