32 #ifndef DROP_CGAL // in case we do not have the code for CGAL
34 #include "fastjet/internal/Dnn4piCylinder.hh"
37 FASTJET_BEGIN_NAMESPACE
41 Dnn4piCylinder::Dnn4piCylinder(
42 const vector<EtaPhi> & input_points,
const bool & verbose) {
45 vector<EtaPhi> copied_points(input_points.size());
46 for (
unsigned int i=0; i < input_points.size(); i++) {
47 double phi = input_points[i].second;
48 assert(phi >= 0.0 && phi < 2*pi);
49 copied_points[i] = _remap_phi(input_points[i]);
52 if (_verbose) cout <<
"============== Preparing _DNN1" << endl;
53 _DNN1 =
new DnnPlane(input_points, verbose);
54 if (_verbose) cout <<
"============== Preparing _DNN2" << endl;
55 _DNN2 =
new DnnPlane(copied_points, verbose);
61 void Dnn4piCylinder::RemoveAndAddPoints(
const vector<int> & indices_to_remove,
62 const vector<EtaPhi> & points_to_add,
63 vector<int> & indices_added,
64 vector<int> & indices_of_updated_neighbours) {
66 vector<int> indices1, indices2;
68 _DNN1->RemoveAndAddPoints(indices_to_remove,points_to_add,
69 indices_added,indices1);
72 vector<EtaPhi> remapped_points(points_to_add.size());
73 for (
size_t i = 0; i < points_to_add.size(); i++) {
74 remapped_points[i] = _remap_phi(points_to_add[i]);
76 _DNN2->RemoveAndAddPoints(indices_to_remove, remapped_points,
77 indices_added,indices2);
83 for (i=0; i < indices1.size(); i++) {index_set.insert(indices1[i]);}
84 for (i=0; i < indices2.size(); i++) {index_set.insert(indices2[i]);}
86 indices_of_updated_neighbours.clear();
87 for (set<int>::iterator iter = index_set.begin();
88 iter != index_set.end(); iter++) {
89 indices_of_updated_neighbours.push_back(*iter);