#include <Dnn4piCylinder.hh>
Inheritance diagram for fastjet::Dnn4piCylinder:
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 |
Definition at line 45 of file Dnn4piCylinder.hh.
fastjet::Dnn4piCylinder::Dnn4piCylinder | ( | ) | [inline] |
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] |
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().
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.
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);}
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().