CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
HitComparator Class Reference

Public Member Functions

bool operator() (const TrackingRecHit *a, const TrackingRecHit *b) const
 

Detailed Description

Definition at line 56 of file TrackCleaner.cc.

Member Function Documentation

bool HitComparator::operator() ( const TrackingRecHit a,
const TrackingRecHit b 
) const
inline

Definition at line 59 of file TrackCleaner.cc.

References alignCSCRings::e, TrackingRecHit::geographicalId(), TrackingRecHit::localPosition(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

60  {
61  if(a->geographicalId() < b->geographicalId()) return true;
62  if(b->geographicalId() < a->geographicalId()) return false;
63 
64  if(a->localPosition().x() < b->localPosition().x() - 1e-5) return true;
65  if(b->localPosition().x() < a->localPosition().x() - 1e-5) return false;
66 
67  if(a->localPosition().y() < b->localPosition().y() - 1e-5) return true;
68  if(b->localPosition().y() < a->localPosition().y() - 1e-5) return false;
69 
70  return false;
71  }
T y() const
Definition: PV3DBase.h:63
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:62
virtual LocalPoint localPosition() const =0