LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
tss::bDistToPointLess Struct Reference

#include "SimpleClustering.h"

Public Member Functions

 bDistToPointLess (const TVector2 &point)
 
bool operator() (const tss::Hit2D *h1, const tss::Hit2D *h2) const
 

Private Attributes

TVector2 p0
 

Detailed Description

Definition at line 22 of file SimpleClustering.h.

Constructor & Destructor Documentation

tss::bDistToPointLess::bDistToPointLess ( const TVector2 &  point)
inline

Definition at line 23 of file SimpleClustering.h.

23 : p0(point) {}

Member Function Documentation

bool tss::bDistToPointLess::operator() ( const tss::Hit2D h1,
const tss::Hit2D h2 
) const
inline

Definition at line 25 of file SimpleClustering.h.

References pma::Dist2(), p0, and tss::Hit2D::Point2D().

26  {
27  if (h1 && h2)
28  return pma::Dist2(h1->Point2D(), p0) < pma::Dist2(h2->Point2D(), p0);
29  else
30  return false;
31  }
TVector2 const & Point2D() const
Definition: TssHit2D.h:31
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:39

Member Data Documentation

TVector2 tss::bDistToPointLess::p0
private

Definition at line 34 of file SimpleClustering.h.

Referenced by operator()().


The documentation for this struct was generated from the following file: