72 const bool & ignore_nearest_is_mirror =
false,
73 const bool & verbose =
false );
86 bool Valid(
const int index)
const;
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);
221 int main_index = _mirror_info[current].main_index;
222 int mirror_index = _mirror_info[current].mirror_index;
224 if (mirror_index == INEXISTENT_VERTEX ) {
225 plane_index = _DNN->NearestNeighbourIndex(main_index);
228 _DNN->NearestNeighbourDistance(main_index) <
229 _DNN->NearestNeighbourDistance(mirror_index)) ?
230 _DNN->NearestNeighbourIndex(main_index) :
231 _DNN->NearestNeighbourIndex(mirror_index) ;
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;
246 int main_index = _mirror_info[current].main_index;
247 int mirror_index = _mirror_info[current].mirror_index;
248 if (mirror_index == INEXISTENT_VERTEX ) {
249 return _DNN->NearestNeighbourDistance(main_index);
252 _DNN->NearestNeighbourDistance(main_index) <
253 _DNN->NearestNeighbourDistance(mirror_index)) ?
254 _DNN->NearestNeighbourDistance(main_index) :
255 _DNN->NearestNeighbourDistance(mirror_index) ;
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
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 ...