72 const bool & ignore_nearest_is_mirror =
false,
73 const bool & verbose =
false );
77 int NearestNeighbourIndex(
const int ii)
const ;
81 double NearestNeighbourDistance(
const int ii)
const ;
86 bool Valid(
const int index)
const;
88 void RemoveAndAddPoints(
const std::vector<int> & indices_to_remove,
89 const std::vector<EtaPhi> & points_to_add,
90 std::vector<int> & indices_added,
91 std::vector<int> & indices_of_updated_neighbours);
98 const static int INEXISTENT_VERTEX=-3;
102 bool _ignore_nearest_is_mirror;
142 struct MirrorVertexInfo {
155 std::vector<MirrorVertexInfo> _mirror_info;
159 std::vector<int> _cylinder_index_of_plane_vertex;
171 double phi = point.second;
172 if (phi < pi) { phi += twopi ;}
else {phi -= twopi;}
173 return EtaPhi(point.first, phi);}
183 void _RegisterCylinderPoint (
const EtaPhi & cylinder_point,
184 std::vector<EtaPhi> & plane_points);
201 void _CreateNecessaryMirrorPoints(
202 const std::vector<int> & plane_indices,
203 std::vector<int> & updated_plane_points);
220inline int Dnn2piCylinder::NearestNeighbourIndex(
const int current)
const {
221 int main_index = _mirror_info[current].main_index;
222 int mirror_index = _mirror_info[current].mirror_index;
224 if (mirror_index == INEXISTENT_VERTEX ) {
233 int this_cylinder_index = _cylinder_index_of_plane_vertex[plane_index];
237 assert(_ignore_nearest_is_mirror || this_cylinder_index != current);
242 return this_cylinder_index;
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 ...