ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetMomentTools
JetMomentTools
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
"
24
#include "
AsgTools/PropertyWrapper.h
"
25
#include "
JetInterface/IJetDecorator.h
"
26
#include "
AsgDataHandles/WriteDecorHandleKey.h
"
27
28
#include "
xAODCaloEvent/CaloCluster.h
"
29
30
#include <string>
31
32
33
class
JetClusterMomentsTool
:
public
asg::AsgTool
,
34
virtual
public
IJetDecorator
{
35
ASG_TOOL_CLASS
(
JetClusterMomentsTool
,
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
54
const
xAOD::CaloCluster
*
findLeadingCluster
(
const
xAOD::Jet
&
jet
)
const
;
55
// Retrieve a moment from cluster
56
float
getMoment
(
const
xAOD::CaloCluster
* cluster,
const
xAOD::CaloCluster::MomentType
& momentType)
const
;
57
};
58
59
#endif
60
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
WriteDecorHandleKey.h
CaloCluster.h
IJetDecorator.h
PropertyWrapper.h
IJetDecorator
Interface for adding a decoration to a jet container.
Definition
IJetDecorator.h:21
JetClusterMomentsTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
JetClusterMomentsTool.cxx:13
JetClusterMomentsTool::findLeadingCluster
const xAOD::CaloCluster * findLeadingCluster(const xAOD::Jet &jet) const
Definition
JetClusterMomentsTool.cxx:62
JetClusterMomentsTool::m_clsPtKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsPtKey
Definition
JetClusterMomentsTool.h:48
JetClusterMomentsTool::m_clsCenterLambdaKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsCenterLambdaKey
Definition
JetClusterMomentsTool.h:50
JetClusterMomentsTool::getMoment
float getMoment(const xAOD::CaloCluster *cluster, const xAOD::CaloCluster::MomentType &momentType) const
Definition
JetClusterMomentsTool.cxx:95
JetClusterMomentsTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition
JetClusterMomentsTool.h:44
JetClusterMomentsTool::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
Definition
JetClusterMomentsTool.cxx:32
JetClusterMomentsTool::m_clsSecondRKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsSecondRKey
Definition
JetClusterMomentsTool.h:51
JetClusterMomentsTool::m_clsSecondLambdaKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clsSecondLambdaKey
Definition
JetClusterMomentsTool.h:49
JetClusterMomentsTool::JetClusterMomentsTool
JetClusterMomentsTool(const std::string &name)
Definition
JetClusterMomentsTool.cxx:8
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
xAOD::CaloCluster_v1::MomentType
MomentType
Enums to identify different moments.
Definition
CaloCluster_v1.h:123
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0