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 64 of file PFMatcher.h.
65 ClusterType* bestCluster =
nullptr;
67 unsigned int nClusters(
clusters.size());
68 for (
unsigned int iCluster = 0; iCluster < nClusters; ++iCluster){
70 ClusterType* thisCluster =
clusters[iCluster];
74 if (thisDistance < mybestdistance){
75 if (thisDistance < bestDistance) {
76 bestDistance = thisDistance;
77 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 86 of file PFMatcher.h.
88 std::vector<MatchDistance>
result;
89 unsigned const nClusters(
clusters.size());
92 for (
unsigned int iCluster = 0; iCluster < nClusters; ++iCluster) {
93 ClusterType* thisCluster =
clusters[iCluster];
102 int nLoops = nMatches;
103 std::vector<unsigned int> masked;
104 std::vector<int> maskedType;
105 for (
int imatch = 0; imatch < nLoops; ++imatch) {
106 ClusterType* bestCluster =
nullptr;
109 for (
unsigned int iCluster = 0; iCluster < nClusters; ++iCluster) {
111 if (masked.size() != 0 &&
find(masked.begin(), masked.end(), iCluster) != masked.end()) {
115 ClusterType* thisCluster =
clusters[iCluster];
118 if(imatch == 0 && thisCluster->e() <= energyThreshold) {
124 if ((maskedType.size() != 0 &&
find(maskedType.begin(), maskedType.end(),
125 thisCluster->getEfRecCluster()->getClusterType()) != maskedType.end())
126 || (thisCluster->getEfRecCluster()->getClusterType() == 4)) {
132 if (thisDistance < bestDistance) {
134 bestDistance = thisDistance;
135 bestCluster = thisCluster;
138 if (iMasked == -1 ||
nullptr == bestCluster)
break;
140 masked.push_back(iMasked);
141 maskedType.push_back(bestCluster->getEfRecCluster()->getClusterType());
145 assert(maskedType.size() == masked.size());
◆ getDRCutSquared()
template<class ClusterType >
double PFMatch::TrackClusterMatcher::getDRCutSquared |
( |
ClusterType * |
theCluster | ) |
const |
Definition at line 153 of file PFMatcher.h.
155 double m_coneRSq = 1.64*1.64;
156 double coneRSq = m_coneRSq;
160 clusEta = theCluster->eta();
162 if (std::abs(clusEta)<0.6) ieta=0;
163 if (std::abs(clusEta)>=0.6 && std::abs(clusEta)<1.6) ieta = 1 +
int((std::abs(clusEta) - 0.6)/0.2) ;
164 if (std::abs(clusEta)>=1.6 && std::abs(clusEta)<2.0) ieta = 6 ;
165 if (std::abs(clusEta)>=2.0 && std::abs(clusEta)<2.5) ieta = 7 ;
166 if (std::abs(clusEta)>=2.5) ieta = 8 ;
168 double clusterEnergy = theCluster->e()/1000.0;
171 coneRSq = drcut*drcut;
173 if (coneRSq>m_coneRSq) coneRSq = m_coneRSq;
176 if (coneRSq<conemin*conemin) coneRSq = conemin*conemin;
◆ 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 55 of file PFMatcher.h.
◆ m_matchCut
double PFMatch::TrackClusterMatcher::m_matchCut |
|
private |
The documentation for this class was generated from the following files: