Loading...
Searching...
No Matches
fastjet::Dnn2piCylinder Class Reference

More...

`#include <fastjet/internal/Dnn2piCylinder.hh>`

Inheritance diagram for fastjet::Dnn2piCylinder:
[legend]
Collaboration diagram for fastjet::Dnn2piCylinder:
[legend]

## Public Member Functions

| Dnn2piCylinder ()
| empty initaliser
| Dnn2piCylinder (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 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)
| insertion and removal of points
Public Member Functions inherited from fastjet::DynamicNearestNeighbours
void | RemovePoint (const int index, std::vector< int > &indices_of_updated_neighbours)
| Remove the point labelled by index and return the list of points whose nearest neighbours have changed in the process.
void | RemoveCombinedAddCombination (const int index1, const int index2, const EtaPhi &newpoint, int &index3, std::vector< int > &indices_of_updated_neighbours)
| Removes the two points labelled by index1, index2 and adds in the a point with coordinates newpoint; it returns an index for the new point (index 3) and a std::vector of indices of neighbours whose nearest neighbour has changed (the list includes index3, i.e.
virtual | ~DynamicNearestNeighbours ()
| destructor – here it is now implemented

## Detailed Description

Definition at line 50 of file Dnn2piCylinder.hh.

## Constructor & Destructor Documentation

## Dnn2piCylinder() [1/2]

fastjet::Dnn2piCylinder::Dnn2piCylinder | ( |  | ) |

inline

empty initaliser

Definition at line 53 of file Dnn2piCylinder.hh.

## Dnn2piCylinder() [2/2]

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

NB: this class is more efficient than the plain Dnn4piCylinder class, but can give wrong answers when the nearest neighbour is further away than 2pi (in this case a point's nearest neighbour becomes itself, because it is considered to be a distance 2pi away). For the kt-algorithm (e.g.) this is actually not a problem (the distance need only be accurate when it is less than R, assuming R<2pi [not necessarily always the case as of 2010-11-19, when we've removed the requirement R<pi/2 in the JetDefinition constructor]), so we can tell the routine to ignore this problem – alternatively the routine will crash if it detects it occurring (only when finding the nearest neighbour index, not its distance).

## ~Dnn2piCylinder()

fastjet::Dnn2piCylinder::~Dnn2piCylinder | ( |  | ) |

inline

Definition at line 265 of file Dnn2piCylinder.hh.

## Member Function Documentation

## NearestNeighbourIndex()

int fastjet::Dnn2piCylinder::NearestNeighbourIndex | ( | const int | current | ) | const

inline virtual

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

Note: one of the difficulties of the 0–2pi mapping is that a point may have its mirror copy as its own nearest neighbour (if no other point is within a distance of 2pi).

This does not matter for the kt_algorithm with reasonable values of radius, but might matter for a general use of this algorithm – depending on whether or not the user has initialised the class with instructions to ignore this problem the program will detect and ignore it, or crash.

Implements fastjet::DynamicNearestNeighbours.

Definition at line 220 of file Dnn2piCylinder.hh.

## NearestNeighbourDistance()

double fastjet::Dnn2piCylinder::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 245 of file Dnn2piCylinder.hh.

## Valid()

bool fastjet::Dnn2piCylinder::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 260 of file Dnn2piCylinder.hh.

## RemoveAndAddPoints()

void fastjet::Dnn2piCylinder::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

insertion and removal of points

Implements fastjet::DynamicNearestNeighbours.

Definition at line 183 of file Dnn2piCylinder.cc.

The documentation for this class was generated from the following files:

- include/fastjet/internal/Dnn2piCylinder.hh
- src/Dnn2piCylinder.cc