ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType > Class Template Reference

#include <PFMatchInterfaces.h>

Inheritance diagram for PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >:
Collaboration diagram for PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >:

Public Member Functions

 DistanceProvider (std::unique_ptr< IPositionProvider > trackPosition, std::unique_ptr< IPositionProvider > clusterPosition, std::unique_ptr< DistanceCalculator< TrackPositionType, ClusterPositionType > > distanceCalculator)
 
virtual ~DistanceProvider ()
 
double distanceBetween (ITrack *track, ICluster *cluster) const
 

Private Attributes

std::unique_ptr< TrackPositionProvider< TrackPositionType > > m_trackPosition
 
std::unique_ptr< ClusterPositionProvider< ClusterPositionType > > m_clusterPosition
 
std::unique_ptr< DistanceCalculator< TrackPositionType, ClusterPositionType > > m_distanceCalculator
 

Detailed Description

template<class TrackPositionType, class ClusterPositionType>
class PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >

Definition at line 126 of file PFMatchInterfaces.h.

Constructor & Destructor Documentation

◆ DistanceProvider()

template<class TrackPositionType , class ClusterPositionType >
PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >::DistanceProvider ( std::unique_ptr< IPositionProvider trackPosition,
std::unique_ptr< IPositionProvider clusterPosition,
std::unique_ptr< DistanceCalculator< TrackPositionType, ClusterPositionType > >  distanceCalculator 
)
inline

Definition at line 128 of file PFMatchInterfaces.h.

130  :
131  // dynamic_cast to ensure that the right distance provider classes are received
132  m_trackPosition(dynamic_cast<TrackPositionProvider<TrackPositionType>*>(trackPosition.release())),
133  m_clusterPosition(dynamic_cast<ClusterPositionProvider<ClusterPositionType>*>(clusterPosition.release())),
134  m_distanceCalculator(std::move(distanceCalculator)) {
135  // in debug builds we check the pointer validity here to catch a problem early on
136  assert(m_trackPosition.get());
137  assert(m_clusterPosition.get());
138  assert(m_distanceCalculator.get());
139  }

◆ ~DistanceProvider()

template<class TrackPositionType , class ClusterPositionType >
virtual PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >::~DistanceProvider ( )
inlinevirtual

Definition at line 140 of file PFMatchInterfaces.h.

140 {}

Member Function Documentation

◆ distanceBetween()

template<class TrackPositionType , class ClusterPositionType >
double PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >::distanceBetween ( ITrack track,
ICluster cluster 
) const
inlinevirtual

Implements PFMatch::IDistanceProvider.

Definition at line 142 of file PFMatchInterfaces.h.

142  {
143  TrackPositionProvider<TrackPositionType>* trackPositionProvider = m_trackPosition.get();
144  ClusterPositionProvider<ClusterPositionType>* clusterPositionProvider = m_clusterPosition.get();
145  return m_distanceCalculator->distanceBetween(trackPositionProvider->getPosition(track),clusterPositionProvider->getPosition(cluster));
146  }

Member Data Documentation

◆ m_clusterPosition

template<class TrackPositionType , class ClusterPositionType >
std::unique_ptr<ClusterPositionProvider<ClusterPositionType> > PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >::m_clusterPosition
private

Definition at line 150 of file PFMatchInterfaces.h.

◆ m_distanceCalculator

template<class TrackPositionType , class ClusterPositionType >
std::unique_ptr<DistanceCalculator<TrackPositionType, ClusterPositionType> > PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >::m_distanceCalculator
private

Definition at line 151 of file PFMatchInterfaces.h.

◆ m_trackPosition

template<class TrackPositionType , class ClusterPositionType >
std::unique_ptr<TrackPositionProvider<TrackPositionType> > PFMatch::DistanceProvider< TrackPositionType, ClusterPositionType >::m_trackPosition
private

Definition at line 149 of file PFMatchInterfaces.h.


The documentation for this class was generated from the following file:
PFMatch::DistanceProvider::m_trackPosition
std::unique_ptr< TrackPositionProvider< TrackPositionType > > m_trackPosition
Definition: PFMatchInterfaces.h:149
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
PFMatch::DistanceProvider::m_distanceCalculator
std::unique_ptr< DistanceCalculator< TrackPositionType, ClusterPositionType > > m_distanceCalculator
Definition: PFMatchInterfaces.h:151
PFMatch::DistanceProvider::m_clusterPosition
std::unique_ptr< ClusterPositionProvider< ClusterPositionType > > m_clusterPosition
Definition: PFMatchInterfaces.h:150