Checks if a cluster should be matched to a track or not, and has methods to return list of best matches.
More...
#include <PFMatcher.h>
Checks if a cluster should be matched to a track or not, and has methods to return list of best matches.
Definition at line 29 of file PFMatcher.h.
◆ TrackClusterMatcher()
PFMatch::TrackClusterMatcher::TrackClusterMatcher |
( |
std::unique_ptr< IDistanceProvider > |
distanceProvider, |
|
|
double |
matchCut |
|
) |
| |
|
inline |
◆ ~TrackClusterMatcher()
virtual PFMatch::TrackClusterMatcher::~TrackClusterMatcher |
( |
| ) |
|
|
inlinevirtual |
◆ bestMatchDRparametrized()
template<class ClusterType >
MatchDistance PFMatch::TrackClusterMatcher::bestMatchDRparametrized |
( |
ITrack * |
track, |
|
|
const std::vector< ClusterType * > & |
clusters |
|
) |
| const |
Definition at line 61 of file PFMatcher.h.
62 ClusterType* bestCluster =
nullptr;
64 unsigned int nClusters(
clusters.size());
65 for (
unsigned int iCluster = 0; iCluster < nClusters; ++iCluster){
67 ClusterType* thisCluster =
clusters[iCluster];
69 double mybestdistance = getDRCutSquared(thisCluster);
71 if (thisDistance < mybestdistance){
72 if (thisDistance < bestDistance) {
73 bestDistance = thisDistance;
74 bestCluster = thisCluster;
◆ bestMatches()
template<class ClusterType >
std::vector< MatchDistance > PFMatch::TrackClusterMatcher::bestMatches |
( |
ITrack * |
track, |
|
|
std::vector< ClusterType * > & |
clusters, |
|
|
int |
nMatches, |
|
|
double |
energyThreshold |
|
) |
| const |
Definition at line 83 of file PFMatcher.h.
85 std::vector<MatchDistance>
result;
86 unsigned const nClusters(
clusters.size());
89 for (
unsigned int iCluster = 0; iCluster < nClusters; ++iCluster) {
90 ClusterType* thisCluster =
clusters[iCluster];
99 int nLoops = nMatches;
100 std::vector<unsigned int> masked;
101 std::vector<int> maskedType;
102 for (
int imatch = 0; imatch < nLoops; ++imatch) {
103 ClusterType* bestCluster =
nullptr;
106 for (
unsigned int iCluster = 0; iCluster < nClusters; ++iCluster) {
108 if (masked.size() != 0 &&
find(masked.begin(), masked.end(), iCluster) != masked.end()) {
112 ClusterType* thisCluster =
clusters[iCluster];
115 if(imatch == 0 && thisCluster->e() <= energyThreshold) {
121 if ((maskedType.size() != 0 &&
find(maskedType.begin(), maskedType.end(),
122 thisCluster->getEfRecCluster()->getClusterType()) != maskedType.end())
123 || (thisCluster->getEfRecCluster()->getClusterType() == 4)) {
129 if (thisDistance < bestDistance) {
131 bestDistance = thisDistance;
132 bestCluster = thisCluster;
135 if (iMasked == -1 ||
nullptr == bestCluster)
break;
137 masked.push_back(iMasked);
138 maskedType.push_back(bestCluster->getEfRecCluster()->getClusterType());
142 assert(maskedType.size() == masked.size());
◆ match()
◆ setDRParameters()
void PFMatch::TrackClusterMatcher::setDRParameters |
( |
| ) |
|
|
private |
This sets the parameters in the above array.
Definition at line 21 of file PFMatcher.cxx.
23 std::ifstream DRPARAM(theFileName.c_str());
◆ m_distanceProvider
◆ m_drcut_par
float PFMatch::TrackClusterMatcher::m_drcut_par[9][3] |
|
private |
This stores the parameters to vary DR cut with Pt.
Definition at line 52 of file PFMatcher.h.
◆ m_matchCut
double PFMatch::TrackClusterMatcher::m_matchCut |
|
private |
The documentation for this class was generated from the following files: