1 #ifndef __RecoParticleFlow_Benchmark_Matchers__
2 #define __RecoParticleFlow_Benchmark_Matchers__
13 template<
typename C,
typename M>
15 const M& matchedCandCollection,
16 std::vector<int>& matchIndices,
17 bool matchCharge =
false,
23 if(dRMax>0) dR2Max = dRMax*dRMax;
26 matchIndices.resize( candCollection.size(), -1);
28 for(
unsigned i=0;
i<candCollection.size(); ++
i) {
30 static const double bigNumber = 1e14;
31 double dR2min = bigNumber;
33 for(
unsigned jm=0; jm<matchedCandCollection.size(); ++jm) {
36 candCollection[
i].
charge()!=matchedCandCollection[jm].charge() )
40 matchedCandCollection[jm] );
47 if( (dR2Max>0 && dR2min < dR2Max) || dRMax<=0 ) {
48 matchIndices[
i] = jMin;
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
double deltaR2(const T1 &t1, const T2 &t2)