ConvexHull class definiton. More...
#include <ConvexHull.h>
Public Types | |
using | Point = std::tuple< float, float, const reco::ClusterHit3D * > |
projected x,y position and 3D hit More... | |
using | PointList = std::list< Point > |
The list of the projected points. More... | |
using | PointPair = std::pair< Point, Point > |
using | MinMaxPointPair = std::pair< PointPair, PointPair > |
Public Member Functions | |
ConvexHull (const PointList &, float=0.85, float=0.35) | |
Constructor. More... | |
~ConvexHull () | |
Destructor. More... | |
const PointList & | getPointsList () |
recover the list of points used to build convex hull More... | |
const PointList & | getConvexHull () const |
recover the list of convex hull vertices More... | |
const MinMaxPointPair & | getMinMaxPointPair () const |
find the ends of the convex hull (along its x axis) More... | |
const PointList & | getExtremePoints () |
Find the two points on the hull which are furthest apart. More... | |
const reco::ConvexHullKinkTupleList & | getKinkPoints () |
Find the points with the largest angles. More... | |
float | getConvexHullArea () const |
recover the area of the convex hull More... | |
PointPair | findNearestEdge (const Point &, float &) const |
Given an input Point, find the nearest edge. More... | |
float | findNearestDistance (const Point &) const |
Given an input point, find the distance to the nearest edge/point. More... | |
Private Member Functions | |
void | getConvexHull (const PointList &) |
Given an input set of 2D points build a convex hull around them. More... | |
float | crossProduct (const Point &p0, const Point &p1, const Point &p2) const |
Gets the cross product of line from p0 to p1 and p0 to p2. More... | |
float | Area () const |
Computes the area of the enclosed convext hull. More... | |
bool | isLeft (const Point &p0, const Point &p1, const Point &pCheck) const |
Determines whether a point is to the left, right or on line specifiec by p0 and p1. More... | |
Private Attributes | |
float | fKinkAngle |
float | fMinEdgeDistance |
const PointList & | fPoints |
PointList | fConvexHull |
MinMaxPointPair | fMinMaxPointPair |
float | fConvexHullArea |
PointList | fExtremePoints |
reco::ConvexHullKinkTupleList | fKinkPoints |
ConvexHull class definiton.
Definition at line 27 of file ConvexHull.h.
using lar_cluster3d::ConvexHull::MinMaxPointPair = std::pair<PointPair,PointPair> |
Definition at line 36 of file ConvexHull.h.
using lar_cluster3d::ConvexHull::Point = std::tuple<float,float,const reco::ClusterHit3D*> |
projected x,y position and 3D hit
Definition at line 33 of file ConvexHull.h.
The list of the projected points.
Definition at line 34 of file ConvexHull.h.
using lar_cluster3d::ConvexHull::PointPair = std::pair<Point,Point> |
Definition at line 35 of file ConvexHull.h.
lar_cluster3d::ConvexHull::ConvexHull | ( | const PointList & | pointListIn, |
float | kinkAngle = 0.85 , |
||
float | minEdgeDistance = 0.35 |
||
) |
Constructor.
pset |
Definition at line 29 of file ConvexHull.cxx.
lar_cluster3d::ConvexHull::~ConvexHull | ( | ) |
|
private |
Computes the area of the enclosed convext hull.
Definition at line 71 of file ConvexHull.cxx.
|
private |
Gets the cross product of line from p0 to p1 and p0 to p2.
Definition at line 58 of file ConvexHull.cxx.
float lar_cluster3d::ConvexHull::findNearestDistance | ( | const Point & | point | ) | const |
Given an input point, find the distance to the nearest edge/point.
Definition at line 392 of file ConvexHull.cxx.
ConvexHull::PointPair lar_cluster3d::ConvexHull::findNearestEdge | ( | const Point & | point, |
float & | closestDistance | ||
) | const |
Given an input Point, find the nearest edge.
Definition at line 331 of file ConvexHull.cxx.
|
inline |
|
private |
Given an input set of 2D points build a convex hull around them.
PointList | The input list of 2D points to build hull around |
Definition at line 107 of file ConvexHull.cxx.
|
inline |
const ConvexHull::PointList & lar_cluster3d::ConvexHull::getExtremePoints | ( | ) |
Find the two points on the hull which are furthest apart.
Definition at line 207 of file ConvexHull.cxx.
const reco::ConvexHullKinkTupleList & lar_cluster3d::ConvexHull::getKinkPoints | ( | ) |
Find the points with the largest angles.
Definition at line 276 of file ConvexHull.cxx.
|
inline |
find the ends of the convex hull (along its x axis)
Definition at line 63 of file ConvexHull.h.
|
inline |
|
private |
Determines whether a point is to the left, right or on line specifiec by p0 and p1.
Definition at line 49 of file ConvexHull.cxx.
|
private |
Definition at line 118 of file ConvexHull.h.
|
private |
Definition at line 120 of file ConvexHull.h.
|
private |
Definition at line 121 of file ConvexHull.h.
|
private |
Definition at line 114 of file ConvexHull.h.
|
private |
Definition at line 122 of file ConvexHull.h.
|
private |
Definition at line 115 of file ConvexHull.h.
|
private |
Definition at line 119 of file ConvexHull.h.
|
private |
Definition at line 117 of file ConvexHull.h.