70 const bool & ignore_nearest_is_mirror =
false,
71 const bool & verbose =
false );
75 int NearestNeighbourIndex(
const int ii)
const ;
79 double NearestNeighbourDistance(
const int ii)
const ;
84 bool Valid(
const int index)
const;
86 void RemoveAndAddPoints(
const std::vector<int> & indices_to_remove,
87 const std::vector<EtaPhi> & points_to_add,
88 std::vector<int> & indices_added,
89 std::vector<int> & indices_of_updated_neighbours);
96 const static int INEXISTENT_VERTEX=-3;
100 bool _ignore_nearest_is_mirror;
140 struct MirrorVertexInfo {
153 std::vector<MirrorVertexInfo> _mirror_info;
157 std::vector<int> _cylinder_index_of_plane_vertex;
168 double phi = point.second;
169 if (phi < pi) { phi += twopi ;}
170 return EtaPhi(point.first, phi);}
192 void _RegisterCylinderPoint (
const EtaPhi & cylinder_point,
193 std::vector<EtaPhi> & plane_points);
209inline int Dnn3piCylinder::NearestNeighbourIndex(
const int current)
const {
210 int main_index = _mirror_info[current].main_index;
211 int mirror_index = _mirror_info[current].mirror_index;
213 if (mirror_index == INEXISTENT_VERTEX ) {
222 int this_cylinder_index = _cylinder_index_of_plane_vertex[plane_index];
226 assert(_ignore_nearest_is_mirror || this_cylinder_index != current);
231 return this_cylinder_index;
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 ...