src
TrackingTools
DetLayers
interface
DetLessZ.h
Go to the documentation of this file.
1
#ifndef DetLayers_DetLessZ_H
2
#define DetLayers_DetLessZ_H
3
7
#include "
TrackingTools/DetLayers/interface/GeometricSearchDet.h
"
8
9
inline
bool
isDetLessZ
(
const
GeometricSearchDet
*
a
,
const
GeometricSearchDet
*
b
) {
10
// multiply by 1+epsilon to make it numericaly stable
11
// the epsilon should depend on the scalar precision,
12
// this is just a quick fix!
13
if
(
a
->position().z() > 0) {
14
return
a
->position().z() * 1.000001 <
b
->position().z();
15
}
else
if
(
b
->position().z() < 0) {
16
return
a
->position().z() <
b
->position().z() * 1.000001;
17
}
else
18
return
true
;
19
}
20
21
#endif
GeometricSearchDet.h
isDetLessZ
bool isDetLessZ(const GeometricSearchDet *a, const GeometricSearchDet *b)
Definition:
DetLessZ.h:9
b
double b
Definition:
hdecay.h:118
a
double a
Definition:
hdecay.h:119
GeometricSearchDet
Definition:
GeometricSearchDet.h:17
Generated for CMSSW Reference Manual by
1.8.14