CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
LinTrackCache::Comparer Struct Reference

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().

43 {
44  // if theyre closer than 1 micron, they're
45  // indistinguishable, i.e. the same
46  // static const double max = 1e-4 * 1e-4;
47  // if ( ( left - right ).mag2() < max ) return false;
48 
49  if ( left.x() != right.x() )
50  {
51  return ( left.x() < right.x() );
52  } else if (left.y() != right.y()) {
53  return ( left.y() < right.y() );
54  } else {
55  return ( left.z() < right.z() );
56  }
57 }
T y() const
Definition: PV3DBase.h:57
T z() const
Definition: PV3DBase.h:58
T x() const
Definition: PV3DBase.h:56