1 #ifndef __RecoParticleFlow_Benchmark_Matchers__
2 #define __RecoParticleFlow_Benchmark_Matchers__
16 template <
typename C,
typename M>
18 const M &matchedCandCollection,
19 std::vector<int> &matchIndices,
29 matchIndices.resize(candCollection.size(), -1);
31 for (
unsigned i = 0;
i < candCollection.size(); ++
i) {
32 static const double bigNumber = 1e14;
33 double dR2min = bigNumber;
35 for (
unsigned jm = 0; jm < matchedCandCollection.size(); ++jm) {
39 double dR2 =
reco::deltaR2(candCollection[
i], matchedCandCollection[jm]);
47 matchIndices[
i] = jMin;
56 template <
typename C,
typename M>
58 const M &matchedCandCollection,
59 std::vector<int> &matchIndices,
72 matchIndices.resize(candCollection.size(), -1);
74 for (
unsigned i = 0;
i < candCollection.size(); ++
i) {
75 static const double bigNumber = 1e14;
76 double dR2min = bigNumber;
78 for (
unsigned jm = 0; jm < matchedCandCollection.size(); ++jm) {
81 muonMatchedCandCollection[jm].isPFMuon() ||
83 (muonMatchedCandCollection[jm].isGlobalMuon() || muonMatchedCandCollection[jm].isStandAloneMuon() ||
84 muonMatchedCandCollection[jm].numberOfMatches() > 0 ||
92 double dR2 =
reco::deltaR2(candCollection[
i], matchedCandCollection[jm]);
100 matchIndices[
i] = jMin;