ATLAS Offline Software
Public Member Functions | List of all members
Muon::SortByDistanceToSegment Struct Reference

Function object to sort pairs containing a double and a pointer to a MuonClusterOnTrack. More...

#include <DCMathSegmentMaker.h>

Collaboration diagram for Muon::SortByDistanceToSegment:

Public Member Functions

bool operator() (const std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> &hit1, const std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> &hit2)
 

Detailed Description

Function object to sort pairs containing a double and a pointer to a MuonClusterOnTrack.

The object is used to sort MuonClusterOnTrack objects along the trajectory of a give segment. Usage:

std::vector<std::pair<double,const MuonClusterOnTrack*> > myDistClusters;

...

std::sort( myDistClusters.begin(), myDistClusters.end(), SortByDistanceToSegment() );

Definition at line 82 of file DCMathSegmentMaker.h.

Member Function Documentation

◆ operator()()

bool Muon::SortByDistanceToSegment::operator() ( const std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> &  hit1,
const std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> &  hit2 
)
inline

Definition at line 83 of file DCMathSegmentMaker.h.

84  {
85  return hit1.first < hit2.first;
86  }

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