CMS 3D CMS Logo

Functions
DetLessZ.h File Reference
#include "TrackingTools/DetLayers/src/DetLessZ.h"
#include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"

Go to the source code of this file.

Functions

bool isDetLessZ (const GeometricSearchDet *a, const GeometricSearchDet *b)
 

Function Documentation

◆ isDetLessZ()

bool isDetLessZ ( const GeometricSearchDet a,
const GeometricSearchDet b 
)
inline

Comparison operator for Dets based on the Z.

Definition at line 10 of file DetLessZ.h.

10  {
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 }

References a, and b.

Referenced by BeamHaloNavigationSchool::reachableFromHorizontal(), SimpleNavigationSchool::splitForwardLayers(), and TIBLayer::TIBLayer().

b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119