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 439 of file EMTrackMatchBuilder.cxx.

442{
443 if (match1.hasPix != match2.hasPix) { // prefer pixels first
444 return match1.hasPix;
445 }
446 // sqrt(0.025**2)*sqrt(2)/sqrt(12) ~ 0.01
447 if (std::abs(match1.dR - match2.dR) < m_distance) {
448
449 if (std::abs(match1.seconddR - match2.seconddR) >
450 m_distance) { // Can the second distance separate them?
451 return match1.seconddR < match2.seconddR;
452 }
453 if ((match1.hitsScore != match2.hitsScore)) { // use the one with more pixel
454 return match1.hitsScore > match2.hitsScore;
455 }
456 }
457 // closest DR
458 return match1.dR < match2.dR;
459}
bool match1(const ClassName &pattern, bool topLevel, match_t &matches) const
Match this expression against a pattern.

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: