33#ifndef __FASTJET_DNN3PICYLINDER_HH__ 
   34#define __FASTJET_DNN3PICYLINDER_HH__ 
   36#include "fastjet/internal/DynamicNearestNeighbours.hh" 
   37#include "fastjet/internal/DnnPlane.hh" 
   38#include "fastjet/internal/numconsts.hh" 
   40FASTJET_BEGIN_NAMESPACE      
 
   69                 const bool & ignore_nearest_is_mirror = 
false,
 
   70                 const bool & verbose = 
false );
 
   74  int NearestNeighbourIndex(
const int ii) 
const ;
 
   78  double NearestNeighbourDistance(
const int ii) 
const ;
 
   83  bool Valid(
const int index) 
const;
 
   85  void RemoveAndAddPoints(
const std::vector<int> & indices_to_remove,
 
   86                          const std::vector<EtaPhi> & points_to_add,
 
   87                          std::vector<int> & indices_added,
 
   88                          std::vector<int> & indices_of_updated_neighbours);
 
   95  const static int INEXISTENT_VERTEX=-3;
 
   99  bool _ignore_nearest_is_mirror;
 
  139  struct MirrorVertexInfo {
 
  152  std::vector<MirrorVertexInfo> _mirror_info;
 
  156  std::vector<int> _cylinder_index_of_plane_vertex;
 
  167    double phi = point.second;
 
  168    if (phi < pi) { phi += twopi ;}
 
  169    return EtaPhi(point.first, phi);}
 
  191  void _RegisterCylinderPoint (
const EtaPhi & cylinder_point,
 
  192                               std::vector<EtaPhi> & plane_points);
 
  208inline int Dnn3piCylinder::NearestNeighbourIndex(
const int current)
 const {
 
  209  int main_index = _mirror_info[current].main_index;
 
  210  int mirror_index = _mirror_info[current].mirror_index;
 
  212  if (mirror_index == INEXISTENT_VERTEX ) {
 
  221  int this_cylinder_index = _cylinder_index_of_plane_vertex[plane_index];
 
  225  assert(_ignore_nearest_is_mirror || this_cylinder_index != current);
 
  230  return this_cylinder_index;
 
  233inline double Dnn3piCylinder::NearestNeighbourDistance(
const int current)
 const {
 
  234  int main_index = _mirror_info[current].main_index;
 
  235  int mirror_index = _mirror_info[current].mirror_index;
 
  236  if (mirror_index == INEXISTENT_VERTEX ) {
 
  248inline bool Dnn3piCylinder::Valid(
const int index)
 const {
 
  249  return (_DNN->
Valid(_mirror_info[index].main_index));
 
  253inline Dnn3piCylinder::~Dnn3piCylinder() {
 
Dnn3piCylinder(const std::vector< EtaPhi > &, const bool &ignore_nearest_is_mirror=false, const bool &verbose=false)
Initialiser from a set of points on an Eta-Phi plane, where eta can have an arbitrary ranges and phi ...
 
Dnn3piCylinder()
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.