69 const bool & ignore_nearest_is_mirror =
false,
70 const bool & verbose =
false );
74 int NearestNeighbourIndex(
const int ii)
const ;
78 double NearestNeighbourDistance(
const int ii)
const ;
83 bool Valid(
const int index)
const;
85 void RemoveAndAddPoints(
const std::vector<int> & indices_to_remove,
86 const std::vector<EtaPhi> & points_to_add,
87 std::vector<int> & indices_added,
88 std::vector<int> & indices_of_updated_neighbours);
95 const static int INEXISTENT_VERTEX=-3;
99 bool _ignore_nearest_is_mirror;
139 struct MirrorVertexInfo {
152 std::vector<MirrorVertexInfo> _mirror_info;
156 std::vector<int> _cylinder_index_of_plane_vertex;
167 double phi = point.second;
168 if (phi < pi) { phi += twopi ;}
169 return EtaPhi(point.first, phi);}
191 void _RegisterCylinderPoint (
const EtaPhi & cylinder_point,
192 std::vector<EtaPhi> & plane_points);
208inline int Dnn3piCylinder::NearestNeighbourIndex(
const int current)
const {
209 int main_index = _mirror_info[current].main_index;
210 int mirror_index = _mirror_info[current].mirror_index;
212 if (mirror_index == INEXISTENT_VERTEX ) {
221 int this_cylinder_index = _cylinder_index_of_plane_vertex[plane_index];
225 assert(_ignore_nearest_is_mirror || this_cylinder_index != current);
230 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 ...