Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
TrackingTools
DetLayers
src
DetLessZ.h
Go to the documentation of this file.
1
#ifndef DetLayers_DetLessZ_H
2
#define DetLayers_DetLessZ_H
3
4
#include "
TrackingTools/DetLayers/interface/GeometricSearchDet.h
"
5
9
typedef
GeometricSearchDet
Det
;
10
11
class
DetLessZ
:
public
std::binary_function<const Det*, const Det*, bool> {
12
public
:
13
bool
operator()
(
const
Det
*
a
,
const
Det
*
b
)
const
{
14
15
// multiply by 1+epsilon to make it numericaly stable
16
// the epsilon should depend on the scalar precision,
17
// this is just a quick fix!
18
if
(a->
position
().
z
() > 0) {
19
return
a->
position
().
z
()*1.000001 < b->
position
().
z
();
20
}
21
else
if
(b->
position
().
z
() < 0) {
22
return
a->
position
().
z
() < b->
position
().
z
()*1.000001;
23
}
24
else
return
true
;
25
}
26
27
};
28
29
#endif
DetLessZ::operator()
bool operator()(const Det *a, const Det *b) const
Definition:
DetLessZ.h:13
DetLessZ
Definition:
DetLessZ.h:11
Det
GeometricSearchDet Det
Definition:
DetBelowR.h:8
GeometricSearchDet.h
PV3DBase::z
T z() const
Definition:
PV3DBase.h:63
GeometricSearchDet::position
virtual const Surface::PositionType & position() const
Returns position of the surface.
Definition:
GeometricSearchDet.h:33
b
double b
Definition:
hdecay.h:120
a
double a
Definition:
hdecay.h:121
GeometricSearchDet
Definition:
GeometricSearchDet.h:19
Generated for CMSSW Reference Manual by
1.8.5