31#include "fastjet/config.h"
34#ifndef __FASTJET_DNN4PICYLINDER_HH__
35#define __FASTJET_DNN4PICYLINDER_HH__
37#include "fastjet/internal/DynamicNearestNeighbours.hh"
38#include "fastjet/internal/DnnPlane.hh"
39#include "fastjet/internal/numconsts.hh"
41FASTJET_BEGIN_NAMESPACE
62 int NearestNeighbourIndex(
const int ii)
const ;
66 double NearestNeighbourDistance(
const int ii)
const ;
71 bool Valid(
const int index)
const;
73 void RemoveAndAddPoints(
const std::vector<int> & indices_to_remove,
74 const std::vector<EtaPhi> & points_to_add,
75 std::vector<int> & indices_added,
76 std::vector<int> & indices_of_updated_neighbours);
93 double phi = point.second;
94 if (phi < pi) { phi += twopi ;}
95 return EtaPhi(point.first, phi);}
103inline int Dnn4piCylinder::NearestNeighbourIndex(
const int current)
const {
110inline double Dnn4piCylinder::NearestNeighbourDistance(
const int current)
const {
117inline bool Dnn4piCylinder::Valid(
const int index)
const {
118 return (_DNN1->
Valid(index) && _DNN2->
Valid(index));
122inline Dnn4piCylinder::~Dnn4piCylinder() {
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 ...
Dnn4piCylinder()
empty initaliser
double NearestNeighbourDistance(const int ii) const
Returns the distance to the nearest neighbour of point labelled by index ii (assumes ii is valid)
bool Valid(const int index) const
Returns true iff the given index corresponds to a point that exists in the DNN structure (meaning tha...
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.