73 const bool & ignore_nearest_is_mirror =
false,
74 const bool & verbose =
false );
78 int NearestNeighbourIndex(
const int ii)
const ;
82 double NearestNeighbourDistance(
const int ii)
const ;
87 bool Valid(
const int index)
const;
89 void RemoveAndAddPoints(
const std::vector<int> & indices_to_remove,
90 const std::vector<EtaPhi> & points_to_add,
91 std::vector<int> & indices_added,
92 std::vector<int> & indices_of_updated_neighbours);
99 const static int INEXISTENT_VERTEX=-3;
103 bool _ignore_nearest_is_mirror;
143 struct MirrorVertexInfo {
156 std::vector<MirrorVertexInfo> _mirror_info;
160 std::vector<int> _cylinder_index_of_plane_vertex;
172 double phi = point.second;
173 if (phi < pi) { phi += twopi ;}
else {phi -= twopi;}
174 return EtaPhi(point.first, phi);}
184 void _RegisterCylinderPoint (
const EtaPhi & cylinder_point,
185 std::vector<EtaPhi> & plane_points);
202 void _CreateNecessaryMirrorPoints(
203 const std::vector<int> & plane_indices,
204 std::vector<int> & updated_plane_points);
221inline int Dnn2piCylinder::NearestNeighbourIndex(
const int current)
const {
222 int main_index = _mirror_info[current].main_index;
223 int mirror_index = _mirror_info[current].mirror_index;
225 if (mirror_index == INEXISTENT_VERTEX ) {
234 int this_cylinder_index = _cylinder_index_of_plane_vertex[plane_index];
238 assert(_ignore_nearest_is_mirror || this_cylinder_index != current);
243 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 ...