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 12 of file LinTrackCache.h.

Member Function Documentation

◆ operator()()

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

Definition at line 30 of file LinTrackCache.cc.

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

30  {
31  // if theyre closer than 1 micron, they're
32  // indistinguishable, i.e. the same
33  // static const double max = 1e-4 * 1e-4;
34  // if ( ( left - right ).mag2() < max ) return false;
35 
36  if (left.x() != right.x()) {
37  return (left.x() < right.x());
38  } else if (left.y() != right.y()) {
39  return (left.y() < right.y());
40  } else {
41  return (left.z() < right.z());
42  }
43 }
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60