CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecHitComparatorByPosition.cc
Go to the documentation of this file.
3  float xcut = 0.01;
4  float ycut = 0.2;
5  if (a->geographicalId()<b->geographicalId()) return true;
6  if (b->geographicalId()<a->geographicalId()) return false;
7  if (a->localPosition().x() < b->localPosition().x() - xcut) return true;
8  if (b->localPosition().x() < a->localPosition().x() - xcut) return false;
9  return (a->localPosition().y() < b->localPosition().y() - ycut );
10  }
12  float xcut = 0.01;
13  float ycut = 0.2;
14  if (a->geographicalId() != b->geographicalId()) return false;
15  if (a->isValid() && b->isValid()) {
16  if (fabs(a->localPosition().x() - b->localPosition().x()) >= xcut) return false;
17  return (fabs(a->localPosition().y() - b->localPosition().y()) < ycut);
18  } else if (!a->isValid() && !b->isValid()) {
19  return true;
20  } else return false;
21 }
bool equals(const TrackingRecHit *a, const TrackingRecHit *b) const
T y() const
Definition: PV3DBase.h:62
bool operator()(const TrackingRecHit *a, const TrackingRecHit *b) const
bool isValid() const
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:61
virtual LocalPoint localPosition() const =0