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 35 of file LinTrackCache.cc.

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

36 {
37  // if theyre closer than 1 micron, they're
38  // indistinguishable, i.e. the same
39  // static const double max = 1e-4 * 1e-4;
40  // if ( ( left - right ).mag2() < max ) return false;
41 
42  if ( left.x() != right.x() )
43  {
44  return ( left.x() < right.x() );
45  } else if (left.y() != right.y()) {
46  return ( left.y() < right.y() );
47  } else {
48  return ( left.z() < right.z() );
49  }
50 }
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
T x() const
Definition: PV3DBase.h:62