25 double const* aXYZ = a.
XYZ();
26 double const* bXYZ = b.
XYZ();
27 return std::sqrt(
sqr(aXYZ[0] - bXYZ[0]) +
sqr(aXYZ[1] - bXYZ[1]) +
sqr(aXYZ[2] - bXYZ[2]));
39 : fLength(length), fFirstPointID(firstPointID), fSecondPointID(secondPointID), fID(id)
44 :
fLength(::spacePointDistance(firstPoint, secondPoint))
55 o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
56 o <<
" Edge ID " << a.
ID() <<
" has length " << std::setw(6) << a.
Length() <<
" cm" An object to define a "edge" which is used to connect space points in a triangulation algorithm...
Reconstruction base classes.
double Length() const
Returns the length of this edge [cm].
SpacePointID_t FirstPointID() const
Returns the ID of the SpacePoint this edge emanates from.
unsigned int ID_t
Type to represent recob::Edge IDs.
const Double32_t * XYZ() const
double fLength
Length of this Edge [cm].
SpacePointID_t fSecondPointID
ID of the SpacePoint edge ends on.
SpacePointID_t fFirstPointID
ID of the SpacePoint edge emanates from.
Edge()=default
Default constructor (all invalid IDs).
ID_t ID() const
Returns the ID of this edge.
std::ostream & operator<<(std::ostream &o, Cluster const &c)
Edge is an object containing the results of a Principal Components Analysis of a group of space point...
recob::SpacePoint::ID_t SpacePointID_t
Type to represent recob::SpacePoint IDs.
SpacePointID_t SecondPointID() const
Returns the ID of the SpacePoint this edge ends on.