33#ifndef __FASTJET_DNN4PICYLINDER_HH__
34#define __FASTJET_DNN4PICYLINDER_HH__
36#include "fastjet/internal/DynamicNearestNeighbours.hh"
37#include "fastjet/internal/DnnPlane.hh"
38#include "fastjet/internal/numconsts.hh"
40FASTJET_BEGIN_NAMESPACE
70 bool Valid(
const int index)
const;
73 const std::vector<EtaPhi> & points_to_add,
74 std::vector<int> & indices_added,
75 std::vector<int> & indices_of_updated_neighbours);
92 double phi = point.second;
93 if (phi < pi) { phi += twopi ;}
94 return EtaPhi(point.first, phi);}
103 return (_DNN1->NearestNeighbourDistance(current) <
104 _DNN2->NearestNeighbourDistance(current)) ?
105 _DNN1->NearestNeighbourIndex(current) :
106 _DNN2->NearestNeighbourIndex(current) ;
110 return (_DNN1->NearestNeighbourDistance(current) <
111 _DNN2->NearestNeighbourDistance(current)) ?
112 _DNN1->NearestNeighbourDistance(current) :
113 _DNN2->NearestNeighbourDistance(current) ;
117 return (_DNN1->Valid(index) && _DNN2->Valid(index));
121inline Dnn4piCylinder::~Dnn4piCylinder() {
double NearestNeighbourDistance(const int ii) const
Returns the distance to the nearest neighbour of point labelled by index ii (assumes ii is valid).
Dnn4piCylinder(const std::vector< EtaPhi > &, const bool &verbose=false)
Initialiser from a set of points on an Eta-Phi plane, where eta can have an arbitrary ranges and phi ...
void RemoveAndAddPoints(const std::vector< int > &indices_to_remove, const std::vector< EtaPhi > &points_to_add, std::vector< int > &indices_added, std::vector< int > &indices_of_updated_neighbours)
insertion and removal of points
bool Valid(const int index) const
Returns true iff the given index corresponds to a point that exists in the DNN structure (meaning tha...
Dnn4piCylinder()
empty initaliser
int NearestNeighbourIndex(const int ii) const
Returns the index of the nearest neighbour of point labelled by ii (assumes ii is valid).
Shortcut for dealing with eta-phi coordinates.