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
fastjet::DynamicNearestNeighbours
[legend]
Collaboration diagram for fastjet::Dnn4piCylinder:

Collaboration graph
fastjet::DynamicNearestNeighboursfastjet::DnnPlane
[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.

00048 {}

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.

References _DNN1, and _DNN2.

00117                                        {
00118   delete _DNN1; 
00119   delete _DNN2;
00120 }


Member Function Documentation

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.

References _DNN1, _DNN2, fastjet::DnnPlane::NearestNeighbourDistance(), and fastjet::DnnPlane::NearestNeighbourIndex().

00098                                                                           {
00099   return (_DNN1->NearestNeighbourDistance(current) < 
00100           _DNN2->NearestNeighbourDistance(current)) ? 
00101     _DNN1->NearestNeighbourIndex(current) : 
00102     _DNN2->NearestNeighbourIndex(current) ; 
00103 }

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.

References _DNN1, _DNN2, and fastjet::DnnPlane::NearestNeighbourDistance().

00105                                                                                 {
00106   return (_DNN1->NearestNeighbourDistance(current) < 
00107           _DNN2->NearestNeighbourDistance(current)) ? 
00108     _DNN1->NearestNeighbourDistance(current) : 
00109     _DNN2->NearestNeighbourDistance(current) ; 
00110 }

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.

References _DNN1, _DNN2, and fastjet::DnnPlane::Valid().

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

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.

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.

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::pi, fastjet::EtaPhi::second, and twopi.

00087                                                  {
00088     double phi = point.second;
00089     if (phi < pi) { phi += twopi ;}
00090     return EtaPhi(point.first, phi);}


Member Data Documentation

bool fastjet::Dnn4piCylinder::_verbose [private]

Definition at line 77 of file Dnn4piCylinder.hh.

DnnPlane* fastjet::Dnn4piCylinder::_DNN1 [private]

Definition at line 83 of file Dnn4piCylinder.hh.

Referenced by NearestNeighbourDistance(), NearestNeighbourIndex(), Valid(), and ~Dnn4piCylinder().

DnnPlane * fastjet::Dnn4piCylinder::_DNN2 [private]

Definition at line 83 of file Dnn4piCylinder.hh.

Referenced by NearestNeighbourDistance(), NearestNeighbourIndex(), Valid(), and ~Dnn4piCylinder().


The documentation for this class was generated from the following file:
Generated on Tue Dec 18 17:05:55 2007 for fastjet by  doxygen 1.5.2