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 70 of file CaloPoint.h.

Constructor & Destructor Documentation

◆ DistanceToVertex()

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

Definition at line 72 of file CaloPoint.h.

72 : vertex(vert){};

◆ ~DistanceToVertex()

CaloPoint::DistanceToVertex::~DistanceToVertex ( )
inline

Definition at line 73 of file CaloPoint.h.

73 {};

Member Function Documentation

◆ operator()()

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

Definition at line 74 of file CaloPoint.h.

References mag2(), and vertex.

74  {
75  return ((point1 - vertex).mag2() < (point2 - vertex).mag2());
76  }
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)

Member Data Documentation

◆ vertex

XYZPoint CaloPoint::DistanceToVertex::vertex
private

Definition at line 79 of file CaloPoint.h.

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