CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 50 of file TrackCleaner.cc.

Member Function Documentation

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

Definition at line 52 of file TrackCleaner.cc.

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

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