ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecoTools
CaloClusterMatching
src
CaloClusterMatchingTool.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// CaloClusterMatchingTool.h
8
// Header file for class CaloClusterMatchingTool
9
// Author: T.J. Khoo<khoo@cern.ch>
11
#ifndef CALOCLUSTERMATCHING_CALOCLUSTERMATCHINGTOOL_H
12
#define CALOCLUSTERMATCHING_CALOCLUSTERMATCHINGTOOL_H 1
13
14
// STL includes
15
#include <string>
16
17
// FrameWork includes
18
#include "
AsgTools/AsgTool.h
"
19
#include "
StoreGate/WriteDecorHandle.h
"
20
21
// CaloClusterMatching includes
22
#include "
CaloClusterMatching/TopoClusterMap.h
"
23
#include "
CaloClusterMatching/ICaloClusterMatchingTool.h
"
24
25
// xAOD includes
26
#include "
xAODCaloEvent/CaloClusterContainer.h
"
27
28
// Forward declaration
29
30
namespace
ClusterMatching
{
31
32
class
CaloClusterMatchingTool
33
:
virtual
public
asg::AsgTool
,
34
virtual
public
::ICaloClusterMatchingTool
35
{
36
ASG_TOOL_CLASS
(
CaloClusterMatchingTool
,
ICaloClusterMatchingTool
)
37
38
39
// Public methods:
41
public
:
42
44
using
asg::AsgTool::AsgTool
;
45
47
virtual
~CaloClusterMatchingTool
();
48
49
// Athena algtool's Hooks
50
virtual
StatusCode
initialize
()
override
;
51
virtual
StatusCode
finalize
()
override
;
52
54
// Const methods:
56
57
StatusCode
fillClusterMap
(
const
EventContext& ctx,
TopoClusterMap
& tcmap)
const
override
final
;
58
59
// return shared fraction of clustered cell energy
60
float
getClusterSharedEfrac
(
const
xAOD::CaloCluster
& refCluster,
61
const
xAOD::CaloCluster
& testCluster)
const
override
final
;
62
63
// return true if clusters share a given fraction of their cell energy
64
bool
clustersAreMatched
(
const
xAOD::CaloCluster
& refCluster,
65
const
xAOD::CaloCluster
& testCluster)
const
override
final
;
66
67
// fill a list of clusters from the testClusters container that match the reference cluster
68
// match criteria determined by calling clustersAreMatched
69
// return true if matchedClusters list is non-empty.
70
bool
getMatchedClusters
(
const
xAOD::CaloCluster
& refCluster,
71
const
std::vector<const xAOD::CaloCluster*>& testClusters,
72
std::vector<const xAOD::CaloCluster*>& matchedClusters)
const
override
final
;
73
74
// fill a list of clusters from the configured cluster container that match the reference cluster
75
// match criteria determined by calling clustersAreMatched
76
// return true if matchedClusters list is non-empty
77
bool
getMatchedClusters
(
const
xAOD::CaloCluster
& refCluster,
78
std::vector<const xAOD::CaloCluster*>& matchedClusters,
79
const
TopoClusterMap
& tcmap,
80
bool
useLeadingCellEtaPhi)
const
override
final
;
81
82
// fill a list of clusters from the testClusters container that match the reference cluster
83
// match criteria determined by calling clustersAreMatched
84
// return true if matchedClusters list is non-empty.
85
bool
getMatchedClusters
(
const
xAOD::CaloCluster
& refCluster,
86
const
std::vector<const xAOD::CaloCluster*>& testClusters,
87
std::vector<std::pair<const xAOD::CaloCluster*,float> >& matchedClusters)
const
override
final
;
88
89
// fill a list of clusters from the configured cluster container that match the reference cluster
90
// match criteria determined by calling clustersAreMatched
91
// return true if matchedClusters list is non-empty
92
bool
getMatchedClusters
(
const
xAOD::CaloCluster
& refCluster,
93
std::vector<std::pair<const xAOD::CaloCluster*, float> >& matchedClusters,
94
const
TopoClusterMap
& tcmap,
95
bool
useLeadingCellEtaPhi)
const
override
final
;
96
97
// set ElementLinks to clusters from the configured cluster container that match the reference cluster
98
// works via getMatchedClusters
99
// return true if matchedClusters list is non-empty
100
StatusCode
linkMatchedClusters
(
elementLinkDecorHandle_t
& elementLinkDec,
101
const
xAOD::CaloCluster
& refCluster,
102
const
std::vector<const xAOD::CaloCluster*>& testClusters,
103
bool
(*gtrthan)(
const
std::pair<const xAOD::CaloCluster*,float>& pair1,
104
const
std::pair<const xAOD::CaloCluster*,float>& pair2))
const
override
final
;
105
106
// set ElementLinks to clusters from the configured cluster container that match the reference cluster
107
// works via getMatchedClusters
108
// return true if matchedClusters list is non-empty
109
StatusCode
linkMatchedClusters
(
elementLinkDecorHandle_t
& elementLinkDec,
110
const
xAOD::CaloCluster
& refCluster,
111
const
TopoClusterMap
& tcmap,
112
bool
useLeadingCellEtaPhi,
113
bool
(*gtrthan)(
const
std::pair<const xAOD::CaloCluster*,float>& pair1,
114
const
std::pair<const xAOD::CaloCluster*,float>& pair2))
const
override
final
;
115
117
// Private data:
119
private
:
120
Gaudi::Property<bool>
m_reqPosE
{
this
,
"RequirePositiveE"
,
true
};
121
Gaudi::Property<float>
m_minSharedEfrac
{
this
,
"MinSharedEfrac"
, 0.2 };
122
SG::ReadHandleKey<xAOD::CaloClusterContainer>
m_clustersIn
{
123
this
,
124
"InputClusterCollection"
,
125
"CaloCalTopoClusters"
,
126
"The CaloCluster collection to match to "
127
};
128
};
129
}
130
131
#endif
//> !CALOCLUSTERMATCHING_CALOCLUSTERMATCHINGTOOL_H
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
CaloClusterContainer.h
ICaloClusterMatchingTool.h
WriteDecorHandle.h
Handle class for adding a decoration to an object.
TopoClusterMap.h
ClusterMatching::CaloClusterMatchingTool
Definition
CaloClusterMatchingTool.h:35
ClusterMatching::CaloClusterMatchingTool::~CaloClusterMatchingTool
virtual ~CaloClusterMatchingTool()
Destructor:
ClusterMatching::CaloClusterMatchingTool::linkMatchedClusters
StatusCode linkMatchedClusters(elementLinkDecorHandle_t &elementLinkDec, const xAOD::CaloCluster &refCluster, const std::vector< const xAOD::CaloCluster * > &testClusters, bool(*gtrthan)(const std::pair< const xAOD::CaloCluster *, float > &pair1, const std::pair< const xAOD::CaloCluster *, float > &pair2)) const override final
Definition
CaloClusterMatchingTool.cxx:201
ClusterMatching::CaloClusterMatchingTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
CaloClusterMatchingTool.cxx:32
ClusterMatching::CaloClusterMatchingTool::clustersAreMatched
bool clustersAreMatched(const xAOD::CaloCluster &refCluster, const xAOD::CaloCluster &testCluster) const override final
Definition
CaloClusterMatchingTool.cxx:93
ClusterMatching::CaloClusterMatchingTool::getMatchedClusters
bool getMatchedClusters(const xAOD::CaloCluster &refCluster, const std::vector< const xAOD::CaloCluster * > &testClusters, std::vector< const xAOD::CaloCluster * > &matchedClusters) const override final
Definition
CaloClusterMatchingTool.cxx:102
ClusterMatching::CaloClusterMatchingTool::finalize
virtual StatusCode finalize() override
Definition
CaloClusterMatchingTool.cxx:47
ClusterMatching::CaloClusterMatchingTool::m_reqPosE
Gaudi::Property< bool > m_reqPosE
Definition
CaloClusterMatchingTool.h:120
ClusterMatching::CaloClusterMatchingTool::getClusterSharedEfrac
float getClusterSharedEfrac(const xAOD::CaloCluster &refCluster, const xAOD::CaloCluster &testCluster) const override final
Definition
CaloClusterMatchingTool.cxx:68
ClusterMatching::CaloClusterMatchingTool::fillClusterMap
StatusCode fillClusterMap(const EventContext &ctx, TopoClusterMap &tcmap) const override final
Definition
CaloClusterMatchingTool.cxx:58
ClusterMatching::CaloClusterMatchingTool::m_clustersIn
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clustersIn
Definition
CaloClusterMatchingTool.h:122
ClusterMatching::CaloClusterMatchingTool::m_minSharedEfrac
Gaudi::Property< float > m_minSharedEfrac
Definition
CaloClusterMatchingTool.h:121
ICaloClusterMatchingTool
Definition
ICaloClusterMatchingTool.h:42
ICaloClusterMatchingTool::elementLinkDecorHandle_t
SG::WriteDecorHandle< xAOD::CaloClusterContainer, std::vector< ElementLink< xAOD::CaloClusterContainer > > > elementLinkDecorHandle_t
Definition
ICaloClusterMatchingTool.h:47
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
TopoClusterMap
Definition
TopoClusterMap.h:11
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
ClusterMatching
Definition
ICaloClusterMatchingTool.h:26
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
Generated on
for ATLAS Offline Software by
1.17.0