1#ifndef __JGEOMETRY3DTOOLKIT__ 
    2#define __JGEOMETRY3DTOOLKIT__ 
   84      if (__begin != __end) {
 
   86        for (T i = __begin; i != __end; ++i) {
 
   90        div(std::distance(__begin, __end));
 
 
 
  114      if (__begin != __end) {
 
  118        for (T i = __begin; i != __end; ++i) {
 
  119          __x += i->getX() * i->getW();
 
  120          __y += i->getY() * i->getW();
 
  121          __z += i->getZ() * i->getW();
 
 
 
  148      const int N = 
distance(__begin, __end);
 
  152        double Dmin = numeric_limits<double>::max();
 
  154        for (T i = __begin; i != __end; ++i) {
 
  155          for (T j = i; ++j != __end; ) {
 
  157            const double d = getDistance(*i, *j);
 
  173        const double dl   = 
getDmin(__begin, i);
 
  174        const double dr   = 
getDmin(i,   __end);
 
  176        const double Dmin = min(dl, dr);
 
  181        while (--il != __begin && i ->getZ() - il->getZ() < Dmin) {}
 
  182        while (++ir != __end   && ir->getZ() - i ->getZ() < Dmin) {}
 
  188        return min(Dmin, dz);
 
 
  205      inline bool operator()(
const T& first, 
const T& second)
 const 
  207        return first.getZ() < second.getZ();
 
 
 
  238      return getDmin(__begin, __end);
 
 
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
JCenter3D(T __begin, T __end)
Constructor.
JCenter3D(const JVector3D &p0, const JVector3D &p1)
Constructor.
JCenter3D(const JVector3D &p0, const JVector3D &p1, const JVector3D &p2)
Constructor.
Data structure for position in three dimensions.
Auxiliary class for determination of smallest distance between pair of 3D points.
static const JCompareZ compareZ
Function object for sorting elements.
static double getDmin(T __begin, T __end)
Recursive method to find the smallest distance.
JSmallestDistance3D()
Default constructor.
double operator()(T __begin, T __end) const
Get smallest distance between two points.
Data structure for vector in three dimensions.
JVector3D & add(const JVector3D &vector)
Add vector.
JVector3D & div(const double factor)
Scale vector.
JWeighedCenter3D(T __begin, T __end)
Constructor.
static const JSmallestDistance2D getSmallestDistance2D
Function object for smallest distance determination.
Auxiliary classes and methods for 3D geometrical objects and operations.
static const JSmallestDistance3D getSmallestDistance3D
Function object for smallest distance determination.
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for sorting elements.
bool operator()(const T &first, const T &second) const
Compare x-positions of given points.