ATLAS Offline Software
JetClusterMomentsTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // JetClusterMomentsTool.h
6 
7 #ifndef JETMOMENTTOOLS_JETCLUSTERMOMENTSTOOL_H
8 #define JETMOMENTTOOLS_JETCLUSTERMOMENTSTOOL_H
9 
22 
23 #include "AsgTools/AsgTool.h"
27 
29 
30 #include <string>
31 
32 
34  virtual public IJetDecorator{
36  public:
37  // Constructor from tool name
38  JetClusterMomentsTool(const std::string& name);
39 
40  virtual StatusCode decorate(const xAOD::JetContainer& jets) const override;
41  virtual StatusCode initialize() override;
42 
43  private:
44  Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "SG key for the input jet container"};
45 
46  // SG keys for the moment decorations.
47  // If configured to be an empty string, that decoration will not be created.
48  SG::WriteDecorHandleKey<xAOD::JetContainer> m_clsPtKey{this, "PtKey", "LeadingClusterPt", "SG key for pt decoration"};
49  SG::WriteDecorHandleKey<xAOD::JetContainer> m_clsSecondLambdaKey{this, "SecondLambdaKey", "LeadingClusterSecondLambda", "SG key for second lambda decoration"};
50  SG::WriteDecorHandleKey<xAOD::JetContainer> m_clsCenterLambdaKey{this, "CenterLambdaKey", "LeadingClusterCenterLambda", "SG key for center lambda decoration"};
51  SG::WriteDecorHandleKey<xAOD::JetContainer> m_clsSecondRKey{this, "SecondRKey", "LeadingClusterSecondR", "SG key for second R decoration"};
52 
53  // Find cluster with highest energy, or return NULL if unsuccessful
55  // Retrieve a moment from cluster
56  float getMoment(const xAOD::CaloCluster* cluster, const xAOD::CaloCluster::MomentType& momentType) const;
57 };
58 
59 #endif
60 
JetClusterMomentsTool::getMoment
float getMoment(const xAOD::CaloCluster *cluster, const xAOD::CaloCluster::MomentType &momentType) const
Definition: JetClusterMomentsTool.cxx:94
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
JetClusterMomentsTool::findLeadingCluster
const xAOD::CaloCluster * findLeadingCluster(const xAOD::Jet &jet) const
Definition: JetClusterMomentsTool.cxx:62
IJetDecorator
Interface for adding a decoration to a jet container.
Definition: IJetDecorator.h:21
JetClusterMomentsTool::m_clsCenterLambdaKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsCenterLambdaKey
Definition: JetClusterMomentsTool.h:50
JetClusterMomentsTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetClusterMomentsTool.cxx:13
JetClusterMomentsTool::m_clsSecondLambdaKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsSecondLambdaKey
Definition: JetClusterMomentsTool.h:49
IJetDecorator.h
JetClusterMomentsTool
Jakub Cuth February 2014.
Definition: JetClusterMomentsTool.h:34
JetClusterMomentsTool::m_clsSecondRKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsSecondRKey
Definition: JetClusterMomentsTool.h:51
xAOD::CaloCluster_v1::MomentType
MomentType
Enums to identify different moments.
Definition: CaloCluster_v1.h:120
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
CaloCluster.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetClusterMomentsTool::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
Definition: JetClusterMomentsTool.cxx:32
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
JetClusterMomentsTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition: JetClusterMomentsTool.h:44
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
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
AsgTool.h
JetClusterMomentsTool::m_clsPtKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsPtKey
Definition: JetClusterMomentsTool.h:48
JetClusterMomentsTool::JetClusterMomentsTool
JetClusterMomentsTool(const std::string &name)
Definition: JetClusterMomentsTool.cxx:8