CMS 3D CMS Logo

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 operator()(const TrackingRecHit *a, const TrackingRecHit *b) const
bool equals(const TrackingRecHit *a, const TrackingRecHit *b) const
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119