ATLAS Offline Software
Static Public Member Functions | List of all members
PFMatch::DistanceFactory Class Reference

Factory to create IDistanceProvider of the type requested. More...

#include <PFMatchDistance.h>

Collaboration diagram for PFMatch::DistanceFactory:

Static Public Member Functions

static std::unique_ptr< IDistanceProviderGet (const std::string &distanceType, std::unique_ptr< IPositionProvider > trackPosition, std::unique_ptr< IPositionProvider > clusterPosition)
 

Detailed Description

Factory to create IDistanceProvider of the type requested.

Definition at line 52 of file PFMatchDistance.h.

Member Function Documentation

◆ Get()

static std::unique_ptr<IDistanceProvider> PFMatch::DistanceFactory::Get ( const std::string &  distanceType,
std::unique_ptr< IPositionProvider trackPosition,
std::unique_ptr< IPositionProvider clusterPosition 
)
inlinestatic

Definition at line 54 of file PFMatchDistance.h.

55  {
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>());
60  } else {
61  std::cerr << "DistanceFactory\tERROR\tInvalid distance type: \"" << distanceType << "\"" << std::endl;
62  assert(false);
63  return 0;
64  }
65  }

The documentation for this class was generated from the following file: