CMS 3D CMS Logo

List of all members | Public Member Functions
LinTrackCache::Comparer Struct Reference

Public Member Functions

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

Detailed Description

Definition at line 13 of file LinTrackCache.h.

Member Function Documentation

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

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

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