fastjet 2.4.5
Public Member Functions | Private Member Functions | Private Attributes
fastjet::Dnn4piCylinder Class Reference

class derived from DynamicNearestNeighbours that provides an implementation for the surface of cylinder (using two copies of DnnPlane, one running from 0--2pi, the other from pi--3pi). More...

#include <Dnn4piCylinder.hh>

Inheritance diagram for fastjet::Dnn4piCylinder:
Inheritance graph
[legend]
Collaboration diagram for fastjet::Dnn4piCylinder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Dnn4piCylinder ()
 empty initaliser
 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 must be in range 0 <= phi < 2pi.
int NearestNeighbourIndex (const int &ii) const
 Returns the index of the nearest neighbour of point labelled by ii (assumes ii is valid)
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 that it has been added, and not removed in the meantime)
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)
 remove the points labelled by the std::vector indices_to_remove, and add the points specified by the std::vector points_to_add (corresponding indices will be calculated automatically); the idea behind this routine is that the points to be added will somehow be close to the one or other of the points being removed and this can be used by the implementation to provide hints for inserting the new points in whatever structure it is using.
 ~Dnn4piCylinder ()

Private Member Functions

EtaPhi _remap_phi (const EtaPhi &point)
 given a phi value in the 0--2pi range return one in the pi--3pi range.

Private Attributes

bool _verbose
DnnPlane_DNN1
DnnPlane_DNN2

Detailed Description

class derived from DynamicNearestNeighbours that provides an implementation for the surface of cylinder (using two copies of DnnPlane, one running from 0--2pi, the other from pi--3pi).

Definition at line 45 of file Dnn4piCylinder.hh.


Constructor & Destructor Documentation

fastjet::Dnn4piCylinder::Dnn4piCylinder ( ) [inline]

empty initaliser

Definition at line 48 of file Dnn4piCylinder.hh.

{}
fastjet::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 must be in range 0 <= phi < 2pi.

fastjet::Dnn4piCylinder::~Dnn4piCylinder ( ) [inline]

Definition at line 117 of file Dnn4piCylinder.hh.

                                       {
  delete _DNN1; 
  delete _DNN2;
}

Member Function Documentation

EtaPhi fastjet::Dnn4piCylinder::_remap_phi ( const EtaPhi point) [inline, private]

given a phi value in the 0--2pi range return one in the pi--3pi range.

Definition at line 87 of file Dnn4piCylinder.hh.

References fastjet::EtaPhi::first, fastjet::d0::inline_maths::phi(), fastjet::pi, fastjet::EtaPhi::second, and twopi.

                                                 {
    double phi = point.second;
    if (phi < pi) { phi += twopi ;}
    return EtaPhi(point.first, phi);}
double fastjet::Dnn4piCylinder::NearestNeighbourDistance ( const int &  ii) const [inline, virtual]

Returns the distance to the nearest neighbour of point labelled by index ii (assumes ii is valid)

Implements fastjet::DynamicNearestNeighbours.

Definition at line 105 of file Dnn4piCylinder.hh.

                                                                                {
  return (_DNN1->NearestNeighbourDistance(current) < 
          _DNN2->NearestNeighbourDistance(current)) ? 
    _DNN1->NearestNeighbourDistance(current) : 
    _DNN2->NearestNeighbourDistance(current) ; 
}
int fastjet::Dnn4piCylinder::NearestNeighbourIndex ( const int &  ii) const [inline, virtual]

Returns the index of the nearest neighbour of point labelled by ii (assumes ii is valid)

Implements fastjet::DynamicNearestNeighbours.

Definition at line 98 of file Dnn4piCylinder.hh.

                                                                          {
  return (_DNN1->NearestNeighbourDistance(current) < 
          _DNN2->NearestNeighbourDistance(current)) ? 
    _DNN1->NearestNeighbourIndex(current) : 
    _DNN2->NearestNeighbourIndex(current) ; 
}
void fastjet::Dnn4piCylinder::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 
) [virtual]

remove the points labelled by the std::vector indices_to_remove, and add the points specified by the std::vector points_to_add (corresponding indices will be calculated automatically); the idea behind this routine is that the points to be added will somehow be close to the one or other of the points being removed and this can be used by the implementation to provide hints for inserting the new points in whatever structure it is using.

remove the points labelled by the vector indices_to_remove, and add the points specified by the vector points_to_add (corresponding indices will be calculated automatically); the idea behind this routine is that the points to be added will somehow be close to the one or other of the points being removed and this can be used by the implementation to provide hints for inserting the new points in whatever structure it is using.

insertion and removal of points

In a kt-algorithm the points being added will be a result of a combination of the points to be removed -- hence the proximity is (more or less) guaranteed.

Implements fastjet::DynamicNearestNeighbours.

bool fastjet::Dnn4piCylinder::Valid ( const int &  index) const [inline, virtual]

Returns true iff the given index corresponds to a point that exists in the DNN structure (meaning that it has been added, and not removed in the meantime)

Implements fastjet::DynamicNearestNeighbours.

Definition at line 112 of file Dnn4piCylinder.hh.

                                                         {
  return (_DNN1->Valid(index) && _DNN2->Valid(index));
}

Member Data Documentation

Definition at line 83 of file Dnn4piCylinder.hh.

Definition at line 83 of file Dnn4piCylinder.hh.

Definition at line 77 of file Dnn4piCylinder.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines