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;
T getParameter(std::string const &) const
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())