CMS 3D CMS Logo

List of all members | Public Member Functions
DetLessZ Class Reference

#include <DetLessZ.h>

Inheritance diagram for DetLessZ:

Public Member Functions

bool operator() (const Det *a, const Det *b) const
 

Detailed Description

Definition at line 11 of file DetLessZ.h.

Member Function Documentation

bool DetLessZ::operator() ( const Det a,
const Det b 
) const
inline

Definition at line 13 of file DetLessZ.h.

References GeometricSearchDet::position(), and PV3DBase< T, PVType, FrameType >::z().

13  {
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  }
T z() const
Definition: PV3DBase.h:64
virtual const Surface::PositionType & position() const
Returns position of the surface.