CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CaloPoint::DistanceToVertex Class Reference

#include <CaloPoint.h>

Public Member Functions

 DistanceToVertex (const XYZPoint &vert)
 
bool operator() (const CaloPoint &point1, const CaloPoint &point2)
 
 ~DistanceToVertex ()
 

Private Attributes

XYZPoint vertex
 

Detailed Description

Definition at line 76 of file CaloPoint.h.

Constructor & Destructor Documentation

CaloPoint::DistanceToVertex::DistanceToVertex ( const XYZPoint vert)
inline

Definition at line 79 of file CaloPoint.h.

79 :vertex(vert) {};
CaloPoint::DistanceToVertex::~DistanceToVertex ( )
inline

Definition at line 80 of file CaloPoint.h.

80 {};

Member Function Documentation

bool CaloPoint::DistanceToVertex::operator() ( const CaloPoint point1,
const CaloPoint point2 
)
inline

Definition at line 81 of file CaloPoint.h.

References mag2(), and vertex.

82  {
83  return ((point1-vertex).mag2()<(point2-vertex).mag2());
84  }
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)

Member Data Documentation

XYZPoint CaloPoint::DistanceToVertex::vertex
private

Definition at line 86 of file CaloPoint.h.

Referenced by Tau.Tau::dxy(), and operator()().