12 #ifndef PFMATCHDISTANCE_H_
13 #define PFMATCHDISTANCE_H_
54 static std::unique_ptr<IDistanceProvider>
Get(
const std::string& distanceType, std::unique_ptr<IPositionProvider> trackPosition,
55 std::unique_ptr<IPositionProvider> clusterPosition) {
56 if (distanceType ==
"EtaPhiSquareDistance") {
57 return std::make_unique<DistanceProvider<EtaPhi, EtaPhi> >(std::move(trackPosition), std::move(clusterPosition), std::make_unique<EtaPhiSqDistanceCalculator>());
58 }
else if (distanceType ==
"EtaPhiSquareSignificance") {
59 return std::make_unique<DistanceProvider<EtaPhi, EtaPhiWithVariance> >(std::move(trackPosition), std::move(clusterPosition), std::make_unique<EtaPhiSqSignificanceCalculator>());
61 std::cerr <<
"DistanceFactory\tERROR\tInvalid distance type: \"" << distanceType <<
"\"" << std::endl;