CMS 3D CMS Logo

DetLessZ.h
Go to the documentation of this file.
1 #ifndef DetLayers_DetLessZ_H
2 #define DetLayers_DetLessZ_H
3 
9 
10 inline bool isDetLessZ(const GeometricSearchDet* a, const GeometricSearchDet* b) {
11  // multiply by 1+epsilon to make it numericaly stable
12  // the epsilon should depend on the scalar precision,
13  // this is just a quick fix!
14  if (a->position().z() > 0) {
15  return a->position().z() * 1.000001 < b->position().z();
16  } else if (b->position().z() < 0) {
17  return a->position().z() < b->position().z() * 1.000001;
18  } else
19  return true;
20 }
21 
22 #endif
bool isDetLessZ(const GeometricSearchDet *a, const GeometricSearchDet *b)
Definition: DetLessZ.h:10
T z() const
Definition: PV3DBase.h:61
virtual const Surface::PositionType & position() const
Returns position of the surface.
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119