ATLAS Offline Software
PFTrackClusterMatchingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*
6  * PFMatchingTool.h
7  *
8  * Created on: 15.04.2014
9  * Author: tlodd
10  */
11 
13 
14 #ifndef PFMATCHINGTOOL_H_
15 #define PFMATCHINGTOOL_H_
16 
17 #include <utility>
18 #include "eflowRec/PFMatcher.h"
19 #include "CLHEP/Units/SystemOfUnits.h"
21 
22 class eflowRecCluster;
23 class eflowRecTrack;
25 class eflowMatchCluster;
26 
27 static const InterfaceID IID_PFTrackClusterMatchingTool("PFTrackClusterMatchingTool", 1, 0);
28 
33 
34 public:
35  PFTrackClusterMatchingTool(const std::string& type, const std::string& name, const IInterface* parent);
37 
38  static const InterfaceID& interfaceID();
39 
42 
44  std::vector<std::pair<eflowRecCluster*, float>> doMatches(
45  const eflowRecTrack* track,
47  int n) const;
48  std::vector<std::pair<eflowRecCluster*, float>> doMatches(
49  const eflowRecTrack* track,
50  std::vector<eflowRecCluster*>& clusters,
51  int n) const;
52 
53 private:
54 
56  std::string m_trackPositionType;
58  std::string m_clusterPositionType;
60  std::string m_distanceType;
62  double m_matchCut;
63 
65  std::unique_ptr<PFMatch::TrackClusterMatcher> m_matcher;
66 
68  ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool_ClusterMatching","","Monitoring tool"};
69 
70  const float m_invGeV = 1./CLHEP::GeV;
71 };
72 
73 inline const InterfaceID& PFTrackClusterMatchingTool::interfaceID() { return IID_PFTrackClusterMatchingTool; }
74 
75 
76 #endif /* PFMATCHINGTOOL_H_ */
PFTrackClusterMatchingTool::m_distanceType
std::string m_distanceType
The type of distance measure to be used for matching.
Definition: PFTrackClusterMatchingTool.h:60
eflowRecCluster
This class extends the information about a xAOD::CaloCluster.
Definition: eflowRecCluster.h:40
PFTrackClusterMatchingTool::m_matcher
std::unique_ptr< PFMatch::TrackClusterMatcher > m_matcher
The track cluster matcher to perform the actual matching.
Definition: PFTrackClusterMatchingTool.h:65
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
PFTrackClusterMatchingTool::m_trackPositionType
std::string m_trackPositionType
The type of track position to be used for matching.
Definition: PFTrackClusterMatchingTool.h:56
PFTrackClusterMatchingTool::~PFTrackClusterMatchingTool
virtual ~PFTrackClusterMatchingTool()
Definition: PFTrackClusterMatchingTool.h:36
eflowRecClusterContainer
Definition: eflowRecCluster.h:275
PFTrackClusterMatchingTool
This is the tool, which inherits from AthAlgTool, which clients can use for track-cluster matching.
Definition: PFTrackClusterMatchingTool.h:32
PFTrackClusterMatchingTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Online monitoring tool for recording histograms of the alg in action.
Definition: PFTrackClusterMatchingTool.h:68
eflowRecTrack
This class extends the information about a xAOD::Track.
Definition: eflowRecTrack.h:46
PFMatcher.h
PFTrackClusterMatchingTool::m_matchCut
double m_matchCut
The cut value on the distance measure.
Definition: PFTrackClusterMatchingTool.h:62
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
PFTrackClusterMatchingTool::finalize
StatusCode finalize()
Definition: PFTrackClusterMatchingTool.cxx:51
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PFTrackClusterMatchingTool::doMatches
std::vector< std::pair< eflowRecCluster *, float > > doMatches(const eflowRecTrack *track, eflowRecClusterContainer *clusters, int n) const
Get n clusters that matches best to a given track.
Definition: PFTrackClusterMatchingTool.cxx:57
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
PFTrackClusterMatchingTool::interfaceID
static const InterfaceID & interfaceID()
Definition: PFTrackClusterMatchingTool.h:73
PFTrackClusterMatchingTool::m_clusterPositionType
std::string m_clusterPositionType
The type of cluster position to be used for matching.
Definition: PFTrackClusterMatchingTool.h:58
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
PFTrackClusterMatchingTool::PFTrackClusterMatchingTool
PFTrackClusterMatchingTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PFTrackClusterMatchingTool.cxx:22
eflowMatchCluster
This class, which inherits from the pure virtual ICluster, stores a pointer to an eflowRecCluster.
Definition: eflowRecCluster.h:140
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
PFTrackClusterMatchingTool::m_invGeV
const float m_invGeV
Definition: PFTrackClusterMatchingTool.h:70
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
AthAlgTool
Definition: AthAlgTool.h:26
PFTrackClusterMatchingTool::initialize
StatusCode initialize()
Definition: PFTrackClusterMatchingTool.cxx:38