{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.sDpncMPO/b1/siscone_3.0.5-2_i386.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.sDpncMPO/b2/siscone_3.0.5-2_i386.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,10 +1,10 @@\n \n a79185bcefd31847d490b1481ad80474 88876 libdevel optional libsiscone-dev_3.0.5-2_i386.deb\n b18f100be821ddf918909d9f70ee3ecf 79660 libdevel optional libsiscone-spherical-dev_3.0.5-2_i386.deb\n dc876a0a4ce739c978538e6eb1cc5220 415592 debug optional libsiscone-spherical0v5-dbgsym_3.0.5-2_i386.deb\n 6af775b6d8de4bfc44e456d8b8b2c712 64544 libs optional libsiscone-spherical0v5_3.0.5-2_i386.deb\n fc69bd2c4ab5a8a86014cb1ded2872ff 488688 debug optional libsiscone0v5-dbgsym_3.0.5-2_i386.deb\n 725118a762b2f07d271fe052e1844926 70620 libs optional libsiscone0v5_3.0.5-2_i386.deb\n- c3af25106aaea9f7db11aa68146c1b15 1186464 doc optional siscone-doc-html_3.0.5-2_all.deb\n- 1712200196f5c38532c03f419cd8517f 1609316 doc optional siscone-doc-pdf_3.0.5-2_all.deb\n+ 6ec6705b657a991695ac0611dac2032a 1187416 doc optional siscone-doc-html_3.0.5-2_all.deb\n+ c13dc7e417e2059a70aa2767cf8093d8 1610080 doc optional siscone-doc-pdf_3.0.5-2_all.deb\n ee8a36e6ed6ae32143424e71fcc9dc11 34968 devel optional siscone-examples_3.0.5-2_all.deb\n"}, {"source1": "siscone-doc-html_3.0.5-2_all.deb", "source2": "siscone-doc-html_3.0.5-2_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2023-01-10 17:32:40.000000 debian-binary\n--rw-r--r-- 0 0 0 8564 2023-01-10 17:32:40.000000 control.tar.xz\n--rw-r--r-- 0 0 0 1177708 2023-01-10 17:32:40.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 8568 2023-01-10 17:32:40.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 1178656 2023-01-10 17:32:40.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./control", "source2": "./control", "unified_diff": "@@ -1,13 +1,13 @@\n Package: siscone-doc-html\n Source: siscone\n Version: 3.0.5-2\n Architecture: all\n Maintainer: Debian Science Maintainers \n-Installed-Size: 5801\n+Installed-Size: 5827\n Depends: libjs-jquery\n Section: doc\n Priority: optional\n Multi-Arch: foreign\n Homepage: http://projects.hepforge.org/siscone/\n Description: Developer's reference manual of SISCone (HTML)\n SISCone implements a Seedless Infrared (IR) Safe Cone jet algorithm, it takes\n"}, {"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -212,15 +212,15 @@\n -rw-r--r-- 0 root (0) root (0) 3191 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_t.html\n -rw-r--r-- 0 root (0) root (0) 2319 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_u.html\n -rw-r--r-- 0 root (0) root (0) 4264 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_v.html\n -rw-r--r-- 0 root (0) root (0) 30418 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_vars.html\n -rw-r--r-- 0 root (0) root (0) 2155 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_x.html\n -rw-r--r-- 0 root (0) root (0) 5352 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_~.html\n -rw-r--r-- 0 root (0) root (0) 31816 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 30773 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 31825 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 2552 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/globals.html\n -rw-r--r-- 0 root (0) root (0) 2434 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/globals_defs.html\n -rw-r--r-- 0 root (0) root (0) 2059 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/globals_vars.html\n -rw-r--r-- 0 root (0) root (0) 6197 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/graph_legend.html\n -rw-r--r-- 0 root (0) root (0) 23370 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/graph_legend.png\n -rw-r--r-- 0 root (0) root (0) 52933 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/hash_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 22548 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/hash_8h_source.html\n@@ -291,30 +291,30 @@\n -rw-r--r-- 0 root (0) root (0) 95 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/nav_g.png\n -rw-r--r-- 0 root (0) root (0) 98 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/nav_h.png\n -rw-r--r-- 0 root (0) root (0) 114 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/nav_hd.png\n -rw-r--r-- 0 root (0) root (0) 123 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/open.png\n -rw-r--r-- 0 root (0) root (0) 52457 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/options_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 19815 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/options_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 151303 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/protocones_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 40112 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/protocones_8h_source.html\n--rw-r--r-- 0 root (0) root (0) 69506 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 22117 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8h_source.html\n--rw-r--r-- 0 root (0) root (0) 27192 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 42170 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/protocones_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 78918 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 23577 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 27768 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 7902 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8h.html\n -rw-r--r-- 0 root (0) root (0) 1021 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8h__dep__incl.map\n -rw-r--r-- 0 root (0) root (0) 12914 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8h__dep__incl.png\n -rw-r--r-- 0 root (0) root (0) 9111 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8h_source.html\n--rw-r--r-- 0 root (0) root (0) 30528 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/reference_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 24185 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/reference_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 31723 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/reference_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 25627 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/reference_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 20315 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/sample_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 82495 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone_2area_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 64453 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 22318 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 69585 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 23914 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 8011 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 14494 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 15206 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 38933 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2geom__2d_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 22148 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2geom__2d_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 47437 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2hash_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 22599 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2hash_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 81644 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2momentum_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 70242 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2momentum_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 165886 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2protocones_8cpp_source.html\n"}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8h_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8h_source.html", "unified_diff": "@@ -109,21 +109,21 @@\n
67
\n
68
\n
\n
73class Ctwovect {
\n
74public:
\n
76 Ctwovect() : x(0.0), y(0.0) {}
\n
77
\n-
81 Ctwovect(double _x, double _y) : x(_x), y(_y) {}
\n+
81 Ctwovect(double _x, double _y) : x(_x), y(_y) {}
\n
82
\n
84 double x, y;
\n
85
\n
87 inline double mod2() const {return pow2(x)+pow2(y);}
\n
88
\n-
90 inline double modulus() const {return sqrt(mod2());}
\n+
90 inline double modulus() const {return sqrt(mod2());}
\n
91};
\n
\n
92
\n
93
\n
98inline double dot_product(const Ctwovect & a, const Ctwovect & b) {
\n
99 return a.x*b.x + a.y*b.y;
\n
100}
\n@@ -135,35 +135,35 @@\n
110
\n
111
\n
\n \n
121public:
\n \n
124
\n-
130 Ceta_phi_range(double c_eta, double c_phi, double R);
\n+
130 Ceta_phi_range(double c_eta, double c_phi, double R);
\n
131
\n-\n+\n
135
\n
140 int add_particle(const double eta, const double phi);
\n
141
\n
143 unsigned int eta_range;
\n
144
\n
146 unsigned int phi_range;
\n
147
\n
148 // extremal value for eta
\n
149 static double eta_min;
\n
150 static double eta_max;
\n
151
\n
152private:
\n
154 inline unsigned int get_eta_cell(double eta){
\n-
155 return (unsigned int) (1u << ((int) (32*((eta-eta_min)/(eta_max-eta_min)))));
\n+
155 return (unsigned int) (1u << ((int) (32*((eta-eta_min)/(eta_max-eta_min)))));
\n
156 }
\n
157
\n
159 inline unsigned int get_phi_cell(double phi){
\n-
160 return (unsigned int) (1u << ((int) (32*phi/twopi+16)%32));
\n+
160 return (unsigned int) (1u << ((int) (32*phi/twopi+16)%32));
\n
161 }
\n
162};
\n
\n
163
\n
168bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2);
\n
169
\n
175const Ceta_phi_range range_union(const Ceta_phi_range &r1, const Ceta_phi_range &r2);
\n@@ -181,14 +181,15 @@\n
unsigned int phi_range
phi range as a binary coding of covered cells
Definition geom_2d.h:146
\n
class for holding a two-vector
Definition geom_2d.h:73
\n
double mod2() const
norm (modulud square) of the vector
Definition geom_2d.h:87
\n
double x
vector coordinates
Definition geom_2d.h:84
\n
Ctwovect()
default ctor
Definition geom_2d.h:76
\n
double modulus() const
modulus of the vector
Definition geom_2d.h:90
\n
Ctwovect(double _x, double _y)
ctor with initialisation
Definition geom_2d.h:81
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n
\n
const double twopi
definition of 2*M_PI which is useful a bit everyhere!
Definition defines.h:114
\n \n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -59,21 +59,21 @@\n 66inline double pow2(double x) {return x*x;}\n 67\n 68\n _\b7_\b3class _\bC_\bt_\bw_\bo_\bv_\be_\bc_\bt {\n 74public:\n _\b7_\b6 _\bC_\bt_\bw_\bo_\bv_\be_\bc_\bt() : _\bx(0.0), y(0.0) {}\n 77\n-_\b8_\b1 _\bC_\bt_\bw_\bo_\bv_\be_\bc_\bt(double _x, double _y) : _\bx(_x), y(_y) {}\n+_\b8_\b1 _\bC_\bt_\bw_\bo_\bv_\be_\bc_\bt(double _\b__\bx, double _\b__\by) : _\bx(_\b__\bx), y(_\b__\by) {}\n 82\n _\b8_\b4 double _\bx, y;\n 85\n _\b8_\b7 inline double _\bm_\bo_\bd_\b2() const {return pow2(_\bx)+pow2(y);}\n 88\n-_\b9_\b0 inline double _\bm_\bo_\bd_\bu_\bl_\bu_\bs() const {return sqrt(_\bm_\bo_\bd_\b2());}\n+_\b9_\b0 inline double _\bm_\bo_\bd_\bu_\bl_\bu_\bs() const {return _\bs_\bq_\br_\bt(_\bm_\bo_\bd_\b2());}\n 91};\n 92\n 93\n 98inline double dot_product(const Ctwovect & a, const Ctwovect & b) {\n 99 return a.x*b.x + a.y*b.y;\n 100}\n 101\n@@ -83,36 +83,36 @@\n 109}\n 110\n 111\n _\b1_\b2_\b0class _\bC_\be_\bt_\ba_\b__\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be{\n 121public:\n 123 _\bC_\be_\bt_\ba_\b__\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be();\n 124\n-130 _\bC_\be_\bt_\ba_\b__\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be(double c_eta, double c_phi, double R);\n+130 _\bC_\be_\bt_\ba_\b__\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be(double _\bc_\b__\be_\bt_\ba, double _\bc_\b__\bp_\bh_\bi, double R);\n 131\n-134 _\bC_\be_\bt_\ba_\b__\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b=_\b (const _\bC_\be_\bt_\ba_\b__\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be &r);\n+134 _\bC_\be_\bt_\ba_\b__\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b=_\b (const _\bC_\be_\bt_\ba_\b__\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be &_\br);\n 135\n 140 int _\ba_\bd_\bd_\b__\bp_\ba_\br_\bt_\bi_\bc_\bl_\be(const double eta, const double phi);\n 141\n _\b1_\b4_\b3 unsigned int _\be_\bt_\ba_\b__\br_\ba_\bn_\bg_\be;\n 144\n _\b1_\b4_\b6 unsigned int _\bp_\bh_\bi_\b__\br_\ba_\bn_\bg_\be;\n 147\n 148 // extremal value for eta\n _\b1_\b4_\b9 static double _\be_\bt_\ba_\b__\bm_\bi_\bn;\n _\b1_\b5_\b0 static double _\be_\bt_\ba_\b__\bm_\ba_\bx;\n 151\n 152private:\n 154 inline unsigned int get_eta_cell(double eta){\n-155 return (unsigned int) (1u << ((int) (32*((eta-_\be_\bt_\ba_\b__\bm_\bi_\bn)/(_\be_\bt_\ba_\b__\bm_\ba_\bx-\n+155 return (unsigned int) (1u << ((_\bi_\bn_\bt) (32*((eta-_\be_\bt_\ba_\b__\bm_\bi_\bn)/(_\be_\bt_\ba_\b__\bm_\ba_\bx-\n _\be_\bt_\ba_\b__\bm_\bi_\bn)))));\n 156 }\n 157\n 159 inline unsigned int get_phi_cell(double phi){\n-160 return (unsigned int) (1u << ((int) (32*phi/_\bt_\bw_\bo_\bp_\bi+16)%32));\n+160 return (unsigned int) (1u << ((_\bi_\bn_\bt) (32*phi/_\bt_\bw_\bo_\bp_\bi+16)%32));\n 161 }\n 162};\n 163\n 168bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2);\n 169\n 175const Ceta_phi_range range_union(const Ceta_phi_range &r1, const\n Ceta_phi_range &r2);\n@@ -170,14 +170,18 @@\n double modulus() const\n modulus of the vector\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bg_\be_\bo_\bm_\b__\b2_\bd_\b._\bh_\b:_\b9_\b0\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bt_\bw_\bo_\bv_\be_\bc_\bt_\b:_\b:_\bC_\bt_\bw_\bo_\bv_\be_\bc_\bt\n Ctwovect(double _x, double _y)\n ctor with initialisation\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bg_\be_\bo_\bm_\b__\b2_\bd_\b._\bh_\b:_\b8_\b1\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n _\bd_\be_\bf_\bi_\bn_\be_\bs_\b._\bh\n _\bt_\bw_\bo_\bp_\bi\n const double twopi\n definition of 2*M_PI which is useful a bit everyhere!\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bd_\be_\bf_\bi_\bn_\be_\bs_\b._\bh_\b:_\b1_\b1_\b4\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/protocones_8h_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/protocones_8h_source.html", "unified_diff": "@@ -90,52 +90,52 @@\n
39
\n
40namespace siscone{
\n
41
\n
\n \n
54public:
\n
\n-
56 Cborder_store(Cmomentum * momentum, double centre_eta, double centre_phi) :
\n-
57 mom(momentum), is_in(false) {
\n-
58 angle = atan2(mom->phi - centre_phi, mom->eta - centre_eta);
\n+\n+\n+\n
59 }
\n
\n
60
\n \n
62 double angle;
\n
63 bool is_in;
\n
64};
\n
\n
65
\n
66
\n-
69inline bool operator<(const Cborder_store & a, const Cborder_store & b) {
\n-
70 return a.angle < b.angle;
\n+
69inline bool operator<(const Cborder_store & a, const Cborder_store & b) {
\n+
70 return a.angle < b.angle;
\n
71}
\n
72
\n
73
\n
\n
82class Cstable_cones : public Cvicinity{
\n
83 public:
\n \n
86
\n-
88 Cstable_cones(std::vector<Cmomentum> &_particle_list);
\n+
88 Cstable_cones(std::vector<Cmomentum> &_particle_list);
\n
89
\n \n
92
\n-
97 void init(std::vector<Cmomentum> &_particle_list);
\n+
97 void init(std::vector<Cmomentum> &_particle_list);
\n
98
\n-
106 int get_stable_cones(double _radius);
\n+
106 int get_stable_cones(double _radius);
\n
107
\n
109 std::vector<Cmomentum> protocones;
\n
110
\n \n
113
\n \n
116#ifdef DEBUG_STABLE_CONES
\n-
117 int nb_hash_cones, nb_hash_occupied;
\n+\n
118#endif
\n
119
\n
120 protected:
\n
122 double R;
\n
123
\n
125 double R2;
\n
126
\n@@ -160,43 +160,43 @@\n
167 * run through the vicinity of the current parent and for each child
\n
168 * indicate which members are cocircular...
\n
169 */
\n
170 void prepare_cocircular_lists();
\n
171
\n
179 bool cocircular_check();
\n
180
\n-
185 void test_cone_cocircular(Cmomentum & borderless_cone,
\n-
186 std::list<Cmomentum *> & border_list);
\n+
185 void test_cone_cocircular(Cmomentum & borderless_cone,
\n+
186 std::list<Cmomentum *> & border_list);
\n
187
\n-
194 void test_stability(Cmomentum & candidate,
\n-
195 const std::vector<Cborder_store> & border_vect);
\n+
194 void test_stability(Cmomentum & candidate,
\n+
195 const std::vector<Cborder_store> & border_vect);
\n
196
\n
203 void compute_cone_contents();
\n
204
\n
210 void recompute_cone_contents();
\n
211
\n
212 /*
\n
213 * if we have gone beyond the acceptable threshold of change, compute
\n
214 * the cone momentum from particle list. in this version, we use the
\n
215 * 'pincluded' information from the Cvicinity class, but we don't
\n
216 * change the member cone, only the locally supplied one
\n
217 */
\n-
218 void recompute_cone_contents_if_needed(Cmomentum & this_cone, double & this_dpt);
\n+
218 void recompute_cone_contents_if_needed(Cmomentum & this_cone, double & this_dpt);
\n
219
\n
225 int proceed_with_stability();
\n
226
\n
227 /*
\n
228 * circle intersection.
\n
229 * computes the intersection with a circle of given centre and radius.
\n
230 * The output takes the form of a checkxor of the intersection's particles
\n
231 * - cx circle centre x coordinate
\n
232 * - cy circle centre y coordinate
\n
233 * return the checkxor for the intersection
\n
234 ******************************************************************/
\n-
235 Creference circle_intersect(double cx, double cy);
\n+
235 Creference circle_intersect(double cx, double cy);
\n
236
\n
238 Cmomentum cone_candidate;
\n
239
\n
241 std::vector<Cmomentum*> child_list;
\n
242
\n
245 std::vector< std::pair<Creference,Creference> > multiple_centre_done;
\n
246
\n@@ -210,15 +210,15 @@\n
261/*
\n
262 * compute the absolute value of the difference between 2 angles.
\n
263 * We take care of the 2pi periodicity
\n
264 * \\param angle1 first angle
\n
265 * \\param angle2 second angle
\n
266 * \\return the absolute value of the difference between the angles
\n
267 *****************************************************************/
\n-
268inline double abs_dangle(double &angle1, double &angle2);
\n+
268inline double abs_dangle(double &angle1, double &angle2);
\n
269
\n
270}
\n
271#endif
\n
class for storing a border momentum (in context of co-circularity checks).
Definition protocones.h:53
\n
Cborder_store(Cmomentum *momentum, double centre_eta, double centre_phi)
default ctor
Definition protocones.h:56
\n
double angle
angle w.r.t. circle centre
Definition protocones.h:62
\n
bool is_in
inclusion status of the particle
Definition protocones.h:63
\n@@ -236,14 +236,15 @@\n
double R
cone radius
Definition protocones.h:122
\n
int get_stable_cones(double _radius)
compute stable cones.
\n
hash_cones * hc
list of candidates
Definition protocones.h:112
\n
~Cstable_cones()
default dtor
\n
Cstable_cones(std::vector< Cmomentum > &_particle_list)
ctor with initialisation (sse init for details)
\n
element in the vicinity of a parent.
Definition vicinity.h:63
\n
list of element in the vicinity of a parent.
Definition vicinity.h:95
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n
list of cones candidates.
Definition hash.h:62
\n \n
\n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -39,49 +39,49 @@\n 37\n 38#include \"_\bd_\be_\bf_\bi_\bn_\be_\bs_\b._\bh\"\n 39\n 40namespace siscone{\n 41\n _\b5_\b3class _\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be{\n 54public:\n-_\b5_\b6 _\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm * momentum, double centre_eta, double centre_phi) :\n-57 _\bm_\bo_\bm(momentum), _\bi_\bs_\b__\bi_\bn(false) {\n-58 _\ba_\bn_\bg_\bl_\be = atan2(_\bm_\bo_\bm->_\bp_\bh_\bi - centre_phi, _\bm_\bo_\bm->_\be_\bt_\ba - centre_eta);\n+_\b5_\b6 _\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm * _\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm, double _\bc_\be_\bn_\bt_\br_\be_\b__\be_\bt_\ba, double _\bc_\be_\bn_\bt_\br_\be_\b__\bp_\bh_\bi) :\n+57 _\bm_\bo_\bm(_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm), _\bi_\bs_\b__\bi_\bn(_\bf_\ba_\bl_\bs_\be) {\n+58 _\ba_\bn_\bg_\bl_\be = _\ba_\bt_\ba_\bn_\b2(_\bm_\bo_\bm->_\bp_\bh_\bi - _\bc_\be_\bn_\bt_\br_\be_\b__\bp_\bh_\bi, _\bm_\bo_\bm->_\be_\bt_\ba - _\bc_\be_\bn_\bt_\br_\be_\b__\be_\bt_\ba);\n 59 }\n 60\n _\b6_\b1 _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm * _\bm_\bo_\bm;\n _\b6_\b2 double _\ba_\bn_\bg_\bl_\be;\n _\b6_\b3 bool _\bi_\bs_\b__\bi_\bn;\n 64};\n 65\n 66\n-69inline bool operator<(const _\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be & a, const _\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be & b) {\n-70 return a._\ba_\bn_\bg_\bl_\be < b._\ba_\bn_\bg_\bl_\be;\n+69inline bool _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b<(const _\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be & _\ba, const _\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be & _\bb) {\n+70 return _\ba.angle < _\bb.angle;\n 71}\n 72\n 73\n _\b8_\b2class _\bC_\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs : public _\bC_\bv_\bi_\bc_\bi_\bn_\bi_\bt_\by{\n 83 public:\n 85 _\bC_\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs();\n 86\n-_\b8_\b8 _\bC_\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs(std::vector &_particle_list);\n+_\b8_\b8 _\bC_\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs(std::vector &_\b__\bp_\ba_\br_\bt_\bi_\bc_\bl_\be_\b__\bl_\bi_\bs_\bt);\n 89\n 91 _\b~_\bC_\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs();\n 92\n-97 void _\bi_\bn_\bi_\bt(std::vector &_particle_list);\n+97 void _\bi_\bn_\bi_\bt(std::vector &_\b__\bp_\ba_\br_\bt_\bi_\bc_\bl_\be_\b__\bl_\bi_\bs_\bt);\n 98\n-106 int _\bg_\be_\bt_\b__\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs(double _radius);\n+106 int _\bg_\be_\bt_\b__\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs(double _\b__\br_\ba_\bd_\bi_\bu_\bs);\n 107\n _\b1_\b0_\b9 std::vector _\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs;\n 110\n _\b1_\b1_\b2 _\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs *_\bh_\bc;\n 113\n _\b1_\b1_\b5 int _\bn_\bb_\b__\bt_\bo_\bt;\n 116#ifdef DEBUG_STABLE_CONES\n-117 int nb_hash_cones, nb_hash_occupied;\n+117 int _\bn_\bb_\b__\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs, _\bn_\bb_\b__\bh_\ba_\bs_\bh_\b__\bo_\bc_\bc_\bu_\bp_\bi_\be_\bd;\n 118#endif\n 119\n 120 protected:\n _\b1_\b2_\b2 double _\bR;\n 123\n _\b1_\b2_\b5 double _\bR_\b2;\n 126\n@@ -106,44 +106,44 @@\n 167 * run through the vicinity of the current parent and for each child\n 168 * indicate which members are cocircular...\n 169 */\n 170 void prepare_cocircular_lists();\n 171\n 179 bool cocircular_check();\n 180\n-185 void test_cone_cocircular(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm & borderless_cone,\n-186 std::list & border_list);\n+185 void test_cone_cocircular(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm & _\bb_\bo_\br_\bd_\be_\br_\bl_\be_\bs_\bs_\b__\bc_\bo_\bn_\be,\n+186 std::list & _\bb_\bo_\br_\bd_\be_\br_\b__\bl_\bi_\bs_\bt);\n 187\n-194 void test_stability(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm & candidate,\n-195 const std::vector & border_vect);\n+194 void test_stability(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm & _\bc_\ba_\bn_\bd_\bi_\bd_\ba_\bt_\be,\n+195 const std::vector & _\bb_\bo_\br_\bd_\be_\br_\b__\bv_\be_\bc_\bt);\n 196\n 203 void compute_cone_contents();\n 204\n 210 void recompute_cone_contents();\n 211\n 212 /*\n 213 * if we have gone beyond the acceptable threshold of change, compute\n 214 * the cone momentum from particle list. in this version, we use the\n 215 * 'pincluded' information from the Cvicinity class, but we don't\n 216 * change the member cone, only the locally supplied one\n 217 */\n-218 void recompute_cone_contents_if_needed(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm & this_cone, double &\n-this_dpt);\n+218 void recompute_cone_contents_if_needed(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm & _\bt_\bh_\bi_\bs_\b__\bc_\bo_\bn_\be, double &\n+_\bt_\bh_\bi_\bs_\b__\bd_\bp_\bt);\n 219\n 225 int proceed_with_stability();\n 226\n 227 /*\n 228 * circle intersection.\n 229 * computes the intersection with a circle of given centre and radius.\n 230 * The output takes the form of a checkxor of the intersection's particles\n 231 * - cx circle centre x coordinate\n 232 * - cy circle centre y coordinate\n 233 * return the checkxor for the intersection\n 234 ******************************************************************/\n-235 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be circle_intersect(double cx, double cy);\n+235 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be circle_intersect(double _\bc_\bx, double _\bc_\by);\n 236\n 238 _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm cone_candidate;\n 239\n 241 std::vector child_list;\n 242\n 245 std::vector< std::pair > multiple_centre_done;\n 246\n@@ -156,15 +156,15 @@\n 261/*\n 262 * compute the absolute value of the difference between 2 angles.\n 263 * We take care of the 2pi periodicity\n 264 * \\param angle1 first angle\n 265 * \\param angle2 second angle\n 266 * \\return the absolute value of the difference between the angles\n 267 *****************************************************************/\n-268inline double abs_dangle(double &angle1, double &angle2);\n+268inline double abs_dangle(double &_\ba_\bn_\bg_\bl_\be_\b1, double &_\ba_\bn_\bg_\bl_\be_\b2);\n 269\n 270}\n 271#endif\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be\n class for storing a border momentum (in context of co-circularity checks).\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs_\b._\bh_\b:_\b5_\b3\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be_\b:_\b:_\bC_\bb_\bo_\br_\bd_\be_\br_\b__\bs_\bt_\bo_\br_\be\n@@ -241,13 +241,17 @@\n ctor with initialisation (sse init for details)\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bv_\bi_\bc_\bi_\bn_\bi_\bt_\by_\b__\be_\bl_\bm\n element in the vicinity of a parent.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bv_\bi_\bc_\bi_\bn_\bi_\bt_\by_\b._\bh_\b:_\b6_\b3\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bv_\bi_\bc_\bi_\bn_\bi_\bt_\by\n list of element in the vicinity of a parent.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bv_\bi_\bc_\bi_\bn_\bi_\bt_\by_\b._\bh_\b:_\b9_\b5\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs\n list of cones candidates.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b6_\b2\n _\bd_\be_\bf_\bi_\bn_\be_\bs_\b._\bh\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/quadtree_8cpp_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/quadtree_8cpp_source.html", "unified_diff": "@@ -92,44 +92,44 @@\n
40 * The elements at each node are of 'Cmomentum' type. *
\n
41 *******************************************************************/
\n
42
\n
43// default ctor
\n
44//--------------
\n
\n \n-
46 v = NULL;
\n+
46 v = NULL;
\n
47
\n-
48 children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;
\n+
48 children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;
\n
49 has_child = false;
\n
50}
\n
\n
51
\n
52
\n
53// ctor with initialisation (see init for details)
\n
54//--------------------------
\n
\n-
55Cquadtree::Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y){
\n-
56 v = NULL;
\n+
55Cquadtree::Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y){
\n+
56 v = NULL;
\n
57
\n-
58 children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;
\n+
58 children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;
\n
59 has_child = false;
\n
60
\n-
61 init(_x, _y, _half_size_x, _half_size_y);
\n+\n
62}
\n
\n
63
\n
64
\n
65// default destructor
\n
66// at destruction, everything is destroyed except
\n
67// physical values at the leaves
\n
68//------------------------------------------------
\n
\n \n
70 if (has_child){
\n-
71 if (v!=NULL) delete v;
\n+
71 if (v!=NULL) delete v;
\n
72 delete children[0][0];
\n
73 delete children[0][1];
\n
74 delete children[1][0];
\n
75 delete children[1][1];
\n
76 }
\n
77}
\n
\n@@ -143,86 +143,86 @@\n
85 * - _y y-position of the center
\n
86 * - half_size_x half x-size of the cell
\n
87 * - half_size_y half y-size of the cell
\n
88 * return 0 on success, 1 on error. Note that if the cell
\n
89 * is already filled, we return an error.
\n
90 ******************************************************************/
\n
\n-
91int Cquadtree::init(double _x, double _y, double _half_size_x, double _half_size_y){
\n-
92 if (v!=NULL)
\n+
91int Cquadtree::init(double _x, double _y, double _half_size_x, double _half_size_y){
\n+
92 if (v!=NULL)
\n
93 return 1;
\n
94
\n-
95 centre_x = _x;
\n-
96 centre_y = _y;
\n-
97 half_size_x = _half_size_x;
\n-
98 half_size_y = _half_size_y;
\n+
95 centre_x = _x;
\n+
96 centre_y = _y;
\n+\n+\n
99
\n
100 return 0;
\n
101}
\n
\n
102
\n
103
\n
104/*
\n
105 * adding a particle to the tree.
\n
106 * This method adds one vector to the quadtree structure which
\n
107 * is updated consequently.
\n
108 * - v vector to add
\n
109 * return 0 on success 1 on error
\n
110 ******************************************************************/
\n
\n-\n+\n
112 // Description of the method:
\n
113 // --------------------------
\n
114 // the addition process goes as follows:
\n
115 // 1. check if the cell is empty, in which case, add the particle
\n
116 // here and leave.
\n
117 // 2. If there is a unique particle already inside,
\n
118 // (a) create children
\n
119 // (b) forward the existing particle to the appropriate child
\n
120 // 3. Add current particle to this cell and forward to the
\n
121 // adequate child
\n
122 // NOTE: we assume in the whole procedure that the particle is
\n
123 // indeed inside the cell !
\n
124
\n
125 // step 1: the case of empty cells
\n-
126 if (v==NULL){
\n-
127 v = v_add;
\n+
126 if (v==NULL){
\n+
127 v = v_add;
\n
128 return 0;
\n
129 }
\n
130
\n
131 // step 2: additional work if 1! particle already present
\n
132 // we use the fact that only 1-particle systems have no child
\n
133 if (!has_child){
\n-
134 double new_half_size_x = 0.5*half_size_x;
\n-
135 double new_half_size_y = 0.5*half_size_y;
\n+
134 double new_half_size_x = 0.5*half_size_x;
\n+
135 double new_half_size_y = 0.5*half_size_y;
\n
136 // create children
\n-
137 children[0][0] = new Cquadtree(centre_x-new_half_size_x, centre_y-new_half_size_y,
\n-
138 new_half_size_x, new_half_size_y);
\n-
139 children[0][1] = new Cquadtree(centre_x-new_half_size_x, centre_y+new_half_size_y,
\n-
140 new_half_size_x, new_half_size_y);
\n-
141 children[1][0] = new Cquadtree(centre_x+new_half_size_x, centre_y-new_half_size_y,
\n-
142 new_half_size_x, new_half_size_y);
\n-
143 children[1][1] = new Cquadtree(centre_x+new_half_size_x, centre_y+new_half_size_y,
\n-
144 new_half_size_x, new_half_size_y);
\n+\n+\n+\n+\n+\n+\n+\n+\n
145
\n
146 has_child = true;
\n
147
\n
148 // forward to child
\n
149 //? The following line assumes 'true'==1 and 'false'==0
\n
150 // Note: v being a single particle, eta and phi are correct
\n \n
152
\n
153 // copy physical params
\n
154 v = new Cmomentum(*v);
\n
155 }
\n
156
\n
157 // step 3: add new particle
\n
158 // Note: v_add being a single particle, eta and phi are correct
\n-
159 children[v_add->eta>centre_x][v_add->phi>centre_y]->add(v_add);
\n-
160 *v+=*v_add;
\n+\n+
160 *v+=*v_add;
\n
161
\n
162 return 0;
\n
163}
\n
\n
164
\n
165
\n
166/*
\n@@ -232,112 +232,112 @@\n
170 * in the circle.
\n
171 * - cx circle centre x coordinate
\n
172 * - cy circle centre y coordinate
\n
173 * - cR2 circle radius SQUARED
\n
174 * return the checksum for the intersection
\n
175 ******************************************************************/
\n
\n-
176Creference Cquadtree::circle_intersect(double cx, double cy, double cR2){
\n+\n
177 // Description of the method:
\n
178 // --------------------------
\n
179 // 1. check if cell is empty => no intersection
\n
180 // 2. if cell has 1! particle, check if it is inside the circle.
\n
181 // If yes, add it and return, if not simply return.
\n
182 // 3. check if the circle intersects the square. If not, return.
\n
183 // 4. check if the square is inside the circle.
\n
184 // If yes, add it to qt and return.
\n
185 // 5. check intersections with children.
\n
186
\n
187 // step 1: if there is no particle inside te square, no reason to go further
\n-
188 if (v==NULL)
\n+
188 if (v==NULL)
\n
189 return Creference();
\n
190
\n-
191 double dx, dy;
\n+
191 double dx, dy;
\n
192
\n
193 // step 2: if there is only one particle inside the square, test if it is in
\n
194 // the circle, in which case return associated reference
\n
195 if (!has_child){
\n
196 // compute the distance
\n
197 // Note: v has only one particle => eta and phi are defined
\n-
198 dx = cx - v->eta;
\n-
199 dy = fabs(cy - v->phi);
\n-
200 if (dy>M_PI)
\n-
201 dy -= 2.0*M_PI;
\n+
198 dx = cx - v->eta;
\n+
199 dy = fabs(cy - v->phi);
\n+
200 if (dy>M_PI)
\n+
201 dy -= 2.0*M_PI;
\n
202
\n
203 // test distance
\n-
204 if (dx*dx+dy*dy<cR2){
\n+
204 if (dx*dx+dy*dy<cR2){
\n
205 return v->ref;
\n
206 }
\n
207
\n
208 return Creference();
\n
209 }
\n
210
\n
211 // step 3: check if there is an intersection
\n
212 //double ryp, rym;
\n-
213 double dx_c, dy_c;
\n+
213 double dx_c, dy_c;
\n
214
\n
215 // store distance with the centre of the square
\n-
216 dx_c = fabs(cx-centre_x);
\n-
217 dy_c = fabs(cy-centre_y);
\n-
218 if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c;
\n+
216 dx_c = fabs(cx-centre_x);
\n+
217 dy_c = fabs(cy-centre_y);
\n+
218 if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c;
\n
219
\n
220 // compute (minimal) the distance (pay attention to the periodicity in phi).
\n-
221 dx = dx_c-half_size_x;
\n-
222 if (dx<0) dx=0;
\n-
223 dy = dy_c-half_size_y;
\n-
224 if (dy<0) dy=0;
\n+\n+
222 if (dx<0) dx=0;
\n+\n+
224 if (dy<0) dy=0;
\n
225
\n
226 // check the distance
\n-
227 if (dx*dx+dy*dy>=cR2){
\n+
227 if (dx*dx+dy*dy>=cR2){
\n
228 // no intersection
\n
229 return Creference();
\n
230 }
\n
231
\n
232 // step 4: check if included
\n
233
\n
234 // compute the (maximal) distance
\n-
235 dx = dx_c+half_size_x;
\n-
236 dy = dy_c+half_size_y;
\n-
237 if (dy>M_PI) dy = M_PI;
\n+\n+\n+
237 if (dy>M_PI) dy = M_PI;
\n
238
\n
239 // compute the distance
\n-
240 if (dx*dx+dy*dy<cR2){
\n+
240 if (dx*dx+dy*dy<cR2){
\n
241 return v->ref;
\n
242 }
\n
243
\n
244 // step 5: the square is not fully in. Recurse to children
\n-
245 return children[0][0]->circle_intersect(cx, cy, cR2)
\n-
246 + children[0][1]->circle_intersect(cx, cy, cR2)
\n-
247 + children[1][0]->circle_intersect(cx, cy, cR2)
\n-
248 + children[1][1]->circle_intersect(cx, cy, cR2);
\n+
245 return children[0][0]->circle_intersect(cx, cy, cR2)
\n+
246 + children[0][1]->circle_intersect(cx, cy, cR2)
\n+
247 + children[1][0]->circle_intersect(cx, cy, cR2)
\n+
248 + children[1][1]->circle_intersect(cx, cy, cR2);
\n
249}
\n
\n
250
\n
251
\n
252/*
\n
253 * output a data file for drawing the grid.
\n
254 * This can be used to output a data file containing all the
\n
255 * grid subdivisions. The file contents is as follows:
\n
256 * first and second columns give center of the cell, the third
\n
257 * gives the size.
\n
258 * - flux opened stream to write to
\n
259 * return 0 on success, 1 on error
\n
260 ******************************************************************/
\n
\n-
261int Cquadtree::save(FILE *flux){
\n+\n
262
\n-
263 if (flux==NULL)
\n+
263 if (flux==NULL)
\n
264 return 1;
\n
265
\n
266 if (has_child){
\n-
267 fprintf(flux, "%e\\t%e\\t%e\\t%e\\n", centre_x, centre_y, half_size_x, half_size_y);
\n-
268 children[0][0]->save(flux);
\n-
269 children[0][1]->save(flux);
\n-
270 children[1][0]->save(flux);
\n-
271 children[1][1]->save(flux);
\n+
267 fprintf(flux, "%e\\t%e\\t%e\\t%e\\n", centre_x, centre_y, half_size_x, half_size_y);
\n+
268 children[0][0]->save(flux);
\n+
269 children[0][1]->save(flux);
\n+
270 children[1][0]->save(flux);
\n+
271 children[1][1]->save(flux);
\n
272 }
\n
273
\n
274 return 0;
\n
275}
\n
\n
276
\n
277
\n@@ -347,26 +347,26 @@\n
281 * tree leaves. The file contents is as follows:
\n
282 * first and second columns give center of the cell, the third
\n
283 * gives the size.
\n
284 * - flux opened stream to write to
\n
285 * return 0 on success, 1 on error
\n
286 ******************************************************************/
\n
\n-\n+\n
288
\n-
289 if (flux==NULL)
\n+
289 if (flux==NULL)
\n
290 return 1;
\n
291
\n
292 if (has_child){
\n-
293 if (children[0][0]!=NULL) children[0][0]->save_leaves(flux);
\n-
294 if (children[0][1]!=NULL) children[0][1]->save_leaves(flux);
\n-
295 if (children[1][0]!=NULL) children[1][0]->save_leaves(flux);
\n-
296 if (children[1][1]!=NULL) children[1][1]->save_leaves(flux);
\n+
293 if (children[0][0]!=NULL) children[0][0]->save_leaves(flux);
\n+
294 if (children[0][1]!=NULL) children[0][1]->save_leaves(flux);
\n+
295 if (children[1][0]!=NULL) children[1][0]->save_leaves(flux);
\n+
296 if (children[1][1]!=NULL) children[1][1]->save_leaves(flux);
\n
297 } else {
\n-
298 fprintf(flux, "%e\\t%e\\t%e\\t%e\\n", centre_x, centre_y, half_size_x, half_size_y);
\n+
298 fprintf(flux, "%e\\t%e\\t%e\\t%e\\n", centre_x, centre_y, half_size_x, half_size_y);
\n
299 }
\n
300
\n
301 return 0;
\n
302}
\n
\n
303
\n
304}
\n@@ -385,14 +385,15 @@\n
int save_leaves(FILE *flux)
output a data file for drawing the tree leaves.
Definition quadtree.cpp:287
\n
double centre_y
y-position of the centre of the cell
Definition quadtree.h:113
\n
bool has_child
true if not a leaf
Definition quadtree.h:120
\n
Cmomentum * v
physical contents
Definition quadtree.h:117
\n
int init(double _x, double _y, double _half_size_x, double _half_size_y)
init the tree.
Definition quadtree.cpp:91
\n
Cquadtree * children[2][2]
sub-cells ( 0,1->left-right; 0,1->bottom,top)
Definition quadtree.h:119
\n
references used for checksums.
Definition reference.h:43
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n \n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -42,41 +42,41 @@\n 39 * This class implements the traditional two-dimensional quadtree. *\n 40 * The elements at each node are of 'Cmomentum' type. *\n 41 *******************************************************************/\n 42\n 43// default ctor\n 44//--------------\n _\b4_\b5_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(){\n-46 _\bv = NULL;\n+46 _\bv = _\bN_\bU_\bL_\bL;\n 47\n-48 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1] = NULL;\n+48 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1] = _\bN_\bU_\bL_\bL;\n 49 _\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd = false;\n 50}\n 51\n 52\n 53// ctor with initialisation (see init for details)\n 54//--------------------------\n-_\b5_\b5_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(double _x, double _y, double _half_size_x, double\n-_half_size_y){\n-56 _\bv = NULL;\n+_\b5_\b5_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(double _\b__\bx, double _\b__\by, double _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, double\n+_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by){\n+56 _\bv = _\bN_\bU_\bL_\bL;\n 57\n-58 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1] = NULL;\n+58 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0] = _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1] = _\bN_\bU_\bL_\bL;\n 59 _\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd = false;\n 60\n-61 _\bi_\bn_\bi_\bt(_x, _y, _half_size_x, _half_size_y);\n+61 _\bi_\bn_\bi_\bt(_\b__\bx, _\b__\by, _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n 62}\n 63\n 64\n 65// default destructor\n 66// at destruction, everything is destroyed except\n 67// physical values at the leaves\n 68//------------------------------------------------\n _\b6_\b9_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\b~_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(){\n 70 if (_\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd){\n-71 if (_\bv!=NULL) delete _\bv;\n+71 if (_\bv!=_\bN_\bU_\bL_\bL) delete _\bv;\n 72 delete _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0];\n 73 delete _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1];\n 74 delete _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0];\n 75 delete _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1];\n 76 }\n 77}\n 78\n@@ -88,89 +88,89 @@\n 84 * - _x x-position of the center\n 85 * - _y y-position of the center\n 86 * - half_size_x half x-size of the cell\n 87 * - half_size_y half y-size of the cell\n 88 * return 0 on success, 1 on error. Note that if the cell\n 89 * is already filled, we return an error.\n 90 ******************************************************************/\n-_\b9_\b1int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bi_\bn_\bi_\bt(double _x, double _y, double _half_size_x, double\n-_half_size_y){\n-92 if (_\bv!=NULL)\n+_\b9_\b1int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bi_\bn_\bi_\bt(double _\b__\bx, double _\b__\by, double _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, double\n+_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by){\n+92 if (_\bv!=_\bN_\bU_\bL_\bL)\n 93 return 1;\n 94\n-95 _\bc_\be_\bn_\bt_\br_\be_\b__\bx = _x;\n-96 _\bc_\be_\bn_\bt_\br_\be_\b__\by = _y;\n-97 _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx = _half_size_x;\n-98 _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by = _half_size_y;\n+95 _\bc_\be_\bn_\bt_\br_\be_\b__\bx = _\b__\bx;\n+96 _\bc_\be_\bn_\bt_\br_\be_\b__\by = _\b__\by;\n+97 _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx = _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx;\n+98 _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by = _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by;\n 99\n 100 return 0;\n 101}\n 102\n 103\n 104/*\n 105 * adding a particle to the tree.\n 106 * This method adds one vector to the quadtree structure which\n 107 * is updated consequently.\n 108 * - v vector to add\n 109 * return 0 on success 1 on error\n 110 ******************************************************************/\n-_\b1_\b1_\b1int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\ba_\bd_\bd(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v_add){\n+_\b1_\b1_\b1int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\ba_\bd_\bd(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *_\bv_\b__\ba_\bd_\bd){\n 112 // Description of the method:\n 113 // --------------------------\n 114 // the addition process goes as follows:\n 115 // 1. check if the cell is empty, in which case, add the particle\n 116 // here and leave.\n 117 // 2. If there is a unique particle already inside,\n 118 // (a) create children\n 119 // (b) forward the existing particle to the appropriate child\n 120 // 3. Add current particle to this cell and forward to the\n 121 // adequate child\n 122 // NOTE: we assume in the whole procedure that the particle is\n 123 // indeed inside the cell !\n 124\n 125 // step 1: the case of empty cells\n-126 if (_\bv==NULL){\n-127 _\bv = v_add;\n+126 if (_\bv==_\bN_\bU_\bL_\bL){\n+127 _\bv = _\bv_\b__\ba_\bd_\bd;\n 128 return 0;\n 129 }\n 130\n 131 // step 2: additional work if 1! particle already present\n 132 // we use the fact that only 1-particle systems have no child\n 133 if (!_\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd){\n-134 double new_half_size_x = 0.5*_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx;\n-135 double new_half_size_y = 0.5*_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by;\n+134 double _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx = 0.5*_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx;\n+135 double _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by = 0.5*_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by;\n 136 // create children\n-137 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0] = new _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(_\bc_\be_\bn_\bt_\br_\be_\b__\bx-new_half_size_x, _\bc_\be_\bn_\bt_\br_\be_\b__\by-\n-new_half_size_y,\n-138 new_half_size_x, new_half_size_y);\n-139 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1] = new _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(_\bc_\be_\bn_\bt_\br_\be_\b__\bx-new_half_size_x,\n-_\bc_\be_\bn_\bt_\br_\be_\b__\by+new_half_size_y,\n-140 new_half_size_x, new_half_size_y);\n-141 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0] = new _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(_\bc_\be_\bn_\bt_\br_\be_\b__\bx+new_half_size_x, _\bc_\be_\bn_\bt_\br_\be_\b__\by-\n-new_half_size_y,\n-142 new_half_size_x, new_half_size_y);\n-143 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1] = new _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(_\bc_\be_\bn_\bt_\br_\be_\b__\bx+new_half_size_x,\n-_\bc_\be_\bn_\bt_\br_\be_\b__\by+new_half_size_y,\n-144 new_half_size_x, new_half_size_y);\n+137 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0] = new _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(_\bc_\be_\bn_\bt_\br_\be_\b__\bx-_\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, _\bc_\be_\bn_\bt_\br_\be_\b__\by-\n+_\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by,\n+138 _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n+139 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1] = new _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(_\bc_\be_\bn_\bt_\br_\be_\b__\bx-_\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx,\n+_\bc_\be_\bn_\bt_\br_\be_\b__\by+_\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by,\n+140 _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n+141 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0] = new _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(_\bc_\be_\bn_\bt_\br_\be_\b__\bx+_\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, _\bc_\be_\bn_\bt_\br_\be_\b__\by-\n+_\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by,\n+142 _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n+143 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1] = new _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(_\bc_\be_\bn_\bt_\br_\be_\b__\bx+_\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx,\n+_\bc_\be_\bn_\bt_\br_\be_\b__\by+_\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by,\n+144 _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, _\bn_\be_\bw_\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n 145\n 146 _\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd = true;\n 147\n 148 // forward to child\n 149 //? The following line assumes 'true'==1 and 'false'==0\n 150 // Note: v being a single particle, eta and phi are correct\n 151 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[_\bv->_\be_\bt_\ba>_\bc_\be_\bn_\bt_\br_\be_\b__\bx][_\bv->_\bp_\bh_\bi>_\bc_\be_\bn_\bt_\br_\be_\b__\by]->_\ba_\bd_\bd(_\bv);\n 152\n 153 // copy physical params\n 154 _\bv = new _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm(*_\bv);\n 155 }\n 156\n 157 // step 3: add new particle\n 158 // Note: v_add being a single particle, eta and phi are correct\n-159 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[v_add->_\be_\bt_\ba>_\bc_\be_\bn_\bt_\br_\be_\b__\bx][v_add->_\bp_\bh_\bi>_\bc_\be_\bn_\bt_\br_\be_\b__\by]->_\ba_\bd_\bd(v_add);\n-160 *_\bv+=*v_add;\n+159 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[_\bv_\b__\ba_\bd_\bd->eta>_\bc_\be_\bn_\bt_\br_\be_\b__\bx][_\bv_\b__\ba_\bd_\bd->phi>_\bc_\be_\bn_\bt_\br_\be_\b__\by]->_\ba_\bd_\bd(_\bv_\b__\ba_\bd_\bd);\n+160 *_\bv+=*_\bv_\b__\ba_\bd_\bd;\n 161\n 162 return 0;\n 163}\n 164\n 165\n 166/*\n 167 * circle intersection.\n@@ -178,114 +178,114 @@\n 169 * The output takes the form of a quadtree with all squares included\n 170 * in the circle.\n 171 * - cx circle centre x coordinate\n 172 * - cy circle centre y coordinate\n 173 * - cR2 circle radius SQUARED\n 174 * return the checksum for the intersection\n 175 ******************************************************************/\n-_\b1_\b7_\b6_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(double cx, double cy, double cR2){\n+_\b1_\b7_\b6_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(double _\bc_\bx, double _\bc_\by, double _\bc_\bR_\b2){\n 177 // Description of the method:\n 178 // --------------------------\n 179 // 1. check if cell is empty => no intersection\n 180 // 2. if cell has 1! particle, check if it is inside the circle.\n 181 // If yes, add it and return, if not simply return.\n 182 // 3. check if the circle intersects the square. If not, return.\n 183 // 4. check if the square is inside the circle.\n 184 // If yes, add it to qt and return.\n 185 // 5. check intersections with children.\n 186\n 187 // step 1: if there is no particle inside te square, no reason to go\n further\n-188 if (_\bv==NULL)\n+188 if (_\bv==_\bN_\bU_\bL_\bL)\n 189 return _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be();\n 190\n-191 double dx, dy;\n+191 double _\bd_\bx, _\bd_\by;\n 192\n 193 // step 2: if there is only one particle inside the square, test if it is\n in\n 194 // the circle, in which case return associated reference\n 195 if (!_\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd){\n 196 // compute the distance\n 197 // Note: v has only one particle => eta and phi are defined\n-198 dx = cx - _\bv->_\be_\bt_\ba;\n-199 dy = fabs(cy - _\bv->_\bp_\bh_\bi);\n-200 if (dy>M_PI)\n-201 dy -= 2.0*M_PI;\n+198 _\bd_\bx = _\bc_\bx - _\bv->_\be_\bt_\ba;\n+199 _\bd_\by = _\bf_\ba_\bb_\bs(_\bc_\by - _\bv->_\bp_\bh_\bi);\n+200 if (_\bd_\by>M_PI)\n+201 _\bd_\by -= 2.0*M_PI;\n 202\n 203 // test distance\n-204 if (dx*dx+dy*dy_\br_\be_\bf;\n 206 }\n 207\n 208 return _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be();\n 209 }\n 210\n 211 // step 3: check if there is an intersection\n 212 //double ryp, rym;\n-213 double dx_c, dy_c;\n+213 double _\bd_\bx_\b__\bc, _\bd_\by_\b__\bc;\n 214\n 215 // store distance with the centre of the square\n-216 dx_c = fabs(cx-_\bc_\be_\bn_\bt_\br_\be_\b__\bx);\n-217 dy_c = fabs(cy-_\bc_\be_\bn_\bt_\br_\be_\b__\by);\n-218 if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c;\n+216 _\bd_\bx_\b__\bc = _\bf_\ba_\bb_\bs(_\bc_\bx-_\bc_\be_\bn_\bt_\br_\be_\b__\bx);\n+217 _\bd_\by_\b__\bc = _\bf_\ba_\bb_\bs(_\bc_\by-_\bc_\be_\bn_\bt_\br_\be_\b__\by);\n+218 if (_\bd_\by_\b__\bc>M_PI) _\bd_\by_\b__\bc = 2.0*M_PI-_\bd_\by_\b__\bc;\n 219\n 220 // compute (minimal) the distance (pay attention to the periodicity in\n phi).\n-221 dx = dx_c-_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx;\n-222 if (dx<0) dx=0;\n-223 dy = dy_c-_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by;\n-224 if (dy<0) dy=0;\n+221 _\bd_\bx = _\bd_\bx_\b__\bc-_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx;\n+222 if (_\bd_\bx<0) _\bd_\bx=0;\n+223 _\bd_\by = _\bd_\by_\b__\bc-_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by;\n+224 if (_\bd_\by<0) _\bd_\by=0;\n 225\n 226 // check the distance\n-227 if (dx*dx+dy*dy>=cR2){\n+227 if (_\bd_\bx*_\bd_\bx+_\bd_\by*_\bd_\by>=_\bc_\bR_\b2){\n 228 // no intersection\n 229 return _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be();\n 230 }\n 231\n 232 // step 4: check if included\n 233\n 234 // compute the (maximal) distance\n-235 dx = dx_c+_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx;\n-236 dy = dy_c+_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by;\n-237 if (dy>M_PI) dy = M_PI;\n+235 _\bd_\bx = _\bd_\bx_\b__\bc+_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx;\n+236 _\bd_\by = _\bd_\by_\b__\bc+_\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by;\n+237 if (_\bd_\by>M_PI) _\bd_\by = M_PI;\n 238\n 239 // compute the distance\n-240 if (dx*dx+dy*dy_\br_\be_\bf;\n 242 }\n 243\n 244 // step 5: the square is not fully in. Recurse to children\n-245 return _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0]->_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(cx, cy, cR2)\n-246 + _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1]->_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(cx, cy, cR2)\n-247 + _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0]->_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(cx, cy, cR2)\n-248 + _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1]->_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(cx, cy, cR2);\n+245 return _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0]->_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(_\bc_\bx, _\bc_\by, _\bc_\bR_\b2)\n+246 + _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1]->_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(_\bc_\bx, _\bc_\by, _\bc_\bR_\b2)\n+247 + _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0]->_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(_\bc_\bx, _\bc_\by, _\bc_\bR_\b2)\n+248 + _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1]->_\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(_\bc_\bx, _\bc_\by, _\bc_\bR_\b2);\n 249}\n 250\n 251\n 252/*\n 253 * output a data file for drawing the grid.\n 254 * This can be used to output a data file containing all the\n 255 * grid subdivisions. The file contents is as follows:\n 256 * first and second columns give center of the cell, the third\n 257 * gives the size.\n 258 * - flux opened stream to write to\n 259 * return 0 on success, 1 on error\n 260 ******************************************************************/\n-_\b2_\b6_\b1int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bs_\ba_\bv_\be(FILE *flux){\n+_\b2_\b6_\b1int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bs_\ba_\bv_\be(_\bF_\bI_\bL_\bE *_\bf_\bl_\bu_\bx){\n 262\n-263 if (flux==NULL)\n+263 if (_\bf_\bl_\bu_\bx==_\bN_\bU_\bL_\bL)\n 264 return 1;\n 265\n 266 if (_\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd){\n-267 fprintf(flux, \"%e\\t%e\\t%e\\t%e\\n\", _\bc_\be_\bn_\bt_\br_\be_\b__\bx, _\bc_\be_\bn_\bt_\br_\be_\b__\by, _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx,\n+267 _\bf_\bp_\br_\bi_\bn_\bt_\bf(_\bf_\bl_\bu_\bx, \"%e\\t%e\\t%e\\t%e\\n\", _\bc_\be_\bn_\bt_\br_\be_\b__\bx, _\bc_\be_\bn_\bt_\br_\be_\b__\by, _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx,\n _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n-268 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0]->_\bs_\ba_\bv_\be(flux);\n-269 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1]->_\bs_\ba_\bv_\be(flux);\n-270 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0]->_\bs_\ba_\bv_\be(flux);\n-271 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1]->_\bs_\ba_\bv_\be(flux);\n+268 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0]->_\bs_\ba_\bv_\be(_\bf_\bl_\bu_\bx);\n+269 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1]->_\bs_\ba_\bv_\be(_\bf_\bl_\bu_\bx);\n+270 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0]->_\bs_\ba_\bv_\be(_\bf_\bl_\bu_\bx);\n+271 _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1]->_\bs_\ba_\bv_\be(_\bf_\bl_\bu_\bx);\n 272 }\n 273\n 274 return 0;\n 275}\n 276\n 277\n 278/*\n@@ -293,26 +293,26 @@\n 280 * This can be used to output a data file containing all the\n 281 * tree leaves. The file contents is as follows:\n 282 * first and second columns give center of the cell, the third\n 283 * gives the size.\n 284 * - flux opened stream to write to\n 285 * return 0 on success, 1 on error\n 286 ******************************************************************/\n-_\b2_\b8_\b7int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(FILE *flux){\n+_\b2_\b8_\b7int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(_\bF_\bI_\bL_\bE *_\bf_\bl_\bu_\bx){\n 288\n-289 if (flux==NULL)\n+289 if (_\bf_\bl_\bu_\bx==_\bN_\bU_\bL_\bL)\n 290 return 1;\n 291\n 292 if (_\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd){\n-293 if (_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0]!=NULL) _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0]->_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(flux);\n-294 if (_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1]!=NULL) _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1]->_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(flux);\n-295 if (_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0]!=NULL) _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0]->_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(flux);\n-296 if (_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1]!=NULL) _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1]->_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(flux);\n+293 if (_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0]!=_\bN_\bU_\bL_\bL) _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][0]->_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(_\bf_\bl_\bu_\bx);\n+294 if (_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1]!=_\bN_\bU_\bL_\bL) _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[0][1]->_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(_\bf_\bl_\bu_\bx);\n+295 if (_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0]!=_\bN_\bU_\bL_\bL) _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][0]->_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(_\bf_\bl_\bu_\bx);\n+296 if (_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1]!=_\bN_\bU_\bL_\bL) _\bc_\bh_\bi_\bl_\bd_\br_\be_\bn[1][1]->_\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(_\bf_\bl_\bu_\bx);\n 297 } else {\n-298 fprintf(flux, \"%e\\t%e\\t%e\\t%e\\n\", _\bc_\be_\bn_\bt_\br_\be_\b__\bx, _\bc_\be_\bn_\bt_\br_\be_\b__\by, _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx,\n+298 _\bf_\bp_\br_\bi_\bn_\bt_\bf(_\bf_\bl_\bu_\bx, \"%e\\t%e\\t%e\\t%e\\n\", _\bc_\be_\bn_\bt_\br_\be_\b__\bx, _\bc_\be_\bn_\bt_\br_\be_\b__\by, _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx,\n _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n 299 }\n 300\n 301 return 0;\n 302}\n 303\n 304}\n@@ -387,9 +387,13 @@\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn\n Cquadtree * children[2][2]\n sub-cells ( 0,1->left-right; 0,1->bottom,top)\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b._\bh_\b:_\b1_\b1_\b9\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be\n references used for checksums.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b._\bh_\b:_\b4_\b3\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/quadtree_8h_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/quadtree_8h_source.html", "unified_diff": "@@ -85,27 +85,27 @@\n
34namespace siscone{
\n
35
\n
\n \n
44 public:
\n
46 Cquadtree();
\n
47
\n-
49 Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y);
\n+
49 Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y);
\n
50
\n
54 ~Cquadtree();
\n
55
\n-
67 int init(double _x, double _y, double _half_size_x, double _half_size_y);
\n+
67 int init(double _x, double _y, double _half_size_x, double _half_size_y);
\n
68
\n-
76 int add(Cmomentum *v_add);
\n+
76 int add(Cmomentum *v_add);
\n
77
\n-
88 Creference circle_intersect(double cx, double cy, double cR2);
\n+
88 Creference circle_intersect(double cx, double cy, double cR2);
\n
89
\n-
99 int save(FILE *flux);
\n+
99 int save(FILE *flux);
\n
100
\n-
110 int save_leaves(FILE *flux);
\n+
110 int save_leaves(FILE *flux);
\n
111
\n
112 double centre_x;
\n
113 double centre_y;
\n
114 double half_size_x;
\n
115 double half_size_y;
\n
116
\n \n@@ -130,14 +130,15 @@\n
int save_leaves(FILE *flux)
output a data file for drawing the tree leaves.
Definition quadtree.cpp:287
\n
double centre_y
y-position of the centre of the cell
Definition quadtree.h:113
\n
bool has_child
true if not a leaf
Definition quadtree.h:120
\n
Cmomentum * v
physical contents
Definition quadtree.h:117
\n
int init(double _x, double _y, double _half_size_x, double _half_size_y)
init the tree.
Definition quadtree.cpp:91
\n
Cquadtree * children[2][2]
sub-cells ( 0,1->left-right; 0,1->bottom,top)
Definition quadtree.h:119
\n
references used for checksums.
Definition reference.h:43
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n
\n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -35,27 +35,27 @@\n 33\n 34namespace siscone{\n 35\n _\b4_\b3class _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be{\n 44 public:\n 46 _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be();\n 47\n-49 _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(double _x, double _y, double _half_size_x, double _half_size_y);\n+49 _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(double _\b__\bx, double _\b__\by, double _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, double _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n 50\n 54 _\b~_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be();\n 55\n-67 int _\bi_\bn_\bi_\bt(double _x, double _y, double _half_size_x, double _half_size_y);\n+67 int _\bi_\bn_\bi_\bt(double _\b__\bx, double _\b__\by, double _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx, double _\b__\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by);\n 68\n-76 int _\ba_\bd_\bd(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v_add);\n+76 int _\ba_\bd_\bd(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *_\bv_\b__\ba_\bd_\bd);\n 77\n-88 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(double cx, double cy, double cR2);\n+88 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bc_\bi_\br_\bc_\bl_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt(double _\bc_\bx, double _\bc_\by, double _\bc_\bR_\b2);\n 89\n-99 int _\bs_\ba_\bv_\be(FILE *flux);\n+99 int _\bs_\ba_\bv_\be(_\bF_\bI_\bL_\bE *_\bf_\bl_\bu_\bx);\n 100\n-110 int _\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(FILE *flux);\n+110 int _\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(_\bF_\bI_\bL_\bE *_\bf_\bl_\bu_\bx);\n 111\n _\b1_\b1_\b2 double _\bc_\be_\bn_\bt_\br_\be_\b__\bx;\n _\b1_\b1_\b3 double _\bc_\be_\bn_\bt_\br_\be_\b__\by;\n _\b1_\b1_\b4 double _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\bx;\n _\b1_\b1_\b5 double _\bh_\ba_\bl_\bf_\b__\bs_\bi_\bz_\be_\b__\by;\n 116\n _\b1_\b1_\b7 _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *_\bv;\n@@ -128,9 +128,13 @@\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bc_\bh_\bi_\bl_\bd_\br_\be_\bn\n Cquadtree * children[2][2]\n sub-cells ( 0,1->left-right; 0,1->bottom,top)\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b._\bh_\b:_\b1_\b1_\b9\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be\n references used for checksums.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b._\bh_\b:_\b4_\b3\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/ranlux_8cpp_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/ranlux_8cpp_source.html", "unified_diff": "@@ -114,20 +114,20 @@\n
59
\n
60
\n
61// incrementation of the generator state
\n
62//---------------------------------------
\n
63static inline unsigned long int increment_state(){
\n
64 unsigned int i = local_ranlux_state.i;
\n
65 unsigned int j = local_ranlux_state.j;
\n-
66 long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i]
\n+
66 long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i]
\n
67 - local_ranlux_state.carry;
\n
68
\n-
69 if (delta & mask_hi){
\n+
69 if (delta & mask_hi){
\n
70 local_ranlux_state.carry = 1;
\n-
71 delta &= mask_lo;
\n+
71 delta &= mask_lo;
\n
72 } else {
\n
73 local_ranlux_state.carry = 0;
\n
74 }
\n
75
\n
76 local_ranlux_state.u[i] = delta;
\n
77
\n
78 if (i==0)
\n@@ -220,14 +220,15 @@\n
165 for (i=0;i<n;i++){
\n
166 /* FIXME: we're assuming that a char is 8 bits */
\n
167 printf("%.2x", *(p+i));
\n
168 }
\n
169}
\n
170
\n
171}
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n \n \n \n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -62,20 +62,20 @@\n 59\n 60\n 61// incrementation of the generator state\n 62//---------------------------------------\n 63static inline unsigned long int increment_state(){\n 64 unsigned int i = local_ranlux_state.i;\n 65 unsigned int j = local_ranlux_state.j;\n-66 long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i]\n+66 long int _\bd_\be_\bl_\bt_\ba = local_ranlux_state.u[j] - local_ranlux_state.u[i]\n 67 - local_ranlux_state.carry;\n 68\n-69 if (delta & mask_hi){\n+69 if (_\bd_\be_\bl_\bt_\ba & mask_hi){\n 70 local_ranlux_state.carry = 1;\n-71 delta &= mask_lo;\n+71 _\bd_\be_\bl_\bt_\ba &= mask_lo;\n 72 } else {\n 73 local_ranlux_state.carry = 0;\n 74 }\n 75\n 76 local_ranlux_state.u[i] = delta;\n 77\n 78 if (i==0)\n@@ -168,12 +168,16 @@\n 165 for (i=0;i\n \n
55// ref[0] = reference_bit;
\n
56// ref[1] = 0;
\n
57// ref[2] = 0;
\n
58// reference_bit <<= 1;
\n
59
\n-
60 unsigned int r1 = ranlux_get();
\n-
61 unsigned int r2 = ranlux_get();
\n-
62 unsigned int r3 = ranlux_get();
\n-
63 unsigned int r4 = ranlux_get();
\n+
60 unsigned int r1 = ranlux_get();
\n+
61 unsigned int r2 = ranlux_get();
\n+
62 unsigned int r3 = ranlux_get();
\n+
63 unsigned int r4 = ranlux_get();
\n
64 // since ranlux only produces 24 bits, take r4 and add 8 bits
\n
65 // from it to each of r1,r2, r3 to get 3*32 bits.
\n-
66 ref[0] = r1+((r4 & 0x00ff0000) << 8);
\n-
67 ref[1] = r2+((r4 & 0x0000ff00) << 16);
\n-
68 ref[2] = r3+((r4 & 0x000000ff) << 24);
\n+
66 ref[0] = r1+((r4 & 0x00ff0000) << 8);
\n+
67 ref[1] = r2+((r4 & 0x0000ff00) << 16);
\n+
68 ref[2] = r3+((r4 & 0x000000ff) << 24);
\n
69
\n
70 if (is_empty()) randomize();
\n
71}
\n \n
72
\n
73// test emptyness
\n
74//----------------
\n@@ -140,49 +140,49 @@\n
82 return (ref[0]!=0) || (ref[1]!=0) || (ref[2]!=0);
\n
83}
\n \n
84
\n
85// assignment of reference
\n
86//-------------------------
\n
\n-\n-
88 ref[0] = r.ref[0];
\n-
89 ref[1] = r.ref[1];
\n-
90 ref[2] = r.ref[2];
\n+\n+
88 ref[0] = r.ref[0];
\n+
89 ref[1] = r.ref[1];
\n+
90 ref[2] = r.ref[2];
\n
91 return *this;
\n
92}
\n
\n
93
\n
94// addition of reference
\n
95//-----------------------
\n
\n-\n-
97 Creference tmp = *this;
\n-
98 return tmp+=r;
\n+\n+
97 Creference tmp = *this;
\n+
98 return tmp+=r;
\n
99}
\n
\n
100
\n
101// incrementation of reference
\n
102//-----------------------------
\n
\n-\n-
104 ref[0] ^= r.ref[0];
\n-
105 ref[1] ^= r.ref[1];
\n-
106 ref[2] ^= r.ref[2];
\n+\n+
104 ref[0] ^= r.ref[0];
\n+
105 ref[1] ^= r.ref[1];
\n+
106 ref[2] ^= r.ref[2];
\n
107 return *this;
\n
108}
\n
\n
109
\n
110// decrementation of reference
\n
111//-----------------------------
\n
\n-\n-
113 ref[0] ^= r.ref[0];
\n-
114 ref[1] ^= r.ref[1];
\n-
115 ref[2] ^= r.ref[2];
\n+\n+
113 ref[0] ^= r.ref[0];
\n+
114 ref[1] ^= r.ref[1];
\n+
115 ref[2] ^= r.ref[2];
\n
116 return *this;
\n
117}
\n
\n
118
\n
119}
\n
120
\n
references used for checksums.
Definition reference.h:43
\n@@ -191,14 +191,15 @@\n
Creference & operator=(const Creference &r)
assignment of reference
Definition reference.cpp:87
\n
Creference()
default constructor
Definition reference.cpp:46
\n
void randomize()
create a random reference
Definition reference.cpp:54
\n
Creference & operator+=(const Creference &r)
incrementation of reference
\n
bool not_empty()
test non-emptyness
Definition reference.cpp:81
\n
Creference & operator-=(const Creference &r)
decrementation of reference
\n
unsigned int ref[3]
actual data for the reference
Definition reference.h:72
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n \n \n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -55,23 +55,23 @@\n 53//---------------------------\n _\b5_\b4void _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\br_\ba_\bn_\bd_\bo_\bm_\bi_\bz_\be(){\n 55// ref[0] = reference_bit;\n 56// ref[1] = 0;\n 57// ref[2] = 0;\n 58// reference_bit <<= 1;\n 59\n-60 unsigned int r1 = ranlux_get();\n-61 unsigned int r2 = ranlux_get();\n-62 unsigned int r3 = ranlux_get();\n-63 unsigned int r4 = ranlux_get();\n+60 unsigned int _\br_\b1 = ranlux_get();\n+61 unsigned int _\br_\b2 = ranlux_get();\n+62 unsigned int _\br_\b3 = ranlux_get();\n+63 unsigned int _\br_\b4 = ranlux_get();\n 64 // since ranlux only produces 24 bits, take r4 and add 8 bits\n 65 // from it to each of r1,r2, r3 to get 3*32 bits.\n-66 _\br_\be_\bf[0] = r1+((r4 & 0x00ff0000) << 8);\n-67 _\br_\be_\bf[1] = r2+((r4 & 0x0000ff00) << 16);\n-68 _\br_\be_\bf[2] = r3+((r4 & 0x000000ff) << 24);\n+66 _\br_\be_\bf[0] = _\br_\b1+((_\br_\b4 & 0x00ff0000) << 8);\n+67 _\br_\be_\bf[1] = _\br_\b2+((_\br_\b4 & 0x0000ff00) << 16);\n+68 _\br_\be_\bf[2] = _\br_\b3+((_\br_\b4 & 0x000000ff) << 24);\n 69\n 70 if (_\bi_\bs_\b__\be_\bm_\bp_\bt_\by()) _\br_\ba_\bn_\bd_\bo_\bm_\bi_\bz_\be();\n 71}\n 72\n 73// test emptyness\n 74//----------------\n _\b7_\b5bool _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bi_\bs_\b__\be_\bm_\bp_\bt_\by(){\n@@ -82,43 +82,43 @@\n 80//--------------------\n _\b8_\b1bool _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bn_\bo_\bt_\b__\be_\bm_\bp_\bt_\by(){\n 82 return (_\br_\be_\bf[0]!=0) || (_\br_\be_\bf[1]!=0) || (_\br_\be_\bf[2]!=0);\n 83}\n 84\n 85// assignment of reference\n 86//-------------------------\n-_\b8_\b7_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r){\n-88 _\br_\be_\bf[0] = r._\br_\be_\bf[0];\n-89 _\br_\be_\bf[1] = r._\br_\be_\bf[1];\n-90 _\br_\be_\bf[2] = r._\br_\be_\bf[2];\n+_\b8_\b7_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br){\n+88 _\br_\be_\bf[0] = _\br.ref[0];\n+89 _\br_\be_\bf[1] = _\br.ref[1];\n+90 _\br_\be_\bf[2] = _\br.ref[2];\n 91 return *this;\n 92}\n 93\n 94// addition of reference\n 95//-----------------------\n-_\b9_\b6_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r){\n-97 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be tmp = *this;\n-98 return tmp+=r;\n+_\b9_\b6_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br){\n+97 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bt_\bm_\bp = *this;\n+98 return _\bt_\bm_\bp+=_\br;\n 99}\n 100\n 101// incrementation of reference\n 102//-----------------------------\n-_\b1_\b0_\b3_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r){\n-104 _\br_\be_\bf[0] ^= r._\br_\be_\bf[0];\n-105 _\br_\be_\bf[1] ^= r._\br_\be_\bf[1];\n-106 _\br_\be_\bf[2] ^= r._\br_\be_\bf[2];\n+_\b1_\b0_\b3_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br){\n+104 _\br_\be_\bf[0] ^= _\br.ref[0];\n+105 _\br_\be_\bf[1] ^= _\br.ref[1];\n+106 _\br_\be_\bf[2] ^= _\br.ref[2];\n 107 return *this;\n 108}\n 109\n 110// decrementation of reference\n 111//-----------------------------\n-_\b1_\b1_\b2_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b-_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r){\n-113 _\br_\be_\bf[0] ^= r._\br_\be_\bf[0];\n-114 _\br_\be_\bf[1] ^= r._\br_\be_\bf[1];\n-115 _\br_\be_\bf[2] ^= r._\br_\be_\bf[2];\n+_\b1_\b1_\b2_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b-_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br){\n+113 _\br_\be_\bf[0] ^= _\br.ref[0];\n+114 _\br_\be_\bf[1] ^= _\br.ref[1];\n+115 _\br_\be_\bf[2] ^= _\br.ref[2];\n 116 return *this;\n 117}\n 118\n 119}\n 120\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be\n references used for checksums.\n@@ -155,10 +155,14 @@\n Creference & operator-=(const Creference &r)\n decrementation of reference\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b._\bc_\bp_\bp_\b:_\b1_\b1_\b2\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\br_\be_\bf\n unsigned int ref[3]\n actual data for the reference\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b._\bh_\b:_\b7_\b2\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n _\br_\ba_\bn_\bl_\bu_\bx_\b._\bh\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/reference_8h_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/reference_8h_source.html", "unified_diff": "@@ -88,43 +88,43 @@\n
47
\n
49 void randomize();
\n
50
\n
52 bool is_empty();
\n
53
\n
55 bool not_empty();
\n
56
\n-\n+\n
59
\n-\n+\n
62
\n-\n+\n
65
\n-\n+\n
68
\n
70 inline unsigned int operator[] (int i) {return ref[i];}
\n
71
\n
72 unsigned int ref[3];
\n
73};
\n \n
74
\n-
76Creference operator + (Creference &r1, Creference &r2);
\n+\n
77
\n-
79bool operator == (const Creference &r1, const Creference &r2);
\n+
79bool operator == (const Creference &r1, const Creference &r2);
\n
80
\n-
82bool operator != (const Creference &r1, const Creference &r2);
\n+
82bool operator != (const Creference &r1, const Creference &r2);
\n
83
\n-
85bool operator < (const Creference &r1, const Creference &r2);
\n+
85bool operator < (const Creference &r1, const Creference &r2);
\n
86
\n
87
\n
88//=============== inline material ================
\n
89
\n
90// equality test for two references
\n
91//----------------------------------
\n-
92inline bool operator == (const Creference &r1, const Creference &r2){
\n-
93 return (r1.ref[0]==r2.ref[0]) && (r1.ref[1]==r2.ref[1]) && (r1.ref[2]==r2.ref[2]);
\n+
92inline bool operator == (const Creference &r1, const Creference &r2){
\n+
93 return (r1.ref[0]==r2.ref[0]) && (r1.ref[1]==r2.ref[1]) && (r1.ref[2]==r2.ref[2]);
\n
94}
\n
95
\n
96// difference test for two references
\n
97//----------------------------------
\n
98inline bool operator != (const Creference &r1, const Creference &r2){
\n
99 return (r1.ref[0]!=r2.ref[0]) || (r1.ref[1]!=r2.ref[1]) || (r1.ref[2]!=r2.ref[2]);
\n
100}
\n@@ -146,14 +146,15 @@\n
unsigned int operator[](int i)
accessing the reference
Definition reference.h:70
\n
Creference()
default constructor
Definition reference.cpp:46
\n
void randomize()
create a random reference
Definition reference.cpp:54
\n
Creference & operator+=(const Creference &r)
incrementation of reference
\n
bool not_empty()
test non-emptyness
Definition reference.cpp:81
\n
Creference & operator-=(const Creference &r)
decrementation of reference
\n
unsigned int ref[3]
actual data for the reference
Definition reference.h:72
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n \n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -38,43 +38,43 @@\n 47\n 49 void _\br_\ba_\bn_\bd_\bo_\bm_\bi_\bz_\be();\n 50\n 52 bool _\bi_\bs_\b__\be_\bm_\bp_\bt_\by();\n 53\n 55 bool _\bn_\bo_\bt_\b__\be_\bm_\bp_\bt_\by();\n 56\n-58 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r);\n+58 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br);\n 59\n-61 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r);\n+61 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br);\n 62\n-64 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r);\n+64 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br);\n 65\n-67 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b-_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r);\n+67 _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b-_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br);\n 68\n _\b7_\b0 inline unsigned int _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b[_\b]_\b (int i) {return _\br_\be_\bf[i];}\n 71\n _\b7_\b2 unsigned int _\br_\be_\bf[3];\n 73};\n 74\n-76_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be operator + (_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r1, _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r2);\n+76_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b (_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b1, _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b2);\n 77\n-79bool operator == (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r1, const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r2);\n+79bool _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b=_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b1, const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b2);\n 80\n-82bool operator != (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r1, const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r2);\n+82bool _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b!_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b1, const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b2);\n 83\n-85bool operator < (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r1, const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r2);\n+85bool _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b<_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b1, const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b2);\n 86\n 87\n 88//=============== inline material ================\n 89\n 90// equality test for two references\n 91//----------------------------------\n-92inline bool operator == (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r1, const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &r2){\n-93 return (r1._\br_\be_\bf[0]==r2._\br_\be_\bf[0]) && (r1._\br_\be_\bf[1]==r2._\br_\be_\bf[1]) && (r1._\br_\be_\bf\n-[2]==r2._\br_\be_\bf[2]);\n+92inline bool _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b=_\b=_\b (const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b1, const _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be &_\br_\b2){\n+93 return (_\br_\b1.ref[0]==_\br_\b2.ref[0]) && (_\br_\b1.ref[1]==_\br_\b2.ref[1]) && (_\br_\b1.ref\n+[2]==_\br_\b2.ref[2]);\n 94}\n 95\n 96// difference test for two references\n 97//----------------------------------\n 98inline bool operator != (const Creference &r1, const Creference &r2){\n 99 return (r1.ref[0]!=r2.ref[0]) || (r1.ref[1]!=r2.ref[1]) || (r1.ref\n [2]!=r2.ref[2]);\n@@ -129,9 +129,13 @@\n Creference & operator-=(const Creference &r)\n decrementation of reference\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b._\bc_\bp_\bp_\b:_\b1_\b1_\b2\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b:_\b:_\br_\be_\bf\n unsigned int ref[3]\n actual data for the reference\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\br_\be_\bf_\be_\br_\be_\bn_\bc_\be_\b._\bh_\b:_\b7_\b2\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/siscone_8cpp_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/siscone_8cpp_source.html", "unified_diff": "@@ -111,15 +111,15 @@\n
\n \n
58 rerun_allowed = false;
\n
59}
\n
\n
60
\n
61bool Csiscone::init_done=false;
\n-
62std::ostream* Csiscone::_banner_ostr = &cout;
\n+
62std::ostream* Csiscone::_banner_ostr = &cout;
\n
63
\n
64/*
\n
65 * compute the jets from a given particle set doing multiple passes
\n
66 * such pass N looks for jets among all particles not put into jets
\n
67 * during previous passes.
\n
68 * - _particles list of particles
\n
69 * - _radius cone radius
\n@@ -129,76 +129,76 @@\n
73 * - _split_merge_scale the scale choice for the split-merge procedure
\n
74 * NOTE: using pt leads to IR unsafety for some events with momentum
\n
75 * conservation. So we strongly advise not to change the default
\n
76 * value.
\n
77 * return the number of jets found.
\n
78 **********************************************************************/
\n
\n-
79int Csiscone::compute_jets(vector<Cmomentum> &_particles, double _radius, double _f,
\n-
80 int _n_pass_max, double _ptmin,
\n-
81 Esplit_merge_scale _split_merge_scale){
\n+\n+
80 int _n_pass_max, double _ptmin,
\n+
81 Esplit_merge_scale _split_merge_scale){
\n
82 _initialise_if_needed();
\n
83
\n
84 // run some general safety tests (NB: f will be checked in split-merge)
\n-
85 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
\n-
86 ostringstream message;
\n-
87 message << "Illegal value for cone radius, R = " << _radius
\n+
85 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
\n+
86 ostringstream message;
\n+
87 message << "Illegal value for cone radius, R = " << _radius
\n
88 << " (legal values are 0<R<pi/2)";
\n
89 throw Csiscone_error(message.str());
\n
90 }
\n
91
\n
92
\n
93
\n-
94 ptcomparison.split_merge_scale = _split_merge_scale;
\n+\n
95 partial_clear(); // make sure some things are initialised properly
\n
96
\n
97 // init the split_merge algorithm with the initial list of particles
\n
98 // this initialises particle list p_left of remaining particles to deal with
\n-
99 init_particles(_particles);
\n+\n
100
\n-
101 bool finished = false;
\n+
101 bool finished = false;
\n
102
\n
103 rerun_allowed = false;
\n
104 protocones_list.clear();
\n
105
\n
106#ifdef DEBUG_STABLE_CONES
\n-
107 nb_hash_cones_total = 0;
\n-
108 nb_hash_occupied_total = 0;
\n+\n+\n
109#endif
\n
110
\n
111 do{
\n
112 // initialise stable_cone finder
\n
113 // here we use the list of remaining particles
\n
114 // AFTER COLLINEAR CLUSTERING !!!!!!
\n \n
116
\n
117 // get stable cones
\n-
118 if (get_stable_cones(_radius)){
\n+\n
119 // we have some new protocones; add them to candidates
\n
120 // Note that add_protocones has to be called first
\n
121 // if we want the 4-vect components to be available
\n
122 // on top of eta and phi.
\n-
123 add_protocones(&protocones, R2, _ptmin);
\n+\n
124 protocones_list.push_back(protocones);
\n
125#ifdef DEBUG_STABLE_CONES
\n-
126 nb_hash_cones_total += nb_hash_cones;
\n-
127 nb_hash_occupied_total += nb_hash_occupied;
\n+\n+\n
128#endif
\n
129 } else {
\n
130 // no new protocone: leave
\n-
131 finished=true;
\n+
131 finished=true;
\n
132 }
\n
133
\n-
134 _n_pass_max--;
\n-
135 } while ((!finished) && (n_left>0) && (_n_pass_max!=0));
\n+
134 _n_pass_max--;
\n+
135 } while ((!finished) && (n_left>0) && (_n_pass_max!=0));
\n
136
\n
137 rerun_allowed = true;
\n
138
\n
139 // split & merge
\n-
140 return perform(_f, _ptmin);
\n+
140 return perform(_f, _ptmin);
\n
141}
\n
\n
142
\n
143
\n
144/*
\n
145 * compute the jets from a given particle set doing multiple passes
\n
146 * such pass N looks for jets among all particles not put into jets
\n@@ -208,57 +208,57 @@\n
150 * - _n_pass_max maximum number of runs
\n
151 * - _ptmin minimum pT of the protojets
\n
152 * - _ordering_scale the ordering scale to decide which stable
\n
153 * cone is removed
\n
154 * return the number of jets found.
\n
155 **********************************************************************/
\n
\n-
156int Csiscone::compute_jets_progressive_removal(vector<Cmomentum> &_particles, double _radius,
\n-
157 int _n_pass_max, double _ptmin,
\n-
158 Esplit_merge_scale _ordering_scale){
\n+\n+
157 int _n_pass_max, double _ptmin,
\n+
158 Esplit_merge_scale _ordering_scale){
\n
159 _initialise_if_needed();
\n
160
\n
161 // run some general safety tests (NB: f will be checked in split-merge)
\n-
162 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
\n-
163 ostringstream message;
\n-
164 message << "Illegal value for cone radius, R = " << _radius
\n+
162 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
\n+
163 ostringstream message;
\n+
164 message << "Illegal value for cone radius, R = " << _radius
\n
165 << " (legal values are 0<R<pi/2)";
\n
166 throw Csiscone_error(message.str());
\n
167 }
\n
168
\n-
169 ptcomparison.split_merge_scale = _ordering_scale;
\n+\n
170 partial_clear(); // make sure some things are initialised properly
\n
171
\n
172 // init the split_merge algorithm with the initial list of particles
\n
173 // this initialises particle list p_left of remaining particles to deal with
\n
174 //
\n
175 // this stores the "processed" particles in p_uncol_hard
\n-
176 init_particles(_particles);
\n+\n
177 jets.clear();
\n
178
\n-
179 bool unclustered_left;
\n+
179 bool unclustered_left;
\n
180 rerun_allowed = false;
\n
181 protocones_list.clear();
\n
182
\n
183 do{
\n
184 //cout << n_left << " particle left" << endl;
\n
185
\n
186 // initialise stable_cone finder
\n
187 // here we use the list of remaining particles
\n
188 // AFTER COLLINEAR CLUSTERING !!!!!!
\n \n
190
\n
191 // get stable cones (stored in 'protocones')
\n-
192 unclustered_left = get_stable_cones(_radius);
\n+\n
193
\n
194 // add the hardest stable cone to the list of jets
\n-
195 if (add_hardest_protocone_to_jets(&protocones, R2, _ptmin)) break;
\n+\n
196
\n-
197 _n_pass_max--;
\n-
198 } while ((unclustered_left) && (n_left>0) && (_n_pass_max!=0));
\n+
197 _n_pass_max--;
\n+
198 } while ((unclustered_left) && (n_left>0) && (_n_pass_max!=0));
\n
199
\n
200 // split & merge
\n
201 return jets.size();
\n
202}
\n
\n
203
\n
204
\n@@ -270,32 +270,32 @@\n
210 * - _split_merge_scale the scale choice for the split-merge procedure
\n
211 * NOTE: using pt leads to IR unsafety for some events with momentum
\n
212 * conservation. So we strongly advise not to change the default
\n
213 * value.
\n
214 * return the number of jets found, -1 if recomputation not allowed.
\n
215 ********************************************************************/
\n
\n-
216int Csiscone::recompute_jets(double _f, double _ptmin,
\n-
217 Esplit_merge_scale _split_merge_scale){
\n+\n+
217 Esplit_merge_scale _split_merge_scale){
\n
218 if (!rerun_allowed)
\n
219 return -1;
\n
220
\n-
221 ptcomparison.split_merge_scale = _split_merge_scale;
\n+\n
222
\n
223 // restore particle list
\n \n
225 init_pleft();
\n
226
\n
227 // initialise split/merge algorithm
\n
228 unsigned int i;
\n
229 for (i=0;i<protocones_list.size();i++)
\n-
230 add_protocones(&(protocones_list[i]), R2, _ptmin);
\n+\n
231
\n
232 // split & merge
\n-
233 return perform(_f, _ptmin);
\n+
233 return perform(_f, _ptmin);
\n
234}
\n
\n
235
\n
236// ensure things are initialised
\n
237void Csiscone::_initialise_if_needed(){
\n
238 // initialise random number generator
\n
239 if (init_done) return;
\n@@ -304,32 +304,32 @@\n
242 ranlux_init();
\n
243
\n
244 // do not do this again
\n
245 init_done=true;
\n
246
\n
247 // print the banner
\n
248 if (_banner_ostr != 0){
\n-
249 ios::fmtflags flags_to_restore(_banner_ostr->flags());
\n+
249 ios::fmtflags flags_to_restore(_banner_ostr->flags());
\n
250
\n-
251 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
\n-
252 (*_banner_ostr) << "# SISCone version " << setw(28) << left << siscone_version() << "o" << endl;
\n-
253 (*_banner_ostr) << "# http://projects.hepforge.org/siscone o" << endl;
\n-
254 (*_banner_ostr) << "# o" << endl;
\n-
255 (*_banner_ostr) << "# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm o" << endl;
\n-
256 (*_banner_ostr) << "# SISCone was written by Gavin Salam and Gregory Soyez o" << endl;
\n-
257 (*_banner_ostr) << "# It is released under the terms of the GNU General Public License o" << endl;
\n-
258 (*_banner_ostr) << "# o" << endl;
\n-
259 (*_banner_ostr) << "# A description of the algorithm is available in the publication o" << endl;
\n-
260 (*_banner_ostr) << "# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o" << endl;
\n-
261 (*_banner_ostr) << "# Please cite it if you use SISCone. o" << endl;
\n-
262 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
\n-
263 (*_banner_ostr) << endl;
\n+
251 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
\n+
252 (*_banner_ostr) << "# SISCone version " << setw(28) << left << siscone_version() << "o" << endl;
\n+
253 (*_banner_ostr) << "# http://projects.hepforge.org/siscone o" << endl;
\n+
254 (*_banner_ostr) << "# o" << endl;
\n+
255 (*_banner_ostr) << "# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm o" << endl;
\n+
256 (*_banner_ostr) << "# SISCone was written by Gavin Salam and Gregory Soyez o" << endl;
\n+
257 (*_banner_ostr) << "# It is released under the terms of the GNU General Public License o" << endl;
\n+
258 (*_banner_ostr) << "# o" << endl;
\n+
259 (*_banner_ostr) << "# A description of the algorithm is available in the publication o" << endl;
\n+
260 (*_banner_ostr) << "# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o" << endl;
\n+
261 (*_banner_ostr) << "# Please cite it if you use SISCone. o" << endl;
\n+
262 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
\n+
263 (*_banner_ostr) << endl;
\n
264
\n
265 _banner_ostr->flush();
\n-
266 _banner_ostr->flags(flags_to_restore);
\n+
266 _banner_ostr->flags(flags_to_restore);
\n
267 }
\n
268}
\n
269
\n
270// finally, a bunch of functions to access to
\n
271// basic information (package name, version)
\n
272//---------------------------------------------
\n
273
\n@@ -373,14 +373,15 @@\n
std::vector< Cmomentum > p_uncol_hard
list of particles remaining with collinear clustering
\n
std::vector< Cjet > jets
list of jets
\n
int init_particles(std::vector< Cmomentum > &_particles)
initialisation function for particle list
\n
void init(std::vector< Cmomentum > &_particle_list)
initialisation
\n
std::vector< Cmomentum > protocones
list of stable cones
Definition protocones.h:109
\n
double R2
cone radius SQUARED
Definition protocones.h:125
\n
int get_stable_cones(double _radius)
compute stable cones.
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n \n \n \n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -58,15 +58,15 @@\n 55// default dtor\n 56//--------------\n _\b5_\b7_\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\b~_\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be(){\n 58 rerun_allowed = false;\n 59}\n 60\n 61bool _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bi_\bn_\bi_\bt_\b__\bd_\bo_\bn_\be=false;\n-62std::ostream* Csiscone::_banner_ostr = &cout;\n+62std::ostream* Csiscone::_banner_ostr = &_\bc_\bo_\bu_\bt;\n 63\n 64/*\n 65 * compute the jets from a given particle set doing multiple passes\n 66 * such pass N looks for jets among all particles not put into jets\n 67 * during previous passes.\n 68 * - _particles list of particles\n 69 * - _radius cone radius\n@@ -75,77 +75,77 @@\n 72 * - _ptmin minimum pT of the protojets\n 73 * - _split_merge_scale the scale choice for the split-merge procedure\n 74 * NOTE: using pt leads to IR unsafety for some events with momentum\n 75 * conservation. So we strongly advise not to change the default\n 76 * value.\n 77 * return the number of jets found.\n 78 **********************************************************************/\n-_\b7_\b9int _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs(vector &_particles, double _radius,\n-double _f,\n-80 int _n_pass_max, double _ptmin,\n-81 Esplit_merge_scale _split_merge_scale){\n+_\b7_\b9int _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs(_\bv_\be_\bc_\bt_\bo_\br_\b<_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b> &_\b__\bp_\ba_\br_\bt_\bi_\bc_\bl_\be_\bs, double _\b__\br_\ba_\bd_\bi_\bu_\bs,\n+double _\b__\bf,\n+80 int _\b__\bn_\b__\bp_\ba_\bs_\bs_\b__\bm_\ba_\bx, double _\b__\bp_\bt_\bm_\bi_\bn,\n+81 Esplit_merge_scale _\b__\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be_\b__\bs_\bc_\ba_\bl_\be){\n 82 _initialise_if_needed();\n 83\n 84 // run some general safety tests (NB: f will be checked in split-merge)\n-85 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {\n-86 ostringstream message;\n-87 message << \"Illegal value for cone radius, R = \" << _radius\n+85 if (_\b__\br_\ba_\bd_\bi_\bu_\bs_\b _\b<_\b=_\b _\b0_\b._\b0_\b _\b|_\b|_\b _\b__\br_\ba_\bd_\bi_\bu_\bs_\b _\b>= 0.5*M_PI) {\n+86 _\bo_\bs_\bt_\br_\bi_\bn_\bg_\bs_\bt_\br_\be_\ba_\bm message;\n+87 message << \"Illegal value for cone radius, R = \" << _\b__\br_\ba_\bd_\bi_\bu_\bs\n 88 << \" (legal values are 00) && (_n_pass_max!=0));\n+134 _\b__\bn_\b__\bp_\ba_\bs_\bs_\b__\bm_\ba_\bx--;\n+135 } while ((!_\bf_\bi_\bn_\bi_\bs_\bh_\be_\bd) && (_\bn_\b__\bl_\be_\bf_\bt>0) && (_\b__\bn_\b__\bp_\ba_\bs_\bs_\b__\bm_\ba_\bx!=0));\n 136\n 137 rerun_allowed = true;\n 138\n 139 // split & merge\n-140 return _\bp_\be_\br_\bf_\bo_\br_\bm(_f, _ptmin);\n+140 return _\bp_\be_\br_\bf_\bo_\br_\bm(_\b__\bf, _\b__\bp_\bt_\bm_\bi_\bn);\n 141}\n 142\n 143\n 144/*\n 145 * compute the jets from a given particle set doing multiple passes\n 146 * such pass N looks for jets among all particles not put into jets\n 147 * during previous passes.\n@@ -153,59 +153,59 @@\n 149 * - _radius cone radius\n 150 * - _n_pass_max maximum number of runs\n 151 * - _ptmin minimum pT of the protojets\n 152 * - _ordering_scale the ordering scale to decide which stable\n 153 * cone is removed\n 154 * return the number of jets found.\n 155 **********************************************************************/\n-_\b1_\b5_\b6int _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs_\b__\bp_\br_\bo_\bg_\br_\be_\bs_\bs_\bi_\bv_\be_\b__\br_\be_\bm_\bo_\bv_\ba_\bl(vector\n-&_particles, double _radius,\n-157 int _n_pass_max, double _ptmin,\n-158 Esplit_merge_scale _ordering_scale){\n+_\b1_\b5_\b6int _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs_\b__\bp_\br_\bo_\bg_\br_\be_\bs_\bs_\bi_\bv_\be_\b__\br_\be_\bm_\bo_\bv_\ba_\bl(_\bv_\be_\bc_\bt_\bo_\br_\b<_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b>\n+&_\b__\bp_\ba_\br_\bt_\bi_\bc_\bl_\be_\bs, double _\b__\br_\ba_\bd_\bi_\bu_\bs,\n+157 int _\b__\bn_\b__\bp_\ba_\bs_\bs_\b__\bm_\ba_\bx, double _\b__\bp_\bt_\bm_\bi_\bn,\n+158 Esplit_merge_scale _\b__\bo_\br_\bd_\be_\br_\bi_\bn_\bg_\b__\bs_\bc_\ba_\bl_\be){\n 159 _initialise_if_needed();\n 160\n 161 // run some general safety tests (NB: f will be checked in split-merge)\n-162 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {\n-163 ostringstream message;\n-164 message << \"Illegal value for cone radius, R = \" << _radius\n+162 if (_\b__\br_\ba_\bd_\bi_\bu_\bs_\b _\b<_\b=_\b _\b0_\b._\b0_\b _\b|_\b|_\b _\b__\br_\ba_\bd_\bi_\bu_\bs_\b _\b>= 0.5*M_PI) {\n+163 _\bo_\bs_\bt_\br_\bi_\bn_\bg_\bs_\bt_\br_\be_\ba_\bm message;\n+164 message << \"Illegal value for cone radius, R = \" << _\b__\br_\ba_\bd_\bi_\bu_\bs\n 165 << \" (legal values are 00) && (_n_pass_max!=0));\n+197 _\b__\bn_\b__\bp_\ba_\bs_\bs_\b__\bm_\ba_\bx--;\n+198 } while ((_\bu_\bn_\bc_\bl_\bu_\bs_\bt_\be_\br_\be_\bd_\b__\bl_\be_\bf_\bt) && (_\bn_\b__\bl_\be_\bf_\bt>0) && (_\b__\bn_\b__\bp_\ba_\bs_\bs_\b__\bm_\ba_\bx!=0));\n 199\n 200 // split & merge\n 201 return _\bj_\be_\bt_\bs.size();\n 202}\n 203\n 204\n 205/*\n@@ -215,32 +215,32 @@\n 209 * - _ptmin minimum pT of the protojets\n 210 * - _split_merge_scale the scale choice for the split-merge procedure\n 211 * NOTE: using pt leads to IR unsafety for some events with momentum\n 212 * conservation. So we strongly advise not to change the default\n 213 * value.\n 214 * return the number of jets found, -1 if recomputation not allowed.\n 215 ********************************************************************/\n-_\b2_\b1_\b6int _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\br_\be_\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs(double _f, double _ptmin,\n-217 Esplit_merge_scale _split_merge_scale){\n+_\b2_\b1_\b6int _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\br_\be_\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs(double _\b__\bf, double _\b__\bp_\bt_\bm_\bi_\bn,\n+217 Esplit_merge_scale _\b__\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be_\b__\bs_\bc_\ba_\bl_\be){\n 218 if (!rerun_allowed)\n 219 return -1;\n 220\n-221 _\bp_\bt_\bc_\bo_\bm_\bp_\ba_\br_\bi_\bs_\bo_\bn._\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be_\b__\bs_\bc_\ba_\bl_\be = _split_merge_scale;\n+221 _\bp_\bt_\bc_\bo_\bm_\bp_\ba_\br_\bi_\bs_\bo_\bn._\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be_\b__\bs_\bc_\ba_\bl_\be = _\b__\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be_\b__\bs_\bc_\ba_\bl_\be;\n 222\n 223 // restore particle list\n 224 _\bp_\ba_\br_\bt_\bi_\ba_\bl_\b__\bc_\bl_\be_\ba_\br();\n 225 _\bi_\bn_\bi_\bt_\b__\bp_\bl_\be_\bf_\bt();\n 226\n 227 // initialise split/merge algorithm\n 228 unsigned int i;\n 229 for (i=0;i<_\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs_\b__\bl_\bi_\bs_\bt.size();i++)\n-230 _\ba_\bd_\bd_\b__\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs(&(_\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs_\b__\bl_\bi_\bs_\bt[i]), _\bR_\b2, _ptmin);\n+230 _\ba_\bd_\bd_\b__\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs(&(_\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs_\b__\bl_\bi_\bs_\bt[i]), _\bR_\b2, _\b__\bp_\bt_\bm_\bi_\bn);\n 231\n 232 // split & merge\n-233 return _\bp_\be_\br_\bf_\bo_\br_\bm(_f, _ptmin);\n+233 return _\bp_\be_\br_\bf_\bo_\br_\bm(_\b__\bf, _\b__\bp_\bt_\bm_\bi_\bn);\n 234}\n 235\n 236// ensure things are initialised\n 237void Csiscone::_initialise_if_needed(){\n 238 // initialise random number generator\n 239 if (_\bi_\bn_\bi_\bt_\b__\bd_\bo_\bn_\be) return;\n 240\n@@ -248,40 +248,40 @@\n 242 ranlux_init();\n 243\n 244 // do not do this again\n 245 _\bi_\bn_\bi_\bt_\b__\bd_\bo_\bn_\be=true;\n 246\n 247 // print the banner\n 248 if (_banner_ostr != 0){\n-249 ios::fmtflags flags_to_restore(_banner_ostr->flags());\n+249 ios::fmtflags _\bf_\bl_\ba_\bg_\bs_\b__\bt_\bo_\b__\br_\be_\bs_\bt_\bo_\br_\be(_banner_ostr->flags());\n 250\n 251 (*_banner_ostr) <<\n-\"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" << endl;\n-252 (*_banner_ostr) << \"# SISCone version \" << setw(28) << left <<\n-siscone_version() << \"o\" << endl;\n-253 (*_banner_ostr) << \"# http://projects.hepforge.org/siscone o\" << endl;\n-254 (*_banner_ostr) << \"# o\" << endl;\n+\"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" << _\be_\bn_\bd_\bl;\n+252 (*_banner_ostr) << \"# SISCone version \" << _\bs_\be_\bt_\bw(28) << _\bl_\be_\bf_\bt <<\n+siscone_version() << \"o\" << _\be_\bn_\bd_\bl;\n+253 (*_banner_ostr) << \"# http://projects.hepforge.org/siscone o\" << _\be_\bn_\bd_\bl;\n+254 (*_banner_ostr) << \"# o\" << _\be_\bn_\bd_\bl;\n 255 (*_banner_ostr) << \"# This is SISCone: the Seedless Infrared Safe Cone Jet\n-Algorithm o\" << endl;\n+Algorithm o\" << _\be_\bn_\bd_\bl;\n 256 (*_banner_ostr) << \"# SISCone was written by Gavin Salam and Gregory Soyez\n-o\" << endl;\n+o\" << _\be_\bn_\bd_\bl;\n 257 (*_banner_ostr) << \"# It is released under the terms of the GNU General\n-Public License o\" << endl;\n-258 (*_banner_ostr) << \"# o\" << endl;\n+Public License o\" << _\be_\bn_\bd_\bl;\n+258 (*_banner_ostr) << \"# o\" << _\be_\bn_\bd_\bl;\n 259 (*_banner_ostr) << \"# A description of the algorithm is available in the\n-publication o\" << endl;\n+publication o\" << _\be_\bn_\bd_\bl;\n 260 (*_banner_ostr) << \"# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o\" <<\n-endl;\n-261 (*_banner_ostr) << \"# Please cite it if you use SISCone. o\" << endl;\n+_\be_\bn_\bd_\bl;\n+261 (*_banner_ostr) << \"# Please cite it if you use SISCone. o\" << _\be_\bn_\bd_\bl;\n 262 (*_banner_ostr) <<\n-\"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" << endl;\n-263 (*_banner_ostr) << endl;\n+\"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" << _\be_\bn_\bd_\bl;\n+263 (*_banner_ostr) << _\be_\bn_\bd_\bl;\n 264\n 265 _banner_ostr->flush();\n-266 _banner_ostr->flags(flags_to_restore);\n+266 _banner_ostr->flags(_\bf_\bl_\ba_\bg_\bs_\b__\bt_\bo_\b__\br_\be_\bs_\bt_\bo_\br_\be);\n 267 }\n 268}\n 269\n 270// finally, a bunch of functions to access to\n 271// basic information (package name, version)\n 272//---------------------------------------------\n 273\n@@ -403,11 +403,15 @@\n double R2\n cone radius SQUARED\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs_\b._\bh_\b:_\b1_\b2_\b5\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bg_\be_\bt_\b__\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs\n int get_stable_cones(double _radius)\n compute stable cones.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs_\b._\bc_\bp_\bp_\b:_\b1_\b4_\b1\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n _\bd_\be_\bf_\bi_\bn_\be_\bs_\b._\bh\n _\br_\ba_\bn_\bl_\bu_\bx_\b._\bh\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/siscone_8h_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/siscone_8h_source.html", "unified_diff": "@@ -87,35 +87,35 @@\n
\n
48class Csiscone : public Cstable_cones, public Csplit_merge{
\n
49 public:
\n
51 Csiscone();
\n
52
\n
54 ~Csiscone();
\n
55
\n-
76 int compute_jets(std::vector<Cmomentum> &_particles, double _radius, double _f,
\n-
77 int _n_pass_max=0, double _ptmin=0.0,
\n-
78 Esplit_merge_scale _split_merge_scale=SM_pttilde);
\n+
76 int compute_jets(std::vector<Cmomentum> &_particles, double _radius, double _f,
\n+
77 int _n_pass_max=0, double _ptmin=0.0,
\n+
78 Esplit_merge_scale _split_merge_scale=SM_pttilde);
\n
79
\n-
97 int compute_jets_progressive_removal(std::vector<Cmomentum> &_particles, double _radius,
\n-
98 int _n_pass_max=0, double _ptmin=0.0,
\n-
99 Esplit_merge_scale _ordering_scale=SM_pttilde);
\n+
97 int compute_jets_progressive_removal(std::vector<Cmomentum> &_particles, double _radius,
\n+
98 int _n_pass_max=0, double _ptmin=0.0,
\n+
99 Esplit_merge_scale _ordering_scale=SM_pttilde);
\n
100
\n-
113 int recompute_jets(double _f, double _ptmin = 0.0,
\n-
114 Esplit_merge_scale _split_merge_scale=SM_pttilde);
\n+
113 int recompute_jets(double _f, double _ptmin = 0.0,
\n+
114 Esplit_merge_scale _split_merge_scale=SM_pttilde);
\n
115
\n
117 std::vector<std::vector<Cmomentum> > protocones_list;
\n
118
\n
119 // random number initialisation
\n
120 static bool init_done;
\n
121
\n
122#ifdef DEBUG_STABLE_CONES
\n-
123 int nb_hash_cones_total, nb_hash_occupied_total;
\n+\n
124#endif
\n
125
\n-
137 static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}
\n+
137 static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}
\n
138
\n
143 static std::ostream * banner_stream() {return _banner_ostr;}
\n
144
\n
145 private:
\n
146 bool rerun_allowed;
\n
147 static std::ostream * _banner_ostr;
\n
148
\n@@ -143,14 +143,15 @@\n
int compute_jets_progressive_removal(std::vector< Cmomentum > &_particles, double _radius, int _n_pass_max=0, double _ptmin=0.0, Esplit_merge_scale _ordering_scale=SM_pttilde)
compute the jets from a given particle set.
Definition siscone.cpp:156
\n
static bool init_done
check random generator initialisation
Definition siscone.h:120
\n
static void set_banner_stream(std::ostream *ostr)
A call to this function modifies the stream used to print banners (by default cout).
Definition siscone.h:137
\n
static std::ostream * banner_stream()
returns a pointer to the stream to be used to print banners (cout by default)
Definition siscone.h:143
\n
Csiscone()
default ctor
Definition siscone.cpp:51
\n
Class used to split and merge jets.
\n
Computes the list of stable comes from a particle list.
Definition protocones.h:82
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n
\n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -37,37 +37,37 @@\n 35\n _\b4_\b8class _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be : public _\bC_\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs, public _\bC_\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be{\n 49 public:\n 51 _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be();\n 52\n 54 _\b~_\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be();\n 55\n-76 int _\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs(std::vector &_particles, double _radius, double\n-_f,\n-77 int _n_pass_max=0, double _ptmin=0.0,\n-78 Esplit_merge_scale _split_merge_scale=SM_pttilde);\n+76 int _\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs(std::vector &_\b__\bp_\ba_\br_\bt_\bi_\bc_\bl_\be_\bs, double _\b__\br_\ba_\bd_\bi_\bu_\bs, double\n+_\b__\bf,\n+77 int _\b__\bn_\b__\bp_\ba_\bs_\bs_\b__\bm_\ba_\bx=0, double _\b__\bp_\bt_\bm_\bi_\bn=0.0,\n+78 Esplit_merge_scale _\b__\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be_\b__\bs_\bc_\ba_\bl_\be=SM_pttilde);\n 79\n-97 int _\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs_\b__\bp_\br_\bo_\bg_\br_\be_\bs_\bs_\bi_\bv_\be_\b__\br_\be_\bm_\bo_\bv_\ba_\bl(std::vector &_particles,\n-double _radius,\n-98 int _n_pass_max=0, double _ptmin=0.0,\n-99 Esplit_merge_scale _ordering_scale=SM_pttilde);\n+97 int _\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs_\b__\bp_\br_\bo_\bg_\br_\be_\bs_\bs_\bi_\bv_\be_\b__\br_\be_\bm_\bo_\bv_\ba_\bl(std::vector &_\b__\bp_\ba_\br_\bt_\bi_\bc_\bl_\be_\bs,\n+double _\b__\br_\ba_\bd_\bi_\bu_\bs,\n+98 int _\b__\bn_\b__\bp_\ba_\bs_\bs_\b__\bm_\ba_\bx=0, double _\b__\bp_\bt_\bm_\bi_\bn=0.0,\n+99 Esplit_merge_scale _\b__\bo_\br_\bd_\be_\br_\bi_\bn_\bg_\b__\bs_\bc_\ba_\bl_\be=SM_pttilde);\n 100\n-113 int _\br_\be_\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs(double _f, double _ptmin = 0.0,\n-114 Esplit_merge_scale _split_merge_scale=SM_pttilde);\n+113 int _\br_\be_\bc_\bo_\bm_\bp_\bu_\bt_\be_\b__\bj_\be_\bt_\bs(double _\b__\bf, double _\b__\bp_\bt_\bm_\bi_\bn = 0.0,\n+114 Esplit_merge_scale _\b__\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be_\b__\bs_\bc_\ba_\bl_\be=SM_pttilde);\n 115\n _\b1_\b1_\b7 std::vector > _\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs_\b__\bl_\bi_\bs_\bt;\n 118\n 119 // random number initialisation\n _\b1_\b2_\b0 static bool _\bi_\bn_\bi_\bt_\b__\bd_\bo_\bn_\be;\n 121\n 122#ifdef DEBUG_STABLE_CONES\n-123 int nb_hash_cones_total, nb_hash_occupied_total;\n+123 int _\bn_\bb_\b__\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b__\bt_\bo_\bt_\ba_\bl, _\bn_\bb_\b__\bh_\ba_\bs_\bh_\b__\bo_\bc_\bc_\bu_\bp_\bi_\be_\bd_\b__\bt_\bo_\bt_\ba_\bl;\n 124#endif\n 125\n-_\b1_\b3_\b7 static void _\bs_\be_\bt_\b__\bb_\ba_\bn_\bn_\be_\br_\b__\bs_\bt_\br_\be_\ba_\bm(std::ostream * ostr) {_banner_ostr = ostr;}\n+_\b1_\b3_\b7 static void _\bs_\be_\bt_\b__\bb_\ba_\bn_\bn_\be_\br_\b__\bs_\bt_\br_\be_\ba_\bm(std::ostream * _\bo_\bs_\bt_\br) {_banner_ostr = _\bo_\bs_\bt_\br;}\n 138\n _\b1_\b4_\b3 static std::ostream * _\bb_\ba_\bn_\bn_\be_\br_\b__\bs_\bt_\br_\be_\ba_\bm() {return _banner_ostr;}\n 144\n 145 private:\n 146 bool rerun_allowed;\n 147 static std::ostream * _banner_ostr;\n 148\n@@ -134,9 +134,13 @@\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b._\bc_\bp_\bp_\b:_\b5_\b1\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be\n Class used to split and merge jets.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bs_\bp_\bl_\bi_\bt_\b__\bm_\be_\br_\bg_\be_\b._\bh_\b:_\b1_\b8_\b0\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bs_\bt_\ba_\bb_\bl_\be_\b__\bc_\bo_\bn_\be_\bs\n Computes the list of stable comes from a particle list.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bp_\br_\bo_\bt_\bo_\bc_\bo_\bn_\be_\bs_\b._\bh_\b:_\b8_\b2\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8h_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8h_source.html", "unified_diff": "@@ -86,25 +86,25 @@\n
35
\n
\n \n
39public:
\n \n
42
\n
\n-
45 Csiscone_error(const std::string & message_in) {
\n-
46 m_message = message_in;
\n-
47 if (m_print_errors) std::cerr << "siscone::Csiscone_error: "<< message_in << std::endl;
\n+
45 Csiscone_error(const std::string & message_in) {
\n+
46 m_message = message_in;
\n+
47 if (m_print_errors) std::cerr << "siscone::Csiscone_error: "<< message_in << std::endl;
\n
48 };
\n
\n
49
\n
51 std::string message() const {return m_message;};
\n
52
\n
\n-
55 static void setm_print_errors(bool print_errors) {
\n-
56 m_print_errors = print_errors;};
\n+
55 static void setm_print_errors(bool print_errors) {
\n+
56 m_print_errors = print_errors;};
\n
\n
57
\n
58private:
\n
59 std::string m_message;
\n
60 static bool m_print_errors;
\n
61};
\n
\n@@ -112,14 +112,15 @@\n
63}
\n
64#endif
\n
class corresponding to errors that will be thrown by siscone
\n
Csiscone_error()
default ctor
\n
Csiscone_error(const std::string &message_in)
ctor with a given error message
\n
std::string message() const
access to the error message
\n
static void setm_print_errors(bool print_errors)
switch on/off the error message printing
\n+
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
\n \n \n
\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -35,24 +35,24 @@\n 33\n 34namespace siscone{\n 35\n _\b3_\b8class _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b__\be_\br_\br_\bo_\br {\n 39public:\n _\b4_\b1 _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b__\be_\br_\br_\bo_\br() {;};\n 42\n-_\b4_\b5 _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b__\be_\br_\br_\bo_\br(const std::string & message_in) {\n-46 m_message = message_in;\n-47 if (m_print_errors) std::cerr << \"siscone::Csiscone_error: \"<< message_in <<\n+_\b4_\b5 _\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b__\be_\br_\br_\bo_\br(const std::string & _\bm_\be_\bs_\bs_\ba_\bg_\be_\b__\bi_\bn) {\n+46 m_message = _\bm_\be_\bs_\bs_\ba_\bg_\be_\b__\bi_\bn;\n+47 if (m_print_errors) std::cerr << \"siscone::Csiscone_error: \"<< _\bm_\be_\bs_\bs_\ba_\bg_\be_\b__\bi_\bn <<\n std::endl;\n 48 };\n 49\n _\b5_\b1 std::string _\bm_\be_\bs_\bs_\ba_\bg_\be() const {return m_message;};\n 52\n-_\b5_\b5 static void _\bs_\be_\bt_\bm_\b__\bp_\br_\bi_\bn_\bt_\b__\be_\br_\br_\bo_\br_\bs(bool print_errors) {\n-56 m_print_errors = print_errors;};\n+_\b5_\b5 static void _\bs_\be_\bt_\bm_\b__\bp_\br_\bi_\bn_\bt_\b__\be_\br_\br_\bo_\br_\bs(bool _\bp_\br_\bi_\bn_\bt_\b__\be_\br_\br_\bo_\br_\bs) {\n+56 m_print_errors = _\bp_\br_\bi_\bn_\bt_\b__\be_\br_\br_\bo_\br_\bs;};\n 57\n 58private:\n 59 std::string m_message;\n 60 static bool m_print_errors;\n 61};\n 62\n 63}\n@@ -72,9 +72,13 @@\n std::string message() const\n access to the error message\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b__\be_\br_\br_\bo_\br_\b._\bh_\b:_\b5_\b1\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b__\be_\br_\br_\bo_\br_\b:_\b:_\bs_\be_\bt_\bm_\b__\bp_\br_\bi_\bn_\bt_\b__\be_\br_\br_\bo_\br_\bs\n static void setm_print_errors(bool print_errors)\n switch on/off the error message printing\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b__\be_\br_\br_\bo_\br_\b._\bh_\b:_\b5_\b5\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br\n+a circulator that is foreseen to take as template member either a pointer or an\n+iterator;\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bc_\bi_\br_\bc_\bu_\bl_\ba_\bt_\bo_\br_\b._\bh_\b:_\b3_\b6\n ===============================================================================\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}]}]}]}, {"source1": "siscone-doc-pdf_3.0.5-2_all.deb", "source2": "siscone-doc-pdf_3.0.5-2_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2023-01-10 17:32:40.000000 debian-binary\n -rw-r--r-- 0 0 0 808 2023-01-10 17:32:40.000000 control.tar.xz\n--rw-r--r-- 0 0 0 1608316 2023-01-10 17:32:40.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 1609080 2023-01-10 17:32:40.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -3,10 +3,10 @@\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-10 17:32:40.000000 ./usr/share/\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-10 17:32:40.000000 ./usr/share/doc/\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-pdf/\n -rw-r--r-- 0 root (0) root (0) 1125 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-pdf/changelog.Debian.gz\n -rw-r--r-- 0 root (0) root (0) 16688 2020-04-24 08:56:01.000000 ./usr/share/doc/siscone-doc-pdf/changelog.gz\n -rw-r--r-- 0 root (0) root (0) 1151 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-pdf/copyright\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-pdf/pdf/\n--rw-r--r-- 0 root (0) root (0) 1592488 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz\n+-rw-r--r-- 0 root (0) root (0) 1592838 2023-01-10 17:32:40.000000 ./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-10 17:32:40.000000 ./usr/share/doc-base/\n -rw-r--r-- 0 root (0) root (0) 240 2023-01-10 17:32:40.000000 ./usr/share/doc-base/siscone-doc-pdf.siscone-pdf\n"}, {"source1": "./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz", "source2": "./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz", "unified_diff": null, "details": [{"source1": "refman.pdf", "source2": "refman.pdf", "unified_diff": null, "details": [{"source1": "pdftotext {} -", "source2": "pdftotext {} -", "unified_diff": "@@ -1661,35 +1661,35 @@\n 4.37.2.1 centre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174\n 4.37.2.2 is_stable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174\n 4.37.2.3 next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174\n 5 File Documentation\n \n 175\n \n-5.1 main.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175\n-5.2 options.cpp\n+5.1 area.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175\n+5.2 area.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176\n+5.3 main.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180\n+5.4 options.cpp\n \n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182\n \n-5.3 options.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179\n-5.4 sample.cpp\n+5.5 options.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185\n+5.6 sample.cpp\n \n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185\n \n-5.5 spherical.cpp\n+5.7 spherical.cpp\n \n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187\n \n-5.6 test.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182\n-5.7 times.cpp\n+5.8 test.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188\n+5.9 times.cpp\n \n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189\n \n-5.8 area.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185\n-5.9 area.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187\n 5.10 area.h\n \n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191\n \n 5.11 circulator.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n@@ -1711,64 +1711,64 @@\n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197\n \n 5.14.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197\n 5.14.2.1 twopi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197\n 5.15 defines.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197\n 5.16 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198\n 5.17 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200\n-5.18 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202\n-5.19 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203\n-5.20 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204\n-5.21 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206\n-5.22 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208\n-5.23 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210\n-5.24 quadtree.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212\n-5.25 quadtree.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215\n-5.26 ranlux.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216\n-5.27 siscone/ranlux.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218\n-5.27.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219\n-5.27.1.1 ranlux_get() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219\n-5.27.1.2 ranlux_init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219\n-5.27.1.3 ranlux_print_state() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219\n-5.28 ranlux.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219\n-5.29 reference.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220\n-5.30 reference.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221\n-5.31 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222\n-5.32 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226\n-5.33 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229\n-5.34 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230\n-5.35 siscone_error.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231\n-5.36 siscone_error.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232\n-5.37 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233\n-5.38 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235\n-5.39 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238\n-5.40 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239\n-5.41 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239\n-5.42 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241\n+5.18 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202\n+5.19 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205\n+5.20 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207\n+5.21 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208\n+5.22 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209\n+5.23 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211\n+5.24 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214\n+5.25 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216\n+5.26 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218\n+5.27 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227\n+5.28 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237\n+5.29 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239\n+5.30 quadtree.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241\n+5.31 quadtree.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245\n+5.32 ranlux.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245\n+5.33 siscone/ranlux.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247\n+5.33.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248\n+5.33.1.1 ranlux_get() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248\n+5.33.1.2 ranlux_init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248\n+5.33.1.3 ranlux_print_state() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248\n+5.34 ranlux.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249\n+5.35 reference.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249\n+5.36 reference.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251\n+5.37 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252\n+5.38 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255\n+5.39 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259\n+5.40 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260\n+5.41 siscone_error.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261\n+5.42 siscone_error.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n \fxvi\n \n-5.43 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245\n-5.44 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254\n+5.43 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262\n+5.44 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263\n 5.45 split_merge.cpp\n \n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264\n \n 5.46 split_merge.cpp\n \n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278\n \n-5.47 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291\n+5.47 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292\n 5.48 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294\n-5.49 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297\n-5.50 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298\n-5.51 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299\n-5.52 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303\n+5.49 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297\n+5.50 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300\n+5.51 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304\n+5.52 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305\n Index\n \n 307\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n \fChapter 1\n@@ -2026,49 +2026,49 @@\n siscone/siscone_error.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/siscone_error.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/split_merge.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n-185\n 175\n-176\n-179\n 180\n-181\n 182\n-184\n+185\n+185\n 187\n+188\n+189\n+176\n 191\n 192\n 193\n 194\n 195\n 198\n+262\n 202\n-233\n-238\n-239\n-204\n-245\n-208\n-212\n-215\n-216\n+207\n+209\n+214\n 218\n-220\n-221\n-222\n-229\n-231\n-232\n+237\n+241\n+245\n+245\n+247\n+249\n+251\n+252\n+259\n+261\n+261\n 278\n 294\n-303\n+300\n \n \f6\n \n File Index\n \n siscone/vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/spherical/geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n@@ -2082,29 +2082,29 @@\n siscone/spherical/siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/spherical/siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/spherical/split_merge.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/spherical/split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/spherical/vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/spherical/vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n \n-298\n+305\n 200\n-203\n-235\n+263\n+205\n+208\n+211\n+216\n+227\n 239\n-241\n-206\n-254\n-210\n-226\n-230\n+255\n+260\n 264\n-291\n-299\n+292\n 297\n+304\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n \fChapter 4\n \n Class Documentation\n \n@@ -10978,15 +10978,15 @@\n \u2022 siscone/spherical/hash.h\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n \fChapter 5\n \n File Documentation\n-5.1 main.cpp\n+5.1 area.cpp\n 00001\n 00002 // File: main.cpp\n //\n 00003 // Description: main program that runs siscone from the command line\n //\n 00004 // This file is part of the SISCone project.\n //\n@@ -11021,14 +11021,846 @@\n 00019 // You should have received a copy of the GNU General Public License\n //\n 00020 // along with this program; if not, write to the Free Software\n //\n 00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n 00022 //\n //\n+00023 // $Revision:: 171\n+$//\n+00024 // $Date:: 2007-06-19 10:26:05 -0400 (Tue, 19 Jun 2007)\n+$//\n+00026\n+00027 #include \n+00028 #include \n+00029 #include \n+00030 #include \"siscone/momentum.h\"\n+00031 #include \"siscone/siscone.h\"\n+00032 #include \"siscone/area.h\"\n+00033 #include \"options.h\"\n+00034\n+00035 using namespace std;\n+00036 using namespace siscone;\n+00037\n+00038 int main(int argc, char *argv[]){\n+00039\n+vector particles;\n+00040\n+Carea siscone_with_area;\n+int i,N;\n+00041\n+00042\n+double px,py,pz,E;\n+00043\n+Coptions opts;\n+char fline[512];\n+00044\n+00045\n+if (opts.parse_options(argc, argv))\n+00046\n+00047\n+exit(1);\n+00048\n+00049\n+// deal with help message\n+00050\n+if (opts.help_flag){\n+00051\n+opts.print_help();\n+00052\n+exit(0);\n+00053\n+}\n+00054\n+00055\n+// deal with version flag\n+00056\n+if (opts.version_flag){\n+00057\n+opts.print_version();\n+00058\n+exit(0);\n+00059\n+}\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f176\n+\n+File Documentation\n+\n+00060\n+// various files used to read input data and store results\n+00061\n+00062\n+FILE *flux;\n+00063\n+FILE *fpart;\n+00064\n+00065\n+// read particles\n+00066\n+if (opts.verbose_flag) cout \u00ab \"reading particles\" \u00ab endl;\n+00067\n+flux = fopen(opts.ev_name, \"r\");\n+if (flux==NULL){\n+00068\n+00069\n+cerr \u00ab \"cannot read event\" \u00ab endl;\n+00070\n+return 1;\n+00071\n+}\n+00072\n+00073\n+N=0;\n+00074\n+fpart = fopen(\"particles.dat\", \"w+\");\n+while ((opts.N_stop!=0) && (fgets(fline, 512, flux)!=NULL)){\n+00075\n+00076\n+if (fline[0]!=\u2019#\u2019){ // skip lines beginning with \u2019#\u2019\n+00077\n+if (sscanf(fline, \"%le%le%le%le\", &px, &py, &pz, &E)==4){\n+00078\n+particles.push_back(Cmomentum(px, py, pz, E));\n+particles[N].eta, particles[N].phi);\n+00079\n+fprintf(fpart, \"%e\\t%e\\n\",\n+00080\n+N++;\n+00081\n+opts.N_stop--;\n+00082\n+} else {\n+00083\n+cout \u00ab \"error in reading event file Giving up.\" \u00ab endl;\n+00084\n+fclose(flux);\n+00085\n+fclose(fpart);\n+00086\n+exit(2);\n+00087\n+}\n+00088\n+}\n+00089\n+}\n+00090\n+fclose(flux);\n+00091\n+fclose(fpart);\n+if (opts.verbose_flag)\n+00092\n+00093\n+cout \u00ab \" working with \" \u00ab N \u00ab \" particles\" \u00ab endl;\n+00094\n+// compute jets\n+00095\n+00096\n+if (opts.verbose_flag) cout \u00ab \"computing jet contents\" \u00ab endl;\n+00097\n+i=siscone_with_area.compute_areas(particles, opts.R, opts.f, opts.npass, opts.SM_var);\n+if (opts.verbose_flag){\n+00098\n+unsigned int pass;\n+00099\n+00100\n+for (pass=0;pass::iterator ja;\n+for (ja=siscone_with_area.jet_areas.begin();ja!=siscone_with_area.jet_areas.end();ja++){\n+00111\n+00112\n+fprintf(flux, \"%e\\t%e\\t%e\\t%e\\t%e\\n\",\n+00113\n+ja->v.perp(), ja->v.eta, ja->v.phi,\n+00114\n+ja->active_area, ja->passive_area);\n+00115\n+}\n+00116\n+00117\n+fclose(flux);\n+00118\n+if (opts.verbose_flag)\n+00119\n+00120\n+cout \u00ab \"bye...\" \u00ab endl;\n+00121\n+return 0;\n+00122\n+00123 }\n+\n+5.2 area.cpp\n+00001 // -*- C++ -*00003 // File: area.h\n+00004 // Description: header file for the computation of jet area\n+00005 // This file is part of the SISCone project.\n+00006 // For more details, see http://projects.hepforge.org/siscone\n+00007 //\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+00009 //\n+00010 // This program is free software; you can redistribute it and/or modify\n+00011 // it under the terms of the GNU General Public License as published by\n+00012 // the Free Software Foundation; either version 2 of the License, or\n+00013 // (at your option) any later version.\n+00014 //\n+00015 // This program is distributed in the hope that it will be useful,\n+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.2 area.cpp\n+\n+00018 // GNU General Public License for more details.\n+//\n+00019 //\n+//\n+00020 // You should have received a copy of the GNU General Public License\n+//\n+00021 // along with this program; if not, write to the Free Software\n+//\n+00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00023 //\n+//\n+00024 // $Revision:: 149\n+$//\n+00025 // $Date:: 2007-03-15 00:13:58 +0100 (Thu, 15 Mar 2007)\n+$//\n+00027\n+00028 #include \"area.h\"\n+00029 #include \"momentum.h\"\n+00030 #include \n+00031 #include \n+00032\n+00033 namespace siscone{\n+00034 using namespace std;\n+00035\n+00036 /*******************************************************\n+00037 * Cjet_area implementation\n+*\n+00038 * real Jet information, including its area(s)\n+*\n+00039 *\n+*\n+00040 * This class contains information for one single jet. *\n+00041 * That is, first, its momentum carrying information\n+*\n+00042 * about its centre and pT, and second, its particle\n+*\n+00043 * contents (from CJeT).\n+*\n+00044 * Compared to the Cjet class, it also includes the\n+*\n+00045 * passive and active areas of the jet computed using *\n+00046 * the Carea class.\n+*\n+00047 *******************************************************/\n+00048\n+00049 // default ctor\n+00050 //-------------00051 Cjet_area::Cjet_area(){\n+00052\n+active_area = passive_area = 0.0;\n+00053 }\n+00054\n+00055 // jet-initiated ctor\n+00056 //------------------00057 Cjet_area::Cjet_area(Cjet &j){\n+00058\n+v = j.v;\n+00059\n+n = j.n;\n+00060\n+contents = j.contents;\n+00061\n+00062\n+pass = j.pass;\n+00063\n+00064\n+pt_tilde = j.pt_tilde;\n+00065\n+sm_var2 = j.sm_var2;\n+00066\n+00067\n+active_area = passive_area = 0.0;\n+00068 }\n+00069\n+00070 // default dtor\n+00071 //-------------00072 Cjet_area::~Cjet_area(){\n+00073\n+00074 }\n+00075\n+00076\n+00077 /******************************************************************\n+00078 * Csiscone_area implementation\n+*\n+00079 * class for the computation of jet areas.\n+*\n+00080 *\n+*\n+00081 * This is the class user should use whenever you want to compute *\n+00082 * the jet area (passive and active).\n+*\n+00083 * It uses the SISCone algorithm to perform the jet analysis.\n+*\n+00084 ******************************************************************/\n+00085\n+00086 // default ctor\n+00087 //------------00088 Carea::Carea(){\n+// 3600 particles added\n+00089\n+grid_size = 60;\n+00090\n+grid_eta_max = 6.0; // maybe having twice more points in eta than in phi should be nice\n+00091\n+grid_shift = 0.5;\n+// 50% \"shacking\"\n+00092\n+00093\n+pt_soft = 1e-100;\n+00094\n+pt_shift = 0.05;\n+00095\n+pt_soft_min = 1e-90;\n+00096 }\n+00097\n+00098 // default dtor\n+00099 //------------00100 Carea::~Carea(){\n+00101\n+00102 }\n+00103\n+00104 /*\n+00105 * compute the jet areas from a given particle set.\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+177\n+\n+\f178\n+\n+File Documentation\n+\n+00106 * The parameters of this method are the ones which control the jet clustering alghorithm.\n+00107 * Note that the pt_min is not allowed here soince the jet-area determination involves soft\n+00108 * particles/jets and thus is used internally.\n+00109 * - _particles\n+list of particles\n+00110 * - _radius\n+cone radius\n+shared energy threshold for splitting&merging\n+00111 * - _f\n+00112 * - _n_pass_max maximum number of passes (0=full search, the default)\n+the scale choice for the split-merge procedure\n+00113 * - _split_merge_scale\n+00114 *\n+NOTE: SM_pt leads to IR unsafety for some events with momentum conservation.\n+00115 *\n+SM_Et is IR safe but not boost invariant and not implemented(!)\n+SM_mt is IR safe for hadronic events, but not for decays of two\n+00116 *\n+00117 *\n+back-to-back particles of identical mass\n+SM_pttilde\n+00118 *\n+00119 *\n+is always IR safe, and also boost invariant (default)\n+when this is set on, only hard jets are computed\n+00120 * - _hard_only\n+00121 *\n+and not the purely ghosted jets (default: false)\n+00122 * return the jets together with their areas\n+00123 * The return value is the number of jets (including pure-ghost ones if they are included)\n+00124 ********************************************************************************************/\n+00125 int Carea::compute_areas(std::vector &_particles, double _radius, double _f,\n+int _n_pass_max, Esplit_merge_scale _split_merge_scale,\n+00126\n+00127\n+bool _hard_only){\n+00128\n+00129\n+vector all_particles;\n+00130\n+// put \"hardest cut-off\" if needed\n+00131\n+00132\n+// this avoids computation of ghosted jets when not required and\n+00133\n+// significantly shortens the SM.\n+00134\n+if (_hard_only){\n+00135\n+SM_var2_hardest_cut_off = pt_soft_min*pt_soft_min;\n+00136\n+}\n+00137\n+// clear potential previous runs\n+00138\n+00139\n+jet_areas.clear();\n+00140\n+// put initial set of particles in the list\n+00141\n+00142\n+int n_hard = _particles.size();\n+00143\n+all_particles = _particles;\n+00144\n+// build the set of ghost particles and add them to the particle list\n+00145\n+00146\n+int i,j;\n+00147\n+double eta_g,phi_g,pt_g;\n+00148\n+for (i=0;i= n_hard\n+00167\n+// and deduce the number of ghosts in the jet, hence the area.\n+00168\n+double area_factor = (2.0*grid_eta_max/grid_size)*(twopi/grid_size);\n+00169\n+for (i=0;i<(int) jets.size();i++){\n+00170\n+00171\n+jet_areas.push_back(jets[i]);\n+00172\n+j=0;\n+00173\n+while ((j &_particles, double _radius, double _f,\n+00218\n+int _n_pass_max, Esplit_merge_scale _split_merge_scale){\n+00219\n+00220\n+vector all_particles;\n+00221\n+// in the case of passive area, we do not need\n+00222\n+00223\n+// to put the ghosts in the stable-cone search\n+00224\n+// (they do no influence the list of stable cones)\n+00225\n+// Here\u2019s how it goes...\n+00226\n+stable_cone_soft_pt2_cutoff = pt_soft_min*pt_soft_min;\n+00227\n+00228\n+// clear potential previous runs\n+00229\n+jet_areas.clear();\n+00230\n+// put initial set of particles in the list\n+00231\n+00232\n+int n_hard = _particles.size();\n+00233\n+all_particles = _particles;\n+00234\n+00235\n+// build the set of ghost particles and add them to the particle list\n+00236\n+int i,j;\n+00237\n+double eta_g,phi_g,pt_g;\n+00238\n+for (i=0;i= n_hard\n+00257\n+// and deduce the number of ghosts in the jet, hence the area.\n+00258\n+double area_factor = (2.0*grid_eta_max/grid_size)*(twopi/grid_size);\n+for (i=0;i<(int) jets.size();i++){\n+00259\n+00260\n+j=0;\n+while ((j &_particles, double _radius, double _f,\n+00292\n+int _n_pass_max, Esplit_merge_scale _split_merge_scale,\n+bool _hard_only){\n+00293\n+00294\n+00295\n+vector all_particles;\n+00296\n+00297\n+// put \"hardest cut-off\" if needed\n+00298\n+// this avoids computation of ghosted jets when not required and\n+00299\n+// significantly shortens the SM.\n+00300\n+if (_hard_only){\n+00301\n+SM_var2_hardest_cut_off = pt_soft_min*pt_soft_min;\n+00302\n+}\n+00303\n+// clear potential previous runs\n+00304\n+00305\n+jet_areas.clear();\n+00306\n+00307\n+// put initial set of particles in the list\n+00308\n+int n_hard = _particles.size();\n+00309\n+all_particles = _particles;\n+00310\n+00311\n+// build the set of ghost particles and add them to the particle list\n+00312\n+int i,j;\n+00313\n+double eta_g,phi_g,pt_g;\n+00314\n+for (i=0;i= n_hard\n+00333\n+// and deduce the number of ghosts in the jet, hence the area.\n+00334\n+double area_factor = (2.0*grid_eta_max/grid_size)*(twopi/grid_size);\n+00335\n+for (i=0;i<(int) jets.size();i++){\n+00336\n+00337\n+jet_areas.push_back(jets[i]);\n+00338\n+j=0;\n+00339\n+while ((j\n 00028 #include \n@@ -11041,57 +11873,50 @@\n 00035 using namespace siscone;\n 00036\n 00037 int main(int argc, char *argv[]){\n 00038\n vector particles;\n 00039\n Csiscone siscone;\n-00040\n int i,N;\n+00040\n 00041\n double px,py,pz,E;\n 00042\n Coptions opts;\n char fline[512];\n 00043\n 00044\n if (opts.parse_options(argc, argv))\n 00045\n 00046\n exit(1);\n 00047\n-00048\n // deal with help message\n+00048\n 00049\n if (opts.help_flag){\n 00050\n opts.print_help();\n 00051\n exit(0);\n 00052\n }\n 00053\n-// deal with version flag\n 00054\n+// deal with version flag\n 00055\n if (opts.version_flag){\n 00056\n opts.print_version();\n 00057\n exit(0);\n 00058\n }\n 00059\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f176\n-\n-File Documentation\n-\n 00060\n // various files used to read input data and store results\n 00061\n FILE *flux;\n 00062\n FILE *fpart;\n 00063\n@@ -11147,43 +11972,52 @@\n }\n 00089\n }\n 00090\n fclose(flux);\n 00091\n fclose(fpart);\n-if (opts.verbose_flag)\n 00092\n+if (opts.verbose_flag)\n 00093\n cout \u00ab \" working with \" \u00ab N \u00ab \" particles\" \u00ab endl;\n 00094\n // compute jets\n 00095\n 00096\n if (opts.verbose_flag) cout \u00ab \"computing jet contents\" \u00ab endl;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+181\n+\n+\f182\n+\n+File Documentation\n+\n 00097\n i=siscone.compute_jets(particles, opts.R, opts.f, opts.npass, opts.ptmin, opts.SM_var);\n if (opts.verbose_flag){\n 00098\n-unsigned int pass;\n 00099\n-00100\n+unsigned int pass;\n for (pass=0;pass\n 00029 #include \n 00030 #include \n 00031\n 00032 using namespace std;\n@@ -11278,161 +12109,154 @@\n *\n 00045 * options for the \u2019cone\u2019 sample\n *\n 00046 *******************************************/\n 00047\n 00048 // default ctor\n 00049 //-------------00050 Coptions::Coptions(){\n-// set default flags values\n 00051\n+// set default flags values\n 00052\n help_flag=0;\n 00053\n version_flag=0;\n 00054\n verbose_flag=1;\n 00055\n-// set default options values\n 00056\n+// set default options values\n 00057\n N_stop = N_DEFAULT;\n 00058\n R = R_DEFAULT;\n 00059\n f = THRESHOLD_DEFAULT;\n 00060\n npass = NPASS_DEFAULT;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.4 options.cpp\n+\n+183\n+\n 00061\n ev_name = NULL;\n 00062\n SM_var = SM_DEFAULT;\n 00063 }\n 00064\n 00065\n 00066 // default dtor\n 00067 //-------------00068 Coptions::~Coptions(){\n-00069\n if (ev_name!=NULL)\n-delete[] ev_name;\n+00069\n 00070\n+delete[] ev_name;\n 00071 }\n 00072\n 00073\n 00074 // parse oprions\n 00075 // - argc number of arguments from the command line\n 00076 // - argv arguments from the command line\n 00077 // return 1 on error, 0 on success\n 00078 //--------------------------------00079 int Coptions::parse_options(int argc, char **argv){\n 00080\n int opt_param;\n-00081\n int option_index;\n-bool stop=false;\n+00081\n 00082\n+bool stop=false;\n 00083\n-00084\n // browse the command-line options{\n+00084\n 00085\n static struct option siscone_options[]={\n-00086\n // options that set a flag\n+00086\n 00087\n {\"verbose\", no_argument, &verbose_flag, 1},\n+no_argument, &verbose_flag, 0},\n 00088\n {\"quiet\",\n-no_argument, &verbose_flag, 0},\n-no_argument, &help_flag\n-, 1},\n 00089\n {\"help\",\n+no_argument, &help_flag\n+, 1},\n 00090\n {\"version\", no_argument, &version_flag, 1},\n-00091\n // options setting parameters\n+00091\n 00092\n {\"number\",\n required_argument, NULL, \u2019N\u2019},\n+required_argument, NULL, \u2019R\u2019},\n 00093\n {\"radius\",\n-required_argument, NULL, \u2019R\u2019},\n 00094\n {\"fraction\", required_argument, NULL, \u2019f\u2019},\n+required_argument, NULL, \u2019p\u2019},\n 00095\n {\"ptmin\",\n-required_argument, NULL, \u2019p\u2019},\n-required_argument, NULL, \u2019n\u2019},\n 00096\n {\"npass\",\n+required_argument, NULL, \u2019n\u2019},\n 00097\n {\"event\",\n required_argument, NULL, \u2019e\u2019},\n+required_argument, NULL, \u2019s\u2019},\n 00098\n {\"sm\",\n-required_argument, NULL, \u2019s\u2019},\n 00099\n {0,0,0,0}\n 00100\n };\n 00101\n 00102\n-do{\n 00103\n+do{\n 00104\n // getopt_long stores the option index here.\n 00105\n option_index=0;\n 00106\n // retreive options\n 00107\n 00108\n opt_param = getopt_long(argc, argv, \"hvqN:R:f:p:n:e:s:\",\n 00109\n siscone_options, &option_index);\n 00110\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-177\n-\n-$//\n-$//\n-\n-\f178\n-\n 00111\n+// Detect the end of the options.\n 00112\n+if (opt_param == -1)\n 00113\n+stop=true;\n 00114\n+// branch according to \u2019opt_param\u2019\n 00115\n 00116\n-00117\n-00118\n-00119\n-00120\n-00121\n-00122\n-00123\n-\n-File Documentation\n-\n-// Detect the end of the options.\n-if (opt_param == -1)\n-stop=true;\n-\n-// branch according to \u2019opt_param\u2019\n switch (opt_param){\n case \u2019h\u2019: help_flag = 1;\n break; // help\n+00117\n+00118\n case \u2019v\u2019: verbose_flag = 1;\n break; // verbose\n+00119\n case \u2019q\u2019: verbose_flag = 0;\n break; // quiet\n+00120\n case \u2019N\u2019: // max number of paprticles\n+00121\n sscanf(optarg, \"%d\", &N_stop);\n if (N_stop<=0){\n+00122\n+00123\n cout \u00ab \"Warning: the specified number of particles must be positive. Using default one\" \u00ab\n endl;\n 00124\n N_stop = N_DEFAULT;\n 00125\n }\n break;\n@@ -11460,59 +12284,67 @@\n 00137\n cout \u00ab \"Warning: the specified split/merge threshold must be in [0,1]. Using default one\" \u00ab\n endl;\n 00138\n f = THRESHOLD_DEFAULT;\n 00139\n }\n-break;\n 00140\n+break;\n case \u2019p\u2019:\n 00141\n 00142\n sscanf(optarg, \"%lf\", &ptmin);\n if (ptmin<0){\n 00143\n 00144\n cout \u00ab \"Warning: the specified minimal pT must be non-negative. Using default one\" \u00ab endl;\n 00145\n ptmin = PTMIN_DEFAULT;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f184\n+\n+File Documentation\n+\n 00146\n-}\n-break;\n 00147\n-case \u2019n\u2019: // max number of paprticles\n 00148\n 00149\n-sscanf(optarg, \"%d\", &npass);\n 00150\n-if (npass<0){\n 00151\n+\n+}\n+break;\n+case \u2019n\u2019: // max number of paprticles\n+sscanf(optarg, \"%d\", &npass);\n+if (npass<0){\n cout \u00ab \"Warning: the specified number of passes must be non negative. Using default one\" \u00ab\n endl;\n 00152\n npass = NPASS_DEFAULT;\n 00153\n }\n break;\n 00154\n 00155\n case \u2019e\u2019:\n-00156\n if (ev_name==NULL){\n+00156\n 00157\n ev_name = new char[strlen(optarg)+1];\n 00158\n strcpy(ev_name, optarg);\n 00159\n }\n break;\n 00160\n-case \u2019s\u2019:\n 00161\n+case \u2019s\u2019:\n 00162\n char tmp[512];\n 00163\n strcpy(tmp, optarg);\n if (strcmp(tmp, \"pttilde\")==0){\n 00164\n 00165\n@@ -11534,56 +12366,49 @@\n 00173\n cout \u00ab \"Warning: the specified varible for split--merge is not valid (should be pttilde, pt,\n mt or Et). Using pttilde as the default one.\" \u00ab endl;\n 00174\n SM_var = SM_pttilde;\n 00175\n }\n-00176\n break;\n-case 0:\n+00176\n 00177\n-00178\n+case 0:\n case -1:\n-break;\n+00178\n 00179\n+break;\n 00180\n case \u2019?\u2019:\n 00181\n fprintf(stderr, \"Giving up.\\n\");\n-return 1;\n 00182\n-00183\n+return 1;\n break;\n-default:\n+00183\n 00184\n+default:\n 00185\n if (!help_flag){\n 00186\n fprintf(stderr, \"unrecognized option %c. Giving up.\\n\", opt_param);\n 00187\n return 1;\n 00188\n }\n 00189\n }\n 00190\n } while (!stop);\n 00191\n-if (ev_name==NULL){\n 00192\n+if (ev_name==NULL){\n 00193\n ev_name = new char[strlen(DEFAULT_EVENT)+1];\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.3 options.h\n-\n-179\n-\n 00194\n strcpy(ev_name, DEFAULT_EVENT);\n 00195\n }\n 00196\n return 0;\n 00197\n@@ -11612,20 +12437,20 @@\n 00212\n cout \u00ab \" -p , --ptmin=\n endl;\n : set the maximal number of passes (0 for no limit) (\" \u00ab\n 00213\n cout \u00ab \" -n , --npass=\n NPASS_DEFAULT \u00ab \")\" \u00ab endl;\n+: set the event filename (\" \u00ab DEFAULT_EVENT \u00ab \")\" \u00ab endl;\n 00214\n cout \u00ab \" -e , --event=\n-: set the event filename (\" \u00ab DEFAULT_EVENT \u00ab \")\" \u00ab endl;\n-: variable for split--merge: pttilde, mt, pt or Et (pttilde)\" \u00ab\n 00215\n cout \u00ab \" -s , --sm=\n+: variable for split--merge: pttilde, mt, pt or Et (pttilde)\" \u00ab\n endl;\n 00216\n cout \u00ab endl;\n 00217\n cout \u00ab \"Output flags\" \u00ab endl;\n : show version information\" \u00ab endl;\n 00218\n@@ -11641,14 +12466,19 @@\n cout \u00ab endl;\n 00223\n 00224\n return 0;\n 00225 }\n 00226\n 00227\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.5 options.h\n+\n 00228 // print program version\n 00229 //----------------------00230 int Coptions::print_version(){\n 00231\n cout \u00ab siscone_package_name() \u00ab \" \" \u00ab siscone_version() \u00ab endl;\n 00232\n cout \u00ab \"Copyright (C) 2006.\" \u00ab endl;\n 00233\n@@ -11666,18 +12496,18 @@\n 00239\n cout \u00ab \"Please send bugs or comments to AUTHORS\" \u00ab endl;\n 00240\n return 0;\n 00241\n 00242 }\n \n-5.3 options.h\n+5.5 options.h\n 00001\n-//\n 00002 // File: options.h\n+//\n 00003 // Description: management of the cmdline options of the main program\n //\n 00004 // This file is part of the SISCone project.\n //\n 00005 // For more details, see http://projects.hepforge.org/siscone\n //\n 00006 //\n@@ -11717,72 +12547,74 @@\n $//\n 00024 // $Date:: 2007-10-03 19:21:19 +0200 (Wed, 03 Oct 2007)\n $//\n 00026\n 00027 #ifndef __OPTIONS_H__\n 00028 #define __OPTIONS_H__\n 00029\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f180\n-\n-File Documentation\n-\n 00030 #include \"siscone/siscone.h\"\n 00031\n 00037 class Coptions{\n 00038 public:\n 00040\n Coptions();\n 00041\n 00043\n ~Coptions();\n 00044\n 00049\n int parse_options(int argc, char **argv);\n 00050\n-00052\n int print_help();\n+00052\n 00053\n-int print_version();\n 00055\n+int print_version();\n 00056\n // flags\n 00057\n 00058\n int help_flag;\n 00059\n int version_flag;\n-00060\n int verbose_flag;\n+00060\n 00061\n-// options\n 00062\n+// options\n 00063\n int N_stop;\n 00064\n double R;\n-00065\n double f;\n-double ptmin;\n+00065\n 00066\n-00067\n+double ptmin;\n char *ev_name;\n-int npass;\n+00067\n 00068\n+int npass;\n 00069\n 00071\n siscone::Esplit_merge_scale SM_var;\n 00072 };\n 00073\n 00074 #endif\n \n-5.4 sample.cpp\n+5.6 sample.cpp\n 00001\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+185\n+\n+\f186\n+\n+File Documentation\n+\n 00002 // File: sample.cpp\n //\n 00003 // Description: example program for the Csiscone class (see documentation)\n //\n 00004 // This file is part of the SISCone project.\n //\n 00005 // For more details, see http://projects.hepforge.org/siscone\n@@ -11827,16 +12659,16 @@\n 00026\n 00027 #include \n 00028 #include \n 00029 #include \n 00030 #include \"siscone/momentum.h\"\n 00031 #include \"siscone/siscone.h\"\n 00032\n-00033 #define R\n 0.7\n+00033 #define R\n 00034 #define f\n 0.5\n 00035 #define f_alt 0.75\n 00036\n 00037 using namespace std;\n 00038 using namespace siscone;\n 00039\n@@ -11856,121 +12688,122 @@\n 00045\n double px,py,pz,E;\n // particles 4-momentum\n 00046\n char fline[512];\n // line to read from a file\n 00047\n-// read particles\n 00048\n+// read particles\n 00049\n FILE *flux;\n 00050\n flux = fopen(\"events/single-event.dat\", \"r\");\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.5 spherical.cpp\n-\n 00051\n+if (flux==NULL){\n 00052\n+cerr \u00ab \"cannot read event\" \u00ab endl;\n 00053\n+return 1;\n 00054\n+}\n 00055\n 00056\n+N=0;\n+while (fgets(fline, 512, flux)!=NULL){\n 00057\n 00058\n+if (fline[0]!=\u2019#\u2019){ // skip lines beginning with \u2019#\u2019\n 00059\n+if (sscanf(fline, \"%le%le%le%le\", &px, &py, &pz, &E)==4){\n 00060\n+particles.push_back(Cmomentum(px, py, pz, E));\n 00061\n+N++;\n 00062\n+} else {\n 00063\n+cout \u00ab \"error in reading event file Giving up.\" \u00ab endl;\n 00064\n+fclose(flux);\n+return 2;\n 00065\n 00066\n+}\n 00067\n+}\n 00068\n+}\n 00069\n+fclose(flux);\n 00070\n 00071\n+// compute jets\n 00072\n+// first compute with multiple passes (default)\n 00073\n+i=siscone.compute_jets(particles, R, f);\n 00074\n+cout \u00ab \" \" \u00ab i \u00ab \" jets found in multi-pass run\" \u00ab endl;\n 00075\n+// then, recompute it with a different f\n 00076\n 00077\n+i=siscone.recompute_jets(f_alt);\n 00078\n+cout \u00ab \" \" \u00ab i \u00ab \" jets found with alternative f\" \u00ab endl;\n 00079\n+// one pass\n 00080\n 00081\n+i=siscone.compute_jets(particles, R, f, 1);\n 00082\n+cout \u00ab \" \" \u00ab i \u00ab \" jets found in single-pass run\" \u00ab endl;\n 00083\n 00084\n-00085\n-00086\n-00087\n-\n-181\n-\n-if (flux==NULL){\n-cerr \u00ab \"cannot read event\" \u00ab endl;\n-return 1;\n-}\n-N=0;\n-while (fgets(fline, 512, flux)!=NULL){\n-if (fline[0]!=\u2019#\u2019){ // skip lines beginning with \u2019#\u2019\n-if (sscanf(fline, \"%le%le%le%le\", &px, &py, &pz, &E)==4){\n-particles.push_back(Cmomentum(px, py, pz, E));\n-N++;\n-} else {\n-cout \u00ab \"error in reading event file Giving up.\" \u00ab endl;\n-fclose(flux);\n-return 2;\n-}\n-}\n-}\n-fclose(flux);\n-// compute jets\n-// first compute with multiple passes (default)\n-i=siscone.compute_jets(particles, R, f);\n-cout \u00ab \" \" \u00ab i \u00ab \" jets found in multi-pass run\" \u00ab endl;\n-// then, recompute it with a different f\n-i=siscone.recompute_jets(f_alt);\n-cout \u00ab \" \" \u00ab i \u00ab \" jets found with alternative f\" \u00ab endl;\n-// one pass\n-i=siscone.compute_jets(particles, R, f, 1);\n-cout \u00ab \" \" \u00ab i \u00ab \" jets found in single-pass run\" \u00ab endl;\n-\n // show jets\n+00085\n vector::iterator it_j;\n+00086\n int i1;\n-fprintf(stdout, \"#\n pT\n eta\n phi\n px\n py\n+00087\n+fprintf(stdout, \"#\n \\n\");\n 00088\n for (it_j = siscone.jets.begin(), i1=0 ;\n+\n+pz\n+\n+E\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.7 spherical.cpp\n+\n 00089\n-it_j != siscone.jets.end() ; it_j++, i1++){\n 00090\n-fprintf(stdout, \"Jet %3d: %10.3f %8.3f %8.3f %10.3f %10.3f %10.3f %10.3f\\n\",\n 00091\n+\n+it_j != siscone.jets.end() ; it_j++, i1++){\n+fprintf(stdout, \"Jet %3d: %10.3f %8.3f %8.3f %10.3f %10.3f %10.3f %10.3f\\n\",\n i1, it_j->v.perp(), it_j->v.eta, it_j->v.phi, it_j->v.px, it_j->v.py,\n it_j->v.E);\n 00092\n }\n 00093\n-return 0;\n 00094\n+return 0;\n 00095 }\n \n-5.5 spherical.cpp\n+5.7 spherical.cpp\n 00001\n //\n 00002 // File: spherical.cpp\n 00003 // Description: example program for the CSphsiscone class (spherical SISCone)//\n 00004 // This file is part of the SISCone project.\n //\n 00005 // WARNING: this is not the main SISCone trunk but\n@@ -12020,27 +12853,14 @@\n 00028\n 00029 #include \n 00030 #include \n 00031 #include \n 00032 #include \"siscone/spherical/momentum.h\"\n 00033 #include \"siscone/spherical/siscone.h\"\n 00034\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-pz\n-\n-it_j->v.pz,\n-\n-E\n-\n-\f182\n-\n-File Documentation\n-\n 00035 #define R\n 0.7\n 00036 #define f\n 0.5\n 00037 #define f_alt 0.75\n 00038\n 00039 using namespace std;\n@@ -12078,16 +12898,16 @@\n return 1;\n 00055\n 00056\n }\n 00057\n 00058\n N=0;\n-while (fgets(fline, 512, flux)!=NULL){\n 00059\n+while (fgets(fline, 512, flux)!=NULL){\n if (fline[0]!=\u2019#\u2019){ // skip lines beginning with \u2019#\u2019\n 00060\n 00061\n if (sscanf(fline, \"%le%le%le%le\", &px, &py, &pz, &E)==4){\n 00062\n particles.push_back(CSphmomentum(px, py, pz, E));\n 00063\n@@ -12105,16 +12925,27 @@\n 00069\n }\n 00070\n }\n 00071\n fclose(flux);\n 00072\n-// compute jets\n 00073\n+// compute jets\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+187\n+\n+it_j->v.pz,\n+\n+\f188\n+\n+File Documentation\n+\n 00074\n // first compute with multiple passes (default)\n 00075\n i=siscone.compute_jets(particles, R, f);\n 00076\n cout \u00ab \" \" \u00ab i \u00ab \" jets found in multi-pass run\" \u00ab endl;\n 00077\n@@ -12132,23 +12963,23 @@\n 00084\n cout \u00ab \" \" \u00ab i \u00ab \" jets found in single-pass run\" \u00ab endl;\n 00085\n // show jets\n 00086\n 00087\n vector::iterator it_j;\n-int i1;\n 00088\n-00089\n-fprintf(stdout, \"#\n+int i1;\n theta\n phi\n px\n py\n pz\n+00089\n+fprintf(stdout, \"#\n 00090\n for (it_j = siscone.jets.begin(), i1=0 ;\n 00091\n it_j != siscone.jets.end() ; it_j++, i1++){\n 00092\n fprintf(stdout, \"Jet %3d: %8.3f %8.3f %10.3f %10.3f %10.3f %10.3f\\n\",\n 00093\n@@ -12162,58 +12993,49 @@\n \n E\n \n \\n\");\n \n it_j->v.E);\n \n-5.6 test.cpp\n+5.8 test.cpp\n 00001\n+//\n 00002 // File: test.cpp\n-00003 // Description: example program that implements tests with random particles\n+00003 // Description: example program that implements tests with random particles //\n 00004 //\n and output various informations\n+//\n 00005 //\n+//\n 00006 // Note: for a usage example of SISCone, we advise looking at main.cpp\n+//\n 00007 //\n or http://projects.hepforge.org/siscone/usage.html\n-00008 //\n-00009 // This file is part of the SISCone project.\n-00010 // For more details, see http://projects.hepforge.org/siscone\n-00011 //\n-00012 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-00013 //\n-00014 // This program is free software; you can redistribute it and/or modify\n-00015 // it under the terms of the GNU General Public License as published by\n-00016 // the Free Software Foundation; either version 2 of the License, or\n-00017 // (at your option) any later version.\n-\n-//\n-//\n-//\n-//\n-//\n //\n+00008 //\n //\n+00009 // This file is part of the SISCone project.\n //\n+00010 // For more details, see http://projects.hepforge.org/siscone\n //\n+00011 //\n //\n+00012 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n //\n+00013 //\n //\n+00014 // This program is free software; you can redistribute it and/or modify\n //\n+00015 // it under the terms of the GNU General Public License as published by\n //\n+00016 // the Free Software Foundation; either version 2 of the License, or\n //\n+00017 // (at your option) any later version.\n //\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.6 test.cpp\n-\n-183\n-\n 00018 //\n //\n 00019 // This program is distributed in the hope that it will be useful,\n //\n 00020 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n //\n 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n@@ -12264,31 +13086,38 @@\n 00053\n 00054\n 00055\n unsigned int i;\n 00056\n FILE *flux;\n 00057\n-if (argc==1){\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.9 times.cpp\n+\n+189\n+\n 00058\n-00059\n+if (argc==1){\n //cout \u00ab \"using default number of particles\" \u00ab endl;\n+00059\n 00060\n N = N_default;\n 00061\n } else {\n 00062\n sscanf(argv[1], \"%u\", &N);\n-//cout \u00ab \"using \" \u00ab N \u00ab \" particles\" \u00ab endl;\n 00063\n+//cout \u00ab \"using \" \u00ab N \u00ab \" particles\" \u00ab endl;\n 00064\n }\n 00065\n-// Initialise random number generator\n 00066\n+// Initialise random number generator\n 00067\n timeval timestamp;\n 00068\n gettimeofday(×tamp, NULL);\n 00069\n srand(timestamp.tv_usec);\n 00070\n@@ -12296,16 +13125,16 @@\n 00071\n 00072\n cout \u00ab \"build particle list\" \u00ab endl;\n 00073\n flux = fopen(\"particles.dat\", \"w+\");\n 00074\n for (i=0;i particles;\n 00066\n Csiscone siscone;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.8 area.cpp\n-\n 00067\n double eta,phi;\n 00068\n // number of events and particles\n 00069\n 00070\n int i, N;\n@@ -12512,16 +13337,16 @@\n int time_siscone;\n 00075\n // save files\n 00076\n 00077\n FILE *flux;\n 00078\n-// initialise random number generator\n 00079\n+// initialise random number generator\n 00080\n cout \u00ab \"initialise random number generator\" \u00ab endl;\n 00081\n timeval timestamp;\n 00082\n 00083\n gettimeofday(×tamp, NULL);\n@@ -12538,905 +13363,74 @@\n do{\n 00090\n 00091\n fprintf(stdout, \"\\r%5d particles\\n\", N);\n 00092\n time_siscone=0;\n 00093\n-for (n_ev=0;n_ev\n-00028 #include \n-00029 #include \n-00030 #include \"siscone/momentum.h\"\n-00031 #include \"siscone/siscone.h\"\n-00032 #include \"siscone/area.h\"\n-00033 #include \"options.h\"\n-00034\n-00035 using namespace std;\n-00036 using namespace siscone;\n-00037\n-00038 int main(int argc, char *argv[]){\n-00039\n-vector particles;\n-00040\n-Carea siscone_with_area;\n-00041\n-int i,N;\n-double px,py,pz,E;\n-00042\n-00043\n-Coptions opts;\n-char fline[512];\n-00044\n-00045\n-00046\n-if (opts.parse_options(argc, argv))\n-00047\n-exit(1);\n-00048\n-// deal with help message\n-00049\n-00050\n-if (opts.help_flag){\n-00051\n-opts.print_help();\n-00052\n-exit(0);\n-00053\n-}\n-00054\n-// deal with version flag\n-00055\n-00056\n-if (opts.version_flag){\n-00057\n-opts.print_version();\n-00058\n-exit(0);\n-00059\n-}\n-00060\n-00061\n-// various files used to read input data and store results\n-00062\n-FILE *flux;\n-00063\n-FILE *fpart;\n-00064\n-00065\n-// read particles\n-00066\n-if (opts.verbose_flag) cout \u00ab \"reading particles\" \u00ab endl;\n-00067\n-flux = fopen(opts.ev_name, \"r\");\n-if (flux==NULL){\n-00068\n-00069\n-cerr \u00ab \"cannot read event\" \u00ab endl;\n-return 1;\n-00070\n-00071\n-}\n-00072\n-00073\n-N=0;\n-00074\n-fpart = fopen(\"particles.dat\", \"w+\");\n-while ((opts.N_stop!=0) && (fgets(fline, 512, flux)!=NULL)){\n-00075\n-00076\n-if (fline[0]!=\u2019#\u2019){ // skip lines beginning with \u2019#\u2019\n-00077\n-if (sscanf(fline, \"%le%le%le%le\", &px, &py, &pz, &E)==4){\n-00078\n-particles.push_back(Cmomentum(px, py, pz, E));\n-00079\n-fprintf(fpart, \"%e\\t%e\\n\",\n-particles[N].eta, particles[N].phi);\n-00080\n-N++;\n-00081\n-opts.N_stop--;\n-00082\n-} else {\n-00083\n-cout \u00ab \"error in reading event file Giving up.\" \u00ab endl;\n-00084\n-fclose(flux);\n-00085\n-fclose(fpart);\n-00086\n-exit(2);\n-00087\n-}\n-00088\n-}\n-00089\n-}\n-00090\n-fclose(flux);\n-00091\n-fclose(fpart);\n-00092\n-if (opts.verbose_flag)\n-00093\n-cout \u00ab \" working with \" \u00ab N \u00ab \" particles\" \u00ab endl;\n-00094\n-// compute jets\n-00095\n-00096\n-if (opts.verbose_flag) cout \u00ab \"computing jet contents\" \u00ab endl;\n-00097\n-i=siscone_with_area.compute_areas(particles, opts.R, opts.f, opts.npass, opts.SM_var);\n-00098\n-if (opts.verbose_flag){\n-unsigned int pass;\n-00099\n-00100\n-for (pass=0;pass::iterator ja;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.9 area.cpp\n-\n-00111\n-for (ja=siscone_with_area.jet_areas.begin();ja!=siscone_with_area.jet_areas.end();ja++){\n-00112\n-fprintf(flux, \"%e\\t%e\\t%e\\t%e\\t%e\\n\",\n-00113\n-ja->v.perp(), ja->v.eta, ja->v.phi,\n-00114\n-ja->active_area, ja->passive_area);\n-00115\n-}\n-00116\n-00117\n-fclose(flux);\n-00118\n-00119\n-if (opts.verbose_flag)\n-00120\n-cout \u00ab \"bye...\" \u00ab endl;\n-00121\n return 0;\n-00122\n-00123 }\n-\n-5.9 area.cpp\n-00001 // -*- C++ -*00003 // File: area.h\n-//\n-00004 // Description: header file for the computation of jet area\n-//\n-00005 // This file is part of the SISCone project.\n-//\n-00006 // For more details, see http://projects.hepforge.org/siscone\n-//\n-00007 //\n-//\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-//\n-00009 //\n-//\n-00010 // This program is free software; you can redistribute it and/or modify\n-//\n-00011 // it under the terms of the GNU General Public License as published by\n-//\n-00012 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00013 // (at your option) any later version.\n-//\n-00014 //\n-//\n-00015 // This program is distributed in the hope that it will be useful,\n-//\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00018 // GNU General Public License for more details.\n-//\n-00019 //\n-//\n-00020 // You should have received a copy of the GNU General Public License\n-//\n-00021 // along with this program; if not, write to the Free Software\n-//\n-00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00023 //\n-//\n-00024 // $Revision:: 149\n-$//\n-00025 // $Date:: 2007-03-15 00:13:58 +0100 (Thu, 15 Mar 2007)\n-$//\n-00027\n-00028 #include \"area.h\"\n-00029 #include \"momentum.h\"\n-00030 #include \n-00031 #include \n-00032\n-00033 namespace siscone{\n-00034 using namespace std;\n-00035\n-00036 /*******************************************************\n-00037 * Cjet_area implementation\n-*\n-00038 * real Jet information, including its area(s)\n-*\n-00039 *\n-*\n-00040 * This class contains information for one single jet. *\n-00041 * That is, first, its momentum carrying information\n-*\n-00042 * about its centre and pT, and second, its particle\n-*\n-00043 * contents (from CJeT).\n-*\n-00044 * Compared to the Cjet class, it also includes the\n-*\n-00045 * passive and active areas of the jet computed using *\n-00046 * the Carea class.\n-*\n-00047 *******************************************************/\n-00048\n-00049 // default ctor\n-00050 //-------------00051 Cjet_area::Cjet_area(){\n-00052\n-active_area = passive_area = 0.0;\n-00053 }\n-00054\n-00055 // jet-initiated ctor\n-00056 //------------------00057 Cjet_area::Cjet_area(Cjet &j){\n-00058\n-v = j.v;\n-00059\n-n = j.n;\n-00060\n-contents = j.contents;\n-00061\n-00062\n-pass = j.pass;\n-00063\n-00064\n-pt_tilde = j.pt_tilde;\n-00065\n-sm_var2 = j.sm_var2;\n-00066\n-00067\n-active_area = passive_area = 0.0;\n-00068 }\n-00069\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-187\n-\n-\f188\n-\n-File Documentation\n-\n-00070 // default dtor\n-00071 //-------------00072 Cjet_area::~Cjet_area(){\n-00073\n-00074 }\n-00075\n-00076\n-00077 /******************************************************************\n-00078 * Csiscone_area implementation\n-*\n-00079 * class for the computation of jet areas.\n-*\n-00080 *\n-*\n-00081 * This is the class user should use whenever you want to compute *\n-00082 * the jet area (passive and active).\n-*\n-00083 * It uses the SISCone algorithm to perform the jet analysis.\n-*\n-00084 ******************************************************************/\n-00085\n-00086 // default ctor\n-00087 //------------00088 Carea::Carea(){\n-00089\n-grid_size = 60;\n-// 3600 particles added\n-00090\n-grid_eta_max = 6.0; // maybe having twice more points in eta than in phi should be nice\n-00091\n-grid_shift = 0.5;\n-// 50% \"shacking\"\n-00092\n-00093\n-pt_soft = 1e-100;\n-00094\n-pt_shift = 0.05;\n-00095\n-pt_soft_min = 1e-90;\n-00096 }\n-00097\n-00098 // default dtor\n-00099 //------------00100 Carea::~Carea(){\n-00101\n-00102 }\n-00103\n-00104 /*\n-00105 * compute the jet areas from a given particle set.\n-00106 * The parameters of this method are the ones which control the jet clustering alghorithm.\n-00107 * Note that the pt_min is not allowed here soince the jet-area determination involves soft\n-00108 * particles/jets and thus is used internally.\n-00109 * - _particles\n-list of particles\n-cone radius\n-00110 * - _radius\n-shared energy threshold for splitting&merging\n-00111 * - _f\n-00112 * - _n_pass_max maximum number of passes (0=full search, the default)\n-the scale choice for the split-merge procedure\n-00113 * - _split_merge_scale\n-00114 *\n-NOTE: SM_pt leads to IR unsafety for some events with momentum conservation.\n-SM_Et is IR safe but not boost invariant and not implemented(!)\n-00115 *\n-00116 *\n-SM_mt is IR safe for hadronic events, but not for decays of two\n-00117 *\n-back-to-back particles of identical mass\n-SM_pttilde\n-00118 *\n-00119 *\n-is always IR safe, and also boost invariant (default)\n-when this is set on, only hard jets are computed\n-00120 * - _hard_only\n-00121 *\n-and not the purely ghosted jets (default: false)\n-00122 * return the jets together with their areas\n-00123 * The return value is the number of jets (including pure-ghost ones if they are included)\n-00124 ********************************************************************************************/\n-00125 int Carea::compute_areas(std::vector &_particles, double _radius, double _f,\n-int _n_pass_max, Esplit_merge_scale _split_merge_scale,\n-00126\n-00127\n-bool _hard_only){\n-00128\n-00129\n-vector all_particles;\n-00130\n-00131\n-// put \"hardest cut-off\" if needed\n-00132\n-// this avoids computation of ghosted jets when not required and\n-00133\n-// significantly shortens the SM.\n-00134\n-if (_hard_only){\n-00135\n-SM_var2_hardest_cut_off = pt_soft_min*pt_soft_min;\n-00136\n-}\n-00137\n-00138\n-// clear potential previous runs\n-00139\n-jet_areas.clear();\n-00140\n-// put initial set of particles in the list\n-00141\n-00142\n-int n_hard = _particles.size();\n-00143\n-all_particles = _particles;\n-00144\n-00145\n-// build the set of ghost particles and add them to the particle list\n-00146\n-int i,j;\n-double eta_g,phi_g,pt_g;\n-00147\n-00148\n-for (i=0;i= n_hard\n-00167\n-// and deduce the number of ghosts in the jet, hence the area.\n-00168\n-double area_factor = (2.0*grid_eta_max/grid_size)*(twopi/grid_size);\n-00169\n-for (i=0;i<(int) jets.size();i++){\n-00170\n-00171\n-jet_areas.push_back(jets[i]);\n-00172\n-j=0;\n-00173\n-while ((j &_particles, double _radius, double _f,\n-00218\n-int _n_pass_max, Esplit_merge_scale _split_merge_scale){\n-00219\n-00220\n-vector all_particles;\n-00221\n-// in the case of passive area, we do not need\n-00222\n-00223\n-// to put the ghosts in the stable-cone search\n-00224\n-// (they do no influence the list of stable cones)\n-00225\n-// Here\u2019s how it goes...\n-00226\n-stable_cone_soft_pt2_cutoff = pt_soft_min*pt_soft_min;\n-00227\n-// clear potential previous runs\n-00228\n-00229\n-jet_areas.clear();\n-00230\n-00231\n-// put initial set of particles in the list\n-00232\n-int n_hard = _particles.size();\n-00233\n-all_particles = _particles;\n-00234\n-// build the set of ghost particles and add them to the particle list\n-00235\n-00236\n-int i,j;\n-00237\n-double eta_g,phi_g,pt_g;\n-00238\n-for (i=0;i= n_hard\n-00257\n-// and deduce the number of ghosts in the jet, hence the area.\n-00258\n-double area_factor = (2.0*grid_eta_max/grid_size)*(twopi/grid_size);\n-00259\n-for (i=0;i<(int) jets.size();i++){\n-00260\n-j=0;\n-while ((j &_particles, double _radius, double _f,\n-00292\n-int _n_pass_max, Esplit_merge_scale _split_merge_scale,\n-bool _hard_only){\n-00293\n-00294\n-00295\n-vector all_particles;\n-00296\n-00297\n-// put \"hardest cut-off\" if needed\n-00298\n-// this avoids computation of ghosted jets when not required and\n-00299\n-// significantly shortens the SM.\n-00300\n-if (_hard_only){\n-00301\n-SM_var2_hardest_cut_off = pt_soft_min*pt_soft_min;\n-00302\n-}\n-00303\n-00304\n-// clear potential previous runs\n-00305\n-jet_areas.clear();\n-00306\n-// put initial set of particles in the list\n-00307\n-00308\n-int n_hard = _particles.size();\n-00309\n-all_particles = _particles;\n-00310\n-00311\n-// build the set of ghost particles and add them to the particle list\n-00312\n-int i,j;\n-00313\n-double eta_g,phi_g,pt_g;\n-00314\n-for (i=0;i= n_hard\n-00333\n-// and deduce the number of ghosts in the jet, hence the area.\n-00334\n-double area_factor = (2.0*grid_eta_max/grid_size)*(twopi/grid_size);\n-00335\n-for (i=0;i<(int) jets.size();i++){\n-00336\n-00337\n-jet_areas.push_back(jets[i]);\n-00338\n-j=0;\n-00339\n-while ((j &_particles, double _radius, double _f,\n 00101\n int _n_pass_max=0, Esplit_merge_scale _split_merge_scale=SM_pttilde,\n bool _hard_only=false);\n 00102\n 00103\n-00112\n int compute_active_areas(std::vector &_particles, double _radius, double _f,\n-int _n_pass_max=0, Esplit_merge_scale _split_merge_scale=SM_pttilde,\n+00112\n 00113\n+int _n_pass_max=0, Esplit_merge_scale _split_merge_scale=SM_pttilde,\n bool _hard_only=false);\n 00114\n+00115\n+int compute_passive_areas(std::vector &_particles, double _radius, double _f,\n+00123\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n 191\n \n \f192\n \n File Documentation\n \n-00115\n-int compute_passive_areas(std::vector &_particles, double _radius, double _f,\n-00123\n 00124\n int _n_pass_max=0, Esplit_merge_scale _split_merge_scale=SM_pttilde);\n 00125\n int grid_size;\n 00126\n-00127\n double grid_eta_max;\n-double grid_shift;\n+00127\n 00128\n+double grid_shift;\n 00129\n double pt_soft;\n 00130\n 00131\n double pt_shift;\n-00132\n double pt_soft_min;\n+00132\n 00133\n 00135\n std::vector jet_areas;\n 00136 };\n 00137\n 00138 }\n 00139 #endif\n@@ -13649,36 +13643,36 @@\n 00066\n 00068\n inline circulator & operator--() {\n if (m_here == m_begin) m_here = m_end;\n 00069\n 00070\n --m_here;\n-00071\n return *this;\n+00071\n 00072\n }\n 00073\n 00077\n bool operator==(const circulator & other) const {return m_here == other.m_here;}\n 00078\n bool operator!=(const circulator & other) const {return m_here != other.m_here;}\n 00082\n 00083\n 00084 private:\n 00085\n T m_here, m_begin, m_end;\n 00086 };\n+00087\n+00088 }\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n \f5.12 config.h\n \n-00087\n-00088 }\n 00089\n 00090 #endif // __CIRCULATOR_H__\n \n 5.12 config.h\n 00001 #ifndef _SISCONE_CONFIG_H\n 00002 #define _SISCONE_CONFIG_H 1\n 00003\n@@ -13751,25 +13745,25 @@\n 00070 #define SISCONE_PACKAGE \"siscone\"\n 00071 #endif\n 00072\n 00073 /* Define to the address where bug reports for this package should be sent. */\n 00074 #ifndef SISCONE_PACKAGE_BUGREPORT\n 00075 #define SISCONE_PACKAGE_BUGREPORT \"\"\n 00076 #endif\n+00077\n+00078 /* Define to the full name of this package. */\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n 193\n \n \f194\n \n File Documentation\n \n-00077\n-00078 /* Define to the full name of this package. */\n 00079 #ifndef SISCONE_PACKAGE_NAME\n 00080 #define SISCONE_PACKAGE_NAME \"SISCone\"\n 00081 #endif\n 00082\n 00083 /* Define to the full name and version of this package. */\n 00084 #ifndef SISCONE_PACKAGE_STRING\n 00085 #define SISCONE_PACKAGE_STRING \"SISCone 3.0.5\"\n@@ -13809,15 +13803,15 @@\n 00117 #define SISCONE_VERSION \"3.0.5\"\n 00118 #endif\n 00119\n 00120 /* once: _SISCONE_CONFIG_H */\n 00121 #endif\n \n 5.13 config_raw.h\n-00001 /* siscone/config_raw.h. Generated from config.h.in by configure.\n+00001 /* siscone/config_raw.h. Generated from config.h.in by configure. */\n 00002 /* config.h.in. Generated from configure.ac by autoheader. */\n 00003\n 00004 /* Define to 1 if you have the header file. */\n 00005 #define HAVE_DLFCN_H 1\n 00006\n 00007 /* Define to 1 if you have the header file. */\n 00008 #define HAVE_INTTYPES_H 1\n@@ -13844,25 +13838,23 @@\n 00029 #define HAVE_SYS_STAT_H 1\n 00030\n 00031 /* Define to 1 if you have the header file. */\n 00032 #define HAVE_SYS_TYPES_H 1\n 00033\n 00034 /* Define to 1 if you have the header file. */\n 00035 #define HAVE_UNISTD_H 1\n-\n-*/\n+00036\n+00037 /* Define to the sub-directory where libtool stores uninstalled libraries. */\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n \f5.14 siscone/defines.h File Reference\n \n 195\n \n-00036\n-00037 /* Define to the sub-directory where libtool stores uninstalled libraries. */\n 00038 #define LT_OBJDIR \".libs/\"\n 00039\n 00040 /* Name of package */\n 00041 #define PACKAGE \"siscone\"\n 00042\n 00043 /* Define to the address where bug reports for this package should be sent. */\n 00044 #define PACKAGE_BUGREPORT \"\"\n@@ -14703,216 +14695,903 @@\n 00174\n return tmp;\n 00175\n 00176 }\n 00177\n 00178 }\n \n-5.18 geom_2d.h\n-00001 // -*- C++ -*00003 // File: geom_2d.h\n+5.18 hash.cpp\n+00001\n //\n-00004 // Description: header file for two-dimensional geometry tools\n+00002 // File: hash.cpp\n+00003 // Description: source file for classes hash_element and hash_cones\n //\n-00005 // This file is part of the SISCone project.\n+00004 // This file is part of the SISCone project.\n //\n-00006 // For more details, see http://projects.hepforge.org/siscone\n+00005 // For more details, see http://projects.hepforge.org/siscone\n //\n-00007 //\n+00006 //\n //\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n //\n-00009 //\n+00008 //\n //\n-00010 // This program is free software; you can redistribute it and/or modify\n+00009 // This program is free software; you can redistribute it and/or modify\n //\n-00011 // it under the terms of the GNU General Public License as published by\n+00010 // it under the terms of the GNU General Public License as published by\n //\n-00012 // the Free Software Foundation; either version 2 of the License, or\n+00011 // the Free Software Foundation; either version 2 of the License, or\n //\n-00013 // (at your option) any later version.\n+00012 // (at your option) any later version.\n //\n-00014 //\n+00013 //\n //\n-00015 // This program is distributed in the hope that it will be useful,\n+00014 // This program is distributed in the hope that it will be useful,\n //\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n //\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n //\n-00018 // GNU General Public License for more details.\n+00017 // GNU General Public License for more details.\n //\n-00019 //\n+00018 //\n //\n-00020 // You should have received a copy of the GNU General Public License\n+00019 // You should have received a copy of the GNU General Public License\n //\n-00021 // along with this program; if not, write to the Free Software\n+00020 // along with this program; if not, write to the Free Software\n //\n-00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00023 //\n+00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00022 //\n //\n-00024 // $Revision:: 422\n+00023 // $Revision:: 225\n $//\n-00025 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020)\n+00024 // $Date:: 2008-05-20 16:59:47 +0200 (Tue, 20 May 2008)\n $//\n-00027\n-00028 #ifndef __GEOM_2D_H__\n-00029 #define __GEOM_2D_H__\n-00030\n-00031 #include \n-00032 #include \n-00033 #include \"defines.h\"\n-00034\n-00035 #ifndef M_PI\n-00036 #define M_PI 3.141592653589793238462643383279502884197\n-00037 #endif\n-00038\n-00039 namespace siscone{\n-00040\n-00043 inline double phi_in_range(double phi) {\n-00044\n-if\n-(phi <= -M_PI) phi += twopi;\n-else if (phi >\n-M_PI) phi -= twopi;\n-00045\n-return phi;\n-00046\n-00047 }\n+00026\n+00027 #include \n+00028 #include \n+00029 #include \"hash.h\"\n+00030 #include \n+00031\n+00032 namespace siscone{\n+00033\n+00034 using namespace std;\n+00035\n+00036 /**************************************************************\n+00037 * implementation of hash_cones\n+*\n+00038 * list of cones candidates.\n+*\n+00039 * We store in this class all the hash_elements and give\n+*\n+00040 * functions to manipulate them.\n+*\n+00041 **************************************************************/\n+00042\n+00043 // constructor with initialisation\n+00044 // - _Np number of particles\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n-\f5.19 geom_2d.h\n-\n-203\n+\f5.18 hash.cpp\n \n+00045 // - _R2 cone radius (squared)\n+00046 //----------------------------------00047 hash_cones::hash_cones(int _Np, double _R2){\n+int i;\n 00048\n-00052 inline double dphi(double phi1, double phi2) {\n-00053\n-return phi_in_range(phi1-phi2);\n-00054 }\n+00049\n+00050\n+n_cones = 0;\n+00051 #ifdef DEBUG_STABLE_CONES\n+00052\n+n_occupied_cells = 0;\n+00053 #endif\n+00054\n 00055\n+// determine hash size\n 00056\n-00060 inline double abs_dphi(double phi1, double phi2) {\n+// for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4\n+00057\n+//mask = 1 \u00ab (int) (2*log(double(_Np))/log(2.0));\n+00058\n+//if (mask<=1) mask=2;\n+00059\n+int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0));\n+if (nbits<1) nbits=1;\n+00060\n 00061\n-double delta = fabs(phi1-phi2);\n-return delta > M_PI ? twopi-delta : delta;\n+mask = 1 \u00ab nbits;\n 00062\n-00063 }\n+00063\n+// create hash\n 00064\n-00066 inline double pow2(double x) {return x*x;}\n+hash_array = new hash_element*[mask];\n+00065\n+mask--;\n+00066\n 00067\n+// set the array to 0\n 00068\n-00073 class Ctwovect {\n-00074 public:\n-00076\n-Ctwovect() : x(0.0), y(0.0) {}\n-00077\n+//? needed ?\n+00069\n+for (i=0;inext;\n 00085\n+delete elm;\n+00086\n+}\n 00087\n-inline double mod2() const {return pow2(x)+pow2(y);}\n+}\n 00088\n-inline double modulus() const {return sqrt(mod2());}\n-00090\n-00091 };\n+delete[] hash_array;\n+00089\n+00090 }\n+00091\n 00092\n-00093\n-00098 inline double dot_product(const Ctwovect & a, const Ctwovect & b) {\n-00099\n-return a.x*b.x + a.y*b.y;\n-00100 }\n-00101\n-00102\n-00107 inline double cross_product(const Ctwovect & a, const Ctwovect & b) {\n-return a.x*b.y - a.y*b.x;\n+00093 /*\n+00094 * insert a new candidate into the hash.\n+4-momentum of the cone to add\n+00095 * - v\n+00096 * - parent parent particle defining the cone\n+child particle defining the cone\n+00097 * - child\n+00098 * - p_io\n+whether the parent has to belong to the cone or not\n+00099 * - c_io\n+whether the child has to belong to the cone or not\n+00100 * return 0 on success, 1 on error\n+00101 ***********************************************************************/\n+00102 int hash_cones::insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io){\n+00103\n+hash_element *elm;\n+int index = (v->ref.ref[0]) & mask;\n+00104\n+00105\n+// check the array cell corresponding to our reference\n+00106\n+00107\n+elm = hash_array[index];\n 00108\n-00109 }\n+00109 #ifdef DEBUG_STABLE_CONES\n 00110\n+if (elm==NULL)\n 00111\n-00120 class Ceta_phi_range{\n-00121 public:\n+n_occupied_cells++;\n+00112 #endif\n+00113\n+00114\n+do{\n+// if it is not present, add it\n+00115\n+00116\n+if (elm==NULL){\n+// create element\n+00117\n+00118\n+elm = new hash_element;\n+00119\n+// set its varibles\n+00120\n+00121\n+// Note: at this level, eta and phi have already been computed\n+00122\n+//\n+through Cmomentum::build_etaphi.\n 00123\n-Ceta_phi_range();\n+elm->ref = v->ref;\n 00124\n+//compute vectors centre\n+00125\n+00126\n+v->build_etaphi();\n+00127\n+elm->eta = v->eta;\n+00128\n+elm->phi = v->phi;\n+// if at least one of the two is_inside tests gives a result != from the expected,\n+00129\n 00130\n-Ceta_phi_range(double c_eta, double c_phi, double R);\n+// the || will be true hence !(...) false as wanted\n 00131\n+elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+203\n+\n+\f204\n+\n+File Documentation\n+\n+00132\n+//cout \u00ab \"-- new status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n+00133\n 00134\n-Ceta_phi_range& operator = (const Ceta_phi_range &r);\n+// update hash\n 00135\n-int add_particle(const double eta, const double phi);\n+elm->next = hash_array[index];\n+00136\n+hash_array[index] = elm;\n+00137\n+00138\n+n_cones++;\n+00139\n+return 0;\n 00140\n+}\n 00141\n+00142\n+// if the cone is already there, simply update stability status\n 00143\n-unsigned int eta_range;\n+if (v->ref == elm->ref){\n 00144\n-unsigned int phi_range;\n+// there is only an update to perform to see if the cone is still stable\n+00145\n+if (elm->is_stable){\n 00146\n+v->build_etaphi();\n 00147\n-// extremal value for eta\n+elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));\n 00148\n+//cout \u00ab \" parent/child: \"\n 00149\n-static double eta_min;\n+//\n+\u00ab parent->ref[0] \u00ab \":\" \u00ab is_inside(v, parent) \u00ab \":\" \u00ab p_io \u00ab \" \"\n 00150\n-static double eta_max;\n+//\n+\u00ab child->ref[0] \u00ab \":\" \u00ab is_inside(v, child) \u00ab \":\" \u00ab c_io \u00ab endl;\n 00151\n-00152 private:\n+//cout \u00ab \"-- rep status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n+00152\n+//cout \u00ab v->eta \u00ab \" \" \u00ab v->phi \u00ab endl;\n+00153\n+//cout \u00ab (child->eta) \u00ab \" \" \u00ab child->phi \u00ab endl;\n 00154\n-inline unsigned int get_eta_cell(double eta){\n-return (unsigned int) (1u \u00ab ((int) (32*((eta-eta_min)/(eta_max-eta_min)))));\n+}\n+return 0;\n 00155\n 00156\n }\n 00157\n+00158\n+elm = elm->next;\n 00159\n-inline unsigned int get_phi_cell(double phi){\n+} while (1);\n 00160\n-return (unsigned int) (1u \u00ab ((int) (32*phi/twopi+16)%32));\n 00161\n-}\n-00162 };\n+return 1;\n+00162 }\n 00163\n-00168 bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2);\n-00169\n-00175 const Ceta_phi_range range_union(const Ceta_phi_range &r1, const Ceta_phi_range &r2);\n+00164 /*\n+00165 * insert a new candidate into the hash.\n+00166 * - v\n+4-momentum of te cone to add\n+00167 * Note, in this case, we assume stability. We also assume\n+00168 * that eta and phi are computed for v\n+00169 * return 0 on success, 1 on error\n+00170 ***********************************************************************/\n+00171 int hash_cones::insert(Cmomentum *v){\n+00172\n+hash_element *elm;\n+00173\n+int index = (v->ref.ref[0]) & mask;\n+//cout \u00ab \"-- stable candidate: \" \u00ab v->ref[0] \u00ab \":\" \u00ab endl;\n+00174\n+00175\n+// check the array cell corresponding to our reference\n 00176\n-00177 }\n+00177\n+elm = hash_array[index];\n+do{\n 00178\n-00179 #endif\n+00179\n+// if it is not present, add it\n+00180\n+if (elm==NULL){\n+// create element\n+00181\n+00182\n+elm = new hash_element;\n+00183\n+// set its varibles\n+00184\n+00185\n+// Note: at this level, eta and phi have already been computed\n+00186\n+//\n+through Cmomentum::build_etaphi.\n+00187\n+elm->ref = v->ref;\n+00188\n+elm->eta = v->eta;\n+00189\n+elm->phi = v->phi;\n+00190\n+elm->is_stable = true;\n+00191\n+00192\n+// update hash\n+00193\n+elm->next = hash_array[index];\n+00194\n+hash_array[index] = elm;\n+00195\n+00196\n+n_cones++;\n+return 0;\n+00197\n+00198\n+}\n+00199\n+00200\n+// if the cone is already there, we have nothing to do\n+00201\n+if (v->ref == elm->ref){\n+return 0;\n+00202\n+00203\n+}\n+00204\n+00205\n+elm = elm->next;\n+00206\n+} while (1);\n+00207\n+return 1;\n+00208\n+00209 }\n+00210\n+00211 /*\n+00212 * test if a particle is inside a cone of given centre.\n+00213 * check if the particle of coordinates \u2019v\u2019 is inside the circle of radius R\n+00214 * centered at \u2019centre\u2019.\n+centre of the circle\n+00215 * - centre\n+particle to test\n+00216 * - v\n+00217 * return true if inside, false if outside\n+00218 ******************************************************************************/\n \n-5.19 geom_2d.h\n-00001 // -*- C++ -*00003 // File: geom_2d.h\n-00004 // Description: header file for two-dimensional geometry tools\n-00005 // This file is part of the SISCone project.\n-00006 // WARNING: this is not the main SISCone trunk but\n-00007 //\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.19 hash.cpp\n+\n+205\n+\n+00219 inline bool hash_cones::is_inside(Cmomentum *centre, Cmomentum *v){\n+double dx, dy;\n+00220\n+00221\n+00222\n+dx = centre->eta - v->eta;\n+00223\n+dy = fabs(centre->phi - v->phi);\n+00224\n+if (dy>M_PI)\n+00225\n+dy -= 2.0*M_PI;\n+00226\n+return dx*dx+dy*dy\n+00030 #include \n+00031 #include \"hash.h\"\n+00032 #include \n+00033\n+00034 namespace siscone_spherical{\n+00035\n+00036 using namespace std;\n+00037\n+00038 /**************************************************************\n+00039 * implementation of sph_hash_cones\n+*\n+00040 * list of cones candidates.\n+*\n+00041 * We store in this class all the sph_hash_element and give\n+*\n+00042 * functions to manipulate them.\n+*\n+00043 **************************************************************/\n+00044\n+00045 // constructor with initialisation\n+00046 // - _Np\n+number of particles\n+00047 // - _radius cone radius\n+00048 //----------------------------------00049 sph_hash_cones::sph_hash_cones(int _Np, double _radius){\n+00050\n+int i;\n+00051\n+00052\n+n_cones = 0;\n+00053 #ifdef DEBUG_STABLE_CONES\n+00054\n+n_occupied_cells = 0;\n+00055 #endif\n+00056\n+00057\n+// determine hash size\n+00058\n+// for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4\n+00059\n+//mask = 1 \u00ab (int) (2*log(double(_Np))/log(2.0));\n+00060\n+//if (mask<=1) mask=2;\n+00061\n+int nbits = (int) (log(_Np*_radius*_radius*_Np/4.0)/log(2.0));\n+00062\n+if (nbits<1) nbits=1;\n+00063\n+mask = 1 \u00ab nbits;\n+00064\n+00065\n+// create hash\n+00066\n+hash_array = new sph_hash_element*[mask];\n+00067\n+mask--;\n+00068\n+// set the array to 0\n+00069\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+//\n+\n+\f206\n+\n+File Documentation\n+\n+00070\n+//? needed ?\n+00071\n+for (i=0;inext;\n+00088\n+delete elm;\n+00089\n+}\n+00090\n+}\n+00091\n+00092\n+delete[] hash_array;\n+00093 }\n+00094\n+00095\n+00096 /*\n+00097 * insert a new candidate into the hash.\n+00098 * - v\n+4-momentum of the cone to add\n+00099 * - parent parent particle defining the cone\n+00100 * - child\n+child particle defining the cone\n+whether the parent has to belong to the cone or not\n+00101 * - p_io\n+00102 * - c_io\n+whether the child has to belong to the cone or not\n+00103 * return 0 on success, 1 on error\n+00104 ***********************************************************************/\n+00105 int sph_hash_cones::insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool\n+c_io){\n+00106\n+sph_hash_element *elm;\n+int index = (v->ref.ref[0]) & mask;\n+00107\n+00108\n+// check the array cell corresponding to our reference\n+00109\n+00110\n+elm = hash_array[index];\n+00111\n+00112 #ifdef DEBUG_STABLE_CONES\n+00113\n+if (elm==NULL)\n+00114\n+n_occupied_cells++;\n+00115 #endif\n+00116\n+00117\n+do{\n+// if it is not present, add it\n+00118\n+00119\n+if (elm==NULL){\n+// create element\n+00120\n+00121\n+elm = new sph_hash_element;\n+00122\n+// set its varibles\n+00123\n+00124\n+// Note: at this level, eta and phi have already been computed\n+00125\n+//\n+through CSphmomentum::build_thetaphi.\n+00126\n+elm->centre = *v;\n+00127\n+// if at least one of the two is_closer tests gives a result != from the expected,\n+00128\n+00129\n+// the || will be true hence !(...) false as wanted\n+00130\n+elm->is_stable = !((is_closer(v, parent, tan2R)^p_io)||(is_closer(v, child, tan2R)^c_io));\n+00131\n+//cout \u00ab \"-- new status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n+00132\n+00133\n+// update hash\n+00134\n+elm->next = hash_array[index];\n+00135\n+hash_array[index] = elm;\n+00136\n+00137\n+n_cones++;\n+00138\n+return 0;\n+00139\n+}\n+00140\n+// if the cone is already there, simply update stability status\n+00141\n+00142\n+if (v->ref == elm->centre.ref){\n+00143\n+// there is only an update to perform to see if the cone is still stable\n+00144\n+if (elm->is_stable){\n+00145\n+elm->is_stable = !((is_closer(v, parent, tan2R)^p_io)||(is_closer(v, child, tan2R)^c_io));\n+//cout \u00ab \" parent/child: \"\n+00146\n+00147\n+//\n+\u00ab parent->ref[0] \u00ab \":\" \u00ab is_closer(v, parent) \u00ab \":\" \u00ab p_io \u00ab \" \"\n+00148\n+//\n+\u00ab child->ref[0] \u00ab \":\" \u00ab is_closer(v, child) \u00ab \":\" \u00ab c_io \u00ab endl;\n+00149\n+//cout \u00ab \"-- rep status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n+00150\n+//cout \u00ab v->eta \u00ab \" \" \u00ab v->phi \u00ab endl;\n+00151\n+//cout \u00ab (child->eta) \u00ab \" \" \u00ab child->phi \u00ab endl;\n+00152\n+}\n+return 0;\n+00153\n+00154\n+}\n+00155\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n+\f5.20 hash.h\n+\n+00156\n+elm = elm->next;\n+00157\n+} while (1);\n+00158\n+return 1;\n+00159\n+00160 }\n+00161\n+00162 /*\n+00163 * insert a new candidate into the hash.\n+00164 * - v\n+4-momentum of te cone to add\n+00165 * Note, in this case, we assume stability. We also assume\n+00166 * that eta and phi are computed for v\n+00167 * return 0 on success, 1 on error\n+00168 ***********************************************************************/\n+00169 int sph_hash_cones::insert(CSphmomentum *v){\n+00170\n+sph_hash_element *elm;\n+int index = (v->ref.ref[0]) & mask;\n+00171\n+00172\n+//cout \u00ab \"-- stable candidate: \" \u00ab v->ref[0] \u00ab \":\" \u00ab endl;\n+00173\n+// check the array cell corresponding to our reference\n+00174\n+00175\n+elm = hash_array[index];\n+do{\n+00176\n+00177\n+// if it is not present, add it\n+00178\n+if (elm==NULL){\n+// create element\n+00179\n+00180\n+elm = new sph_hash_element;\n+00181\n+// set its varibles\n+00182\n+00183\n+// Note: at this level, eta and phi have already been computed\n+00184\n+//\n+through CSphmomentum::build_thetaphi.\n+00185\n+elm->centre = *v;\n+00186\n+elm->is_stable = true;\n+00187\n+// update hash\n+00188\n+00189\n+elm->next = hash_array[index];\n+00190\n+hash_array[index] = elm;\n+00191\n+00192\n+n_cones++;\n+return 0;\n+00193\n+00194\n+}\n+00195\n+00196\n+// if the cone is already there, we have nothing to do\n+00197\n+if (v->ref == elm->centre.ref){\n+return 0;\n+00198\n+00199\n+}\n+00200\n+00201\n+elm = elm->next;\n+00202\n+} while (1);\n+00203\n+00204\n+return 1;\n+00205 }\n+00206\n+00207 }\n+\n+5.20 hash.h\n+00001 // -*- C++ -*00003 // File: hash.h\n+//\n+00004 // Description: header file for classes hash_element and hash_cones\n+//\n+00005 // This file is part of the SISCone project.\n+//\n+00006 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00007 //\n+//\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+//\n+00009 //\n+//\n+00010 // This program is free software; you can redistribute it and/or modify\n //\n+00011 // it under the terms of the GNU General Public License as published by\n+//\n+00012 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00013 // (at your option) any later version.\n+//\n+00014 //\n+//\n+00015 // This program is distributed in the hope that it will be useful,\n+//\n+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00018 // GNU General Public License for more details.\n //\n+00019 //\n //\n+00020 // You should have received a copy of the GNU General Public License\n //\n+00021 // along with this program; if not, write to the Free Software\n //\n+00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00023 //\n //\n+00024 // $Revision:: 224\n+$//\n+00025 // $Date:: 2008-05-16 19:58:30 +0200 (Fri, 16 May 2008)\n+$//\n+00027\n+00028 #ifndef __HASH_H__\n+00029 #define __HASH_H__\n+00030\n \n-\f204\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+207\n+\n+\f208\n \n File Documentation\n \n+00031 #include \"momentum.h\"\n+00032 #include \"reference.h\"\n+00033\n+00034 namespace siscone{\n+00035\n+00045 class hash_element{\n+00046 public:\n+00047\n+Creference ref;\n+double eta;\n+00048\n+00049\n+double phi;\n+00050\n+bool is_stable;\n+00051\n+00052\n+hash_element *next;\n+00053 };\n+00054\n+00062 class hash_cones{\n+00063 public:\n+00067\n+hash_cones(int _Np, double _R2);\n+00068\n+00070\n+~hash_cones();\n+00071\n+int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io);\n+00081\n+00082\n+int insert(Cmomentum *v);\n+00090\n+00091\n+00093\n+hash_element **hash_array;\n+00094\n+int n_cones;\n+00096\n+00097\n+00099 #ifdef DEBUG_STABLE_CONES\n+00100\n+int n_occupied_cells;\n+00101 #endif\n+00102\n+00104\n+int mask;\n+00105\n+double R2;\n+00108\n+00109\n+inline bool is_inside(Cmomentum *centre, Cmomentum *v);\n+00118\n+00119 };\n+00120\n+00121 }\n+00122 #endif\n+\n+5.21 hash.h\n+00001 // -*- C++ -*00003 // File: hash.h\n+//\n+00004 // Description: header file for classes hash_element and hash_cones\n+//\n+00005 // This file is part of the SISCone project.\n+//\n+00006 // WARNING: this is not the main SISCone trunk but\n+//\n+00007 //\n+an adaptation to spherical coordinates\n+//\n+00008 // For more details, see http://projects.hepforge.org/siscone\n+//\n 00009 //\n //\n 00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n-//\n 00011 //\n //\n 00012 // This program is free software; you can redistribute it and/or modify\n //\n 00013 // it under the terms of the GNU General Public License as published by\n //\n 00014 // the Free Software Foundation; either version 2 of the License, or\n@@ -14934,123 +15613,784 @@\n 00022 // You should have received a copy of the GNU General Public License\n //\n 00023 // along with this program; if not, write to the Free Software\n //\n 00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n 00025 //\n //\n-00026 // $Revision:: 422\n+00026 // $Revision:: 294\n $//\n-00027 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020)\n+00027 // $Date:: 2009-05-01 17:15:04 +0200 (Fri, 01 May 2009)\n $//\n 00029\n-00030 #ifndef __SPH_GEOM_2D_H__\n-00031 #define __SPH_GEOM_2D_H__\n+00030 #ifndef __SPH_HASH_H__\n+00031 #define __SPH_HASH_H__\n 00032\n-00033 #include \n-00034 #include \n-00035 #include \n-00036 #include \n-00037\n-00038 #ifndef M_PI\n-00039 #define M_PI 3.141592653589793238462643383279502884197\n-00040 #endif\n-00041\n-00042 namespace siscone_spherical{\n+00033 #include \"momentum.h\"\n+00034\n+00035 namespace siscone_spherical{\n+00036\n+00046 class sph_hash_element{\n+00047 public:\n+00048\n+CSph3vector centre;\n+bool is_stable;\n+00049\n+\n+//\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.22 momentum.cpp\n+\n+00050\n+00051\n+sph_hash_element *next;\n+00052 };\n+00053\n+00061 class sph_hash_cones{\n+00062 public:\n+00065\n+sph_hash_cones(int _Np, double _radius);\n+00066\n+00068\n+~sph_hash_cones();\n+00069\n+00079\n+int insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool c_io);\n+00080\n+int insert(CSphmomentum *v);\n+00088\n+00089\n+00091\n+sph_hash_element **hash_array;\n+00092\n+int n_cones;\n+00094\n+00095\n+00097 #ifdef DEBUG_STABLE_CONES\n+00098\n+int n_occupied_cells;\n+00099 #endif\n+00100\n+00102\n+int mask;\n+00103\n+double R2;\n+00106\n+00107\n+double tan2R;\n+00109\n+00110 };\n+00111\n+00112 }\n+00113 #endif\n+\n+5.22 momentum.cpp\n+00001\n+00002 // File: momentum.cpp\n+//\n+00003 // Description: source file for 4-momentum class Cmomentum\n+//\n+00004 // This file is part of the SISCone project.\n+//\n+00005 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00006 //\n+//\n+00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+//\n+00008 //\n+//\n+00009 // This program is free software; you can redistribute it and/or modify\n+//\n+00010 // it under the terms of the GNU General Public License as published by\n+//\n+00011 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00012 // (at your option) any later version.\n+//\n+00013 //\n+//\n+00014 // This program is distributed in the hope that it will be useful,\n+//\n+00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00017 // GNU General Public License for more details.\n+//\n+00018 //\n+//\n+00019 // You should have received a copy of the GNU General Public License\n+//\n+00020 // along with this program; if not, write to the Free Software\n+//\n+00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00022 //\n+//\n+00023 // $Revision:: 123\n+$//\n+00024 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)\n+$//\n+00026\n+00027 #include \"momentum.h\"\n+00028 #include \n+00029 #include \n+00030\n+00031 namespace siscone{\n+00032\n+00033 /*************************************************************************\n+00034 * class Cmomentum\n+*\n+00035 * This class contains the information for particle or group of\n+*\n+00036 * particles management.\n+*\n+00037 * It includes all Lorentz properties as well as tools for summing them. *\n+00038 *************************************************************************/\n+00039\n+00040 // default ctor\n+00041 //-------------00042 Cmomentum::Cmomentum(){\n 00043\n-00052 class CSphtheta_phi_range{\n-00053 public:\n+eta = 0.0;\n+00044\n+phi = 0.0;\n+00045\n+px = py = pz = E = 0.0;\n+00046\n+ref = Creference();\n+00047\n+index = -1;\n+00048 }\n+00049\n+00050 // ctor with initialisation\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+209\n+\n+\f210\n+\n+File Documentation\n+\n+00051 //-------------------------00052 Cmomentum::Cmomentum(double _px, double _py, double _pz, double _E){\n+00053\n+px = _px;\n+00054\n+py = _py;\n 00055\n-CSphtheta_phi_range();\n+pz = _pz;\n 00056\n+E = _E;\n+00057\n+00058\n+// compute eta and phi\n+00059\n+build_etaphi();\n+00060\n+ref = Creference();\n+00061 }\n 00062\n-CSphtheta_phi_range(double c_theta, double c_phi, double R);\n-00063\n+00063 // ctor with detailed initialisation\n+00064 //----------------------------------00065 Cmomentum::Cmomentum(double _eta, double _phi, Creference _ref){\n 00066\n-CSphtheta_phi_range& operator = (const CSphtheta_phi_range &r);\n+eta = _eta;\n 00067\n-int add_particle(const double theta, const double phi);\n+phi = _phi;\n+00068\n+00069\n+ref = _ref;\n+00070 }\n+00071\n+00072 // default dtor\n+00073 //-------------00074 Cmomentum::~Cmomentum(){\n+00075\n+00076 }\n+00077\n+00078 // assignment of vectors\n+00079 //----------------------00080 Cmomentum& Cmomentum::operator = (const Cmomentum &v){\n+00081\n+px = v.px;\n+00082\n+py = v.py;\n+00083\n+pz = v.pz;\n+00084\n+E = v.E;\n+00085\n+00086\n+eta = v.eta;\n+00087\n+phi = v.phi;\n+00088\n+00089\n+ref = v.ref;\n+return *this;\n+00090\n+00091 }\n+00092\n+00093 // addition of vectors\n+00094 // !!! WARNING !!! no updating of eta and phi !!!\n+00095 //-----------------------------------------------00096 const Cmomentum Cmomentum::operator + (const Cmomentum &v){\n+00097\n+Cmomentum tmp = *this;\n+00098\n+return tmp+=v;\n+00099 }\n+00100\n+00101 // incrementation of vectors\n+00102 // !!! WARNING !!! no updating of eta and phi !!!\n+00103 //-----------------------------------------------00104 Cmomentum& Cmomentum::operator += (const Cmomentum &v){\n+00105\n+px+=v.px;\n+00106\n+py+=v.py;\n+00107\n+pz+=v.pz;\n+00108\n+E +=v.E;\n+00109\n+00110\n+ref+=v.ref;\n+00111\n+00112\n+return *this;\n+00113 }\n+00114\n+00115 // incrementation of vectors\n+00116 // !!! WARNING !!! no updating of eta and phi !!!\n+00117 //-----------------------------------------------00118 Cmomentum& Cmomentum::operator -= (const Cmomentum &v){\n+00119\n+px-=v.px;\n+00120\n+py-=v.py;\n+00121\n+pz-=v.pz;\n+00122\n+E -=v.E;\n+00123\n+00124\n+ref-=v.ref;\n+return *this;\n+00125\n+00126 }\n+00127\n+00128 // build eta-phi from 4-momentum info\n+00129 // !!!\n+WARNING\n+!!!\n+00130 // !!! computing eta and phi is time-consuming !!!\n+00131 // !!! use this whenever you need eta or phi\n+!!!\n+00132 // !!! automatically called for single-particle !!!\n+00133 //-------------------------------------------------00134 void Cmomentum::build_etaphi(){\n+// note: the factor n (ref.nb) cancels in all expressions !!\n+00135\n+00136\n+eta = 0.5*log((E+pz)/(E-pz));\n+00137\n+phi = atan2(py,px);\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.23 momentum.cpp\n+\n+211\n+\n+00138 }\n+00139\n+00140\n+00141 // ordering of two vectors\n+00142 // the default ordering is w.r.t. their references\n+00143 //------------------------------------------------00144 bool operator < (const Cmomentum &v1, const Cmomentum &v2){\n+00145\n+return v1.ref < v2.ref;\n+00146 }\n+00147\n+00148 // ordering of vectors in eta (e.g. used in collinear tests)\n+00149 //----------------------------------------------------------00150 bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2){\n+return v1.eta < v2.eta;\n+00151\n+00152 }\n+00153\n+00154 // ordering of vectors in pt\n+00155 //--------------------------00156 bool momentum_pt_less(const Cmomentum &v1, const Cmomentum &v2){\n+00157\n+return v1.perp2() < v2.perp2();\n+00158 }\n+00159\n+00160 }\n+00161\n+\n+5.23 momentum.cpp\n+00001\n+00002 // File: momentum.cpp\n+//\n+00003 // Description: source file for 4-momentum class Cmomentum\n+//\n+00004 // This file is part of the SISCone project.\n+//\n+00005 // WARNING: this is not the main SISCone trunk but\n+//\n+00006 //\n+an adaptation to spherical coordinates\n+//\n+00007 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00008 //\n+//\n+00009 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n+00010 //\n+//\n+00011 // This program is free software; you can redistribute it and/or modify\n+//\n+00012 // it under the terms of the GNU General Public License as published by\n+//\n+00013 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00014 // (at your option) any later version.\n+//\n+00015 //\n+//\n+00016 // This program is distributed in the hope that it will be useful,\n+//\n+00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00019 // GNU General Public License for more details.\n+//\n+00020 //\n+//\n+00021 // You should have received a copy of the GNU General Public License\n+//\n+00022 // along with this program; if not, write to the Free Software\n+//\n+00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00024 //\n+//\n+00025 // $Revision:: 255\n+$//\n+00026 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008)\n+$//\n+00028\n+00029 #include \"momentum.h\"\n+00030 #include \n+00031 #include \n+00032\n+00033 namespace siscone_spherical{\n+00034\n+00035 /*************************************************************************\n+00036 * class CSph3vector\n+*\n+00037 * This class contains the information for particle or group of\n+*\n+00038 * particles management.\n+*\n+00039 *************************************************************************/\n+00040\n+00041 // default ctor\n+00042 //-------------00043 CSph3vector::CSph3vector(){\n+00044\n+_theta = _phi = _norm = 0.0;\n+00045\n+px = py = pz = 0.0;\n+00046\n+ref = siscone::Creference();\n+00047 }\n+00048\n+00049 // ctor with initialisation\n+00050 //-------------------------00051 CSph3vector::CSph3vector(double _px, double _py, double _pz){\n+00052\n+px = _px;\n+00053\n+py = _py;\n+00054\n+pz = _pz;\n+00055\n+00056\n+// compute the norm\n+00057\n+build_norm();\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+//\n+\n+\f212\n+\n+File Documentation\n+\n+00058\n+00059\n+ref = siscone::Creference();\n+00060 }\n+00061\n+00062 // default dtor\n+00063 //-------------00064 CSph3vector::~CSph3vector(){\n+00065\n+00066 }\n+00067\n+00068\n+00069 // assignment of vectors\n+00070 //----------------------00071 CSph3vector& CSph3vector::operator = (const CSph3vector &v){\n 00072\n+px = v.px;\n 00073\n-unsigned int theta_range;\n+py = v.py;\n+00074\n+pz = v.pz;\n 00075\n 00076\n-unsigned int phi_range;\n+_norm = v._norm;\n+00077\n+_theta = v._theta;\n 00078\n+_phi\n+= v._phi;\n 00079\n+00080\n+ref = v.ref;\n 00081\n-static double theta_min;\n-static double theta_max;\n-00082\n+return *this;\n+00082 }\n 00083\n-00084 private:\n-00086\n-inline unsigned int get_theta_cell(double theta){\n-if (theta>=theta_max) return 1u\u00ab31;\n+00084 // addition of vectors\n+00085 //-----------------------------------------------00086 const CSph3vector CSph3vector::operator + (const CSph3vector &v){\n 00087\n+CSph3vector tmp = *this;\n 00088\n-return (unsigned int) (1u \u00ab ((int) (32*((theta-theta_min)/(theta_max-theta_min)))));\n-00089\n-}\n+return tmp+=v;\n+00089 }\n 00090\n-00092\n-inline unsigned int get_phi_cell(double phi){\n-return (unsigned int) (1u \u00ab ((int) (32*phi/twopi+16)%32));\n-00093\n+00091 // subtraction of vectors\n+00092 //-----------------------------------------------00093 const CSph3vector CSph3vector::operator - (const CSph3vector &v){\n 00094\n-}\n-00095 };\n-00096\n-00101 bool is_range_overlap(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2);\n+CSph3vector tmp = *this;\n+00095\n+return tmp-=v;\n+00096 }\n+00097\n+00098 // division by constant\n+00099 //-----------------------------------------------00100 const CSph3vector CSph3vector::operator / (const double &r){\n+00101\n+CSph3vector tmp = *this;\n 00102\n-00108 const CSphtheta_phi_range range_union(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2);\n+return tmp/=r;\n+00103 }\n+00104\n+00105 // incrementation\n+00106 //-----------------------------------------------00107 CSph3vector& CSph3vector::operator += (const CSph3vector &v){\n+00108\n+px+=v.px;\n 00109\n-00110 }\n+py+=v.py;\n+00110\n+pz+=v.pz;\n 00111\n-00112 #endif\n+return *this;\n+00112\n+00113 }\n+00114\n+00115 // decrementation\n+00116 //-----------------------------------------------00117 CSph3vector& CSph3vector::operator -= (const CSph3vector &v){\n+00118\n+px-=v.px;\n+00119\n+py-=v.py;\n+00120\n+pz-=v.pz;\n+00121\n+00122\n+return *this;\n+00123 }\n+00124\n+00125 // multiplication by a constant\n+00126 //-----------------------------------------------00127 CSph3vector& CSph3vector::operator *= (const double &r){\n+00128\n+px*=r;\n+00129\n+py*=r;\n+00130\n+pz*=r;\n+00131\n+00132\n+return *this;\n+00133 }\n+00134\n+00135 // division by a constant\n+00136 //-----------------------------------------------00137 CSph3vector& CSph3vector::operator /= (const double &r){\n+00138\n+px/=r;\n+00139\n+py/=r;\n+00140\n+pz/=r;\n+00141\n+00142\n+_norm/=r;\n+00143\n+00144\n+return *this;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.23 momentum.cpp\n+\n+00145 }\n+00146\n+00147 // build norm from 3-momentum info\n+00148 void CSph3vector::build_norm(){\n+00149\n+_norm = norm();\n+00150 }\n+00151\n+00152 // build norm from 3-momentum info\n+00153 void CSph3vector::build_thetaphi(){\n+00154\n+_theta = theta();\n+00155\n+_phi = phi();\n+00156 }\n+00157\n+00158\n+00159 // for this direction, compute the two reference directions\n+00160 // used to measure angles\n+00161 void CSph3vector::get_angular_directions(CSph3vector &angular_dir1, CSph3vector &angular_dir2){\n+00162\n+if (px < py){\n+if (pz < px){\n+00163\n+00164\n+// z smallest\n+00165\n+angular_dir1 = CSph3vector(-py, px, 0.0);\n+00166\n+} else {\n+00167\n+// x smallest\n+00168\n+angular_dir1 = CSph3vector(0.0, -pz, py);\n+00169\n+}\n+00170\n+} else {\n+00171\n+if (pz < py){\n+// z smallest\n+00172\n+00173\n+angular_dir1 = CSph3vector(-py, px, 0.0);\n+00174\n+} else {\n+// y smallest\n+00175\n+00176\n+angular_dir1 = CSph3vector(-pz, 0.0, px);\n+00177\n+}\n+00178\n+}\n+00179\n+angular_dir2 = cross_product3(*this, angular_dir1);\n+00180\n+// We\u2019ll simply take x & y so the reflection symmetry is not broken\n+00181\n+//angular_dir1 = CSph3vector(0.0, -pz, py);\n+00182\n+//angular_dir2 = CSph3vector(-pz, 0.0, -px);\n+00183 }\n+00184\n+00185 /*************************************************************************\n+00186 * class CSphmomentum\n+*\n+00187 * This class contains the information for particle or group of\n+*\n+00188 * particles management.\n+*\n+00189 * It includes all Lorentz properties as well as tools for summing them. *\n+00190 *************************************************************************/\n+00191\n+00192 // default ctor\n+00193 //-------------00194 CSphmomentum::CSphmomentum(){\n+00195\n+E=0.0;\n+00196\n+index = -1;\n+00197 }\n+00198\n+00199 // ctor with initialisation\n+00200 //-------------------------00201 CSphmomentum::CSphmomentum(double _px, double _py, double _pz, double _E)\n+00202\n+: CSph3vector(_px, _py, _pz) {\n+00203\n+E = _E;\n+00204\n+00205\n+// compute the angles\n+00206\n+build_thetaphi();\n+00207 }\n+00208\n+00209 // ctor with initialisation\n+00210 //-------------------------00211 CSphmomentum::CSphmomentum(CSph3vector &_v, double _E)\n+00212\n+: CSph3vector(_v.px, _v.py, _v.pz) {\n+00213\n+E = _E;\n+00214 }\n+00215\n+00216 // default dtor\n+00217 //-------------00218 CSphmomentum::~CSphmomentum(){\n+00219\n+00220 }\n+00221\n+00222 // assignment of vectors\n+00223 //----------------------00224 CSphmomentum& CSphmomentum::operator = (const CSphmomentum &v){\n+00225\n+px = v.px;\n+00226\n+py = v.py;\n+00227\n+pz = v.pz;\n+00228\n+E = v.E;\n+00229\n+00230\n+_norm = v._norm;\n+00231\n+_theta = v._theta;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+213\n+\n+\f214\n+\n+File Documentation\n+\n+00232\n+_phi\n+= v._phi;\n+00233\n+00234\n+ref = v.ref;\n+return *this;\n+00235\n+00236 }\n+00237\n+00238 // addition of vectors\n+00239 // !!! WARNING !!! no updating of eta and phi !!!\n+00240 //-----------------------------------------------00241 const CSphmomentum CSphmomentum::operator + (const CSphmomentum &v){\n+00242\n+CSphmomentum tmp = *this;\n+00243\n+return tmp+=v;\n+00244 }\n+00245\n+00246 // incrementation of vectors\n+00247 // !!! WARNING !!! no updating of eta and phi !!!\n+00248 //-----------------------------------------------00249 CSphmomentum& CSphmomentum::operator += (const CSphmomentum &v){\n+00250\n+px+=v.px;\n+00251\n+py+=v.py;\n+00252\n+pz+=v.pz;\n+00253\n+E +=v.E;\n+00254\n+00255\n+ref+=v.ref;\n+00256\n+return *this;\n+00257\n+00258 }\n+00259\n+00260 // decrementation of vectors\n+00261 // !!! WARNING !!! no updating of eta and phi !!!\n+00262 //-----------------------------------------------00263 CSphmomentum& CSphmomentum::operator -= (const CSphmomentum &v){\n+00264\n+px-=v.px;\n+00265\n+py-=v.py;\n+00266\n+pz-=v.pz;\n+00267\n+E -=v.E;\n+00268\n+00269\n+ref-=v.ref;\n+return *this;\n+00270\n+00271 }\n+00272\n+00273\n+00274 // ordering of two vectors\n+00275 // the default ordering is w.r.t. their references\n+00276 //------------------------------------------------00277 bool operator < (const CSphmomentum &v1, const CSphmomentum &v2){\n+return v1.ref < v2.ref;\n+00278\n+00279 }\n+00280\n+00281 // ordering of vectors in eta (e.g. used in collinear tests)\n+00282 //----------------------------------------------------------00283 bool momentum_theta_less(const CSphmomentum &v1, const CSphmomentum &v2){\n+00284\n+return v1._theta < v2._theta;\n+00285 }\n+00286\n+00287 // ordering of vectors in pt\n+00288 //--------------------------00289 bool momentum_pt_less(const CSphmomentum &v1, const CSphmomentum &v2){\n+return v1.perp2() < v2.perp2();\n+00290\n+00291 }\n+00292\n+00293 }\n+00294\n \n-5.20 momentum.h\n+5.24 momentum.h\n 00001 // -*- C++ -*00003 // File: momentum.h\n 00004 // Description: header file for 4-momentum class Cmomentum\n 00005 // This file is part of the SISCone project.\n 00006 // For more details, see http://projects.hepforge.org/siscone\n 00007 //\n 00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n 00009 //\n 00010 // This program is free software; you can redistribute it and/or modify\n 00011 // it under the terms of the GNU General Public License as published by\n 00012 // the Free Software Foundation; either version 2 of the License, or\n+00013 // (at your option) any later version.\n+00014 //\n+00015 // This program is distributed in the hope that it will be useful,\n+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+00018 // GNU General Public License for more details.\n \n //\n //\n //\n //\n //\n //\n //\n //\n //\n //\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.20 momentum.h\n-\n-00013 // (at your option) any later version.\n //\n-00014 //\n //\n-00015 // This program is distributed in the hope that it will be useful,\n //\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n //\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n //\n-00018 // GNU General Public License for more details.\n //\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.24 momentum.h\n+\n 00019 //\n //\n 00020 // You should have received a copy of the GNU General Public License\n //\n 00021 // along with this program; if not, write to the Free Software\n //\n 00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n@@ -15082,34 +16422,34 @@\n 00056\n 00058\n Cmomentum(double _eta, double _phi, Creference _ref);\n 00059\n 00061\n ~Cmomentum();\n 00062\n-inline double perp() const {return sqrt(perp2());}\n 00064\n+inline double perp() const {return sqrt(perp2());}\n 00065\n inline double perp2() const {return px*px+py*py;}\n 00067\n 00068\n inline double mass() const {return sqrt(mass2());}\n 00070\n 00071\n-00073\n inline double mass2() const {return perpmass2()-perp2();}\n+00073\n 00074\n inline double perpmass() const {return sqrt((E-pz)*(E+pz));}\n 00076\n 00077\n inline double perpmass2() const {return (E-pz)*(E+pz);}\n 00079\n 00080\n-inline double Et() const {return E/sqrt(1.0+pz*pz/perp2());}\n 00082\n+inline double Et() const {return E/sqrt(1.0+pz*pz/perp2());}\n 00083\n inline double Et2() const {return E*E/(1.0+pz*pz/perp2());}\n 00085\n 00086\n 00088\n Cmomentum& operator = (const Cmomentum &v);\n 00089\n@@ -15121,31 +16461,31 @@\n 00097\n 00100\n Cmomentum& operator -= (const Cmomentum &v);\n 00101\n void build_etaphi();\n 00107\n 00108\n-double px;\n 00109\n-00110\n+double px;\n double py;\n-double pz;\n+00110\n 00111\n-00112\n+double pz;\n double E;\n+00112\n 00113\n-double eta;\n 00114\n-00115\n+double eta;\n double phi;\n-int parent_index;\n+00115\n 00116\n-00117\n+int parent_index;\n int index;\n+00117\n 00118\n // the following part is used for checksums //\n 00120\n 00122\n Creference ref;\n 00123 };\n 00124\n@@ -15158,41 +16498,41 @@\n 00135\n 00137 // some handy utilities //\n 00139\n 00144 inline double get_distance(double eta, double phi, Cmomentum *v){\n double dx, dy;\n 00145\n 00146\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-205\n-\n-\f206\n-\n-File Documentation\n-\n 00147\n dx = eta - v->eta;\n 00148\n dy = fabs(phi - v->phi);\n-if (dy>M_PI)\n 00149\n+if (dy>M_PI)\n 00150\n dy -= twopi;\n 00151\n 00152\n return dx*dx+dy*dy;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+215\n+\n+\f216\n+\n+File Documentation\n+\n 00153 }\n 00154\n 00155 }\n 00156\n 00157 #endif\n \n-5.21 momentum.h\n+5.25 momentum.h\n 00001 // -*- C++ -*00003 // File: momentum.h\n //\n 00004 // Description: header file for 4-momentum class Cmomentum\n //\n 00005 // This file is part of the SISCone project.\n //\n 00006 // WARNING: this is not the main SISCone trunk but\n@@ -15288,53 +16628,53 @@\n 00095\n inline double perp() const {return sqrt(perp2());}\n 00097\n 00098\n inline double perp2() const {return px*px+py*py;}\n 00100\n 00101\n-00103\n inline double norm() const {return sqrt(px*px+py*py+pz*pz);}\n+00103\n 00104\n inline double norm2() const {return px*px+py*py+pz*pz;}\n 00106\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.21 momentum.h\n-\n 00107\n inline double phi() const {return atan2(py, px);}\n 00109\n 00110\n-inline double theta() const {return atan2(perp(),pz);}\n 00112\n+inline double theta() const {return atan2(perp(),pz);}\n 00113\n-00120\n void build_norm();\n+00120\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.25 momentum.h\n+\n 00121\n void build_thetaphi();\n 00125\n 00126\n void get_angular_directions(CSph3vector &angular_dir1, CSph3vector &angular_dir2);\n 00129\n 00130\n-double px;\n 00131\n-00132\n+double px;\n double py;\n-double pz;\n+00132\n 00133\n+double pz;\n 00134\n double _norm;\n 00135\n 00136\n double _theta;\n-00137\n double _phi;\n+00137\n 00138\n // the following part is used for checksums //\n 00140\n 00142\n siscone::Creference ref;\n 00143 };\n 00144\n@@ -15360,16 +16700,16 @@\n 00177\n inline double mass2() const {return perpmass2()-perp2();}\n 00179\n 00180\n inline double perpmass() const {return sqrt((E-pz)*(E+pz));}\n 00182\n 00183\n-00185\n inline double perpmass2() const {return (E-pz)*(E+pz);}\n+00185\n 00186\n inline double Et() const {return E/sqrt(1.0+pz*pz/perp2());}\n 00188\n 00189\n inline double Et2() const {return E*E/(1.0+pz*pz/perp2());}\n 00191\n 00192\n@@ -15381,21 +16721,21 @@\n 00199\n 00202\n CSphmomentum& operator += (const CSphmomentum &v);\n 00203\n 00206\n CSphmomentum& operator -= (const CSphmomentum &v);\n 00207\n-00208\n double E;\n+00208\n 00209\n int parent_index;\n 00210\n-int index;\n 00211\n+int index;\n 00212 };\n 00213\n 00216 bool operator < (const CSphmomentum &v1, const CSphmomentum &v2);\n 00217\n 00219 bool momentum_theta_less(const CSphmomentum &v1, const CSphmomentum &v2);\n 00220\n 00222 bool momentum_pt_less(const CSphmomentum &v1, const CSphmomentum &v2);\n@@ -15428,166 +16768,3048 @@\n 00244 }\n 00245\n 00249 inline CSph3vector cross_product3(const CSph3vector &v1, const CSph3vector &v2){\n //CSph3vector tmp;\n 00250\n 00251\n //tmp.px = v1.py*v2.pz-v1.pz*v2.py;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-207\n-\n-\f208\n-\n-File Documentation\n-\n 00252\n //tmp.py = v1.pz*v2.px-v1.px*v2.pz;\n 00253\n //tmp.pz = v1.px*v2.py-v1.py*v2.px;\n 00254\n //return tmp;\n 00255\n return CSph3vector(v1.py*v2.pz-v1.pz*v2.py,\n 00256\n v1.pz*v2.px-v1.px*v2.pz,\n 00257\n v1.px*v2.py-v1.py*v2.px);\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+217\n+\n+\f218\n+\n+File Documentation\n+\n 00258 }\n 00259\n 00263 inline double norm2_cross_product3(const CSph3vector &v1, const CSph3vector &v2){\n-00264\n return sqr(v1.py*v2.pz-v1.pz*v2.py) + sqr(v1.pz*v2.px-v1.px*v2.pz) + sqr(v1.px*v2.py-v1.py*v2.px);\n+00264\n 00265 }\n 00266\n 00270 inline double get_tan2_distance(const CSphmomentum &v1, const CSphmomentum &v2){\n-return norm2_cross_product3(v1,v2)/sqr(dot_product3(v1,v2));\n 00271\n+return norm2_cross_product3(v1,v2)/sqr(dot_product3(v1,v2));\n 00272 }\n 00273\n 00277 inline double get_distance(const CSph3vector *v1, const CSph3vector *v2){\n-00278\n return atan2(sqrt(norm2_cross_product3(*v1,*v2)), dot_product3(*v1,*v2));\n+00278\n 00279 }\n 00280\n 00289 inline bool is_closer(const CSph3vector *v1, const CSph3vector *v2, const double tan2R){\n-00290\n double dot = dot_product3(*v1,*v2);\n+00290\n 00291\n return (dot>=0) && (norm2_cross_product3(*v1,*v2)<=tan2R*dot*dot);\n 00292 }\n 00293\n 00299 inline bool is_closer_safer(const CSph3vector *v1, const CSph3vector *v2, const double cosR){\n-00300\n return dot_product3(*v1,*v2)>=cosR*sqrt(v1->norm2()*v2->norm2());\n-//double dot = dot_product3(*v1,*v2);\n+00300\n 00301\n+//double dot = dot_product3(*v1,*v2);\n 00302\n //return (dot>=0) && (norm2_cross_product3(*v1,*v2)\n-00034 #include \n-00035 #include \n-00036 #include \"hash.h\"\n-00037\n-00038 #include \"defines.h\"\n-00039\n-00040 namespace siscone{\n-00041\n-00053 class Cborder_store{\n-00054 public:\n-00056\n-Cborder_store(Cmomentum * momentum, double centre_eta, double centre_phi) :\n-00057\n-mom(momentum), is_in(false) {\n+00026\n+00027 /*******************************************************\n+00028 * Introductory note:\n+*\n+00029 * Since this file has many member functions, we have *\n+00030 * structured them in categories:\n+*\n+00031 * INITIALISATION FUNCTIONS\n+*\n+00032 * - ctor()\n+*\n+00033 * - ctor(particle_list)\n+*\n+00034 * - dtor()\n+*\n+00035 * - init(particle_list)\n+*\n+00036 * ALGORITHM MAIN ENTRY\n+*\n+00037 * - get_stable_cone(radius)\n+*\n+00038 * ALGORITHM MAIN STEPS\n+*\n+00039 * - init_cone()\n+*\n+00040 * - test_cone()\n+*\n+00041 * - update_cone()\n+*\n+00042 * - proceed_with_stability()\n+*\n+00043 * ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n+*\n+00044 * - cocircular_pt_less(v1, v2)\n+*\n+00045 * - prepare_cocircular_list()\n+*\n+00046 * - test_cone_cocircular()\n+*\n+00047 * - test_stability(candidate, border_list)\n+*\n+00048 * - updat_cone_cocircular()\n+*\n+00049 * RECOMPUTATION OF CONE CONTENTS\n+*\n+00050 * - compute_cone_contents()\n+*\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n-\f5.22 protocones.h\n+\f5.26 protocones.cpp\n \n+00051 * - recompute_cone_contents()\n+*\n+00052 * - recompute_cone_contents_if_needed()\n+*\n+00053 * VARIOUS TOOLS\n+*\n+00054 * - circle_intersect()\n+*\n+00055 * - is_inside()\n+*\n+00056 * - abs_dangle()\n+*\n+00057 *******************************************************/\n 00058\n-angle = atan2(mom->phi - centre_phi, mom->eta - centre_eta);\n-00059\n-}\n-00060\n-00061\n-Cmomentum * mom;\n-double angle;\n-00062\n-00063\n-bool\n-is_in;\n-00064 };\n-00065\n+00059 #include \"protocones.h\"\n+00060 #include \"siscone_error.h\"\n+00061 #include \"defines.h\"\n+00062 #include \n+00063 #include \n+00064 #include \"circulator.h\"\n+00065 #include \n 00066\n-00069 inline bool operator<(const Cborder_store & a, const Cborder_store & b) {\n-00070\n+00067 namespace siscone{\n+00068\n+00069 using namespace std;\n+00070\n+00071 /**********************************************************************\n+00072 * Cstable_cones implementation\n+*\n+00073 * Computes the list of stable comes from a particle list.\n+*\n+00074 * This class does the first fundamental task of te cone algorithm:\n+*\n+00075 * it is used to compute the list of stable cones given a list\n+*\n+00076 * of particles.\n+*\n+00077 **********************************************************************/\n+00078\n+00080 // INITIALISATION FUNCTIONS\n+//\n+00081 // - ctor()\n+//\n+00082 // - ctor(particle_list)\n+//\n+00083 // - dtor()\n+//\n+00084 // - init(particle_list)\n+//\n+00086\n+00087 // default ctor\n+00088 //-------------00089 Cstable_cones::Cstable_cones(){\n+00090\n+nb_tot = 0;\n+00091\n+hc = NULL;\n+00092 }\n+00093\n+00094 // ctor with initialisation\n+00095 //-------------------------00096 Cstable_cones::Cstable_cones(vector &_particle_list)\n+00097\n+: Cvicinity(_particle_list){\n+00098\n+00099\n+nb_tot = 0;\n+00100\n+hc = NULL;\n+00101 }\n+00102\n+00103 // default dtor\n+00104 //-------------00105 Cstable_cones::~Cstable_cones(){\n+if (hc!=NULL) delete hc;\n+00106\n+00107 }\n+00108\n+00109 /*\n+00110 * initialisation\n+00111 * - _particle_list list of particles\n+00112 * - _n\n+number of particles\n+00113 *********************************************************************/\n+00114 void Cstable_cones::init(vector &_particle_list){\n+00115\n+// check already allocated mem\n+00116\n+if (hc!=NULL){\n+00117\n+delete hc;\n+00118\n+}\n+if (protocones.size()!=0)\n+00119\n+00120\n+protocones.clear();\n+00121\n+00122\n+multiple_centre_done.clear();\n+00123\n+00124\n+// initialisation\n+00125\n+set_particle_list(_particle_list);\n+00126 }\n+00127\n+00128\n+00130 // ALGORITHM MAIN ENTRY\n+//\n+00131 // - get_stable_cone(radius)\n+//\n+00133\n+00134 /*\n+00135 * compute stable cones.\n+00136 * This function really does the job i.e. computes\n+00137 * the list of stable cones (in a seedless way)\n+00138 * - _radius: radius of the cones\n+00139 * The number of stable cones found is returned\n+00140 *********************************************************************/\n+00141 int Cstable_cones::get_stable_cones(double _radius){\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+219\n+\n+\f220\n+\n+File Documentation\n+\n+00142\n+int p_idx;\n+00143\n+// check if everything is correctly initialised\n+00144\n+00145\n+if (n_part==0){\n+00146\n+return 0;\n+00147\n+}\n+00148\n+00149\n+R = _radius;\n+00150\n+R2 = R*R;\n+00151\n+00152\n+// allow hash for cones candidates\n+00153\n+hc = new hash_cones(n_part, R2);\n+00154\n+// browse all particles\n+00155\n+00156\n+for (p_idx=0;p_idxv;\n+00216\n+centre_idx = first_cone;\n+00217\n+00218\n+// build the initial cone (nodist: avoids calculating distances -00219\n+// just deduces contents by circulating around all in/out operations)\n+00220\n+// this function also sets the list of included particles\n+00221\n+compute_cone_contents();\n+00222\n+return 0;\n+00223\n+00224 }\n+00225\n+00226\n+00227 /*\n+00228 * test cones.\n+00229 * We check if the cone(s) built with the present parent and child\n+00230 * are stable\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.26 protocones.cpp\n+\n+00231 * return 0 on success 1 on error\n+00232 *********************************************************************/\n+00233 int Cstable_cones::test_cone(){\n+00234\n+Creference weighted_cone_ref;\n+00235\n+00236\n+// depending on the side we are taking the child particle,\n+00237\n+// we test different configuration.\n+00238\n+// Each time, two configurations are tested in such a way that\n+00239\n+// all 4 possible cases (parent or child in or out the cone)\n+00240\n+// are tested when taking the pair of particle parent+child\n+00241\n+// and child+parent.\n+00242\n+00243\n+// here are the tests entering the first series:\n+00244\n+// 1. check if the cone is already inserted\n+00245\n+// 2. check cone stability for the parent and child particles\n+00246\n+00247\n+if (centre->side){\n+00248\n+// test when both particles are not in the cone\n+00249\n+// or when both are in.\n+00250\n+// Note: for the totally exclusive case, test emptyness before\n+00251\n+cone_candidate = cone;\n+00252\n+if (cone.ref.not_empty()){\n+00253\n+hc->insert(&cone_candidate, parent, child, false, false);\n+00254\n+}\n+00255\n+00256\n+cone_candidate = cone;\n+00257\n+cone_candidate+= *parent + *child;\n+00258\n+hc->insert(&cone_candidate, parent, child, true, true);\n+00259\n+} else {\n+00260\n+// test when 1! of the particles is in the cone\n+00261\n+cone_candidate = cone + *parent;\n+00262\n+hc->insert(&cone_candidate, parent, child, true, false);\n+00263\n+00264\n+cone_candidate = cone + *child;\n+00265\n+hc->insert(&cone_candidate, parent, child, false, true);\n+00266\n+}\n+00267\n+00268\n+nb_tot+=2;\n+00269\n+return 0;\n+00270\n+00271 }\n+00272\n+00273\n+00274 /*\n+00275 * update the cone\n+00276 * go to the next child for that parent and update \u2019cone\u2019 appropriately\n+00277 * return 0 if update candidate found, 1 otherwise\n+00278 ***********************************************************************/\n+00279 int Cstable_cones::update_cone(){\n+// get the next child and centre\n+00280\n+00281\n+centre_idx++;\n+if (centre_idx==vicinity_size)\n+00282\n+00283\n+centre_idx=0;\n+if (centre_idx==first_cone)\n+00284\n+00285\n+return 1;\n+00286\n+// update the cone w.r.t. the old child\n+00287\n+00288\n+// only required if the old child is entering inside in which\n+00289\n+// case we need to add it. We also know that the child is\n+00290\n+// inside iff its side is -.\n+00291\n+if (!centre->side){\n+// update cone\n+00292\n+00293\n+cone += (*child);\n+00294\n+// update info on particles inside\n+00295\n+00296\n+centre->is_inside->cone = true;\n+00297\n+00298\n+// update stability check quantities\n+00299\n+dpt += fabs(child->px)+fabs(child->py);\n+00300\n+}\n+00301\n+00302\n+// update centre and child to correspond to the new position\n+00303\n+centre = vicinity[centre_idx];\n+00304\n+child = centre->v;\n+00305\n+00306\n+// check cocircularity\n+00307\n+// note that if cocirculaity is detected (i.e. if we receive 1\n+00308\n+// in the next test), we need to recall \u2019update_cone\u2019 directly\n+00309\n+// since tests and remaining part of te update has been performed\n+00310\n+//if (cocircular_check())\n+00311\n+if (cocircular_check())\n+00312\n+return update_cone();\n+00313\n+00314\n+// update the cone w.r.t. the new child\n+00315\n+00316\n+// only required if the new child was already inside in which\n+00317\n+// case we need to remove it. We also know that the child is\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+221\n+\n+\f222\n+\n+File Documentation\n+\n+00318\n+// inside iff its side is +.\n+00319\n+if ((centre->side) && (cone.ref.not_empty())){\n+00320\n+// update cone\n+00321\n+cone -= (*child);\n+00322\n+00323\n+// update info on particles inside\n+00324\n+centre->is_inside->cone = false;\n+00325\n+// update stability check quantities\n+00326\n+00327\n+dpt += fabs(child->px)+fabs(child->py); //child->perp2();\n+00328\n+}\n+00329\n+// check that the addition and subtraction of vectors does\n+00330\n+00331\n+// not lead to too much rounding error\n+00332\n+// for that, we compute the sum of pt modifications and of |pt|\n+00333\n+// since last recomputation and once the ratio overpasses a threshold\n+00334\n+// we recompute vicinity.\n+00335\n+if ((dpt>PT_TSHOLD*(fabs(cone.px)+fabs(cone.py))) && (cone.ref.not_empty())){\n+00336\n+recompute_cone_contents();\n+00337\n+}\n+if (cone.ref.is_empty()){\n+00338\n+00339\n+cone = Cmomentum();\n+00340\n+dpt=0.0;\n+00341\n+}\n+00342\n+return 0;\n+00343\n+00344 }\n+00345\n+00346\n+00347 /*\n+00348 * compute stability of all enumerated candidates.\n+00349 * For all candidate cones which are stable w.r.t. their border particles,\n+00350 * pass the last test: stability with quadtree intersection\n+00351 ************************************************************************/\n+00352 int Cstable_cones::proceed_with_stability(){\n+00353\n+int i; // ,n;\n+00354\n+hash_element *elm;\n+00355\n+//n=0;\n+00356\n+00357\n+for (i=0;i<=hc->mask;i++){\n+00358\n+// test ith cell of the hash array\n+00359\n+elm = hc->hash_array[i];\n+00360\n+// browse elements therein\n+00361\n+00362\n+while (elm!=NULL){\n+00363\n+// test stability\n+00364\n+if (elm->is_stable){\n+00365\n+// stability is not ensured by all pairs of \"edges\" already browsed\n+00366 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n+00367\n+// => testing stability with quadtree intersection\n+00368\n+if (quadtree->circle_intersect(elm->eta, elm->phi, R2)==elm->ref){\n+00369 #else\n+00370\n+// => testing stability with the particle-list intersection\n+00371\n+if (circle_intersect(elm->eta, elm->phi)==elm->ref){\n+00372 #endif\n+00373\n+// add it to the list of protocones\n+00374\n+// note that in its present form, we do not allocate the\n+00375\n+// 4-vector components of the momentum. There\u2019s no need to\n+00376\n+// do it here as it will be recomputed in\n+00377\n+//\n+Csplit_merge::add_protocones\n+00378\n+protocones.push_back(Cmomentum(elm->eta, elm->phi, elm->ref));\n+00379\n+}\n+00380\n+}\n+00381\n+// jump to the next one\n+00382\n+00383\n+elm = elm->next;\n+00384\n+}\n+00385\n+}\n+00386\n+00387\n+// free hash\n+00388\n+// we do that at this level because hash eats rather a lot of memory\n+00389\n+// we want to free it before running the split/merge algorithm\n+00390 #ifdef DEBUG_STABLE_CONES\n+00391\n+nb_hash_cones = hc->n_cones;\n+00392\n+nb_hash_occupied = hc->n_occupied_cells;\n+00393 #endif\n+00394\n+delete hc;\n+00395\n+00396\n+hc=NULL;\n+00397\n+00398\n+return protocones.size();\n+00399 }\n+00400\n+00401\n+//\n+00403 // ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n+00404 // - cocircular_pt_less(v1, v2)\n+//\n+00405 // - prepare_cocircular_list()\n+//\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.26 protocones.cpp\n+\n+00406 // - test_cone_cocircular()\n+//\n+00407 // - test_stability(candidate, border_vect)\n+//\n+00408 // - updat_cone_cocircular()\n+//\n+00410\n+00412 bool cocircular_pt_less(Cmomentum *v1, Cmomentum *v2){\n+00413\n+return v1->perp2() < v2->perp2();\n+00414 }\n+00415\n+00416 /*\n+00417 * run through the vicinity of the current parent and for each child\n+00418 * establish which other members are cocircular... Note that the list\n+00419 * associated with each child contains references to vicinity\n+00420 * elements: thus two vicinity elements each associated with one given\n+00421 * particle may appear in a list -- this needs to be watched out for\n+00422 * later on...\n+00423 **********************************************************************/\n+00424 void Cstable_cones::prepare_cocircular_lists() {\n+00425\n+circulator::iterator > here(vicinity.begin(),\n+00426\n+vicinity.begin(),\n+00427\n+vicinity.end());\n+00428\n+00429\n+circulator::iterator > search(here);\n+00430\n+00431\n+do {\n+00432\n+Cvicinity_elm* here_pntr = *here();\n+00433\n+search.set_position(here);\n+00434\n+// search forwards for things that should have \"here\" included in\n+00435\n+00436\n+// their cocircularity list\n+00437\n+while (true) {\n+00438\n+++search;\n+if ( abs_dphi((*search())->angle, here_pntr->angle) <\n+00439\n+00440\n+here_pntr->cocircular_range\n+00441\n+&& search() != here()) {\n+00442\n+(*search())->cocircular.push_back(here_pntr);\n+00443\n+} else {\n+00444\n+break;\n+00445\n+}\n+00446\n+}\n+00447\n+// search backwards\n+00448\n+00449\n+search.set_position(here);\n+while (true) {\n+00450\n+00451\n+--search;\n+if ( abs_dphi((*search())->angle, here_pntr->angle) <\n+00452\n+00453\n+here_pntr->cocircular_range\n+00454\n+&& search() != here()) {\n+00455\n+(*search())->cocircular.push_back(here_pntr);\n+00456\n+} else {\n+break;\n+00457\n+00458\n+}\n+00459\n+}\n+00460\n+00461\n+++here;\n+00462\n+} while (here() != vicinity.begin());\n+00463\n+00464 }\n+00465\n+00466 /*\n+00467 * Testing cocircular configurations in p^3 time,\n+00468 * rather than 2^p time; we will test all contiguous subsets of points\n+00469 * on the border --- note that this is till probably overkill, since\n+00470 * in principle we only have to test situations where up to a\n+00471 * half-circle is filled (but going to a full circle is simpler)\n+00472 ******************************************************************/\n+00473 void Cstable_cones::test_cone_cocircular(Cmomentum & borderless_cone,\n+00474\n+list & border_list) {\n+00475\n+vector border_vect;\n+00476\n+00477\n+border_vect.reserve(border_list.size());\n+00478\n+for (list::iterator it = border_list.begin();\n+00479\n+it != border_list.end(); it++) {\n+00480\n+border_vect.push_back(Cborder_store(*it, centre->eta, centre->phi));\n+00481\n+}\n+00482\n+// get them into order of angle\n+00483\n+00484\n+sort(border_vect.begin(), border_vect.end());\n+00485\n+// set up some circulators, since these will help us go around the\n+00486\n+00487\n+// circle easily\n+00488\n+circulator::iterator >\n+00489\n+start(border_vect.begin(), border_vect.begin(),border_vect.end());\n+00490\n+circulator::iterator > mid(start), end(start);\n+00491\n+00492\n+// test the borderless cone\n+00493\n+Cmomentum candidate = borderless_cone;\n+00494\n+candidate.build_etaphi();\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+223\n+\n+\f224\n+\n+File Documentation\n+\n+00495\n+if (candidate.ref.not_empty())\n+00496\n+test_stability(candidate, border_vect);\n+00497\n+do {\n+00498\n+00499\n+// reset status wrt inclusion in the cone\n+00500\n+mid = start;\n+do {\n+00501\n+00502\n+mid()->is_in = false;\n+00503\n+} while (++mid != start);\n+00504\n+00505\n+// now run over all inclusion possibilities with this starting point\n+00506\n+candidate = borderless_cone;\n+00507\n+while (++mid != start) {\n+// will begin with start+1 and go up to start-1\n+00508\n+00509\n+mid()->is_in = true;\n+00510\n+candidate += *(mid()->mom);\n+00511\n+test_stability(candidate, border_vect);\n+00512\n+}\n+00513\n+00514\n+} while (++start != end);\n+00515\n+// mid corresponds to momentum that we need to include to get the\n+00516\n+00517\n+// full cone\n+00518\n+mid()->is_in = true;\n+00519\n+candidate += *(mid()->mom);\n+00520\n+test_stability(candidate, border_vect);\n+00521 }\n+00522\n+00523\n+00530 void Cstable_cones::test_stability(Cmomentum & candidate, const vector & border_vect) {\n+00531\n+// this almost certainly has not been done...\n+00532\n+00533\n+candidate.build_etaphi();\n+00534\n+bool stable = true;\n+00535\n+00536\n+for (unsigned i = 0; i < border_vect.size(); i++) {\n+00537\n+if (is_inside(&candidate, border_vect[i].mom) ^ (border_vect[i].is_in)) {\n+00538\n+stable = false;\n+00539\n+break; // it\u2019s unstable so there\u2019s no point continuing\n+00540\n+}\n+00541\n+}\n+00542\n+00543\n+if (stable) hc->insert(&candidate);\n+00544 }\n+00545\n+00546 /*\n+00547 * check if we are in a situation of cocircularity.\n+00548 * if it is the case, update and test in the corresponding way\n+00549 * return \u2019false\u2019 if no cocircularity detected, \u2019true\u2019 otherwise\n+00550 * Note that if cocircularity is detected, we need to\n+00551 * recall \u2019update\u2019 from \u2019update\u2019 !!!\n+00552 ***************************************************************/\n+00553 bool Cstable_cones::cocircular_check(){\n+// check if many configurations have the same centre.\n+00554\n+00555\n+// if this is the case, branch on the algorithm for this\n+00556\n+// special case.\n+00557\n+// Note that those situation, being considered separately in\n+00558\n+// test_cone_multiple, must only be considered here if all\n+00559\n+// angles are on the same side (this avoid multiple counting)\n+00560\n+00561\n+if (centre->cocircular.empty()) return false;\n+00562\n+// first get cone into status required at end...\n+00563\n+00564\n+if ((centre->side) && (cone.ref.not_empty())){\n+00565\n+// update cone\n+00566\n+cone -= (*child);\n+00567\n+00568\n+// update info on particles inside\n+00569\n+centre->is_inside->cone = false;\n+00570\n+// update stability check quantities\n+00571\n+00572\n+dpt += fabs(child->px)+fabs(child->py); //child->perp2();\n+00573\n+}\n+00574\n+00575\n+00576\n+// now establish the list of unique children in the list\n+00577\n+// first make sure parent and child are in!\n+00578\n+00579\n+list removed_from_cone;\n+00580\n+list put_in_border;\n+00581\n+list border_list;\n+00582\n+00583\n+Cmomentum cone_removal;\n+00584\n+Cmomentum border = *parent;\n+00585\n+border_list.push_back(parent);\n+00586\n+00587\n+// make sure child appears in the border region\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.26 protocones.cpp\n+\n+00588\n+centre->cocircular.push_back(centre);\n+00589\n+// now establish the full contents of the cone minus the cocircular\n+00590\n+00591\n+// region and of the cocircular region itself\n+00592\n+for(list::iterator it = centre->cocircular.begin();\n+00593\n+it != centre->cocircular.end(); it++) {\n+00594\n+00595\n+if ((*it)->is_inside->cone) {\n+00596\n+cone_removal\n++= *((*it)->v);\n+00597\n+(*it)->is_inside->cone = false;\n+00598\n+removed_from_cone.push_back((*it)->is_inside);\n+00599\n+}\n+00600\n+// if a point appears twice (i.e. with + and - sign) in the list of\n+00601\n+00602\n+// points on the border, we take care not to include it twice.\n+00603\n+// Note that this situation may appear when a point is at a distance\n+00604\n+// close to 2R from the parent\n+00605\n+if (!(*it)->is_inside->cocirc) {\n+00606\n+border += *((*it)->v);\n+00607\n+(*it)->is_inside->cocirc = true;\n+00608\n+put_in_border.push_back((*it)->is_inside);\n+00609\n+border_list.push_back((*it)->v);\n+00610\n+}\n+00611\n+}\n+00612\n+00613\n+// figure out whether this pairing has been observed before\n+00614\n+00615\n+Cmomentum borderless_cone = cone;\n+00616\n+borderless_cone -= cone_removal;\n+00617\n+bool consider = true;\n+for (unsigned int i=0;i(borderless_cone.ref,\n+00628\n+border.ref));\n+00629\n+00630\n+// first figure out whether our cone momentum is good\n+00631\n+double local_dpt = fabs(cone_removal.px) + fabs(cone_removal.py);\n+double total_dpt = dpt + local_dpt;\n+00632\n+00633\n+00634\n+recompute_cone_contents_if_needed(borderless_cone, total_dpt);\n+00635\n+if (total_dpt == 0) {\n+00636\n+// a recomputation has taken place -- so take advantage of this\n+00637\n+// and update the member cone momentum\n+00638\n+cone = borderless_cone + cone_removal;\n+00639\n+dpt = local_dpt;\n+00640\n+}\n+00641\n+00642\n+test_cone_cocircular(borderless_cone, border_list);\n+00643\n+}\n+00644\n+00645\n+// relabel things that were in the cone but got removed\n+00646\n+00647\n+for(list::iterator is_in = removed_from_cone.begin();\n+00648\n+is_in != removed_from_cone.end(); is_in++) {\n+00649\n+(*is_in)->cone = true;\n+00650\n+}\n+00651\n+00652\n+// relabel things that got put into the border\n+00653\n+for(list::iterator is_in = put_in_border.begin();\n+00654\n+is_in != put_in_border.end(); is_in++) {\n+00655\n+(*is_in)->cocirc = false;\n+00656\n+}\n+00657\n+// we\u2019re done with everything -- return true to signal to user that we\u2019ve\n+00658\n+00659\n+// been through the co-circularity rigmarole\n+00660\n+return true;\n+00661 }\n+00662\n+00663\n+00665 // RECOMPUTATION OF CONE CONTENTS\n+//\n+00666 // - compute_cone_contents()\n+//\n+00667 // - recompute_cone_contents()\n+//\n+00668 // - recompute_cone_contents_if_needed()\n+//\n+00670\n+00679 void Cstable_cones::compute_cone_contents() {\n+00680\n+circulator::iterator >\n+00681\n+start(vicinity.begin()+first_cone, vicinity.begin(), vicinity.end());\n+00682\n+00683\n+circulator::iterator > here(start);\n+00684\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+225\n+\n+\f226\n+\n+File Documentation\n+\n+00685\n+// note that in the following algorithm, the cone contents never includes\n+00686\n+// the child. Indeed, if it has positive sign, then it will be set as\n+00687\n+// outside at the last step in the loop. If it has negative sign, then the\n+00688\n+// loop will at some point go to the corresponding situation with positive\n+00689\n+// sign and set the inclusion status to 0.\n+00690\n+do {\n+00691\n+00692\n+// as we leave this position a particle enters if its side is\n+00693\n+// negative (i.e. the centre is the one at -ve angle wrt to the\n+00694\n+// parent-child line\n+00695\n+if (!(*here())->side) ((*here())->is_inside->cone) = 1;\n+00696\n+// move on to the next position\n+00697\n+00698\n+++here;\n+00699\n+// as we arrive at this position a particle leaves if its side is positive\n+00700\n+00701\n+if ((*here())->side) ((*here())->is_inside->cone) = 0;\n+00702\n+} while (here != start);\n+00703\n+// once we\u2019ve reached the start the \u2019is_inside\u2019 information should be\n+00704\n+00705\n+// 100% complete, so we can use it to calculate the cone contents\n+00706\n+// and then exit\n+00707\n+recompute_cone_contents();\n+return;\n+00708\n+00709\n+00710 }\n+00711\n+00712\n+00713 /*\n+00714 * compute the cone momentum from particle list.\n+00715 * in this version, we use the \u2019pincluded\u2019 information\n+00716 * from the Cvicinity class\n+00717 */\n+00718 void Cstable_cones::recompute_cone_contents(){\n+unsigned int i;\n+00719\n+00720\n+00721\n+// set momentum to 0\n+00722\n+cone = Cmomentum();\n+00723\n+// Important note: we can browse only the particles\n+00724\n+00725\n+// in vicinity since all particles in the cone are\n+00726\n+// withing a distance 2R w.r.t. parent hence in vicinity.\n+00727\n+// Among those, we only add the particles for which \u2019is_inside\u2019 is true !\n+00728\n+// This methos rather than a direct comparison avoids rounding errors\n+00729\n+for (i=0;iside) && (vicinity[i]->is_inside->cone))\n+00732\n+cone += *vicinity[i]->v;\n+00733\n+}\n+00734\n+00735\n+// set check variables back to 0\n+00736\n+dpt = 0.0;\n+00737 }\n+00738\n+00739\n+00740 /*\n+00741 * if we have gone beyond the acceptable threshold of change, compute\n+00742 * the cone momentum from particle list. in this version, we use the\n+00743 * \u2019pincluded\u2019 information from the Cvicinity class, but we don\u2019t\n+00744 * change the member cone, only the locally supplied one\n+00745 */\n+00746 void Cstable_cones::recompute_cone_contents_if_needed(Cmomentum & this_cone,\n+00747\n+double & this_dpt){\n+00748\n+if (this_dpt > PT_TSHOLD*(fabs(this_cone.px)+fabs(this_cone.py))) {\n+00749\n+if (cone.ref.is_empty()) {\n+00750\n+00751\n+this_cone = Cmomentum();\n+00752\n+} else {\n+// set momentum to 0\n+00753\n+00754\n+this_cone = Cmomentum();\n+00755\n+// Important note: we can browse only the particles\n+00756\n+00757\n+// in vicinity since all particles in the this_cone are\n+00758\n+// withing a distance 2R w.r.t. parent hence in vicinity.\n+00759\n+// Among those, we only add the particles for which \u2019is_inside\u2019 is true !\n+00760\n+// This methos rather than a direct comparison avoids rounding errors\n+00761\n+for (unsigned int i=0;iside) && (vicinity[i]->is_inside->cone))\n+00764\n+this_cone += *vicinity[i]->v;\n+00765\n+}\n+00766\n+00767\n+}\n+00768\n+// set check variables back to 0\n+00769\n+this_dpt = 0.0;\n+00770\n+}\n+00771\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.27 protocones.cpp\n+\n+227\n+\n+00772 }\n+00773\n+00774\n+//\n+00776 // VARIOUS TOOLS\n+00777 // - circle_intersect()\n+//\n+00778 // - is_inside()\n+//\n+00779 // - abs_dangle()\n+//\n+00781\n+00782\n+00783 /*\n+00784 * circle intersection.\n+00785 * computes the intersection with a circle of given centre and radius.\n+00786 * The output takes the form of a checkxor of the intersection\u2019s particles\n+00787 * - cx\n+circle centre x coordinate\n+circle centre y coordinate\n+00788 * - cy\n+00789 * return the checkxor for the intersection\n+00790 ******************************************************************/\n+00791 Creference Cstable_cones::circle_intersect(double cx, double cy){\n+00792\n+Creference intersection;\n+int i;\n+00793\n+double dx, dy;\n+00794\n+00795\n+00796\n+for (i=0;iM_PI)\n+00803\n+dy -= twopi;\n+00804\n+// really check if the distance is less than VR\n+00805\n+00806\n+if (dx*dx+dy*dyeta - v->eta;\n+00825\n+dy = fabs(centre_in->phi - v->phi);\n+if (dy>M_PI)\n+00826\n+00827\n+dy -= twopi;\n+00828\n+00829\n+return dx*dx+dy*dyM_PI)\n+00844\n+dphi = dphi-twopi;\n+00845\n+return dphi;\n+00846\n+00847 }\n+00848\n+00849 }\n+\n+5.27 protocones.cpp\n+00001\n+00002 // File: protocones.cpp\n+00003 // Description: source file for stable cones determination (Cstable_cones)\n+00004 // This file is part of the SISCone project.\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+//\n+//\n+//\n+\n+\f228\n+\n+File Documentation\n+\n+00005 // WARNING: this is not the main SISCone trunk but\n+//\n+00006 //\n+an adaptation to spherical coordinates\n+//\n+00007 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00008 //\n+//\n+00009 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n+//\n+00010 //\n+//\n+00011 // This program is free software; you can redistribute it and/or modify\n+//\n+00012 // it under the terms of the GNU General Public License as published by\n+//\n+00013 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00014 // (at your option) any later version.\n+//\n+00015 //\n+//\n+00016 // This program is distributed in the hope that it will be useful,\n+//\n+00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00019 // GNU General Public License for more details.\n+//\n+00020 //\n+//\n+00021 // You should have received a copy of the GNU General Public License\n+//\n+00022 // along with this program; if not, write to the Free Software\n+//\n+00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00024 //\n+//\n+00025 // $Revision:: 311\n+$//\n+00026 // $Date:: 2011-10-05 23:27:09 +0200 (Wed, 05 Oct 2011)\n+$//\n+00028\n+00029 /*******************************************************\n+00030 * Introductory note:\n+*\n+00031 * Since this file has many member functions, we have *\n+00032 * structured them in categories:\n+*\n+00033 * INITIALISATION FUNCTIONS\n+*\n+00034 * - ctor()\n+*\n+00035 * - ctor(particle_list)\n+*\n+00036 * - dtor()\n+*\n+00037 * - init(particle_list)\n+*\n+00038 * ALGORITHM MAIN ENTRY\n+*\n+00039 * - get_stable_cone(radius)\n+*\n+00040 * ALGORITHM MAIN STEPS\n+*\n+00041 * - init_cone()\n+*\n+00042 * - test_cone()\n+*\n+00043 * - update_cone()\n+*\n+00044 * - proceed_with_stability()\n+*\n+00045 * ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n+*\n+00046 * - cocircular_pt_less(v1, v2)\n+*\n+00047 * - prepare_cocircular_list()\n+*\n+00048 * - test_cone_cocircular()\n+*\n+00049 * - test_stability(candidate, border_list)\n+*\n+00050 * - updat_cone_cocircular()\n+*\n+00051 * RECOMPUTATION OF CONE CONTENTS\n+*\n+00052 * - compute_cone_contents()\n+*\n+00053 * - recompute_cone_contents()\n+*\n+00054 * - recompute_cone_contents_if_needed()\n+*\n+00055 * VARIOUS TOOLS\n+*\n+00056 * - circle_intersect()\n+*\n+00057 * - is_inside()\n+*\n+00058 * - abs_dangle()\n+*\n+00059 *******************************************************/\n+00060\n+00061 #include \n+00062 #include \n+00063 #include \n+00064 #include \"protocones.h\"\n+00065 #include \n+00066 #include \n+00067 #include \n+00068\n+00069 namespace siscone_spherical{\n+00070\n+00071 using namespace std;\n+00072\n+00073 /**********************************************************************\n+00074 * CSphstable_cones implementation\n+*\n+00075 * Computes the list of stable comes from a particle list.\n+*\n+00076 * This class does the first fundamental task of te cone algorithm:\n+*\n+00077 * it is used to compute the list of stable cones given a list\n+*\n+00078 * of particles.\n+*\n+00079 **********************************************************************/\n+00080\n+//\n+00082 // INITIALISATION FUNCTIONS\n+00083 // - ctor()\n+//\n+00084 // - ctor(particle_list)\n+//\n+00085 // - dtor()\n+//\n+00086 // - init(particle_list)\n+//\n+00088\n+00089 // default ctor\n+00090 //-------------00091 CSphstable_cones::CSphstable_cones(){\n+00092\n+nb_tot = 0;\n+00093\n+hc = NULL;\n+00094 }\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.27 protocones.cpp\n+\n+00095\n+00096 // ctor with initialisation\n+00097 //-------------------------00098 CSphstable_cones::CSphstable_cones(vector &_particle_list)\n+00099\n+: CSphvicinity(_particle_list){\n+00100\n+00101\n+nb_tot = 0;\n+00102\n+hc = NULL;\n+00103 }\n+00104\n+00105 // default dtor\n+00106 //-------------00107 CSphstable_cones::~CSphstable_cones(){\n+if (hc!=NULL) delete hc;\n+00108\n+00109 }\n+00110\n+00111 /*\n+00112 * initialisation\n+00113 * - _particle_list list of particles\n+number of particles\n+00114 * - _n\n+00115 *********************************************************************/\n+00116 void CSphstable_cones::init(vector &_particle_list){\n+00117\n+// check already allocated mem\n+00118\n+if (hc!=NULL){\n+00119\n+delete hc;\n+00120\n+}\n+if (protocones.size()!=0)\n+00121\n+00122\n+protocones.clear();\n+00123\n+00124\n+multiple_centre_done.clear();\n+00125\n+// initialisation\n+00126\n+00127\n+set_particle_list(_particle_list);\n+00128 }\n+00129\n+00130\n+00132 // ALGORITHM MAIN ENTRY\n+//\n+00133 // - get_stable_cone(radius)\n+//\n+00135\n+00136 /*\n+00137 * compute stable cones.\n+00138 * This function really does the job i.e. computes\n+00139 * the list of stable cones (in a seedless way)\n+00140 * - _radius: radius of the cones\n+00141 * The number of stable cones found is returned\n+00142 *********************************************************************/\n+00143 int CSphstable_cones::get_stable_cones(double _radius){\n+00144\n+int p_idx;\n+00145\n+// check if everything is correctly initialised\n+00146\n+00147\n+if (n_part==0){\n+return 0;\n+00148\n+00149\n+}\n+00150\n+00151\n+R = _radius;\n+00152\n+R2 = R*R;\n+00153\n+tan2R = tan(R);\n+00154\n+tan2R *= tan2R;\n+00155\n+00156\n+// allow hash for cones candidates\n+00157\n+hc = new sph_hash_cones(n_part, R);\n+00158\n+// browse all particles\n+00159\n+00160\n+for (p_idx=0;p_idx_phi \u00ab \", \" \u00ab parent->_theta \u00ab endl;\n+00177 #endif\n+00178\n+// step 1: initialise with the first cone candidate\n+00179\n+00180\n+init_cone();\n+00181\n+do{\n+00182\n+00183\n+// step 2: test cone stability for that pair (P,C)\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+229\n+\n+\f230\n+\n+File Documentation\n+\n+00184\n+test_cone();\n+00185\n+// step 3: go to the next cone child candidate C\n+00186\n+00187\n+} while (!update_cone());\n+00188\n+}\n+00189\n+00190\n+return proceed_with_stability();\n+00191 }\n+00192\n+00193\n+00195 // ALGORITHM MAIN STEPS\n+//\n+00196 // - init_cone()\n+//\n+00197 // - test_cone()\n+//\n+00198 // - update_cone()\n+//\n+00199 // - proceed_with_stability()\n+//\n+00201\n+00202 /*\n+00203 * initialise the cone.\n+00204 * We take the first particle in the angular ordering to compute\n+00205 * this one\n+00206 * return 0 on success, 1 on error\n+00207 *********************************************************************/\n+00208 int CSphstable_cones::init_cone(){\n+// The previous version of the algorithm was starting the\n+00209\n+00210\n+// loop around vicinity elements with the \"most isolated\" child.\n+00211\n+// given the nodist method to calculate the cone contents, we no\n+00212\n+// longer need to worry about which cone comes first...\n+00213\n+first_cone=0;\n+00214\n+00215\n+// now make sure we have lists of the cocircular particles\n+00216\n+prepare_cocircular_lists();\n+00217\n+//TODO? deal with a configuration with only degeneracies ?\n+00218\n+00219\n+// The only possibility seems a regular hexagon with a parent point\n+00220\n+// in the centre. And this situation is by itself unclear.\n+00221\n+// Hence, we do nothing here !\n+00222\n+// init set child C\n+00223\n+00224\n+centre = vicinity[first_cone];\n+00225\n+child = centre->v;\n+00226\n+centre_idx = first_cone;\n+00227\n+// build the initial cone (nodist: avoids calculating distances -00228\n+00229\n+// just deduces contents by circulating around all in/out operations)\n+00230\n+// this function also sets the list of included particles\n+00231\n+compute_cone_contents();\n+00232\n+return 0;\n+00233\n+00234 }\n+00235\n+00236\n+00237 /*\n+00238 * test cones.\n+00239 * We check if the cone(s) built with the present parent and child\n+00240 * are stable\n+00241 * return 0 on success 1 on error\n+00242 *********************************************************************/\n+00243 int CSphstable_cones::test_cone(){\n+00244\n+siscone::Creference weighted_cone_ref;\n+00245\n+00246\n+// depending on the side we are taking the child particle,\n+00247\n+// we test different configuration.\n+00248\n+// Each time, two configurations are tested in such a way that\n+00249\n+// all 4 possible cases (parent or child in or out the cone)\n+00250\n+// are tested when taking the pair of particle parent+child\n+00251\n+// and child+parent.\n+00252\n+00253\n+// here are the tests entering the first series:\n+00254\n+// 1. check if the cone is already inserted\n+00255\n+// 2. check cone stability for the parent and child particles\n+00256\n+00257\n+//UPDATED(see below): if (centre->side){\n+00258\n+//UPDATED(see below):\n+// test when both particles are not in the cone\n+00259\n+//UPDATED(see below):\n+// or when both are in.\n+00260\n+//UPDATED(see below):\n+// Note: for the totally exclusive case, test emptyness before\n+00261\n+//UPDATED(see below):\n+cone_candidate = cone;\n+00262\n+//UPDATED(see below):\n+if (cone.ref.not_empty()){\n+00263\n+//UPDATED(see below):\n+hc->insert(&cone_candidate, parent, child, false, false);\n+00264\n+//UPDATED(see below):\n+}\n+00265\n+//UPDATED(see below):\n+00266\n+//UPDATED(see below):\n+cone_candidate = cone;\n+00267\n+//UPDATED(see below):\n+cone_candidate+= *parent + *child;\n+00268\n+//UPDATED(see below):\n+hc->insert(&cone_candidate, parent, child, true, true);\n+00269\n+//UPDATED(see below): } else {\n+00270\n+//UPDATED(see below):\n+// test when 1! of the particles is in the cone\n+00271\n+//UPDATED(see below):\n+cone_candidate = cone + *parent;\n+00272\n+//UPDATED(see below):\n+hc->insert(&cone_candidate, parent, child, true, false);\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.27 protocones.cpp\n+\n+00273\n+//UPDATED(see below):\n+00274\n+//UPDATED(see below):\n+cone_candidate = cone + *child;\n+00275\n+//UPDATED(see below):\n+hc->insert(&cone_candidate, parent, child, false, true);\n+00276\n+//UPDATED(see below): }\n+00277\n+//UPDATED(see below):\n+00278\n+//UPDATED(see below): nb_tot+=2;\n+00279\n+00280\n+// instead of testing 2 inclusion/exclusion states for every pair, we test the 4 of them\n+00281\n+// when the parent has an energy bigger than the child\n+00282\n+if (parent->E >= child->E){\n+00283\n+// test when both particles are not in the cone\n+00284\n+// Note: for the totally exclusive case, test emptiness before\n+00285\n+cone_candidate = cone;\n+if (cone.ref.not_empty()){\n+00286\n+00287\n+hc->insert(&cone_candidate, parent, child, false, false);\n+00288\n+}\n+00289\n+00290\n+// test when 1! of the particles is in the cone\n+00291\n+cone_candidate += *parent;\n+00292\n+hc->insert(&cone_candidate, parent, child, true, false);\n+00293\n+00294\n+cone_candidate = cone;\n+00295\n+cone_candidate += *child;\n+00296\n+hc->insert(&cone_candidate, parent, child, false, true);\n+00297\n+// test when both are in.\n+00298\n+00299\n+cone_candidate += *parent;\n+00300\n+hc->insert(&cone_candidate, parent, child, true, true);\n+00301\n+00302\n+nb_tot += 4;\n+00303\n+}\n+00304\n+00305\n+return 0;\n+00306\n+00307 }\n+00308\n+00309\n+00310 /*\n+00311 * update the cone\n+00312 * go to the next child for that parent and update \u2019cone\u2019 appropriately\n+00313 * return 0 if update candidate found, 1 otherwise\n+00314 ***********************************************************************/\n+00315 int CSphstable_cones::update_cone(){\n+00316 #ifdef DEBUG_STABLE_CONES\n+00317\n+cout \u00ab \"call \u2019circles_plot.gp\u2019 \u2019\" \u00ab centre->centre.px \u00ab \"\u2019 \u2019\"\n+00318\n+\u00ab centre->centre.py \u00ab \"\u2019 \u2019\" \u00ab centre->centre.pz \u00ab \"\u2019\" \u00ab endl\n+00319\n+\u00ab \"pause -1 \u2019(\" \u00ab centre->angle \u00ab \" \" \u00ab (centre->side ? \u2019+\u2019 : \u2019-\u2019) \u00ab \")\";\n+00320 #endif\n+00321\n+// get the next child and centre\n+00322\n+00323\n+centre_idx++;\n+if (centre_idx==vicinity_size)\n+00324\n+00325\n+centre_idx=0;\n+if (centre_idx==first_cone)\n+00326\n+00327\n+return 1;\n+00328\n+// update the cone w.r.t. the old child\n+00329\n+00330\n+// only required if the old child is entering inside in which\n+00331\n+// case we need to add it. We also know that the child is\n+00332\n+// inside iff its side is -.\n+00333\n+if (!centre->side){\n+00334 #ifdef DEBUG_STABLE_CONES\n+00335\n+cout \u00ab \" old_enter\";\n+00336 #endif\n+00337\n+// update cone\n+00338\n+cone += (*child);\n+00339\n+00340\n+// update info on particles inside\n+00341\n+centre->is_inside->cone = true;\n+00342\n+// update stability check quantities\n+00343\n+00344\n+dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz);\n+00345\n+}\n+00346\n+00347\n+// update centre and child to correspond to the new position\n+00348\n+centre = vicinity[centre_idx];\n+00349\n+child = centre->v;\n+00350\n+00351\n+// check cocircularity\n+00352\n+// note that if cocirculaity is detected (i.e. if we receive 1\n+00353\n+// in the next test), we need to recall \u2019update_cone\u2019 directly\n+00354\n+// since tests and remaining part of te update has been performed\n+00355\n+//if (cocircular_check())\n+00356\n+if (cocircular_check()){\n+00357 #ifdef DEBUG_STABLE_CONES\n+00358\n+cout \u00ab \" Co-circular case detected\" \u00ab endl;\n+00359 #endif\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+231\n+\n+\f232\n+\n+File Documentation\n+\n+00360\n+return update_cone();\n+00361\n+}\n+00362\n+// update the cone w.r.t. the new child\n+00363\n+00364\n+// only required if the new child was already inside in which\n+00365\n+// case we need to remove it. We also know that the child is\n+00366\n+// inside iff its side is +.\n+00367\n+if ((centre->side) && (cone.ref.not_empty())){\n+00368 #ifdef DEBUG_STABLE_CONES\n+00369\n+cout \u00ab \" new exit\";\n+00370 #endif\n+00371\n+00372\n+// update cone\n+00373\n+cone -= (*child);\n+00374\n+// update info on particles inside\n+00375\n+00376\n+centre->is_inside->cone = false;\n+00377\n+// update stability check quantities\n+00378\n+00379\n+dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz); //child->perp2();\n+00380\n+}\n+00381\n+00382\n+// check that the addition and subtraction of vectors does\n+00383\n+// not lead to too much rounding error\n+00384\n+// for that, we compute the sum of pt modifications and of |pt|\n+00385\n+// since last recomputation and once the ratio overpasses a threshold\n+00386\n+// we recompute vicinity.\n+00387\n+if ((dpt>PT_TSHOLD*(fabs(cone.px)+fabs(cone.py)+fabs(cone.pz))) && (cone.ref.not_empty())){\n+00388\n+recompute_cone_contents();\n+00389\n+}\n+00390\n+if (cone.ref.is_empty()){\n+00391\n+cone = CSphmomentum();\n+00392\n+dpt=0.0;\n+00393\n+}\n+00394\n+00395 #ifdef DEBUG_STABLE_CONES\n+00396\n+cout \u00ab \"\u2019\" \u00ab endl;\n+00397 #endif\n+00398\n+return 0;\n+00399\n+00400 }\n+00401\n+00402\n+00403 /*\n+00404 * compute stability of all enumerated candidates.\n+00405 * For all candidate cones which are stable w.r.t. their border particles,\n+00406 * pass the last test: stability with quadtree intersection\n+00407 ************************************************************************/\n+00408 int CSphstable_cones::proceed_with_stability(){\n+int i;\n+00409\n+00410\n+sph_hash_element *elm;\n+00411\n+00412\n+for (i=0;i<=hc->mask;i++){\n+// test ith cell of the hash array\n+00413\n+00414\n+elm = hc->hash_array[i];\n+00415\n+// browse elements therein\n+00416\n+00417\n+while (elm!=NULL){\n+// test stability\n+00418\n+00419\n+if (elm->is_stable){\n+00420\n+// stability is not ensured by all pairs of \"edges\" already browsed\n+00421 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n+00422\n+// => testing stability with quadtree intersection\n+00423\n+if (quadtree->circle_intersect(elm->eta, elm->phi, R2)==elm->ref)\n+00424 #else\n+00425\n+// => testing stability with the particle-list intersection\n+00426\n+if (circle_intersect(elm->centre)==elm->centre.ref)\n+00427 #endif\n+00428\n+protocones.push_back(CSphmomentum(elm->centre,1.0));\n+00429\n+}\n+00430\n+00431\n+// jump to the next one\n+00432\n+elm = elm->next;\n+00433\n+}\n+00434\n+}\n+00435\n+00436\n+// free hash\n+00437\n+// we do that at this level because hash eats rather a lot of memory\n+00438\n+// we want to free it before running the split/merge algorithm\n+00439 #ifdef DEBUG_STABLE_CONES\n+00440\n+nb_hash_cones = hc->n_cones;\n+00441\n+nb_hash_occupied = hc->n_occupied_cells;\n+00442 #endif\n+00443\n+delete hc;\n+00444\n+00445\n+hc=NULL;\n+00446\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.27 protocones.cpp\n+\n+00447\n+return protocones.size();\n+00448 }\n+00449\n+00450\n+//\n+00452 // ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n+00453 // - cocircular_pt_less(v1, v2)\n+//\n+00454 // - prepare_cocircular_list()\n+//\n+00455 // - test_cone_cocircular()\n+//\n+00456 // - test_stability(candidate, border_vect)\n+//\n+00457 // - updat_cone_cocircular()\n+//\n+00459\n+00461 //NEVER USED\n+00462 //bool cocircular_pt_less(CSphmomentum *v1, CSphmomentum *v2){\n+00463 // return v1->perp2() < v2->perp2();\n+00464 //}\n+00465\n+00466 /*\n+00467 * run through the vicinity of the current parent and for each child\n+00468 * establish which other members are cocircular... Note that the list\n+00469 * associated with each child contains references to vicinity\n+00470 * elements: thus two vicinity elements each associated with one given\n+00471 * particle may appear in a list -- this needs to be watched out for\n+00472 * later on...\n+00473 **********************************************************************/\n+00474 void CSphstable_cones::prepare_cocircular_lists() {\n+00475\n+siscone::circulator::iterator > here(vicinity.begin(),\n+00476\n+vicinity.begin(),\n+00477\n+vicinity.end());\n+00478\n+00479\n+siscone::circulator::iterator > search(here);\n+00480\n+do {\n+00481\n+00482\n+CSphvicinity_elm* here_pntr = *here();\n+00483\n+search.set_position(here);\n+00484\n+// search forwards for things that should have \"here\" included in\n+00485\n+00486\n+// their cocircularity list\n+00487\n+while (true) {\n+00488\n+++search;\n+if ( siscone::abs_dphi((*search())->angle, here_pntr->angle) <\n+00489\n+00490\n+here_pntr->cocircular_range\n+00491\n+&& search() != here()) {\n+00492\n+(*search())->cocircular.push_back(here_pntr);\n+00493\n+} else {\n+break;\n+00494\n+00495\n+}\n+00496\n+}\n+00497\n+00498\n+// search backwards\n+00499\n+search.set_position(here);\n+00500\n+while (true) {\n+00501\n+--search;\n+if ( siscone::abs_dphi((*search())->angle, here_pntr->angle) <\n+00502\n+00503\n+here_pntr->cocircular_range\n+00504\n+&& search() != here()) {\n+00505\n+(*search())->cocircular.push_back(here_pntr);\n+00506\n+} else {\n+00507\n+break;\n+00508\n+}\n+00509\n+}\n+00510\n+00511\n+++here;\n+00512\n+} while (here() != vicinity.begin());\n+00513 }\n+00514\n+00515 /*\n+00516 * Testing cocircular configurations in p^3 time,\n+00517 * rather than 2^p time; we will test all contiguous subsets of points\n+00518 * on the border --- note that this is till probably overkill, since\n+00519 * in principle we only have to test situations where up to a\n+00520 * half-circle is filled (but going to a full circle is simpler)\n+00521 ******************************************************************/\n+00522 void CSphstable_cones::test_cone_cocircular(CSphmomentum & borderless_cone,\n+00523\n+list & border_list) {\n+00524\n+// in spherical coordinates, we don\u2019t have a universal x-y axis system\n+00525\n+// to measure the angles. So we first determine one minimising\n+00526\n+// the uncertainties\n+00527\n+CSph3vector angl_dir1, angl_dir2;\n+00528\n+centre->centre.get_angular_directions(angl_dir1, angl_dir2);\n+00529\n+angl_dir1/=angl_dir1._norm;\n+00530\n+angl_dir2/=angl_dir2._norm;\n+00531\n+00532\n+// now we have te reference axis, create the CSphborder_store structure\n+00533\n+vector border_vect;\n+00534\n+border_vect.reserve(border_list.size());\n+for (list::iterator it = border_list.begin();\n+00535\n+00536\n+it != border_list.end(); it++) {\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+233\n+\n+\f234\n+\n+File Documentation\n+\n+00537\n+border_vect.push_back(CSphborder_store(*it, centre->centre, angl_dir1, angl_dir2));\n+00538\n+}\n+00539\n+// get them into order of angle\n+00540\n+00541\n+sort(border_vect.begin(), border_vect.end());\n+00542\n+// set up some circulators, since these will help us go around the\n+00543\n+00544\n+// circle easily\n+00545\n+siscone::circulator::iterator >\n+00546\n+start(border_vect.begin(), border_vect.begin(),border_vect.end());\n+00547\n+siscone::circulator::iterator > mid(start), end(start);\n+00548\n+00549\n+// test the borderless cone\n+00550\n+CSphmomentum candidate = borderless_cone;\n+00551\n+//candidate.build_etaphi();\n+00552\n+if (candidate.ref.not_empty())\n+00553\n+test_stability(candidate, border_vect);\n+00554\n+00555\n+do {\n+00556\n+// reset status wrt inclusion in the cone\n+00557\n+mid = start;\n+00558\n+do {\n+00559\n+mid()->is_in = false;\n+00560\n+} while (++mid != start);\n+00561\n+// now run over all inclusion possibilities with this starting point\n+00562\n+00563\n+candidate = borderless_cone;\n+while (++mid != start) {\n+00564\n+00565\n+// will begin with start+1 and go up to start-1\n+00566\n+mid()->is_in = true;\n+00567\n+candidate += *(mid()->mom);\n+00568\n+test_stability(candidate, border_vect);\n+00569\n+}\n+00570\n+00571\n+} while (++start != end);\n+00572\n+00573\n+// mid corresponds to momentum that we need to include to get the\n+00574\n+// full cone\n+00575\n+mid()->is_in = true;\n+00576\n+candidate += *(mid()->mom);\n+00577\n+test_stability(candidate, border_vect);\n+00578 }\n+00579\n+00580\n+00587 void CSphstable_cones::test_stability(CSphmomentum & candidate, const vector &\n+border_vect) {\n+00588\n+00589\n+// this almost certainly has not been done...\n+00590\n+//candidate.build_etaphi();\n+00591\n+00592\n+bool stable = true;\n+for (unsigned i = 0; i < border_vect.size(); i++) {\n+00593\n+00594\n+if (is_closer(&candidate, border_vect[i].mom,tan2R) ^ (border_vect[i].is_in)) {\n+00595\n+stable = false;\n+00596\n+break; // it\u2019s unstable so there\u2019s no point continuing\n+00597\n+}\n+00598\n+}\n+00599\n+if (stable) hc->insert(&candidate);\n+00600\n+00601 }\n+00602\n+00603 /*\n+00604 * check if we are in a situation of cocircularity.\n+00605 * if it is the case, update and test in the corresponding way\n+00606 * return \u2019false\u2019 if no cocircularity detected, \u2019true\u2019 otherwise\n+00607 * Note that if cocircularity is detected, we need to\n+00608 * recall \u2019update\u2019 from \u2019update\u2019 !!!\n+00609 ***************************************************************/\n+00610 bool CSphstable_cones::cocircular_check(){\n+00611\n+// check if many configurations have the same centre.\n+00612\n+// if this is the case, branch on the algorithm for this\n+00613\n+// special case.\n+00614\n+// Note that those situation, being considered separately in\n+00615\n+// test_cone_multiple, must only be considered here if all\n+00616\n+// angles are on the same side (this avoid multiple counting)\n+00617\n+00618\n+if (centre->cocircular.empty()) return false;\n+00619\n+// first get cone into status required at end...\n+00620\n+00621\n+if ((centre->side) && (cone.ref.not_empty())){\n+00622\n+// update cone\n+00623\n+cone -= (*child);\n+00624\n+// update info on particles inside\n+00625\n+00626\n+centre->is_inside->cone = false;\n+00627\n+00628\n+// update stability check quantities\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.27 protocones.cpp\n+\n+00629\n+00630\n+00631\n+00632\n+00633\n+00634\n+00635\n+00636\n+00637\n+00638\n+00639\n+00640\n+00641\n+00642\n+00643\n+00644\n+00645\n+00646\n+00647\n+00648\n+00649\n+00650\n+00651\n+00652\n+00653\n+00654\n+00655\n+00656\n+00657\n+00658\n+00659\n+00660\n+00661\n+00662\n+00663\n+00664\n+00665\n+00666\n+00667\n+\n+235\n+\n+dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz); //child->perp2();\n+}\n+\n+// now establish the list of unique children in the list\n+// first make sure parent and child are in!\n+list removed_from_cone;\n+list put_in_border;\n+list border_list;\n+CSphmomentum cone_removal;\n+CSphmomentum border = *parent;\n+border_list.push_back(parent);\n+// make sure child appears in the border region\n+centre->cocircular.push_back(centre);\n+// now establish the full contents of the cone minus the cocircular\n+// region and of the cocircular region itself\n+for(list::iterator it = centre->cocircular.begin();\n+it != centre->cocircular.end(); it++) {\n+if ((*it)->is_inside->cone) {\n+cone_removal\n++= *((*it)->v);\n+(*it)->is_inside->cone = false;\n+removed_from_cone.push_back((*it)->is_inside);\n+}\n+\n+// if a point appears twice (i.e. with + and - sign) in the list of\n+// points on the border, we take care not to include it twice.\n+// Note that this situation may appear when a point is at a distance\n+// close to 2R from the parent\n+if (!(*it)->is_inside->cocirc) {\n+border += *((*it)->v);\n+(*it)->is_inside->cocirc = true;\n+put_in_border.push_back((*it)->is_inside);\n+border_list.push_back((*it)->v);\n+//cout \u00ab \" adding particle \" \u00ab (*it)->v->_theta \u00ab \", \" \u00ab (*it)->v->_phi \u00ab \" to the border list\"\n+\u00ab endl;\n+00668\n+}\n+00669\n+}\n+00670\n+00671\n+// figure out whether this pairing has been observed before\n+00672\n+00673\n+CSphmomentum borderless_cone = cone;\n+00674\n+borderless_cone -= cone_removal;\n+bool consider = true;\n+00675\n+00676\n+for (unsigned int i=0;i(borderless_cone.ref,\n+00686\n+border.ref));\n+00687\n+00688\n+// first figure out whether our cone momentum is good\n+00689\n+double local_dpt = fabs(cone_removal.px) + fabs(cone_removal.py);\n+00690\n+double total_dpt = dpt + local_dpt;\n+00691\n+00692\n+recompute_cone_contents_if_needed(borderless_cone, total_dpt);\n+if (total_dpt == 0) {\n+00693\n+00694\n+// a recomputation has taken place -- so take advantage of this\n+00695\n+// and update the member cone momentum\n+00696\n+cone = borderless_cone + cone_removal;\n+00697\n+dpt = local_dpt;\n+00698\n+}\n+00699\n+00700\n+test_cone_cocircular(borderless_cone, border_list);\n+00701\n+}\n+00702\n+00703\n+// relabel things that were in the cone but got removed\n+00704\n+00705\n+for(list::iterator is_in = removed_from_cone.begin();\n+00706\n+is_in != removed_from_cone.end(); is_in++) {\n+00707\n+(*is_in)->cone = true;\n+00708\n+}\n+00709\n+00710\n+// relabel things that got put into the border\n+00711\n+for(list::iterator is_in = put_in_border.begin();\n+00712\n+is_in != put_in_border.end(); is_in++) {\n+00713\n+(*is_in)->cocirc = false;\n+00714\n+}\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f236\n+\n+File Documentation\n+\n+00715\n+// we\u2019re done with everything -- return true to signal to user that we\u2019ve\n+00716\n+00717\n+// been through the co-circularity rigmarole\n+00718\n+return true;\n+00719 }\n+00720\n+00721\n+00723 // RECOMPUTATION OF CONE CONTENTS\n+//\n+00724 // - compute_cone_contents()\n+//\n+00725 // - recompute_cone_contents()\n+//\n+00726 // - recompute_cone_contents_if_needed()\n+//\n+00728\n+00737 void CSphstable_cones::compute_cone_contents() {\n+00738\n+siscone::circulator::iterator >\n+00739\n+start(vicinity.begin()+first_cone, vicinity.begin(), vicinity.end());\n+00740\n+00741\n+siscone::circulator::iterator > here(start);\n+00742\n+// note that in the following algorithm, the cone contents never includes\n+00743\n+00744\n+// the child. Indeed, if it has positive sign, then it will be set as\n+00745\n+// outside at the last step in the loop. If it has negative sign, then the\n+00746\n+// loop will at some point go to the corresponding situation with positive\n+00747\n+// sign and set the inclusion status to 0.\n+00748\n+00749\n+do {\n+// as we leave this position a particle enters if its side is\n+00750\n+00751\n+// negative (i.e. the centre is the one at -ve angle wrt to the\n+00752\n+// parent-child line\n+00753\n+if (!(*here())->side) ((*here())->is_inside->cone) = 1;\n+00754\n+// move on to the next position\n+00755\n+00756\n+++here;\n+00757\n+// as we arrive at this position a particle leaves if its side is positive\n+00758\n+00759\n+if ((*here())->side) ((*here())->is_inside->cone) = 0;\n+00760\n+} while (here != start);\n+00761\n+// once we\u2019ve reached the start the \u2019is_inside\u2019 information should be\n+00762\n+00763\n+// 100% complete, so we can use it to calculate the cone contents\n+00764\n+// and then exit\n+00765\n+recompute_cone_contents();\n+00766\n+return;\n+00767\n+00768 }\n+00769\n+00770\n+00771 /*\n+00772 * compute the cone momentum from particle list.\n+00773 * in this version, we use the \u2019pincluded\u2019 information\n+00774 * from the CSphvicinity class\n+00775 */\n+00776 void CSphstable_cones::recompute_cone_contents(){\n+00777\n+unsigned int i;\n+00778\n+// set momentum to 0\n+00779\n+00780\n+cone = CSphmomentum();\n+00781\n+// Important note: we can browse only the particles\n+00782\n+00783\n+// in vicinity since all particles in the cone are\n+00784\n+// withing a distance 2R w.r.t. parent hence in vicinity.\n+00785\n+// Among those, we only add the particles for which \u2019is_inside\u2019 is true !\n+00786\n+// This methos rather than a direct comparison avoids rounding errors\n+00787\n+for (i=0;iside) && (vicinity[i]->is_inside->cone))\n+00790\n+cone += *vicinity[i]->v;\n+00791\n+}\n+00792\n+00793\n+// set check variables back to 0\n+00794\n+dpt = 0.0;\n+00795 }\n+00796\n+00797\n+00798 /*\n+00799 * if we have gone beyond the acceptable threshold of change, compute\n+00800 * the cone momentum from particle list. in this version, we use the\n+00801 * \u2019pincluded\u2019 information from the CSphvicinity class, but we don\u2019t\n+00802 * change the member cone, only the locally supplied one\n+00803 */\n+00804 void CSphstable_cones::recompute_cone_contents_if_needed(CSphmomentum & this_cone,\n+00805\n+double & this_dpt){\n+00806\n+if (this_dpt > PT_TSHOLD*(fabs(this_cone.px)+fabs(this_cone.py))) {\n+00807\n+00808\n+if (cone.ref.is_empty()) {\n+00809\n+this_cone = CSphmomentum();\n+00810\n+} else {\n+00811\n+// set momentum to 0\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.28 protocones.h\n+\n+00812\n+this_cone = CSphmomentum();\n+00813\n+// Important note: we can browse only the particles\n+00814\n+00815\n+// in vicinity since all particles in the this_cone are\n+00816\n+// withing a distance 2R w.r.t. parent hence in vicinity.\n+00817\n+// Among those, we only add the particles for which \u2019is_inside\u2019 is true !\n+00818\n+// This methos rather than a direct comparison avoids rounding errors\n+00819\n+for (unsigned int i=0;iside) && (vicinity[i]->is_inside->cone))\n+00822\n+this_cone += *vicinity[i]->v;\n+00823\n+}\n+00824\n+00825\n+}\n+00826\n+// set check variables back to 0\n+00827\n+this_dpt = 0.0;\n+00828\n+}\n+00829\n+00830 }\n+00831\n+00832\n+00834 // VARIOUS TOOLS\n+//\n+00835 // - circle_intersect()\n+//\n+00836 // - is_inside()\n+//\n+00837 // - abs_dangle()\n+//\n+00839\n+00840\n+00841 /*\n+00842 * circle intersection.\n+00843 * computes the intersection with a circle of given centre and radius.\n+00844 * The output takes the form of a checkxor of the intersection\u2019s particles\n+circle centre x coordinate\n+00845 * - cx\n+00846 * - cy\n+circle centre y coordinate\n+00847 * return the checkxor for the intersection\n+00848 ******************************************************************/\n+00849 siscone::Creference CSphstable_cones::circle_intersect(CSph3vector &cone_centre){\n+00850\n+siscone::Creference intersection;\n+int i;\n+00851\n+00852\n+for (i=0;i\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+237\n+\n+\f238\n+\n+File Documentation\n+\n+00034 #include \n+00035 #include \n+00036 #include \"hash.h\"\n+00037\n+00038 #include \"defines.h\"\n+00039\n+00040 namespace siscone{\n+00041\n+00053 class Cborder_store{\n+00054 public:\n+00056\n+Cborder_store(Cmomentum * momentum, double centre_eta, double centre_phi) :\n+00057\n+mom(momentum), is_in(false) {\n+00058\n+angle = atan2(mom->phi - centre_phi, mom->eta - centre_eta);\n+00059\n+}\n+00060\n+00061\n+Cmomentum * mom;\n+double angle;\n+00062\n+00063\n+bool\n+is_in;\n+00064 };\n+00065\n+00066\n+00069 inline bool operator<(const Cborder_store & a, const Cborder_store & b) {\n+00070\n return a.angle < b.angle;\n 00071 }\n 00072\n 00073\n 00082 class Cstable_cones : public Cvicinity{\n 00083 public:\n 00085\n@@ -15595,19 +19817,19 @@\n 00086\n 00088\n Cstable_cones(std::vector &_particle_list);\n 00089\n 00091\n ~Cstable_cones();\n 00092\n-00097\n void init(std::vector &_particle_list);\n+00097\n 00098\n-int get_stable_cones(double _radius);\n 00106\n+int get_stable_cones(double _radius);\n 00107\n 00109\n std::vector protocones;\n 00110\n 00112\n hash_cones *hc;\n 00113\n@@ -15676,16 +19898,23 @@\n 00196\n void compute_cone_contents();\n 00203\n 00204\n void recompute_cone_contents();\n 00210\n 00211\n-/*\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.29 protocones.h\n+\n+239\n+\n 00212\n+/*\n 00213\n * if we have gone beyond the acceptable threshold of change, compute\n 00214\n * the cone momentum from particle list. in this version, we use the\n 00215\n * \u2019pincluded\u2019 information from the Cvicinity class, but we don\u2019t\n 00216\n@@ -15694,27 +19923,18 @@\n */\n 00218\n void recompute_cone_contents_if_needed(Cmomentum & this_cone, double & this_dpt);\n 00219\n int proceed_with_stability();\n 00225\n 00226\n-/*\n 00227\n+/*\n 00228\n * circle intersection.\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-209\n-\n-\f210\n-\n-File Documentation\n-\n 00229\n * computes the intersection with a circle of given centre and radius.\n 00230\n * The output takes the form of a checkxor of the intersection\u2019s particles\n circle centre x coordinate\n 00231\n * - cx\n@@ -15756,15 +19976,15 @@\n 00266 * \\return the absolute value of the difference between the angles\n 00267 *****************************************************************/\n 00268 inline double abs_dangle(double &angle1, double &angle2);\n 00269\n 00270 }\n 00271 #endif\n \n-5.23 protocones.h\n+5.29 protocones.h\n 00001 // -*- C++ -*00003 // File: protocones.h\n //\n 00004 // Description: header file for stable cones determination (Cstable_cones)\n //\n 00005 // This file is part of the SISCone project.\n //\n 00006 // WARNING: this is not the main SISCone trunk but\n@@ -15773,15 +19993,14 @@\n an adaptation to spherical coordinates\n //\n 00008 // For more details, see http://projects.hepforge.org/siscone\n //\n 00009 //\n //\n 00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n-//\n 00011 //\n //\n 00012 // This program is free software; you can redistribute it and/or modify\n //\n 00013 // it under the terms of the GNU General Public License as published by\n //\n 00014 // the Free Software Foundation; either version 2 of the License, or\n@@ -15818,14 +20037,23 @@\n 00033 #include \"momentum.h\"\n 00034 #include \"vicinity.h\"\n 00035 #include \n 00036 #include \n 00037 #include \n 00038 #include \"hash.h\"\n 00039\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+//\n+\n+\f240\n+\n+File Documentation\n+\n 00040 #include \n 00041\n 00042 namespace siscone_spherical{\n 00043\n 00055 class CSphborder_store{\n 00056 public:\n 00058\n@@ -15834,19 +20062,14 @@\n 00059\n mom(momentum), is_in(false) {\n 00060\n CSph3vector diff = (*momentum) - centre;\n 00061\n angle = atan2(dot_product3(diff, angl_dir2), dot_product3(diff, angl_dir1));\n 00062 #ifdef DEBUG_STABLE_CONES\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.23 protocones.h\n-\n 00063\n std::cout \u00ab \" adding point \" \u00ab momentum->_theta \u00ab \", \" \u00ab momentum->_phi\n 00064\n \u00ab \" at an angle of \" \u00ab angle \u00ab std::endl;\n 00065 #endif\n 00066\n }\n@@ -15913,16 +20136,16 @@\n 00141\n 00143\n CSphmomentum *child;\n 00144\n 00146\n CSphvicinity_elm *centre;\n 00147\n-00149\n unsigned int centre_idx;\n+00149\n 00150\n unsigned int first_cone;\n 00152\n 00153\n 00159\n int init_cone();\n 00160\n@@ -15939,29 +20162,34 @@\n 00178\n * indicate which members are cocircular...\n 00179\n */\n 00180\n void prepare_cocircular_lists();\n 00181\n-00189\n bool cocircular_check();\n+00189\n 00190\n-void test_cone_cocircular(CSphmomentum & borderless_cone,\n 00195\n+void test_cone_cocircular(CSphmomentum & borderless_cone,\n 00196\n std::list & border_list);\n 00197\n void test_stability(CSphmomentum & candidate,\n 00204\n-00205\n const std::vector & border_vect);\n+00205\n 00206\n-void compute_cone_contents();\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.30 quadtree.cpp\n+\n 00213\n+void compute_cone_contents();\n 00214\n void recompute_cone_contents();\n 00220\n 00221\n /*\n 00222\n 00223\n@@ -15973,25 +20201,16 @@\n 00226\n * change the member cone, only the locally supplied one\n 00227\n */\n 00228\n void recompute_cone_contents_if_needed(CSphmomentum & this_cone, double & this_dpt);\n 00229\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-211\n-\n-\f212\n-\n-File Documentation\n-\n-00235\n int proceed_with_stability();\n+00235\n 00236\n /*\n 00237\n 00238\n * circle intersection.\n 00239\n * computes the intersection with a circle of given centre and radius.\n@@ -16015,27 +20234,27 @@\n 00249\n 00251\n std::vector child_list;\n 00252\n 00255\n std::vector< std::pair > multiple_centre_done;\n 00256\n-// information for updating cone contents to avoid rounding errors\n 00257\n+// information for updating cone contents to avoid rounding errors\n 00258\n double dpt;\n 00259 };\n 00260\n 00261 }\n 00262 #endif\n \n-5.24 quadtree.cpp\n+5.30 quadtree.cpp\n 00001\n-00002 // File: quadtree.cpp\n //\n+00002 // File: quadtree.cpp\n 00003 // Description: source file for quadtree management (Cquadtree class)\n //\n 00004 // This file is part of the SISCone project.\n //\n 00005 // For more details, see http://projects.hepforge.org/siscone\n //\n 00006 //\n@@ -16093,14 +20312,23 @@\n 00039 * This class implements the traditional two-dimensional quadtree. *\n 00040 * The elements at each node are of \u2019Cmomentum\u2019 type.\n *\n 00041 *******************************************************************/\n 00042\n 00043 // default ctor\n 00044 //-------------00045 Cquadtree::Cquadtree(){\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+241\n+\n+\f242\n+\n+File Documentation\n+\n 00046\n v = NULL;\n 00047\n 00048\n children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;\n 00049\n has_child = false;\n@@ -16108,19 +20336,14 @@\n 00051\n 00052\n 00053 // ctor with initialisation (see init for details)\n 00054 //-------------------------00055 Cquadtree::Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y){\n 00056\n v = NULL;\n 00057\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.24 quadtree.cpp\n-\n 00058\n children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;\n 00059\n has_child = false;\n 00060\n 00061\n init(_x, _y, _half_size_x, _half_size_y);\n@@ -16216,38 +20439,43 @@\n adequate child\n 00122\n // NOTE: we assume in the whole procedure that the particle is\n 00123\n //\n indeed inside the cell !\n 00124\n-00125\n // step 1: the case of empty cells\n+00125\n 00126\n if (v==NULL){\n 00127\n v = v_add;\n return 0;\n 00128\n 00129\n }\n 00130\n 00131\n // step 2: additional work if 1! particle already present\n 00132\n //\n we use the fact that only 1-particle systems have no child\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.30 quadtree.cpp\n+\n 00133\n if (!has_child){\n-00134\n double new_half_size_x = 0.5*half_size_x;\n-double new_half_size_y = 0.5*half_size_y;\n+00134\n 00135\n-00136\n+double new_half_size_y = 0.5*half_size_y;\n // create children\n+00136\n 00137\n children[0][0] = new Cquadtree(centre_x-new_half_size_x, centre_y-new_half_size_y,\n 00138\n new_half_size_x, new_half_size_y);\n 00139\n children[0][1] = new Cquadtree(centre_x-new_half_size_x, centre_y+new_half_size_y,\n 00140\n@@ -16256,23 +20484,14 @@\n children[1][0] = new Cquadtree(centre_x+new_half_size_x, centre_y-new_half_size_y,\n 00142\n new_half_size_x, new_half_size_y);\n 00143\n children[1][1] = new Cquadtree(centre_x+new_half_size_x, centre_y+new_half_size_y,\n 00144\n new_half_size_x, new_half_size_y);\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-213\n-\n-\f214\n-\n-File Documentation\n-\n 00145\n 00146\n has_child = true;\n 00147\n // forward to child\n 00148\n 00149\n@@ -16285,16 +20504,16 @@\n // copy physical params\n 00153\n 00154\n v = new Cmomentum(*v);\n 00155\n }\n 00156\n-00157\n // step 3: add new particle\n+00157\n 00158\n // Note: v_add being a single particle, eta and phi are correct\n 00159\n children[v_add->eta>centre_x][v_add->phi>centre_y]->add(v_add);\n 00160\n *v+=*v_add;\n 00161\n@@ -16308,16 +20527,16 @@\n 00168 * computes the intersection with a circle of given centre and radius.\n 00169 * The output takes the form of a quadtree with all squares included\n 00170 * in the circle.\n circle centre x coordinate\n 00171 * - cx\n 00172 * - cy\n circle centre y coordinate\n-00173 * - cR2\n circle radius SQUARED\n+00173 * - cR2\n 00174 * return the checksum for the intersection\n 00175 ******************************************************************/\n 00176 Creference Cquadtree::circle_intersect(double cx, double cy, double cR2){\n // Description of the method:\n 00177\n 00178\n // -------------------------00179\n@@ -16333,16 +20552,16 @@\n // 4. check if the square is inside the circle.\n 00184\n //\n If yes, add it to qt and return.\n 00185\n // 5. check intersections with children.\n 00186\n-// step 1: if there is no particle inside te square, no reason to go further\n 00187\n+// step 1: if there is no particle inside te square, no reason to go further\n 00188\n if (v==NULL)\n return Creference();\n 00189\n 00190\n double dx, dy;\n 00191\n@@ -16367,21 +20586,21 @@\n 00201\n dy -= 2.0*M_PI;\n 00202\n // test distance\n 00203\n 00204\n if (dx*dx+dy*dyref;\n+00205\n 00206\n }\n 00207\n-return Creference();\n 00208\n+return Creference();\n 00209\n }\n 00210\n 00211\n // step 3: check if there is an intersection\n 00212\n //double ryp, rym;\n@@ -16393,43 +20612,45 @@\n 00216\n dx_c = fabs(cx-centre_x);\n 00217\n dy_c = fabs(cy-centre_y);\n if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c;\n 00218\n 00219\n-// compute (minimal) the distance (pay attention to the periodicity in phi).\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+243\n+\n+\f244\n+\n+File Documentation\n+\n 00220\n+// compute (minimal) the distance (pay attention to the periodicity in phi).\n 00221\n dx = dx_c-half_size_x;\n-if (dx<0) dx=0;\n 00222\n+if (dx<0) dx=0;\n 00223\n dy = dy_c-half_size_y;\n if (dy<0) dy=0;\n 00224\n 00225\n-00226\n // check the distance\n+00226\n 00227\n if (dx*dx+dy*dy>=cR2){\n-00228\n // no intersection\n+00228\n 00229\n return Creference();\n 00230\n }\n 00231\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.25 quadtree.h\n-\n-215\n-\n 00232\n // step 4: check if included\n 00233\n 00234\n // compute the (maximal) distance\n 00235\n dx = dx_c+half_size_x;\n@@ -16443,16 +20664,16 @@\n 00240\n if (dx*dx+dy*dyref;\n 00242\n }\n 00243\n-00244\n // step 5: the square is not fully in. Recurse to children\n+00244\n 00245\n return children[0][0]->circle_intersect(cx, cy, cR2)\n 00246\n + children[0][1]->circle_intersect(cx, cy, cR2)\n 00247\n + children[1][0]->circle_intersect(cx, cy, cR2)\n 00248\n@@ -16508,18 +20729,18 @@\n 00287 int Cquadtree::save_leaves(FILE *flux){\n 00288\n if (flux==NULL)\n 00289\n return 1;\n 00290\n 00291\n-00292\n if (has_child){\n-if (children[0][0]!=NULL) children[0][0]->save_leaves(flux);\n+00292\n 00293\n+if (children[0][0]!=NULL) children[0][0]->save_leaves(flux);\n 00294\n if (children[0][1]!=NULL) children[0][1]->save_leaves(flux);\n if (children[1][0]!=NULL) children[1][0]->save_leaves(flux);\n 00295\n 00296\n if (children[1][1]!=NULL) children[1][1]->save_leaves(flux);\n 00297\n@@ -16531,35 +20752,31 @@\n 00300\n 00301\n return 0;\n 00302 }\n 00303\n 00304 }\n \n-5.25 quadtree.h\n-00001 // -*- C++ -*00003 // File: quadtree.h\n-00004 // Description: header file for quadtree management (Cquadtree class)\n-00005 // This file is part of the SISCone project.\n-00006 // For more details, see http://projects.hepforge.org/siscone\n-00007 //\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n+\f5.31 quadtree.h\n+\n+5.31 quadtree.h\n+00001 // -*- C++ -*00003 // File: quadtree.h\n //\n+00004 // Description: header file for quadtree management (Cquadtree class)\n //\n+00005 // This file is part of the SISCone project.\n //\n+00006 // For more details, see http://projects.hepforge.org/siscone\n //\n+00007 //\n //\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n //\n-\n-\f216\n-\n-File Documentation\n-\n 00009 //\n //\n 00010 // This program is free software; you can redistribute it and/or modify\n //\n 00011 // it under the terms of the GNU General Public License as published by\n //\n 00012 // the Free Software Foundation; either version 2 of the License, or\n@@ -16608,22 +20825,22 @@\n 00050\n 00054\n ~Cquadtree();\n 00055\n int init(double _x, double _y, double _half_size_x, double _half_size_y);\n 00067\n 00068\n-00076\n int add(Cmomentum *v_add);\n+00076\n 00077\n 00088\n Creference circle_intersect(double cx, double cy, double cR2);\n 00089\n-int save(FILE *flux);\n 00099\n+int save(FILE *flux);\n 00100\n int save_leaves(FILE *flux);\n 00110\n 00111\n double centre_x;\n 00112\n 00113\n@@ -16641,61 +20858,65 @@\n 00120\n bool has_child;\n 00121 };\n 00122\n 00123 }\n 00124 #endif\n \n-5.26 ranlux.cpp\n+5.32 ranlux.cpp\n 00001 // file: ranlux.xpp\n 00002 #include \"ranlux.h\"\n 00003 #include \n 00004 #include \n 00005\n 00006 /* This is a lagged fibonacci generator with skipping developed by Luescher.\n 00007\n The sequence is a series of 24-bit integers, x_n,\n 00008\n-00009\n x_n = d_n + b_n\n+00009\n 00010\n-00011\n where d_n = x_{n-10} - x_{n-24} - c_{n-1}, b_n = 0 if d_n >= 0 and\n+00011\n 00012\n b_n = 2^24 if d_n < 0, c_n = 0 if d_n >= 0 and c_n = 1 if d_n < 0,\n 00013\n where after 24 samples a group of p integers are \"skipped\", to\n 00014\n reduce correlations. By default p = 199, but can be increased to\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+245\n+\n+\f246\n+\n+File Documentation\n+\n 00015\n 365.\n 00016\n-The period of the generator is around 10^171.\n 00017\n+The period of the generator is around 10^171.\n 00018\n-From: M. Luescher, \"A portable high-quality random number generator\n 00019\n+From: M. Luescher, \"A portable high-quality random number generator\n 00020\n for lattice field theory calculations\", Computer Physics\n 00021\n Communications, 79 (1994) 100-110.\n 00022\n Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/\n 00023\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.26 ranlux.cpp\n-\n 00024\n-See also,\n 00025\n+See also,\n 00026\n-F. James, \"RANLUX: A Fortran implementation of the high-quality\n 00027\n+F. James, \"RANLUX: A Fortran implementation of the high-quality\n 00028\n pseudo-random number generator of Luscher\", Computer Physics\n 00029\n Communications, 79 (1994) 111-114\n 00030\n 00031\n Kenneth G. Hamilton, F. James, \"Acceleration of RANLUX\", Computer\n@@ -16721,54 +20942,54 @@\n 00047\n 00048\n unsigned int j;\n unsigned int n;\n 00049\n 00050\n unsigned int skip;\n-unsigned int carry;\n 00051\n-00052\n+unsigned int carry;\n unsigned long int u[24];\n+00052\n 00053 } ranlux_state_t;\n 00054\n 00055\n 00056 // internal generator state\n 00057 //-------------------------00058 ranlux_state_t local_ranlux_state;\n 00059\n 00060\n 00061 // incrementation of the generator state\n 00062 //--------------------------------------00063 static inline unsigned long int increment_state(){\n-00064\n unsigned int i = local_ranlux_state.i;\n+00064\n 00065\n unsigned int j = local_ranlux_state.j;\n long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i]\n 00066\n 00067\n - local_ranlux_state.carry;\n 00068\n-if (delta & mask_hi){\n 00069\n+if (delta & mask_hi){\n 00070\n local_ranlux_state.carry = 1;\n 00071\n delta &= mask_lo;\n 00072\n } else {\n 00073\n local_ranlux_state.carry = 0;\n 00074\n }\n 00075\n 00076\n local_ranlux_state.u[i] = delta;\n 00077\n-if (i==0)\n 00078\n+if (i==0)\n 00079\n i = 23;\n else\n 00080\n 00081\n i--;\n 00082\n@@ -16792,42 +21013,40 @@\n 00093 }\n 00094\n 00095\n 00096 // set generator state\n 00097 //--------------------00098 static void ranlux_set(unsigned long int s){\n int i;\n 00099\n-00100\n long int seed;\n+00100\n 00101\n-if (s==0)\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.33 siscone/ranlux.h File Reference\n+\n+247\n+\n 00102\n+if (s==0)\n /* default seed is 314159265 */\n 00103\n s = 314159265;\n 00104\n 00105\n seed = s;\n 00106\n 00107\n /* This is the initialization algorithm of F. James, widely in use\n 00108\n for RANLUX. */\n 00109\n-00110\n for (i=0;i<24;i++){\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-217\n-\n-\f218\n-\n-File Documentation\n-\n+00110\n 00111\n unsigned long int k = seed/53668;\n 00112\n seed = 40014*(seed-k*53668)-k*12211;\n if (seed<0){\n 00113\n 00114\n@@ -16844,16 +21063,16 @@\n 00120\n local_ranlux_state.j = 9;\n 00121\n local_ranlux_state.n = 0;\n 00122\n local_ranlux_state.skip = 389-24; // 389 => best decorrelation\n 00123\n-if (local_ranlux_state.u[23]&mask_hi){\n 00124\n+if (local_ranlux_state.u[23]&mask_hi){\n 00125\n local_ranlux_state.carry = 1;\n 00126\n } else {\n 00127\n local_ranlux_state.carry = 0;\n 00128\n@@ -16868,18 +21087,18 @@\n 00136\n ranlux_set(0);\n 00137 }\n 00138\n 00139\n 00140 // get random number\n 00141 //------------------00142 unsigned long int ranlux_get(){\n-const unsigned int skip = local_ranlux_state.skip;\n 00143\n-00144\n+const unsigned int skip = local_ranlux_state.skip;\n unsigned long int r = increment_state();\n+00144\n 00145\n 00146\n local_ranlux_state.n++;\n 00147\n if (local_ranlux_state.n == 24){\n 00148\n 00149\n@@ -16897,16 +21116,16 @@\n 00155\n 00156 }\n 00157\n 00158 // print generator state\n 00159 //----------------------00160 void ranlux_print_state(){\n 00161\n size_t i;\n-unsigned char *p = (unsigned char *) (&local_ranlux_state);\n 00162\n+unsigned char *p = (unsigned char *) (&local_ranlux_state);\n 00163\n const size_t n = sizeof (ranlux_state_t);\n 00164\n for (i=0;i= 0 and\n+00011\n 00012\n b_n = 2^24 if d_n < 0, c_n = 0 if d_n >= 0 and c_n = 1 if d_n < 0,\n 00013\n where after 24 samples a group of p integers are \"skipped\", to\n 00014\n reduce correlations. By default p = 199, but can be increased to\n 00015\n 365.\n 00016\n-The period of the generator is around 10^171.\n 00017\n+The period of the generator is around 10^171.\n 00018\n-From: M. Luescher, \"A portable high-quality random number generator\n 00019\n+From: M. Luescher, \"A portable high-quality random number generator\n 00020\n for lattice field theory calculations\", Computer Physics\n 00021\n Communications, 79 (1994) 100-110.\n 00022\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-219\n-\n-\f220\n-\n-File Documentation\n-\n-00023\n Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/\n+00023\n 00024\n-00025\n See also,\n+00025\n 00026\n 00027\n F. James, \"RANLUX: A Fortran implementation of the high-quality\n 00028\n pseudo-random number generator of Luscher\", Computer Physics\n 00029\n Communications, 79 (1994) 111-114\n 00030\n-Kenneth G. Hamilton, F. James, \"Acceleration of RANLUX\", Computer\n 00031\n+Kenneth G. Hamilton, F. James, \"Acceleration of RANLUX\", Computer\n 00032\n Physics Communications, 101 (1997) 241-248\n 00033\n-Kenneth G. Hamilton, \"Assembler RANLUX for PCs\", Computer Physics\n 00034\n+Kenneth G. Hamilton, \"Assembler RANLUX for PCs\", Computer Physics\n 00035\n Communications, 101 (1997) 249-253 */\n 00036\n 00037 namespace siscone{\n 00038\n 00040 void ranlux_init();\n 00041\n 00043 unsigned long int ranlux_get();\n 00044\n 00046 void ranlux_print_state();\n 00047\n 00048 }\n 00049 #endif\n \n-5.29 reference.cpp\n+5.35 reference.cpp\n 00001\n 00002 // File: reference.cpp\n //\n 00003 // Description: source file for checkxor management (Creference class)\n //\n 00004 // This file is part of the SISCone project.\n //\n@@ -17092,14 +21308,23 @@\n 00024 // $Date:: 2011-10-05 23:27:09 +0200 (Wed, 05 Oct 2011)\n $//\n 00026\n 00027 #include \"reference.h\"\n 00028 #include \"ranlux.h\"\n 00029 #include \n 00030\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+249\n+\n+\f250\n+\n+File Documentation\n+\n 00031 namespace siscone{\n 00032\n 00033 /*******************************************************\n 00034 * Creference implementation\n *\n 00035 * references used for checksums.\n *\n@@ -17127,32 +21352,25 @@\n 00051\n 00052 // create a random reference\n 00053 //--------------------------00054 void Creference::randomize(){\n 00055 // ref[0] = reference_bit;\n 00056 // ref[1] = 0;\n 00057 // ref[2] = 0;\n 00058 // reference_bit \u00ab= 1;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.30 reference.h\n-\n-221\n-\n 00059\n-unsigned int r1 = ranlux_get();\n 00060\n+unsigned int r1 = ranlux_get();\n 00061\n unsigned int r2 = ranlux_get();\n unsigned int r3 = ranlux_get();\n 00062\n 00063\n unsigned int r4 = ranlux_get();\n-00064\n // since ranlux only produces 24 bits, take r4 and add 8 bits\n+00064\n 00065\n // from it to each of r1,r2, r3 to get 3*32 bits.\n 00066\n ref[0] = r1+((r4 & 0x00ff0000) \u00ab 8);\n 00067\n ref[1] = r2+((r4 & 0x0000ff00) \u00ab 16);\n 00068\n@@ -17160,22 +21378,22 @@\n 00069\n if (is_empty()) randomize();\n 00070\n 00071 }\n 00072\n 00073 // test emptyness\n 00074 //---------------00075 bool Creference::is_empty(){\n-00076\n return (ref[0]==0) && (ref[1]==0) && (ref[2]==0);\n+00076\n 00077 }\n 00078\n 00079 // test non-emptyness\n 00080 //-------------------00081 bool Creference::not_empty(){\n-return (ref[0]!=0) || (ref[1]!=0) || (ref[2]!=0);\n 00082\n+return (ref[0]!=0) || (ref[1]!=0) || (ref[2]!=0);\n 00083 }\n 00084\n 00085 // assignment of reference\n 00086 //------------------------00087 Creference& Creference::operator = (const Creference &r){\n 00088\n ref[0] = r.ref[0];\n 00089\n@@ -17210,64 +21428,61 @@\n 00111 //----------------------------00112 Creference& Creference::operator -= (const Creference &r){\n 00113\n ref[0] ^= r.ref[0];\n 00114\n ref[1] ^= r.ref[1];\n 00115\n ref[2] ^= r.ref[2];\n-00116\n return *this;\n+00116\n 00117 }\n 00118\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.36 reference.h\n+\n 00119 }\n 00120\n \n-5.30 reference.h\n+5.36 reference.h\n 00001 // -*- C++ -*00003 // File: reference.h\n-00004 // Description: header file for checkxor management (Creference class)\n-00005 // This file is part of the SISCone project.\n-00006 // For more details, see http://projects.hepforge.org/siscone\n-00007 //\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-00009 //\n-00010 // This program is free software; you can redistribute it and/or modify\n-00011 // it under the terms of the GNU General Public License as published by\n-00012 // the Free Software Foundation; either version 2 of the License, or\n-00013 // (at your option) any later version.\n-00014 //\n-00015 // This program is distributed in the hope that it will be useful,\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-00018 // GNU General Public License for more details.\n-00019 //\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n //\n+00004 // Description: header file for checkxor management (Creference class)\n //\n+00005 // This file is part of the SISCone project.\n //\n+00006 // For more details, see http://projects.hepforge.org/siscone\n //\n+00007 //\n //\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n //\n+00009 //\n //\n+00010 // This program is free software; you can redistribute it and/or modify\n //\n+00011 // it under the terms of the GNU General Public License as published by\n //\n+00012 // the Free Software Foundation; either version 2 of the License, or\n //\n+00013 // (at your option) any later version.\n //\n+00014 //\n //\n+00015 // This program is distributed in the hope that it will be useful,\n //\n+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n //\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n //\n+00018 // GNU General Public License for more details.\n //\n+00019 //\n //\n-\n-\f222\n-\n-File Documentation\n-\n 00020 // You should have received a copy of the GNU General Public License\n //\n 00021 // along with this program; if not, write to the Free Software\n //\n 00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n 00023 //\n //\n@@ -17323,66 +21538,70 @@\n 00085 bool operator < (const Creference &r1, const Creference &r2);\n 00086\n 00087\n 00088 //=============== inline material ================\n 00089\n 00090 // equality test for two references\n 00091 //---------------------------------00092 inline bool operator == (const Creference &r1, const Creference &r2){\n-return (r1.ref[0]==r2.ref[0]) && (r1.ref[1]==r2.ref[1]) && (r1.ref[2]==r2.ref[2]);\n 00093\n+return (r1.ref[0]==r2.ref[0]) && (r1.ref[1]==r2.ref[1]) && (r1.ref[2]==r2.ref[2]);\n 00094 }\n 00095\n 00096 // difference test for two references\n 00097 //---------------------------------00098 inline bool operator != (const Creference &r1, const Creference &r2){\n-00099\n return (r1.ref[0]!=r2.ref[0]) || (r1.ref[1]!=r2.ref[1]) || (r1.ref[2]!=r2.ref[2]);\n+00099\n 00100 }\n 00101\n 00102 // difference test for two references\n-00103 //---------------------------------00104 inline bool operator < (const Creference &r1, const Creference &r2){\n+00103 //----------------------------------\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+251\n+\n+\f252\n+\n+File Documentation\n+\n+00104 inline bool operator < (const Creference &r1, const Creference &r2){\n return (r1.ref[0] &_particles, double _radius,\n-00157\n int _n_pass_max, double _ptmin,\n+00157\n 00158\n Esplit_merge_scale _ordering_scale){\n 00159\n _initialise_if_needed();\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+253\n+\n+\f254\n+\n+File Documentation\n+\n 00160\n-00161\n // run some general safety tests (NB: f will be checked in split-merge)\n+00161\n 00162\n if (_radius <= 0.0 || _radius >= 0.5*M_PI) {\n 00163\n ostringstream message;\n 00164\n message \u00ab \"Illegal value for cone radius, R = \" \u00ab _radius\n 00165\n \u00ab \" (legal values are 0flags());\n 00250\n 00251\n+00252\n+\n+255\n+\n+// print the banner\n+if (_banner_ostr != 0){\n+ios::fmtflags flags_to_restore(_banner_ostr->flags());\n+\n (*_banner_ostr) \u00ab \"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" \u00ab endl;\n+(*_banner_ostr) \u00ab \"#\n SISCone\n version \" \u00ab setw(28) \u00ab left \u00ab siscone_version()\n-00252\n-(*_banner_ostr) \u00ab \"#\n \u00ab \"o\" \u00ab endl;\n 00253\n (*_banner_ostr) \u00ab \"#\n http://projects.hepforge.org/siscone\n o\" \u00ab endl;\n o\" \u00ab endl;\n 00254\n (*_banner_ostr) \u00ab \"#\n 00255\n (*_banner_ostr) \u00ab \"# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm\n o\" \u00ab endl;\n-o\" \u00ab endl;\n 00256\n (*_banner_ostr) \u00ab \"# SISCone was written by Gavin Salam and Gregory Soyez\n+o\" \u00ab endl;\n 00257\n (*_banner_ostr) \u00ab \"# It is released under the terms of the GNU General Public License o\" \u00ab endl;\n-o\" \u00ab endl;\n 00258\n (*_banner_ostr) \u00ab \"#\n+o\" \u00ab endl;\n+o\" \u00ab endl;\n 00259\n (*_banner_ostr) \u00ab \"# A description of the algorithm is available in the publication\n-o\" \u00ab endl;\n 00260\n (*_banner_ostr) \u00ab \"# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)].\n o\" \u00ab endl;\n o\" \u00ab endl;\n 00261\n (*_banner_ostr) \u00ab \"# Please cite it if you use SISCone.\n 00262\n@@ -17814,23 +22040,15 @@\n _banner_ostr->flags(flags_to_restore);\n 00267\n }\n 00268 }\n 00269\n 00270 // finally, a bunch of functions to access to\n 00271 // basic information (package name, version)\n-00272 //---------------------------------------------\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f226\n-\n-File Documentation\n-\n-00273\n+00272 //--------------------------------------------00273\n 00274 /*\n 00275 * return SISCone package name.\n 00276 * This is nothing but \"SISCone\", it is a replacement to the\n 00277 * SISCONE_PACKAGE_NAME string defined in config.h and which is not\n 00278 * guaranteed to be public.\n 00279 * return the SISCone name as a string\n 00280 */\n@@ -17842,21 +22060,21 @@\n 00285 /*\n 00286 * return SISCone version number.\n 00287 * return a string of the form \"X.Y.Z\" with possible additional tag\n 00288 *\n (alpha, beta, devel) to mention stability status\n 00289 */\n 00290 string siscone_version(){\n-return SISCONE_VERSION;\n 00291\n+return SISCONE_VERSION;\n 00292 }\n 00293\n 00294 }\n \n-5.32 siscone.cpp\n+5.38 siscone.cpp\n 00001\n //\n 00002 // File: siscone.cpp\n 00003 // Description: source file for the main SISCone class\n //\n 00004 // This file is part of the SISCone project.\n //\n@@ -17905,14 +22123,21 @@\n 00026 // $Date:: 2016-05-19 16:52:05 +0200 (Thu, 19 May 2016)\n $//\n 00028\n 00029 #include \n 00030 #include \n 00031 #include \n 00032 #include \n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f256\n+\n+File Documentation\n+\n 00033 #include \"momentum.h\"\n 00034 #include \"siscone.h\"\n 00035 #include \n 00036 #include \n 00037 #include \n 00038\n 00039 namespace siscone_spherical{\n@@ -17935,52 +22160,47 @@\n 00052 //-------------00053 CSphsiscone::CSphsiscone(){\n 00054\n rerun_allowed = false;\n 00055 }\n 00056\n 00057 // default dtor\n 00058 //-------------00059 CSphsiscone::~CSphsiscone(){\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.32 siscone.cpp\n-\n 00060\n rerun_allowed = false;\n 00061 }\n 00062\n 00063 bool CSphsiscone::init_done=false;\n 00064 std::ostream* CSphsiscone::_banner_ostr=&cout;\n 00065\n 00066 /*\n 00067 * compute the jets from a given particle set doing multiple passes\n 00068 * such pass N looks for jets among all particles not put into jets\n 00069 * during previous passes.\n-list of particles\n 00070 * - _particles\n-00071 * - _radius\n+list of particles\n cone radius\n-shared energy threshold for splitting&merging\n+00071 * - _radius\n 00072 * - _f\n+shared energy threshold for splitting&merging\n 00073 * - _n_pass_max maximum number of runs\n minimum energy of the protojets\n 00074 * - _Emin\n 00075 * - _split_merge_scale\n the scale choice for the split-merge procedure\n-00076 *\n NOTE: using pt leads to IR unsafety for some events with momentum\n-conservation. So we strongly advise not to change the default\n+00076 *\n 00077 *\n-00078 *\n+conservation. So we strongly advise not to change the default\n value.\n+00078 *\n 00079 * return the number of jets found.\n 00080 **********************************************************************/\n 00081 int CSphsiscone::compute_jets(vector &_particles, double _radius, double _f,\n-00082\n int _n_pass_max, double _Emin,\n+00082\n 00083\n Esplit_merge_scale _split_merge_scale){\n // make sure things are initialised\n 00084\n 00085\n _initialise_if_needed();\n 00086\n@@ -17990,16 +22210,16 @@\n if (_radius <= 0.0 || _radius >= 0.5*M_PI) {\n 00089\n ostringstream message;\n 00090\n message \u00ab \"Illegal value for cone radius, R = \" \u00ab _radius\n 00091\n \u00ab \" (legal values are 0 &_particles, double _radius,\n-00157\n int _n_pass_max, double _Emin,\n+00157\n 00158\n Esplit_merge_scale _ordering_scale){\n // make sure things are initialised\n 00159\n 00160\n _initialise_if_needed();\n 00161\n@@ -18122,26 +22340,26 @@\n if (_radius <= 0.0 || _radius >= 0.5*M_PI) {\n 00164\n ostringstream message;\n 00165\n message \u00ab \"Illegal value for cone radius, R = \" \u00ab _radius\n 00166\n \u00ab \" (legal values are 00) && (_n_pass_max!=0));\n-00200\n-// split & merge\n-00201\n-00202\n-return jets.size();\n-00203 }\n-00204 /*\n-00205 * recompute the jets with a different overlap parameter.\n-00206 * we use the same particles and R as in the preceeding call.\n-shared energy threshold for splitting&merging\n-00207 * - _f\n-00208 * - _Emin\n-minimum Energy of the protojets\n-the scale choice for the split-merge procedure\n-00209 * - _split_merge_scale\n-00210 *\n-NOTE: using pt leads to IR unsafety for some events with momentum\n-conservation. So we strongly advise not to change the default\n-00211 *\n-00212 *\n-value.\n-00213 * return the number of jets found, -1 if recomputation not allowed.\n-00214 ********************************************************************/\n-00215 int CSphsiscone::recompute_jets(double _f, double _Emin,\n-00216\n-Esplit_merge_scale _split_merge_scale){\n-if (!rerun_allowed)\n-00217\n-00218\n-return -1;\n-00219\n-00220\n-ptcomparison.split_merge_scale = _split_merge_scale;\n-00221\n-// restore particle list\n-00222\n-00223\n-partial_clear();\n-00224\n-init_pleft();\n-00225\n-// initialise split/merge algorithm\n-00226\n-00227\n-unsigned int i;\n-00228\n-for (i=0;iflags());\n-00250\n-00251\n-(*_banner_ostr) \u00ab \"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" \u00ab endl;\n-SISCone\n-version \" \u00ab setw(28) \u00ab left \u00ab siscone_version()\n-00252\n-(*_banner_ostr) \u00ab \"#\n-\u00ab \"o\" \u00ab endl;\n-http://projects.hepforge.org/siscone\n-o\" \u00ab endl;\n-00253\n-(*_banner_ostr) \u00ab \"#\n-00254\n-(*_banner_ostr) \u00ab \"#\n-o\" \u00ab endl;\n-00255\n-(*_banner_ostr) \u00ab \"# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm\n-o\" \u00ab endl;\n-o\" \u00ab endl;\n-00256\n-(*_banner_ostr) \u00ab \"# SISCone was written by Gavin Salam and Gregory Soyez\n-00257\n-(*_banner_ostr) \u00ab \"# It is released under the terms of the GNU General Public License o\" \u00ab endl;\n-o\" \u00ab endl;\n-00258\n-(*_banner_ostr) \u00ab \"#\n-00259\n-(*_banner_ostr) \u00ab \"#\n-!!!\n-WARNING\n-!!!\n-o\" \u00ab endl;\n-This is the version of SISCone using spherical coordinates\n-o\" \u00ab endl;\n-00260\n-(*_banner_ostr) \u00ab \"#\n-00261\n-(*_banner_ostr) \u00ab \"#\n-o\" \u00ab endl;\n-00262\n-(*_banner_ostr) \u00ab \"# A description of the algorithm is available in the publication\n-o\" \u00ab endl;\n-o\" \u00ab endl;\n-00263\n-(*_banner_ostr) \u00ab \"# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)].\n-00264\n-(*_banner_ostr) \u00ab \"# Please cite it if you use SISCone.\n-o\" \u00ab endl;\n-00265\n-(*_banner_ostr) \u00ab \"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" \u00ab endl;\n-00266\n-(*_banner_ostr) \u00ab endl;\n-00267\n-00268\n-_banner_ostr->flush();\n-00269\n-_banner_ostr->flags(flags_to_restore);\n-00270\n-}\n-00271 }\n-00272\n-00273 // finally, a bunch of functions to access to\n-00274 // basic information (package name, version)\n-00275 //--------------------------------------------00276\n-00277 /*\n-00278 * return SISCone package name.\n-00279 * This is nothing but \"SISCone\", it is a replacement to the\n-00280 * SISCONE_PACKAGE_NAME string defined in config.h and which is not\n-00281 * guaranteed to be public.\n-00282 * return the SISCone name as a string\n-00283 */\n-00284 string siscone_package_name(){\n-00285\n-return SISCONE_PACKAGE_NAME;\n-00286 }\n-00287\n-00288 /*\n-00289 * return SISCone version number.\n-00290 * return a string of the form \"X.Y.Z\" with possible additional tag\n-00291 *\n-(alpha, beta, devel) to mention stability status\n-00292 */\n-00293 string siscone_version(){\n-return SISCONE_VERSION;\n-00294\n-00295 }\n-00296\n-00297 }\n-\n-5.33 siscone.h\n-00001 // -*- C++ -*00003 // File: siscone.h\n-00004 // Description: header file for the main SISCone class\n-00005 // This file is part of the SISCone project.\n-00006 // For more details, see http://projects.hepforge.org/siscone\n-00007 //\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-00009 //\n-00010 // This program is free software; you can redistribute it and/or modify\n-00011 // it under the terms of the GNU General Public License as published by\n-00012 // the Free Software Foundation; either version 2 of the License, or\n-00013 // (at your option) any later version.\n-00014 //\n-00015 // This program is distributed in the hope that it will be useful,\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-\n-\f230\n-\n-File Documentation\n-\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00018 // GNU General Public License for more details.\n-//\n-00019 //\n-//\n-00020 // You should have received a copy of the GNU General Public License\n-//\n-00021 // along with this program; if not, write to the Free Software\n-//\n-00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00023 //\n-//\n-00024 // $Revision:: 401\n-$//\n-00025 // $Date:: 2016-05-19 16:44:37 +0200 (Thu, 19 May 2016)\n-$//\n-00027\n-00028 #ifndef __SISCONE_H__\n-00029 #define __SISCONE_H__\n-00030\n-00031 #include \"protocones.h\"\n-00032 #include \"split_merge.h\"\n-00033\n-00034 namespace siscone{\n-00035\n-00048 class Csiscone : public Cstable_cones, public Csplit_merge{\n-00049 public:\n-00051\n-Csiscone();\n-00052\n-00054\n-~Csiscone();\n-00055\n-int compute_jets(std::vector &_particles, double _radius, double _f,\n-00076\n-int _n_pass_max=0, double _ptmin=0.0,\n-00077\n-00078\n-Esplit_merge_scale _split_merge_scale=SM_pttilde);\n-00079\n-00097\n-int compute_jets_progressive_removal(std::vector &_particles, double _radius,\n-00098\n-int _n_pass_max=0, double _ptmin=0.0,\n-00099\n-Esplit_merge_scale _ordering_scale=SM_pttilde);\n-00100\n-int recompute_jets(double _f, double _ptmin = 0.0,\n-00113\n-00114\n-Esplit_merge_scale _split_merge_scale=SM_pttilde);\n-00115\n-00117\n-std::vector > protocones_list;\n-00118\n-00119\n-// random number initialisation\n-00120\n-static bool init_done;\n-00121\n-00122 #ifdef DEBUG_STABLE_CONES\n-00123\n-int nb_hash_cones_total, nb_hash_occupied_total;\n-00124 #endif\n-00125\n-static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}\n-00137\n-00138\n-static std::ostream * banner_stream() {return _banner_ostr;}\n-00143\n-00144\n-00145 private:\n-bool rerun_allowed;\n-00146\n-00147\n-static std::ostream * _banner_ostr;\n-00148\n-void _initialise_if_needed();\n-00150\n-00151\n-00152 };\n-00153\n-00154\n-00155 // finally, a bunch of functions to access to\n-00156 // basic information (package name, version)\n-00157 //--------------------------------------------00158\n-00166 std::string siscone_package_name();\n-00167\n-00173 std::string siscone_version();\n-00174\n-00175 }\n-00176 #endif\n-\n-5.34 siscone.h\n-00001 // -*- C++ -*00003 // File: siscone.h\n-00004 // Description: header file for the main SISCone class\n-00005 // This file is part of the SISCone project.\n-00006 // WARNING: this is not the main SISCone trunk but\n-00007 //\n-an adaptation to spherical coordinates\n-00008 // For more details, see http://projects.hepforge.org/siscone\n-00009 //\n-00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n-00011 //\n-00012 // This program is free software; you can redistribute it and/or modify\n-00013 // it under the terms of the GNU General Public License as published by\n-00014 // the Free Software Foundation; either version 2 of the License, or\n-\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.35 siscone_error.cpp\n-\n-231\n-\n-00015 // (at your option) any later version.\n-//\n-00016 //\n-//\n-00017 // This program is distributed in the hope that it will be useful,\n-//\n-00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00020 // GNU General Public License for more details.\n-//\n-00021 //\n-//\n-00022 // You should have received a copy of the GNU General Public License\n-//\n-00023 // along with this program; if not, write to the Free Software\n-//\n-00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00025 //\n-//\n-00026 // $Revision:: 401\n-$//\n-00027 // $Date:: 2016-05-19 16:44:37 +0200 (Thu, 19 May 2016)\n-$//\n-00029\n-00030 #ifndef __SPH_SISCONE_H__\n-00031 #define __SPH_SISCONE_H__\n-00032\n-00033 #include \"protocones.h\"\n-00034 #include \"split_merge.h\"\n-00035\n-00036 namespace siscone_spherical{\n-00037\n-00050 class CSphsiscone : public CSphstable_cones, public CSphsplit_merge{\n-00051 public:\n-00053\n-CSphsiscone();\n-00054\n-00056\n-~CSphsiscone();\n-00057\n-00076\n-int compute_jets(std::vector &_particles, double _radius, double _f,\n-00077\n-int _n_pass_max=0, double _Emin=0.0,\n-00078\n-Esplit_merge_scale _split_merge_scale=SM_Etilde);\n-00079\n-int compute_jets_progressive_removal(std::vector &_particles, double _radius,\n-00094\n-00095\n-int _n_pass_max=0, double _Emin=0.0,\n-00096\n-Esplit_merge_scale _ordering_scale=SM_Etilde);\n-00097\n-00110\n-int recompute_jets(double _f, double _Emin = 0.0,\n-00111\n-Esplit_merge_scale _split_merge_scale=SM_Etilde);\n-00112\n-00114\n-std::vector > protocones_list;\n-00115\n-// random number initialisation\n-00116\n-00117\n-static bool init_done;\n-00118\n-00119 #ifdef DEBUG_STABLE_CONES\n-00120\n-int nb_hash_cones_total, nb_hash_occupied_total;\n-00121 #endif\n-00122\n-00134\n-static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}\n-00135\n-static std::ostream * banner_stream() {return _banner_ostr;}\n-00140\n-00141\n-00142 private:\n-bool rerun_allowed;\n-00143\n-00144\n-static std::ostream * _banner_ostr;\n-00145\n-void _initialise_if_needed();\n-00147\n-00148\n-00149 };\n-00150\n-00151\n-00152 // finally, a bunch of functions to access to\n-00153 // basic information (package name, version)\n-00154 //--------------------------------------------00155\n-00163 std::string siscone_package_name();\n-00164\n-00170 std::string siscone_version();\n-00171\n-00172 }\n-00173 #endif\n-\n-5.35 siscone_error.cpp\n-00001\n-00002 // File: siscone_error.cpp\n-00003 // Description: source file for SISCone error messages (Csiscone_error)\n-00004 // This file is part of the SISCone project.\n-00005 // For more details, see http://projects.hepforge.org/siscone\n-00006 //\n-00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-00008 //\n-00009 // This program is free software; you can redistribute it and/or modify\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-\n-\f232\n-\n-File Documentation\n-\n-00010 // it under the terms of the GNU General Public License as published by\n-//\n-00011 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00012 // (at your option) any later version.\n-//\n-00013 //\n-//\n-00014 // This program is distributed in the hope that it will be useful,\n-//\n-00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00017 // GNU General Public License for more details.\n-//\n-00018 //\n-//\n-00019 // You should have received a copy of the GNU General Public License\n-//\n-00020 // along with this program; if not, write to the Free Software\n-//\n-00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00022 //\n-//\n-00023 // $Revision:: 123\n-$//\n-00024 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)\n-$//\n-00026\n-00027 #include \"siscone_error.h\"\n-00028\n-00029 namespace siscone{\n-00030\n-00031 bool Csiscone_error::m_print_errors = true;\n-00032\n-00033 }\n-\n-5.36 siscone_error.h\n-00001 // -*- C++ -*00003 // File: siscone_error.h\n-//\n-00004 // Description: header file for SISCone error messages (Csiscone_error)\n-//\n-00005 // This file is part of the SISCone project.\n-//\n-00006 // For more details, see http://projects.hepforge.org/siscone\n-//\n-00007 //\n-//\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-//\n-00009 //\n-//\n-00010 // This program is free software; you can redistribute it and/or modify\n-//\n-00011 // it under the terms of the GNU General Public License as published by\n-//\n-00012 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00013 // (at your option) any later version.\n-//\n-00014 //\n-//\n-00015 // This program is distributed in the hope that it will be useful,\n-//\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00018 // GNU General Public License for more details.\n-//\n-00019 //\n-//\n-00020 // You should have received a copy of the GNU General Public License\n-//\n-00021 // along with this program; if not, write to the Free Software\n-//\n-00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00023 //\n-//\n-00024 // $Revision:: 327\n-$//\n-00025 // $Date:: 2011-11-25 15:19:39 +0100 (Fri, 25 Nov 2011)\n-$//\n-00027\n-00028 #ifndef __SISCONE_ERROR_H__\n-00029 #define __SISCONE_ERROR_H__\n-00030\n-00031 #include\n-00032 #include\n-00033\n-00034 namespace siscone{\n-00035\n-00038 class Csiscone_error {\n-00039 public:\n-00041\n-Csiscone_error() {;};\n-00042\n-00045\n-Csiscone_error(const std::string & message_in) {\n-00046\n-m_message = message_in;\n-if (m_print_errors) std::cerr \u00ab \"siscone::Csiscone_error: \"\u00ab message_in \u00ab std::endl;\n-00047\n-00048\n-};\n-00049\n-00051\n-std::string message() const {return m_message;};\n-00052\n-static void setm_print_errors(bool print_errors) {\n-00055\n-00056\n-m_print_errors = print_errors;};\n-00057\n-00058 private:\n-00059\n-std::string m_message;\n-static bool m_print_errors;\n-00060\n-00061 };\n-00062\n-00063 }\n-00064 #endif\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.37 hash.cpp\n-\n-5.37 hash.cpp\n-00001\n-//\n-00002 // File: hash.cpp\n-00003 // Description: source file for classes hash_element and hash_cones\n-//\n-00004 // This file is part of the SISCone project.\n-//\n-00005 // For more details, see http://projects.hepforge.org/siscone\n-//\n-00006 //\n-//\n-00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-//\n-00008 //\n-//\n-00009 // This program is free software; you can redistribute it and/or modify\n-//\n-00010 // it under the terms of the GNU General Public License as published by\n-//\n-00011 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00012 // (at your option) any later version.\n-//\n-00013 //\n-//\n-00014 // This program is distributed in the hope that it will be useful,\n-//\n-00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00017 // GNU General Public License for more details.\n-//\n-00018 //\n-//\n-00019 // You should have received a copy of the GNU General Public License\n-//\n-00020 // along with this program; if not, write to the Free Software\n-//\n-00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00022 //\n-//\n-00023 // $Revision:: 225\n-$//\n-00024 // $Date:: 2008-05-20 16:59:47 +0200 (Tue, 20 May 2008)\n-$//\n-00026\n-00027 #include \n-00028 #include \n-00029 #include \"hash.h\"\n-00030 #include \n-00031\n-00032 namespace siscone{\n-00033\n-00034 using namespace std;\n-00035\n-00036 /**************************************************************\n-00037 * implementation of hash_cones\n-*\n-00038 * list of cones candidates.\n-*\n-00039 * We store in this class all the hash_elements and give\n-*\n-00040 * functions to manipulate them.\n-*\n-00041 **************************************************************/\n-00042\n-00043 // constructor with initialisation\n-00044 // - _Np number of particles\n-00045 // - _R2 cone radius (squared)\n-00046 //----------------------------------00047 hash_cones::hash_cones(int _Np, double _R2){\n-00048\n-int i;\n-00049\n-00050\n-n_cones = 0;\n-00051 #ifdef DEBUG_STABLE_CONES\n-00052\n-n_occupied_cells = 0;\n-00053 #endif\n-00054\n-// determine hash size\n-00055\n-00056\n-// for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4\n-00057\n-//mask = 1 \u00ab (int) (2*log(double(_Np))/log(2.0));\n-00058\n-//if (mask<=1) mask=2;\n-00059\n-int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0));\n-00060\n-if (nbits<1) nbits=1;\n-00061\n-mask = 1 \u00ab nbits;\n-00062\n-// create hash\n-00063\n-00064\n-hash_array = new hash_element*[mask];\n-00065\n-mask--;\n-00066\n-00067\n-// set the array to 0\n-00068\n-//? needed ?\n-00069\n-for (i=0;inext;\n-delete elm;\n-00085\n-00086\n-}\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-233\n-\n-\f234\n-\n-File Documentation\n-\n-00087\n-}\n-00088\n-delete[] hash_array;\n-00089\n-00090 }\n-00091\n-00092\n-00093 /*\n-00094 * insert a new candidate into the hash.\n-00095 * - v\n-4-momentum of the cone to add\n-00096 * - parent parent particle defining the cone\n-child particle defining the cone\n-00097 * - child\n-00098 * - p_io\n-whether the parent has to belong to the cone or not\n-whether the child has to belong to the cone or not\n-00099 * - c_io\n-00100 * return 0 on success, 1 on error\n-00101 ***********************************************************************/\n-00102 int hash_cones::insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io){\n-00103\n-hash_element *elm;\n-00104\n-int index = (v->ref.ref[0]) & mask;\n-00105\n-// check the array cell corresponding to our reference\n-00106\n-00107\n-elm = hash_array[index];\n-00108\n-00109 #ifdef DEBUG_STABLE_CONES\n-00110\n-if (elm==NULL)\n-00111\n-n_occupied_cells++;\n-00112 #endif\n-00113\n-do{\n-00114\n-00115\n-// if it is not present, add it\n-00116\n-if (elm==NULL){\n-// create element\n-00117\n-00118\n-elm = new hash_element;\n-00119\n-// set its varibles\n-00120\n-00121\n-// Note: at this level, eta and phi have already been computed\n-00122\n-//\n-through Cmomentum::build_etaphi.\n-00123\n-elm->ref = v->ref;\n-00124\n-//compute vectors centre\n-00125\n-00126\n-v->build_etaphi();\n-00127\n-elm->eta = v->eta;\n-00128\n-elm->phi = v->phi;\n-00129\n-// if at least one of the two is_inside tests gives a result != from the expected,\n-00130\n-// the || will be true hence !(...) false as wanted\n-00131\n-elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));\n-00132\n-//cout \u00ab \"-- new status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n-00133\n-00134\n-// update hash\n-00135\n-elm->next = hash_array[index];\n-00136\n-hash_array[index] = elm;\n-00137\n-00138\n-n_cones++;\n-return 0;\n-00139\n-00140\n-}\n-00141\n-00142\n-// if the cone is already there, simply update stability status\n-00143\n-if (v->ref == elm->ref){\n-00144\n-// there is only an update to perform to see if the cone is still stable\n-00145\n-if (elm->is_stable){\n-00146\n-v->build_etaphi();\n-00147\n-elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));\n-00148\n-//cout \u00ab \" parent/child: \"\n-00149\n-//\n-\u00ab parent->ref[0] \u00ab \":\" \u00ab is_inside(v, parent) \u00ab \":\" \u00ab p_io \u00ab \" \"\n-00150\n-//\n-\u00ab child->ref[0] \u00ab \":\" \u00ab is_inside(v, child) \u00ab \":\" \u00ab c_io \u00ab endl;\n-00151\n-//cout \u00ab \"-- rep status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n-00152\n-//cout \u00ab v->eta \u00ab \" \" \u00ab v->phi \u00ab endl;\n-00153\n-//cout \u00ab (child->eta) \u00ab \" \" \u00ab child->phi \u00ab endl;\n-00154\n-}\n-return 0;\n-00155\n-00156\n-}\n-00157\n-00158\n-elm = elm->next;\n-00159\n-} while (1);\n-00160\n-00161\n-return 1;\n-00162 }\n-00163\n-00164 /*\n-00165 * insert a new candidate into the hash.\n-00166 * - v\n-4-momentum of te cone to add\n-00167 * Note, in this case, we assume stability. We also assume\n-00168 * that eta and phi are computed for v\n-00169 * return 0 on success, 1 on error\n-00170 ***********************************************************************/\n-00171 int hash_cones::insert(Cmomentum *v){\n-00172\n-hash_element *elm;\n-00173\n-int index = (v->ref.ref[0]) & mask;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.38 hash.cpp\n-\n-235\n-\n-00174\n-//cout \u00ab \"-- stable candidate: \" \u00ab v->ref[0] \u00ab \":\" \u00ab endl;\n-00175\n-00176\n-// check the array cell corresponding to our reference\n-00177\n-elm = hash_array[index];\n-00178\n-do{\n-00179\n-// if it is not present, add it\n-00180\n-if (elm==NULL){\n-00181\n-// create element\n-00182\n-elm = new hash_element;\n-00183\n-00184\n-// set its varibles\n-00185\n-// Note: at this level, eta and phi have already been computed\n-00186\n-//\n-through Cmomentum::build_etaphi.\n-00187\n-elm->ref = v->ref;\n-00188\n-elm->eta = v->eta;\n-00189\n-elm->phi = v->phi;\n-00190\n-elm->is_stable = true;\n-00191\n-// update hash\n-00192\n-00193\n-elm->next = hash_array[index];\n-00194\n-hash_array[index] = elm;\n-00195\n-00196\n-n_cones++;\n-return 0;\n-00197\n-00198\n-}\n-00199\n-00200\n-// if the cone is already there, we have nothing to do\n-00201\n-if (v->ref == elm->ref){\n-00202\n-return 0;\n-00203\n-}\n-00204\n-00205\n-elm = elm->next;\n-00206\n-} while (1);\n-00207\n-return 1;\n-00208\n-00209 }\n-00210\n-00211 /*\n-00212 * test if a particle is inside a cone of given centre.\n-00213 * check if the particle of coordinates \u2019v\u2019 is inside the circle of radius R\n-00214 * centered at \u2019centre\u2019.\n-centre of the circle\n-00215 * - centre\n-00216 * - v\n-particle to test\n-00217 * return true if inside, false if outside\n-00218 ******************************************************************************/\n-00219 inline bool hash_cones::is_inside(Cmomentum *centre, Cmomentum *v){\n-double dx, dy;\n-00220\n-00221\n-00222\n-dx = centre->eta - v->eta;\n-00223\n-dy = fabs(centre->phi - v->phi);\n-00224\n-if (dy>M_PI)\n-00225\n-dy -= 2.0*M_PI;\n-00226\n-return dx*dx+dy*dy\n-00030 #include \n-00031 #include \"hash.h\"\n-00032 #include \n-00033\n-00034 namespace siscone_spherical{\n-00035\n-00036 using namespace std;\n-00037\n-00038 /**************************************************************\n-00039 * implementation of sph_hash_cones\n-*\n-00040 * list of cones candidates.\n-*\n-00041 * We store in this class all the sph_hash_element and give\n-*\n-00042 * functions to manipulate them.\n-*\n-00043 **************************************************************/\n-00044\n-00045 // constructor with initialisation\n-00046 // - _Np\n-number of particles\n-00047 // - _radius cone radius\n-00048 //----------------------------------00049 sph_hash_cones::sph_hash_cones(int _Np, double _radius){\n-int i;\n-00050\n-00051\n-00052\n-n_cones = 0;\n-00053 #ifdef DEBUG_STABLE_CONES\n-00054\n-n_occupied_cells = 0;\n-00055 #endif\n-00056\n-// determine hash size\n-00057\n-00058\n-// for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4\n-00059\n-//mask = 1 \u00ab (int) (2*log(double(_Np))/log(2.0));\n-00060\n-//if (mask<=1) mask=2;\n-00061\n-int nbits = (int) (log(_Np*_radius*_radius*_Np/4.0)/log(2.0));\n-if (nbits<1) nbits=1;\n-00062\n-00063\n-mask = 1 \u00ab nbits;\n-00064\n-00065\n-// create hash\n-00066\n-hash_array = new sph_hash_element*[mask];\n-00067\n-mask--;\n-00068\n-// set the array to 0\n-00069\n-00070\n-//? needed ?\n-00071\n-for (i=0;inext;\n-delete elm;\n-00088\n-00089\n-}\n-00090\n-}\n-00091\n-00092\n-delete[] hash_array;\n-00093 }\n-00094\n-00095\n-00096 /*\n-00097 * insert a new candidate into the hash.\n-00098 * - v\n-4-momentum of the cone to add\n-00099 * - parent parent particle defining the cone\n-00100 * - child\n-child particle defining the cone\n-whether the parent has to belong to the cone or not\n-00101 * - p_io\n-00102 * - c_io\n-whether the child has to belong to the cone or not\n-00103 * return 0 on success, 1 on error\n-00104 ***********************************************************************/\n-00105 int sph_hash_cones::insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool\n-c_io){\n-00106\n-sph_hash_element *elm;\n-int index = (v->ref.ref[0]) & mask;\n-00107\n-00108\n-// check the array cell corresponding to our reference\n-00109\n-00110\n-elm = hash_array[index];\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.38 hash.cpp\n-\n-00111\n-00112 #ifdef DEBUG_STABLE_CONES\n-00113\n-if (elm==NULL)\n-00114\n-n_occupied_cells++;\n-00115 #endif\n-00116\n-do{\n-00117\n-00118\n-// if it is not present, add it\n-00119\n-if (elm==NULL){\n-00120\n-// create element\n-00121\n-elm = new sph_hash_element;\n-00122\n-// set its varibles\n-00123\n-00124\n-// Note: at this level, eta and phi have already been computed\n-00125\n-//\n-through CSphmomentum::build_thetaphi.\n-00126\n-elm->centre = *v;\n-00127\n-00128\n-// if at least one of the two is_closer tests gives a result != from the expected,\n-00129\n-// the || will be true hence !(...) false as wanted\n-00130\n-elm->is_stable = !((is_closer(v, parent, tan2R)^p_io)||(is_closer(v, child, tan2R)^c_io));\n-//cout \u00ab \"-- new status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n-00131\n-00132\n-00133\n-// update hash\n-00134\n-elm->next = hash_array[index];\n-00135\n-hash_array[index] = elm;\n-00136\n-00137\n-n_cones++;\n-return 0;\n-00138\n-00139\n-}\n-00140\n-00141\n-// if the cone is already there, simply update stability status\n-00142\n-if (v->ref == elm->centre.ref){\n-// there is only an update to perform to see if the cone is still stable\n-00143\n-00144\n-if (elm->is_stable){\n-00145\n-elm->is_stable = !((is_closer(v, parent, tan2R)^p_io)||(is_closer(v, child, tan2R)^c_io));\n-//cout \u00ab \" parent/child: \"\n-00146\n-00147\n-//\n-\u00ab parent->ref[0] \u00ab \":\" \u00ab is_closer(v, parent) \u00ab \":\" \u00ab p_io \u00ab \" \"\n-00148\n-//\n-\u00ab child->ref[0] \u00ab \":\" \u00ab is_closer(v, child) \u00ab \":\" \u00ab c_io \u00ab endl;\n-00149\n-//cout \u00ab \"-- rep status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n-00150\n-//cout \u00ab v->eta \u00ab \" \" \u00ab v->phi \u00ab endl;\n-00151\n-//cout \u00ab (child->eta) \u00ab \" \" \u00ab child->phi \u00ab endl;\n-00152\n-}\n-return 0;\n-00153\n-00154\n-}\n-00155\n-00156\n-elm = elm->next;\n-00157\n-} while (1);\n-00158\n-00159\n-return 1;\n-00160 }\n-00161\n-00162 /*\n-00163 * insert a new candidate into the hash.\n-00164 * - v\n-4-momentum of te cone to add\n-00165 * Note, in this case, we assume stability. We also assume\n-00166 * that eta and phi are computed for v\n-00167 * return 0 on success, 1 on error\n-00168 ***********************************************************************/\n-00169 int sph_hash_cones::insert(CSphmomentum *v){\n-00170\n-sph_hash_element *elm;\n-00171\n-int index = (v->ref.ref[0]) & mask;\n-//cout \u00ab \"-- stable candidate: \" \u00ab v->ref[0] \u00ab \":\" \u00ab endl;\n-00172\n-00173\n-// check the array cell corresponding to our reference\n-00174\n-00175\n-elm = hash_array[index];\n-do{\n-00176\n-00177\n-// if it is not present, add it\n-00178\n-if (elm==NULL){\n-// create element\n-00179\n-00180\n-elm = new sph_hash_element;\n-00181\n-// set its varibles\n-00182\n-00183\n-// Note: at this level, eta and phi have already been computed\n-00184\n-//\n-through CSphmomentum::build_thetaphi.\n-00185\n-elm->centre = *v;\n-00186\n-elm->is_stable = true;\n-00187\n-// update hash\n-00188\n-00189\n-elm->next = hash_array[index];\n-00190\n-hash_array[index] = elm;\n-00191\n-00192\n-n_cones++;\n-00193\n-return 0;\n-00194\n-}\n-00195\n-00196\n-// if the cone is already there, we have nothing to do\n-00197\n-if (v->ref == elm->centre.ref){\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-237\n-\n-\f238\n-\n-File Documentation\n-\n-00198\n-return 0;\n-00199\n-}\n-00200\n-00201\n-elm = elm->next;\n-00202\n-} while (1);\n-00203\n-return 1;\n-00204\n-00205 }\n-00206\n-00207 }\n-\n-5.39 hash.h\n-00001 // -*- C++ -*00003 // File: hash.h\n-//\n-00004 // Description: header file for classes hash_element and hash_cones\n-//\n-00005 // This file is part of the SISCone project.\n-//\n-00006 // For more details, see http://projects.hepforge.org/siscone\n-//\n-00007 //\n-//\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-//\n-00009 //\n-//\n-00010 // This program is free software; you can redistribute it and/or modify\n-//\n-00011 // it under the terms of the GNU General Public License as published by\n-//\n-00012 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00013 // (at your option) any later version.\n-//\n-00014 //\n-//\n-00015 // This program is distributed in the hope that it will be useful,\n-//\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00018 // GNU General Public License for more details.\n-//\n-00019 //\n-//\n-00020 // You should have received a copy of the GNU General Public License\n-//\n-00021 // along with this program; if not, write to the Free Software\n-//\n-00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00023 //\n-//\n-00024 // $Revision:: 224\n-$//\n-00025 // $Date:: 2008-05-16 19:58:30 +0200 (Fri, 16 May 2008)\n-$//\n-00027\n-00028 #ifndef __HASH_H__\n-00029 #define __HASH_H__\n-00030\n-00031 #include \"momentum.h\"\n-00032 #include \"reference.h\"\n-00033\n-00034 namespace siscone{\n-00035\n-00045 class hash_element{\n-00046 public:\n-00047\n-Creference ref;\n-double eta;\n-00048\n-double phi;\n-00049\n-00050\n-bool is_stable;\n-00051\n-00052\n-hash_element *next;\n-00053 };\n-00054\n-00062 class hash_cones{\n-00063 public:\n-00067\n-hash_cones(int _Np, double _R2);\n-00068\n-00070\n-~hash_cones();\n-00071\n-00081\n-int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io);\n-00082\n-int insert(Cmomentum *v);\n-00090\n-00091\n-00093\n-hash_element **hash_array;\n-00094\n-int n_cones;\n-00096\n-00097\n-00099 #ifdef DEBUG_STABLE_CONES\n-00100\n-int n_occupied_cells;\n-00101 #endif\n-00102\n-int mask;\n-00104\n-00105\n-double R2;\n-00108\n-00109\n-inline bool is_inside(Cmomentum *centre, Cmomentum *v);\n-00118\n-00119 };\n-00120\n-00121 }\n-00122 #endif\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.40 hash.h\n-\n-239\n-\n-5.40 hash.h\n-00001 // -*- C++ -*00003 // File: hash.h\n-//\n-00004 // Description: header file for classes hash_element and hash_cones\n-//\n-00005 // This file is part of the SISCone project.\n-//\n-00006 // WARNING: this is not the main SISCone trunk but\n-//\n-00007 //\n-an adaptation to spherical coordinates\n-//\n-00008 // For more details, see http://projects.hepforge.org/siscone\n-//\n-00009 //\n-//\n-00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n-//\n-00011 //\n-//\n-00012 // This program is free software; you can redistribute it and/or modify\n-//\n-00013 // it under the terms of the GNU General Public License as published by\n-//\n-00014 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00015 // (at your option) any later version.\n-//\n-00016 //\n-//\n-00017 // This program is distributed in the hope that it will be useful,\n-//\n-00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00020 // GNU General Public License for more details.\n-//\n-00021 //\n-//\n-00022 // You should have received a copy of the GNU General Public License\n-//\n-00023 // along with this program; if not, write to the Free Software\n-//\n-00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00025 //\n-//\n-00026 // $Revision:: 294\n-$//\n-00027 // $Date:: 2009-05-01 17:15:04 +0200 (Fri, 01 May 2009)\n-$//\n-00029\n-00030 #ifndef __SPH_HASH_H__\n-00031 #define __SPH_HASH_H__\n-00032\n-00033 #include \"momentum.h\"\n-00034\n-00035 namespace siscone_spherical{\n-00036\n-00046 class sph_hash_element{\n-00047 public:\n-00048\n-CSph3vector centre;\n-bool is_stable;\n-00049\n-00050\n-00051\n-sph_hash_element *next;\n-00052 };\n-00053\n-00061 class sph_hash_cones{\n-00062 public:\n-00065\n-sph_hash_cones(int _Np, double _radius);\n-00066\n-00068\n-~sph_hash_cones();\n-00069\n-int insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool c_io);\n-00079\n-00080\n-int insert(CSphmomentum *v);\n-00088\n-00089\n-00091\n-sph_hash_element **hash_array;\n-00092\n-00094\n-int n_cones;\n-00095\n-00097 #ifdef DEBUG_STABLE_CONES\n-00098\n-int n_occupied_cells;\n-00099 #endif\n-00100\n-int mask;\n-00102\n-00103\n-double R2;\n-00106\n-00107\n-double tan2R;\n-00109\n-00110 };\n-00111\n-00112 }\n-00113 #endif\n-\n-5.41 momentum.cpp\n-00001\n-00002 // File: momentum.cpp\n-00003 // Description: source file for 4-momentum class Cmomentum\n-00004 // This file is part of the SISCone project.\n-00005 // For more details, see http://projects.hepforge.org/siscone\n-00006 //\n-00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-00008 //\n-00009 // This program is free software; you can redistribute it and/or modify\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-\n-\f240\n-\n-File Documentation\n-\n-00010 // it under the terms of the GNU General Public License as published by\n-//\n-00011 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00012 // (at your option) any later version.\n-//\n-00013 //\n-//\n-00014 // This program is distributed in the hope that it will be useful,\n-//\n-00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00017 // GNU General Public License for more details.\n-//\n-00018 //\n-//\n-00019 // You should have received a copy of the GNU General Public License\n-//\n-00020 // along with this program; if not, write to the Free Software\n-//\n-00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00022 //\n-//\n-00023 // $Revision:: 123\n-$//\n-00024 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)\n-$//\n-00026\n-00027 #include \"momentum.h\"\n-00028 #include \n-00029 #include \n-00030\n-00031 namespace siscone{\n-00032\n-00033 /*************************************************************************\n-00034 * class Cmomentum\n-*\n-00035 * This class contains the information for particle or group of\n-*\n-00036 * particles management.\n-*\n-00037 * It includes all Lorentz properties as well as tools for summing them. *\n-00038 *************************************************************************/\n-00039\n-00040 // default ctor\n-00041 //-------------00042 Cmomentum::Cmomentum(){\n-00043\n-eta = 0.0;\n-00044\n-phi = 0.0;\n-00045\n-px = py = pz = E = 0.0;\n-00046\n-ref = Creference();\n-00047\n-index = -1;\n-00048 }\n-00049\n-00050 // ctor with initialisation\n-00051 //-------------------------00052 Cmomentum::Cmomentum(double _px, double _py, double _pz, double _E){\n-00053\n-px = _px;\n-00054\n-py = _py;\n-00055\n-pz = _pz;\n-00056\n-E = _E;\n-00057\n-// compute eta and phi\n-00058\n-00059\n-build_etaphi();\n-00060\n-ref = Creference();\n-00061 }\n-00062\n-00063 // ctor with detailed initialisation\n-00064 //----------------------------------00065 Cmomentum::Cmomentum(double _eta, double _phi, Creference _ref){\n-00066\n-eta = _eta;\n-00067\n-phi = _phi;\n-00068\n-00069\n-ref = _ref;\n-00070 }\n-00071\n-00072 // default dtor\n-00073 //-------------00074 Cmomentum::~Cmomentum(){\n-00075\n-00076 }\n-00077\n-00078 // assignment of vectors\n-00079 //----------------------00080 Cmomentum& Cmomentum::operator = (const Cmomentum &v){\n-00081\n-px = v.px;\n-00082\n-py = v.py;\n-00083\n-pz = v.pz;\n-00084\n-E = v.E;\n-00085\n-00086\n-eta = v.eta;\n-00087\n-phi = v.phi;\n-00088\n-00089\n-ref = v.ref;\n-00090\n-return *this;\n-00091 }\n-00092\n-00093 // addition of vectors\n-00094 // !!! WARNING !!! no updating of eta and phi !!!\n-00095 //-----------------------------------------------00096 const Cmomentum Cmomentum::operator + (const Cmomentum &v){\n-00097\n-Cmomentum tmp = *this;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.42 momentum.cpp\n-\n-241\n-\n-00098\n-return tmp+=v;\n-00099 }\n-00100\n-00101 // incrementation of vectors\n-00102 // !!! WARNING !!! no updating of eta and phi !!!\n-00103 //-----------------------------------------------00104 Cmomentum& Cmomentum::operator += (const Cmomentum &v){\n-00105\n-px+=v.px;\n-00106\n-py+=v.py;\n-00107\n-pz+=v.pz;\n-00108\n-E +=v.E;\n-00109\n-00110\n-ref+=v.ref;\n-00111\n-00112\n-return *this;\n-00113 }\n-00114\n-00115 // incrementation of vectors\n-00116 // !!! WARNING !!! no updating of eta and phi !!!\n-00117 //-----------------------------------------------00118 Cmomentum& Cmomentum::operator -= (const Cmomentum &v){\n-00119\n-px-=v.px;\n-00120\n-py-=v.py;\n-00121\n-pz-=v.pz;\n-00122\n-E -=v.E;\n-00123\n-00124\n-ref-=v.ref;\n-return *this;\n-00125\n-00126 }\n-00127\n-00128 // build eta-phi from 4-momentum info\n-00129 // !!!\n-WARNING\n-!!!\n-00130 // !!! computing eta and phi is time-consuming !!!\n-00131 // !!! use this whenever you need eta or phi\n-!!!\n-00132 // !!! automatically called for single-particle !!!\n-00133 //-------------------------------------------------00134 void Cmomentum::build_etaphi(){\n-// note: the factor n (ref.nb) cancels in all expressions !!\n-00135\n-00136\n-eta = 0.5*log((E+pz)/(E-pz));\n-00137\n-phi = atan2(py,px);\n-00138 }\n-00139\n-00140\n-00141 // ordering of two vectors\n-00142 // the default ordering is w.r.t. their references\n-00143 //------------------------------------------------00144 bool operator < (const Cmomentum &v1, const Cmomentum &v2){\n-00145\n-return v1.ref < v2.ref;\n-00146 }\n-00147\n-00148 // ordering of vectors in eta (e.g. used in collinear tests)\n-00149 //----------------------------------------------------------00150 bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2){\n-return v1.eta < v2.eta;\n-00151\n-00152 }\n-00153\n-00154 // ordering of vectors in pt\n-00155 //--------------------------00156 bool momentum_pt_less(const Cmomentum &v1, const Cmomentum &v2){\n-00157\n-return v1.perp2() < v2.perp2();\n-00158 }\n-00159\n-00160 }\n-00161\n-\n-5.42 momentum.cpp\n-00001\n-00002 // File: momentum.cpp\n-00003 // Description: source file for 4-momentum class Cmomentum\n-00004 // This file is part of the SISCone project.\n-00005 // WARNING: this is not the main SISCone trunk but\n-00006 //\n-an adaptation to spherical coordinates\n-00007 // For more details, see http://projects.hepforge.org/siscone\n-00008 //\n-00009 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n-00010 //\n-00011 // This program is free software; you can redistribute it and/or modify\n-00012 // it under the terms of the GNU General Public License as published by\n-00013 // the Free Software Foundation; either version 2 of the License, or\n-00014 // (at your option) any later version.\n-00015 //\n-00016 // This program is distributed in the hope that it will be useful,\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-\n-\f242\n-\n-File Documentation\n-\n-00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00019 // GNU General Public License for more details.\n-//\n-00020 //\n-//\n-00021 // You should have received a copy of the GNU General Public License\n-//\n-00022 // along with this program; if not, write to the Free Software\n-//\n-00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00024 //\n-//\n-00025 // $Revision:: 255\n-$//\n-00026 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008)\n-$//\n-00028\n-00029 #include \"momentum.h\"\n-00030 #include \n-00031 #include \n-00032\n-00033 namespace siscone_spherical{\n-00034\n-00035 /*************************************************************************\n-00036 * class CSph3vector\n-*\n-00037 * This class contains the information for particle or group of\n-*\n-00038 * particles management.\n-*\n-00039 *************************************************************************/\n-00040\n-00041 // default ctor\n-00042 //-------------00043 CSph3vector::CSph3vector(){\n-00044\n-_theta = _phi = _norm = 0.0;\n-00045\n-px = py = pz = 0.0;\n-00046\n-ref = siscone::Creference();\n-00047 }\n-00048\n-00049 // ctor with initialisation\n-00050 //-------------------------00051 CSph3vector::CSph3vector(double _px, double _py, double _pz){\n-00052\n-px = _px;\n-00053\n-py = _py;\n-00054\n-pz = _pz;\n-00055\n-// compute the norm\n-00056\n-00057\n-build_norm();\n-00058\n-00059\n-ref = siscone::Creference();\n-00060 }\n-00061\n-00062 // default dtor\n-00063 //-------------00064 CSph3vector::~CSph3vector(){\n-00065\n-00066 }\n-00067\n-00068\n-00069 // assignment of vectors\n-00070 //----------------------00071 CSph3vector& CSph3vector::operator = (const CSph3vector &v){\n-00072\n-px = v.px;\n-00073\n-py = v.py;\n-00074\n-pz = v.pz;\n-00075\n-00076\n-_norm = v._norm;\n-00077\n-_theta = v._theta;\n-00078\n-_phi\n-= v._phi;\n-00079\n-00080\n-ref = v.ref;\n-00081\n-return *this;\n-00082 }\n-00083\n-00084 // addition of vectors\n-00085 //-----------------------------------------------00086 const CSph3vector CSph3vector::operator + (const CSph3vector &v){\n-00087\n-CSph3vector tmp = *this;\n-00088\n-return tmp+=v;\n-00089 }\n-00090\n-00091 // subtraction of vectors\n-00092 //-----------------------------------------------00093 const CSph3vector CSph3vector::operator - (const CSph3vector &v){\n-00094\n-CSph3vector tmp = *this;\n-00095\n-return tmp-=v;\n-00096 }\n-00097\n-00098 // division by constant\n-00099 //-----------------------------------------------00100 const CSph3vector CSph3vector::operator / (const double &r){\n-00101\n-CSph3vector tmp = *this;\n-return tmp/=r;\n-00102\n-00103 }\n-00104\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.42 momentum.cpp\n-\n-00105 // incrementation\n-00106 //-----------------------------------------------00107 CSph3vector& CSph3vector::operator += (const CSph3vector &v){\n-00108\n-px+=v.px;\n-00109\n-py+=v.py;\n-00110\n-pz+=v.pz;\n-00111\n-00112\n-return *this;\n-00113 }\n-00114\n-00115 // decrementation\n-00116 //-----------------------------------------------00117 CSph3vector& CSph3vector::operator -= (const CSph3vector &v){\n-00118\n-px-=v.px;\n-00119\n-py-=v.py;\n-00120\n-pz-=v.pz;\n-00121\n-00122\n-return *this;\n-00123 }\n-00124\n-00125 // multiplication by a constant\n-00126 //-----------------------------------------------00127 CSph3vector& CSph3vector::operator *= (const double &r){\n-00128\n-px*=r;\n-00129\n-py*=r;\n-00130\n-pz*=r;\n-00131\n-return *this;\n-00132\n-00133 }\n-00134\n-00135 // division by a constant\n-00136 //-----------------------------------------------00137 CSph3vector& CSph3vector::operator /= (const double &r){\n-00138\n-px/=r;\n-00139\n-py/=r;\n-00140\n-pz/=r;\n-00141\n-00142\n-_norm/=r;\n-00143\n-return *this;\n-00144\n-00145 }\n-00146\n-00147 // build norm from 3-momentum info\n-00148 void CSph3vector::build_norm(){\n-00149\n-_norm = norm();\n-00150 }\n-00151\n-00152 // build norm from 3-momentum info\n-00153 void CSph3vector::build_thetaphi(){\n-00154\n-_theta = theta();\n-00155\n-_phi = phi();\n-00156 }\n-00157\n-00158\n-00159 // for this direction, compute the two reference directions\n-00160 // used to measure angles\n-00161 void CSph3vector::get_angular_directions(CSph3vector &angular_dir1, CSph3vector &angular_dir2){\n-00162\n-if (px < py){\n-if (pz < px){\n-00163\n-00164\n-// z smallest\n-00165\n-angular_dir1 = CSph3vector(-py, px, 0.0);\n-00166\n-} else {\n-00167\n-// x smallest\n-00168\n-angular_dir1 = CSph3vector(0.0, -pz, py);\n-00169\n-}\n-00170\n-} else {\n-00171\n-if (pz < py){\n-00172\n-// z smallest\n-00173\n-angular_dir1 = CSph3vector(-py, px, 0.0);\n-00174\n-} else {\n-// y smallest\n-00175\n-00176\n-angular_dir1 = CSph3vector(-pz, 0.0, px);\n-00177\n-}\n-00178\n-}\n-00179\n-angular_dir2 = cross_product3(*this, angular_dir1);\n-00180\n-// We\u2019ll simply take x & y so the reflection symmetry is not broken\n-00181\n-//angular_dir1 = CSph3vector(0.0, -pz, py);\n-00182\n-//angular_dir2 = CSph3vector(-pz, 0.0, -px);\n-00183 }\n-00184\n-00185 /*************************************************************************\n-00186 * class CSphmomentum\n-*\n-00187 * This class contains the information for particle or group of\n-*\n-00188 * particles management.\n-*\n-00189 * It includes all Lorentz properties as well as tools for summing them. *\n-00190 *************************************************************************/\n-00191\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-243\n-\n-\f244\n-\n-File Documentation\n-\n-00192 // default ctor\n-00193 //-------------00194 CSphmomentum::CSphmomentum(){\n-00195\n-E=0.0;\n-00196\n-index = -1;\n-00197 }\n-00198\n-00199 // ctor with initialisation\n-00200 //-------------------------00201 CSphmomentum::CSphmomentum(double _px, double _py, double _pz, double _E)\n-00202\n-: CSph3vector(_px, _py, _pz) {\n-00203\n-E = _E;\n-00204\n-// compute the angles\n-00205\n-00206\n-build_thetaphi();\n-00207 }\n-00208\n-00209 // ctor with initialisation\n-00210 //-------------------------00211 CSphmomentum::CSphmomentum(CSph3vector &_v, double _E)\n-00212\n-: CSph3vector(_v.px, _v.py, _v.pz) {\n-00213\n-E = _E;\n-00214 }\n-00215\n-00216 // default dtor\n-00217 //-------------00218 CSphmomentum::~CSphmomentum(){\n-00219\n-00220 }\n-00221\n-00222 // assignment of vectors\n-00223 //----------------------00224 CSphmomentum& CSphmomentum::operator = (const CSphmomentum &v){\n-00225\n-px = v.px;\n-00226\n-py = v.py;\n-00227\n-pz = v.pz;\n-00228\n-E = v.E;\n-00229\n-00230\n-_norm = v._norm;\n-00231\n-_theta = v._theta;\n-00232\n-_phi\n-= v._phi;\n-00233\n-00234\n-ref = v.ref;\n-return *this;\n-00235\n-00236 }\n-00237\n-00238 // addition of vectors\n-00239 // !!! WARNING !!! no updating of eta and phi !!!\n-00240 //-----------------------------------------------00241 const CSphmomentum CSphmomentum::operator + (const CSphmomentum &v){\n-00242\n-CSphmomentum tmp = *this;\n-00243\n-return tmp+=v;\n-00244 }\n-00245\n-00246 // incrementation of vectors\n-00247 // !!! WARNING !!! no updating of eta and phi !!!\n-00248 //-----------------------------------------------00249 CSphmomentum& CSphmomentum::operator += (const CSphmomentum &v){\n-00250\n-px+=v.px;\n-00251\n-py+=v.py;\n-00252\n-pz+=v.pz;\n-00253\n-E +=v.E;\n-00254\n-00255\n-ref+=v.ref;\n-00256\n-00257\n-return *this;\n-00258 }\n-00259\n-00260 // decrementation of vectors\n-00261 // !!! WARNING !!! no updating of eta and phi !!!\n-00262 //-----------------------------------------------00263 CSphmomentum& CSphmomentum::operator -= (const CSphmomentum &v){\n-00264\n-px-=v.px;\n-00265\n-py-=v.py;\n-00266\n-pz-=v.pz;\n-00267\n-E -=v.E;\n-00268\n-00269\n-ref-=v.ref;\n-00270\n-return *this;\n-00271 }\n-00272\n-00273\n-00274 // ordering of two vectors\n-00275 // the default ordering is w.r.t. their references\n-00276 //------------------------------------------------00277 bool operator < (const CSphmomentum &v1, const CSphmomentum &v2){\n-00278\n-return v1.ref < v2.ref;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.43 protocones.cpp\n-\n-00279 }\n-00280\n-00281 // ordering of vectors in eta (e.g. used in collinear tests)\n-00282 //----------------------------------------------------------00283 bool momentum_theta_less(const CSphmomentum &v1, const CSphmomentum &v2){\n-00284\n-return v1._theta < v2._theta;\n-00285 }\n-00286\n-00287 // ordering of vectors in pt\n-00288 //--------------------------00289 bool momentum_pt_less(const CSphmomentum &v1, const CSphmomentum &v2){\n-return v1.perp2() < v2.perp2();\n-00290\n-00291 }\n-00292\n-00293 }\n-00294\n-\n-5.43 protocones.cpp\n-00001\n-00002 // File: protocones.cpp\n-//\n-00003 // Description: source file for stable cones determination (Cstable_cones)\n-//\n-00004 // This file is part of the SISCone project.\n-//\n-00005 // For more details, see http://projects.hepforge.org/siscone\n-//\n-00006 //\n-//\n-00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-//\n-00008 //\n-//\n-00009 // This program is free software; you can redistribute it and/or modify\n-//\n-00010 // it under the terms of the GNU General Public License as published by\n-//\n-00011 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00012 // (at your option) any later version.\n-//\n-00013 //\n-//\n-00014 // This program is distributed in the hope that it will be useful,\n-//\n-00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00017 // GNU General Public License for more details.\n-//\n-00018 //\n-//\n-00019 // You should have received a copy of the GNU General Public License\n-//\n-00020 // along with this program; if not, write to the Free Software\n-//\n-00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00022 //\n-//\n-00023 // $Revision:: 322\n-$//\n-00024 // $Date:: 2011-11-15 10:12:36 +0100 (Tue, 15 Nov 2011)\n-$//\n-00026\n-00027 /*******************************************************\n-00028 * Introductory note:\n-*\n-00029 * Since this file has many member functions, we have *\n-00030 * structured them in categories:\n-*\n-00031 * INITIALISATION FUNCTIONS\n-*\n-00032 * - ctor()\n-*\n-00033 * - ctor(particle_list)\n-*\n-00034 * - dtor()\n-*\n-00035 * - init(particle_list)\n-*\n-00036 * ALGORITHM MAIN ENTRY\n-*\n-00037 * - get_stable_cone(radius)\n-*\n-00038 * ALGORITHM MAIN STEPS\n-*\n-00039 * - init_cone()\n-*\n-00040 * - test_cone()\n-*\n-00041 * - update_cone()\n-*\n-00042 * - proceed_with_stability()\n-*\n-00043 * ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n-*\n-00044 * - cocircular_pt_less(v1, v2)\n-*\n-00045 * - prepare_cocircular_list()\n-*\n-00046 * - test_cone_cocircular()\n-*\n-00047 * - test_stability(candidate, border_list)\n-*\n-00048 * - updat_cone_cocircular()\n-*\n-00049 * RECOMPUTATION OF CONE CONTENTS\n-*\n-00050 * - compute_cone_contents()\n-*\n-00051 * - recompute_cone_contents()\n-*\n-00052 * - recompute_cone_contents_if_needed()\n-*\n-00053 * VARIOUS TOOLS\n-*\n-00054 * - circle_intersect()\n-*\n-00055 * - is_inside()\n-*\n-00056 * - abs_dangle()\n-*\n-00057 *******************************************************/\n-00058\n-00059 #include \"protocones.h\"\n-00060 #include \"siscone_error.h\"\n-00061 #include \"defines.h\"\n-00062 #include \n-00063 #include \n-00064 #include \"circulator.h\"\n-00065 #include \n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-245\n-\n-\f246\n-\n-File Documentation\n-\n-00066\n-00067 namespace siscone{\n-00068\n-00069 using namespace std;\n-00070\n-00071 /**********************************************************************\n-00072 * Cstable_cones implementation\n-*\n-00073 * Computes the list of stable comes from a particle list.\n-*\n-00074 * This class does the first fundamental task of te cone algorithm:\n-*\n-00075 * it is used to compute the list of stable cones given a list\n-*\n-00076 * of particles.\n-*\n-00077 **********************************************************************/\n-00078\n-//\n-00080 // INITIALISATION FUNCTIONS\n-00081 // - ctor()\n-//\n-00082 // - ctor(particle_list)\n-//\n-00083 // - dtor()\n-//\n-00084 // - init(particle_list)\n-//\n-00086\n-00087 // default ctor\n-00088 //-------------00089 Cstable_cones::Cstable_cones(){\n-00090\n-nb_tot = 0;\n-00091\n-hc = NULL;\n-00092 }\n-00093\n-00094 // ctor with initialisation\n-00095 //-------------------------00096 Cstable_cones::Cstable_cones(vector &_particle_list)\n-00097\n-: Cvicinity(_particle_list){\n-00098\n-00099\n-nb_tot = 0;\n-00100\n-hc = NULL;\n-00101 }\n-00102\n-00103 // default dtor\n-00104 //-------------00105 Cstable_cones::~Cstable_cones(){\n-00106\n-if (hc!=NULL) delete hc;\n-00107 }\n-00108\n-00109 /*\n-00110 * initialisation\n-00111 * - _particle_list list of particles\n-00112 * - _n\n-number of particles\n-00113 *********************************************************************/\n-00114 void Cstable_cones::init(vector &_particle_list){\n-00115\n-// check already allocated mem\n-00116\n-if (hc!=NULL){\n-delete hc;\n-00117\n-00118\n-}\n-if (protocones.size()!=0)\n-00119\n-00120\n-protocones.clear();\n-00121\n-00122\n-multiple_centre_done.clear();\n-00123\n-00124\n-// initialisation\n-00125\n-set_particle_list(_particle_list);\n-00126 }\n-00127\n-00128\n-00130 // ALGORITHM MAIN ENTRY\n-//\n-00131 // - get_stable_cone(radius)\n-//\n-00133\n-00134 /*\n-00135 * compute stable cones.\n-00136 * This function really does the job i.e. computes\n-00137 * the list of stable cones (in a seedless way)\n-00138 * - _radius: radius of the cones\n-00139 * The number of stable cones found is returned\n-00140 *********************************************************************/\n-00141 int Cstable_cones::get_stable_cones(double _radius){\n-int p_idx;\n-00142\n-00143\n-00144\n-// check if everything is correctly initialised\n-00145\n-if (n_part==0){\n-00146\n-return 0;\n-00147\n-}\n-00148\n-00149\n-R = _radius;\n-00150\n-R2 = R*R;\n-00151\n-// allow hash for cones candidates\n-00152\n-00153\n-hc = new hash_cones(n_part, R2);\n-00154\n-// browse all particles\n-00155\n-00156\n-for (p_idx=0;p_idxv;\n-00216\n-centre_idx = first_cone;\n-00217\n-// build the initial cone (nodist: avoids calculating distances -00218\n-00219\n-// just deduces contents by circulating around all in/out operations)\n-00220\n-// this function also sets the list of included particles\n-00221\n-compute_cone_contents();\n-00222\n-return 0;\n-00223\n-00224 }\n-00225\n-00226\n-00227 /*\n-00228 * test cones.\n-00229 * We check if the cone(s) built with the present parent and child\n-00230 * are stable\n-00231 * return 0 on success 1 on error\n-00232 *********************************************************************/\n-00233 int Cstable_cones::test_cone(){\n-00234\n-Creference weighted_cone_ref;\n-00235\n-// depending on the side we are taking the child particle,\n-00236\n-00237\n-// we test different configuration.\n-00238\n-// Each time, two configurations are tested in such a way that\n-00239\n-// all 4 possible cases (parent or child in or out the cone)\n-00240\n-// are tested when taking the pair of particle parent+child\n-00241\n-// and child+parent.\n-00242\n-// here are the tests entering the first series:\n-00243\n-00244\n-// 1. check if the cone is already inserted\n-00245\n-// 2. check cone stability for the parent and child particles\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-247\n-\n-\f248\n-\n-File Documentation\n-\n-00246\n-if (centre->side){\n-00247\n-00248\n-// test when both particles are not in the cone\n-00249\n-// or when both are in.\n-00250\n-// Note: for the totally exclusive case, test emptyness before\n-00251\n-cone_candidate = cone;\n-if (cone.ref.not_empty()){\n-00252\n-00253\n-hc->insert(&cone_candidate, parent, child, false, false);\n-00254\n-}\n-00255\n-00256\n-cone_candidate = cone;\n-00257\n-cone_candidate+= *parent + *child;\n-00258\n-hc->insert(&cone_candidate, parent, child, true, true);\n-00259\n-} else {\n-00260\n-// test when 1! of the particles is in the cone\n-00261\n-cone_candidate = cone + *parent;\n-00262\n-hc->insert(&cone_candidate, parent, child, true, false);\n-00263\n-00264\n-cone_candidate = cone + *child;\n-00265\n-hc->insert(&cone_candidate, parent, child, false, true);\n-00266\n-}\n-00267\n-00268\n-nb_tot+=2;\n-00269\n-return 0;\n-00270\n-00271 }\n-00272\n-00273\n-00274 /*\n-00275 * update the cone\n-00276 * go to the next child for that parent and update \u2019cone\u2019 appropriately\n-00277 * return 0 if update candidate found, 1 otherwise\n-00278 ***********************************************************************/\n-00279 int Cstable_cones::update_cone(){\n-// get the next child and centre\n-00280\n-00281\n-centre_idx++;\n-00282\n-if (centre_idx==vicinity_size)\n-00283\n-centre_idx=0;\n-if (centre_idx==first_cone)\n-00284\n-return 1;\n-00285\n-00286\n-00287\n-// update the cone w.r.t. the old child\n-00288\n-// only required if the old child is entering inside in which\n-00289\n-// case we need to add it. We also know that the child is\n-00290\n-// inside iff its side is -.\n-00291\n-if (!centre->side){\n-// update cone\n-00292\n-00293\n-cone += (*child);\n-00294\n-// update info on particles inside\n-00295\n-00296\n-centre->is_inside->cone = true;\n-00297\n-// update stability check quantities\n-00298\n-00299\n-dpt += fabs(child->px)+fabs(child->py);\n-00300\n-}\n-00301\n-00302\n-// update centre and child to correspond to the new position\n-00303\n-centre = vicinity[centre_idx];\n-00304\n-child = centre->v;\n-00305\n-00306\n-// check cocircularity\n-00307\n-// note that if cocirculaity is detected (i.e. if we receive 1\n-00308\n-// in the next test), we need to recall \u2019update_cone\u2019 directly\n-00309\n-// since tests and remaining part of te update has been performed\n-00310\n-//if (cocircular_check())\n-00311\n-if (cocircular_check())\n-00312\n-return update_cone();\n-00313\n-00314\n-00315\n-// update the cone w.r.t. the new child\n-00316\n-// only required if the new child was already inside in which\n-00317\n-// case we need to remove it. We also know that the child is\n-00318\n-// inside iff its side is +.\n-00319\n-if ((centre->side) && (cone.ref.not_empty())){\n-00320\n-// update cone\n-00321\n-cone -= (*child);\n-00322\n-// update info on particles inside\n-00323\n-00324\n-centre->is_inside->cone = false;\n-00325\n-// update stability check quantities\n-00326\n-00327\n-dpt += fabs(child->px)+fabs(child->py); //child->perp2();\n-00328\n-}\n-00329\n-00330\n-// check that the addition and subtraction of vectors does\n-00331\n-// not lead to too much rounding error\n-00332\n-// for that, we compute the sum of pt modifications and of |pt|\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.43 protocones.cpp\n-\n-00333\n-// since last recomputation and once the ratio overpasses a threshold\n-00334\n-// we recompute vicinity.\n-00335\n-if ((dpt>PT_TSHOLD*(fabs(cone.px)+fabs(cone.py))) && (cone.ref.not_empty())){\n-00336\n-recompute_cone_contents();\n-00337\n-}\n-00338\n-if (cone.ref.is_empty()){\n-00339\n-cone = Cmomentum();\n-00340\n-dpt=0.0;\n-00341\n-}\n-00342\n-00343\n-return 0;\n-00344 }\n-00345\n-00346\n-00347 /*\n-00348 * compute stability of all enumerated candidates.\n-00349 * For all candidate cones which are stable w.r.t. their border particles,\n-00350 * pass the last test: stability with quadtree intersection\n-00351 ************************************************************************/\n-00352 int Cstable_cones::proceed_with_stability(){\n-int i; // ,n;\n-00353\n-00354\n-hash_element *elm;\n-00355\n-//n=0;\n-00356\n-00357\n-for (i=0;i<=hc->mask;i++){\n-// test ith cell of the hash array\n-00358\n-00359\n-elm = hc->hash_array[i];\n-00360\n-// browse elements therein\n-00361\n-00362\n-while (elm!=NULL){\n-// test stability\n-00363\n-00364\n-if (elm->is_stable){\n-// stability is not ensured by all pairs of \"edges\" already browsed\n-00365\n-00366 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n-00367\n-// => testing stability with quadtree intersection\n-00368\n-if (quadtree->circle_intersect(elm->eta, elm->phi, R2)==elm->ref){\n-00369 #else\n-00370\n-// => testing stability with the particle-list intersection\n-00371\n-if (circle_intersect(elm->eta, elm->phi)==elm->ref){\n-00372 #endif\n-00373\n-// add it to the list of protocones\n-00374\n-// note that in its present form, we do not allocate the\n-00375\n-// 4-vector components of the momentum. There\u2019s no need to\n-00376\n-// do it here as it will be recomputed in\n-00377\n-//\n-Csplit_merge::add_protocones\n-00378\n-protocones.push_back(Cmomentum(elm->eta, elm->phi, elm->ref));\n-00379\n-}\n-00380\n-}\n-00381\n-// jump to the next one\n-00382\n-00383\n-elm = elm->next;\n-00384\n-}\n-00385\n-}\n-00386\n-// free hash\n-00387\n-00388\n-// we do that at this level because hash eats rather a lot of memory\n-00389\n-// we want to free it before running the split/merge algorithm\n-00390 #ifdef DEBUG_STABLE_CONES\n-00391\n-nb_hash_cones = hc->n_cones;\n-00392\n-nb_hash_occupied = hc->n_occupied_cells;\n-00393 #endif\n-00394\n-00395\n-delete hc;\n-00396\n-hc=NULL;\n-00397\n-return protocones.size();\n-00398\n-00399 }\n-00400\n-00401\n-00403 // ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n-//\n-00404 // - cocircular_pt_less(v1, v2)\n-//\n-00405 // - prepare_cocircular_list()\n-//\n-00406 // - test_cone_cocircular()\n-//\n-00407 // - test_stability(candidate, border_vect)\n-//\n-00408 // - updat_cone_cocircular()\n-//\n-00410\n-00412 bool cocircular_pt_less(Cmomentum *v1, Cmomentum *v2){\n-return v1->perp2() < v2->perp2();\n-00413\n-00414 }\n-00415\n-00416 /*\n-00417 * run through the vicinity of the current parent and for each child\n-00418 * establish which other members are cocircular... Note that the list\n-00419 * associated with each child contains references to vicinity\n-00420 * elements: thus two vicinity elements each associated with one given\n-00421 * particle may appear in a list -- this needs to be watched out for\n-00422 * later on...\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-249\n-\n-\f250\n-\n-File Documentation\n-\n-00423 **********************************************************************/\n-00424 void Cstable_cones::prepare_cocircular_lists() {\n-00425\n-circulator::iterator > here(vicinity.begin(),\n-00426\n-vicinity.begin(),\n-00427\n-vicinity.end());\n-00428\n-00429\n-circulator::iterator > search(here);\n-00430\n-do {\n-00431\n-00432\n-Cvicinity_elm* here_pntr = *here();\n-00433\n-search.set_position(here);\n-00434\n-00435\n-// search forwards for things that should have \"here\" included in\n-00436\n-// their cocircularity list\n-00437\n-while (true) {\n-00438\n-++search;\n-if ( abs_dphi((*search())->angle, here_pntr->angle) <\n-00439\n-00440\n-here_pntr->cocircular_range\n-00441\n-&& search() != here()) {\n-00442\n-(*search())->cocircular.push_back(here_pntr);\n-00443\n-} else {\n-00444\n-break;\n-00445\n-}\n-00446\n-}\n-00447\n-// search backwards\n-00448\n-00449\n-search.set_position(here);\n-while (true) {\n-00450\n-00451\n---search;\n-00452\n-if ( abs_dphi((*search())->angle, here_pntr->angle) <\n-00453\n-here_pntr->cocircular_range\n-00454\n-&& search() != here()) {\n-00455\n-(*search())->cocircular.push_back(here_pntr);\n-00456\n-} else {\n-break;\n-00457\n-00458\n-}\n-00459\n-}\n-00460\n-00461\n-++here;\n-00462\n-} while (here() != vicinity.begin());\n-00463\n-00464 }\n-00465\n-00466 /*\n-00467 * Testing cocircular configurations in p^3 time,\n-00468 * rather than 2^p time; we will test all contiguous subsets of points\n-00469 * on the border --- note that this is till probably overkill, since\n-00470 * in principle we only have to test situations where up to a\n-00471 * half-circle is filled (but going to a full circle is simpler)\n-00472 ******************************************************************/\n-00473 void Cstable_cones::test_cone_cocircular(Cmomentum & borderless_cone,\n-00474\n-list & border_list) {\n-00475\n-vector border_vect;\n-00476\n-00477\n-border_vect.reserve(border_list.size());\n-00478\n-for (list::iterator it = border_list.begin();\n-00479\n-it != border_list.end(); it++) {\n-00480\n-border_vect.push_back(Cborder_store(*it, centre->eta, centre->phi));\n-00481\n-}\n-00482\n-00483\n-// get them into order of angle\n-00484\n-sort(border_vect.begin(), border_vect.end());\n-00485\n-// set up some circulators, since these will help us go around the\n-00486\n-00487\n-// circle easily\n-00488\n-circulator::iterator >\n-00489\n-start(border_vect.begin(), border_vect.begin(),border_vect.end());\n-00490\n-circulator::iterator > mid(start), end(start);\n-00491\n-00492\n-// test the borderless cone\n-00493\n-Cmomentum candidate = borderless_cone;\n-00494\n-candidate.build_etaphi();\n-if (candidate.ref.not_empty())\n-00495\n-00496\n-test_stability(candidate, border_vect);\n-00497\n-00498\n-do {\n-00499\n-// reset status wrt inclusion in the cone\n-00500\n-mid = start;\n-00501\n-do {\n-00502\n-mid()->is_in = false;\n-00503\n-} while (++mid != start);\n-00504\n-// now run over all inclusion possibilities with this starting point\n-00505\n-00506\n-candidate = borderless_cone;\n-while (++mid != start) {\n-00507\n-// will begin with start+1 and go up to start-1\n-00508\n-00509\n-mid()->is_in = true;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.43 protocones.cpp\n-\n-251\n-\n-00510\n-candidate += *(mid()->mom);\n-00511\n-test_stability(candidate, border_vect);\n-00512\n-}\n-00513\n-00514\n-} while (++start != end);\n-00515\n-// mid corresponds to momentum that we need to include to get the\n-00516\n-00517\n-// full cone\n-00518\n-mid()->is_in = true;\n-00519\n-candidate += *(mid()->mom);\n-00520\n-test_stability(candidate, border_vect);\n-00521 }\n-00522\n-00523\n-00530 void Cstable_cones::test_stability(Cmomentum & candidate, const vector & border_vect) {\n-00531\n-// this almost certainly has not been done...\n-00532\n-00533\n-candidate.build_etaphi();\n-00534\n-bool stable = true;\n-00535\n-for (unsigned i = 0; i < border_vect.size(); i++) {\n-00536\n-00537\n-if (is_inside(&candidate, border_vect[i].mom) ^ (border_vect[i].is_in)) {\n-00538\n-stable = false;\n-break; // it\u2019s unstable so there\u2019s no point continuing\n-00539\n-00540\n-}\n-00541\n-}\n-00542\n-if (stable) hc->insert(&candidate);\n-00543\n-00544 }\n-00545\n-00546 /*\n-00547 * check if we are in a situation of cocircularity.\n-00548 * if it is the case, update and test in the corresponding way\n-00549 * return \u2019false\u2019 if no cocircularity detected, \u2019true\u2019 otherwise\n-00550 * Note that if cocircularity is detected, we need to\n-00551 * recall \u2019update\u2019 from \u2019update\u2019 !!!\n-00552 ***************************************************************/\n-00553 bool Cstable_cones::cocircular_check(){\n-00554\n-// check if many configurations have the same centre.\n-00555\n-// if this is the case, branch on the algorithm for this\n-00556\n-// special case.\n-00557\n-// Note that those situation, being considered separately in\n-00558\n-// test_cone_multiple, must only be considered here if all\n-00559\n-// angles are on the same side (this avoid multiple counting)\n-00560\n-00561\n-if (centre->cocircular.empty()) return false;\n-00562\n-// first get cone into status required at end...\n-00563\n-00564\n-if ((centre->side) && (cone.ref.not_empty())){\n-// update cone\n-00565\n-00566\n-cone -= (*child);\n-00567\n-// update info on particles inside\n-00568\n-00569\n-centre->is_inside->cone = false;\n-00570\n-00571\n-// update stability check quantities\n-00572\n-dpt += fabs(child->px)+fabs(child->py); //child->perp2();\n-00573\n-}\n-00574\n-00575\n-00576\n-// now establish the list of unique children in the list\n-00577\n-// first make sure parent and child are in!\n-00578\n-00579\n-list removed_from_cone;\n-00580\n-list put_in_border;\n-00581\n-list border_list;\n-00582\n-00583\n-Cmomentum cone_removal;\n-00584\n-Cmomentum border = *parent;\n-00585\n-border_list.push_back(parent);\n-00586\n-// make sure child appears in the border region\n-00587\n-00588\n-centre->cocircular.push_back(centre);\n-00589\n-00590\n-// now establish the full contents of the cone minus the cocircular\n-00591\n-// region and of the cocircular region itself\n-00592\n-for(list::iterator it = centre->cocircular.begin();\n-00593\n-it != centre->cocircular.end(); it++) {\n-00594\n-if ((*it)->is_inside->cone) {\n-00595\n-00596\n-cone_removal\n-+= *((*it)->v);\n-00597\n-(*it)->is_inside->cone = false;\n-00598\n-removed_from_cone.push_back((*it)->is_inside);\n-00599\n-}\n-00600\n-// if a point appears twice (i.e. with + and - sign) in the list of\n-00601\n-00602\n-// points on the border, we take care not to include it twice.\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f252\n-\n-File Documentation\n-\n-00603\n-// Note that this situation may appear when a point is at a distance\n-00604\n-// close to 2R from the parent\n-00605\n-if (!(*it)->is_inside->cocirc) {\n-00606\n-border += *((*it)->v);\n-00607\n-(*it)->is_inside->cocirc = true;\n-00608\n-put_in_border.push_back((*it)->is_inside);\n-00609\n-border_list.push_back((*it)->v);\n-00610\n-}\n-00611\n-}\n-00612\n-00613\n-// figure out whether this pairing has been observed before\n-00614\n-00615\n-Cmomentum borderless_cone = cone;\n-00616\n-borderless_cone -= cone_removal;\n-bool consider = true;\n-00617\n-for (unsigned int i=0;i(borderless_cone.ref,\n-00628\n-border.ref));\n-00629\n-// first figure out whether our cone momentum is good\n-00630\n-00631\n-double local_dpt = fabs(cone_removal.px) + fabs(cone_removal.py);\n-00632\n-double total_dpt = dpt + local_dpt;\n-00633\n-00634\n-recompute_cone_contents_if_needed(borderless_cone, total_dpt);\n-if (total_dpt == 0) {\n-00635\n-00636\n-// a recomputation has taken place -- so take advantage of this\n-00637\n-// and update the member cone momentum\n-00638\n-cone = borderless_cone + cone_removal;\n-00639\n-dpt = local_dpt;\n-00640\n-}\n-00641\n-00642\n-test_cone_cocircular(borderless_cone, border_list);\n-00643\n-}\n-00644\n-00645\n-// relabel things that were in the cone but got removed\n-00646\n-00647\n-for(list::iterator is_in = removed_from_cone.begin();\n-00648\n-is_in != removed_from_cone.end(); is_in++) {\n-00649\n-(*is_in)->cone = true;\n-00650\n-}\n-00651\n-00652\n-// relabel things that got put into the border\n-00653\n-for(list::iterator is_in = put_in_border.begin();\n-00654\n-is_in != put_in_border.end(); is_in++) {\n-00655\n-(*is_in)->cocirc = false;\n-00656\n-}\n-00657\n-00658\n-// we\u2019re done with everything -- return true to signal to user that we\u2019ve\n-00659\n-// been through the co-circularity rigmarole\n-00660\n-return true;\n-00661 }\n-00662\n-00663\n-00665 // RECOMPUTATION OF CONE CONTENTS\n-//\n-00666 // - compute_cone_contents()\n-//\n-00667 // - recompute_cone_contents()\n-//\n-00668 // - recompute_cone_contents_if_needed()\n-//\n-00670\n-00679 void Cstable_cones::compute_cone_contents() {\n-00680\n-circulator::iterator >\n-00681\n-start(vicinity.begin()+first_cone, vicinity.begin(), vicinity.end());\n-00682\n-00683\n-circulator::iterator > here(start);\n-00684\n-// note that in the following algorithm, the cone contents never includes\n-00685\n-00686\n-// the child. Indeed, if it has positive sign, then it will be set as\n-00687\n-// outside at the last step in the loop. If it has negative sign, then the\n-00688\n-// loop will at some point go to the corresponding situation with positive\n-00689\n-// sign and set the inclusion status to 0.\n-00690\n-00691\n-do {\n-// as we leave this position a particle enters if its side is\n-00692\n-00693\n-// negative (i.e. the centre is the one at -ve angle wrt to the\n-00694\n-// parent-child line\n-00695\n-if (!(*here())->side) ((*here())->is_inside->cone) = 1;\n-00696\n-00697\n-// move on to the next position\n-00698\n-++here;\n-00699\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.43 protocones.cpp\n-\n-00700\n-// as we arrive at this position a particle leaves if its side is positive\n-00701\n-if ((*here())->side) ((*here())->is_inside->cone) = 0;\n-00702\n-} while (here != start);\n-00703\n-// once we\u2019ve reached the start the \u2019is_inside\u2019 information should be\n-00704\n-00705\n-// 100% complete, so we can use it to calculate the cone contents\n-00706\n-// and then exit\n-00707\n-recompute_cone_contents();\n-return;\n-00708\n-00709\n-00710 }\n-00711\n-00712\n-00713 /*\n-00714 * compute the cone momentum from particle list.\n-00715 * in this version, we use the \u2019pincluded\u2019 information\n-00716 * from the Cvicinity class\n-00717 */\n-00718 void Cstable_cones::recompute_cone_contents(){\n-00719\n-unsigned int i;\n-00720\n-// set momentum to 0\n-00721\n-00722\n-cone = Cmomentum();\n-00723\n-// Important note: we can browse only the particles\n-00724\n-00725\n-// in vicinity since all particles in the cone are\n-00726\n-// withing a distance 2R w.r.t. parent hence in vicinity.\n-00727\n-// Among those, we only add the particles for which \u2019is_inside\u2019 is true !\n-00728\n-// This methos rather than a direct comparison avoids rounding errors\n-00729\n-for (i=0;iside) && (vicinity[i]->is_inside->cone))\n-00732\n-cone += *vicinity[i]->v;\n-00733\n-}\n-00734\n-// set check variables back to 0\n-00735\n-00736\n-dpt = 0.0;\n-00737 }\n-00738\n-00739\n-00740 /*\n-00741 * if we have gone beyond the acceptable threshold of change, compute\n-00742 * the cone momentum from particle list. in this version, we use the\n-00743 * \u2019pincluded\u2019 information from the Cvicinity class, but we don\u2019t\n-00744 * change the member cone, only the locally supplied one\n-00745 */\n-00746 void Cstable_cones::recompute_cone_contents_if_needed(Cmomentum & this_cone,\n-00747\n-double & this_dpt){\n-00748\n-if (this_dpt > PT_TSHOLD*(fabs(this_cone.px)+fabs(this_cone.py))) {\n-00749\n-00750\n-if (cone.ref.is_empty()) {\n-00751\n-this_cone = Cmomentum();\n-00752\n-} else {\n-// set momentum to 0\n-00753\n-00754\n-this_cone = Cmomentum();\n-00755\n-// Important note: we can browse only the particles\n-00756\n-00757\n-// in vicinity since all particles in the this_cone are\n-00758\n-// withing a distance 2R w.r.t. parent hence in vicinity.\n-00759\n-// Among those, we only add the particles for which \u2019is_inside\u2019 is true !\n-00760\n-// This methos rather than a direct comparison avoids rounding errors\n-00761\n-for (unsigned int i=0;iside) && (vicinity[i]->is_inside->cone))\n-00764\n-this_cone += *vicinity[i]->v;\n-00765\n-}\n-00766\n-00767\n-}\n-00768\n-// set check variables back to 0\n-00769\n-this_dpt = 0.0;\n-00770\n-}\n-00771\n-00772 }\n-00773\n-00774\n-00776 // VARIOUS TOOLS\n-//\n-00777 // - circle_intersect()\n-//\n-00778 // - is_inside()\n-//\n-00779 // - abs_dangle()\n-//\n-00781\n-00782\n-00783 /*\n-00784 * circle intersection.\n-00785 * computes the intersection with a circle of given centre and radius.\n-00786 * The output takes the form of a checkxor of the intersection\u2019s particles\n-00787 * - cx\n-circle centre x coordinate\n-circle centre y coordinate\n-00788 * - cy\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-253\n-\n-\f254\n-\n-File Documentation\n-\n-00789 * return the checkxor for the intersection\n-00790 ******************************************************************/\n-00791 Creference Cstable_cones::circle_intersect(double cx, double cy){\n-00792\n-Creference intersection;\n-int i;\n-00793\n-00794\n-double dx, dy;\n-00795\n-for (i=0;iM_PI)\n-00803\n-dy -= twopi;\n-00804\n-00805\n-// really check if the distance is less than VR\n-00806\n-if (dx*dx+dy*dyeta - v->eta;\n-00825\n-dy = fabs(centre_in->phi - v->phi);\n-if (dy>M_PI)\n-00826\n-00827\n-dy -= twopi;\n-00828\n-00829\n-return dx*dx+dy*dyM_PI)\n-00844\n-dphi = dphi-twopi;\n-00845\n-00846\n-return dphi;\n-00847 }\n-00848\n-00849 }\n-\n-5.44 protocones.cpp\n-00001\n-00002 // File: protocones.cpp\n-00003 // Description: source file for stable cones determination (Cstable_cones)\n-00004 // This file is part of the SISCone project.\n-00005 // WARNING: this is not the main SISCone trunk but\n-00006 //\n-an adaptation to spherical coordinates\n-00007 // For more details, see http://projects.hepforge.org/siscone\n-00008 //\n-00009 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n-00010 //\n-00011 // This program is free software; you can redistribute it and/or modify\n-00012 // it under the terms of the GNU General Public License as published by\n-00013 // the Free Software Foundation; either version 2 of the License, or\n-00014 // (at your option) any later version.\n-00015 //\n-00016 // This program is distributed in the hope that it will be useful,\n-00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-00019 // GNU General Public License for more details.\n-\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.44 protocones.cpp\n-\n-00020 //\n-//\n-00021 // You should have received a copy of the GNU General Public License\n-//\n-00022 // along with this program; if not, write to the Free Software\n-//\n-00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00024 //\n-//\n-00025 // $Revision:: 311\n-$//\n-00026 // $Date:: 2011-10-05 23:27:09 +0200 (Wed, 05 Oct 2011)\n-$//\n-00028\n-00029 /*******************************************************\n-00030 * Introductory note:\n-*\n-00031 * Since this file has many member functions, we have *\n-00032 * structured them in categories:\n-*\n-00033 * INITIALISATION FUNCTIONS\n-*\n-00034 * - ctor()\n-*\n-00035 * - ctor(particle_list)\n-*\n-00036 * - dtor()\n-*\n-00037 * - init(particle_list)\n-*\n-00038 * ALGORITHM MAIN ENTRY\n-*\n-00039 * - get_stable_cone(radius)\n-*\n-00040 * ALGORITHM MAIN STEPS\n-*\n-00041 * - init_cone()\n-*\n-00042 * - test_cone()\n-*\n-00043 * - update_cone()\n-*\n-00044 * - proceed_with_stability()\n-*\n-00045 * ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n-*\n-00046 * - cocircular_pt_less(v1, v2)\n-*\n-00047 * - prepare_cocircular_list()\n-*\n-00048 * - test_cone_cocircular()\n-*\n-00049 * - test_stability(candidate, border_list)\n-*\n-00050 * - updat_cone_cocircular()\n-*\n-00051 * RECOMPUTATION OF CONE CONTENTS\n-*\n-00052 * - compute_cone_contents()\n-*\n-00053 * - recompute_cone_contents()\n-*\n-00054 * - recompute_cone_contents_if_needed()\n-*\n-00055 * VARIOUS TOOLS\n-*\n-00056 * - circle_intersect()\n-*\n-00057 * - is_inside()\n-*\n-00058 * - abs_dangle()\n-*\n-00059 *******************************************************/\n-00060\n-00061 #include \n-00062 #include \n-00063 #include \n-00064 #include \"protocones.h\"\n-00065 #include \n-00066 #include \n-00067 #include \n-00068\n-00069 namespace siscone_spherical{\n-00070\n-00071 using namespace std;\n-00072\n-00073 /**********************************************************************\n-00074 * CSphstable_cones implementation\n-*\n-00075 * Computes the list of stable comes from a particle list.\n-*\n-00076 * This class does the first fundamental task of te cone algorithm:\n-*\n-00077 * it is used to compute the list of stable cones given a list\n-*\n-00078 * of particles.\n-*\n-00079 **********************************************************************/\n-00080\n-00082 // INITIALISATION FUNCTIONS\n-//\n-00083 // - ctor()\n-//\n-00084 // - ctor(particle_list)\n-//\n-00085 // - dtor()\n-//\n-00086 // - init(particle_list)\n-//\n-00088\n-00089 // default ctor\n-00090 //-------------00091 CSphstable_cones::CSphstable_cones(){\n-00092\n-nb_tot = 0;\n-00093\n-hc = NULL;\n-00094 }\n-00095\n-00096 // ctor with initialisation\n-00097 //-------------------------00098 CSphstable_cones::CSphstable_cones(vector &_particle_list)\n-00099\n-: CSphvicinity(_particle_list){\n-00100\n-00101\n-nb_tot = 0;\n-00102\n-hc = NULL;\n-00103 }\n-00104\n-00105 // default dtor\n-00106 //-------------00107 CSphstable_cones::~CSphstable_cones(){\n-if (hc!=NULL) delete hc;\n-00108\n-00109 }\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-255\n-\n-\f256\n-\n-File Documentation\n-\n-00110\n-00111 /*\n-00112 * initialisation\n-00113 * - _particle_list list of particles\n-00114 * - _n\n-number of particles\n-00115 *********************************************************************/\n-00116 void CSphstable_cones::init(vector &_particle_list){\n-00117\n-// check already allocated mem\n-00118\n-if (hc!=NULL){\n-00119\n-delete hc;\n-00120\n-}\n-if (protocones.size()!=0)\n-00121\n-00122\n-protocones.clear();\n-00123\n-00124\n-multiple_centre_done.clear();\n-00125\n-00126\n-// initialisation\n-00127\n-set_particle_list(_particle_list);\n-00128 }\n-00129\n-00130\n-//\n-00132 // ALGORITHM MAIN ENTRY\n-00133 // - get_stable_cone(radius)\n-//\n-00135\n-00136 /*\n-00137 * compute stable cones.\n-00138 * This function really does the job i.e. computes\n-00139 * the list of stable cones (in a seedless way)\n-00140 * - _radius: radius of the cones\n-00141 * The number of stable cones found is returned\n-00142 *********************************************************************/\n-00143 int CSphstable_cones::get_stable_cones(double _radius){\n-int p_idx;\n-00144\n-00145\n-// check if everything is correctly initialised\n-00146\n-00147\n-if (n_part==0){\n-00148\n-return 0;\n-00149\n-}\n-00150\n-00151\n-R = _radius;\n-00152\n-R2 = R*R;\n-00153\n-tan2R = tan(R);\n-00154\n-tan2R *= tan2R;\n-00155\n-00156\n-// allow hash for cones candidates\n-00157\n-hc = new sph_hash_cones(n_part, R);\n-00158\n-// browse all particles\n-00159\n-00160\n-for (p_idx=0;p_idx_phi \u00ab \", \" \u00ab parent->_theta \u00ab endl;\n-00177 #endif\n-00178\n-00179\n-// step 1: initialise with the first cone candidate\n-00180\n-init_cone();\n-00181\n-do{\n-00182\n-00183\n-// step 2: test cone stability for that pair (P,C)\n-00184\n-test_cone();\n-00185\n-00186\n-// step 3: go to the next cone child candidate C\n-00187\n-} while (!update_cone());\n-00188\n-}\n-00189\n-00190\n-return proceed_with_stability();\n-00191 }\n+CSphstable_cones::init(p_uncol_hard);\n+00191\n+// get stable cones (stored in \u2019protocones\u2019)\n 00192\n 00193\n-00195 // ALGORITHM MAIN STEPS\n-//\n-00196 // - init_cone()\n-//\n-00197 // - test_cone()\n-//\n-00198 // - update_cone()\n-//\n-00199 // - proceed_with_stability()\n-//\n+unclustered_left = get_stable_cones(_radius);\n+00194\n+00195\n+// add the hardest stable cone to the list of jets\n+00196\n+if (add_hardest_protocone_to_jets(&protocones, R2, _Emin)) break;\n+00197\n+00198\n+_n_pass_max--;\n+00199\n+} while ((unclustered_left) && (n_left>0) && (_n_pass_max!=0));\n+00200\n+00201\n+// split & merge\n+00202\n+return jets.size();\n+00203 }\n+00204 /*\n+00205 * recompute the jets with a different overlap parameter.\n+00206 * we use the same particles and R as in the preceeding call.\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n-\f5.44 protocones.cpp\n+\f258\n \n-00201\n-00202 /*\n-00203 * initialise the cone.\n-00204 * We take the first particle in the angular ordering to compute\n-00205 * this one\n-00206 * return 0 on success, 1 on error\n-00207 *********************************************************************/\n-00208 int CSphstable_cones::init_cone(){\n-// The previous version of the algorithm was starting the\n-00209\n-00210\n-// loop around vicinity elements with the \"most isolated\" child.\n-00211\n-// given the nodist method to calculate the cone contents, we no\n-00212\n-// longer need to worry about which cone comes first...\n-00213\n-first_cone=0;\n-00214\n-// now make sure we have lists of the cocircular particles\n-00215\n+File Documentation\n+\n+shared energy threshold for splitting&merging\n+00207 * - _f\n+00208 * - _Emin\n+minimum Energy of the protojets\n+the scale choice for the split-merge procedure\n+00209 * - _split_merge_scale\n+00210 *\n+NOTE: using pt leads to IR unsafety for some events with momentum\n+00211 *\n+conservation. So we strongly advise not to change the default\n+value.\n+00212 *\n+00213 * return the number of jets found, -1 if recomputation not allowed.\n+00214 ********************************************************************/\n+00215 int CSphsiscone::recompute_jets(double _f, double _Emin,\n 00216\n-prepare_cocircular_lists();\n+Esplit_merge_scale _split_merge_scale){\n 00217\n+if (!rerun_allowed)\n+return -1;\n 00218\n-//TODO? deal with a configuration with only degeneracies ?\n 00219\n-// The only possibility seems a regular hexagon with a parent point\n 00220\n-// in the centre. And this situation is by itself unclear.\n+ptcomparison.split_merge_scale = _split_merge_scale;\n 00221\n-// Hence, we do nothing here !\n+// restore particle list\n 00222\n 00223\n-// init set child C\n+partial_clear();\n 00224\n-centre = vicinity[first_cone];\n+init_pleft();\n 00225\n-child = centre->v;\n 00226\n-centre_idx = first_cone;\n+// initialise split/merge algorithm\n 00227\n-// build the initial cone (nodist: avoids calculating distances -00228\n+unsigned int i;\n+00228\n+for (i=0;iflags());\n 00250\n-// are tested when taking the pair of particle parent+child\n 00251\n-// and child+parent.\n+(*_banner_ostr) \u00ab \"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" \u00ab endl;\n 00252\n+(*_banner_ostr) \u00ab \"#\n+SISCone\n+version \" \u00ab setw(28) \u00ab left \u00ab siscone_version()\n+\u00ab \"o\" \u00ab endl;\n 00253\n-// here are the tests entering the first series:\n+(*_banner_ostr) \u00ab \"#\n+http://projects.hepforge.org/siscone\n+o\" \u00ab endl;\n 00254\n-// 1. check if the cone is already inserted\n+(*_banner_ostr) \u00ab \"#\n+o\" \u00ab endl;\n+o\" \u00ab endl;\n 00255\n-// 2. check cone stability for the parent and child particles\n+(*_banner_ostr) \u00ab \"# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm\n 00256\n-//UPDATED(see below): if (centre->side){\n+(*_banner_ostr) \u00ab \"# SISCone was written by Gavin Salam and Gregory Soyez\n+o\" \u00ab endl;\n 00257\n+(*_banner_ostr) \u00ab \"# It is released under the terms of the GNU General Public License o\" \u00ab endl;\n 00258\n-//UPDATED(see below):\n-// test when both particles are not in the cone\n+(*_banner_ostr) \u00ab \"#\n+o\" \u00ab endl;\n+!!!\n+WARNING\n+!!!\n+o\" \u00ab endl;\n 00259\n-//UPDATED(see below):\n-// or when both are in.\n+(*_banner_ostr) \u00ab \"#\n 00260\n-//UPDATED(see below):\n-// Note: for the totally exclusive case, test emptyness before\n+(*_banner_ostr) \u00ab \"#\n+This is the version of SISCone using spherical coordinates\n+o\" \u00ab endl;\n 00261\n-//UPDATED(see below):\n-cone_candidate = cone;\n+(*_banner_ostr) \u00ab \"#\n+o\" \u00ab endl;\n+o\" \u00ab endl;\n 00262\n-//UPDATED(see below):\n-if (cone.ref.not_empty()){\n+(*_banner_ostr) \u00ab \"# A description of the algorithm is available in the publication\n 00263\n-//UPDATED(see below):\n-hc->insert(&cone_candidate, parent, child, false, false);\n+(*_banner_ostr) \u00ab \"# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)].\n+o\" \u00ab endl;\n+o\" \u00ab endl;\n 00264\n-//UPDATED(see below):\n-}\n+(*_banner_ostr) \u00ab \"# Please cite it if you use SISCone.\n 00265\n-//UPDATED(see below):\n+(*_banner_ostr) \u00ab \"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\" \u00ab endl;\n 00266\n-//UPDATED(see below):\n-cone_candidate = cone;\n+(*_banner_ostr) \u00ab endl;\n 00267\n-//UPDATED(see below):\n-cone_candidate+= *parent + *child;\n 00268\n-//UPDATED(see below):\n-hc->insert(&cone_candidate, parent, child, true, true);\n+_banner_ostr->flush();\n 00269\n-//UPDATED(see below): } else {\n+_banner_ostr->flags(flags_to_restore);\n 00270\n-//UPDATED(see below):\n-// test when 1! of the particles is in the cone\n-00271\n-//UPDATED(see below):\n-cone_candidate = cone + *parent;\n+}\n+00271 }\n 00272\n-//UPDATED(see below):\n-hc->insert(&cone_candidate, parent, child, true, false);\n-00273\n-//UPDATED(see below):\n-00274\n-//UPDATED(see below):\n-cone_candidate = cone + *child;\n-00275\n-//UPDATED(see below):\n-hc->insert(&cone_candidate, parent, child, false, true);\n-00276\n-//UPDATED(see below): }\n-00277\n-//UPDATED(see below):\n-00278\n-//UPDATED(see below): nb_tot+=2;\n-00279\n-// instead of testing 2 inclusion/exclusion states for every pair, we test the 4 of them\n-00280\n-00281\n-// when the parent has an energy bigger than the child\n-00282\n-if (parent->E >= child->E){\n-// test when both particles are not in the cone\n-00283\n-00284\n-// Note: for the totally exclusive case, test emptiness before\n+00273 // finally, a bunch of functions to access to\n+00274 // basic information (package name, version)\n+00275 //--------------------------------------------00276\n+00277 /*\n+00278 * return SISCone package name.\n+00279 * This is nothing but \"SISCone\", it is a replacement to the\n+00280 * SISCONE_PACKAGE_NAME string defined in config.h and which is not\n+00281 * guaranteed to be public.\n+00282 * return the SISCone name as a string\n+00283 */\n+00284 string siscone_package_name(){\n+return SISCONE_PACKAGE_NAME;\n 00285\n-cone_candidate = cone;\n-if (cone.ref.not_empty()){\n-00286\n+00286 }\n 00287\n-hc->insert(&cone_candidate, parent, child, false, false);\n+00288 /*\n+00289 * return SISCone version number.\n+00290 * return a string of the form \"X.Y.Z\" with possible additional tag\n+00291 *\n+(alpha, beta, devel) to mention stability status\n+00292 */\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n-257\n-\n-\f258\n-\n-File Documentation\n+\f5.39 siscone.h\n \n-00288\n-}\n-00289\n-// test when 1! of the particles is in the cone\n-00290\n-00291\n-cone_candidate += *parent;\n-00292\n-hc->insert(&cone_candidate, parent, child, true, false);\n-00293\n+00293 string siscone_version(){\n+return SISCONE_VERSION;\n 00294\n-cone_candidate = cone;\n-00295\n-cone_candidate += *child;\n+00295 }\n 00296\n-hc->insert(&cone_candidate, parent, child, false, true);\n-00297\n-00298\n-// test when both are in.\n-00299\n-cone_candidate += *parent;\n-00300\n-hc->insert(&cone_candidate, parent, child, true, true);\n-00301\n-00302\n-nb_tot += 4;\n-00303\n-}\n-00304\n-00305\n-return 0;\n-00306\n-00307 }\n-00308\n-00309\n-00310 /*\n-00311 * update the cone\n-00312 * go to the next child for that parent and update \u2019cone\u2019 appropriately\n-00313 * return 0 if update candidate found, 1 otherwise\n-00314 ***********************************************************************/\n-00315 int CSphstable_cones::update_cone(){\n-00316 #ifdef DEBUG_STABLE_CONES\n-00317\n-cout \u00ab \"call \u2019circles_plot.gp\u2019 \u2019\" \u00ab centre->centre.px \u00ab \"\u2019 \u2019\"\n-00318\n-\u00ab centre->centre.py \u00ab \"\u2019 \u2019\" \u00ab centre->centre.pz \u00ab \"\u2019\" \u00ab endl\n-00319\n-\u00ab \"pause -1 \u2019(\" \u00ab centre->angle \u00ab \" \" \u00ab (centre->side ? \u2019+\u2019 : \u2019-\u2019) \u00ab \")\";\n-00320 #endif\n-00321\n-// get the next child and centre\n-00322\n-00323\n-centre_idx++;\n-00324\n-if (centre_idx==vicinity_size)\n-00325\n-centre_idx=0;\n-if (centre_idx==first_cone)\n-00326\n-return 1;\n-00327\n-00328\n-00329\n-// update the cone w.r.t. the old child\n-00330\n-// only required if the old child is entering inside in which\n-00331\n-// case we need to add it. We also know that the child is\n-00332\n-// inside iff its side is -.\n-00333\n-if (!centre->side){\n-00334 #ifdef DEBUG_STABLE_CONES\n-00335\n-cout \u00ab \" old_enter\";\n-00336 #endif\n-00337\n-// update cone\n-00338\n-cone += (*child);\n-00339\n-// update info on particles inside\n-00340\n-00341\n-centre->is_inside->cone = true;\n-00342\n-00343\n-// update stability check quantities\n-00344\n-dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz);\n-00345\n-}\n-00346\n-00347\n-// update centre and child to correspond to the new position\n-00348\n-centre = vicinity[centre_idx];\n-00349\n-child = centre->v;\n-00350\n-// check cocircularity\n-00351\n-00352\n-// note that if cocirculaity is detected (i.e. if we receive 1\n-00353\n-// in the next test), we need to recall \u2019update_cone\u2019 directly\n-00354\n-// since tests and remaining part of te update has been performed\n-00355\n-//if (cocircular_check())\n-00356\n-if (cocircular_check()){\n-00357 #ifdef DEBUG_STABLE_CONES\n-00358\n-cout \u00ab \" Co-circular case detected\" \u00ab endl;\n-00359 #endif\n-00360\n-return update_cone();\n-00361\n-}\n-00362\n-00363\n-// update the cone w.r.t. the new child\n-00364\n-// only required if the new child was already inside in which\n-00365\n-// case we need to remove it. We also know that the child is\n-00366\n-// inside iff its side is +.\n-00367\n-if ((centre->side) && (cone.ref.not_empty())){\n-00368 #ifdef DEBUG_STABLE_CONES\n-00369\n-cout \u00ab \" new exit\";\n-00370 #endif\n-00371\n-// update cone\n-00372\n-00373\n-cone -= (*child);\n-00374\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.44 protocones.cpp\n+00297 }\n \n-00375\n-// update info on particles inside\n-00376\n-centre->is_inside->cone = false;\n-00377\n-// update stability check quantities\n-00378\n-00379\n-dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz); //child->perp2();\n-00380\n-}\n-00381\n-// check that the addition and subtraction of vectors does\n-00382\n-00383\n-// not lead to too much rounding error\n-00384\n-// for that, we compute the sum of pt modifications and of |pt|\n-00385\n-// since last recomputation and once the ratio overpasses a threshold\n-00386\n-// we recompute vicinity.\n-00387\n-if ((dpt>PT_TSHOLD*(fabs(cone.px)+fabs(cone.py)+fabs(cone.pz))) && (cone.ref.not_empty())){\n-00388\n-recompute_cone_contents();\n-00389\n-}\n-if (cone.ref.is_empty()){\n-00390\n-00391\n-cone = CSphmomentum();\n-00392\n-dpt=0.0;\n-00393\n-}\n-00394\n-00395 #ifdef DEBUG_STABLE_CONES\n-00396\n-cout \u00ab \"\u2019\" \u00ab endl;\n-00397 #endif\n-00398\n-00399\n-return 0;\n-00400 }\n-00401\n-00402\n-00403 /*\n-00404 * compute stability of all enumerated candidates.\n-00405 * For all candidate cones which are stable w.r.t. their border particles,\n-00406 * pass the last test: stability with quadtree intersection\n-00407 ************************************************************************/\n-00408 int CSphstable_cones::proceed_with_stability(){\n-int i;\n-00409\n-00410\n-sph_hash_element *elm;\n-00411\n-00412\n-for (i=0;i<=hc->mask;i++){\n-00413\n-// test ith cell of the hash array\n-00414\n-elm = hc->hash_array[i];\n-00415\n-00416\n-// browse elements therein\n-00417\n-while (elm!=NULL){\n-00418\n-// test stability\n-00419\n-if (elm->is_stable){\n-00420\n-// stability is not ensured by all pairs of \"edges\" already browsed\n-00421 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n-00422\n-// => testing stability with quadtree intersection\n-00423\n-if (quadtree->circle_intersect(elm->eta, elm->phi, R2)==elm->ref)\n-00424 #else\n-00425\n-// => testing stability with the particle-list intersection\n-00426\n-if (circle_intersect(elm->centre)==elm->centre.ref)\n-00427 #endif\n-00428\n-protocones.push_back(CSphmomentum(elm->centre,1.0));\n-00429\n-}\n-00430\n-00431\n-// jump to the next one\n-00432\n-elm = elm->next;\n-00433\n-}\n-00434\n-}\n-00435\n-00436\n-// free hash\n-00437\n-// we do that at this level because hash eats rather a lot of memory\n-00438\n-// we want to free it before running the split/merge algorithm\n-00439 #ifdef DEBUG_STABLE_CONES\n-00440\n-nb_hash_cones = hc->n_cones;\n-00441\n-nb_hash_occupied = hc->n_occupied_cells;\n-00442 #endif\n-00443\n-00444\n-delete hc;\n-00445\n-hc=NULL;\n-00446\n-return protocones.size();\n-00447\n-00448 }\n-00449\n-00450\n-00452 // ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n+5.39 siscone.h\n+00001 // -*- C++ -*00003 // File: siscone.h\n //\n-00453 // - cocircular_pt_less(v1, v2)\n+00004 // Description: header file for the main SISCone class\n //\n-00454 // - prepare_cocircular_list()\n+00005 // This file is part of the SISCone project.\n //\n-00455 // - test_cone_cocircular()\n+00006 // For more details, see http://projects.hepforge.org/siscone\n //\n-00456 // - test_stability(candidate, border_vect)\n+00007 //\n //\n-00457 // - updat_cone_cocircular()\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n //\n-00459\n-00461 //NEVER USED\n-00462 //bool cocircular_pt_less(CSphmomentum *v1, CSphmomentum *v2){\n-00463 // return v1->perp2() < v2->perp2();\n-00464 //}\n+00009 //\n+//\n+00010 // This program is free software; you can redistribute it and/or modify\n+//\n+00011 // it under the terms of the GNU General Public License as published by\n+//\n+00012 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00013 // (at your option) any later version.\n+//\n+00014 //\n+//\n+00015 // This program is distributed in the hope that it will be useful,\n+//\n+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00018 // GNU General Public License for more details.\n+//\n+00019 //\n+//\n+00020 // You should have received a copy of the GNU General Public License\n+//\n+00021 // along with this program; if not, write to the Free Software\n+//\n+00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00023 //\n+//\n+00024 // $Revision:: 401\n+$//\n+00025 // $Date:: 2016-05-19 16:44:37 +0200 (Thu, 19 May 2016)\n+$//\n+00027\n+00028 #ifndef __SISCONE_H__\n+00029 #define __SISCONE_H__\n+00030\n+00031 #include \"protocones.h\"\n+00032 #include \"split_merge.h\"\n+00033\n+00034 namespace siscone{\n+00035\n+00048 class Csiscone : public Cstable_cones, public Csplit_merge{\n+00049 public:\n+00051\n+Csiscone();\n+00052\n+00054\n+~Csiscone();\n+00055\n+00076\n+int compute_jets(std::vector &_particles, double _radius, double _f,\n+int _n_pass_max=0, double _ptmin=0.0,\n+00077\n+00078\n+Esplit_merge_scale _split_merge_scale=SM_pttilde);\n+00079\n+00097\n+int compute_jets_progressive_removal(std::vector &_particles, double _radius,\n+int _n_pass_max=0, double _ptmin=0.0,\n+00098\n+00099\n+Esplit_merge_scale _ordering_scale=SM_pttilde);\n+00100\n+00113\n+int recompute_jets(double _f, double _ptmin = 0.0,\n+00114\n+Esplit_merge_scale _split_merge_scale=SM_pttilde);\n+00115\n+00117\n+std::vector > protocones_list;\n+00118\n+00119\n+// random number initialisation\n+00120\n+static bool init_done;\n+00121\n+00122 #ifdef DEBUG_STABLE_CONES\n+00123\n+int nb_hash_cones_total, nb_hash_occupied_total;\n+00124 #endif\n+00125\n+00137\n+static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}\n+00138\n+static std::ostream * banner_stream() {return _banner_ostr;}\n+00143\n+00144\n+00145 private:\n+00146\n+bool rerun_allowed;\n+00147\n+static std::ostream * _banner_ostr;\n+00148\n+void _initialise_if_needed();\n+00150\n+00151\n+00152 };\n+00153\n+00154\n+00155 // finally, a bunch of functions to access to\n+00156 // basic information (package name, version)\n+00157 //---------------------------------------------\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n 259\n \n \f260\n \n File Documentation\n \n-00465\n-00466 /*\n-00467 * run through the vicinity of the current parent and for each child\n-00468 * establish which other members are cocircular... Note that the list\n-00469 * associated with each child contains references to vicinity\n-00470 * elements: thus two vicinity elements each associated with one given\n-00471 * particle may appear in a list -- this needs to be watched out for\n-00472 * later on...\n-00473 **********************************************************************/\n-00474 void CSphstable_cones::prepare_cocircular_lists() {\n-00475\n-siscone::circulator::iterator > here(vicinity.begin(),\n-00476\n-vicinity.begin(),\n-00477\n-vicinity.end());\n-00478\n-00479\n-siscone::circulator::iterator > search(here);\n-00480\n-do {\n-00481\n-00482\n-CSphvicinity_elm* here_pntr = *here();\n-00483\n-search.set_position(here);\n-00484\n-// search forwards for things that should have \"here\" included in\n-00485\n-00486\n-// their cocircularity list\n-00487\n-while (true) {\n-00488\n-++search;\n-if ( siscone::abs_dphi((*search())->angle, here_pntr->angle) <\n-00489\n-00490\n-here_pntr->cocircular_range\n-00491\n-&& search() != here()) {\n-00492\n-(*search())->cocircular.push_back(here_pntr);\n-00493\n-} else {\n-00494\n-break;\n-00495\n-}\n-00496\n-}\n-00497\n-// search backwards\n-00498\n-00499\n-search.set_position(here);\n-00500\n-while (true) {\n-00501\n---search;\n-if ( siscone::abs_dphi((*search())->angle, here_pntr->angle) <\n-00502\n-00503\n-here_pntr->cocircular_range\n-00504\n-&& search() != here()) {\n-00505\n-(*search())->cocircular.push_back(here_pntr);\n-00506\n-} else {\n-break;\n-00507\n-00508\n-}\n-00509\n-}\n-00510\n-00511\n-++here;\n-00512\n-} while (here() != vicinity.begin());\n-00513 }\n-00514\n-00515 /*\n-00516 * Testing cocircular configurations in p^3 time,\n-00517 * rather than 2^p time; we will test all contiguous subsets of points\n-00518 * on the border --- note that this is till probably overkill, since\n-00519 * in principle we only have to test situations where up to a\n-00520 * half-circle is filled (but going to a full circle is simpler)\n-00521 ******************************************************************/\n-00522 void CSphstable_cones::test_cone_cocircular(CSphmomentum & borderless_cone,\n-00523\n-list & border_list) {\n-// in spherical coordinates, we don\u2019t have a universal x-y axis system\n-00524\n-00525\n-// to measure the angles. So we first determine one minimising\n-00526\n-// the uncertainties\n-00527\n-CSph3vector angl_dir1, angl_dir2;\n-00528\n-centre->centre.get_angular_directions(angl_dir1, angl_dir2);\n-00529\n-angl_dir1/=angl_dir1._norm;\n-00530\n-angl_dir2/=angl_dir2._norm;\n-00531\n-00532\n-// now we have te reference axis, create the CSphborder_store structure\n-00533\n-vector border_vect;\n-00534\n-border_vect.reserve(border_list.size());\n-for (list::iterator it = border_list.begin();\n-00535\n-00536\n-it != border_list.end(); it++) {\n-00537\n-border_vect.push_back(CSphborder_store(*it, centre->centre, angl_dir1, angl_dir2));\n-00538\n-}\n-00539\n-// get them into order of angle\n-00540\n-00541\n-sort(border_vect.begin(), border_vect.end());\n-00542\n-// set up some circulators, since these will help us go around the\n-00543\n-00544\n-// circle easily\n-00545\n-siscone::circulator::iterator >\n-00546\n-start(border_vect.begin(), border_vect.begin(),border_vect.end());\n-00547\n-siscone::circulator::iterator > mid(start), end(start);\n-00548\n-// test the borderless cone\n-00549\n-00550\n-CSphmomentum candidate = borderless_cone;\n-00551\n-//candidate.build_etaphi();\n+00158\n+00166 std::string siscone_package_name();\n+00167\n+00173 std::string siscone_version();\n+00174\n+00175 }\n+00176 #endif\n+\n+5.40 siscone.h\n+00001 // -*- C++ -*00003 // File: siscone.h\n+//\n+00004 // Description: header file for the main SISCone class\n+//\n+00005 // This file is part of the SISCone project.\n+//\n+00006 // WARNING: this is not the main SISCone trunk but\n+//\n+00007 //\n+an adaptation to spherical coordinates\n+//\n+00008 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00009 //\n+//\n+00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n+//\n+00011 //\n+//\n+00012 // This program is free software; you can redistribute it and/or modify\n+//\n+00013 // it under the terms of the GNU General Public License as published by\n+//\n+00014 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00015 // (at your option) any later version.\n+//\n+00016 //\n+//\n+00017 // This program is distributed in the hope that it will be useful,\n+//\n+00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00020 // GNU General Public License for more details.\n+//\n+00021 //\n+//\n+00022 // You should have received a copy of the GNU General Public License\n+//\n+00023 // along with this program; if not, write to the Free Software\n+//\n+00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00025 //\n+//\n+00026 // $Revision:: 401\n+$//\n+00027 // $Date:: 2016-05-19 16:44:37 +0200 (Thu, 19 May 2016)\n+$//\n+00029\n+00030 #ifndef __SPH_SISCONE_H__\n+00031 #define __SPH_SISCONE_H__\n+00032\n+00033 #include \"protocones.h\"\n+00034 #include \"split_merge.h\"\n+00035\n+00036 namespace siscone_spherical{\n+00037\n+00050 class CSphsiscone : public CSphstable_cones, public CSphsplit_merge{\n+00051 public:\n+00053\n+CSphsiscone();\n+00054\n+00056\n+~CSphsiscone();\n+00057\n+00076\n+int compute_jets(std::vector &_particles, double _radius, double _f,\n+int _n_pass_max=0, double _Emin=0.0,\n+00077\n+00078\n+Esplit_merge_scale _split_merge_scale=SM_Etilde);\n+00079\n+00094\n+int compute_jets_progressive_removal(std::vector &_particles, double _radius,\n+00095\n+int _n_pass_max=0, double _Emin=0.0,\n+00096\n+Esplit_merge_scale _ordering_scale=SM_Etilde);\n+00097\n+int recompute_jets(double _f, double _Emin = 0.0,\n+00110\n+00111\n+Esplit_merge_scale _split_merge_scale=SM_Etilde);\n+00112\n+00114\n+std::vector > protocones_list;\n+00115\n+00116\n+// random number initialisation\n+00117\n+static bool init_done;\n+00118\n+00119 #ifdef DEBUG_STABLE_CONES\n+00120\n+int nb_hash_cones_total, nb_hash_occupied_total;\n+00121 #endif\n+00122\n+static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}\n+00134\n+00135\n+00140\n+static std::ostream * banner_stream() {return _banner_ostr;}\n+00141\n+00142 private:\n+bool rerun_allowed;\n+00143\n+00144\n+static std::ostream * _banner_ostr;\n+00145\n+void _initialise_if_needed();\n+00147\n+00148\n+00149 };\n+00150\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n-\f5.44 protocones.cpp\n+\f5.41 siscone_error.cpp\n \n-00552\n-if (candidate.ref.not_empty())\n-00553\n-test_stability(candidate, border_vect);\n-00554\n-do {\n-00555\n-00556\n-// reset status wrt inclusion in the cone\n-00557\n-mid = start;\n-do {\n-00558\n-00559\n-mid()->is_in = false;\n-00560\n-} while (++mid != start);\n-00561\n-00562\n-// now run over all inclusion possibilities with this starting point\n-00563\n-candidate = borderless_cone;\n-00564\n-while (++mid != start) {\n-// will begin with start+1 and go up to start-1\n-00565\n-00566\n-mid()->is_in = true;\n-00567\n-candidate += *(mid()->mom);\n-00568\n-test_stability(candidate, border_vect);\n-00569\n-}\n-00570\n-00571\n-} while (++start != end);\n-00572\n-// mid corresponds to momentum that we need to include to get the\n-00573\n-00574\n-// full cone\n-00575\n-mid()->is_in = true;\n-00576\n-candidate += *(mid()->mom);\n-00577\n-test_stability(candidate, border_vect);\n-00578 }\n-00579\n-00580\n-00587 void CSphstable_cones::test_stability(CSphmomentum & candidate, const vector &\n-border_vect) {\n-00588\n-// this almost certainly has not been done...\n-00589\n-00590\n-//candidate.build_etaphi();\n-00591\n-00592\n-bool stable = true;\n-00593\n-for (unsigned i = 0; i < border_vect.size(); i++) {\n-if (is_closer(&candidate, border_vect[i].mom,tan2R) ^ (border_vect[i].is_in)) {\n-00594\n-00595\n-stable = false;\n-break; // it\u2019s unstable so there\u2019s no point continuing\n-00596\n-00597\n-}\n-00598\n-}\n-00599\n-00600\n-if (stable) hc->insert(&candidate);\n-00601 }\n-00602\n-00603 /*\n-00604 * check if we are in a situation of cocircularity.\n-00605 * if it is the case, update and test in the corresponding way\n-00606 * return \u2019false\u2019 if no cocircularity detected, \u2019true\u2019 otherwise\n-00607 * Note that if cocircularity is detected, we need to\n-00608 * recall \u2019update\u2019 from \u2019update\u2019 !!!\n-00609 ***************************************************************/\n-00610 bool CSphstable_cones::cocircular_check(){\n-00611\n-// check if many configurations have the same centre.\n-00612\n-// if this is the case, branch on the algorithm for this\n-00613\n-// special case.\n-00614\n-// Note that those situation, being considered separately in\n-00615\n-// test_cone_multiple, must only be considered here if all\n-00616\n-// angles are on the same side (this avoid multiple counting)\n-00617\n-if (centre->cocircular.empty()) return false;\n-00618\n-00619\n-// first get cone into status required at end...\n-00620\n-00621\n-if ((centre->side) && (cone.ref.not_empty())){\n-// update cone\n-00622\n-00623\n-cone -= (*child);\n-00624\n-// update info on particles inside\n-00625\n-00626\n-centre->is_inside->cone = false;\n-00627\n-// update stability check quantities\n-00628\n-00629\n-dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz); //child->perp2();\n-00630\n-}\n-00631\n-00632\n-00633\n-// now establish the list of unique children in the list\n-00634\n-// first make sure parent and child are in!\n-00635\n-00636\n-list removed_from_cone;\n-00637\n-list put_in_border;\n-00638\n-list border_list;\n-00639\n-00640\n-CSphmomentum cone_removal;\n-00641\n-CSphmomentum border = *parent;\n-00642\n-border_list.push_back(parent);\n-00643\n+00151\n+00152 // finally, a bunch of functions to access to\n+00153 // basic information (package name, version)\n+00154 //--------------------------------------------00155\n+00163 std::string siscone_package_name();\n+00164\n+00170 std::string siscone_version();\n+00171\n+00172 }\n+00173 #endif\n+\n+5.41 siscone_error.cpp\n+00001\n+//\n+00002 // File: siscone_error.cpp\n+00003 // Description: source file for SISCone error messages (Csiscone_error)\n+//\n+00004 // This file is part of the SISCone project.\n+//\n+00005 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00006 //\n+//\n+00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+//\n+00008 //\n+//\n+00009 // This program is free software; you can redistribute it and/or modify\n+//\n+00010 // it under the terms of the GNU General Public License as published by\n+//\n+00011 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00012 // (at your option) any later version.\n+//\n+00013 //\n+//\n+00014 // This program is distributed in the hope that it will be useful,\n+//\n+00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00017 // GNU General Public License for more details.\n+//\n+00018 //\n+//\n+00019 // You should have received a copy of the GNU General Public License\n+//\n+00020 // along with this program; if not, write to the Free Software\n+//\n+00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00022 //\n+//\n+00023 // $Revision:: 123\n+$//\n+00024 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)\n+$//\n+00026\n+00027 #include \"siscone_error.h\"\n+00028\n+00029 namespace siscone{\n+00030\n+00031 bool Csiscone_error::m_print_errors = true;\n+00032\n+00033 }\n+\n+5.42 siscone_error.h\n+00001 // -*- C++ -*00003 // File: siscone_error.h\n+//\n+00004 // Description: header file for SISCone error messages (Csiscone_error)\n+//\n+00005 // This file is part of the SISCone project.\n+//\n+00006 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00007 //\n+//\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+//\n+00009 //\n+//\n+00010 // This program is free software; you can redistribute it and/or modify\n+//\n+00011 // it under the terms of the GNU General Public License as published by\n+//\n+00012 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00013 // (at your option) any later version.\n+//\n+00014 //\n+//\n+00015 // This program is distributed in the hope that it will be useful,\n+//\n+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00018 // GNU General Public License for more details.\n+//\n+00019 //\n+//\n+00020 // You should have received a copy of the GNU General Public License\n+//\n+00021 // along with this program; if not, write to the Free Software\n+//\n+00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00023 //\n+//\n+00024 // $Revision:: 327\n+$//\n+00025 // $Date:: 2011-11-25 15:19:39 +0100 (Fri, 25 Nov 2011)\n+$//\n+00027\n+00028 #ifndef __SISCONE_ERROR_H__\n+00029 #define __SISCONE_ERROR_H__\n+00030\n+00031 #include\n+00032 #include\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n 261\n \n \f262\n \n-00644\n-00645\n-00646\n-00647\n-00648\n-00649\n-00650\n-00651\n-00652\n-00653\n-00654\n-00655\n-00656\n-00657\n-00658\n-00659\n-00660\n-00661\n-00662\n-00663\n-00664\n-00665\n-00666\n-00667\n-\n File Documentation\n \n-// make sure child appears in the border region\n-centre->cocircular.push_back(centre);\n-// now establish the full contents of the cone minus the cocircular\n-// region and of the cocircular region itself\n-for(list::iterator it = centre->cocircular.begin();\n-it != centre->cocircular.end(); it++) {\n-if ((*it)->is_inside->cone) {\n-cone_removal\n-+= *((*it)->v);\n-(*it)->is_inside->cone = false;\n-removed_from_cone.push_back((*it)->is_inside);\n-}\n+00033\n+00034 namespace siscone{\n+00035\n+00038 class Csiscone_error {\n+00039 public:\n+00041\n+Csiscone_error() {;};\n+00042\n+00045\n+Csiscone_error(const std::string & message_in) {\n+00046\n+m_message = message_in;\n+if (m_print_errors) std::cerr \u00ab \"siscone::Csiscone_error: \"\u00ab message_in \u00ab std::endl;\n+00047\n+00048\n+};\n+00049\n+00051\n+std::string message() const {return m_message;};\n+00052\n+static void setm_print_errors(bool print_errors) {\n+00055\n+00056\n+m_print_errors = print_errors;};\n+00057\n+00058 private:\n+00059\n+std::string m_message;\n+static bool m_print_errors;\n+00060\n+00061 };\n+00062\n+00063 }\n+00064 #endif\n \n-// if a point appears twice (i.e. with + and - sign) in the list of\n-// points on the border, we take care not to include it twice.\n-// Note that this situation may appear when a point is at a distance\n-// close to 2R from the parent\n-if (!(*it)->is_inside->cocirc) {\n-border += *((*it)->v);\n-(*it)->is_inside->cocirc = true;\n-put_in_border.push_back((*it)->is_inside);\n-border_list.push_back((*it)->v);\n-//cout \u00ab \" adding particle \" \u00ab (*it)->v->_theta \u00ab \", \" \u00ab (*it)->v->_phi \u00ab \" to the border list\"\n-\u00ab endl;\n-00668\n-}\n-00669\n-}\n-00670\n-00671\n-00672\n-// figure out whether this pairing has been observed before\n-00673\n-CSphmomentum borderless_cone = cone;\n-00674\n-borderless_cone -= cone_removal;\n-bool consider = true;\n-00675\n-00676\n-for (unsigned int i=0;i(borderless_cone.ref,\n-00686\n-border.ref));\n-00687\n-// first figure out whether our cone momentum is good\n-00688\n-00689\n-double local_dpt = fabs(cone_removal.px) + fabs(cone_removal.py);\n-00690\n-double total_dpt = dpt + local_dpt;\n-00691\n-00692\n-recompute_cone_contents_if_needed(borderless_cone, total_dpt);\n-00693\n-if (total_dpt == 0) {\n-// a recomputation has taken place -- so take advantage of this\n-00694\n-00695\n-// and update the member cone momentum\n-00696\n-cone = borderless_cone + cone_removal;\n-00697\n-dpt = local_dpt;\n-00698\n-}\n-00699\n-00700\n-test_cone_cocircular(borderless_cone, border_list);\n-00701\n-}\n-00702\n-00703\n-00704\n-// relabel things that were in the cone but got removed\n-00705\n-for(list::iterator is_in = removed_from_cone.begin();\n-00706\n-is_in != removed_from_cone.end(); is_in++) {\n-00707\n-(*is_in)->cone = true;\n-00708\n-}\n-00709\n-00710\n-// relabel things that got put into the border\n-00711\n-for(list::iterator is_in = put_in_border.begin();\n-00712\n-is_in != put_in_border.end(); is_in++) {\n-00713\n-(*is_in)->cocirc = false;\n-00714\n-}\n-00715\n-00716\n-// we\u2019re done with everything -- return true to signal to user that we\u2019ve\n-00717\n-// been through the co-circularity rigmarole\n-00718\n-return true;\n-00719 }\n-00720\n-00721\n+5.43 geom_2d.h\n+00001 // -*- C++ -*00003 // File: geom_2d.h\n //\n-00723 // RECOMPUTATION OF CONE CONTENTS\n-00724 // - compute_cone_contents()\n+00004 // Description: header file for two-dimensional geometry tools\n //\n-00725 // - recompute_cone_contents()\n+00005 // This file is part of the SISCone project.\n //\n-00726 // - recompute_cone_contents_if_needed()\n+00006 // For more details, see http://projects.hepforge.org/siscone\n //\n-00728\n-00737 void CSphstable_cones::compute_cone_contents() {\n-00738\n-siscone::circulator::iterator >\n-00739\n-start(vicinity.begin()+first_cone, vicinity.begin(), vicinity.end());\n+00007 //\n+//\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+//\n+00009 //\n+//\n+00010 // This program is free software; you can redistribute it and/or modify\n+//\n+00011 // it under the terms of the GNU General Public License as published by\n+//\n+00012 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00013 // (at your option) any later version.\n+//\n+00014 //\n+//\n+00015 // This program is distributed in the hope that it will be useful,\n+//\n+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00018 // GNU General Public License for more details.\n+//\n+00019 //\n+//\n+00020 // You should have received a copy of the GNU General Public License\n+//\n+00021 // along with this program; if not, write to the Free Software\n+//\n+00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00023 //\n+//\n+00024 // $Revision:: 422\n+$//\n+00025 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020)\n+$//\n+00027\n+00028 #ifndef __GEOM_2D_H__\n+00029 #define __GEOM_2D_H__\n+00030\n+00031 #include \n+00032 #include \n+00033 #include \"defines.h\"\n+00034\n+00035 #ifndef M_PI\n+00036 #define M_PI 3.141592653589793238462643383279502884197\n+00037 #endif\n+00038\n+00039 namespace siscone{\n+00040\n+00043 inline double phi_in_range(double phi) {\n+if\n+(phi <= -M_PI) phi += twopi;\n+00044\n+00045\n+else if (phi >\n+M_PI) phi -= twopi;\n+00046\n+return phi;\n+00047 }\n+00048\n+00052 inline double dphi(double phi1, double phi2) {\n+00053\n+return phi_in_range(phi1-phi2);\n+00054 }\n+00055\n+00056\n+00060 inline double abs_dphi(double phi1, double phi2) {\n+00061\n+double delta = fabs(phi1-phi2);\n+return delta > M_PI ? twopi-delta : delta;\n+00062\n+00063 }\n+00064\n+00066 inline double pow2(double x) {return x*x;}\n+00067\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n-\f5.44 protocones.cpp\n+\f5.44 geom_2d.h\n \n-00740\n-00741\n-siscone::circulator::iterator > here(start);\n-00742\n-// note that in the following algorithm, the cone contents never includes\n-00743\n-00744\n-// the child. Indeed, if it has positive sign, then it will be set as\n-00745\n-// outside at the last step in the loop. If it has negative sign, then the\n-00746\n-// loop will at some point go to the corresponding situation with positive\n-00747\n-// sign and set the inclusion status to 0.\n-00748\n-00749\n-do {\n-00750\n-// as we leave this position a particle enters if its side is\n-00751\n-// negative (i.e. the centre is the one at -ve angle wrt to the\n-00752\n-// parent-child line\n-00753\n-if (!(*here())->side) ((*here())->is_inside->cone) = 1;\n-00754\n-// move on to the next position\n-00755\n-00756\n-++here;\n-00757\n-// as we arrive at this position a particle leaves if its side is positive\n-00758\n-00759\n-if ((*here())->side) ((*here())->is_inside->cone) = 0;\n-00760\n-} while (here != start);\n-00761\n-00762\n-// once we\u2019ve reached the start the \u2019is_inside\u2019 information should be\n-00763\n-// 100% complete, so we can use it to calculate the cone contents\n-00764\n-// and then exit\n-00765\n-recompute_cone_contents();\n-00766\n-return;\n-00767\n-00768 }\n-00769\n-00770\n-00771 /*\n-00772 * compute the cone momentum from particle list.\n-00773 * in this version, we use the \u2019pincluded\u2019 information\n-00774 * from the CSphvicinity class\n-00775 */\n-00776 void CSphstable_cones::recompute_cone_contents(){\n-unsigned int i;\n-00777\n-00778\n-// set momentum to 0\n-00779\n-00780\n-cone = CSphmomentum();\n-00781\n-// Important note: we can browse only the particles\n-00782\n-00783\n-// in vicinity since all particles in the cone are\n-00784\n-// withing a distance 2R w.r.t. parent hence in vicinity.\n-00785\n-// Among those, we only add the particles for which \u2019is_inside\u2019 is true !\n-00786\n-// This methos rather than a direct comparison avoids rounding errors\n-00787\n-for (i=0;iside) && (vicinity[i]->is_inside->cone))\n-00790\n-cone += *vicinity[i]->v;\n-00791\n-}\n-00792\n-// set check variables back to 0\n-00793\n-00794\n-dpt = 0.0;\n-00795 }\n-00796\n-00797\n-00798 /*\n-00799 * if we have gone beyond the acceptable threshold of change, compute\n-00800 * the cone momentum from particle list. in this version, we use the\n-00801 * \u2019pincluded\u2019 information from the CSphvicinity class, but we don\u2019t\n-00802 * change the member cone, only the locally supplied one\n-00803 */\n-00804 void CSphstable_cones::recompute_cone_contents_if_needed(CSphmomentum & this_cone,\n-double & this_dpt){\n-00805\n-00806\n-00807\n-if (this_dpt > PT_TSHOLD*(fabs(this_cone.px)+fabs(this_cone.py))) {\n-if (cone.ref.is_empty()) {\n-00808\n-00809\n-this_cone = CSphmomentum();\n-00810\n-} else {\n-00811\n-// set momentum to 0\n-00812\n-this_cone = CSphmomentum();\n-00813\n-00814\n-// Important note: we can browse only the particles\n-00815\n-// in vicinity since all particles in the this_cone are\n-00816\n-// withing a distance 2R w.r.t. parent hence in vicinity.\n-00817\n-// Among those, we only add the particles for which \u2019is_inside\u2019 is true !\n-00818\n-// This methos rather than a direct comparison avoids rounding errors\n-00819\n-for (unsigned int i=0;iside) && (vicinity[i]->is_inside->cone))\n-00822\n-this_cone += *vicinity[i]->v;\n-00823\n+263\n+\n+00068\n+00073 class Ctwovect {\n+00074 public:\n+00076\n+Ctwovect() : x(0.0), y(0.0) {}\n+00077\n+00081\n+Ctwovect(double _x, double _y) : x(_x), y(_y) {}\n+00082\n+double x, y;\n+00084\n+00085\n+inline double mod2() const {return pow2(x)+pow2(y);}\n+00087\n+00088\n+inline double modulus() const {return sqrt(mod2());}\n+00090\n+00091 };\n+00092\n+00093\n+00098 inline double dot_product(const Ctwovect & a, const Ctwovect & b) {\n+00099\n+return a.x*b.x + a.y*b.y;\n+00100 }\n+00101\n+00102\n+00107 inline double cross_product(const Ctwovect & a, const Ctwovect & b) {\n+00108\n+return a.x*b.y - a.y*b.x;\n+00109 }\n+00110\n+00111\n+00120 class Ceta_phi_range{\n+00121 public:\n+00123\n+Ceta_phi_range();\n+00124\n+00130\n+Ceta_phi_range(double c_eta, double c_phi, double R);\n+00131\n+00134\n+Ceta_phi_range& operator = (const Ceta_phi_range &r);\n+00135\n+int add_particle(const double eta, const double phi);\n+00140\n+00141\n+unsigned int eta_range;\n+00143\n+00144\n+unsigned int phi_range;\n+00146\n+00147\n+// extremal value for eta\n+00148\n+00149\n+static double eta_min;\n+00150\n+static double eta_max;\n+00151\n+00152 private:\n+inline unsigned int get_eta_cell(double eta){\n+00154\n+00155\n+return (unsigned int) (1u \u00ab ((int) (32*((eta-eta_min)/(eta_max-eta_min)))));\n+00156\n }\n-00824\n-00825\n+00157\n+00159\n+inline unsigned int get_phi_cell(double phi){\n+return (unsigned int) (1u \u00ab ((int) (32*phi/twopi+16)%32));\n+00160\n+00161\n }\n-// set check variables back to 0\n-00826\n+00162 };\n+00163\n+00168 bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2);\n+00169\n+00175 const Ceta_phi_range range_union(const Ceta_phi_range &r1, const Ceta_phi_range &r2);\n+00176\n+00177 }\n+00178\n+00179 #endif\n+\n+5.44 geom_2d.h\n+00001 // -*- C++ -*00003 // File: geom_2d.h\n+00004 // Description: header file for two-dimensional geometry tools\n+00005 // This file is part of the SISCone project.\n+00006 // WARNING: this is not the main SISCone trunk but\n+00007 //\n+an adaptation to spherical coordinates\n+00008 // For more details, see http://projects.hepforge.org/siscone\n+00009 //\n+00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n+00011 //\n+00012 // This program is free software; you can redistribute it and/or modify\n+00013 // it under the terms of the GNU General Public License as published by\n+00014 // the Free Software Foundation; either version 2 of the License, or\n+00015 // (at your option) any later version.\n+00016 //\n+00017 // This program is distributed in the hope that it will be useful,\n+00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+00020 // GNU General Public License for more details.\n+00021 //\n \n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n-263\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n \n \f264\n \n File Documentation\n \n-00827\n-this_dpt = 0.0;\n-00828\n-}\n-00829\n-00830 }\n-00831\n-00832\n-//\n-00834 // VARIOUS TOOLS\n-00835 // - circle_intersect()\n+00022 // You should have received a copy of the GNU General Public License\n //\n-00836 // - is_inside()\n+00023 // along with this program; if not, write to the Free Software\n //\n-00837 // - abs_dangle()\n+00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00025 //\n //\n-00839\n-00840\n-00841 /*\n-00842 * circle intersection.\n-00843 * computes the intersection with a circle of given centre and radius.\n-00844 * The output takes the form of a checkxor of the intersection\u2019s particles\n-00845 * - cx\n-circle centre x coordinate\n-circle centre y coordinate\n-00846 * - cy\n-00847 * return the checkxor for the intersection\n-00848 ******************************************************************/\n-00849 siscone::Creference CSphstable_cones::circle_intersect(CSph3vector &cone_centre){\n-00850\n-siscone::Creference intersection;\n-00851\n-int i;\n-00852\n-for (i=0;i\n+00034 #include \n+00035 #include \n+00036 #include \n+00037\n+00038 #ifndef M_PI\n+00039 #define M_PI 3.141592653589793238462643383279502884197\n+00040 #endif\n+00041\n+00042 namespace siscone_spherical{\n+00043\n+00052 class CSphtheta_phi_range{\n+00053 public:\n+00055\n+CSphtheta_phi_range();\n+00056\n+00062\n+CSphtheta_phi_range(double c_theta, double c_phi, double R);\n+00063\n+00066\n+CSphtheta_phi_range& operator = (const CSphtheta_phi_range &r);\n+00067\n+00072\n+int add_particle(const double theta, const double phi);\n+00073\n+unsigned int theta_range;\n+00075\n+00076\n+unsigned int phi_range;\n+00078\n+00079\n+static double theta_min;\n+00081\n+00082\n+static double theta_max;\n+00083\n+00084 private:\n+inline unsigned int get_theta_cell(double theta){\n+00086\n+00087\n+if (theta>=theta_max) return 1u\u00ab31;\n+00088\n+return (unsigned int) (1u \u00ab ((int) (32*((theta-theta_min)/(theta_max-theta_min)))));\n+00089\n }\n-00858\n-return intersection;\n-00859\n-00860 }\n-00861\n-00862 }\n+00090\n+inline unsigned int get_phi_cell(double phi){\n+00092\n+00093\n+return (unsigned int) (1u \u00ab ((int) (32*phi/twopi+16)%32));\n+00094\n+}\n+00095 };\n+00096\n+00101 bool is_range_overlap(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2);\n+00102\n+00108 const CSphtheta_phi_range range_union(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2);\n+00109\n+00110 }\n+00111\n+00112 #endif\n \n 5.45 split_merge.cpp\n 00001\n //\n 00002 // File: split_merge.cpp\n 00003 // Description: source file for splitting/merging (contains the CJet class) //\n 00004 // This file is part of the SISCone project.\n@@ -23354,14 +23345,19 @@\n 00021 // You should have received a copy of the GNU General Public License\n //\n 00022 // along with this program; if not, write to the Free Software\n //\n 00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n 00024 //\n //\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n 00025 // $Revision:: 390\n $//\n 00026 // $Date:: 2016-03-03 11:06:52 +0100 (Thu, 03 Mar 2016)\n $//\n 00028\n 00029 #include \n 00030 #include \"split_merge.h\"\n@@ -23382,19 +23378,14 @@\n 00044 * class CSphjet implementation\n *\n 00045 * real Jet information.\n *\n 00046 * This class contains information for one single jet. *\n 00047 * That is, first, its momentum carrying information\n *\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.45 split_merge.cpp\n-\n 00048 * about its centre and pT, and second, its particle\n *\n 00049 * contents\n *\n 00050 ********************************************************/\n 00051 // default ctor\n 00052 //-------------00053 CSphjet::CSphjet(){\n@@ -23415,16 +23406,16 @@\n 00062 // default dtor\n 00063 //-------------00064 CSphjet::~CSphjet(){\n 00065\n 00066 }\n 00067\n 00068 // ordering of jets in E (e.g. used in final jets ordering)\n 00069 //---------------------------------------------------------00070 bool jets_E_less(const CSphjet &j1, const CSphjet &j2){\n-return j1.v.E > j2.v.E;\n 00071\n+return j1.v.E > j2.v.E;\n 00072 }\n 00073\n 00074\n 00075 /********************************************************\n 00076 * CSphsplit_merge_ptcomparison implementation\n *\n 00077 * This deals with the ordering of the jets candidates *\n@@ -23442,16 +23433,16 @@\n 00089 //\n 00090 // NB: there is a potential issue in momentum-conserving events,\n 00091 // whereby the harder of two jets becomes ill-defined when a soft\n 00092 // particle is emitted --- this may have a knock-on effect on\n 00093 // subsequent split-merge steps in cases with sufficiently large R\n 00094 // (but we don\u2019t know what the limit is...)\n 00095 //-----------------------------------------------------------------00096 bool CSphsplit_merge_ptcomparison::operator ()(const CSphjet &jet1, const CSphjet &jet2) const{\n-double q1, q2;\n 00097\n+double q1, q2;\n 00098\n // compute the value for comparison for both jets\n 00099\n 00100\n // This depends on the choice of variable (mt is the default)\n 00101\n q1 = jet1.sm_var2;\n@@ -23469,64 +23460,64 @@\n // close in the ordering variable.\n 00109 #ifdef EPSILON_SPLITMERGE\n 00110\n if ( (fabs(q1-q2) < EPSILON_SPLITMERGE*max(q1,q2)) &&\n 00111\n (jet1.v.ref != jet2.v.ref) ) {\n 00112 #ifdef DEBUG_SPLIT_MERGE\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+265\n+\n+\f266\n+\n+File Documentation\n+\n 00113\n cout \u00ab \"Using high-precision ordering tests\" \u00ab endl;\n 00114 #endif\n 00115\n // get the momentum of the difference\n 00116\n CSphmomentum difference;\n 00117\n double E_tilde_difference;\n 00118\n get_difference(jet1,jet2,&difference,&E_tilde_difference);\n 00119\n-// use the following relation: pt1^2 - pt2^2 = (pt1+pt2)*(pt1-pt2)\n 00120\n+// use the following relation: pt1^2 - pt2^2 = (pt1+pt2)*(pt1-pt2)\n 00121\n double qdiff;\n 00122\n CSphmomentum sum = jet1.v ;\n 00123\n sum += jet2.v;\n 00124\n double E_tilde_sum = jet1.E_tilde + jet2.E_tilde;\n 00125\n // depending on the choice of ordering variable, set the result\n 00126\n 00127\n switch (split_merge_scale){\n-00128\n case SM_Etilde:\n+00128\n 00129\n qdiff = E_tilde_sum*E_tilde_difference;\n-break;\n 00130\n-00131\n+break;\n case SM_E:\n+00131\n 00132\n qdiff = sum.E*difference.E;\n break;\n 00133\n 00134\n default:\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-265\n-\n-\f266\n-\n-File Documentation\n-\n 00135\n throw siscone::Csiscone_error(\"Unsupported split-merge scale choice: \"\n 00136\n + SM_scale_name());\n 00137\n }\n 00138\n@@ -23537,28 +23528,28 @@\n 00141\n 00142\n return res;\n 00143 }\n 00144\n 00145\n 00148 std::string split_merge_scale_name(Esplit_merge_scale sms) {\n-00149\n switch(sms) {\n-case SM_E:\n+00149\n 00150\n+case SM_E:\n 00151\n return \"E (IR unsafe for pairs of identical decayed heavy particles)\";\n case SM_Etilde:\n 00152\n 00153\n return \"Etilde (sum of E.[1+sin^2(theta_{i,jet})])\";\n-00154\n default:\n-return \"[SM scale without a name]\";\n+00154\n 00155\n+return \"[SM scale without a name]\";\n 00156\n }\n 00157 }\n 00158\n 00159\n 00160 // get the difference between 2 jets\n 00161 // - j1\n@@ -23569,16 +23560,16 @@\n jet1-jet2\n 00164 // - pt_tilde\n jet1-jet2 pt_tilde\n 00165 // return true if overlapping, false if disjoint\n 00166 //----------------------------------------------00167 void CSphsplit_merge_ptcomparison::get_difference(const CSphjet &j1, const CSphjet &j2,\n 00168\n CSphmomentum *v, double *E_tilde) const {\n-int i1,i2;\n 00169\n+int i1,i2;\n 00170\n // initialise\n 00171\n 00172\n i1=i2=0;\n 00173\n *v = CSphmomentum();\n@@ -23594,51 +23585,56 @@\n 00179\n CSph3vector jet2_axis = j2.v;\n //jet2_axis /= j2.v._norm;\n 00180\n 00181\n jet2_axis /= j2.v.E;\n 00182\n-// compute overlap\n 00183\n+// compute overlap\n 00184\n // at the same time, we store union in indices\n 00185\n // note tat for Etilde, we\u2019ll add the direct energy contributino at the end\n 00186\n do{\n-00187\n if (j1.contents[i1]==j2.contents[i2]) {\n-const CSphmomentum & p = (*particles)[j1.contents[i1]];\n+00187\n 00188\n+const CSphmomentum & p = (*particles)[j1.contents[i1]];\n 00189\n (*E_tilde) +=\n p.E*((norm2_cross_product3(p,jet1_axis)-norm2_cross_product3(p,jet2_axis))/(*particles_norm2)[j1.contents[i1]]);\n 00190\n i1++;\n 00191\n i2++;\n 00192\n } else if (j1.contents[i1]j2.contents[i2]){\n-00198\n const CSphmomentum &p = (*particles)[j2.contents[i2]];\n+00198\n 00199\n (*v) -= p;\n 00200\n (*E_tilde) -= p.E*norm2_cross_product3(p,jet2_axis)/(*particles_norm2)[j2.contents[i2]];\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n 00201\n i2++;\n 00202\n } else {\n 00203\n throw siscone::Csiscone_error(\"get_non_overlap reached part it should never have seen...\");\n 00204\n@@ -23646,46 +23642,41 @@\n 00205\n } while ((i1E;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.45 split_merge.cpp\n-\n 00223 }\n 00224\n 00225\n 00226 /********************************************************\n 00227 * class CSphsplit_merge implementation\n *\n 00228 * Class used to split and merge jets.\n@@ -23744,16 +23735,16 @@\n 00267 // - protocones list of protocones (initial jet candidates)\n 00268 // - R2\n cone radius (squared)\n 00269 // - Emin\n minimal energy allowed for jets\n 00270 //------------------------------------------------------------00271 int CSphsplit_merge::init(vector & /*_particles*/, vector *protocones,\n double R2, double Emin){\n-00272\n // browse protocones\n+00272\n 00273\n return add_protocones(protocones, R2, Emin);\n 00274 }\n 00275\n 00276\n 00277 // initialisation function for particle list\n 00278 // - _particles list of particles\n@@ -23765,58 +23756,58 @@\n // compute the list of particles\n 00284\n // here, we do not need to throw away particles\n 00285\n // with infinite rapidity (colinear with the beam)\n 00286\n particles = _particles;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+267\n+\n+\f268\n+\n+File Documentation\n+\n 00287\n n = particles.size();\n 00288\n-00289\n // store the particle norm^2\n+00289\n 00290\n particles_norm2.resize(n);\n 00291\n for (int i=0;i(ptcomparison));\n 00368\n-00369\n // start off with huge number\n+00369\n 00370\n most_ambiguous_split = numeric_limits::max();\n 00371\n 00372\n jets.clear();\n 00373 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n+269\n+\n 00374\n if (merge_identical_protocones)\n 00375\n cand_refs.clear();\n 00376 #endif\n 00377\n 00378\n@@ -23941,87 +23939,80 @@\n 00382\n 00383\n 00384 // full clearance\n 00385 //---------------00386 int CSphsplit_merge::full_clear(){\n 00387\n partial_clear();\n 00388\n-00389\n // clear previously allocated memory\n+00389\n 00390\n if (indices != NULL){\n-delete[] indices;\n 00391\n+delete[] indices;\n 00392\n }\n 00393\n particles.clear();\n 00394\n-00395\n return 0;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.45 split_merge.cpp\n-\n-269\n-\n+00395\n 00396 }\n 00397\n 00398\n 00399 // build the list \u2019p_uncol_hard\u2019 from p_remain by clustering collinear particles\n 00400 // note that thins in only used for stable-cone detection\n 00401 // so the parent_index field is unnecessary\n 00402 //------------------------------------------------------------------------00403 int CSphsplit_merge::merge_collinear_and_remove_soft(){\n int i,j;\n 00404\n 00405\n vector p_sorted;\n-00406\n bool collinear;\n-double dphi;\n+00406\n 00407\n+double dphi;\n 00408\n 00409\n p_uncol_hard.clear();\n 00410\n // we first sort the particles according to their theta angle\n 00411\n 00412\n for (i=0;i *protocones, double R2, double Emin){\n int i;\n 00463\n 00464\n CSphmomentum *c;\n@@ -24085,42 +24083,35 @@\n 00466\n double tan2R;\n 00467\n CSphjet jet;\n 00468\n 00469\n if (protocones->size()==0)\n-return 1;\n 00470\n+return 1;\n 00471\n 00472\n E_min = Emin;\n-00473\n double R = sqrt(R2);\n+00473\n 00474\n tan2R = tan(R);\n 00475\n tan2R *= tan2R;\n 00476\n 00477 #ifdef DEBUG_SPLIT_MERGE\n 00478\n cout \u00ab \"particle list: \";\n-for (int i2=0;i2::iterator p_it = protocones->begin();p_it != protocones->end();p_it++){\n 00489\n // initialise variables\n 00490\n c = &(*p_it);\n 00491\n-00492\n // browse particles to create cone contents\n+00492\n 00493\n // note that jet is always initialised with default values at this level\n 00494\n jet.v = CSphmomentum();\n 00495\n jet.contents.clear();\n-for (i=0;iparent_index);\n 00500\n@@ -24166,42 +24157,42 @@\n 00507\n // we can\u2019t do that before as it requires knowledge of the jet axis\n 00508\n // which has just been computed.\n 00509\n compute_Etilde(jet);\n 00510\n-00511\n // set the momentum in protocones\n+00511\n 00512\n // (it was only known through its spatial coordinates up to now)\n 00513\n *c = jet.v;\n 00514\n c->build_thetaphi();\n 00515\n-// set the jet range\n 00516\n+// set the jet range\n 00517\n jet.range=CSphtheta_phi_range(c->_theta,c->_phi,R);\n 00518\n 00519 #ifdef DEBUG_SPLIT_MERGE\n 00520\n cout \u00ab \"adding protojet: \";\n 00521\n unsigned int phirange=jet.range.phi_range;\n 00522\n-00523\n for (unsigned int i2=0;i2<32;i2++) fprintf(stdout, \"%d\", (phirange&(1\u00abi2)) \u00bb i2 );\n+00523\n 00524\n fprintf(stdout, \"\\t\");\n-00525\n unsigned int thetarange=jet.range.theta_range;\n-for (unsigned int i2=0;i2<32;i2++) fprintf(stdout, \"%d\", (thetarange&(1\u00abi2)) \u00bb i2);\n+00525\n 00526\n+for (unsigned int i2=0;i2<32;i2++) fprintf(stdout, \"%d\", (thetarange&(1\u00abi2)) \u00bb i2);\n 00527\n fprintf(stdout, \"\\t\");\n 00528\n for (int i2=0;i2 *protocones, double R2,\n double Emin){\n 00581\n-int i;\n 00582\n+int i;\n 00583\n CSphmomentum *c;\n 00584\n CSphmomentum *v;\n-00585\n double R, tan2R;\n+00585\n 00586\n CSphjet jet, jet_candidate;\n-bool found_jet = false;\n 00587\n+bool found_jet = false;\n 00588\n if (protocones->size()==0)\n 00589\n-00590\n return 1;\n+00590\n 00591\n 00592\n E_min = Emin;\n 00593\n R = sqrt(R2);\n 00594\n tan2R = tan(R);\n@@ -24320,48 +24311,48 @@\n 00596\n // browse protocones\n 00597\n 00598\n // for each of them, build the list of particles in them\n 00599\n for (vector::iterator p_it = protocones->begin();p_it != protocones->end();p_it++){\n-// initialise variables\n 00600\n+// initialise variables\n 00601\n c = &(*p_it);\n 00602\n // browse particles to create cone contents\n 00603\n 00604\n // note that jet is always initialised with default values at this level\n 00605\n jet_candidate.v = CSphmomentum();\n 00606\n jet_candidate.contents.clear();\n-for (i=0;iparent_index);\n 00611\n jet_candidate.v+= *v;\n 00612\n v->index=0;\n 00613\n }\n 00614\n }\n 00615\n jet_candidate.n=jet_candidate.contents.size();\n 00616\n-// compute Etilde for that jet.\n 00617\n+// compute Etilde for that jet.\n 00618\n // we can\u2019t do that before as it requires knowledge of the jet axis\n 00619\n // which has just been computed.\n 00620\n compute_Etilde(jet_candidate);\n 00621\n@@ -24375,20 +24366,27 @@\n c->build_thetaphi();\n 00626\n 00627\n // set the jet range\n 00628\n jet_candidate.range=CSphtheta_phi_range(c->_theta,c->_phi,R);\n 00629\n-// check that the protojet has large enough pt\n 00630\n+// check that the protojet has large enough pt\n 00631\n if (jet_candidate.v.Eis_larger(jet_candidate, jet)\n 00647\n : ptcomparison(jet_candidate, jet))){\n 00648\n@@ -24422,21 +24420,14 @@\n 00651\n }\n 00652\n // make sure at least one of the jets has passed the selection\n 00653\n 00654\n if (!found_jet) return 1;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f272\n-\n-File Documentation\n-\n 00655\n // add the jet to the list of jets\n 00656\n 00657\n jets.push_back(jet);\n 00658\n jets[jets.size()-1].v.build_thetaphi();\n@@ -24444,44 +24435,44 @@\n jets[jets.size()-1].v.build_norm();\n 00660\n 00661 #ifdef DEBUG_SPLIT_MERGE\n 00662\n cout \u00ab \"PR-Jet \" \u00ab jets.size() \u00ab \" [size \" \u00ab jet.contents.size() \u00ab \"]:\";\n 00663 #endif\n 00664\n-00665\n // update the list of what particles are left\n+00665\n 00666\n int p_remain_index = 0;\n-00667\n int contents_index = 0;\n-//sort(next_jet.contents.begin(),next_jet.contents.end());\n+00667\n 00668\n+//sort(next_jet.contents.begin(),next_jet.contents.end());\n 00669\n for (int index=0;indexsize()==0)\n+00722\n return 0;\n 00723\n 00724\n-if (overlap_tshold>=1.0 || overlap_tshold <= 0) {\n 00725\n+if (overlap_tshold>=1.0 || overlap_tshold <= 0) {\n 00726\n ostringstream message;\n 00727\n message \u00ab \"Illegal value for overlap_tshold, f = \" \u00ab overlap_tshold;\n 00728\n message \u00ab \" (legal values are 0size()>0){\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.45 split_merge.cpp\n-\n 00742\n // browse for the first jet\n 00743\n j1 = candidates->begin();\n 00744\n // if hardest jet does not pass threshold then nothing else will\n 00745\n@@ -24602,16 +24593,16 @@\n 00751\n j2 = j1;\n 00752\n j2++;\n int j2_relindex = 1; // used only in ifdef, but costs little so keep it outside\n 00753\n 00754\n-while (j2 != candidates->end()){\n 00755\n+while (j2 != candidates->end()){\n 00756 #ifdef DEBUG_SPLIT_MERGE\n 00757\n if (j2_relindex==1) show();\n 00758\n cout \u00ab \"check overlap between cdt 1 and cdt \" \u00ab j2_relindex+1 \u00ab \" with overlap \" \u00ab endl;\n 00759 #endif\n 00760\n@@ -24679,30 +24670,39 @@\n 00795\n j2_relindex++;\n 00796\n if (j2 != candidates->end()) j2++;\n 00797\n } // end of loop on the second jet\n 00798\n-00799\n if (j1 != candidates->end()) {\n-// all \"second jet\" passed without overlapping\n+00799\n 00800\n+// all \"second jet\" passed without overlapping\n 00801\n // (otherwise we won\u2019t leave the j2 loop)\n 00802\n // => store jet 1 as real jet\n 00803\n jets.push_back(*j1);\n 00804\n jets[jets.size()-1].v.build_thetaphi();\n 00805\n jets[jets.size()-1].v.build_norm();\n 00806\n // a bug where the contents has non-zero size has been cropping\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+273\n+\n+\f274\n+\n+File Documentation\n+\n 00807\n // up in many contexts -- so catch it!\n 00808\n assert(j1->contents.size() > 0);\n 00809\n jets[jets.size()-1].pass = particles[j1->contents[0]].index;\n 00810 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n@@ -24723,29 +24723,20 @@\n 00819\n sort(jets.begin(), jets.end(), jets_E_less);\n 00820 #ifdef DEBUG_SPLIT_MERGE\n 00821\n show();\n 00822 #endif\n 00823\n-return jets.size();\n 00824\n+return jets.size();\n 00825 }\n 00826\n 00827\n 00828\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-273\n-\n-\f274\n-\n-File Documentation\n-\n 00829 // save the event on disk\n 00830 // - flux\n stream used to save jet contents\n 00831 //-------------------------------------------00832 int CSphsplit_merge::save_contents(FILE *flux){\n 00833\n jet_iterator it_j;\n 00834\n@@ -24753,31 +24744,31 @@\n 00835\n int i1, i2;\n 00836\n 00837\n fprintf(flux, \"# %d jets found\\n\", (int) jets.size());\n 00838\n fprintf(flux, \"# columns are: px, py, pz, E and number of particles for each jet\\n\");\n-00839\n for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){\n+00839\n 00840\n j1 = &(*it_j);\n 00841\n fprintf(flux, \"%e\\t%e\\t%e\\t%e\\t%d\\n\",\n 00842\n j1->v.px, j1->v.py, j1->v.pz, j1->v.E, j1->n);\n 00843\n }\n 00844\n 00845\n fprintf(flux, \"# jet contents\\n\");\n 00846\n fprintf(flux, \"# columns are: px, py, pz, E, particle index and jet number\\n\");\n-for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){\n 00847\n+for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){\n 00848\n j1 = &(*it_j);\n for (i2=0;i2n;i2++)\n 00849\n 00850\n fprintf(flux, \"%e\\t%e\\t%e\\t%e\\t%d\\t%d\\n\",\n 00851\n@@ -24812,89 +24803,89 @@\n 00870\n j = &(*it_j);\n 00871\n fprintf(stdout, \"jet %2d: %e\\t%e\\t%e\\t%e\\t\", i1+1,\n 00872\n j->v.px, j->v.py, j->v.pz, j->v.E);\n 00873\n-unsigned int phirange=j->range.phi_range;\n 00874\n+unsigned int phirange=j->range.phi_range;\n for (i2=0;i2<32;i2++) fprintf(stdout, \"%d\", (phirange&(1\u00abi2)) \u00bb i2 );\n 00875\n 00876\n fprintf(stdout, \"\\t\");\n-00877\n unsigned int thetarange=j->range.theta_range;\n-for (i2=0;i2<32;i2++) fprintf(stdout, \"%d\", (thetarange&(1\u00abi2)) \u00bb i2);\n+00877\n 00878\n+for (i2=0;i2<32;i2++) fprintf(stdout, \"%d\", (thetarange&(1\u00abi2)) \u00bb i2);\n 00879\n fprintf(stdout, \"\\t\");\n 00880\n-for (i2=0;i2n;i2++)\n 00881\n+for (i2=0;i2n;i2++)\n 00882\n fprintf(stdout, \"%d \", j->contents[i2]);\n 00883\n fprintf(stdout, \"\\n\");\n 00884\n }\n 00885\n-00886\n for (it_c = candidates->begin(), i1=0 ; it_c != candidates->end() ; it_c++, i1++){\n+00886\n 00887\n c = &(*it_c);\n 00888\n fprintf(stdout, \"cdt %2d: %e\\t%e\\t%e\\t%e\\t%e\\t\", i1+1,\n 00889\n c->v.px, c->v.py, c->v.pz, c->v.E, sqrt(c->sm_var2));\n 00890\n-00891\n unsigned int phirange=c->range.phi_range;\n+00891\n for (i2=0;i2<32;i2++) fprintf(stdout, \"%d\", (phirange&(1\u00abi2)) \u00bb i2 );\n 00892\n 00893\n fprintf(stdout, \"\\t\");\n-unsigned int thetarange=c->range.theta_range;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n 00894\n-00895\n+unsigned int thetarange=c->range.theta_range;\n for (i2=0;i2<32;i2++) fprintf(stdout, \"%d\", (thetarange&(1\u00abi2)) \u00bb i2);\n+00895\n 00896\n fprintf(stdout, \"\\t\");\n 00897\n for (i2=0;i2n;i2++)\n 00898\n 00899\n fprintf(stdout, \"%d \", c->contents[i2]);\n 00900\n fprintf(stdout, \"\\n\");\n 00901\n }\n 00902\n 00903\n fprintf(stdout, \"\\n\");\n-return 0;\n 00904\n+return 0;\n 00905 }\n 00906\n 00907\n 00908 // get the overlap between 2 jets\n 00909 // - j1\n first jet\n 00910 // - j2\n second jet\n 00911 // - overlap2 returned overlap^2 (determined by the choice of SM variable)\n 00912 // return true if overlapping, false if disjoint\n 00913 //--------------------------------------------------------------------00914 bool CSphsplit_merge::get_overlap(const CSphjet &j1, const CSphjet &j2, double *overlap2){\n-00915\n // check if ranges overlap\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.45 split_merge.cpp\n-\n+00915\n 00916\n if (!is_range_overlap(j1.range,j2.range))\n return false;\n 00917\n 00918\n int i1,i2;\n 00919\n@@ -24959,16 +24950,16 @@\n indices[idx_size] = j1.contents[i1];\n 00951\n i1++;\n 00952\n idx_size++;\n 00953\n }\n-while (i2\" all over the place\n 00987\n-const CSphjet & j1 = * it_j1;\n 00988\n-const CSphjet & j2 = * it_j2;\n 00989\n 00990\n-i1=i2=0;\n 00991\n-jet2.v = jet1.v = CSphmomentum();\n 00992\n 00993\n-// compute centroids\n 00994\n-// When use_E_weighted_splitting is activated, the\n 00995\n-// \"geometrical\" distance is weighted by the inverse\n 00996\n-// of the E of the protojet\n 00997\n-// This is stored in E{1,2}_weight\n 00998\n-E1_weight = (use_E_weighted_splitting) ? 1.0/j1.v.E/j1.v.E : 1.0;\n 00999\n-E2_weight = (use_E_weighted_splitting) ? 1.0/j2.v.E/j2.v.E : 1.0;\n 01000\n-// compute jet splitting\n 01001\n 01002\n-do{\n 01003\n-if (j1.contents[i1]_theta,v->_phi);\n 01011\n-} else if (j1.contents[i1]>j2.contents[i2]){\n-// particle i2 belong only to jet 2\n 01012\n 01013\n-v = &(particles[j2.contents[i2]]);\n 01014\n-jet2.contents.push_back(j2.contents[i2]);\n 01015\n-jet2.v += *v;\n 01016\n-//jet2.pt_tilde += pt[j2.contents[i2]];\n 01017\n-i2++;\n 01018\n-jet2.range.add_particle(v->_theta,v->_phi);\n 01019\n-} else { // (j1.contents[i1]==j2.contents[i2])\n 01020\n-// common particle, decide which is the closest centre\n 01021\n-v = &(particles[j1.contents[i1]]);\n 01022\n-//TODO: improve this brutal use of atan2 and sqrt !!!!\n 01023\n 01024\n 01025\n-//? what when == ?\n 01026\n-// When use_E_weighted_splitting is activated, the\n 01027\n-// \"geometrical\" distance is weighted by the inverse\n 01028\n-// of the E of the protojet\n 01029\n-double d1 = get_distance(&(j1.v), v)*E1_weight;\n 01030\n-double d2 = get_distance(&(j2.v), v)*E2_weight;\n-// do bookkeeping on most ambiguous split\n 01031\n 01032\n-if (fabs(d1-d2) < most_ambiguous_split)\n 01033\n-most_ambiguous_split = fabs(d1-d2);\n 01034\n-if (d1_theta,v->_phi);\n 01041\n-} else {\n 01042\n-// particle i2 belong only to jet 2\n 01043\n-jet2.contents.push_back(j2.contents[i2]);\n 01044\n-jet2.v += *v;\n 01045\n-//jet2.pt_tilde += pt[j2.contents[i2]];\n 01046\n-jet2.range.add_particle(v->_theta,v->_phi);\n 01047\n-}\n 01048\n 01049\n-i1++;\n 01050\n-i2++;\n 01051\n-}\n 01052\n-} while ((i1_theta,v->_phi);\n 01061\n-}\n-while (i2\" all over the place\n+const CSphjet & j1 = * it_j1;\n+const CSphjet & j2 = * it_j2;\n+i1=i2=0;\n+jet2.v = jet1.v = CSphmomentum();\n+// compute centroids\n+// When use_E_weighted_splitting is activated, the\n+// \"geometrical\" distance is weighted by the inverse\n+// of the E of the protojet\n+// This is stored in E{1,2}_weight\n+E1_weight = (use_E_weighted_splitting) ? 1.0/j1.v.E/j1.v.E : 1.0;\n+E2_weight = (use_E_weighted_splitting) ? 1.0/j2.v.E/j2.v.E : 1.0;\n+// compute jet splitting\n+do{\n+if (j1.contents[i1]_theta,v->_phi);\n+} else if (j1.contents[i1]>j2.contents[i2]){\n+// particle i2 belong only to jet 2\n+v = &(particles[j2.contents[i2]]);\n+jet2.contents.push_back(j2.contents[i2]);\n+jet2.v += *v;\n+//jet2.pt_tilde += pt[j2.contents[i2]];\n+i2++;\n+jet2.range.add_particle(v->_theta,v->_phi);\n+} else { // (j1.contents[i1]==j2.contents[i2])\n+// common particle, decide which is the closest centre\n+v = &(particles[j1.contents[i1]]);\n+//TODO: improve this brutal use of atan2 and sqrt !!!!\n+//? what when == ?\n+// When use_E_weighted_splitting is activated, the\n+// \"geometrical\" distance is weighted by the inverse\n+// of the E of the protojet\n+double d1 = get_distance(&(j1.v), v)*E1_weight;\n+double d2 = get_distance(&(j2.v), v)*E2_weight;\n+// do bookkeeping on most ambiguous split\n+if (fabs(d1-d2) < most_ambiguous_split)\n+most_ambiguous_split = fabs(d1-d2);\n+if (d1_theta,v->_phi);\n+} else {\n+// particle i2 belong only to jet 2\n+jet2.contents.push_back(j2.contents[i2]);\n+jet2.v += *v;\n+//jet2.pt_tilde += pt[j2.contents[i2]];\n+jet2.range.add_particle(v->_theta,v->_phi);\n+}\n+i1++;\n+i2++;\n+}\n+} while ((i1_theta,v->_phi);\n+}\n+while (i2_theta,v->_phi);\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n 01069\n }\n 01070\n-01071\n // finalise jets\n+01071\n 01072\n jet1.n = jet1.contents.size();\n 01073\n jet2.n = jet2.contents.size();\n 01074\n 01075\n // now the jet axis is known, we can compute Etilde\n@@ -25210,19 +25207,14 @@\n 01087\n // reinsert new ones\n 01088\n insert(jet1);\n 01089\n insert(jet2);\n 01090\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.45 split_merge.cpp\n-\n 01091\n return true;\n 01092 }\n 01093\n 01094 // merge the two given jet.\n 01095 // during this procedure, the jets j1 & j2 are replaced\n 01096 // by 1 single jets containing both of them.\n@@ -25284,60 +25276,69 @@\n 01131\n return true;\n 01132\n 01133 }\n 01134\n 01140 bool CSphsplit_merge::insert(CSphjet &jet){\n 01141\n-// eventually check that no other candidate are present with the\n 01142\n+// eventually check that no other candidate are present with the\n 01143\n // same cone contents. We recall that this automatic merging of\n 01144\n // identical protocones can lead to infrared-unsafe situations.\n 01145 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n 01146\n if ((merge_identical_protocones) && (!cand_refs.insert(jet.v.ref).second))\n-01147\n return false;\n+01147\n 01148 #endif\n 01149\n // check that the protojet has large enough energy\n 01150\n 01151\n if (jet.v.Einsert(jet);\n 01159\n return true;\n 01160\n 01161 }\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+277\n+\n+\f278\n+\n+File Documentation\n+\n 01162\n 01169 double CSphsplit_merge::get_sm_var2(CSphmomentum &v, double &E_tilde){\n 01170\n switch(ptcomparison.split_merge_scale) {\n case SM_E:\n return v.E*v.E;\n 01171\n 01172\n case SM_Etilde: return E_tilde*E_tilde;\n-default:\n 01173\n-01174\n+default:\n throw siscone::Csiscone_error(\"Unsupported split-merge scale choice: \"\n+01174\n 01175\n + ptcomparison.SM_scale_name());\n 01176\n }\n 01177\n 01178\n //return 0.0;\n@@ -25348,41 +25349,32 @@\n 01184 void CSphsplit_merge::compute_Etilde(CSphjet &jet){\n 01185\n jet.v.build_norm();\n 01186\n jet.E_tilde=0.0;\n 01187\n CSph3vector jet_axis = jet.v;\n-//if (jet.v._norm==0){\n 01188\n+//if (jet.v._norm==0){\n 01189\n // jet_axis = CSph3vector(0.0,0.0,0.0);\n 01190\n //} else {\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-277\n-\n-\f278\n-\n-File Documentation\n-\n 01191\n jet_axis/=jet.v.E;\n //}\n 01192\n 01193\n //cout \u00ab \"~~~ Axis: \" \u00ab jet.v.px \u00ab \" \" \u00ab jet.v.py \u00ab \" \" \u00ab jet.v.pz \u00ab \" \" \u00ab jet.v._norm \u00ab endl;\n 01194\n //cout \u00ab \"~~~ Axis: \" \u00ab jet_axis.px \u00ab \" \" \u00ab jet_axis.py \u00ab \" \" \u00ab jet_axis.pz \u00ab endl;\n 01195\n for (vector::iterator cont_it=jet.contents.begin(); cont_it!=jet.contents.end(); cont_it++){\n-01196\n const CSphmomentum &p = particles[*cont_it];\n+01196\n 01197\n jet.E_tilde+=p.E*(1.0+norm2_cross_product3(p,jet_axis)/particles_norm2[*cont_it]);\n 01198\n }\n 01199 }\n 01200\n 01201 }\n@@ -25458,14 +25450,19 @@\n 00045 * That is, first, its momentum carrying information\n *\n 00046 * about its centre and pT, and second, its particle\n *\n 00047 * contents\n *\n 00048 ********************************************************/\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.46 split_merge.cpp\n+\n 00049 // default ctor\n 00050 //-------------00051 Cjet::Cjet(){\n 00052\n n = 0;\n 00053\n v = Cmomentum();\n 00054\n@@ -25484,19 +25481,14 @@\n 00064 }\n 00065\n 00066 // ordering of jets in pt (e.g. used in final jets ordering)\n 00067 //----------------------------------------------------------00068 bool jets_pt_less(const Cjet &j1, const Cjet &j2){\n return j1.v.perp2() > j2.v.perp2();\n 00069\n 00070 }\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.46 split_merge.cpp\n-\n 00071\n 00072\n 00073 /********************************************************\n 00074 * Csplit_merge_ptcomparison implementation\n *\n 00075 * This deals with the ordering of the jets candidates *\n 00076 ********************************************************/\n@@ -25513,152 +25505,152 @@\n 00087 //\n 00088 // NB: there is a potential issue in momentum-conserving events,\n 00089 // whereby the harder of two jets becomes ill-defined when a soft\n 00090 // particle is emitted --- this may have a knock-on effect on\n 00091 // subsequent split-merge steps in cases with sufficiently large R\n 00092 // (but we don\u2019t know what the limit is...)\n 00093 //-----------------------------------------------------------------00094 bool Csplit_merge_ptcomparison::operator ()(const Cjet &jet1, const Cjet &jet2) const{\n-00095\n double q1, q2;\n+00095\n 00096\n-// compute the value for comparison for both jets\n 00097\n+// compute the value for comparison for both jets\n 00098\n // This depends on the choice of variable (mt is the default)\n 00099\n q1 = jet1.sm_var2;\n 00100\n q2 = jet2.sm_var2;\n 00101\n bool res = q1 > q2;\n 00102\n 00103\n-// if we enable the refined version of the comparison (see defines.h),\n 00104\n+// if we enable the refined version of the comparison (see defines.h),\n 00105\n // we compute the difference more precisely when the two jets are very\n 00106\n // close in the ordering variable.\n 00107 #ifdef EPSILON_SPLITMERGE\n 00108\n if ( (fabs(q1-q2) < EPSILON_SPLITMERGE*max(q1,q2)) &&\n 00109\n (jet1.v.ref != jet2.v.ref) ) {\n // get the momentum of the difference\n 00110\n 00111\n Cmomentum difference;\n-00112\n double pt_tilde_difference;\n+00112\n 00113\n get_difference(jet1,jet2,&difference,&pt_tilde_difference);\n 00114\n-// use the following relation: pt1^2 - pt2^2 = (pt1+pt2)*(pt1-pt2)\n 00115\n+// use the following relation: pt1^2 - pt2^2 = (pt1+pt2)*(pt1-pt2)\n 00116\n double qdiff;\n 00117\n Cmomentum sum = jet1.v ;\n 00118\n sum += jet2.v;\n-00119\n double pt_tilde_sum = jet1.pt_tilde + jet2.pt_tilde;\n+00119\n 00120\n // depending on the choice of ordering variable, set the result\n 00121\n 00122\n switch (split_merge_scale){\n 00123\n case SM_mt:\n 00124\n qdiff = sum.E*difference.E - sum.pz*difference.pz;\n break;\n 00125\n-00126\n case SM_pt:\n+00126\n 00127\n qdiff = sum.px*difference.px + sum.py*difference.py;\n break;\n 00128\n-case SM_pttilde:\n 00129\n+case SM_pttilde:\n 00130\n qdiff = pt_tilde_sum*pt_tilde_difference;\n-00131\n break;\n-case SM_Et:\n+00131\n 00132\n-00133\n+case SM_Et:\n // diff = E^2 (dpt^2 pz^2- pt^2 dpz^2)\n+00133\n 00134\n //\n + dE^2 (pt^2+pz^2) pt2^2\n 00135\n // where, unless explicitely specified the variables\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+279\n+\n+\f280\n+\n+File Documentation\n+\n 00136\n // refer to the first jet or differences jet1-jet2.\n 00137\n qdiff = jet1.v.E*jet1.v.E*\n 00138\n ((sum.px*difference.px + sum.py*difference.py)*jet1.v.pz*jet1.v.pz\n 00139\n -jet1.v.perp2()*sum.pz*difference.pz)\n 00140\n +sum.E*difference.E*(jet1.v.perp2()+jet1.v.pz*jet1.v.pz)*jet2.v.perp2();\n-break;\n 00141\n-00142\n+break;\n default:\n-throw Csiscone_error(\"Unsupported split-merge scale choice: \"\n+00142\n 00143\n+throw Csiscone_error(\"Unsupported split-merge scale choice: \"\n 00144\n + SM_scale_name());\n 00145\n }\n 00146\n res = qdiff > 0;\n 00147\n }\n 00148 #endif // EPSILON_SPLITMERGE\n 00149\n-return res;\n 00150\n+return res;\n 00151 }\n 00152\n 00153\n 00156 std::string split_merge_scale_name(Esplit_merge_scale sms) {\n 00157\n switch(sms) {\n case SM_pt:\n 00158\n 00159\n return \"pt (IR unsafe)\";\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-279\n-\n-\f280\n-\n-File Documentation\n-\n 00160\n case SM_Et:\n return \"Et (boost dep.)\";\n 00161\n 00162\n case SM_mt:\n return \"mt (IR safe except for pairs of identical decayed heavy particles)\";\n 00163\n 00164\n case SM_pttilde:\n-00165\n return \"pttilde (scalar sum of pt\u2019s)\";\n-default:\n+00165\n 00166\n+default:\n 00167\n return \"[SM scale without a name]\";\n 00168\n }\n 00169 }\n 00170\n 00171\n@@ -25682,22 +25674,22 @@\n 00183\n i1=i2=0;\n 00184\n *v = Cmomentum();\n 00185\n *pt_tilde = 0.0;\n 00186\n-// compute overlap\n 00187\n+// compute overlap\n 00188\n // at the same time, we store union in indices\n 00189\n do{\n-00190\n if (j1.contents[i1]==j2.contents[i2]) {\n+00190\n 00191\n i1++;\n 00192\n i2++;\n 00193\n } else if (j1.contents[i1](ptcomparison));\n 00240\n-// no hardest cut (col-unsafe)\n 00241\n+// no hardest cut (col-unsafe)\n 00242\n SM_var2_hardest_cut_off = -numeric_limits::max();\n 00243\n // no pt cutoff for the particles to put in p_uncol_hard\n 00244\n 00245\n stable_cone_soft_pt2_cutoff = -1.0;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.46 split_merge.cpp\n-\n-281\n-\n 00246\n // no pt-weighted splitting\n 00247\n 00248\n use_pt_weighted_splitting = false;\n 00249 }\n 00250\n@@ -25827,51 +25819,51 @@\n 00270\n 00271 // initialisation function for particle list\n 00272 // - _particles list of particles\n 00273 //------------------------------------------------------------00274 int Csplit_merge::init_particles(vector &_particles){\n 00275\n full_clear();\n 00276\n-// compute the list of particles\n 00277\n+// compute the list of particles\n 00278\n // here, we do not need to throw away particles\n 00279\n // with infinite rapidity (colinear with the beam)\n 00280\n particles = _particles;\n 00281\n n = particles.size();\n 00282\n-// build the vector of particles\u2019 pt\n 00283\n+// build the vector of particles\u2019 pt\n 00284\n pt.resize(n);\n 00285\n for (int i=0;i p_sorted;\n bool collinear;\n 00409\n-00410\n double dphi;\n+00410\n 00411\n 00412\n p_uncol_hard.clear();\n 00413\n 00414\n // we first sort the particles according to their rapidity\n 00415\n for (i=0;iM_PI) dphi = twopi-dphi;\n-if (dphi *protocones, double R2, double ptmin){\n-int i;\n 00461\n+int i;\n 00462\n Cmomentum *c;\n 00463\n Cmomentum *v;\n 00464\n double eta, phi;\n double dx, dy;\n 00465\n 00466\n double R;\n 00467\n Cjet jet;\n 00468\n-00469\n if (protocones->size()==0)\n-return 1;\n+00469\n 00470\n+return 1;\n 00471\n 00472\n pt_min2 = ptmin*ptmin;\n 00473\n R = sqrt(R2);\n 00474\n-// browse protocones\n 00475\n+// browse protocones\n 00476\n // for each of them, build the list of particles in them\n 00477\n for (vector::iterator p_it = protocones->begin();p_it != protocones->end();p_it++){\n 00478\n // initialise variables\n 00479\n c = &(*p_it);\n 00480\n-// note: cones have been tested => their (eta,phi) coordinates are computed\n 00481\n+// note: cones have been tested => their (eta,phi) coordinates are computed\n 00482\n eta = c->eta;\n 00483\n phi = c->phi;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f284\n+\n+File Documentation\n+\n 00484\n-00485\n // browse particles to create cone contents\n+00485\n 00486\n // note that jet is always initialised with default values at this level\n 00487\n jet.v = Cmomentum();\n 00488\n jet.pt_tilde=0;\n 00489\n@@ -26232,21 +26231,14 @@\n jet.pt_tilde+= pt[v->parent_index];\n 00503\n v->index=0;\n 00504\n }\n 00505\n }\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f284\n-\n-File Documentation\n-\n 00506\n jet.n=jet.contents.size();\n 00507\n // set the momentum in protocones\n 00508\n 00509\n // (it was only known through eta and phi up to now)\n@@ -26261,46 +26253,46 @@\n 00514\n 00515\n jet.range=Ceta_phi_range(eta,phi,R);\n 00516\n 00517 #ifdef DEBUG_SPLIT_MERGE\n 00518\n cout \u00ab \"adding jet: \";\n-for (int i2=0;i2 *protocones, double R2, double\n ptmin){\n 00572\n int i;\n 00573\n 00574\n Cmomentum *c;\n 00575\n Cmomentum *v;\n 00576\n double eta, phi;\n-double dx, dy;\n 00577\n-00578\n+double dx, dy;\n double R;\n+00578\n 00579\n Cjet jet, jet_candidate;\n-bool found_jet = false;\n 00580\n+bool found_jet = false;\n 00581\n if (protocones->size()==0)\n 00582\n-00583\n return 1;\n+00583\n 00584\n 00585\n pt_min2 = ptmin*ptmin;\n 00586\n R = sqrt(R2);\n 00587\n-// browse protocones\n 00588\n+// browse protocones\n 00589\n // for each of them, build the list of particles in them\n 00590\n for (vector::iterator p_it = protocones->begin();p_it != protocones->end();p_it++){\n 00591\n // initialise variables\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.46 split_merge.cpp\n-\n 00592\n c = &(*p_it);\n 00593\n // note: cones have been tested => their (eta,phi) coordinates are computed\n 00594\n 00595\n eta = c->eta;\n@@ -26409,16 +26403,16 @@\n // browse particles to create cone contents\n 00602\n jet_candidate.v = Cmomentum();\n 00603\n jet_candidate.pt_tilde=0;\n 00604\n jet_candidate.contents.clear();\n-for (i=0;ieta;\n 00611\n dy = fabs(phi - v->phi);\n if (dy>M_PI)\n 00612\n 00613\n dy -= twopi;\n-00614\n if (dx*dx+dy*dyparent_index);\n 00616\n jet_candidate.v+= *v;\n 00617\n jet_candidate.pt_tilde+= pt[v->parent_index];\n 00618\n@@ -26455,25 +26449,25 @@\n 00625\n *c = jet_candidate.v;\n 00626\n c->eta = eta; // restore exact original coords\n 00627\n c->phi = phi; // to avoid rounding error inconsistencies\n 00628\n-// set the jet range\n 00629\n+// set the jet range\n 00630\n jet_candidate.range=Ceta_phi_range(eta,phi,R);\n 00631\n // check that the protojet has large enough pt\n 00632\n 00633\n if (jet_candidate.v.perp2()is_larger(jet_candidate, jet)\n 00649\n : ptcomparison(jet_candidate, jet))){\n 00650\n@@ -26507,14 +26501,21 @@\n 00653\n }\n 00654\n // make sure at least one of the jets has passed the selection\n 00655\n 00656\n if (!found_jet) return 1;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f286\n+\n+File Documentation\n+\n 00657\n // add the jet to the list of jets\n 00658\n 00659\n jets.push_back(jet);\n 00660\n jets[jets.size()-1].v.build_etaphi();\n@@ -26524,43 +26525,34 @@\n cout \u00ab \"PR-Jet \" \u00ab jets.size() \u00ab \" [size \" \u00ab jet.contents.size() \u00ab \"]:\";\n 00664 #endif\n 00665\n 00666\n // update the list of what particles are left\n 00667\n int p_remain_index = 0;\n-00668\n int contents_index = 0;\n-//sort(next_jet.contents.begin(),next_jet.contents.end());\n+00668\n 00669\n+//sort(next_jet.contents.begin(),next_jet.contents.end());\n 00670\n for (int index=0;indexsize()>0){\n 00742\n 00743\n // browse for the first jet\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.46 split_merge.cpp\n+\n 00744\n j1 = candidates->begin();\n 00745\n-00746\n // if hardest jet does not pass threshold then nothing else will\n+00746\n 00747\n // either so one stops the split merge.\n 00748\n if (j1->sm_var2end()){\n+00755\n 00756 #ifdef DEBUG_SPLIT_MERGE\n 00757\n show();\n 00758 #endif\n 00759\n // check overlapping\n 00760\n if (get_overlap(*j1, *j2, &overlap2)){\n-// check if overlapping energy passes threshold\n 00761\n+// check if overlapping energy passes threshold\n 00762\n // Note that this depends on the ordering variable\n 00763 #ifdef DEBUG_SPLIT_MERGE\n 00764\n cout \u00ab \"overlap between cdt 1 and cdt \" \u00ab j2_relindex+1 \u00ab \" with overlap \"\n 00765\n \u00ab sqrt(overlap2/j2->sm_var2) \u00ab endl\u00abendl;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.46 split_merge.cpp\n-\n 00766 #endif\n 00767\n if (overlap2sm_var2){\n 00768\n // split jets\n 00769\n split(j1, j2);\n 00770\n-00771\n // update iterators\n+00771\n 00772\n j2 = j1 = candidates->begin();\n 00773\n j2_relindex = 0;\n 00774\n } else {\n 00775\n@@ -26735,31 +26727,31 @@\n j2 = j1 = candidates->begin();\n 00780\n j2_relindex = 0;\n 00781\n }\n 00782\n }\n-00783\n // watch out: split/merge might have caused new jets with pt <\n+00783\n 00784\n // ptmin to disappear, so the total number of jets may\n 00785\n // have changed by more than expected and j2 might already by\n 00786\n // the end of the candidates list...\n 00787\n j2_relindex++;\n-00788\n if (j2 != candidates->end()) j2++;\n+00788\n 00789\n } // end of loop on the second jet\n 00790\n-if (j1 != candidates->end()) {\n 00791\n+if (j1 != candidates->end()) {\n 00792\n // all \"second jet\" passed without overlapping\n 00793\n // (otherwise we won\u2019t leave the j2 loop)\n 00794\n // => store jet 1 as real jet\n 00795\n@@ -26793,16 +26785,16 @@\n 00811\n }\n 00812\n }\n 00813\n } while (candidates->size()>0);\n 00814\n-00815\n // sort jets by pT\n+00815\n 00816\n sort(jets.begin(), jets.end(), jets_pt_less);\n 00817 #ifdef DEBUG_SPLIT_MERGE\n 00818\n show();\n 00819 #endif\n 00820\n@@ -26816,16 +26808,25 @@\n 00827 // - flux\n stream used to save jet contents\n 00828 //-------------------------------------------00829 int Csplit_merge::save_contents(FILE *flux){\n 00830\n jet_iterator it_j;\n 00831\n Cjet *j1;\n-int i1, i2;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+287\n+\n+\f288\n+\n+File Documentation\n+\n 00832\n+int i1, i2;\n 00833\n 00834\n fprintf(flux, \"# %d jets found\\n\", (int) jets.size());\n 00835\n fprintf(flux, \"# columns are: eta, phi, pt and number of particles for each jet\\n\");\n 00836\n for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){\n@@ -26840,55 +26841,46 @@\n 00841\n }\n 00842\n 00843\n fprintf(flux, \"# jet contents\\n\");\n 00844\n fprintf(flux, \"# columns are: eta, phi, pt, particle index and jet number\\n\");\n-00845\n for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){\n+00845\n 00846\n j1 = &(*it_j);\n for (i2=0;i2n;i2++)\n 00847\n 00848\n fprintf(flux, \"%f\\t%f\\t%e\\t%d\\t%d\\n\",\n 00849\n particles[j1->contents[i2]].eta, particles[j1->contents[i2]].phi,\n 00850\n particles[j1->contents[i2]].perp(), j1->contents[i2], i1);\n 00851\n }\n 00852\n-return 0;\n 00853\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-287\n-\n-\f288\n-\n-File Documentation\n-\n+return 0;\n 00854 }\n 00855\n 00856\n 00857 // show current jets/candidate status\n 00858 //-----------------------------------00859 int Csplit_merge::show(){\n 00860\n jet_iterator it_j;\n 00861\n cjet_iterator it_c;\n 00862\n Cjet *j;\n 00863\n const Cjet *c;\n-00864\n int i1, i2;\n+00864\n 00865\n for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){\n 00866\n 00867\n j = &(*it_j);\n 00868\n fprintf(stdout, \"jet %2d: %e\\t%e\\t%e\\t%e\\t\", i1+1,\n@@ -26918,33 +26910,33 @@\n 00881\n fprintf(stdout, \"\\n\");\n 00882\n }\n 00883\n 00884\n fprintf(stdout, \"\\n\");\n-00885\n return 0;\n+00885\n 00886 }\n 00887\n 00888\n 00889 // get the overlap between 2 jets\n 00890 // - j1\n first jet\n 00891 // - j2\n second jet\n 00892 // - overlap2 returned overlap^2 (determined by the choice of SM variable)\n 00893 // return true if overlapping, false if disjoint\n 00894 //--------------------------------------------------------------------00895 bool Csplit_merge::get_overlap(const Cjet &j1, const Cjet &j2, double *overlap2){\n-00896\n // check if ranges overlap\n+00896\n 00897\n if (!is_range_overlap(j1.range,j2.range))\n-return false;\n 00898\n+return false;\n 00899\n int i1,i2;\n 00900\n 00901\n bool is_overlap;\n 00902\n // initialise\n@@ -26954,34 +26946,39 @@\n 00905\n is_overlap = false;\n 00906\n Cmomentum v;\n double pt_tilde=0.0;\n 00907\n 00908\n-00909\n // compute overlap\n+00909\n 00910\n // at the same time, we store union in indices\n 00911\n do{\n-if (j1.contents[i1]j2.contents[i2]){\n 00916\n indices[idx_size] = j2.contents[i2];\n 00917\n i2++;\n 00918\n } else { // (j1.contents[i1]==j2.contents[i2])\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.46 split_merge.cpp\n+\n 00919\n v += particles[j1.contents[i1]];\n 00920\n pt_tilde += pt[j1.contents[i1]];\n 00921\n indices[idx_size] = j1.contents[i1];\n 00922\n@@ -26993,22 +26990,22 @@\n 00925\n }\n 00926\n idx_size++;\n 00927\n } while ((i1\" all over the place\n 00970\n+// shorthand to avoid having \"->\" all over the place\n 00971\n const Cjet & j1 = * it_j1;\n-const Cjet & j2 = * it_j2;\n 00972\n+const Cjet & j2 = * it_j2;\n 00973\n 00974\n i1=i2=0;\n 00975\n jet2.v = jet1.v = Cmomentum();\n 00976\n jet2.pt_tilde = jet1.pt_tilde = 0.0;\n 00977\n-00978\n // compute centroids\n+00978\n 00979\n // When use_pt_weighted_splitting is activated, the\n 00980\n // \"geometrical\" distance is weighted by the inverse\n 00981\n // of the pt of the protojet\n 00982\n@@ -27116,34 +27108,43 @@\n 00995\n jet1.v = jet2.v = Cmomentum();\n 00996\n // compute jet splitting\n 00997\n 00998\n do{\n-00999\n if (j1.contents[i1]eta,v->phi);\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+289\n+\n+\f290\n+\n+File Documentation\n+\n 01007\n } else if (j1.contents[i1]>j2.contents[i2]){\n-01008\n // particle i2 belong only to jet 2\n+01008\n 01009\n v = &(particles[j2.contents[i2]]);\n 01010\n jet2.contents.push_back(j2.contents[i2]);\n 01011\n jet2.v += *v;\n 01012\n@@ -27172,25 +27173,16 @@\n 01024\n 01025\n // distance w.r.t. centroid 2\n 01026\n dx2 = eta2 - v->eta;\n 01027\n dy2 = fabs(phi2 - v->phi);\n-01028\n if (dy2>M_PI)\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-289\n-\n-\f290\n-\n-File Documentation\n-\n+01028\n 01029\n dy2 -= twopi;\n 01030\n //? what when == ?\n 01031\n 01032\n // When use_pt_weighted_splitting is activated, the\n@@ -27205,18 +27197,18 @@\n // do bookkeeping on most ambiguous split\n 01037\n 01038\n if (fabs(d1sq-d2sq) < most_ambiguous_split)\n 01039\n most_ambiguous_split = fabs(d1sq-d2sq);\n 01040\n-01041\n if (d1sqeta,v->phi);\n 01067\n }\n-while (i2eta,v->phi);\n 01075\n }\n 01076\n-// finalise jets\n 01077\n+// finalise jets\n 01078\n jet1.n = jet1.contents.size();\n 01079\n jet2.n = jet2.contents.size();\n 01080\n-//jet1.range = j1.range;\n 01081\n+//jet1.range = j1.range;\n 01082\n //jet2.range = j2.range;\n 01083\n-01084\n // remove previous jets\n+01084\n 01085 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n 01086\n cand_refs.erase(j1.v.ref);\n 01087\n cand_refs.erase(j2.v.ref);\n 01088 #endif\n 01089\n candidates->erase(it_j1);\n 01090\n candidates->erase(it_j2);\n 01091\n-// reinsert new ones\n 01092\n+// reinsert new ones\n 01093\n insert(jet1);\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.46 split_merge.cpp\n+\n 01094\n insert(jet2);\n 01095\n-01096\n return true;\n+01096\n 01097 }\n 01098\n 01099 // merge the two given jet.\n 01100 // during this procedure, the jets j1 & j2 are replaced\n 01101 // by 1 single jets containing both of them.\n 01102 // - it_j1 iterator of the first jet in \u2019candidates\u2019\n 01103 // - it_j2 iterator of the second jet in \u2019candidates\u2019\n@@ -27336,31 +27333,24 @@\n jet.contents.push_back(indices[i]);\n 01114\n jet.v += particles[indices[i]];\n 01115\n jet.pt_tilde += pt[indices[i]];\n 01116\n }\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.47 split_merge.h\n-\n-291\n-\n 01117\n jet.n = jet.contents.size();\n 01118\n // deal with ranges\n 01119\n 01120\n jet.range = range_union(it_j1->range, it_j2->range);\n 01121\n-01122\n // remove old candidates\n+01122\n 01123 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n 01124\n if (merge_identical_protocones){\n 01125\n cand_refs.erase(it_j1->v.ref);\n 01126\n cand_refs.erase(it_j2->v.ref);\n@@ -27368,16 +27358,16 @@\n }\n 01128 #endif\n 01129\n candidates->erase(it_j1);\n 01130\n candidates->erase(it_j2);\n 01131\n-// reinsert new candidate\n 01132\n+// reinsert new candidate\n 01133\n insert(jet);\n 01134\n return true;\n 01135\n 01136 }\n 01137\n@@ -27392,114 +27382,112 @@\n 01148 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n 01149\n if ((merge_identical_protocones) && (!cand_refs.insert(jet.v.ref).second))\n 01150\n return false;\n 01151 #endif\n 01152\n-01153\n // check that the protojet has large enough pt\n+01153\n 01154\n if (jet.v.perp2()insert(jet);\n 01162\n-01163\n return true;\n+01163\n 01164 }\n 01165\n 01172 double Csplit_merge::get_sm_var2(Cmomentum &v, double &pt_tilde){\n 01173\n switch(ptcomparison.split_merge_scale) {\n case SM_pt:\n return v.perp2();\n 01174\n 01175\n case SM_mt:\n return v.perpmass2();\n-01176\n case SM_pttilde: return pt_tilde*pt_tilde;\n+01176\n+01177\n case SM_Et:\n return v.Et2();\n-01177\n-01178\n default:\n-throw Csiscone_error(\"Unsupported split-merge scale choice: \"\n+01178\n 01179\n+throw Csiscone_error(\"Unsupported split-merge scale choice: \"\n 01180\n + ptcomparison.SM_scale_name());\n 01181\n }\n 01182\n-01183\n //return 0.0;\n+01183\n 01184 }\n 01185\n 01186 }\n \n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+291\n+\n+\f292\n+\n+File Documentation\n+\n 5.47 split_merge.h\n 00001 // -*- C++ -*00003 // File: split_merge.h\n-00004 // Description: header file for splitting/merging (contains the CJet class)\n+//\n+00004 // Description: header file for splitting/merging (contains the CJet class) //\n 00005 // This file is part of the SISCone project.\n+//\n 00006 // WARNING: this is not the main SISCone trunk but\n+//\n 00007 //\n an adaptation to spherical coordinates\n+//\n 00008 // For more details, see http://projects.hepforge.org/siscone\n+//\n 00009 //\n+//\n 00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n 00011 //\n-00012 // This program is free software; you can redistribute it and/or modify\n-00013 // it under the terms of the GNU General Public License as published by\n-00014 // the Free Software Foundation; either version 2 of the License, or\n-00015 // (at your option) any later version.\n-00016 //\n-00017 // This program is distributed in the hope that it will be useful,\n-00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-00020 // GNU General Public License for more details.\n-00021 //\n-00022 // You should have received a copy of the GNU General Public License\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n-//\n //\n+00012 // This program is free software; you can redistribute it and/or modify\n //\n+00013 // it under the terms of the GNU General Public License as published by\n //\n+00014 // the Free Software Foundation; either version 2 of the License, or\n //\n+00015 // (at your option) any later version.\n //\n+00016 //\n //\n+00017 // This program is distributed in the hope that it will be useful,\n //\n+00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n //\n+00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n //\n+00020 // GNU General Public License for more details.\n //\n+00021 //\n //\n+00022 // You should have received a copy of the GNU General Public License\n //\n-\n-\f292\n-\n-File Documentation\n-\n 00023 // along with this program; if not, write to the Free Software\n //\n 00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n 00025 //\n //\n 00026 // $Revision:: 404\n $//\n@@ -27529,29 +27517,29 @@\n CSphjet();\n 00060\n 00062\n ~CSphjet();\n 00063\n 00064\n CSphmomentum v;\n-double E_tilde;\n 00065\n+double E_tilde;\n 00066\n int n;\n 00067\n std::vector contents;\n 00068\n double sm_var2;\n 00080\n 00081\n 00083\n CSphtheta_phi_range range;\n 00084\n-int pass;\n 00089\n+int pass;\n 00090 };\n 00091\n 00094\n 00096 bool jets_E_less(const CSphjet &j1, const CSphjet &j2);\n 00097\n 00098\n 00106 enum Esplit_merge_scale {\n@@ -27576,16 +27564,25 @@\n 00127\n 00128\n 00129\n std::vector * particles;\n 00130\n std::vector * particles_norm2;\n 00131\n-00133\n bool operator()(const CSphjet &jet1, const CSphjet &jet2) const;\n+00133\n+\n+//\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.47 split_merge.h\n+\n+293\n+\n 00134\n void get_difference(const CSphjet &j1, const CSphjet &j2, CSphmomentum *v, double *E_tilde) const;\n 00146\n 00147\n 00158\n Esplit_merge_scale split_merge_scale;\n 00159 };\n@@ -27606,185 +27603,175 @@\n 00179\n 00181\n ~CSphsplit_merge();\n 00182\n 00183\n 00185\n // initialisation functions //\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.47 split_merge.h\n-\n 00187\n 00196\n+int init(std::vector &_particles, std::vector *protocones, double R2,\n+double Emin=0.0);\n 00197\n+int init_particles(std::vector &_particles);\n 00203\n 00204\n 00208\n+int init_pleft();\n 00209\n+inline int set_E_weighted_splitting(bool _use_E_weighted_splitting){\n 00221\n 00222\n+use_E_weighted_splitting = _use_E_weighted_splitting;\n+return 0;\n 00223\n 00224\n+}\n 00225\n 00227\n+// cleaning functions //\n 00229\n 00231\n+int partial_clear();\n 00232\n+int full_clear();\n 00234\n 00235\n+// user-defined stable-cone ordering //\n 00237\n 00239\n+class Cuser_scale_base{\n 00245\n 00246\n+public:\n+virtual ~Cuser_scale_base(){}\n 00248\n 00249\n 00254\n+virtual double operator()(const CSphjet & jet) const = 0;\n 00255\n+virtual bool is_larger(const CSphjet & a, const CSphjet & b) const{\n 00266\n+return (a.sm_var2 > b.sm_var2);\n 00267\n 00268\n+}\n 00269\n+};\n 00270\n 00275\n+void set_user_scale(const Cuser_scale_base * user_scale_in){\n 00276\n+_user_scale = user_scale_in;\n 00277\n+}\n 00278\n+const Cuser_scale_base * user_scale() const { return _user_scale; }\n 00280\n 00281\n 00282\n 00284\n+// main parts of the algorithm //\n 00286\n 00296\n+int merge_collinear_and_remove_soft();\n 00297\n+int add_protocones(std::vector *protocones, double R2, double Emin=0.0);\n 00305\n 00306\n+int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double\n 00317\n+Emin=0.0);\n 00318\n+int perform(double overlap_tshold, double Emin=0.0);\n 00328\n 00329\n 00330\n 00332\n+// save and debug functions //\n 00334\n 00337\n+int save_contents(FILE *flux);\n 00338\n+int show();\n 00340\n 00341\n+// particle information\n 00342\n 00343\n+int n;\n 00344\n+std::vector particles;\n 00345\n+std::vector particles_norm2;\n+int n_left;\n 00346\n 00347\n+std::vector p_remain;\n 00348\n+std::vector p_uncol_hard;\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f294\n+\n+File Documentation\n+\n 00349\n+int n_pass;\n 00350\n+double most_ambiguous_split;\n 00354\n 00355\n+// jets information\n 00356\n 00357\n+std::vector jets;\n 00358\n+// working entries\n 00359\n 00360\n+int *indices;\n+int idx_size;\n 00361\n 00362\n+bool merge_identical_protocones;\n 00371\n 00372\n 00374\n+CSphsplit_merge_ptcomparison ptcomparison;\n 00375\n+double SM_var2_hardest_cut_off;\n 00382\n 00383\n 00391\n+double stable_cone_soft_E2_cutoff;\n 00392\n-00393\n+00393 private:\n+bool get_overlap(const CSphjet &j1, const CSphjet &j2, double *v);\n 00401\n 00402\n 00403\n-\n-293\n-\n-int init(std::vector &_particles, std::vector *protocones, double R2,\n-double Emin=0.0);\n-int init_particles(std::vector &_particles);\n-int init_pleft();\n-inline int set_E_weighted_splitting(bool _use_E_weighted_splitting){\n-use_E_weighted_splitting = _use_E_weighted_splitting;\n-return 0;\n-}\n-// cleaning functions //\n-int partial_clear();\n-int full_clear();\n-// user-defined stable-cone ordering //\n-class Cuser_scale_base{\n-public:\n-virtual ~Cuser_scale_base(){}\n-virtual double operator()(const CSphjet & jet) const = 0;\n-virtual bool is_larger(const CSphjet & a, const CSphjet & b) const{\n-return (a.sm_var2 > b.sm_var2);\n-}\n-};\n-void set_user_scale(const Cuser_scale_base * user_scale_in){\n-_user_scale = user_scale_in;\n-}\n-const Cuser_scale_base * user_scale() const { return _user_scale; }\n-// main parts of the algorithm //\n-int merge_collinear_and_remove_soft();\n-int add_protocones(std::vector *protocones, double R2, double Emin=0.0);\n-int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double\n-Emin=0.0);\n-int perform(double overlap_tshold, double Emin=0.0);\n-\n-// save and debug functions //\n-int save_contents(FILE *flux);\n-int show();\n-// particle information\n-int n;\n-std::vector particles;\n-std::vector particles_norm2;\n-int n_left;\n-std::vector p_remain;\n-std::vector p_uncol_hard;\n-int n_pass;\n-double most_ambiguous_split;\n-// jets information\n-std::vector jets;\n-// working entries\n-int *indices;\n-int idx_size;\n-bool merge_identical_protocones;\n-CSphsplit_merge_ptcomparison ptcomparison;\n-double SM_var2_hardest_cut_off;\n-double stable_cone_soft_E2_cutoff;\n-private:\n-bool get_overlap(const CSphjet &j1, const CSphjet &j2, double *v);\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f294\n-\n-File Documentation\n-\n-00415\n bool split(cjet_iterator &it_j1, cjet_iterator &it_j2);\n+00415\n 00416\n bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2);\n 00425\n 00426\n bool insert(CSphjet &jet);\n 00433\n 00434\n-double get_sm_var2(CSphmomentum &v, double &E_tilde);\n 00441\n+double get_sm_var2(CSphmomentum &v, double &E_tilde);\n 00442\n void compute_Etilde(CSphjet &j);\n 00444\n 00445\n-00446\n // jet information\n+00446\n 00448 #ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR\n 00449\n std::unique_ptr > candidates;\n 00450 #else\n 00451\n std::auto_ptr > candidates;\n 00452 #endif\n@@ -27851,14 +27838,21 @@\n 00023 //\n //\n 00024 // $Revision:: 405\n $//\n 00025 // $Date:: 2016-05-23 20:15:02 +0200 (Mon, 23 May 2016)\n $//\n 00027\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.48 split_merge.h\n+\n+295\n+\n 00028 #ifndef __SPLIT_MERGE_H__\n 00029 #define __SPLIT_MERGE_H__\n 00030\n 00031 #include \n 00032 #include \"defines.h\"\n 00033 #include \"geom_2d.h\"\n 00034 #include \"momentum.h\"\n@@ -27876,38 +27870,31 @@\n 00055 public:\n 00057\n Cjet();\n 00058\n 00060\n ~Cjet();\n 00061\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.48 split_merge.h\n-\n-295\n-\n 00062\n Cmomentum v;\n double pt_tilde;\n 00063\n-00064\n int n;\n+00064\n 00065\n std::vector contents;\n 00066\n 00073\n double sm_var2;\n 00074\n 00076\n Ceta_phi_range range;\n 00077\n-00082\n int pass;\n+00082\n 00083 };\n 00084\n 00086 bool jets_pt_less(const Cjet &j1, const Cjet &j2);\n 00087\n 00088\n 00096 enum Esplit_merge_scale {\n 00097\n@@ -27938,16 +27925,16 @@\n std::vector * particles;\n 00127\n std::vector * pt;\n 00128\n 00130\n bool operator()(const Cjet &jet1, const Cjet &jet2) const;\n 00131\n-void get_difference(const Cjet &j1, const Cjet &j2, Cmomentum *v, double *pt_tilde) const;\n 00143\n+void get_difference(const Cjet &j1, const Cjet &j2, Cmomentum *v, double *pt_tilde) const;\n 00144\n 00163\n Esplit_merge_scale split_merge_scale;\n 00164 };\n 00165\n 00166\n 00167 // iterator types\n@@ -27962,170 +27949,180 @@\n 00183\n Csplit_merge();\n 00184\n 00186\n ~Csplit_merge();\n 00187\n 00188\n-00190\n // initialisation functions //\n+00190\n 00192\n-00201\n int init(std::vector &_particles, std::vector *protocones, double R2, double\n+00201\n ptmin=0.0);\n 00202\n int init_particles(std::vector &_particles);\n 00208\n 00209\n-int init_pleft();\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f296\n+\n 00213\n 00214\n-inline int set_pt_weighted_splitting(bool _use_pt_weighted_splitting){\n 00226\n 00227\n-use_pt_weighted_splitting = _use_pt_weighted_splitting;\n-return 0;\n 00228\n 00229\n-}\n 00230\n 00232\n-// cleaning functions //\n 00234\n 00236\n-int partial_clear();\n 00237\n-int full_clear();\n 00239\n 00240\n-// user-defined stable-cone ordering //\n 00242\n 00244\n-class Cuser_scale_base{\n 00250\n 00251\n-public:\n 00253\n-virtual ~Cuser_scale_base(){}\n 00254\n-virtual double operator()(const Cjet & jet) const = 0;\n 00259\n 00260\n-virtual bool is_larger(const Cjet & a, const Cjet & b) const{\n 00271\n 00272\n-return (a.sm_var2 > b.sm_var2);\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f296\n-\n-File Documentation\n-\n 00273\n-}\n 00274\n-};\n 00275\n-void set_user_scale(const Cuser_scale_base * user_scale_in){\n 00280\n 00281\n-_user_scale = user_scale_in;\n 00282\n-}\n 00283\n 00285\n-const Cuser_scale_base * user_scale() const { return _user_scale; }\n 00286\n 00287\n 00289\n-// main parts of the algorithm //\n 00291\n 00299\n-int merge_collinear_and_remove_soft();\n 00300\n-int add_protocones(std::vector *protocones, double R2, double ptmin=0.0);\n 00308\n 00309\n-int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double ptmin=0.0);\n 00320\n 00321\n-int perform(double overlap_tshold, double ptmin=0.0);\n 00331\n 00332\n 00333\n 00335\n-// save and debug functions //\n 00337\n-int save_contents(FILE *flux);\n 00340\n 00341\n-int show();\n 00343\n 00344\n-// particle information\n 00345\n 00346\n-int n;\n 00347\n-std::vector particles;\n 00348\n-std::vector pt;\n-int n_left;\n 00349\n 00350\n-std::vector p_remain;\n 00351\n-std::vector p_uncol_hard;\n-int n_pass;\n 00352\n 00353\n 00357\n-double most_ambiguous_split;\n 00358\n-// jets information\n 00359\n 00360\n-std::vector jets;\n 00361\n 00362\n-// working entries\n 00363\n-int *indices;\n-int idx_size;\n 00364\n 00365\n-bool merge_identical_protocones;\n 00374\n 00375\n 00377\n-Csplit_merge_ptcomparison ptcomparison;\n 00378\n-double SM_var2_hardest_cut_off;\n 00385\n 00386\n-double stable_cone_soft_pt2_cutoff;\n 00394\n 00395\n-00396 private:\n+00396\n 00404\n-bool get_overlap(const Cjet &j1, const Cjet &j2, double *v);\n 00405\n 00406\n-bool split(cjet_iterator &it_j1, cjet_iterator &it_j2);\n 00418\n 00419\n-bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2);\n 00428\n 00429\n-bool insert(Cjet &jet);\n 00436\n 00437\n-double get_sm_var2(Cmomentum &v, double &pt_tilde);\n 00444\n+\n+File Documentation\n+\n+int init_pleft();\n+inline int set_pt_weighted_splitting(bool _use_pt_weighted_splitting){\n+use_pt_weighted_splitting = _use_pt_weighted_splitting;\n+return 0;\n+}\n+// cleaning functions //\n+int partial_clear();\n+int full_clear();\n+// user-defined stable-cone ordering //\n+class Cuser_scale_base{\n+public:\n+virtual ~Cuser_scale_base(){}\n+virtual double operator()(const Cjet & jet) const = 0;\n+virtual bool is_larger(const Cjet & a, const Cjet & b) const{\n+return (a.sm_var2 > b.sm_var2);\n+}\n+};\n+void set_user_scale(const Cuser_scale_base * user_scale_in){\n+_user_scale = user_scale_in;\n+}\n+const Cuser_scale_base * user_scale() const { return _user_scale; }\n+// main parts of the algorithm //\n+int merge_collinear_and_remove_soft();\n+int add_protocones(std::vector *protocones, double R2, double ptmin=0.0);\n+int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double ptmin=0.0);\n+int perform(double overlap_tshold, double ptmin=0.0);\n+\n+// save and debug functions //\n+int save_contents(FILE *flux);\n+int show();\n+// particle information\n+int n;\n+std::vector particles;\n+std::vector pt;\n+int n_left;\n+std::vector p_remain;\n+std::vector p_uncol_hard;\n+int n_pass;\n+double most_ambiguous_split;\n+// jets information\n+std::vector jets;\n+// working entries\n+int *indices;\n+int idx_size;\n+bool merge_identical_protocones;\n+Csplit_merge_ptcomparison ptcomparison;\n+double SM_var2_hardest_cut_off;\n+double stable_cone_soft_pt2_cutoff;\n+private:\n+bool get_overlap(const Cjet &j1, const Cjet &j2, double *v);\n+bool split(cjet_iterator &it_j1, cjet_iterator &it_j2);\n+bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2);\n+bool insert(Cjet &jet);\n+double get_sm_var2(Cmomentum &v, double &pt_tilde);\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.49 vicinity.cpp\n+\n+297\n+\n 00445\n // jet information\n 00446\n 00448 #ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR\n 00449\n std::unique_ptr > candidates;\n 00450 #else\n@@ -28149,381 +28146,15 @@\n 00472 };\n 00473\n 00474 }\n 00475\n 00476\n 00477 #endif\n \n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.49 vicinity.h\n-\n-297\n-\n-5.49 vicinity.h\n-00001 // -*- C++ -*00003 // File: vicinity.h\n-//\n-00004 // Description: header file for particle vicinity (Cvicinity class)\n-//\n-00005 // This file is part of the SISCone project.\n-//\n-00006 // WARNING: this is not the main SISCone trunk but\n-//\n-00007 //\n-an adaptation to spherical coordinates\n-//\n-00008 // For more details, see http://projects.hepforge.org/siscone\n-//\n-00009 //\n-//\n-00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n-00011 //\n-//\n-00012 // This program is free software; you can redistribute it and/or modify\n-//\n-00013 // it under the terms of the GNU General Public License as published by\n-//\n-00014 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00015 // (at your option) any later version.\n-//\n-00016 //\n-//\n-00017 // This program is distributed in the hope that it will be useful,\n-//\n-00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00020 // GNU General Public License for more details.\n-//\n-00021 //\n-//\n-00022 // You should have received a copy of the GNU General Public License\n-//\n-00023 // along with this program; if not, write to the Free Software\n-//\n-00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00025 //\n-//\n-00026 // $Revision:: 255\n-$//\n-00027 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008)\n-$//\n-00029\n-00030 #ifndef __SPH_VICINITY_H__\n-00031 #define __SPH_VICINITY_H__\n-00032\n-00033 #include \n-00034 #include \n-00035 #include \n-00036 #include \"momentum.h\"\n-00037 #include \n-00038 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n-00039 #include \n-00040 #endif\n-00041\n-00042 namespace siscone_spherical{\n-00043\n-00044\n-00052 class CSphvicinity_elm{\n-00053 public:\n-00055\n-CSphmomentum *v;\n-00056\n-00058\n-siscone::Cvicinity_inclusion *is_inside;\n-00059\n-00060\n-// centre variables\n-00061\n-CSph3vector centre;\n-double angle;\n-00062\n-00063\n-bool side;\n-00064\n-double cocircular_range;\n-00066\n-00069\n-std::list cocircular;\n-00070 };\n-00071\n-00073 bool ve_less(CSphvicinity_elm *ve1, CSphvicinity_elm *ve2);\n-00074\n-00075\n-00083 class CSphvicinity{\n-00084 public:\n-00086\n-CSphvicinity();\n-00087\n-00089\n-CSphvicinity(std::vector &_particle_list);\n-00090\n-00092\n-~CSphvicinity();\n-00093\n-void set_particle_list(std::vector &_particle_list);\n-00098\n-00099\n-void build(CSphmomentum *_parent, double _VR);\n-00105\n-00106\n-// cone kinematical information\n-00107\n-00108\n-CSphmomentum *parent;\n-double VR;\n-00109\n-00110\n-double VR2;\n-double cosVR;\n-00111\n-00112\n-double R;\n-00113\n-double R2;\n-double tan2R;\n-00114\n-00115\n-double D2_R;\n-double inv_R_EPS_COCIRC;\n-00116\n-double inv_R_2EPS_COCIRC;\n-00117\n-00118\n-00119\n-// particle list information\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-//\n-\n-\f298\n-\n-File Documentation\n-\n-00120\n-int n_part;\n-00121\n-std::vector plist;\n-00123\n-std::vector pincluded;\n-00124\n-CSphvicinity_elm *ve_list;\n-00125 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n-00126\n-siscone::Cquadtree *quadtree;\n-00127 #endif\n-00128\n-// vicinity information\n-00129\n-00130\n-std::vector vicinity;\n-00131\n-unsigned int vicinity_size;\n-00132\n-00133 protected:\n-void append_to_vicinity(CSphmomentum *v);\n-00139\n-00140\n-// internal variables\n-00141\n-00142\n-CSph3vector parent_centre;\n-00143\n-CSph3vector angular_dir1;\n-00144\n-CSph3vector angular_dir2;\n-00145 };\n-00146\n-00147 }\n-00148\n-00149 #endif\n-\n-5.50 vicinity.h\n-00001 // -*- C++ -*00003 // File: vicinity.h\n-//\n-00004 // Description: header file for particle vicinity (Cvicinity class)\n-//\n-00005 // This file is part of the SISCone project.\n-//\n-00006 // For more details, see http://projects.hepforge.org/siscone\n-//\n-00007 //\n-//\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-//\n-00009 //\n-//\n-00010 // This program is free software; you can redistribute it and/or modify\n-//\n-00011 // it under the terms of the GNU General Public License as published by\n-//\n-00012 // the Free Software Foundation; either version 2 of the License, or\n-//\n-00013 // (at your option) any later version.\n-//\n-00014 //\n-//\n-00015 // This program is distributed in the hope that it will be useful,\n-//\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n-//\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-//\n-00018 // GNU General Public License for more details.\n-//\n-00019 //\n-//\n-00020 // You should have received a copy of the GNU General Public License\n-//\n-00021 // along with this program; if not, write to the Free Software\n-//\n-00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00023 //\n-//\n-00024 // $Revision:: 123\n-$//\n-00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)\n-$//\n-00027\n-00028 #ifndef __VICINITY_H__\n-00029 #define __VICINITY_H__\n-00030\n-00031 #include \n-00032 #include \n-00033 #include \"momentum.h\"\n-00034 #include \"defines.h\"\n-00035 #include \"quadtree.h\"\n-00036\n-00037 namespace siscone{\n-00038\n-00039\n-00040\n-00046 class Cvicinity_inclusion {\n-00047 public:\n-00049\n-Cvicinity_inclusion() : cone(false), cocirc(false) {}\n-00050\n-00051\n-bool cone;\n-00052\n-bool cocirc;\n-00053 };\n-00054\n-00055\n-00063 class Cvicinity_elm{\n-00064 public:\n-00066\n-Cmomentum *v;\n-00067\n-00069\n-Cvicinity_inclusion *is_inside;\n-00070\n-// centre variables\n-00071\n-00072\n-double eta;\n-double phi;\n-00073\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.51 vicinity.cpp\n-\n-299\n-\n-00074\n-double angle;\n-bool side;\n-00075\n-00076\n-double cocircular_range;\n-00078\n-00081\n-std::list cocircular;\n-00082 };\n-00083\n-00085 bool ve_less(Cvicinity_elm *ve1, Cvicinity_elm *ve2);\n-00086\n-00087\n-00095 class Cvicinity{\n-00096 public:\n-00098\n-Cvicinity();\n-00099\n-00101\n-Cvicinity(std::vector &_particle_list);\n-00102\n-00104\n-~Cvicinity();\n-00105\n-void set_particle_list(std::vector &_particle_list);\n-00110\n-00111\n-void build(Cmomentum *_parent, double _VR);\n-00117\n-00118\n-00119\n-// cone kinematical information\n-00120\n-Cmomentum *parent;\n-00121\n-double VR;\n-double VR2;\n-00122\n-00123\n-double R;\n-double R2;\n-00124\n-00125\n-double inv_R_EPS_COCIRC;\n-00126\n-double inv_R_2EPS_COCIRC;\n-00127\n-// particle list information\n-00128\n-00129\n-int n_part;\n-00130\n-std::vector plist;\n-00131\n-std::vector pincluded;\n-00132\n-Cvicinity_elm *ve_list;\n-00133 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n-00134\n-Cquadtree *quadtree;\n-00135 #endif\n-00136\n-00137\n-// vicinity information\n-00138\n-std::vector vicinity;\n-unsigned int vicinity_size;\n-00139\n-00140\n-00141 protected:\n-00147\n-void append_to_vicinity(Cmomentum *v);\n-00148\n-// internal variables\n-00149\n-00150\n-double pcx;\n-double pcy;\n-00151\n-00152 };\n-00153\n-00154 }\n-00155\n-00156 #endif\n-\n-5.51 vicinity.cpp\n+5.49 vicinity.cpp\n 00001\n //\n 00002 // File: vicinity.cpp\n 00003 // Description: source file for particle vicinity (Cvicinity class)\n //\n 00004 // This file is part of the SISCone project.\n //\n@@ -28564,23 +28195,14 @@\n 00022 // along with this program; if not, write to the Free Software\n //\n 00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n 00024 //\n //\n 00025 // $Revision:: 255\n $//\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-//\n-\n-\f300\n-\n-File Documentation\n-\n 00026 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008)\n $//\n 00028\n 00029 #include \"vicinity.h\"\n 00030 #include \n 00031 #include \n 00032 #include \n@@ -28614,14 +28236,23 @@\n *\n 00055 * class used to manage the points which are in the vicinity *\n 00056 * of a parent point. The construction of the list can be\n *\n 00057 * made from a list of points or from a quadtree.\n *\n 00058 *************************************************************/\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+//\n+\n+\f298\n+\n+File Documentation\n+\n 00059\n 00060 // default constructor\n 00061 //--------------------00062 CSphvicinity::CSphvicinity(){\n 00063\n n_part = 0;\n 00064\n 00065\n@@ -28653,53 +28284,48 @@\n 00084\n 00085\n set_particle_list(_particle_list);\n 00086 }\n 00087\n 00088 // default destructor\n 00089 //-------------------00090 CSphvicinity::~CSphvicinity(){\n-00091\n if (ve_list!=NULL)\n-delete[] ve_list;\n+00091\n 00092\n+delete[] ve_list;\n 00093\n 00094 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00095\n if (quadtree!=NULL)\n-00096\n delete quadtree;\n+00096\n 00097 #endif\n 00098 }\n 00099\n 00100 /*\n 00101 * set the particle_list\n-00102 * - particle_list\n list of particles (type CSphmomentum)\n-number of particles in the list\n+00102 * - particle_list\n 00103 * - n\n+number of particles in the list\n 00104 ************************************************************/\n 00105 void CSphvicinity::set_particle_list(vector &_particle_list){\n-int i,j;\n 00106\n+int i,j;\n 00107 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00108\n double eta_max=0.0;\n 00109 #endif\n 00110\n-// if the particle list is not empty, destroy it !\n 00111\n+// if the particle list is not empty, destroy it !\n 00112\n if (ve_list!=NULL){\n 00113\n delete[] ve_list;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.51 vicinity.cpp\n-\n 00114\n }\n 00115\n vicinity.clear();\n 00116 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00117\n if (quadtree!=NULL)\n@@ -28716,16 +28342,16 @@\n - we allocate indices to particles\n 00124\n n_part = 0;\n 00125\n plist.clear();\n 00126\n pincluded.clear();\n-for (i=0;i<(int) _particle_list.size();i++){\n 00127\n+for (i=0;i<(int) _particle_list.size();i++){\n 00128\n // if a particle is colinear with the beam (infinite rapidity)\n 00129\n // we do not take it into account\n 00130\n //if (fabs(_particle_list[i].pz)!=_particle_list[i].E){\n 00131\n@@ -28740,49 +28366,54 @@\n 00136\n // Hence, it is not required here any longer.\n 00137\n // plist[n_part].parent_index = i;\n 00138\n plist[n_part].index = n_part;\n 00139\n-// make sure the reference is randomly created\n 00140\n+// make sure the reference is randomly created\n 00141\n plist[n_part].ref.randomize();\n 00142\n 00143 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00144\n if (fabs(plist[n_part].eta)>eta_max) eta_max=fabs(plist[n_part].eta);\n 00145 #endif\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.49 vicinity.cpp\n+\n 00146\n n_part++;\n-00147\n //}\n+00147\n 00148\n }\n 00149\n-00150\n // allocate quadtree and vicinity_elm list\n+00150\n 00151\n // note: we set phi in [-pi:pi] as it is the natural range for atan2!\n 00152\n ve_list = new CSphvicinity_elm[2*n_part];\n 00153 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00154\n eta_max+=0.1;\n 00155\n quadtree = new siscone::Cquadtree(0.0, 0.0, eta_max, M_PI);\n 00156 #endif\n 00157\n-// append particle to the vicinity_elm list\n 00158\n+// append particle to the vicinity_elm list\n 00159\n j = 0;\n-for (i=0;iadd(&plist[i]);\n 00163 #endif\n 00164\n ve_list[j].v = ve_list[j+1].v = &plist[i];\n 00165\n@@ -28793,22 +28424,22 @@\n }\n 00168\n 00169 }\n 00170\n 00171\n 00172 /*\n 00173 * build the vicinity list from a list of points.\n-reference particle\n 00174 * - _parent\n-00175 * - _VR\n+reference particle\n vicinity radius\n+00175 * - _VR\n 00176 ************************************************************/\n 00177 void CSphvicinity::build(CSphmomentum *_parent, double _VR){\n-00178\n int i;\n+00178\n 00179\n // set parent and radius\n 00180\n 00181\n parent = _parent;\n 00182\n 00183\n@@ -28841,23 +28472,14 @@\n 00197\n vicinity.clear();\n 00198\n // init parent variables\n 00199\n 00200\n // we cpte the direction of the centre and two orthogonal ones\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-301\n-\n-\f302\n-\n-File Documentation\n-\n 00201\n // to measure the angles. Those are taken orthogonal to the\n 00202\n // axis of smallest components (of the centre) to increase precision\n 00203\n parent_centre = (*parent)/parent->_norm;\n 00204\n@@ -28886,62 +28508,71 @@\n 00217 }\n 00218\n 00219\n 00221 //TODO//\n 00222 inline double sort_angle(double s, double c){\n 00223\n if (s==0) return (c>0) ? 0.0 : 2.0;\n-00224\n double t=c/s;\n-return (s>0) ? 1-t/(1+fabs(t)) : 3-t/(1+fabs(t));\n+00224\n 00225\n+return (s>0) ? 1-t/(1+fabs(t)) : 3-t/(1+fabs(t));\n 00226 }\n 00227\n 00228\n 00229 /*\n 00230 * append a particle to the \u2019vicinity\u2019 list after\n 00231 * having computed the angular-ordering quantities\n 00232 * - v\n vector to test\n 00233 **********************************************************/\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+299\n+\n+\f300\n+\n+File Documentation\n+\n 00234 void CSphvicinity::append_to_vicinity(CSphmomentum *v){\n-00235\n // skip the particle itself)\n+00235\n 00236\n if (v==parent)\n-00237\n return;\n+00237\n 00238\n-int i=2*(v->index);\n 00239\n+int i=2*(v->index);\n 00240\n // compute the distance of the i-th particle with the parent\n 00241\n 00242\n double dot = dot_product3(parent_centre,*v);\n 00243\n CSph3vector vnormal = *v;\n 00244\n vnormal/=v->_norm;\n 00245\n dot/=v->_norm;\n 00246\n-// really check if the distance is less than VR\n 00247\n+// really check if the distance is less than VR\n 00248\n if (dot>cosVR){\n 00249\n CSph3vector cross = cross_product3(parent_centre,vnormal);\n 00250\n 00251\n // for the centres\n 00252\n CSph3vector median = (parent_centre+vnormal);\n-double amplT = sqrt((tan2R*(1+dot)+(dot-1))*(1+dot));\n 00253\n+double amplT = sqrt((tan2R*(1+dot)+(dot-1))*(1+dot));\n 00254\n CSph3vector transverse = amplT*cross/cross._norm;\n 00255\n 00256\n // first angle (+)\n 00257\n ve_list[i].centre = median + transverse;\n@@ -28978,40 +28609,35 @@\n 00273\n ve_list[i+1].side = false;\n 00274\n ve_list[i+1].cocircular.clear();\n 00275\n vicinity.push_back(&(ve_list[i+1]));\n 00276\n-00277\n // now work out the cocircularity range for the two points (range\n+00277\n 00278\n // of angle within which the points stay within a distance\n 00279\n // EPSILON_COCIRCULAR of circule\n 00280\n // P = parent; C = child; O = Origin (center of circle)\n 00281\n CSph3vector OP = parent_centre - ve_list[i+1].centre;\n 00282\n CSph3vector OC = vnormal - ve_list[i+1].centre;\n 00283\n-00284\n // two sources of error are (GPS CCN29-19) epsilon/(R sin theta)\n+00284\n 00285\n // and sqrt(2*epsilon/(R (1-cos theta))) and the way things work\n 00286\n // out, it is the _smaller_ of the two that is relevant [NB have\n 00287\n // changed definition of theta here relative to that used in\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.52 vicinity.cpp\n-\n 00288\n // CCN29] [NB2: write things so as to avoid zero denominators and\n 00289\n // to minimize the multiplications, divisions and above all sqrts\n 00290\n // -- that means that c & s are defined including a factor of VR2]\n 00291\n@@ -29028,38 +28654,44 @@\n ve_list[i+1].cocircular_range = ve_list[i].cocircular_range;\n 00297\n }\n 00298 }\n 00299\n 00300 }\n \n-5.52 vicinity.cpp\n+5.50 vicinity.cpp\n 00001\n 00002 // File: vicinity.cpp\n-//\n 00003 // Description: source file for particle vicinity (Cvicinity class)\n-//\n 00004 // This file is part of the SISCone project.\n-//\n 00005 // For more details, see http://projects.hepforge.org/siscone\n-//\n 00006 //\n-//\n 00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n-//\n 00008 //\n-//\n 00009 // This program is free software; you can redistribute it and/or modify\n-//\n 00010 // it under the terms of the GNU General Public License as published by\n-//\n 00011 // the Free Software Foundation; either version 2 of the License, or\n-//\n 00012 // (at your option) any later version.\n+\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n //\n+//\n+//\n+//\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.50 vicinity.cpp\n+\n 00013 //\n //\n 00014 // This program is distributed in the hope that it will be useful,\n //\n 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n //\n 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n@@ -29098,16 +28730,16 @@\n *\n 00040 * of a parent point.\n *\n 00041 *************************************************************/\n 00042\n 00043 // ordering pointers to Cvicinity_elm\n 00044 //-----------------------------------00045 bool ve_less(Cvicinity_elm *ve1, Cvicinity_elm *ve2){\n-00046\n return ve1->angle < ve2->angle;\n+00046\n 00047 }\n 00048\n 00049\n 00050 /*************************************************************\n 00051 * Cvicinity implementation\n *\n 00052 * list of element in the vicinity of a parent.\n@@ -29129,23 +28761,14 @@\n 00064 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00065\n quadtree = NULL;\n 00066 #endif\n 00067\n 00068\n parent = NULL;\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-303\n-\n-\f304\n-\n-File Documentation\n-\n 00069\n VR2 = VR = 0.0;\n 00070\n 00071 }\n 00072\n 00073 // constructor with initialisation\n 00074 //--------------------------------00075 Cvicinity::Cvicinity(vector &_particle_list){\n@@ -29170,79 +28793,88 @@\n 00089\n 00090\n delete[] ve_list;\n 00091\n 00092 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00093\n if (quadtree!=NULL)\n-delete quadtree;\n 00094\n+delete quadtree;\n 00095 #endif\n 00096 }\n 00097\n 00098 /*\n 00099 * set the particle_list\n list of particles (type Cmomentum)\n 00100 * - particle_list\n-00101 * - n\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+301\n+\n+\f302\n+\n+File Documentation\n+\n number of particles in the list\n+00101 * - n\n 00102 ************************************************************/\n 00103 void Cvicinity::set_particle_list(vector &_particle_list){\n-00104\n int i,j;\n+00104\n 00105 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00106\n double eta_max=0.0;\n 00107 #endif\n 00108\n-00109\n // if the particle list is not empty, destroy it !\n+00109\n 00110\n if (ve_list!=NULL){\n-delete[] ve_list;\n 00111\n+delete[] ve_list;\n 00112\n }\n 00113\n vicinity.clear();\n 00114 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00115\n if (quadtree!=NULL)\n-00116\n delete quadtree;\n+00116\n 00117 #endif\n 00118\n-00119\n // allocate memory array for particles\n+00119\n 00120\n // Note: - we compute max for |eta|\n 00121\n //\n - we allocate indices to particles\n 00122\n n_part = 0;\n 00123\n plist.clear();\n 00124\n pincluded.clear();\n-00125\n for (i=0;i<(int) _particle_list.size();i++){\n-00126\n+00125\n // if a particle is colinear with the beam (infinite rapidity)\n+00126\n 00127\n // we do not take it into account\n 00128\n if (fabs(_particle_list[i].pz)!=_particle_list[i].E){\n 00129\n plist.push_back(_particle_list[i]);\n 00130\n pincluded.push_back(Cvicinity_inclusion()); // zero inclusion status\n 00131\n-// the parent_index is handled in the split_merge because\n 00132\n+// the parent_index is handled in the split_merge because\n 00133\n // of our multiple-pass procedure.\n 00134\n // Hence, it is not required here any longer.\n 00135\n // plist[n_part].parent_index = i;\n 00136\n@@ -29261,31 +28893,26 @@\n 00145\n n_part++;\n 00146\n }\n 00147\n }\n 00148\n-00149\n // allocate quadtree and vicinity_elm list\n+00149\n 00150\n // note: we set phi in [-pi:pi] as it is the natural range for atan2!\n 00151\n ve_list = new Cvicinity_elm[2*n_part];\n 00152 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00153\n eta_max+=0.1;\n 00154\n quadtree = new Cquadtree(0.0, 0.0, eta_max, M_PI);\n 00155 #endif\n-\n-Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n-\n-\f5.52 vicinity.cpp\n-\n 00156\n // append particle to the vicinity_elm list\n 00157\n 00158\n j = 0;\n for (i=0;ieta;\n 00193\n pcy = parent->phi;\n 00194\n-// really browse the particle list\n 00195\n+// really browse the particle list\n 00196\n for (i=0;i0) ? 0.0 : 2.0;\n-double t=c/s;\n+00209\n 00210\n+double t=c/s;\n 00211\n return (s>0) ? 1-t/(1+fabs(t)) : 3-t/(1+fabs(t));\n 00212 }\n 00213\n 00214\n 00215 /*\n 00216 * append a particle to the \u2019vicinity\u2019 list after\n 00217 * having computed the angular-ordering quantities\n-00218 * - v\n vector to test\n+00218 * - v\n 00219 **********************************************************/\n 00220 void Cvicinity::append_to_vicinity(Cmomentum *v){\n-00221\n double dx, dy, d2;\n+00221\n 00222\n // skip the particle itself)\n 00223\n 00224\n if (v==parent)\n-return;\n 00225\n+return;\n 00226\n int i=2*(v->index);\n 00227\n 00228\n // compute the distance of the i-th particle with the parent\n 00229\n 00230\n dx = v->eta - pcx;\n 00231\n dy = v->phi - pcy;\n 00232\n-00233\n // pay attention to the periodicity in phi !\n+00233\n 00234\n if (dy>M_PI)\n 00235\n dy -= twopi;\n else if (dy<-M_PI)\n 00236\n 00237\n@@ -29418,36 +29050,27 @@\n 00240\n 00241\n // really check if the distance is less than VR\n 00242\n if (d2eta - ve_list[i+1].eta,\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+303\n+\n+\f304\n+\n+File Documentation\n+\n 00276\n phi_in_range(v->phi-ve_list[i+1].phi));\n 00277\n // two sources of error are (GPS CCN29-19) epsilon/(R sin theta)\n 00278\n 00279\n // and sqrt(2*epsilon/(R (1-cos theta))) and the way things work\n@@ -29513,30 +29145,390 @@\n // -- that means that c & s are defined including a factor of VR2]\n 00285\n c = dot_product(OP,OC);\n 00286\n s = fabs(cross_product(OP,OC));\n double inv_err1 = s * inv_R_EPS_COCIRC;\n 00287\n-double inv_err2_sq = (R2-c) * inv_R_2EPS_COCIRC;\n 00288\n+double inv_err2_sq = (R2-c) * inv_R_2EPS_COCIRC;\n 00289\n ve_list[i].cocircular_range = pow2(inv_err1) > inv_err2_sq ?\n 00290\n 1.0/inv_err1 :\n 00291\n sqrt(1.0/inv_err2_sq);\n 00292\n ve_list[i+1].cocircular_range = ve_list[i].cocircular_range;\n 00293\n }\n 00294 }\n 00295\n 00296 }\n \n+5.51 vicinity.h\n+00001 // -*- C++ -*00003 // File: vicinity.h\n+//\n+00004 // Description: header file for particle vicinity (Cvicinity class)\n+//\n+00005 // This file is part of the SISCone project.\n+//\n+00006 // WARNING: this is not the main SISCone trunk but\n+//\n+00007 //\n+an adaptation to spherical coordinates\n+//\n+00008 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00009 //\n+//\n+00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n+00011 //\n+//\n+00012 // This program is free software; you can redistribute it and/or modify\n+//\n+00013 // it under the terms of the GNU General Public License as published by\n+//\n+00014 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00015 // (at your option) any later version.\n+//\n+00016 //\n+//\n+00017 // This program is distributed in the hope that it will be useful,\n+//\n+00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00020 // GNU General Public License for more details.\n+//\n+00021 //\n+//\n+00022 // You should have received a copy of the GNU General Public License\n+//\n+00023 // along with this program; if not, write to the Free Software\n+//\n+00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00025 //\n+//\n+00026 // $Revision:: 255\n+$//\n+00027 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008)\n+$//\n+00029\n+00030 #ifndef __SPH_VICINITY_H__\n+00031 #define __SPH_VICINITY_H__\n+00032\n+00033 #include \n+00034 #include \n+00035 #include \n+00036 #include \"momentum.h\"\n+00037 #include \n+00038 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n+00039 #include \n+00040 #endif\n+00041\n+00042 namespace siscone_spherical{\n+00043\n+00044\n+00052 class CSphvicinity_elm{\n+00053 public:\n+00055\n+CSphmomentum *v;\n+00056\n+00058\n+siscone::Cvicinity_inclusion *is_inside;\n+00059\n+00060\n+// centre variables\n+00061\n+CSph3vector centre;\n+double angle;\n+00062\n+00063\n+bool side;\n+double cocircular_range;\n+00064\n+00066\n+00069\n+std::list cocircular;\n+00070 };\n+00071\n+00073 bool ve_less(CSphvicinity_elm *ve1, CSphvicinity_elm *ve2);\n+00074\n+\n+//\n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+\f5.52 vicinity.h\n+\n+00075\n+00083 class CSphvicinity{\n+00084 public:\n+00086\n+CSphvicinity();\n+00087\n+00089\n+CSphvicinity(std::vector &_particle_list);\n+00090\n+00092\n+~CSphvicinity();\n+00093\n+00098\n+void set_particle_list(std::vector &_particle_list);\n+00099\n+void build(CSphmomentum *_parent, double _VR);\n+00105\n+00106\n+// cone kinematical information\n+00107\n+00108\n+CSphmomentum *parent;\n+double VR;\n+00109\n+00110\n+double VR2;\n+00111\n+double cosVR;\n+double R;\n+00112\n+00113\n+double R2;\n+double tan2R;\n+00114\n+00115\n+double D2_R;\n+00116\n+double inv_R_EPS_COCIRC;\n+double inv_R_2EPS_COCIRC;\n+00117\n+00118\n+// particle list information\n+00119\n+00120\n+int n_part;\n+00121\n+std::vector plist;\n+00123\n+std::vector pincluded;\n+00124\n+CSphvicinity_elm *ve_list;\n+00125 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n+00126\n+siscone::Cquadtree *quadtree;\n+00127 #endif\n+00128\n+// vicinity information\n+00129\n+00130\n+std::vector vicinity;\n+00131\n+unsigned int vicinity_size;\n+00132\n+00133 protected:\n+void append_to_vicinity(CSphmomentum *v);\n+00139\n+00140\n+00141\n+// internal variables\n+00142\n+CSph3vector parent_centre;\n+00143\n+CSph3vector angular_dir1;\n+00144\n+CSph3vector angular_dir2;\n+00145 };\n+00146\n+00147 }\n+00148\n+00149 #endif\n+\n+5.52 vicinity.h\n+00001 // -*- C++ -*00003 // File: vicinity.h\n+//\n+00004 // Description: header file for particle vicinity (Cvicinity class)\n+//\n+00005 // This file is part of the SISCone project.\n+//\n+00006 // For more details, see http://projects.hepforge.org/siscone\n+//\n+00007 //\n+//\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+//\n+00009 //\n+//\n+00010 // This program is free software; you can redistribute it and/or modify\n+//\n+00011 // it under the terms of the GNU General Public License as published by\n+//\n+00012 // the Free Software Foundation; either version 2 of the License, or\n+//\n+00013 // (at your option) any later version.\n+//\n+00014 //\n+//\n+00015 // This program is distributed in the hope that it will be useful,\n+//\n+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//\n+00018 // GNU General Public License for more details.\n+//\n+00019 //\n+//\n+00020 // You should have received a copy of the GNU General Public License\n+//\n+00021 // along with this program; if not, write to the Free Software\n+//\n+00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00023 //\n+//\n+00024 // $Revision:: 123\n+$//\n+00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)\n+$//\n+00027\n+00028 #ifndef __VICINITY_H__\n+00029 #define __VICINITY_H__\n+00030\n+00031 #include \n+00032 #include \n+\n+Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n+\n+305\n+\n+\f306\n+\n+File Documentation\n+\n+00033 #include \"momentum.h\"\n+00034 #include \"defines.h\"\n+00035 #include \"quadtree.h\"\n+00036\n+00037 namespace siscone{\n+00038\n+00039\n+00040\n+00046 class Cvicinity_inclusion {\n+00047 public:\n+00049\n+Cvicinity_inclusion() : cone(false), cocirc(false) {}\n+00050\n+00051\n+bool cone;\n+bool cocirc;\n+00052\n+00053 };\n+00054\n+00055\n+00063 class Cvicinity_elm{\n+00064 public:\n+00066\n+Cmomentum *v;\n+00067\n+00069\n+Cvicinity_inclusion *is_inside;\n+00070\n+00071\n+// centre variables\n+00072\n+double eta;\n+double phi;\n+00073\n+00074\n+double angle;\n+bool side;\n+00075\n+00076\n+double cocircular_range;\n+00078\n+00081\n+std::list cocircular;\n+00082 };\n+00083\n+00085 bool ve_less(Cvicinity_elm *ve1, Cvicinity_elm *ve2);\n+00086\n+00087\n+00095 class Cvicinity{\n+00096 public:\n+00098\n+Cvicinity();\n+00099\n+00101\n+Cvicinity(std::vector &_particle_list);\n+00102\n+00104\n+~Cvicinity();\n+00105\n+00110\n+void set_particle_list(std::vector &_particle_list);\n+00111\n+void build(Cmomentum *_parent, double _VR);\n+00117\n+00118\n+00119\n+// cone kinematical information\n+00120\n+Cmomentum *parent;\n+00121\n+double VR;\n+double VR2;\n+00122\n+00123\n+double R;\n+double R2;\n+00124\n+00125\n+double inv_R_EPS_COCIRC;\n+00126\n+double inv_R_2EPS_COCIRC;\n+00127\n+// particle list information\n+00128\n+00129\n+int n_part;\n+00130\n+std::vector plist;\n+00131\n+std::vector pincluded;\n+00132\n+Cvicinity_elm *ve_list;\n+00133 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n+00134\n+Cquadtree *quadtree;\n+00135 #endif\n+00136\n+00137\n+// vicinity information\n+00138\n+std::vector vicinity;\n+unsigned int vicinity_size;\n+00139\n+00140\n+00141 protected:\n+00147\n+void append_to_vicinity(Cmomentum *v);\n+00148\n+// internal variables\n+00149\n+00150\n+double pcx;\n+double pcy;\n+00151\n+00152 };\n+00153\n+00154 }\n+00155\n+00156 #endif\n+\n Generated on Tue Jan 10 2023 17:32:40 for SISCone by Doxygen\n \n \fIndex\n _norm\n siscone::Cjet_area, 31\n siscone_spherical::CSph3vector, 69\n add\n@@ -29779,22 +29771,22 @@\n siscone::Ceta_phi_range, 20\n eta_min\n siscone::Ceta_phi_range, 20\n eta_range\n siscone::Ceta_phi_range, 21\n ev_name\n Coptions, 41\n-examples/area.cpp, 185\n-examples/main.cpp, 175\n-examples/options.cpp, 176\n-examples/options.h, 179\n-examples/sample.cpp, 180\n-examples/spherical.cpp, 181\n-examples/test.cpp, 182\n-examples/times.cpp, 184\n+examples/area.cpp, 175\n+examples/main.cpp, 180\n+examples/options.cpp, 182\n+examples/options.h, 185\n+examples/sample.cpp, 185\n+examples/spherical.cpp, 187\n+examples/test.cpp, 188\n+examples/times.cpp, 189\n \n 309\n \n siscone::hash_cones, 165\n siscone_spherical::sph_hash_cones, 172\n hash_cones\n siscone::hash_cones, 163\n@@ -30131,23 +30123,23 @@\n siscone_spherical::sph_hash_cones, 172\n randomize\n siscone::Creference, 51\n range\n siscone::Cjet, 27\n siscone_spherical::CSphjet, 75\n ranlux.h\n-ranlux_get, 219\n-ranlux_init, 219\n-ranlux_print_state, 219\n+ranlux_get, 248\n+ranlux_init, 248\n+ranlux_print_state, 248\n ranlux_get\n-ranlux.h, 219\n+ranlux.h, 248\n ranlux_init\n-ranlux.h, 219\n+ranlux.h, 248\n ranlux_print_state\n-ranlux.h, 219\n+ranlux.h, 248\n recompute_jets\n siscone::Csiscone, 59\n siscone_spherical::CSphsiscone, 90\n ref\n siscone::Cmomentum, 38\n siscone::Creference, 52\n siscone::hash_element, 167\n@@ -30181,56 +30173,56 @@\n siscone_spherical::CSphsplit_merge, 99\n side\n siscone::Cvicinity_elm, 160\n siscone_spherical::CSphvicinity_elm, 125\n \n INDEX\n \n-siscone/area.cpp, 187\n+siscone/area.cpp, 176\n siscone/area.h, 191\n siscone/circulator.h, 192\n siscone/config.h, 193\n siscone/config_raw.h, 194\n siscone/defines.h, 195, 197\n siscone/geom_2d.cpp, 198\n-siscone/geom_2d.h, 202\n-siscone/hash.cpp, 233\n-siscone/hash.h, 238\n-siscone/momentum.cpp, 239\n-siscone/momentum.h, 204\n-siscone/protocones.cpp, 245\n-siscone/protocones.h, 208\n-siscone/quadtree.cpp, 212\n-siscone/quadtree.h, 215\n-siscone/ranlux.cpp, 216\n-siscone/ranlux.h, 218, 219\n-siscone/reference.cpp, 220\n-siscone/reference.h, 221\n-siscone/siscone.cpp, 222\n-siscone/siscone.h, 229\n-siscone/siscone_error.cpp, 231\n-siscone/siscone_error.h, 232\n+siscone/geom_2d.h, 262\n+siscone/hash.cpp, 202\n+siscone/hash.h, 207\n+siscone/momentum.cpp, 209\n+siscone/momentum.h, 214\n+siscone/protocones.cpp, 218\n+siscone/protocones.h, 237\n+siscone/quadtree.cpp, 241\n+siscone/quadtree.h, 245\n+siscone/ranlux.cpp, 245\n+siscone/ranlux.h, 247, 249\n+siscone/reference.cpp, 249\n+siscone/reference.h, 251\n+siscone/siscone.cpp, 252\n+siscone/siscone.h, 259\n+siscone/siscone_error.cpp, 261\n+siscone/siscone_error.h, 261\n siscone/spherical/geom_2d.cpp, 200\n-siscone/spherical/geom_2d.h, 203\n-siscone/spherical/hash.cpp, 235\n-siscone/spherical/hash.h, 239\n-siscone/spherical/momentum.cpp, 241\n-siscone/spherical/momentum.h, 206\n-siscone/spherical/protocones.cpp, 254\n-siscone/spherical/protocones.h, 210\n-siscone/spherical/siscone.cpp, 226\n-siscone/spherical/siscone.h, 230\n+siscone/spherical/geom_2d.h, 263\n+siscone/spherical/hash.cpp, 205\n+siscone/spherical/hash.h, 208\n+siscone/spherical/momentum.cpp, 211\n+siscone/spherical/momentum.h, 216\n+siscone/spherical/protocones.cpp, 227\n+siscone/spherical/protocones.h, 239\n+siscone/spherical/siscone.cpp, 255\n+siscone/spherical/siscone.h, 260\n siscone/spherical/split_merge.cpp, 264\n-siscone/spherical/split_merge.h, 291\n-siscone/spherical/vicinity.cpp, 299\n-siscone/spherical/vicinity.h, 297\n+siscone/spherical/split_merge.h, 292\n+siscone/spherical/vicinity.cpp, 297\n+siscone/spherical/vicinity.h, 304\n siscone/split_merge.cpp, 278\n siscone/split_merge.h, 294\n-siscone/vicinity.cpp, 303\n-siscone/vicinity.h, 298\n+siscone/vicinity.cpp, 300\n+siscone/vicinity.h, 305\n siscone::Carea, 7\n \u223cCarea, 13\n Carea, 13\n compute_active_areas, 13\n compute_areas, 13\n compute_passive_areas, 14\n grid_eta_max, 15\n"}]}]}]}]}]}]}