ATLAS Offline Software
Loading...
Searching...
No Matches
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
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Interface for adding a decoration to a jet container.
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
const xAOD::CaloCluster * findLeadingCluster(const xAOD::Jet &jet) const
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsPtKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsCenterLambdaKey
float getMoment(const xAOD::CaloCluster *cluster, const xAOD::CaloCluster::MomentType &momentType) const
Gaudi::Property< std::string > m_jetContainerName
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsSecondRKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsSecondLambdaKey
JetClusterMomentsTool(const std::string &name)
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
MomentType
Enums to identify different moments.
Jet_v1 Jet
Definition of the current "jet version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
JetContainer_v1 JetContainer
Definition of the current "jet container version".