ATLAS Offline Software
Loading...
Searching...
No Matches
EMTrackMatchBuilder::TrackMatchSorter Class Reference

function object to sort track matches based on quality More...

Collaboration diagram for EMTrackMatchBuilder::TrackMatchSorter:

Public Member Functions

 TrackMatchSorter (double distance=0.0)
bool operator() (const TrackMatch &match1, const TrackMatch &match2) const

Private Attributes

double m_distance

Detailed Description

function object to sort track matches based on quality

Definition at line 83 of file EMTrackMatchBuilder.h.

Constructor & Destructor Documentation

◆ TrackMatchSorter()

EMTrackMatchBuilder::TrackMatchSorter::TrackMatchSorter ( double distance = 0.0)
inline

Definition at line 86 of file EMTrackMatchBuilder.h.

Member Function Documentation

◆ operator()()

bool EMTrackMatchBuilder::TrackMatchSorter::operator() ( const TrackMatch & match1,
const TrackMatch & match2 ) const

Definition at line 437 of file EMTrackMatchBuilder.cxx.

440{
441 if (match1.hasPix != match2.hasPix) { // prefer pixels first
442 return match1.hasPix;
443 }
444 // sqrt(0.025**2)*sqrt(2)/sqrt(12) ~ 0.01
445 if (std::abs(match1.dR - match2.dR) < m_distance) {
446
447 if (std::abs(match1.seconddR - match2.seconddR) >
448 m_distance) { // Can the second distance separate them?
449 return match1.seconddR < match2.seconddR;
450 }
451 if ((match1.hitsScore != match2.hitsScore)) { // use the one with more pixel
452 return match1.hitsScore > match2.hitsScore;
453 }
454 }
455 // closest DR
456 return match1.dR < match2.dR;
457}

Member Data Documentation

◆ m_distance

double EMTrackMatchBuilder::TrackMatchSorter::m_distance
private

Definition at line 91 of file EMTrackMatchBuilder.h.


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