CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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())
6  return true;
7  if (b->geographicalId() < a->geographicalId())
8  return false;
9  if (a->localPosition().x() < b->localPosition().x() - xcut)
10  return true;
11  if (b->localPosition().x() < a->localPosition().x() - xcut)
12  return false;
13  return (a->localPosition().y() < b->localPosition().y() - ycut);
14 }
16  float xcut = 0.01;
17  float ycut = 0.2;
18  if (a->geographicalId() != b->geographicalId())
19  return false;
20  if (a->isValid() && b->isValid()) {
21  if (fabs(a->localPosition().x() - b->localPosition().x()) >= xcut)
22  return false;
23  return (fabs(a->localPosition().y() - b->localPosition().y()) < ycut);
24  } else if (!a->isValid() && !b->isValid()) {
25  return true;
26  } else
27  return false;
28 }
bool equals(const TrackingRecHit *a, const TrackingRecHit *b) const
T y() const
Definition: PV3DBase.h:60
bool operator()(const TrackingRecHit *a, const TrackingRecHit *b) const
bool isValid() const
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:59
virtual LocalPoint localPosition() const =0