CMS 3D CMS Logo

Public Member Functions

LinTrackCache::Comparer Struct Reference

List of all members.

Public Member Functions

bool operator() (const GlobalPoint &, const GlobalPoint &)

Detailed Description

Definition at line 13 of file LinTrackCache.h.


Member Function Documentation

bool LinTrackCache::Comparer::operator() ( const GlobalPoint left,
const GlobalPoint right 
)

Definition at line 42 of file LinTrackCache.cc.

References PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{
  // if theyre closer than 1 micron, they're
  // indistinguishable, i.e. the same
  // static const double max = 1e-4 * 1e-4;
  // if ( ( left - right ).mag2() < max ) return false;

  if ( left.x() != right.x() )
  {
    return ( left.x() < right.x() );
  } else if (left.y() != right.y()) {
    return ( left.y() < right.y() );
  } else {
    return ( left.z() < right.z() );
  }
}