{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.kJlNxOPe/b1/siscone_3.0.5-3_armhf.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.kJlNxOPe/b2/siscone_3.0.5-3_armhf.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,10 +1,10 @@\n \n 0279d55335ba16ae91221509e8c06260 78728 libdevel optional libsiscone-dev_3.0.5-3_armhf.deb\n 457069faa86c180b174457ff4fbc7bf3 70732 libdevel optional libsiscone-spherical-dev_3.0.5-3_armhf.deb\n 5a7cee4942f409ffc703f5064149145e 417732 debug optional libsiscone-spherical0v5-dbgsym_3.0.5-3_armhf.deb\n 5a797a673bde5250d00bb304b84f4767 53460 libs optional libsiscone-spherical0v5_3.0.5-3_armhf.deb\n d1d8cad0cd52ff0560f9bedc25b6b9d3 488944 debug optional libsiscone0v5-dbgsym_3.0.5-3_armhf.deb\n 5d910e4460a2984851543e6cb43bfffc 59032 libs optional libsiscone0v5_3.0.5-3_armhf.deb\n- 137f6a8729e75127ff4da6de6bd71c2f 1187616 doc optional siscone-doc-html_3.0.5-3_all.deb\n- f53e7a3c4619044ee6aefef6938f0c3a 1652620 doc optional siscone-doc-pdf_3.0.5-3_all.deb\n+ fb21f5f3af6957b36c85a603a21c34f9 1187180 doc optional siscone-doc-html_3.0.5-3_all.deb\n+ 3862397d1b2a78110314e4f4e5074605 1645796 doc optional siscone-doc-pdf_3.0.5-3_all.deb\n f55d27b2dd0698dc0b12d200da3aa5bf 34864 devel optional siscone-examples_3.0.5-3_all.deb\n"}, {"source1": "siscone-doc-html_3.0.5-3_all.deb", "source2": "siscone-doc-html_3.0.5-3_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 2025-01-07 11:57:28.000000 debian-binary\n -rw-r--r-- 0 0 0 8564 2025-01-07 11:57:28.000000 control.tar.xz\n--rw-r--r-- 0 0 0 1178860 2025-01-07 11:57:28.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 1178424 2025-01-07 11:57:28.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-3\n Architecture: all\n Maintainer: Debian Science Maintainers \n-Installed-Size: 5828\n+Installed-Size: 5810\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": "@@ -87,19 +87,19 @@\n -rw-r--r-- 0 root (0) root (0) 3325 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1Cvicinity__inclusion-members.html\n -rw-r--r-- 0 root (0) root (0) 8069 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1Cvicinity__inclusion.html\n -rw-r--r-- 0 root (0) root (0) 1000 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1Cvicinity__inherit__graph.map\n -rw-r--r-- 0 root (0) root (0) 8437 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1Cvicinity__inherit__graph.png\n -rw-r--r-- 0 root (0) root (0) 5401 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1circulator-members.html\n -rw-r--r-- 0 root (0) root (0) 26943 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1circulator.html\n -rw-r--r-- 0 root (0) root (0) 4951 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__cones-members.html\n--rw-r--r-- 0 root (0) root (0) 25473 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__cones.html\n+-rw-r--r-- 0 root (0) root (0) 26287 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__cones.html\n -rw-r--r-- 0 root (0) root (0) 822 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__cones__coll__graph.map\n -rw-r--r-- 0 root (0) root (0) 8816 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__cones__coll__graph.png\n -rw-r--r-- 0 root (0) root (0) 3721 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__element-members.html\n--rw-r--r-- 0 root (0) root (0) 11157 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__element.html\n+-rw-r--r-- 0 root (0) root (0) 12187 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__element.html\n -rw-r--r-- 0 root (0) root (0) 573 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__element__coll__graph.map\n -rw-r--r-- 0 root (0) root (0) 5833 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__element__coll__graph.png\n -rw-r--r-- 0 root (0) root (0) 11137 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone__spherical_1_1CSph3vector-members.html\n -rw-r--r-- 0 root (0) root (0) 64270 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone__spherical_1_1CSph3vector.html\n -rw-r--r-- 0 root (0) root (0) 478 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone__spherical_1_1CSph3vector__coll__graph.map\n -rw-r--r-- 0 root (0) root (0) 5961 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone__spherical_1_1CSph3vector__coll__graph.png\n -rw-r--r-- 0 root (0) root (0) 506 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/classsiscone__spherical_1_1CSph3vector__inherit__graph.map\n@@ -218,16 +218,16 @@\n -rw-r--r-- 0 root (0) root (0) 31815 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 30772 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 2551 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/globals.html\n -rw-r--r-- 0 root (0) root (0) 2433 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/globals_defs.html\n -rw-r--r-- 0 root (0) root (0) 2058 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/globals_vars.html\n -rw-r--r-- 0 root (0) root (0) 6196 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/graph_legend.html\n -rw-r--r-- 0 root (0) root (0) 23370 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/graph_legend.png\n--rw-r--r-- 0 root (0) root (0) 54599 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/hash_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 23259 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/hash_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 52932 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/hash_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 22547 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/hash_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 16740 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/hierarchy.html\n -rw-r--r-- 0 root (0) root (0) 1949 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/index.html\n -rw-r--r-- 0 root (0) root (0) 213 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_0.map\n -rw-r--r-- 0 root (0) root (0) 1411 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_0.png\n -rw-r--r-- 0 root (0) root (0) 272 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_1.map\n -rw-r--r-- 0 root (0) root (0) 2185 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_1.png\n -rw-r--r-- 0 root (0) root (0) 271 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_10.map\n@@ -280,41 +280,41 @@\n -rw-r--r-- 0 root (0) root (0) 1670 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_7.png\n -rw-r--r-- 0 root (0) root (0) 255 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_8.map\n -rw-r--r-- 0 root (0) root (0) 1737 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_8.png\n -rw-r--r-- 0 root (0) root (0) 1317 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_9.map\n -rw-r--r-- 0 root (0) root (0) 10333 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherit_graph_9.png\n -rw-r--r-- 0 root (0) root (0) 14156 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/inherits.html\n -rw-r--r-- 0 root (0) root (0) 30264 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/main_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 43382 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/momentum_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 41790 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/momentum_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 39162 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/momentum_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 153 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/nav_f.png\n -rw-r--r-- 0 root (0) root (0) 169 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/nav_fd.png\n -rw-r--r-- 0 root (0) root (0) 95 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/nav_g.png\n -rw-r--r-- 0 root (0) root (0) 98 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/nav_h.png\n -rw-r--r-- 0 root (0) root (0) 114 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/nav_hd.png\n -rw-r--r-- 0 root (0) root (0) 123 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/open.png\n -rw-r--r-- 0 root (0) root (0) 52456 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/options_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 19814 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/options_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 151302 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/protocones_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 42169 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/protocones_8h_source.html\n--rw-r--r-- 0 root (0) root (0) 78917 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 23576 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8h_source.html\n--rw-r--r-- 0 root (0) root (0) 27767 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 69505 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 22116 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 27191 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 7901 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8h.html\n -rw-r--r-- 0 root (0) root (0) 1021 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8h__dep__incl.map\n -rw-r--r-- 0 root (0) root (0) 12914 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8h__dep__incl.png\n -rw-r--r-- 0 root (0) root (0) 9110 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8h_source.html\n--rw-r--r-- 0 root (0) root (0) 31722 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/reference_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 25626 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/reference_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 30527 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/reference_8cpp_source.html\n+-rw-r--r-- 0 root (0) root (0) 24184 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/reference_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 20314 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/sample_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 82494 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone_2area_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 69584 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 23913 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 8010 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8cpp_source.html\n--rw-r--r-- 0 root (0) root (0) 15205 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8h_source.html\n+-rw-r--r-- 0 root (0) root (0) 14493 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 38932 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2geom__2d_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 22147 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2geom__2d_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 47436 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2hash_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 22598 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2hash_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 81643 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2momentum_8cpp_source.html\n -rw-r--r-- 0 root (0) root (0) 70241 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2momentum_8h_source.html\n -rw-r--r-- 0 root (0) root (0) 165885 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2protocones_8cpp_source.html\n"}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__cones.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__cones.html", "unified_diff": "@@ -196,15 +196,15 @@\n \n \n \n
Returns
0 on success, 1 on error
\n \n

Definition at line 171 of file hash.cpp.

\n \n-

References siscone::Cmomentum::eta, hash_array, mask, n_cones, siscone::Cmomentum::phi, siscone::Cmomentum::ref, and siscone::Creference::ref.

\n+

References siscone::hash_element::eta, siscone::Cmomentum::eta, hash_array, siscone::hash_element::is_stable, mask, n_cones, siscone::hash_element::next, siscone::hash_element::phi, siscone::Cmomentum::phi, siscone::hash_element::ref, siscone::Cmomentum::ref, and siscone::Creference::ref.

\n \n \n \n \n

◆ insert() [2/2]

\n \n
\n@@ -259,15 +259,15 @@\n \n \n \n
Returns
0 on success, 1 on error
\n \n

Definition at line 102 of file hash.cpp.

\n \n-

References siscone::Cmomentum::build_etaphi(), siscone::Cmomentum::eta, hash_array, is_inside(), mask, n_cones, siscone::Cmomentum::phi, siscone::Cmomentum::ref, and siscone::Creference::ref.

\n+

References siscone::Cmomentum::build_etaphi(), siscone::hash_element::eta, siscone::Cmomentum::eta, hash_array, is_inside(), siscone::hash_element::is_stable, mask, n_cones, siscone::hash_element::next, siscone::hash_element::phi, siscone::Cmomentum::phi, siscone::hash_element::ref, siscone::Cmomentum::ref, and siscone::Creference::ref.

\n \n
\n \n \n

◆ is_inside()

\n \n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -66,16 +66,18 @@\n insert a new candidate into the hash.\n Parameters\n v 4-momentum of te cone to add Note, in this case, we assume stability.\n We also assume that eta and phi are computed for v\n Returns\n 0 on success, 1 on error\n Definition at line _\b1_\b7_\b1 of file _\bh_\ba_\bs_\bh_\b._\bc_\bp_\bp.\n-References _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\be_\bt_\ba, _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by, _\bm_\ba_\bs_\bk, _\bn_\b__\bc_\bo_\bn_\be_\bs, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:\n-_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bp_\bh_\bi, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\br_\be_\bf, and _\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+References _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\be_\bt_\ba, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\be_\bt_\ba, _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by,\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\bi_\bs_\b__\bs_\bt_\ba_\bb_\bl_\be, _\bm_\ba_\bs_\bk, _\bn_\b__\bc_\bo_\bn_\be_\bs, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\bn_\be_\bx_\bt,\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\bp_\bh_\bi, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bp_\bh_\bi, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:\n+_\br_\be_\bf, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\br_\be_\bf, and _\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 *\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0i\bin\bns\bse\ber\brt\bt(\b()\b) [\b[2\b2/\b/2\b2]\b] *\b**\b**\b**\b**\b*\n _\bi_\bn_\bt siscone::hash_cones::insert ( _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *\u00a0 v\bv,\n _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *\u00a0 p\bpa\bar\bre\ben\bnt\bt,\n _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *\u00a0 c\bch\bhi\bil\bld\bd,\n _\bb_\bo_\bo_\bl\u00a0 p\bp_\b_i\bio\bo,\n _\bb_\bo_\bo_\bl\u00a0 c\bc_\b_i\bio\bo\u00a0\n )\n@@ -85,17 +87,19 @@\n parent parent particle defining the cone\n child child particle defining the cone\n p_io whether the parent has to belong to the cone or not\n c_io whether the child has to belong to the cone or not\n Returns\n 0 on success, 1 on error\n Definition at line _\b1_\b0_\b2 of file _\bh_\ba_\bs_\bh_\b._\bc_\bp_\bp.\n-References _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bb_\bu_\bi_\bl_\bd_\b__\be_\bt_\ba_\bp_\bh_\bi_\b(_\b), _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\be_\bt_\ba,\n-_\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by, _\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be_\b(_\b), _\bm_\ba_\bs_\bk, _\bn_\b__\bc_\bo_\bn_\be_\bs, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bp_\bh_\bi, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:\n-_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\br_\be_\bf, and _\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+References _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bb_\bu_\bi_\bl_\bd_\b__\be_\bt_\ba_\bp_\bh_\bi_\b(_\b), _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\be_\bt_\ba,\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\be_\bt_\ba, _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by, _\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be_\b(_\b), _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:\n+_\bi_\bs_\b__\bs_\bt_\ba_\bb_\bl_\be, _\bm_\ba_\bs_\bk, _\bn_\b__\bc_\bo_\bn_\be_\bs, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\bn_\be_\bx_\bt, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:\n+_\bp_\bh_\bi, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bp_\bh_\bi, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\br_\be_\bf, _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:\n+_\br_\be_\bf, and _\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 *\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0i\bis\bs_\b_i\bin\bns\bsi\bid\bde\be(\b()\b) *\b**\b**\b**\b**\b*\n _\bb_\bo_\bo_\bl siscone::hash_cones::is_inside ( _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *\u00a0 c\bce\ben\bnt\btr\bre\be,\n _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *\u00a0 v\bv\u00a0 inline\n )\n test if a particle is inside a cone of given centre.\n check if the particle of coordinates 'v' is inside the circle of radius R\n centered at 'centre'.\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__element.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__element.html", "unified_diff": "@@ -102,14 +102,16 @@\n \n
\n \n

centre: eta coordinate

\n \n

Definition at line 48 of file hash.h.

\n \n+

Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert().

\n+\n
\n \n \n

◆ is_stable

\n \n
\n
\n@@ -120,14 +122,16 @@\n \n
\n \n

true if stable w.r.t. \"border particles\"

\n \n

Definition at line 50 of file hash.h.

\n \n+

Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert().

\n+\n
\n
\n \n

◆ next

\n \n
\n
\n@@ -138,15 +142,15 @@\n \n
\n \n

pointer to the next element

\n \n

Definition at line 52 of file hash.h.

\n \n-

Referenced by siscone::hash_cones::~hash_cones().

\n+

Referenced by siscone::hash_cones::insert(), siscone::hash_cones::insert(), and siscone::hash_cones::~hash_cones().

\n \n
\n
\n \n

◆ phi

\n \n
\n@@ -158,14 +162,16 @@\n \n
\n \n

centre: phi coordinate

\n \n

Definition at line 49 of file hash.h.

\n \n+

Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert().

\n+\n
\n \n \n

◆ ref

\n \n
\n
\n@@ -176,14 +182,16 @@\n \n
\n \n

reference

\n \n

Definition at line 47 of file hash.h.

\n \n+

Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert().

\n+\n
\n
\n
The documentation for this class was generated from the following file:\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -31,29 +31,34 @@\n stbility with the parent-child particles (border particles).\n Definition at line _\b4_\b5 of file _\bh_\ba_\bs_\bh_\b._\bh.\n *\b**\b**\b**\b**\b* M\bMe\bem\bmb\bbe\ber\br D\bDa\bat\bta\ba D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n *\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0e\bet\bta\ba *\b**\b**\b**\b**\b*\n _\bd_\bo_\bu_\bb_\bl_\be siscone::hash_element::eta\n centre: eta coordinate\n Definition at line _\b4_\b8 of file _\bh_\ba_\bs_\bh_\b._\bh.\n+Referenced by _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b), and _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b).\n *\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0i\bis\bs_\b_s\bst\bta\bab\bbl\ble\be *\b**\b**\b**\b**\b*\n _\bb_\bo_\bo_\bl siscone::hash_element::is_stable\n true if stable w.r.t. \"border particles\"\n Definition at line _\b5_\b0 of file _\bh_\ba_\bs_\bh_\b._\bh.\n+Referenced by _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b), and _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b).\n *\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0n\bne\bex\bxt\bt *\b**\b**\b**\b**\b*\n _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt* siscone::hash_element::next\n pointer to the next element\n Definition at line _\b5_\b2 of file _\bh_\ba_\bs_\bh_\b._\bh.\n-Referenced by _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\b~_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b(_\b).\n+Referenced by _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b), _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b), and\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\b~_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b(_\b).\n *\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0p\bph\bhi\bi *\b**\b**\b**\b**\b*\n _\bd_\bo_\bu_\bb_\bl_\be siscone::hash_element::phi\n centre: phi coordinate\n Definition at line _\b4_\b9 of file _\bh_\ba_\bs_\bh_\b._\bh.\n+Referenced by _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b), and _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b).\n *\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0r\bre\bef\bf *\b**\b**\b**\b**\b*\n _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be siscone::hash_element::ref\n reference\n Definition at line _\b4_\b7 of file _\bh_\ba_\bs_\bh_\b._\bh.\n+Referenced by _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b), and _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\b(_\b).\n ===============================================================================\n The documentation for this class was generated from the following file:\n * siscone/_\bh_\ba_\bs_\bh_\b._\bh\n ===============================================================================\n Generated on Tue Jan 7 2025 11:57:28 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/hash_8cpp_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/hash_8cpp_source.html", "unified_diff": "@@ -93,55 +93,55 @@\n
41 **************************************************************/
\n
42
\n
43// constructor with initialisation
\n
44// - _Np number of particles
\n
45// - _R2 cone radius (squared)
\n
46//-----------------------------------
\n
\n-\n+
47hash_cones::hash_cones(int _Np, double _R2){
\n
48 int i;
\n
49
\n
50 n_cones = 0;
\n
51#ifdef DEBUG_STABLE_CONES
\n-\n+
52 n_occupied_cells = 0;
\n
53#endif
\n
54
\n
55 // determine hash size
\n
56 // for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4
\n
57 //mask = 1 << (int) (2*log(double(_Np))/log(2.0));
\n
58 //if (mask<=1) mask=2;
\n-
59 int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0));
\n-
60 if (nbits<1) nbits=1;
\n-
61 mask = 1 << nbits;
\n+
59 int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0));
\n+
60 if (nbits<1) nbits=1;
\n+
61 mask = 1 << nbits;
\n
62
\n
63 // create hash
\n \n
65 mask--;
\n
66
\n
67 // set the array to 0
\n
68 //? needed ?
\n
69 for (i=0;i<mask+1;i++)
\n-
70 hash_array[i] = NULL;
\n+
70 hash_array[i] = NULL;
\n
71
\n-
72 R2 = _R2;
\n+
72 R2 = _R2;
\n
73}
\n
\n
74
\n
75// destructor
\n
76//------------
\n
\n \n
78 int i;
\n-\n+
79 hash_element *elm;
\n
80
\n
81 for (i=0;i<mask+1;i++){
\n-
82 while (hash_array[i]!=NULL){
\n-
83 elm = hash_array[i];
\n+
82 while (hash_array[i]!=NULL){
\n+
83 elm = hash_array[i];
\n
84 hash_array[i] = hash_array[i]->next;
\n-
85 delete elm;
\n+
85 delete elm;
\n
86 }
\n
87 }
\n
88
\n
89 delete[] hash_array;
\n
90}
\n
\n
91
\n@@ -152,71 +152,71 @@\n
96 * - parent parent particle defining the cone
\n
97 * - child child particle defining the cone
\n
98 * - p_io whether the parent has to belong to the cone or not
\n
99 * - c_io whether the child has to belong to the cone or not
\n
100 * return 0 on success, 1 on error
\n
101 ***********************************************************************/
\n
\n-
102int hash_cones::insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io){
\n-\n+
102int hash_cones::insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io){
\n+
103 hash_element *elm;
\n
104 int index = (v->ref.ref[0]) & mask;
\n
105
\n
106 // check the array cell corresponding to our reference
\n-
107 elm = hash_array[index];
\n+
107 elm = hash_array[index];
\n
108
\n
109#ifdef DEBUG_STABLE_CONES
\n-
110 if (elm==NULL)
\n-\n+
110 if (elm==NULL)
\n+
111 n_occupied_cells++;
\n
112#endif
\n
113
\n
114 do{
\n
115 // if it is not present, add it
\n-
116 if (elm==NULL){
\n+
116 if (elm==NULL){
\n
117 // create element
\n-
118 elm = new hash_element;
\n+
118 elm = new hash_element;
\n
119
\n
120 // set its varibles
\n
121 // Note: at this level, eta and phi have already been computed
\n
122 // through Cmomentum::build_etaphi.
\n-
123 elm->ref = v->ref;
\n+
123 elm->ref = v->ref;
\n
124
\n
125 //compute vectors centre
\n
126 v->build_etaphi();
\n-
127 elm->eta = v->eta;
\n-
128 elm->phi = v->phi;
\n+
127 elm->eta = v->eta;
\n+
128 elm->phi = v->phi;
\n
129 // if at least one of the two is_inside tests gives a result != from the expected,
\n
130 // the || will be true hence !(...) false as wanted
\n-
131 elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
\n+
131 elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
\n
132 //cout << "-- new status of " << v->ref[0] << ":" << elm->is_stable << endl;
\n
133
\n
134 // update hash
\n-
135 elm->next = hash_array[index];
\n-
136 hash_array[index] = elm;
\n+
135 elm->next = hash_array[index];
\n+
136 hash_array[index] = elm;
\n
137
\n
138 n_cones++;
\n
139 return 0;
\n
140 }
\n
141
\n
142 // if the cone is already there, simply update stability status
\n-
143 if (v->ref == elm->ref){
\n+
143 if (v->ref == elm->ref){
\n
144 // there is only an update to perform to see if the cone is still stable
\n-
145 if (elm->is_stable){
\n+
145 if (elm->is_stable){
\n
146 v->build_etaphi();
\n-
147 elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
\n+
147 elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
\n
148 //cout << " parent/child: "
\n
149 // << parent->ref[0] << ":" << is_inside(v, parent) << ":" << p_io << " "
\n
150 // << child->ref[0] << ":" << is_inside(v, child) << ":" << c_io << endl;
\n
151 //cout << "-- rep status of " << v->ref[0] << ":" << elm->is_stable << endl;
\n
152 //cout << v->eta << " " << v->phi << endl;
\n
153 //cout << (child->eta) << " " << child->phi << endl;
\n
154 }
\n
155 return 0;
\n
156 }
\n
157
\n-
158 elm = elm->next;
\n+
158 elm = elm->next;
\n
159 } while (1);
\n
160
\n
161 return 1;
\n
162}
\n
\n
163
\n
164/*
\n@@ -224,48 +224,48 @@\n
166 * - v 4-momentum of te cone to add
\n
167 * Note, in this case, we assume stability. We also assume
\n
168 * that eta and phi are computed for v
\n
169 * return 0 on success, 1 on error
\n
170 ***********************************************************************/
\n
\n \n-\n+
172 hash_element *elm;
\n
173 int index = (v->ref.ref[0]) & mask;
\n
174 //cout << "-- stable candidate: " << v->ref[0] << ":" << endl;
\n
175
\n
176 // check the array cell corresponding to our reference
\n-
177 elm = hash_array[index];
\n+
177 elm = hash_array[index];
\n
178 do{
\n
179 // if it is not present, add it
\n-
180 if (elm==NULL){
\n+
180 if (elm==NULL){
\n
181 // create element
\n-
182 elm = new hash_element;
\n+
182 elm = new hash_element;
\n
183
\n
184 // set its varibles
\n
185 // Note: at this level, eta and phi have already been computed
\n
186 // through Cmomentum::build_etaphi.
\n-
187 elm->ref = v->ref;
\n-
188 elm->eta = v->eta;
\n-
189 elm->phi = v->phi;
\n-
190 elm->is_stable = true;
\n+
187 elm->ref = v->ref;
\n+
188 elm->eta = v->eta;
\n+
189 elm->phi = v->phi;
\n+
190 elm->is_stable = true;
\n
191
\n
192 // update hash
\n-
193 elm->next = hash_array[index];
\n-
194 hash_array[index] = elm;
\n+
193 elm->next = hash_array[index];
\n+
194 hash_array[index] = elm;
\n
195
\n
196 n_cones++;
\n
197 return 0;
\n
198 }
\n
199
\n
200 // if the cone is already there, we have nothing to do
\n-
201 if (v->ref == elm->ref){
\n+
201 if (v->ref == elm->ref){
\n
202 return 0;
\n
203 }
\n
204
\n-
205 elm = elm->next;
\n+
205 elm = elm->next;
\n
206 } while (1);
\n
207
\n
208 return 1;
\n
209}
\n
\n
210
\n
211/*
\n@@ -274,43 +274,46 @@\n
214 * centered at 'centre'.
\n
215 * - centre centre of the circle
\n
216 * - v particle to test
\n
217 * return true if inside, false if outside
\n
218 ******************************************************************************/
\n
\n \n-
220 double dx, dy;
\n+
220 double dx, dy;
\n
221
\n-
222 dx = centre->eta - v->eta;
\n-
223 dy = fabs(centre->phi - v->phi);
\n-
224 if (dy>M_PI)
\n-
225 dy -= 2.0*M_PI;
\n+
222 dx = centre->eta - v->eta;
\n+
223 dy = fabs(centre->phi - v->phi);
\n+
224 if (dy>M_PI)
\n+
225 dy -= 2.0*M_PI;
\n
226
\n-
227 return dx*dx+dy*dy<R2;
\n+
227 return dx*dx+dy*dy<R2;
\n
228}
\n
\n
229
\n
230}
\n
base class for dynamic coordinates management
Definition momentum.h:49
\n
Creference ref
reference number for the vector
Definition momentum.h:122
\n
double eta
particle pseudo-rapidity
Definition momentum.h:114
\n
void build_etaphi()
build eta-phi from 4-momentum info !!! WARNING !!! !!! computing eta and phi is time-consuming !...
Definition momentum.cpp:134
\n
double phi
particle azimuthal angle
Definition momentum.h:115
\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
int mask
number of occupied cells
Definition hash.h:104
\n
hash_element ** hash_array
the cone data itself
Definition hash.h:93
\n
int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io)
insert a new candidate into the hash.
Definition hash.cpp:102
\n
double R2
circle radius (squared) NOTE: need to be set before any call to 'insert'
Definition hash.h:108
\n
int n_cones
number of elements
Definition hash.h:96
\n
bool is_inside(Cmomentum *centre, Cmomentum *v)
test if a particle is inside a cone of given centre.
Definition hash.cpp:219
\n
hash_cones(int _Np, double _R2)
constructor with initialisation
Definition hash.cpp:47
\n
~hash_cones()
destructor
Definition hash.cpp:77
\n
information on store cones candidates.
Definition hash.h:45
\n
hash_element * next
pointer to the next element
Definition hash.h:52
\n+
bool is_stable
true if stable w.r.t. "border particles"
Definition hash.h:50
\n+
double eta
centre: eta coordinate
Definition hash.h:48
\n+
Creference ref
reference
Definition hash.h:47
\n+
double phi
centre: phi coordinate
Definition hash.h:49
\n \n \n
\n Generated on Tue Jan 7 2025 11:57:28 for SISCone by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -43,53 +43,53 @@\n 40 * functions to manipulate them. *\n 41 **************************************************************/\n 42\n 43// constructor with initialisation\n 44// - _Np number of particles\n 45// - _R2 cone radius (squared)\n 46//-----------------------------------\n-_\b4_\b7_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs(int _\b__\bN_\bp, double _\b__\bR_\b2){\n+_\b4_\b7_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs(int _Np, double _R2){\n 48 int i;\n 49\n 50 _\bn_\b__\bc_\bo_\bn_\be_\bs = 0;\n 51#ifdef DEBUG_STABLE_CONES\n-52 _\bn_\b__\bo_\bc_\bc_\bu_\bp_\bi_\be_\bd_\b__\bc_\be_\bl_\bl_\bs = 0;\n+52 n_occupied_cells = 0;\n 53#endif\n 54\n 55 // determine hash size\n 56 // for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4\n 57 //mask = 1 << (int) (2*log(double(_Np))/log(2.0));\n 58 //if (mask<=1) mask=2;\n-59 int _\bn_\bb_\bi_\bt_\bs = (_\bi_\bn_\bt) (_\bl_\bo_\bg(_\b__\bN_\bp*_\b__\bR_\b2*_\b__\bN_\bp/4.0)/_\bl_\bo_\bg(2.0));\n-60 if (_\bn_\bb_\bi_\bt_\bs<1) _\bn_\bb_\bi_\bt_\bs=1;\n-61 _\bm_\ba_\bs_\bk = 1 << _\bn_\bb_\bi_\bt_\bs;\n+59 int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0));\n+60 if (nbits<1) nbits=1;\n+61 _\bm_\ba_\bs_\bk = 1 << nbits;\n 62\n 63 // create hash\n 64 _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by = new _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt*[_\bm_\ba_\bs_\bk];\n 65 _\bm_\ba_\bs_\bk--;\n 66\n 67 // set the array to 0\n 68 //? needed ?\n 69 for (i=0;i<_\bm_\ba_\bs_\bk+1;i++)\n-70 _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[i] = _\bN_\bU_\bL_\bL;\n+70 _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[i] = NULL;\n 71\n-72 _\bR_\b2 = _\b__\bR_\b2;\n+72 _\bR_\b2 = _R2;\n 73}\n 74\n 75// destructor\n 76//------------\n _\b7_\b7_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\b~_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs(){\n 78 int i;\n-79 _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt *_\be_\bl_\bm;\n+79 _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt *elm;\n 80\n 81 for (i=0;i<_\bm_\ba_\bs_\bk+1;i++){\n-82 while (_\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[i]!=_\bN_\bU_\bL_\bL){\n-83 _\be_\bl_\bm = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[i];\n+82 while (_\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[i]!=NULL){\n+83 elm = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[i];\n 84 _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[i] = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[i]->_\bn_\be_\bx_\bt;\n-85 delete _\be_\bl_\bm;\n+85 delete elm;\n 86 }\n 87 }\n 88\n 89 delete[] _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by;\n 90}\n 91\n 92\n@@ -99,123 +99,123 @@\n 96 * - parent parent particle defining the cone\n 97 * - child child particle defining the cone\n 98 * - p_io whether the parent has to belong to the cone or not\n 99 * - c_io whether the child has to belong to the cone or not\n 100 * return 0 on success, 1 on error\n 101 ***********************************************************************/\n _\b1_\b0_\b2int _\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v, _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *parent, _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *child,\n-bool _\bp_\b__\bi_\bo, bool _\bc_\b__\bi_\bo){\n-103 _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt *_\be_\bl_\bm;\n+bool p_io, bool c_io){\n+103 _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt *elm;\n 104 int index = (v->_\br_\be_\bf._\br_\be_\bf[0]) & _\bm_\ba_\bs_\bk;\n 105\n 106 // check the array cell corresponding to our reference\n-107 _\be_\bl_\bm = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index];\n+107 elm = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index];\n 108\n 109#ifdef DEBUG_STABLE_CONES\n-110 if (_\be_\bl_\bm==_\bN_\bU_\bL_\bL)\n-111 _\bn_\b__\bo_\bc_\bc_\bu_\bp_\bi_\be_\bd_\b__\bc_\be_\bl_\bl_\bs++;\n+110 if (elm==NULL)\n+111 n_occupied_cells++;\n 112#endif\n 113\n 114 do{\n 115 // if it is not present, add it\n-116 if (_\be_\bl_\bm==_\bN_\bU_\bL_\bL){\n+116 if (elm==NULL){\n 117 // create element\n-118 _\be_\bl_\bm = new _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt;\n+118 elm = new _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt;\n 119\n 120 // set its varibles\n 121 // Note: at this level, eta and phi have already been computed\n 122 // through Cmomentum::build_etaphi.\n-123 _\be_\bl_\bm->ref = v->_\br_\be_\bf;\n+123 elm->_\br_\be_\bf = v->_\br_\be_\bf;\n 124\n 125 //compute vectors centre\n 126 v->_\bb_\bu_\bi_\bl_\bd_\b__\be_\bt_\ba_\bp_\bh_\bi();\n-127 _\be_\bl_\bm->eta = v->_\be_\bt_\ba;\n-128 _\be_\bl_\bm->phi = v->_\bp_\bh_\bi;\n+127 elm->_\be_\bt_\ba = v->_\be_\bt_\ba;\n+128 elm->_\bp_\bh_\bi = v->_\bp_\bh_\bi;\n 129 // if at least one of the two is_inside tests gives a result != from the\n expected,\n 130 // the || will be true hence !(...) false as wanted\n-131 _\be_\bl_\bm->is_stable = !((_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(v, parent)^_\bp_\b__\bi_\bo)||(_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(v,\n-child)^_\bc_\b__\bi_\bo));\n+131 elm->_\bi_\bs_\b__\bs_\bt_\ba_\bb_\bl_\be = !((_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(v, parent)^p_io)||(_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(v,\n+child)^c_io));\n 132 //cout << \"-- new status of \" << v->ref[0] << \":\" << elm->is_stable <<\n endl;\n 133\n 134 // update hash\n-135 _\be_\bl_\bm->next = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index];\n-136 _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index] = _\be_\bl_\bm;\n+135 elm->_\bn_\be_\bx_\bt = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index];\n+136 _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index] = elm;\n 137\n 138 _\bn_\b__\bc_\bo_\bn_\be_\bs++;\n 139 return 0;\n 140 }\n 141\n 142 // if the cone is already there, simply update stability status\n-143 if (v->_\br_\be_\bf == _\be_\bl_\bm->ref){\n+143 if (v->_\br_\be_\bf == elm->_\br_\be_\bf){\n 144 // there is only an update to perform to see if the cone is still stable\n-145 if (_\be_\bl_\bm->is_stable){\n+145 if (elm->_\bi_\bs_\b__\bs_\bt_\ba_\bb_\bl_\be){\n 146 v->_\bb_\bu_\bi_\bl_\bd_\b__\be_\bt_\ba_\bp_\bh_\bi();\n-147 _\be_\bl_\bm->is_stable = !((_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(v, parent)^_\bp_\b__\bi_\bo)||(_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(v,\n-child)^_\bc_\b__\bi_\bo));\n+147 elm->_\bi_\bs_\b__\bs_\bt_\ba_\bb_\bl_\be = !((_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(v, parent)^p_io)||(_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(v,\n+child)^c_io));\n 148 //cout << \" parent/child: \"\n 149 // << parent->ref[0] << \":\" << is_inside(v, parent) << \":\" << p_io << \" \"\n 150 // << child->ref[0] << \":\" << is_inside(v, child) << \":\" << c_io << endl;\n 151 //cout << \"-- rep status of \" << v->ref[0] << \":\" << elm->is_stable <<\n endl;\n 152 //cout << v->eta << \" \" << v->phi << endl;\n 153 //cout << (child->eta) << \" \" << child->phi << endl;\n 154 }\n 155 return 0;\n 156 }\n 157\n-158 _\be_\bl_\bm = _\be_\bl_\bm->next;\n+158 elm = elm->_\bn_\be_\bx_\bt;\n 159 } while (1);\n 160\n 161 return 1;\n 162}\n 163\n 164/*\n 165 * insert a new candidate into the hash.\n 166 * - v 4-momentum of te cone to add\n 167 * Note, in this case, we assume stability. We also assume\n 168 * that eta and phi are computed for v\n 169 * return 0 on success, 1 on error\n 170 ***********************************************************************/\n _\b1_\b7_\b1int _\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v){\n-172 _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt *_\be_\bl_\bm;\n+172 _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt *elm;\n 173 int index = (v->_\br_\be_\bf._\br_\be_\bf[0]) & _\bm_\ba_\bs_\bk;\n 174 //cout << \"-- stable candidate: \" << v->ref[0] << \":\" << endl;\n 175\n 176 // check the array cell corresponding to our reference\n-177 _\be_\bl_\bm = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index];\n+177 elm = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index];\n 178 do{\n 179 // if it is not present, add it\n-180 if (_\be_\bl_\bm==_\bN_\bU_\bL_\bL){\n+180 if (elm==NULL){\n 181 // create element\n-182 _\be_\bl_\bm = new _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt;\n+182 elm = new _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt;\n 183\n 184 // set its varibles\n 185 // Note: at this level, eta and phi have already been computed\n 186 // through Cmomentum::build_etaphi.\n-187 _\be_\bl_\bm->ref = v->_\br_\be_\bf;\n-188 _\be_\bl_\bm->eta = v->_\be_\bt_\ba;\n-189 _\be_\bl_\bm->phi = v->_\bp_\bh_\bi;\n-190 _\be_\bl_\bm->is_stable = true;\n+187 elm->_\br_\be_\bf = v->_\br_\be_\bf;\n+188 elm->_\be_\bt_\ba = v->_\be_\bt_\ba;\n+189 elm->_\bp_\bh_\bi = v->_\bp_\bh_\bi;\n+190 elm->_\bi_\bs_\b__\bs_\bt_\ba_\bb_\bl_\be = true;\n 191\n 192 // update hash\n-193 _\be_\bl_\bm->next = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index];\n-194 _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index] = _\be_\bl_\bm;\n+193 elm->_\bn_\be_\bx_\bt = _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index];\n+194 _\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by[index] = elm;\n 195\n 196 _\bn_\b__\bc_\bo_\bn_\be_\bs++;\n 197 return 0;\n 198 }\n 199\n 200 // if the cone is already there, we have nothing to do\n-201 if (v->_\br_\be_\bf == _\be_\bl_\bm->ref){\n+201 if (v->_\br_\be_\bf == elm->_\br_\be_\bf){\n 202 return 0;\n 203 }\n 204\n-205 _\be_\bl_\bm = _\be_\bl_\bm->next;\n+205 elm = elm->_\bn_\be_\bx_\bt;\n 206 } while (1);\n 207\n 208 return 1;\n 209}\n 210\n 211/*\n 212 * test if a particle is inside a cone of given centre.\n@@ -223,22 +223,22 @@\n 214 * centered at 'centre'.\n 215 * - centre centre of the circle\n 216 * - v particle to test\n 217 * return true if inside, false if outside\n 218\n ******************************************************************************/\n _\b2_\b1_\b9inline bool _\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *centre, _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v){\n-220 double _\bd_\bx, _\bd_\by;\n+220 double dx, dy;\n 221\n-222 _\bd_\bx = centre->_\be_\bt_\ba - v->_\be_\bt_\ba;\n-223 _\bd_\by = _\bf_\ba_\bb_\bs(centre->_\bp_\bh_\bi - v->_\bp_\bh_\bi);\n-224 if (_\bd_\by>M_PI)\n-225 _\bd_\by -= 2.0*M_PI;\n+222 dx = centre->_\be_\bt_\ba - v->_\be_\bt_\ba;\n+223 dy = fabs(centre->_\bp_\bh_\bi - v->_\bp_\bh_\bi);\n+224 if (dy>M_PI)\n+225 dy -= 2.0*M_PI;\n 226\n-227 return _\bd_\bx*_\bd_\bx+_\bd_\by*_\bd_\by<_\bR_\b2;\n+227 return dx*dx+dy*dy<_\bR_\b2;\n 228}\n 229\n 230}\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm\n base class for dynamic coordinates management\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b._\bh_\b:_\b4_\b9\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\br_\be_\bf\n@@ -258,18 +258,14 @@\n double phi\n particle azimuthal angle\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b._\bh_\b:_\b1_\b1_\b5\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 _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bm_\ba_\bs_\bk\n int mask\n number of occupied cells\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b1_\b0_\b4\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by\n hash_element ** hash_array\n the cone data itself\n@@ -302,9 +298,25 @@\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt\n information on store cones candidates.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b4_\b5\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\bn_\be_\bx_\bt\n hash_element * next\n pointer to the next element\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b5_\b2\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\bi_\bs_\b__\bs_\bt_\ba_\bb_\bl_\be\n+bool is_stable\n+true if stable w.r.t. \"border particles\"\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b5_\b0\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\be_\bt_\ba\n+double eta\n+centre: eta coordinate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b4_\b8\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\br_\be_\bf\n+Creference ref\n+reference\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b4_\b7\n+_\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt_\b:_\b:_\bp_\bh_\bi\n+double phi\n+centre: phi coordinate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b4_\b9\n ===============================================================================\n Generated on Tue Jan 7 2025 11:57:28 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/hash_8h_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/hash_8h_source.html", "unified_diff": "@@ -95,43 +95,42 @@\n
52 hash_element *next;
\n
53};
\n \n
54
\n
\n \n
63 public:
\n-
67 hash_cones(int _Np, double _R2);
\n+
67 hash_cones(int _Np, double _R2);
\n
68
\n \n
71
\n-
81 int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io);
\n+
81 int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io);
\n
82
\n
90 int insert(Cmomentum *v);
\n
91
\n \n
94
\n \n
97
\n
99#ifdef DEBUG_STABLE_CONES
\n-\n+
100 int n_occupied_cells;
\n
101#endif
\n
102
\n
104 int mask;
\n
105
\n
108 double R2;
\n
109
\n
118 inline bool is_inside(Cmomentum *centre, Cmomentum *v);
\n
119};
\n
\n
120
\n
121}
\n
122#endif
\n
base class for dynamic coordinates management
Definition momentum.h:49
\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
list of cones candidates.
Definition hash.h:62
\n
int mask
number of occupied cells
Definition hash.h:104
\n
hash_element ** hash_array
the cone data itself
Definition hash.h:93
\n
int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io)
insert a new candidate into the hash.
Definition hash.cpp:102
\n
double R2
circle radius (squared) NOTE: need to be set before any call to 'insert'
Definition hash.h:108
\n
int n_cones
number of elements
Definition hash.h:96
\n
bool is_inside(Cmomentum *centre, Cmomentum *v)
test if a particle is inside a cone of given centre.
Definition hash.cpp:219
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -43,29 +43,29 @@\n _\b5_\b0 bool _\bi_\bs_\b__\bs_\bt_\ba_\bb_\bl_\be;\n 51\n _\b5_\b2 _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt *_\bn_\be_\bx_\bt;\n 53};\n 54\n _\b6_\b2class _\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs{\n 63 public:\n-67 _\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs(int _\b__\bN_\bp, double _\b__\bR_\b2);\n+67 _\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs(int _Np, double _R2);\n 68\n 70 _\b~_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs();\n 71\n-81 int _\bi_\bn_\bs_\be_\br_\bt(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v, _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *parent, _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *child, bool _\bp_\b__\bi_\bo,\n-bool _\bc_\b__\bi_\bo);\n+81 int _\bi_\bn_\bs_\be_\br_\bt(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v, _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *parent, _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *child, bool p_io,\n+bool c_io);\n 82\n 90 int _\bi_\bn_\bs_\be_\br_\bt(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v);\n 91\n _\b9_\b3 _\bh_\ba_\bs_\bh_\b__\be_\bl_\be_\bm_\be_\bn_\bt **_\bh_\ba_\bs_\bh_\b__\ba_\br_\br_\ba_\by;\n 94\n _\b9_\b6 int _\bn_\b__\bc_\bo_\bn_\be_\bs;\n 97\n 99#ifdef DEBUG_STABLE_CONES\n-100 int _\bn_\b__\bo_\bc_\bc_\bu_\bp_\bi_\be_\bd_\b__\bc_\be_\bl_\bl_\bs;\n+100 int n_occupied_cells;\n 101#endif\n 102\n _\b1_\b0_\b4 int _\bm_\ba_\bs_\bk;\n 105\n _\b1_\b0_\b8 double _\bR_\b2;\n 109\n 118 inline bool _\bi_\bs_\b__\bi_\bn_\bs_\bi_\bd_\be(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *centre, _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v);\n@@ -75,18 +75,14 @@\n 122#endif\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm\n base class for dynamic coordinates management\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b._\bh_\b:_\b4_\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 _\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 _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bh_\ba_\bs_\bh_\b__\bc_\bo_\bn_\be_\bs_\b:_\b:_\bm_\ba_\bs_\bk\n int mask\n number of occupied cells\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bh_\ba_\bs_\bh_\b._\bh_\b:_\b1_\b0_\b4\n"}]}, {"source1": "./usr/share/doc/siscone-doc-html/html/devel/momentum_8cpp_source.html", "source2": "./usr/share/doc/siscone-doc-html/html/devel/momentum_8cpp_source.html", "unified_diff": "@@ -100,34 +100,34 @@\n
47 index = -1;
\n
48}
\n \n
49
\n
50// ctor with initialisation
\n
51//--------------------------
\n
\n-
52Cmomentum::Cmomentum(double _px, double _py, double _pz, double _E){
\n-
53 px = _px;
\n-
54 py = _py;
\n-
55 pz = _pz;
\n-
56 E = _E;
\n+
52Cmomentum::Cmomentum(double _px, double _py, double _pz, double _E){
\n+
53 px = _px;
\n+
54 py = _py;
\n+
55 pz = _pz;
\n+
56 E = _E;
\n
57
\n
58 // compute eta and phi
\n \n
60 ref = Creference();
\n
61}
\n
\n
62
\n
63// ctor with detailed initialisation
\n
64//-----------------------------------
\n
\n-\n-
66 eta = _eta;
\n+
65Cmomentum::Cmomentum(double _eta, double _phi, Creference _ref){
\n+
66 eta = _eta;
\n
67 phi = _phi;
\n
68
\n-
69 ref = _ref;
\n+
69 ref = _ref;
\n
70}
\n
\n
71
\n
72// default dtor
\n
73//--------------
\n
\n \n@@ -153,16 +153,16 @@\n
\n
92
\n
93// addition of vectors
\n
94// !!! WARNING !!! no updating of eta and phi !!!
\n
95//------------------------------------------------
\n
\n \n-
97 Cmomentum tmp = *this;
\n-
98 return tmp+=v;
\n+
97 Cmomentum tmp = *this;
\n+
98 return tmp+=v;
\n
99}
\n
\n
100
\n
101// incrementation of vectors
\n
102// !!! WARNING !!! no updating of eta and phi !!!
\n
103//------------------------------------------------
\n
\n@@ -198,25 +198,25 @@\n
130// !!! computing eta and phi is time-consuming !!!
\n
131// !!! use this whenever you need eta or phi !!!
\n
132// !!! automatically called for single-particle !!!
\n
133//--------------------------------------------------
\n
\n \n
135 // note: the factor n (ref.nb) cancels in all expressions !!
\n-
136 eta = 0.5*log((E+pz)/(E-pz));
\n-
137 phi = atan2(py,px);
\n+
136 eta = 0.5*log((E+pz)/(E-pz));
\n+
137 phi = atan2(py,px);
\n
138}
\n
\n
139
\n
140
\n
141// ordering of two vectors
\n
142// the default ordering is w.r.t. their references
\n
143//-------------------------------------------------
\n-
144bool operator < (const Cmomentum &v1, const Cmomentum &v2){
\n-
145 return v1.ref < v2.ref;
\n+
144bool operator < (const Cmomentum &v1, const Cmomentum &v2){
\n+
145 return v1.ref < v2.ref;
\n
146}
\n
147
\n
148// ordering of vectors in eta (e.g. used in collinear tests)
\n
149//-----------------------------------------------------------
\n
150bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2){
\n
151 return v1.eta < v2.eta;
\n
152}
\n@@ -242,15 +242,14 @@\n
double px
x-momentum
Definition momentum.h:109
\n
Cmomentum & operator=(const Cmomentum &v)
assignment of vectors
Definition momentum.cpp:80
\n
double E
energy
Definition momentum.h:112
\n
double pz
z-momentum
Definition momentum.h:111
\n
Cmomentum()
default ctor
Definition momentum.cpp:42
\n
double phi
particle azimuthal angle
Definition momentum.h:115
\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 7 2025 11:57:28 for SISCone by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -48,32 +48,32 @@\n 45 _\bp_\bx = _\bp_\by = _\bp_\bz = _\bE = 0.0;\n 46 _\br_\be_\bf = _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be();\n 47 _\bi_\bn_\bd_\be_\bx = -1;\n 48}\n 49\n 50// ctor with initialisation\n 51//--------------------------\n-_\b5_\b2_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm(double _\b__\bp_\bx, double _\b__\bp_\by, double _\b__\bp_\bz, double _\b__\bE){\n-53 _\bp_\bx = _\b__\bp_\bx;\n-54 _\bp_\by = _\b__\bp_\by;\n-55 _\bp_\bz = _\b__\bp_\bz;\n-56 _\bE = _\b__\bE;\n+_\b5_\b2_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm(double _px, double _py, double _pz, double _E){\n+53 _\bp_\bx = _px;\n+54 _\bp_\by = _py;\n+55 _\bp_\bz = _pz;\n+56 _\bE = _E;\n 57\n 58 // compute eta and phi\n 59 _\bb_\bu_\bi_\bl_\bd_\b__\be_\bt_\ba_\bp_\bh_\bi();\n 60 _\br_\be_\bf = _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be();\n 61}\n 62\n 63// ctor with detailed initialisation\n 64//-----------------------------------\n-_\b6_\b5_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm(double _\b__\be_\bt_\ba, double _phi, _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _\b__\br_\be_\bf){\n-66 _\be_\bt_\ba = _\b__\be_\bt_\ba;\n+_\b6_\b5_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm(double _eta, double _phi, _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be _ref){\n+66 _\be_\bt_\ba = _eta;\n 67 _\bp_\bh_\bi = _phi;\n 68\n-69 _\br_\be_\bf = _\b__\br_\be_\bf;\n+69 _\br_\be_\bf = _ref;\n 70}\n 71\n 72// default dtor\n 73//--------------\n _\b7_\b4_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\b~_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm(){\n 75\n 76}\n@@ -93,16 +93,16 @@\n 90 return *this;\n 91}\n 92\n 93// addition of vectors\n 94// !!! WARNING !!! no updating of eta and phi !!!\n 95//------------------------------------------------\n _\b9_\b6const _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b (const _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm &v){\n-97 _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm _\bt_\bm_\bp = *this;\n-98 return _\bt_\bm_\bp+=v;\n+97 _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm tmp = *this;\n+98 return tmp+=v;\n 99}\n 100\n 101// incrementation of vectors\n 102// !!! WARNING !!! no updating of eta and phi !!!\n 103//------------------------------------------------\n _\b1_\b0_\b4_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm& _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b+_\b=_\b (const _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm &v){\n 105 _\bp_\bx+=v._\bp_\bx;\n@@ -132,24 +132,24 @@\n 129// !!! WARNING !!!\n 130// !!! computing eta and phi is time-consuming !!!\n 131// !!! use this whenever you need eta or phi !!!\n 132// !!! automatically called for single-particle !!!\n 133//--------------------------------------------------\n _\b1_\b3_\b4void _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bb_\bu_\bi_\bl_\bd_\b__\be_\bt_\ba_\bp_\bh_\bi(){\n 135 // note: the factor n (ref.nb) cancels in all expressions !!\n-136 _\be_\bt_\ba = 0.5*_\bl_\bo_\bg((_\bE+_\bp_\bz)/(_\bE-_\bp_\bz));\n-137 _\bp_\bh_\bi = _\ba_\bt_\ba_\bn_\b2(_\bp_\by,_\bp_\bx);\n+136 _\be_\bt_\ba = 0.5*log((_\bE+_\bp_\bz)/(_\bE-_\bp_\bz));\n+137 _\bp_\bh_\bi = atan2(_\bp_\by,_\bp_\bx);\n 138}\n 139\n 140\n 141// ordering of two vectors\n 142// the default ordering is w.r.t. their references\n 143//-------------------------------------------------\n-144bool _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b _\b<_\b (const _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm &_\bv_\b1, const _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm &_\bv_\b2){\n-145 return _\bv_\b1.ref < _\bv_\b2.ref;\n+144bool operator < (const _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm &v1, const _\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm &v2){\n+145 return v1._\br_\be_\bf < v2._\br_\be_\bf;\n 146}\n 147\n 148// ordering of vectors in eta (e.g. used in collinear tests)\n 149//-----------------------------------------------------------\n 150bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2){\n 151 return v1.eta < v2.eta;\n 152}\n@@ -225,13 +225,9 @@\n _\bs_\bi_\bs_\bc_\bo_\bn_\be_\b:_\b:_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b:_\b:_\bp_\bh_\bi\n double phi\n particle azimuthal angle\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm_\b._\bh_\b:_\b1_\b1_\b5\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 7 2025 11:57:28 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-\n+
61 init(_x, _y, _half_size_x, _half_size_y);
\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-\n-\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
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-\n-\n-\n-\n-\n-\n-\n-\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
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-\n-
160 *v+=*v_add;
\n+
159 children[v_add->eta>centre_x][v_add->phi>centre_y]->add(v_add);
\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-\n+
176Creference Cquadtree::circle_intersect(double cx, double cy, double cR2){
\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-\n-
222 if (dx<0) dx=0;
\n-\n-
224 if (dy<0) dy=0;
\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
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-\n-\n-
237 if (dy>M_PI) dy = M_PI;
\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
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-\n+
261int Cquadtree::save(FILE *flux){
\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,15 +385,14 @@\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 7 2025 11:57:28 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 = _\bN_\bU_\bL_\bL;\n+46 _\bv = NULL;\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] = _\bN_\bU_\bL_\bL;\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 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 _\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+_\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 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] = _\bN_\bU_\bL_\bL;\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 59 _\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd = false;\n 60\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+61 _\bi_\bn_\bi_\bt(_x, _y, _half_size_x, _half_size_y);\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!=_\bN_\bU_\bL_\bL) delete _\bv;\n+71 if (_\bv!=NULL) 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 _\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+_\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 93 return 1;\n 94\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+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 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 *_\bv_\b__\ba_\bd_\bd){\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 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==_\bN_\bU_\bL_\bL){\n-127 _\bv = _\bv_\b__\ba_\bd_\bd;\n+126 if (_\bv==NULL){\n+127 _\bv = 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 (!_\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd){\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+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 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-_\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+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 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[_\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+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 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 _\bc_\bx, double _\bc_\by, double _\bc_\bR_\b2){\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 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==_\bN_\bU_\bL_\bL)\n+188 if (_\bv==NULL)\n 189 return _\bC_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be();\n 190\n-191 double _\bd_\bx, _\bd_\by;\n+191 double dx, dy;\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 _\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+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 202\n 203 // test distance\n-204 if (_\bd_\bx*_\bd_\bx+_\bd_\by*_\bd_\by<_\bc_\bR_\b2){\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 _\bd_\bx_\b__\bc, _\bd_\by_\b__\bc;\n+213 double dx_c, dy_c;\n 214\n 215 // store distance with the centre of the square\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+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 219\n 220 // compute (minimal) the distance (pay attention to the periodicity in\n phi).\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+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 225\n 226 // check the distance\n-227 if (_\bd_\bx*_\bd_\bx+_\bd_\by*_\bd_\by>=_\bc_\bR_\b2){\n+227 if (dx*dx+dy*dy>=cR2){\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 _\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+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 238\n 239 // compute the distance\n-240 if (_\bd_\bx*_\bd_\bx+_\bd_\by*_\bd_\by<_\bc_\bR_\b2){\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(_\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+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 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(_\bF_\bI_\bL_\bE *_\bf_\bl_\bu_\bx){\n+_\b2_\b6_\b1int _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be_\b:_\b:_\bs_\ba_\bv_\be(FILE *flux){\n 262\n-263 if (_\bf_\bl_\bu_\bx==_\bN_\bU_\bL_\bL)\n+263 if (flux==NULL)\n 264 return 1;\n 265\n 266 if (_\bh_\ba_\bs_\b__\bc_\bh_\bi_\bl_\bd){\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+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 _\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(_\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+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 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(_\bF_\bI_\bL_\bE *_\bf_\bl_\bu_\bx){\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 288\n-289 if (_\bf_\bl_\bu_\bx==_\bN_\bU_\bL_\bL)\n+289 if (flux==NULL)\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]!=_\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+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 297 } else {\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+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 _\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,13 +387,9 @@\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 7 2025 11:57:28 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,15 +130,14 @@\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 7 2025 11:57:28 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 _\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+49 _\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be(double _x, double _y, double _half_size_x, double _half_size_y);\n 50\n 54 _\b~_\bC_\bq_\bu_\ba_\bd_\bt_\br_\be_\be();\n 55\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+67 int _\bi_\bn_\bi_\bt(double _x, double _y, double _half_size_x, double _half_size_y);\n 68\n-76 int _\ba_\bd_\bd(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *_\bv_\b__\ba_\bd_\bd);\n+76 int _\ba_\bd_\bd(_\bC_\bm_\bo_\bm_\be_\bn_\bt_\bu_\bm *v_add);\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 _\bc_\bx, double _\bc_\by, double _\bc_\bR_\b2);\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 89\n-99 int _\bs_\ba_\bv_\be(_\bF_\bI_\bL_\bE *_\bf_\bl_\bu_\bx);\n+99 int _\bs_\ba_\bv_\be(FILE *flux);\n 100\n-110 int _\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(_\bF_\bI_\bL_\bE *_\bf_\bl_\bu_\bx);\n+110 int _\bs_\ba_\bv_\be_\b__\bl_\be_\ba_\bv_\be_\bs(FILE *flux);\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,13 +128,9 @@\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 7 2025 11:57:28 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,15 +220,14 @@\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 7 2025 11:57:28 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 _\bd_\be_\bl_\bt_\ba = 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 (_\bd_\be_\bl_\bt_\ba & mask_hi){\n+69 if (delta & mask_hi){\n 70 local_ranlux_state.carry = 1;\n-71 _\bd_\be_\bl_\bt_\ba &= 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@@ -168,16 +168,12 @@\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,15 +191,14 @@\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 7 2025 11:57:28 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 _\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+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 _\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+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 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 &_\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+_\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 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 &_\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+_\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 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 &_\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+_\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 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 &_\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+_\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 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,14 +155,10 @@\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 7 2025 11:57:28 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-\n+
76Creference operator + (Creference &r1, Creference &r2);
\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,15 +146,14 @@\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 7 2025 11:57:28 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 &_\br);\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 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 &_\br);\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 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 &_\br);\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 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 &_\br);\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 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 _\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+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 77\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+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 80\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+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 83\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+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 86\n 87\n 88//=============== inline material ================\n 89\n 90// equality test for two references\n 91//----------------------------------\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+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 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,13 +129,9 @@\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 7 2025 11:57:28 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,15 +112,14 @@\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 7 2025 11:57:28 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 & _\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+_\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 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 _\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+_\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 57\n 58private:\n 59 std::string m_message;\n 60 static bool m_print_errors;\n 61};\n 62\n 63}\n@@ -72,13 +72,9 @@\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 7 2025 11:57:28 for SISCone by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}]}]}]}, {"source1": "siscone-doc-pdf_3.0.5-3_all.deb", "source2": "siscone-doc-pdf_3.0.5-3_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 2025-01-07 11:57:28.000000 debian-binary\n -rw-r--r-- 0 0 0 808 2025-01-07 11:57:28.000000 control.tar.xz\n--rw-r--r-- 0 0 0 1651620 2025-01-07 11:57:28.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 1644796 2025-01-07 11:57:28.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-pdf\n Source: siscone\n Version: 3.0.5-3\n Architecture: all\n Maintainer: Debian Science Maintainers \n-Installed-Size: 1624\n+Installed-Size: 1617\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 (PDF)\n SISCone implements a Seedless Infrared (IR) Safe Cone jet algorithm, it takes\n N^2*ln(N) time to find jets among N particles, comparing to N*2^N time of\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": "@@ -3,10 +3,10 @@\n drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/\n drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/doc/\n drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/\n -rw-r--r-- 0 root (0) root (0) 1083 2025-01-07 11:57:28.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 2025-01-07 11:56:31.000000 ./usr/share/doc/siscone-doc-pdf/copyright\n drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/pdf/\n--rw-r--r-- 0 root (0) root (0) 1631580 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz\n+-rw-r--r-- 0 root (0) root (0) 1624858 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz\n drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/doc-base/\n -rw-r--r-- 0 root (0) root (0) 240 2025-01-07 11:56:31.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": "@@ -1577,15 +1577,15 @@\n 4.33.2.2 \u223chash_cones() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166\n 4.33.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166\n 4.33.3.1 insert() [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166\n 4.33.3.2 insert() [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166\n 4.33.3.3 is_inside() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167\n 4.33.4 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167\n 4.33.4.1 hash_array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167\n-4.33.4.2 mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167\n+4.33.4.2 mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168\n 4.33.4.3 n_cones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168\n 4.33.4.4 R2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168\n 4.34 siscone::hash_element Class Reference\n \n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168\n \n 4.34.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169\n@@ -1600,25 +1600,25 @@\n \n \fxiv\n \n 4.35 siscone::ranlux_state_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170\n 4.35.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170\n 4.35.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170\n 4.35.2.1 carry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170\n-4.35.2.2 i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170\n+4.35.2.2 i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171\n 4.35.2.3 j . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171\n 4.35.2.4 n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171\n 4.35.2.5 skip\n \n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171\n \n 4.35.2.6 u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171\n 4.36 siscone_spherical::sph_hash_cones Class Reference\n \n-. . . . . . . . . . . . . . . . . . . . . . . . 171\n+. . . . . . . . . . . . . . . . . . . . . . . . 172\n \n 4.36.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173\n 4.36.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 173\n 4.36.2.1 sph_hash_cones() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173\n 4.36.2.2 \u223csph_hash_cones() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173\n 4.36.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173\n 4.36.3.1 insert() [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173\n@@ -1635,35 +1635,35 @@\n 4.37.2.1 centre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177\n 4.37.2.2 is_stable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177\n 4.37.2.3 next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177\n 5 File Documentation\n \n 179\n \n-5.1 area.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179\n-5.2 area.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180\n-5.3 main.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184\n-5.4 options.cpp\n+5.1 main.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179\n+5.2 options.cpp\n \n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180\n \n-5.5 options.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189\n-5.6 sample.cpp\n+5.3 options.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183\n+5.4 sample.cpp\n \n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184\n \n-5.7 spherical.cpp\n+5.5 spherical.cpp\n \n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185\n \n-5.8 test.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192\n-5.9 times.cpp\n+5.6 test.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186\n+5.7 times.cpp\n \n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188\n \n+5.8 area.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189\n+5.9 area.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191\n 5.10 area.h\n \n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195\n \n 5.11 circulator.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n@@ -1683,66 +1683,66 @@\n 5.14.1.4 PT_TSHOLD\n \n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201\n \n 5.14.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201\n 5.14.2.1 twopi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201\n 5.15 defines.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201\n-5.16 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202\n-5.17 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204\n-5.18 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206\n-5.19 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207\n-5.20 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208\n-5.21 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210\n-5.22 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212\n-5.23 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222\n-5.24 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231\n-5.25 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233\n-5.26 quadtree.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235\n-5.27 quadtree.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239\n-5.28 ranlux.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239\n-5.29 siscone/ranlux.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242\n-5.29.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242\n-5.29.1.1 ranlux_get() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242\n-5.29.1.2 ranlux_init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242\n-5.29.1.3 ranlux_print_state() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242\n-5.30 ranlux.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243\n-5.31 reference.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243\n-5.32 reference.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245\n-5.33 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246\n-5.34 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247\n-5.35 siscone_error.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248\n-5.36 siscone_error.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248\n-5.37 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249\n-5.38 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252\n-5.39 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254\n-5.40 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255\n-5.41 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256\n-5.42 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258\n+5.16 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202\n+5.17 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205\n+5.18 quadtree.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207\n+5.19 quadtree.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211\n+5.20 ranlux.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212\n+5.21 siscone/ranlux.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214\n+5.21.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214\n+5.21.1.1 ranlux_get() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214\n+5.21.1.2 ranlux_init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214\n+5.21.1.3 ranlux_print_state() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215\n+5.22 ranlux.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215\n+5.23 reference.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215\n+5.24 reference.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217\n+5.25 siscone_error.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218\n+5.26 siscone_error.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218\n+5.27 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219\n+5.28 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221\n+5.29 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223\n+5.30 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224\n+5.31 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225\n+5.32 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226\n+5.33 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227\n+5.34 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229\n+5.35 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232\n+5.36 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234\n+5.37 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236\n+5.38 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246\n+5.39 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255\n+5.40 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257\n+5.41 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259\n+5.42 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \fxvi\n \n-5.43 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261\n-5.44 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265\n-5.45 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268\n-5.46 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269\n-5.47 split_merge.cpp\n-\n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271\n-\n-5.48 split_merge.cpp\n-\n-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285\n-\n-5.49 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298\n-5.50 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301\n-5.51 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303\n-5.52 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307\n+5.43 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266\n+5.44 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267\n+5.45 split_merge.cpp\n+\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268\n+\n+5.46 split_merge.cpp\n+\n+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282\n+\n+5.47 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295\n+5.48 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298\n+5.49 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301\n+5.50 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304\n+5.51 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308\n+5.52 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309\n Index\n \n 311\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \fChapter 1\n@@ -1826,15 +1826,15 @@\n siscone_spherical::sph_hash_cones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone_spherical::sph_hash_element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n \n 163\n 164\n 168\n 170\n-171\n+172\n 176\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \fChapter 2\n \n Class Index\n@@ -1958,15 +1958,15 @@\n 153\n 160\n \n 163\n 164\n 168\n 170\n-171\n+172\n 176\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \fChapter 3\n \n File Index\n@@ -2009,49 +2009,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 7 2025 11:57:28 for SISCone by Doxygen\n \n+189\n 179\n+180\n+183\n 184\n+185\n 186\n-189\n-189\n+188\n 191\n-192\n-193\n-180\n 195\n 196\n 197\n 198\n 199\n+219\n+223\n 202\n-206\n-249\n-254\n-256\n-208\n+225\n+227\n+232\n+236\n+255\n+207\n+211\n 212\n-231\n-235\n-239\n-239\n-242\n-243\n-245\n-261\n-246\n-248\n-248\n-285\n-301\n-307\n+214\n+215\n+217\n+259\n+266\n+218\n+218\n+282\n+298\n+304\n \n \f6\n \n File Index\n \n siscone/vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n siscone/spherical/geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n@@ -2065,29 +2065,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-269\n-204\n-207\n-252\n-255\n-258\n-210\n-222\n-233\n-265\n-247\n-271\n-298\n-303\n+309\n+221\n+224\n+205\n+226\n+229\n+234\n+246\n+257\n+263\n+267\n 268\n+295\n+301\n+308\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \fChapter 4\n \n Class Documentation\n \n@@ -11656,16 +11656,17 @@\n 4-momentum of te cone to add Note, in this case, we assume stability. We also assume that eta and phi are\n computed for v\n \n Returns\n 0 on success, 1 on error\n \n Definition at line 171 of file hash.cpp.\n-References siscone::Cmomentum::eta, hash_array, mask, n_cones, siscone::Cmomentum::phi, siscone::Cmomentum::ref,\n-and siscone::Creference::ref.\n+References siscone::hash_element::eta, siscone::Cmomentum::eta, hash_array, siscone::hash_element::is_stable,\n+mask, n_cones, siscone::hash_element::next, siscone::hash_element::phi, siscone::Cmomentum::phi, siscone::hash_element::ref,\n+siscone::Cmomentum::ref, and siscone::Creference::ref.\n \n 4.33.3.2\n \n insert() [2/2]\n \n int siscone::hash_cones::insert (\n Cmomentum \u2217 v,\n@@ -11700,38 +11701,41 @@\n \n 167\n \n Returns\n 0 on success, 1 on error\n \n Definition at line 102 of file hash.cpp.\n-References siscone::Cmomentum::build_etaphi(), siscone::Cmomentum::eta, hash_array, is_inside(), mask,\n-n_cones, siscone::Cmomentum::phi, siscone::Cmomentum::ref, and siscone::Creference::ref.\n+References siscone::Cmomentum::build_etaphi(),\n+siscone::hash_element::eta,\n+siscone::Cmomentum::eta,\n+hash_array, is_inside(), siscone::hash_element::is_stable, mask, n_cones, siscone::hash_element::next,\n+siscone::hash_element::phi, siscone::Cmomentum::phi, siscone::hash_element::ref, siscone::Cmomentum::ref,\n+and siscone::Creference::ref.\n \n 4.33.3.3\n \n is_inside()\n \n bool siscone::hash_cones::is_inside (\n Cmomentum \u2217 centre,\n-Cmomentum \u2217 v )\n-\n-[inline]\n+Cmomentum \u2217 v ) [inline]\n \n test if a particle is inside a cone of given centre.\n check if the particle of coordinates 'v' is inside the circle of radius R centered at 'centre'.\n Parameters\n centre\n v\n \n centre of the circle\n particle to test\n \n Returns\n true if inside, false if outside\n+\n Definition at line 219 of file hash.cpp.\n References siscone::Cmomentum::eta, siscone::Cmomentum::phi, and R2.\n Referenced by insert().\n \n 4.33.4\n \n Member Data Documentation\n@@ -11742,29 +11746,30 @@\n \n hash_element\u2217\u2217 siscone::hash_cones::hash_array\n \n the cone data itself\n Definition at line 93 of file hash.h.\n Referenced by hash_cones(), insert(), insert(), and \u223chash_cones().\n \n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f168\n+\n+Class Documentation\n+\n 4.33.4.2\n \n mask\n \n int siscone::hash_cones::mask\n \n number of occupied cells\n number of cells-1\n Definition at line 104 of file hash.h.\n Referenced by hash_cones(), insert(), insert(), and \u223chash_cones().\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f168\n-\n-Class Documentation\n \n 4.33.4.3\n \n n_cones\n \n int siscone::hash_cones::n_cones\n \n@@ -11778,15 +11783,14 @@\n \n double siscone::hash_cones::R2\n \n circle radius (squared) NOTE: need to be set before any call to 'insert'\n Definition at line 108 of file hash.h.\n Referenced by hash_cones(), and is_inside().\n The documentation for this class was generated from the following files:\n-\n \u2022 siscone/hash.h\n \u2022 siscone/hash.cpp\n \n 4.34\n \n siscone::hash_element Class Reference\n \n@@ -11840,57 +11844,62 @@\n \n eta\n \n double siscone::hash_element::eta\n \n centre: eta coordinate\n Definition at line 48 of file hash.h.\n+Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert().\n \n 4.34.2.2\n \n is_stable\n \n bool siscone::hash_element::is_stable\n \n true if stable w.r.t. \"border particles\"\n Definition at line 50 of file hash.h.\n+Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert().\n \n 4.34.2.3\n \n next\n \n hash_element\u2217 siscone::hash_element::next\n \n pointer to the next element\n Definition at line 52 of file hash.h.\n-Referenced by siscone::hash_cones::\u223chash_cones().\n+Referenced by siscone::hash_cones::insert(), siscone::hash_cones::insert(), and siscone::hash_cones::\u223chash_cones().\n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \f170\n \n Class Documentation\n \n 4.34.2.4\n \n phi\n \n double siscone::hash_element::phi\n \n centre: phi coordinate\n Definition at line 49 of file hash.h.\n+Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert().\n \n 4.34.2.5\n \n ref\n \n Creference siscone::hash_element::ref\n \n reference\n Definition at line 47 of file hash.h.\n+Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert().\n The documentation for this class was generated from the following file:\n+\n \u2022 siscone/hash.h\n \n 4.35\n \n siscone::ranlux_state_t Struct Reference\n \n Public Attributes\n@@ -11914,25 +11923,25 @@\n 4.35.2.1\n \n carry\n \n unsigned int siscone::ranlux_state_t::carry\n \n Definition at line 51 of file ranlux.cpp.\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f4.35 siscone::ranlux_state_t Struct Reference\n \n 4.35.2.2\n \n i\n \n unsigned int siscone::ranlux_state_t::i\n \n Definition at line 47 of file ranlux.cpp.\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f4.36 siscone_spherical::sph_hash_cones Class Reference\n \n 4.35.2.3\n \n j\n \n unsigned int siscone::ranlux_state_t::j\n \n@@ -11961,30 +11970,29 @@\n unsigned long int siscone::ranlux_state_t::u[24]\n \n Definition at line 52 of file ranlux.cpp.\n The documentation for this struct was generated from the following file:\n \n \u2022 siscone/ranlux.cpp\n \n-4.36\n-\n-siscone_spherical::sph_hash_cones Class Reference\n-\n-list of cones candidates.\n-\n-#include \n-\n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n 171\n \n \f172\n \n Class Documentation\n \n+4.36\n+\n+siscone_spherical::sph_hash_cones Class Reference\n+\n+list of cones candidates.\n+\n+#include \n Collaboration diagram for siscone_spherical::sph_hash_cones:\n \n siscone::Creference\n ref\n siscone_spherical::\n CSph3vector\n centre\n@@ -12010,31 +12018,29 @@\n \n Public Attributes\n \u2022 sph_hash_element \u2217\u2217 hash_array\n the cone data itself\n \n \u2022 int n_cones\n number of elements\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f4.36 siscone_spherical::sph_hash_cones Class Reference\n \n \u2022 int mask\n number of occupied cells\n \n \u2022 double R2\n circle radius (squared) NOTE: need to be set before any call to 'insert'\n \n \u2022 double tan2R\n its squreed tangent\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f4.36 siscone_spherical::sph_hash_cones Class Reference\n \n 4.36.1\n \n-173\n-\n Detailed Description\n \n list of cones candidates.\n We store in this class all the hash_elements and give functions to manipulate them.\n Definition at line 61 of file hash.h.\n \n 4.36.2\n@@ -12058,15 +12064,14 @@\n \n cone radius\n \n Definition at line 49 of file hash.cpp.\n References hash_array, mask, n_cones, and tan2R.\n \n 4.36.2.2 \u223csph_hash_cones()\n-\n siscone_spherical::sph_hash_cones::\u223csph_hash_cones ( )\n \n destructor\n Definition at line 80 of file hash.cpp.\n References hash_array, mask, and siscone_spherical::sph_hash_element::next.\n \n 4.36.3\n@@ -12077,26 +12082,29 @@\n \n insert() [1/2]\n \n int siscone_spherical::sph_hash_cones::insert (\n CSphmomentum \u2217 v )\n \n insert a new candidate into the hash.\n-Parameters\n-v\n-\n-4-momentum of te cone to add Note, in this case, we assume stability. We also assume that eta and phi are\n-computed for v\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n+173\n+\n \f174\n \n Class Documentation\n \n+Parameters\n+v\n+\n+4-momentum of te cone to add Note, in this case, we assume stability. We also assume that eta and phi are\n+computed for v\n+\n Returns\n 0 on success, 1 on error\n \n Definition at line 169 of file hash.cpp.\n References siscone_spherical::sph_hash_element::centre, hash_array, siscone_spherical::sph_hash_element::is_stable,\n mask, n_cones, siscone_spherical::sph_hash_element::next, siscone::Creference::ref, and siscone_spherical::CSph3vector::ref.\n \n@@ -12129,15 +12137,14 @@\n \n c_io\n \n whether the child has to belong to the cone or not\n \n Returns\n 0 on success, 1 on error\n-\n Definition at line 105 of file hash.cpp.\n References siscone_spherical::sph_hash_element::centre, hash_array, siscone_spherical::sph_hash_element::is_stable,\n mask, n_cones, siscone_spherical::sph_hash_element::next, siscone::Creference::ref, siscone_spherical::CSph3vector::ref,\n and tan2R.\n \n 4.36.4\n \n@@ -12148,15 +12155,14 @@\n hash_array\n \n sph_hash_element\u2217\u2217 siscone_spherical::sph_hash_cones::hash_array\n \n the cone data itself\n Definition at line 91 of file hash.h.\n Referenced by insert(), insert(), sph_hash_cones(), and \u223csph_hash_cones().\n-\n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \f4.36 siscone_spherical::sph_hash_cones Class Reference\n \n 4.36.4.2\n \n mask\n@@ -12300,15 +12306,15 @@\n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \fChapter 5\n \n File Documentation\n 5.1\n \n-area.cpp\n+main.cpp\n \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@@ -12344,852 +12350,14 @@\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-00041\n-int i,N;\n-00042\n-double px,py,pz,E;\n-00043\n-Coptions opts;\n-00044\n-char fline[512];\n-00045\n-00046\n-if (opts.parse_options(argc, argv))\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 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f180\n-\n-File Documentation\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-00068\n-if (flux==NULL){\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-00075\n-while ((opts.N_stop!=0) && (fgets(fline, 512, flux)!=NULL)){\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-00095\n-// compute jets\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-00099\n-unsigned int pass;\n-00100\n-for (pass=0;pass::iterator ja;\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-00122\n-return 0;\n-00123 }\n-\n-5.2\n-\n-area.cpp\n-\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 7 2025 11:57:28 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-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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-181\n-\n-\f182\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-00111 * - _f\n-shared energy threshold for splitting&merging\n-00112 * - _n_pass_max maximum number of passes (0=full search, the default)\n-00113 * - _split_merge_scale\n-the scale choice for the split-merge procedure\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-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-00118 *\n-SM_pttilde\n-00119 *\n-is always IR safe, and also boost invariant (default)\n-00120 * - _hard_only\n-when this is set on, only hard jets are computed\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-00126\n-int _n_pass_max, Esplit_merge_scale _split_merge_scale,\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-00141\n-// put initial set of particles in the list\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-00147\n-double eta_g,phi_g,pt_g;\n-00148\n-00149\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-00170\n-for (i=0;i<(int) jets.size();i++){\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-00222\n-// in the case of passive area, we do not need\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-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-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-00239\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-00261\n-while ((j &_particles, double _radius, double _f,\n-00292\n-int _n_pass_max, Esplit_merge_scale _split_merge_scale,\n-00293\n-bool _hard_only){\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-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-00315\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-00336\n-for (i=0;i<(int) jets.size();i++){\n-00337\n-jet_areas.push_back(jets[i]);\n-00338\n-j=0;\n-00339\n-while ((j\n 00028 #include \n@@ -13238,14 +12406,21 @@\n 00056\n opts.print_version();\n 00057\n exit(0);\n 00058\n }\n 00059\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f180\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@@ -13310,23 +12485,14 @@\n 00093\n cout \u00ab \" working with \" \u00ab N \u00ab \" particles\" \u00ab endl;\n 00094\n 00095\n // compute jets\n 00096\n if (opts.verbose_flag) cout \u00ab \"computing jet contents\" \u00ab endl;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-185\n-\n-\f186\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 00098\n if (opts.verbose_flag){\n 00099\n unsigned int pass;\n 00100\n@@ -13359,15 +12525,15 @@\n 00114\n cout \u00ab \"bye...\" \u00ab endl;\n 00115\n 00116\n return 0;\n 00117 }\n \n-5.4\n+5.2\n \n options.cpp\n \n 00001\n 00002 // File: options.cpp\n //\n 00003 // Description: management of the cmdline options of the main program\n@@ -13405,18 +12571,21 @@\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.2 options.cpp\n+\n 00023 // $Revision:: 213\n-$//\n 00024 // $Date:: 2008-03-17 17:05:59 +0100 (Mon, 17 Mar 2008)\n-$//\n 00026\n 00027 #include \"options.h\"\n 00028 #include \n 00029 #include \n 00030 #include \n 00031\n 00032 using namespace std;\n@@ -13460,21 +12629,14 @@\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 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.4 options.cpp\n-\n-187\n-\n 00061\n ev_name = NULL;\n 00062\n SM_var = SM_DEFAULT;\n 00063 }\n 00064\n 00065\n@@ -13554,41 +12716,55 @@\n 00107\n // retreive options\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 7 2025 11:57:28 for SISCone by Doxygen\n+\n+181\n+\n+$//\n+$//\n+\n+\f182\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 00115\n-// branch according to \u2019opt_param\u2019\n 00116\n-switch (opt_param){\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-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-00122\n if (N_stop<=0){\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 00126\n@@ -13628,33 +12804,25 @@\n sscanf(optarg, \"%lf\", &ptmin);\n 00143\n if (ptmin<0){\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 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f188\n-\n-File Documentation\n-\n 00146\n-00147\n-00148\n-00149\n-00150\n-00151\n-\n }\n+00147\n break;\n+00148\n case \u2019n\u2019: // max number of paprticles\n+00149\n sscanf(optarg, \"%d\", &npass);\n+00150\n if (npass<0){\n+00151\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 00154\n@@ -13733,14 +12901,21 @@\n 00190\n } while (!stop);\n 00191\n 00192\n if (ev_name==NULL){\n 00193\n ev_name = new char[strlen(DEFAULT_EVENT)+1];\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.3 options.h\n+\n+183\n+\n 00194\n strcpy(ev_name, DEFAULT_EVENT);\n 00195\n }\n 00196\n 00197\n return 0;\n@@ -13798,19 +12973,14 @@\n cout \u00ab endl;\n 00223\n 00224\n return 0;\n 00225 }\n 00226\n 00227\n-\n-Generated on Tue Jan 7 2025 11:57:28 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@@ -13828,15 +12998,15 @@\n 00239\n cout \u00ab \"Please send bugs or comments to AUTHORS\" \u00ab endl;\n 00240\n 00241\n return 0;\n 00242 }\n \n-5.5\n+5.3\n \n options.h\n \n 00001\n 00002 // File: options.h\n //\n 00003 // Description: management of the cmdline options of the main program\n@@ -13882,14 +13052,21 @@\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 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f184\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@@ -13931,28 +13108,19 @@\n 00069\n 00071\n siscone::Esplit_merge_scale SM_var;\n 00072 };\n 00073\n 00074 #endif\n \n-5.6\n+5.4\n \n sample.cpp\n \n 00001\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-189\n-\n-\f190\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@@ -14032,116 +13200,115 @@\n 00047\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 7 2025 11:57:28 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 00057\n-while (fgets(fline, 512, flux)!=NULL){\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 00065\n-return 2;\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 00076\n-// then, recompute it with a different f\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 00080\n-// one pass\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-// show jets\n 00085\n-vector::iterator it_j;\n 00086\n-int i1;\n 00087\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+vector::iterator it_j;\n+int i1;\n fprintf(stdout, \"#\n pT\n eta\n phi\n px\n py\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 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.7 spherical.cpp\n-\n 00089\n-00090\n-00091\n-\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 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 00094\n return 0;\n 00095 }\n \n-5.7\n+5.5\n+\n+185\n \n spherical.cpp\n \n 00001\n 00002 // File: spherical.cpp\n //\n 00003 // Description: example program for the CSphsiscone class (spherical SISCone)//\n@@ -14194,14 +13361,27 @@\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 7 2025 11:57:28 for SISCone by Doxygen\n+\n+pz\n+\n+it_j->v.pz,\n+\n+E\n+\n+\f186\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@@ -14268,25 +13448,14 @@\n 00070\n }\n 00071\n fclose(flux);\n 00072\n 00073\n // compute jets\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-191\n-\n-it_j->v.pz,\n-\n-\f192\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@@ -14328,58 +13497,67 @@\n 00094\n }\n 00095\n 00096\n return 0;\n 00097 }\n \n-5.8\n+5.6\n \n E\n \n \\n\");\n \n it_j->v.E);\n \n test.cpp\n \n 00001\n 00002 // File: test.cpp\n-//\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-//\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+//\n+//\n+//\n+//\n+//\n+//\n+//\n //\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.6 test.cpp\n+\n+187\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@@ -14430,21 +13608,14 @@\n unsigned int N;\n 00054\n 00055\n unsigned int i;\n 00056\n FILE *flux;\n 00057\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.9 times.cpp\n-\n-193\n-\n 00058\n if (argc==1){\n 00059\n //cout \u00ab \"using default number of particles\" \u00ab endl;\n 00060\n N = N_default;\n 00061\n@@ -14522,14 +13693,21 @@\n cout \u00ab \"save stable cone results:\" \u00ab endl;\n 00102\n unsigned int pass;\n 00103\n flux = fopen(\"protocones.dat\", \"w+\");\n 00104\n for (pass=0;pass particles;\n 00066\n Csiscone siscone;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.8 area.cpp\n+\n 00067\n double eta,phi;\n 00068\n 00069\n // number of events and particles\n 00070\n int i, N;\n@@ -14733,19 +13908,14 @@\n 00102\n 00103\n // run siscone\n 00104\n gettimeofday(&time_start, NULL);\n 00105\n siscone.compute_jets(particles, R, f);\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.10 area.h\n-\n 00106\n gettimeofday(&time_end, NULL);\n 00107\n time_siscone+=time_spent();\n 00108\n }\n 00109\n@@ -14771,14 +13941,856 @@\n 00121\n cout \u00ab \"bye...\" \u00ab endl;\n 00122\n 00123\n return 0;\n 00124 }\n \n+5.8\n+\n+area.cpp\n+\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+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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+189\n+\n+\f190\n+\n+File Documentation\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+00041\n+int i,N;\n+00042\n+double px,py,pz,E;\n+00043\n+Coptions opts;\n+00044\n+char fline[512];\n+00045\n+00046\n+if (opts.parse_options(argc, argv))\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+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+00068\n+if (flux==NULL){\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+00075\n+while ((opts.N_stop!=0) && (fgets(fline, 512, flux)!=NULL)){\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+00095\n+// compute jets\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+00099\n+unsigned int pass;\n+00100\n+for (pass=0;pass::iterator ja;\n+\n+Generated on Tue Jan 7 2025 11:57:28 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+00122\n+return 0;\n+00123 }\n+\n+5.9\n+\n+area.cpp\n+\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 7 2025 11:57:28 for SISCone by Doxygen\n+\n+191\n+\n+\f192\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+00110 * - _radius\n+cone radius\n+00111 * - _f\n+shared energy threshold for splitting&merging\n+00112 * - _n_pass_max maximum number of passes (0=full search, the default)\n+00113 * - _split_merge_scale\n+the scale choice for the split-merge procedure\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+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+00118 *\n+SM_pttilde\n+00119 *\n+is always IR safe, and also boost invariant (default)\n+00120 * - _hard_only\n+when this is set on, only hard jets are computed\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+00126\n+int _n_pass_max, Esplit_merge_scale _split_merge_scale,\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+00141\n+// put initial set of particles in the list\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+00147\n+double eta_g,phi_g,pt_g;\n+00148\n+00149\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+00170\n+for (i=0;i<(int) jets.size();i++){\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+00222\n+// in the case of passive area, we do not need\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+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+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+00239\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+00261\n+while ((j &_particles, double _radius, double _f,\n+00292\n+int _n_pass_max, Esplit_merge_scale _split_merge_scale,\n+00293\n+bool _hard_only){\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+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+00315\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+00336\n+for (i=0;i<(int) jets.size();i++){\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 00113\n int _n_pass_max=0, Esplit_merge_scale _split_merge_scale=SM_pttilde,\n 00114\n bool _hard_only=false);\n-00115\n-00123\n-int compute_passive_areas(std::vector &_particles, double _radius, double _f,\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n 195\n \n \f196\n \n File Documentation\n \n+00115\n+00123\n+int compute_passive_areas(std::vector &_particles, double _radius, double _f,\n 00124\n int _n_pass_max=0, Esplit_merge_scale _split_merge_scale=SM_pttilde);\n 00125\n 00126\n int grid_size;\n 00127\n double grid_eta_max;\n@@ -15011,21 +15023,21 @@\n 00082\n bool operator!=(const circulator & other) const {return m_here != other.m_here;}\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 7 2025 11:57:28 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\n \n config.h\n \n@@ -15101,25 +15113,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 7 2025 11:57:28 for SISCone by Doxygen\n \n 197\n \n \f198\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@@ -15162,15 +15174,15 @@\n 00120 /* once: _SISCONE_CONFIG_H */\n 00121 #endif\n \n 5.13\n \n config_raw.h\n \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@@ -15197,23 +15209,25 @@\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-00036\n-00037 /* Define to the sub-directory where libtool stores uninstalled libraries. */\n+\n+*/\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \f5.14 siscone/defines.h File Reference\n \n 199\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@@ -15561,20 +15575,20 @@\n 00125 #endif\n 00126\n 00127 #endif // __DEFINES_H__\n 00128\n \n 5.16\n \n-geom_2d.cpp\n+hash.cpp\n \n 00001\n-00002 // File: geom_2d.cpp\n+00002 // File: hash.cpp\n //\n-00003 // Description: source file for two-dimensional geometry tools\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@@ -15605,209 +15619,377 @@\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+00023 // $Revision:: 225\n $//\n-00024 // $Date:: 2007-06-19 16:26:05 +0200 (Tue, 19 Jun 2007)\n+00024 // $Date:: 2008-05-20 16:59:47 +0200 (Tue, 20 May 2008)\n $//\n 00026\n-00027 #include \"geom_2d.h\"\n-00028 #include \n-00029\n-00030 namespace siscone{\n+00027 #include \n+00028 #include \n+00029 #include \"hash.h\"\n+00030 #include \n 00031\n-00032 #define PHI_RANGE_MASK 0xFFFFFFFF\n+00032 namespace siscone{\n 00033\n-00034 /*********************************************************\n-00035 * class Ceta_phi_range implementation\n-*\n-00036 * class for holding a covering range in eta-phi\n-*\n+00034 using namespace std;\n+00035\n+00036 /**************************************************************\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.16 geom_2d.cpp\n+\f5.16 hash.cpp\n \n-00037 *\n+00037 * implementation of hash_cones\n *\n-00038 * This class deals with ranges in the eta-phi plane. It *\n-00039 * implements methods to test if two ranges overlap and *\n-00040 * to take the union of two overlapping intervals.\n+00038 * list of cones candidates.\n *\n-00041 *********************************************************/\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 using namespace std;\n-00044\n-00045 // static member default init\n-00046 //---------------------------00047 double Ceta_phi_range::eta_min = -100.0;\n-00048 double Ceta_phi_range::eta_max = 100.0;\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 // default ctor\n-00051 //-------------00052 Ceta_phi_range::Ceta_phi_range(){\n-00053\n-eta_range = 0;\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-phi_range = 0;\n-00055 }\n+00055\n+// determine hash size\n 00056\n-00057 // ctor with initialisation\n-00058 // we initialise with a centre (in eta,phi) and a radius\n-00059 // - c_eta\n-eta coordinate of the centre\n-00060 // - c_phi\n-phi coordinate of the centre\n-00061 // - R\n-radius\n-00062 //------------------------------------------------------00063 Ceta_phi_range::Ceta_phi_range(double c_eta, double c_phi, double R){\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+00063\n+// create hash\n 00064\n-// determination of the eta range\n+hash_array = new hash_element*[mask];\n 00065\n-//------------------------------00066\n-double xmin = max(c_eta-R,eta_min+0.0001);\n+mask--;\n+00066\n 00067\n-double xmax = min(c_eta+R,eta_max-0.0001);\n+// set the array to 0\n 00068\n+//? needed ?\n 00069\n-unsigned int cell_min = get_eta_cell(xmin);\n+for (i=0;inext;\n 00085\n+delete elm;\n 00086\n-// Also, if the interval goes through pi, inversion is needed\n+}\n 00087\n-if (xmax>xmin)\n+}\n 00088\n-phi_range = (cell_max-cell_min)+cell_max;\n 00089\n-else {\n-00090\n-phi_range = (cell_min==cell_max)\n+delete[] hash_array;\n+00090 }\n 00091\n-? PHI_RANGE_MASK\n 00092\n-: ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max);\n-00093\n-}\n-00094 }\n-00095\n-00096 // assignment of range\n-00097 // - r\n-range to assign to current one\n-00098 //--------------------------------------00099 Ceta_phi_range& Ceta_phi_range::operator = (const Ceta_phi_range &r){\n-00100\n-eta_range = r.eta_range;\n-00101\n-phi_range = r.phi_range;\n-00102\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+00097 * - child\n+child particle defining the cone\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-return *this;\n-00104 }\n+hash_element *elm;\n+00104\n+int index = (v->ref.ref[0]) & mask;\n 00105\n-00106 // add a particle to the range\n-00107 // - eta eta coordinate of the particle\n-00108 // - phi phi coordinate of the particle\n-00109 // \\return 0 on success, 1 on error\n-00110 //---------------------------------------00111 int Ceta_phi_range::add_particle(const double eta, const double phi){\n-00112\n-// deal with the eta coordinate\n+00106\n+// check the array cell corresponding to our reference\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-eta_range |= get_eta_cell(eta);\n 00114\n+do{\n 00115\n-// deal with the phi coordinate\n+// if it is not present, add it\n 00116\n-phi_range |= get_phi_cell(phi);\n+if (elm==NULL){\n 00117\n+// create element\n 00118\n-return 0;\n-00119 }\n+elm = new hash_element;\n+00119\n 00120\n+// set its varibles\n 00121\n-00122 // test overlap\n-00123 // - r1 first range\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 \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n 203\n \n \f204\n \n File Documentation\n \n-00124 // - r2 second range\n-00125 // return true if overlap, false otherwise.\n-00126 //-----------------------------------------00127 bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2){\n+00124\n+00125\n+//compute vectors centre\n+00126\n+v->build_etaphi();\n+00127\n+elm->eta = v->eta;\n 00128\n-// check overlap in eta AND phi\n+elm->phi = v->phi;\n 00129\n-return ((r1.eta_range & r2.eta_range) && (r1.phi_range & r2.phi_range));\n-00130 }\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-00132 // compute union\n-00133 // Note: we assume that the two intervals overlap\n-00134 // - r1 first range\n-00135 // - r2 second range\n-00136 // \\return union of the two ranges\n-00137 //-----------------------------------------00138 const Ceta_phi_range range_union (const Ceta_phi_range &r1, const Ceta_phi_range &r2){\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 00139\n-Ceta_phi_range tmp;\n+return 0;\n 00140\n+}\n 00141\n-// compute union in eta\n 00142\n-tmp.eta_range = r1.eta_range | r2.eta_range;\n+// if the cone is already there, simply update stability status\n 00143\n+if (v->ref == elm->ref){\n 00144\n-// compute union in phi\n+// there is only an update to perform to see if the cone is still stable\n 00145\n-tmp.phi_range = r1.phi_range | r2.phi_range;\n+if (elm->is_stable){\n 00146\n+v->build_etaphi();\n 00147\n-return tmp;\n-00148 }\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-00150 }\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+00155\n+return 0;\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+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+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+00197\n+return 0;\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+00208\n+return 1;\n+00209 }\n+00210\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.17 hash.cpp\n+\n+205\n+\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+00215 * - centre\n+centre of the circle\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+00220\n+double dx, dy;\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+00227\n+return dx*dx+dy*dy\n-00031\n-00032 namespace siscone_spherical{\n+00029 #include \n+00030 #include \n+00031 #include \"hash.h\"\n+00032 #include \n 00033\n-00034 #define PHI_RANGE_MASK 0xFFFFFFFF\n+00034 namespace siscone_spherical{\n 00035\n-00036 /*********************************************************\n-00037 * class CSphtheta_phi_range implementation\n+00036 using namespace std;\n+00037\n+00038 /**************************************************************\n+00039 * implementation of sph_hash_cones\n *\n-00038 * class for holding a covering range in eta-phi\n+00040 * list of cones candidates.\n *\n-00039 *\n+00041 * We store in this class all the sph_hash_element and give\n *\n-00040 * This class deals with ranges in the eta-phi plane. It *\n-00041 * implements methods to test if two ranges overlap and *\n-00042 * to take the union of two overlapping intervals.\n+00042 * functions to manipulate them.\n *\n-00043 *********************************************************/\n+00043 **************************************************************/\n 00044\n-00045 using namespace std;\n-00046\n-00047 // static member default init\n-00048 //---------------------------00049 double CSphtheta_phi_range::theta_min = 0.0;\n-00050 double CSphtheta_phi_range::theta_max = M_PI;\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 // default ctor\n-00053 //-------------00054 CSphtheta_phi_range::CSphtheta_phi_range(){\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n //\n \n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\f206\n \n-\f5.17 geom_2d.cpp\n+File Documentation\n \n-00055\n-theta_range = 0;\n-00056\n-phi_range = 0;\n-00057 }\n-00058\n-00059 // ctor with initialisation\n-00060 // we initialise with a centre (in eta,phi) and a radius\n-00061 // - c_theta theta coordinate of the centre\n-00062 // - c_phi\n-phi coordinate of the centre\n-00063 // - R\n-radius\n-00064 //------------------------------------------------------00065 CSphtheta_phi_range::CSphtheta_phi_range(double c_theta, double c_phi, double R){\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-// determination of the eta range\n+hash_array = new sph_hash_element*[mask];\n 00067\n-//------------------------------00068\n-double xmin = max(c_theta-R,theta_min+0.00001);\n+mask--;\n+00068\n 00069\n-double xmax = min(c_theta+R,theta_max-0.00001);\n+// set the array to 0\n 00070\n+//? needed ?\n 00071\n-unsigned int cell_min = get_theta_cell(xmin);\n+for (i=0;inext;\n 00088\n-ymin = -M_PI+0.00001;\n+delete elm;\n 00089\n-ymax = M_PI-0.00001;\n+}\n 00090\n-} else if (xmax>=theta_max-extra){\n+}\n 00091\n-ymin = -M_PI+0.00001;\n 00092\n-ymax = M_PI-0.00001;\n-00093\n-} else {\n+delete[] hash_array;\n+00093 }\n 00094\n-extra = max(1.0/sin(xmin), 1.0/sin(xmax));\n 00095\n-ymin = (c_phi-R)*extra;\n-00096\n-while (ymin<-M_PI) ymin+=twopi;\n-00097\n-while (ymin> M_PI) ymin-=twopi;\n-00098\n-ymax = (c_phi-R)*extra;\n-00099\n-while (ymax<-M_PI) ymax+=twopi;\n-00100\n-while (ymax> M_PI) ymax-=twopi;\n-00101\n-}\n-00102\n-cell_min = get_phi_cell(ymin);\n-00103\n-cell_max = get_phi_cell(ymax);\n-00104\n-00105\n-// Also, if the interval goes through pi, inversion is needed\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+00101 * - p_io\n+whether the parent has to belong to the cone or not\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-if (ymax>ymin)\n+sph_hash_element *elm;\n 00107\n-phi_range = (cell_max-cell_min)+cell_max;\n+int index = (v->ref.ref[0]) & mask;\n 00108\n-else {\n 00109\n-phi_range = (cell_min==cell_max)\n+// check the array cell corresponding to our reference\n 00110\n-? PHI_RANGE_MASK\n+elm = hash_array[index];\n 00111\n-: ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max);\n-00112\n-}\n-00113 }\n+00112 #ifdef DEBUG_STABLE_CONES\n+00113\n+if (elm==NULL)\n 00114\n-00115 // assignment of range\n-00116 // - r\n-range to assign to current one\n-00117 //--------------------------------------00118 CSphtheta_phi_range& CSphtheta_phi_range::operator = (const CSphtheta_phi_range &r){\n+n_occupied_cells++;\n+00115 #endif\n+00116\n+00117\n+do{\n+00118\n+// if it is not present, add it\n 00119\n-theta_range = r.theta_range;\n+if (elm==NULL){\n 00120\n-phi_range = r.phi_range;\n+// create element\n 00121\n+elm = new sph_hash_element;\n 00122\n-return *this;\n-00123 }\n+00123\n+// set its varibles\n 00124\n-00125 // add a particle to the range\n-00126 // - eta eta coordinate of the particle\n-00127 // - phi phi coordinate of the particle\n-00128 // \\return 0 on success, 1 on error\n-00129 //---------------------------------------00130 int CSphtheta_phi_range::add_particle(const double theta, const double phi){\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 00131\n-// get the theta cell\n+//cout \u00ab \"-- new status of \" \u00ab v->ref[0] \u00ab \":\" \u00ab elm->is_stable \u00ab endl;\n 00132\n-unsigned int theta_cell = get_theta_cell(theta);\n 00133\n+// update hash\n 00134\n-// deal with the eta coordinate\n+elm->next = hash_array[index];\n 00135\n-theta_range |= theta_cell;\n+hash_array[index] = elm;\n 00136\n 00137\n-// deal with the phi coordinate\n+n_cones++;\n 00138\n-//\n+return 0;\n 00139\n-// watch out: if the theta_cell includes theta==0 or theta==pi,\n+}\n 00140\n-// incude the full phi range\n 00141\n-if ((theta_cell == 0x1) || (theta_cell == 0x80000000))\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-205\n-\n-\f206\n-\n-File Documentation\n-\n+// if the cone is already there, simply update stability status\n 00142\n-phi_range = 0xffffffff;\n+if (v->ref == elm->centre.ref){\n 00143\n-else\n+// there is only an update to perform to see if the cone is still stable\n 00144\n-phi_range |= get_phi_cell(phi);\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 00146\n-return 0;\n-00147 }\n+//cout \u00ab \" parent/child: \"\n+00147\n+//\n+\u00ab parent->ref[0] \u00ab \":\" \u00ab is_closer(v, parent) \u00ab \":\" \u00ab p_io \u00ab \" \"\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.18 quadtree.cpp\n+\n+207\n+\n 00148\n+//\n+\u00ab child->ref[0] \u00ab \":\" \u00ab is_closer(v, child) \u00ab \":\" \u00ab c_io \u00ab endl;\n 00149\n-00150 // test overlap\n-00151 // - r1 first range\n-00152 // - r2 second range\n-00153 // return true if overlap, false otherwise.\n-00154 //-----------------------------------------00155 bool is_range_overlap(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){\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+00153\n+return 0;\n+00154\n+}\n+00155\n 00156\n-// check overlap in eta AND phi\n+elm = elm->next;\n 00157\n-return ((r1.theta_range & r2.theta_range) && (r1.phi_range & r2.phi_range));\n-00158 }\n+} while (1);\n+00158\n 00159\n-00160 // compute union\n-00161 // Note: we assume that the two intervals overlap\n-00162 // - r1 first range\n-00163 // - r2 second range\n-00164 // \\return union of the two ranges\n-00165 //-----------------------------------------00166 const CSphtheta_phi_range range_union (const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){\n-00167\n-CSphtheta_phi_range tmp;\n-00168\n-00169\n-// compute union in eta\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-tmp.theta_range = r1.theta_range | r2.theta_range;\n+sph_hash_element *elm;\n 00171\n+int index = (v->ref.ref[0]) & mask;\n 00172\n-// compute union in phi\n+//cout \u00ab \"-- stable candidate: \" \u00ab v->ref[0] \u00ab \":\" \u00ab endl;\n 00173\n-tmp.phi_range = r1.phi_range | r2.phi_range;\n 00174\n+// check the array cell corresponding to our reference\n 00175\n-return tmp;\n-00176 }\n+elm = hash_array[index];\n+00176\n+do{\n 00177\n-00178 }\n+// if it is not present, add it\n+00178\n+if (elm==NULL){\n+00179\n+// create element\n+00180\n+elm = new sph_hash_element;\n+00181\n+00182\n+// set its varibles\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+00188\n+// update hash\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+00198\n+return 0;\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.18\n \n-geom_2d.h\n+quadtree.cpp\n+\n+00001\n+00002 // File: quadtree.cpp\n+00003 // Description: source file for quadtree management (Cquadtree class)\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+00010 // it under the terms of the GNU General Public License as published by\n+00011 // the Free Software Foundation; either version 2 of the License, or\n+00012 // (at your option) any later version.\n+00013 //\n+00014 // This program is distributed in the hope that it will be useful,\n+00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+00017 // GNU General Public License for more details.\n+00018 //\n+00019 // You should have received a copy of the GNU General Public License\n+00020 // along with this program; if not, write to the Free Software\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-00001 // -*- C++ -*00003 // File: geom_2d.h\n //\n-00004 // Description: header file for two-dimensional geometry tools\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+\f208\n+\n+File Documentation\n+\n+00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00022 //\n //\n-00024 // $Revision:: 422\n+00023 // $Revision:: 320\n $//\n-00025 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020)\n+00024 // $Date:: 2011-11-15 09:54:50 +0100 (Tue, 15 Nov 2011)\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-00045\n-else if (phi >\n-M_PI) phi -= twopi;\n+00026\n+00027 #include \"quadtree.h\"\n+00028 #include \n+00029 #include \n+00030 #include \n+00031\n+00032 namespace siscone{\n+00033\n+00034 using namespace std;\n+00035\n+00036 /*******************************************************************\n+00037 * Cquadtree implementation\n+*\n+00038 * Implementation of a 2D quadtree.\n+*\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 00046\n-return phi;\n-00047 }\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.19 geom_2d.h\n-\n-207\n-\n+v = NULL;\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+children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;\n+00049\n+has_child = false;\n+00050 }\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-00060 inline double abs_dphi(double phi1, double phi2) {\n+v = NULL;\n+00057\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-double delta = fabs(phi1-phi2);\n-00062\n-return delta > M_PI ? twopi-delta : delta;\n-00063 }\n+init(_x, _y, _half_size_x, _half_size_y);\n+00062 }\n+00063\n 00064\n-00066 inline double pow2(double x) {return x*x;}\n-00067\n-00068\n-00073 class Ctwovect {\n-00074 public:\n+00065 // default destructor\n+00066 // at destruction, everything is destroyed except\n+00067 // physical values at the leaves\n+00068 //-----------------------------------------------00069 Cquadtree::~Cquadtree(){\n+00070\n+if (has_child){\n+00071\n+if (v!=NULL) delete v;\n+00072\n+delete children[0][0];\n+00073\n+delete children[0][1];\n+00074\n+delete children[1][0];\n+00075\n+delete children[1][1];\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-00084\n-double x, y;\n-00085\n-00087\n-inline double mod2() const {return pow2(x)+pow2(y);}\n-00088\n-00090\n-inline double modulus() const {return sqrt(mod2());}\n-00091 };\n+}\n+00077 }\n+00078\n+00079\n+00080 /*\n+00081 * init the tree.\n+00082 * By initializing the tree, we mean setting the cell parameters\n+00083 * and preparing the object to act as a seed for a new tree.\n+00084 * - _x\n+x-position of the center\n+00085 * - _y\n+y-position of the center\n+00086 * - half_size_x half x-size of the cell\n+00087 * - half_size_y half y-size of the cell\n+00088 * return 0 on success, 1 on error. Note that if the cell\n+00089 *\n+is already filled, we return an error.\n+00090 ******************************************************************/\n+00091 int Cquadtree::init(double _x, double _y, double _half_size_x, double _half_size_y){\n 00092\n+if (v!=NULL)\n 00093\n-00098 inline double dot_product(const Ctwovect & a, const Ctwovect & b) {\n+return 1;\n+00094\n+00095\n+centre_x = _x;\n+00096\n+centre_y = _y;\n+00097\n+half_size_x = _half_size_x;\n+00098\n+half_size_y = _half_size_y;\n 00099\n-return a.x*b.x + a.y*b.y;\n-00100 }\n-00101\n+00100\n+return 0;\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+00103\n+00104 /*\n+00105 * adding a particle to the tree.\n+00106 * This method adds one vector to the quadtree structure which\n+00107 * is updated consequently.\n+00108 * - v\n+vector to add\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.18 quadtree.cpp\n+\n+00109 * return 0 on success 1 on error\n+00110 ******************************************************************/\n+00111 int Cquadtree::add(Cmomentum *v_add){\n+00112\n+// Description of the method:\n+00113\n+// -------------------------00114\n+// the addition process goes as follows:\n+00115\n+// 1. check if the cell is empty, in which case, add the particle\n+00116\n+//\n+here and leave.\n+00117\n+// 2. If there is a unique particle already inside,\n+00118\n+//\n+(a) create children\n+00119\n+//\n+(b) forward the existing particle to the appropriate child\n+00120\n+// 3. Add current particle to this cell and forward to the\n+00121\n+//\n+adequate child\n+00122\n+// NOTE: we assume in the whole procedure that the particle is\n 00123\n-Ceta_phi_range();\n+//\n+indeed inside the cell !\n 00124\n+00125\n+// step 1: the case of empty cells\n+00126\n+if (v==NULL){\n+00127\n+v = v_add;\n+00128\n+return 0;\n+00129\n+}\n 00130\n-Ceta_phi_range(double c_eta, double c_phi, double R);\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+00133\n+if (!has_child){\n 00134\n-Ceta_phi_range& operator = (const Ceta_phi_range &r);\n+double new_half_size_x = 0.5*half_size_x;\n 00135\n+double new_half_size_y = 0.5*half_size_y;\n+00136\n+// create children\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-int add_particle(const double eta, const double phi);\n+new_half_size_x, new_half_size_y);\n 00141\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-unsigned int eta_range;\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+00145\n 00146\n-unsigned int phi_range;\n+has_child = true;\n 00147\n 00148\n-// extremal value for eta\n+// forward to child\n 00149\n-static double eta_min;\n+//? The following line assumes \u2019true\u2019==1 and \u2019false\u2019==0\n 00150\n-static double eta_max;\n+// Note: v being a single particle, eta and phi are correct\n 00151\n-00152 private:\n+children[v->eta>centre_x][v->phi>centre_y]->add(v);\n+00152\n+00153\n+// copy physical params\n 00154\n-inline unsigned int get_eta_cell(double eta){\n+v = new Cmomentum(*v);\n 00155\n-return (unsigned int) (1u \u00ab ((int) (32*((eta-eta_min)/(eta_max-eta_min)))));\n-00156\n }\n+00156\n 00157\n+// step 3: add new particle\n+00158\n+// Note: v_add being a single particle, eta and phi are correct\n 00159\n-inline unsigned int get_phi_cell(double phi){\n+children[v_add->eta>centre_x][v_add->phi>centre_y]->add(v_add);\n 00160\n-return (unsigned int) (1u \u00ab ((int) (32*phi/twopi+16)%32));\n+*v+=*v_add;\n 00161\n-}\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+00162\n+return 0;\n+00163 }\n+00164\n+00165\n+00166 /*\n+00167 * circle intersection.\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+00171 * - cx\n+circle centre x coordinate\n+00172 * - cy\n+circle centre y coordinate\n+00173 * - cR2\n+circle radius SQUARED\n+00174 * return the checksum for the intersection\n+00175 ******************************************************************/\n+00176 Creference Cquadtree::circle_intersect(double cx, double cy, double cR2){\n+00177\n+// Description of the method:\n 00178\n-00179 #endif\n-\n-5.19\n-\n-geom_2d.h\n-\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-//\n-//\n-//\n+// -------------------------00179\n+// 1. check if cell is empty => no intersection\n+00180\n+// 2. if cell has 1! particle, check if it is inside the circle.\n+00181\n //\n+If yes, add it and return, if not simply return.\n+00182\n+// 3. check if the circle intersects the square. If not, return.\n+00183\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+00187\n+// step 1: if there is no particle inside te square, no reason to go further\n+00188\n+if (v==NULL)\n+00189\n+return Creference();\n+00190\n+00191\n+double dx, dy;\n+00192\n+00193\n+// step 2: if there is only one particle inside the square, test if it is in\n+00194\n //\n+the circle, in which case return associated reference\n+00195\n+if (!has_child){\n \n-\f208\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+209\n+\n+\f210\n \n File Documentation\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:: 422\n-$//\n-00027 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020)\n-$//\n-00029\n-00030 #ifndef __SPH_GEOM_2D_H__\n-00031 #define __SPH_GEOM_2D_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-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-00075\n-unsigned int theta_range;\n-00076\n-00078\n-unsigned int phi_range;\n-00079\n-00081\n-static double theta_min;\n-00082\n-static double theta_max;\n-00083\n-00084 private:\n-00086\n-inline unsigned int get_theta_cell(double theta){\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+00196\n+// compute the distance\n+00197\n+// Note: v has only one particle => eta and phi are defined\n+00198\n+dx = cx - v->eta;\n+00199\n+dy = fabs(cy - v->phi);\n+00200\n+if (dy>M_PI)\n+00201\n+dy -= 2.0*M_PI;\n+00202\n+00203\n+// test distance\n+00204\n+if (dx*dx+dy*dyref;\n+00206\n }\n-00090\n-00092\n-inline unsigned int get_phi_cell(double phi){\n-00093\n-return (unsigned int) (1u \u00ab ((int) (32*phi/twopi+16)%32));\n-00094\n+00207\n+00208\n+return Creference();\n+00209\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+00210\n+00211\n+// step 3: check if there is an intersection\n+00212\n+//double ryp, rym;\n+00213\n+double dx_c, dy_c;\n+00214\n+00215\n+// store distance with the centre of the square\n+00216\n+dx_c = fabs(cx-centre_x);\n+00217\n+dy_c = fabs(cy-centre_y);\n+00218\n+if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c;\n+00219\n+00220\n+// compute (minimal) the distance (pay attention to the periodicity in phi).\n+00221\n+dx = dx_c-half_size_x;\n+00222\n+if (dx<0) dx=0;\n+00223\n+dy = dy_c-half_size_y;\n+00224\n+if (dy<0) dy=0;\n+00225\n+00226\n+// check the distance\n+00227\n+if (dx*dx+dy*dy>=cR2){\n+00228\n+// no intersection\n+00229\n+return Creference();\n+00230\n+}\n+00231\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+00236\n+dy = dy_c+half_size_y;\n+00237\n+if (dy>M_PI) dy = M_PI;\n+00238\n+00239\n+// compute the distance\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+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++ children[1][1]->circle_intersect(cx, cy, cR2);\n+00249 }\n+00250\n+00251\n+00252 /*\n+00253 * output a data file for drawing the grid.\n+00254 * This can be used to output a data file containing all the\n+00255 * grid subdivisions. The file contents is as follows:\n+00256 * first and second columns give center of the cell, the third\n+00257 * gives the size.\n+00258 * - flux opened stream to write to\n+00259 * return 0 on success, 1 on error\n+00260 ******************************************************************/\n+00261 int Cquadtree::save(FILE *flux){\n+00262\n+00263\n+if (flux==NULL)\n+00264\n+return 1;\n+00265\n+00266\n+if (has_child){\n+00267\n+fprintf(flux, \"%e\\t%e\\t%e\\t%e\\n\", centre_x, centre_y, half_size_x, half_size_y);\n+00268\n+children[0][0]->save(flux);\n+00269\n+children[0][1]->save(flux);\n+00270\n+children[1][0]->save(flux);\n+00271\n+children[1][1]->save(flux);\n+00272\n+}\n+00273\n+00274\n+return 0;\n+00275 }\n+00276\n+00277\n+00278 /*\n+00279 * output a data file for drawing the tree leaves.\n+00280 * This can be used to output a data file containing all the\n+00281 * tree leaves. The file contents is as follows:\n+00282 * first and second columns give center of the cell, the third\n \n-5.20\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-momentum.h\n+\f5.19 quadtree.h\n \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+00283 * gives the size.\n+00284 * - flux opened stream to write to\n+00285 * return 0 on success, 1 on error\n+00286 ******************************************************************/\n+00287 int Cquadtree::save_leaves(FILE *flux){\n+00288\n+00289\n+if (flux==NULL)\n+00290\n+return 1;\n+00291\n+00292\n+if (has_child){\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+00295\n+if (children[1][0]!=NULL) children[1][0]->save_leaves(flux);\n+00296\n+if (children[1][1]!=NULL) children[1][1]->save_leaves(flux);\n+00297\n+} else {\n+00298\n+fprintf(flux, \"%e\\t%e\\t%e\\t%e\\n\", centre_x, centre_y, half_size_x, half_size_y);\n+00299\n+}\n+00300\n+00301\n+return 0;\n+00302 }\n+00303\n+00304 }\n+\n+5.19\n \n+quadtree.h\n+\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+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-\n-Generated on Tue Jan 7 2025 11:57:28 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@@ -16439,319 +16897,3062 @@\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:: 163\n+00024 // $Revision:: 123\n $//\n-00025 // $Date:: 2007-04-26 22:31:02 +0200 (Thu, 26 Apr 2007)\n+00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)\n $//\n 00027\n-00028 #ifndef __VECTOR_H__\n-00029 #define __VECTOR_H__\n+00028 #ifndef __QUADTREE_H__\n+00029 #define __QUADTREE_H__\n 00030\n-00031 #include \n-00032 #include \n-00033 #include \"reference.h\"\n-00034 #include \"geom_2d.h\"\n-00035 #include \"defines.h\"\n-00036\n-00037 namespace siscone{\n-00038\n-00049 class Cmomentum{\n-00050 public:\n-00052\n-Cmomentum();\n-00053\n+00031 #include \"momentum.h\"\n+00032 #include \n+00033\n+00034 namespace siscone{\n+00035\n+00043 class Cquadtree{\n+00044 public:\n+00046\n+Cquadtree();\n+00047\n+00049\n+Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y);\n+00050\n+00054\n+~Cquadtree();\n 00055\n-Cmomentum(double _px, double _py, double _pz, double _E);\n-00056\n-00058\n-Cmomentum(double _eta, double _phi, Creference _ref);\n-00059\n-00061\n-~Cmomentum();\n-00062\n-00064\n-inline double perp() const {return sqrt(perp2());}\n-00065\n 00067\n-inline double perp2() const {return px*px+py*py;}\n+int init(double _x, double _y, double _half_size_x, double _half_size_y);\n 00068\n-00070\n-inline double mass() const {return sqrt(mass2());}\n-00071\n-00073\n-inline double mass2() const {return perpmass2()-perp2();}\n-00074\n 00076\n-inline double perpmass() const {return sqrt((E-pz)*(E+pz));}\n+int add(Cmomentum *v_add);\n 00077\n-00079\n-inline double perpmass2() const {return (E-pz)*(E+pz);}\n-00080\n-00082\n-inline double Et() const {return E/sqrt(1.0+pz*pz/perp2());}\n-00083\n-00085\n-inline double Et2() const {return E*E/(1.0+pz*pz/perp2());}\n-00086\n 00088\n-Cmomentum& operator = (const Cmomentum &v);\n+Creference circle_intersect(double cx, double cy, double cR2);\n 00089\n-00092\n-const Cmomentum operator + (const Cmomentum &v);\n-00093\n-00096\n-Cmomentum& operator += (const Cmomentum &v);\n-00097\n+00099\n+int save(FILE *flux);\n 00100\n-Cmomentum& operator -= (const Cmomentum &v);\n-00101\n-00107\n-void build_etaphi();\n-00108\n-00109\n-double px;\n 00110\n-double py;\n+int save_leaves(FILE *flux);\n 00111\n-double pz;\n 00112\n-double E;\n+double centre_x;\n 00113\n+double centre_y;\n 00114\n-double eta;\n+double half_size_x;\n 00115\n-double phi;\n+double half_size_y;\n 00116\n-int parent_index;\n 00117\n-int index;\n+Cmomentum *v;\n 00118\n-00120\n-// the following part is used for checksums //\n-00122\n-Creference ref;\n-00123 };\n-00124\n-00127 bool operator < (const Cmomentum &v1, const Cmomentum &v2);\n-00128\n-00130 bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2);\n-00131\n-00133 bool momentum_pt_less(const Cmomentum &v1, const Cmomentum &v2);\n-00134\n-00135\n-00137 // some handy utilities //\n-00139\n-00144 inline double get_distance(double eta, double phi, Cmomentum *v){\n-00145\n-double dx, dy;\n-00146\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-209\n+211\n \n-\f210\n+\f212\n \n File Documentation\n \n-00147\n-dx = eta - v->eta;\n-00148\n-dy = fabs(phi - v->phi);\n-00149\n-if (dy>M_PI)\n-00150\n-dy -= twopi;\n-00151\n-00152\n-return dx*dx+dy*dy;\n-00153 }\n-00154\n-00155 }\n-00156\n-00157 #endif\n+00119\n+Cquadtree* children[2][2];\n+00120\n+bool has_child;\n+00121 };\n+00122\n+00123 }\n+00124 #endif\n \n-5.21\n+5.20\n \n-momentum.h\n+ranlux.cpp\n \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-//\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:: 256\n-$//\n-00027 // $Date:: 2008-07-14 13:52:16 +0200 (Mon, 14 Jul 2008)\n-$//\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+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+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+00017\n+The period of the generator is around 10^171.\n+00018\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+00023\n+Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/\n+00024\n+00025\n+See also,\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-00030 #ifndef __SPH_VECTOR_H__\n-00031 #define __SPH_VECTOR_H__\n+Communications, 79 (1994) 111-114\n+00030\n+00031\n+Kenneth G. Hamilton, F. James, \"Acceleration of RANLUX\", Computer\n 00032\n-00033 #include \n-00034 #include \n-00035 #include \n-00036 #include \"geom_2d.h\"\n-00037 #include \n+Physics Communications, 101 (1997) 241-248\n+00033\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-00039 namespace siscone_spherical{\n-00040\n-00054 class CSph3vector{\n-00055 public:\n-00057\n-CSph3vector();\n-00058\n+00039 static const unsigned long int mask_lo = 0x00ffffffUL; // 2^24 - 1\n+00040 static const unsigned long int mask_hi = ~0x00ffffffUL;\n+00041 static const unsigned long int two24 = 16777216;\n+// 2^24\n+00042\n+00043\n+00044 // internal generator structure\n+00045 //-----------------------------00046 typedef struct {\n+00047\n+unsigned int i;\n+00048\n+unsigned int j;\n+00049\n+unsigned int n;\n+00050\n+unsigned int skip;\n+00051\n+unsigned int carry;\n+00052\n+unsigned long int u[24];\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-CSph3vector(double _px, double _py, double _pz);\n-00061\n-00063\n-~CSph3vector();\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+00065\n+unsigned int j = local_ranlux_state.j;\n 00066\n-CSph3vector& operator = (const CSph3vector &v);\n+long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i]\n 00067\n+- local_ranlux_state.carry;\n+00068\n+00069\n+if (delta & mask_hi){\n 00070\n-const CSph3vector operator + (const CSph3vector &v);\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-const CSph3vector operator - (const CSph3vector &v);\n+}\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.20 ranlux.cpp\n+\n 00075\n+00076\n+local_ranlux_state.u[i] = delta;\n+00077\n 00078\n-const CSph3vector operator / (const double &r);\n+if (i==0)\n 00079\n+i = 23;\n+00080\n+else\n+00081\n+i--;\n 00082\n-CSph3vector& operator += (const CSph3vector &v);\n 00083\n+local_ranlux_state.i = i;\n+00084\n+00085\n+if (j == 0)\n 00086\n-CSph3vector& operator -= (const CSph3vector &v);\n+j = 23;\n 00087\n+else\n+00088\n+j--;\n+00089\n 00090\n-CSph3vector& operator *= (const double &r);\n+local_ranlux_state.j = j;\n 00091\n+00092\n+return delta;\n+00093 }\n 00094\n-CSph3vector& operator /= (const double &r);\n 00095\n-00097\n-inline double perp() const {return sqrt(perp2());}\n-00098\n+00096 // set generator state\n+00097 //--------------------00098 static void ranlux_set(unsigned long int s){\n+00099\n+int i;\n 00100\n-inline double perp2() const {return px*px+py*py;}\n+long int seed;\n 00101\n+00102\n+if (s==0)\n 00103\n-inline double norm() const {return sqrt(px*px+py*py+pz*pz);}\n+s = 314159265;\n+/* default seed is 314159265 */\n 00104\n+00105\n+seed = s;\n 00106\n-inline double norm2() const {return px*px+py*py+pz*pz;}\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.21 momentum.h\n-\n 00107\n+/* This is the initialization algorithm of F. James, widely in use\n+00108\n+for RANLUX. */\n 00109\n-inline double phi() const {return atan2(py, px);}\n 00110\n+for (i=0;i<24;i++){\n+00111\n+unsigned long int k = seed/53668;\n 00112\n-inline double theta() const {return atan2(perp(),pz);}\n+seed = 40014*(seed-k*53668)-k*12211;\n 00113\n+if (seed<0){\n+00114\n+seed += 2147483563;\n+00115\n+}\n+00116\n+local_ranlux_state.u[i] = seed%two24;\n+00117\n+}\n+00118\n+00119\n+local_ranlux_state.i = 23;\n 00120\n-void build_norm();\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+00124\n+if (local_ranlux_state.u[23]&mask_hi){\n 00125\n-void build_thetaphi();\n+local_ranlux_state.carry = 1;\n 00126\n-00129\n-void get_angular_directions(CSph3vector &angular_dir1, CSph3vector &angular_dir2);\n+} else {\n+00127\n+local_ranlux_state.carry = 0;\n+00128\n+}\n+00129 }\n 00130\n 00131\n-double px;\n-00132\n-double py;\n-00133\n-double pz;\n-00134\n+00132 // generator initialization\n+00133 //-------------------------00134 void ranlux_init(){\n 00135\n-double _norm;\n+// seed the generator\n 00136\n-double _theta;\n-00137\n-double _phi;\n+ranlux_set(0);\n+00137 }\n 00138\n-00140\n-// the following part is used for checksums //\n-00142\n-siscone::Creference ref;\n-00143 };\n+00139\n+00140 // get random number\n+00141 //------------------00142 unsigned long int ranlux_get(){\n+00143\n+const unsigned int skip = local_ranlux_state.skip;\n 00144\n-00158 class CSphmomentum : public CSph3vector{\n-00159 public:\n-00161\n-CSphmomentum();\n-00162\n-00164\n-CSphmomentum(CSph3vector &init, double E=0.0);\n-00165\n-00167\n-CSphmomentum(double _px, double _py, double _pz, double _E);\n-00168\n-00170\n-//CSphmomentum(double _eta, double _phi, siscone::Creference _ref);\n-00171\n-00173\n-~CSphmomentum();\n-00174\n-00176\n-inline double mass() const {return sqrt(mass2());}\n-00177\n+unsigned long int r = increment_state();\n+00145\n+00146\n+local_ranlux_state.n++;\n+00147\n+00148\n+if (local_ranlux_state.n == 24){\n+00149\n+unsigned int i;\n+00150\n+local_ranlux_state.n = 0;\n+00151\n+for (i = 0; i < skip; i++)\n+00152\n+increment_state();\n+00153\n+}\n+00154\n+00155\n+return r;\n+00156 }\n+00157\n+00158 // print generator state\n+00159 //----------------------00160 void ranlux_print_state(){\n+00161\n+size_t i;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+213\n+\n+\f214\n+\n+File Documentation\n+\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+00165\n+for (i=0;i= 0 and\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+00017\n+The period of the generator is around 10^171.\n+00018\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+00023\n+Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/\n+00024\n+00025\n+See also,\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+00031\n+Kenneth G. Hamilton, F. James, \"Acceleration of RANLUX\", Computer\n+00032\n+Physics Communications, 101 (1997) 241-248\n+00033\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.23\n+\n+reference.cpp\n+\n+00001\n+00002 // File: reference.cpp\n+00003 // Description: source file for checkxor management (Creference class)\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+00010 // it under the terms of the GNU General Public License as published by\n+00011 // the Free Software Foundation; either version 2 of the License, or\n+00012 // (at your option) any later version.\n+00013 //\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+\n+\f216\n+\n+File Documentation\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:: 311\n+$//\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+00031 namespace siscone{\n+00032\n+00033 /*******************************************************\n+00034 * Creference implementation\n+*\n+00035 * references used for checksums.\n+*\n+00036 *\n+*\n+00037 * This class implements some reference variable\n+*\n+00038 * that can be used for checksums. Those checksums\n+*\n+00039 * are useful to disentengle between contents of two\n+*\n+00040 * cones without looking into their explicit particle *\n+00041 * contents.\n+*\n+00042 *******************************************************/\n+00043\n+00044 // default constructor\n+00046 Creference::Creference(){\n+00047\n+ref[0] = ref[1] = ref[2] = 0;\n+00048 }\n+00049\n+00050\n+//static unsigned int reference_bit = 1;\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+00059\n+00060\n+unsigned int r1 = ranlux_get();\n+00061\n+unsigned int r2 = ranlux_get();\n+00062\n+unsigned int r3 = ranlux_get();\n+00063\n+unsigned int r4 = ranlux_get();\n+00064\n+// since ranlux only produces 24 bits, take r4 and add 8 bits\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+ref[2] = r3+((r4 & 0x000000ff) \u00ab 24);\n+00069\n+00070\n+if (is_empty()) randomize();\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+00077 }\n+00078\n+00079 // test non-emptyness\n+00080 //-------------------00081 bool Creference::not_empty(){\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+ref[1] = r.ref[1];\n+00090\n+ref[2] = r.ref[2];\n+00091\n+return *this;\n+00092 }\n+00093\n+00094 // addition of reference\n+00095 //----------------------00096 Creference Creference::operator + (const Creference &r){\n+00097\n+Creference tmp = *this;\n+00098\n+return tmp+=r;\n+00099 }\n+00100\n+00101 // incrementation of reference\n+00102 //-----------------------------\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.24 reference.h\n+\n+00103 Creference& Creference::operator += (const Creference &r){\n+00104\n+ref[0] ^= r.ref[0];\n+00105\n+ref[1] ^= r.ref[1];\n+00106\n+ref[2] ^= r.ref[2];\n+00107\n+return *this;\n+00108 }\n+00109\n+00110 // decrementation of reference\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+00117 }\n+00118\n+00119 }\n+00120\n+\n+5.24\n+\n+reference.h\n+\n+00001 // -*- C++ -*00003 // File: reference.h\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+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 __REFERENCE_H__\n+00029 #define __REFERENCE_H__\n+00030\n+00031 namespace siscone{\n+00032\n+00043 class Creference{\n+00044 public:\n+00046\n+Creference();\n+00047\n+00049\n+void randomize();\n+00050\n+00052\n+bool is_empty();\n+00053\n+00055\n+bool not_empty();\n+00056\n+00058\n+Creference& operator = (const Creference &r);\n+00059\n+00061\n+Creference operator + (const Creference &r);\n+00062\n+00064\n+Creference& operator += (const Creference &r);\n+00065\n+00067\n+Creference& operator -= (const Creference &r);\n+00068\n+00070\n+inline unsigned int operator[] (int i) {return ref[i];}\n+00071\n+00072\n+unsigned int ref[3];\n+00073 };\n+00074\n+00076 Creference operator + (Creference &r1, Creference &r2);\n+00077\n+00079 bool operator == (const Creference &r1, const Creference &r2);\n+00080\n+00082 bool operator != (const Creference &r1, const Creference &r2);\n+00083\n+00085 bool operator < (const Creference &r1, const Creference &r2);\n+00086\n+00087\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+217\n+\n+\f218\n+\n+File Documentation\n+\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+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+00100 }\n+00101\n+00102 // difference test for two references\n+00103 //---------------------------------00104 inline bool operator < (const Creference &r1, const Creference &r2){\n+00105\n+return (r1.ref[0]\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+00047\n+if (m_print_errors) std::cerr \u00ab \"siscone::Csiscone_error: \"\u00ab message_in \u00ab std::endl;\n+00048\n+};\n+00049\n+00051\n+std::string message() const {return m_message;};\n+00052\n+00055\n+static void setm_print_errors(bool print_errors) {\n+00056\n+m_print_errors = print_errors;};\n+00057\n+00058 private:\n+00059\n+std::string m_message;\n+00060\n+static bool m_print_errors;\n+00061 };\n+00062\n+00063 }\n+00064 #endif\n+\n+5.27\n+\n+geom_2d.cpp\n+\n+00001\n+00002 // File: geom_2d.cpp\n+//\n+00003 // Description: source file for two-dimensional geometry tools\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:: 171\n+$//\n+00024 // $Date:: 2007-06-19 16:26:05 +0200 (Tue, 19 Jun 2007)\n+$//\n+00026\n+00027 #include \"geom_2d.h\"\n+00028 #include \n+00029\n+00030 namespace siscone{\n+00031\n+00032 #define PHI_RANGE_MASK 0xFFFFFFFF\n+00033\n+00034 /*********************************************************\n+00035 * class Ceta_phi_range implementation\n+*\n+00036 * class for holding a covering range in eta-phi\n+*\n+00037 *\n+*\n+00038 * This class deals with ranges in the eta-phi plane. It *\n+00039 * implements methods to test if two ranges overlap and *\n+00040 * to take the union of two overlapping intervals.\n+*\n+00041 *********************************************************/\n+00042\n+00043 using namespace std;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+219\n+\n+\f220\n+\n+File Documentation\n+\n+00044\n+00045 // static member default init\n+00046 //---------------------------00047 double Ceta_phi_range::eta_min = -100.0;\n+00048 double Ceta_phi_range::eta_max = 100.0;\n+00049\n+00050 // default ctor\n+00051 //-------------00052 Ceta_phi_range::Ceta_phi_range(){\n+00053\n+eta_range = 0;\n+00054\n+phi_range = 0;\n+00055 }\n+00056\n+00057 // ctor with initialisation\n+00058 // we initialise with a centre (in eta,phi) and a radius\n+00059 // - c_eta\n+eta coordinate of the centre\n+00060 // - c_phi\n+phi coordinate of the centre\n+00061 // - R\n+radius\n+00062 //------------------------------------------------------00063 Ceta_phi_range::Ceta_phi_range(double c_eta, double c_phi, double R){\n+00064\n+// determination of the eta range\n+00065\n+//------------------------------00066\n+double xmin = max(c_eta-R,eta_min+0.0001);\n+00067\n+double xmax = min(c_eta+R,eta_max-0.0001);\n+00068\n+00069\n+unsigned int cell_min = get_eta_cell(xmin);\n+00070\n+unsigned int cell_max = get_eta_cell(xmax);\n+00071\n+00072\n+// warning: if cell_max==2^31, 2*cell_max==0 hence,\n+00073\n+// even if the next formula is formally (2*cell_max-cell_min),\n+00074\n+// expressing it as (cell_max-cell_min)+cell_max is safe.\n+00075\n+eta_range = (cell_max-cell_min)+cell_max;\n+00076\n+00077\n+// determination of the phi range\n+00078\n+// !! taking care of periodicity !!\n+00079\n+//--------------------------------00080\n+xmin = phi_in_range(c_phi-R);\n+00081\n+xmax = phi_in_range(c_phi+R);\n+00082\n+00083\n+cell_min = get_phi_cell(xmin);\n+00084\n+cell_max = get_phi_cell(xmax);\n+00085\n+00086\n+// Also, if the interval goes through pi, inversion is needed\n+00087\n+if (xmax>xmin)\n+00088\n+phi_range = (cell_max-cell_min)+cell_max;\n+00089\n+else {\n+00090\n+phi_range = (cell_min==cell_max)\n+00091\n+? PHI_RANGE_MASK\n+00092\n+: ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max);\n+00093\n+}\n+00094 }\n+00095\n+00096 // assignment of range\n+00097 // - r\n+range to assign to current one\n+00098 //--------------------------------------00099 Ceta_phi_range& Ceta_phi_range::operator = (const Ceta_phi_range &r){\n+00100\n+eta_range = r.eta_range;\n+00101\n+phi_range = r.phi_range;\n+00102\n+00103\n+return *this;\n+00104 }\n+00105\n+00106 // add a particle to the range\n+00107 // - eta eta coordinate of the particle\n+00108 // - phi phi coordinate of the particle\n+00109 // \\return 0 on success, 1 on error\n+00110 //---------------------------------------00111 int Ceta_phi_range::add_particle(const double eta, const double phi){\n+00112\n+// deal with the eta coordinate\n+00113\n+eta_range |= get_eta_cell(eta);\n+00114\n+00115\n+// deal with the phi coordinate\n+00116\n+phi_range |= get_phi_cell(phi);\n+00117\n+00118\n+return 0;\n+00119 }\n+00120\n+00121\n+00122 // test overlap\n+00123 // - r1 first range\n+00124 // - r2 second range\n+00125 // return true if overlap, false otherwise.\n+00126 //-----------------------------------------00127 bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2){\n+00128\n+// check overlap in eta AND phi\n+00129\n+return ((r1.eta_range & r2.eta_range) && (r1.phi_range & r2.phi_range));\n+00130 }\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.28 geom_2d.cpp\n+\n+221\n+\n+00131\n+00132 // compute union\n+00133 // Note: we assume that the two intervals overlap\n+00134 // - r1 first range\n+00135 // - r2 second range\n+00136 // \\return union of the two ranges\n+00137 //-----------------------------------------00138 const Ceta_phi_range range_union (const Ceta_phi_range &r1, const Ceta_phi_range &r2){\n+00139\n+Ceta_phi_range tmp;\n+00140\n+00141\n+// compute union in eta\n+00142\n+tmp.eta_range = r1.eta_range | r2.eta_range;\n+00143\n+00144\n+// compute union in phi\n+00145\n+tmp.phi_range = r1.phi_range | r2.phi_range;\n+00146\n+00147\n+return tmp;\n+00148 }\n+00149\n+00150 }\n+\n+5.28\n+\n+geom_2d.cpp\n+\n+00001\n+00002 // File: geom_2d.cpp\n+//\n+00003 // Description: source file for two-dimensional geometry tools\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:: 378\n+$//\n+00026 // $Date:: 2016-02-24 15:10:38 +0100 (Wed, 24 Feb 2016)\n+$//\n+00028\n+00029 #include \"geom_2d.h\"\n+00030 #include \n+00031\n+00032 namespace siscone_spherical{\n+00033\n+00034 #define PHI_RANGE_MASK 0xFFFFFFFF\n+00035\n+00036 /*********************************************************\n+00037 * class CSphtheta_phi_range implementation\n+*\n+00038 * class for holding a covering range in eta-phi\n+*\n+00039 *\n+*\n+00040 * This class deals with ranges in the eta-phi plane. It *\n+00041 * implements methods to test if two ranges overlap and *\n+00042 * to take the union of two overlapping intervals.\n+*\n+00043 *********************************************************/\n+00044\n+00045 using namespace std;\n+00046\n+00047 // static member default init\n+00048 //---------------------------00049 double CSphtheta_phi_range::theta_min = 0.0;\n+00050 double CSphtheta_phi_range::theta_max = M_PI;\n+00051\n+00052 // default ctor\n+00053 //-------------00054 CSphtheta_phi_range::CSphtheta_phi_range(){\n+00055\n+theta_range = 0;\n+00056\n+phi_range = 0;\n+00057 }\n+00058\n+00059 // ctor with initialisation\n+00060 // we initialise with a centre (in eta,phi) and a radius\n+00061 // - c_theta theta coordinate of the centre\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+//\n+\n+\f222\n+\n+File Documentation\n+\n+00062 // - c_phi\n+phi coordinate of the centre\n+00063 // - R\n+radius\n+00064 //------------------------------------------------------00065 CSphtheta_phi_range::CSphtheta_phi_range(double c_theta, double c_phi, double R){\n+00066\n+// determination of the eta range\n+00067\n+//------------------------------00068\n+double xmin = max(c_theta-R,theta_min+0.00001);\n+00069\n+double xmax = min(c_theta+R,theta_max-0.00001);\n+00070\n+00071\n+unsigned int cell_min = get_theta_cell(xmin);\n+00072\n+unsigned int cell_max = get_theta_cell(xmax);\n+00073\n+00074\n+// warning: if cell_max==2^31, 2*cell_max==0 hence,\n+00075\n+// even if the next formula is formally (2*cell_max-cell_min),\n+00076\n+// expressing it as (cell_max-cell_min)+cell_max is safe.\n+00077\n+theta_range = (cell_max-cell_min)+cell_max;\n+00078\n+00079\n+// determination of the phi range\n+00080\n+// !! taking care of periodicity !!\n+00081\n+// !! and the theta dependence\n+!!\n+00082\n+//--------------------------------00083\n+double ymin,ymax;\n+00084\n+double extra = asin(R/M_PI);\n+00085\n+// if the theta range comes too close to the endpoints (theta=0 or\n+00086\n+// theta=pi), then keep the full phi range\n+00087\n+if (xmin<=theta_min+extra){\n+00088\n+ymin = -M_PI+0.00001;\n+00089\n+ymax = M_PI-0.00001;\n+00090\n+} else if (xmax>=theta_max-extra){\n+00091\n+ymin = -M_PI+0.00001;\n+00092\n+ymax = M_PI-0.00001;\n+00093\n+} else {\n+00094\n+extra = max(1.0/sin(xmin), 1.0/sin(xmax));\n+00095\n+ymin = (c_phi-R)*extra;\n+00096\n+while (ymin<-M_PI) ymin+=twopi;\n+00097\n+while (ymin> M_PI) ymin-=twopi;\n+00098\n+ymax = (c_phi-R)*extra;\n+00099\n+while (ymax<-M_PI) ymax+=twopi;\n+00100\n+while (ymax> M_PI) ymax-=twopi;\n+00101\n+}\n+00102\n+cell_min = get_phi_cell(ymin);\n+00103\n+cell_max = get_phi_cell(ymax);\n+00104\n+00105\n+// Also, if the interval goes through pi, inversion is needed\n+00106\n+if (ymax>ymin)\n+00107\n+phi_range = (cell_max-cell_min)+cell_max;\n+00108\n+else {\n+00109\n+phi_range = (cell_min==cell_max)\n+00110\n+? PHI_RANGE_MASK\n+00111\n+: ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max);\n+00112\n+}\n+00113 }\n+00114\n+00115 // assignment of range\n+00116 // - r\n+range to assign to current one\n+00117 //--------------------------------------00118 CSphtheta_phi_range& CSphtheta_phi_range::operator = (const CSphtheta_phi_range &r){\n+00119\n+theta_range = r.theta_range;\n+00120\n+phi_range = r.phi_range;\n+00121\n+00122\n+return *this;\n+00123 }\n+00124\n+00125 // add a particle to the range\n+00126 // - eta eta coordinate of the particle\n+00127 // - phi phi coordinate of the particle\n+00128 // \\return 0 on success, 1 on error\n+00129 //---------------------------------------00130 int CSphtheta_phi_range::add_particle(const double theta, const double phi){\n+00131\n+// get the theta cell\n+00132\n+unsigned int theta_cell = get_theta_cell(theta);\n+00133\n+00134\n+// deal with the eta coordinate\n+00135\n+theta_range |= theta_cell;\n+00136\n+00137\n+// deal with the phi coordinate\n+00138\n+//\n+00139\n+// watch out: if the theta_cell includes theta==0 or theta==pi,\n+00140\n+// incude the full phi range\n+00141\n+if ((theta_cell == 0x1) || (theta_cell == 0x80000000))\n+00142\n+phi_range = 0xffffffff;\n+00143\n+else\n+00144\n+phi_range |= get_phi_cell(phi);\n+00145\n+00146\n+return 0;\n+00147 }\n+00148\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.29 geom_2d.h\n+\n+223\n+\n+00149\n+00150 // test overlap\n+00151 // - r1 first range\n+00152 // - r2 second range\n+00153 // return true if overlap, false otherwise.\n+00154 //-----------------------------------------00155 bool is_range_overlap(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){\n+00156\n+// check overlap in eta AND phi\n+00157\n+return ((r1.theta_range & r2.theta_range) && (r1.phi_range & r2.phi_range));\n+00158 }\n+00159\n+00160 // compute union\n+00161 // Note: we assume that the two intervals overlap\n+00162 // - r1 first range\n+00163 // - r2 second range\n+00164 // \\return union of the two ranges\n+00165 //-----------------------------------------00166 const CSphtheta_phi_range range_union (const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){\n+00167\n+CSphtheta_phi_range tmp;\n+00168\n+00169\n+// compute union in eta\n+00170\n+tmp.theta_range = r1.theta_range | r2.theta_range;\n+00171\n+00172\n+// compute union in phi\n+00173\n+tmp.phi_range = r1.phi_range | r2.phi_range;\n+00174\n+00175\n+return tmp;\n+00176 }\n+00177\n+00178 }\n+\n+5.29\n+\n+geom_2d.h\n+\n+00001 // -*- C++ -*00003 // File: geom_2d.h\n+//\n+00004 // Description: header file for two-dimensional geometry tools\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:: 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+00044\n+if\n+(phi <= -M_PI) phi += twopi;\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f224\n+\n+File Documentation\n+\n+00061\n+double delta = fabs(phi1-phi2);\n+00062\n+return delta > M_PI ? twopi-delta : delta;\n+00063 }\n+00064\n+00066 inline double pow2(double x) {return x*x;}\n+00067\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+00084\n+double x, y;\n+00085\n+00087\n+inline double mod2() const {return pow2(x)+pow2(y);}\n+00088\n+00090\n+inline double modulus() const {return sqrt(mod2());}\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+00140\n+int add_particle(const double eta, const double phi);\n+00141\n+00143\n+unsigned int eta_range;\n+00144\n+00146\n+unsigned int phi_range;\n+00147\n+00148\n+// extremal value for eta\n+00149\n+static double eta_min;\n+00150\n+static double eta_max;\n+00151\n+00152 private:\n+00154\n+inline unsigned int get_eta_cell(double eta){\n+00155\n+return (unsigned int) (1u \u00ab ((int) (32*((eta-eta_min)/(eta_max-eta_min)))));\n+00156\n+}\n+00157\n+00159\n+inline unsigned int get_phi_cell(double phi){\n+00160\n+return (unsigned int) (1u \u00ab ((int) (32*phi/twopi+16)%32));\n+00161\n+}\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.30\n+\n+geom_2d.h\n+\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+\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.31 hash.h\n+\n+225\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:: 422\n+$//\n+00027 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020)\n+$//\n+00029\n+00030 #ifndef __SPH_GEOM_2D_H__\n+00031 #define __SPH_GEOM_2D_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+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+00075\n+unsigned int theta_range;\n+00076\n+00078\n+unsigned int phi_range;\n+00079\n+00081\n+static double theta_min;\n+00082\n+static double theta_max;\n+00083\n+00084 private:\n+00086\n+inline unsigned int get_theta_cell(double theta){\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+00090\n+00092\n+inline unsigned int get_phi_cell(double phi){\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.31\n+\n+hash.h\n+\n+00001 // -*- C++ -*00003 // File: hash.h\n+00004 // Description: header file for classes hash_element and hash_cones\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 7 2025 11:57:28 for SISCone by Doxygen\n+\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+//\n+\n+\f226\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+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+00048\n+double eta;\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+00081\n+int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io);\n+00082\n+00090\n+int insert(Cmomentum *v);\n+00091\n+00093\n+hash_element **hash_array;\n+00094\n+00096\n+int n_cones;\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+00108\n+double R2;\n+00109\n+00118\n+inline bool is_inside(Cmomentum *centre, Cmomentum *v);\n+00119 };\n+00120\n+00121 }\n+00122 #endif\n+\n+5.32\n+\n+hash.h\n+\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+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+\n+//\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.33 momentum.cpp\n+\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+00049\n+bool is_stable;\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+00088\n+int insert(CSphmomentum *v);\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+00102\n+int mask;\n+00103\n+00106\n+double R2;\n+00107\n+00109\n+double tan2R;\n+00110 };\n+00111\n+00112 }\n+00113 #endif\n+\n+5.33\n+\n+momentum.cpp\n+\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+227\n+\n+\f228\n+\n+File Documentation\n+\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+00058\n+// compute eta and phi\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+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+00125\n+return *this;\n+00126 }\n+00127\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.34 momentum.cpp\n+\n+229\n+\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+00135\n+// note: the factor n (ref.nb) cancels in all expressions !!\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+00151\n+return v1.eta < v2.eta;\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.34\n+\n+momentum.cpp\n+\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+//\n+\n+\f230\n+\n+File Documentation\n+\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+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+00102\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+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+00132\n+return *this;\n+00133 }\n+00134\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.34 momentum.cpp\n+\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+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+00163\n+if (pz < px){\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+00175\n+// y smallest\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+231\n+\n+\f232\n+\n+File Documentation\n+\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+00235\n+return *this;\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+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+00290\n+return v1.perp2() < v2.perp2();\n+00291 }\n+00292\n+00293 }\n+00294\n+\n+5.35\n+\n+momentum.h\n+\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+\n+//\n+//\n+//\n+//\n+//\n+//\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.35 momentum.h\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:: 163\n+$//\n+00025 // $Date:: 2007-04-26 22:31:02 +0200 (Thu, 26 Apr 2007)\n+$//\n+00027\n+00028 #ifndef __VECTOR_H__\n+00029 #define __VECTOR_H__\n+00030\n+00031 #include \n+00032 #include \n+00033 #include \"reference.h\"\n+00034 #include \"geom_2d.h\"\n+00035 #include \"defines.h\"\n+00036\n+00037 namespace siscone{\n+00038\n+00049 class Cmomentum{\n+00050 public:\n+00052\n+Cmomentum();\n+00053\n+00055\n+Cmomentum(double _px, double _py, double _pz, double _E);\n+00056\n+00058\n+Cmomentum(double _eta, double _phi, Creference _ref);\n+00059\n+00061\n+~Cmomentum();\n+00062\n+00064\n+inline double perp() const {return sqrt(perp2());}\n+00065\n+00067\n+inline double perp2() const {return px*px+py*py;}\n+00068\n+00070\n+inline double mass() const {return sqrt(mass2());}\n+00071\n+00073\n+inline double mass2() const {return perpmass2()-perp2();}\n+00074\n+00076\n+inline double perpmass() const {return sqrt((E-pz)*(E+pz));}\n+00077\n+00079\n+inline double perpmass2() const {return (E-pz)*(E+pz);}\n+00080\n+00082\n+inline double Et() const {return E/sqrt(1.0+pz*pz/perp2());}\n+00083\n+00085\n+inline double Et2() const {return E*E/(1.0+pz*pz/perp2());}\n+00086\n+00088\n+Cmomentum& operator = (const Cmomentum &v);\n+00089\n+00092\n+const Cmomentum operator + (const Cmomentum &v);\n+00093\n+00096\n+Cmomentum& operator += (const Cmomentum &v);\n+00097\n+00100\n+Cmomentum& operator -= (const Cmomentum &v);\n+00101\n+00107\n+void build_etaphi();\n+00108\n+00109\n+double px;\n+00110\n+double py;\n+00111\n+double pz;\n+00112\n+double E;\n+00113\n+00114\n+double eta;\n+00115\n+double phi;\n+00116\n+int parent_index;\n+00117\n+int index;\n+00118\n+00120\n+// the following part is used for checksums //\n+00122\n+Creference ref;\n+00123 };\n+00124\n+00127 bool operator < (const Cmomentum &v1, const Cmomentum &v2);\n+00128\n+00130 bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2);\n+00131\n+00133 bool momentum_pt_less(const Cmomentum &v1, const Cmomentum &v2);\n+00134\n+00135\n+00137 // some handy utilities //\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+233\n+\n+\f234\n+\n+File Documentation\n+\n+00139\n+00144 inline double get_distance(double eta, double phi, Cmomentum *v){\n+00145\n+double dx, dy;\n+00146\n+00147\n+dx = eta - v->eta;\n+00148\n+dy = fabs(phi - v->phi);\n+00149\n+if (dy>M_PI)\n+00150\n+dy -= twopi;\n+00151\n+00152\n+return dx*dx+dy*dy;\n+00153 }\n+00154\n+00155 }\n+00156\n+00157 #endif\n+\n+5.36\n+\n+momentum.h\n+\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+//\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:: 256\n+$//\n+00027 // $Date:: 2008-07-14 13:52:16 +0200 (Mon, 14 Jul 2008)\n+$//\n+00029\n+00030 #ifndef __SPH_VECTOR_H__\n+00031 #define __SPH_VECTOR_H__\n+00032\n+00033 #include \n+00034 #include \n+00035 #include \n+00036 #include \"geom_2d.h\"\n+00037 #include \n+00038\n+00039 namespace siscone_spherical{\n+00040\n+00054 class CSph3vector{\n+00055 public:\n+00057\n+CSph3vector();\n+00058\n+00060\n+CSph3vector(double _px, double _py, double _pz);\n+00061\n+00063\n+~CSph3vector();\n+00064\n+00066\n+CSph3vector& operator = (const CSph3vector &v);\n+00067\n+00070\n+const CSph3vector operator + (const CSph3vector &v);\n+00071\n+00074\n+const CSph3vector operator - (const CSph3vector &v);\n+00075\n+00078\n+const CSph3vector operator / (const double &r);\n+00079\n+00082\n+CSph3vector& operator += (const CSph3vector &v);\n+00083\n+00086\n+CSph3vector& operator -= (const CSph3vector &v);\n+00087\n+00090\n+CSph3vector& operator *= (const double &r);\n+00091\n+00094\n+CSph3vector& operator /= (const double &r);\n+00095\n+00097\n+inline double perp() const {return sqrt(perp2());}\n+00098\n+00100\n+inline double perp2() const {return px*px+py*py;}\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.36 momentum.h\n+\n+00101\n+00103\n+inline double norm() const {return sqrt(px*px+py*py+pz*pz);}\n+00104\n+00106\n+inline double norm2() const {return px*px+py*py+pz*pz;}\n+00107\n+00109\n+inline double phi() const {return atan2(py, px);}\n+00110\n+00112\n+inline double theta() const {return atan2(perp(),pz);}\n+00113\n+00120\n+void build_norm();\n+00121\n+00125\n+void build_thetaphi();\n+00126\n+00129\n+void get_angular_directions(CSph3vector &angular_dir1, CSph3vector &angular_dir2);\n+00130\n+00131\n+double px;\n+00132\n+double py;\n+00133\n+double pz;\n+00134\n+00135\n+double _norm;\n+00136\n+double _theta;\n+00137\n+double _phi;\n+00138\n+00140\n+// the following part is used for checksums //\n+00142\n+siscone::Creference ref;\n+00143 };\n+00144\n+00158 class CSphmomentum : public CSph3vector{\n+00159 public:\n+00161\n+CSphmomentum();\n+00162\n+00164\n+CSphmomentum(CSph3vector &init, double E=0.0);\n+00165\n+00167\n+CSphmomentum(double _px, double _py, double _pz, double _E);\n+00168\n+00170\n+//CSphmomentum(double _eta, double _phi, siscone::Creference _ref);\n+00171\n+00173\n+~CSphmomentum();\n+00174\n+00176\n+inline double mass() const {return sqrt(mass2());}\n+00177\n 00179\n inline double mass2() const {return perpmass2()-perp2();}\n 00180\n 00182\n inline double perpmass() const {return sqrt((E-pz)*(E+pz));}\n 00183\n 00185\n@@ -16812,29 +20013,29 @@\n \u00ab \" and \"\n \u00ab v2.px \u00ab \" \" \u00ab v2.py \u00ab \" \" \u00ab v2.pz \u00ab std::endl;\n 00242\n //}\n 00243\n return v1.px*v2.px + v1.py*v2.py + v1.pz*v2.pz;\n 00244 }\n-00245\n-00249 inline CSph3vector cross_product3(const CSph3vector &v1, const CSph3vector &v2){\n-00250\n-//CSph3vector tmp;\n-00251\n-//tmp.px = v1.py*v2.pz-v1.pz*v2.py;\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-211\n+235\n \n-\f212\n+\f236\n \n File Documentation\n \n+00245\n+00249 inline CSph3vector cross_product3(const CSph3vector &v1, const CSph3vector &v2){\n+00250\n+//CSph3vector tmp;\n+00251\n+//tmp.px = v1.py*v2.pz-v1.pz*v2.py;\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@@ -16881,15 +20082,15 @@\n CSph3vector tmp = v;\n 00309\n return tmp*=r;\n 00310 }\n 00311 }\n 00312 #endif\n \n-5.22\n+5.37\n \n protocones.cpp\n \n 00001\n 00002 // File: protocones.cpp\n //\n 00003 // Description: source file for stable cones determination (Cstable_cones)\n@@ -16958,27 +20159,27 @@\n *\n 00038 * ALGORITHM MAIN STEPS\n *\n 00039 * - init_cone()\n *\n 00040 * - test_cone()\n *\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.37 protocones.cpp\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.22 protocones.cpp\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@@ -17090,28 +20291,28 @@\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 \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-213\n+237\n \n-\f214\n+\f238\n \n File Documentation\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 00142\n@@ -17242,25 +20443,25 @@\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.37 protocones.cpp\n+\n 00221\n compute_cone_contents();\n 00222\n 00223\n return 0;\n 00224 }\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.22 protocones.cpp\n-\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@@ -17389,31 +20590,31 @@\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+239\n+\n+\f240\n+\n+File Documentation\n+\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-215\n-\n-\f216\n-\n-File Documentation\n-\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@@ -17548,26 +20749,26 @@\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.37 protocones.cpp\n+\n 00395\n delete hc;\n 00396\n hc=NULL;\n 00397\n 00398\n return protocones.size();\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.22 protocones.cpp\n-\n 00399 }\n 00400\n 00401\n 00403 // ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS\n //\n 00404 // - cocircular_pt_less(v1, v2)\n //\n@@ -17692,30 +20893,30 @@\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-00486\n-// set up some circulators, since these will help us go around the\n-00487\n-// circle easily\n-00488\n-circulator::iterator >\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-217\n+241\n \n-\f218\n+\f242\n \n File Documentation\n \n+00485\n+00486\n+// set up some circulators, since these will help us go around the\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@@ -17846,26 +21047,26 @@\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.37 protocones.cpp\n+\n 00578\n 00579\n list removed_from_cone;\n 00580\n list put_in_border;\n 00581\n list border_list;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.22 protocones.cpp\n-\n 00582\n 00583\n Cmomentum cone_removal;\n 00584\n Cmomentum border = *parent;\n 00585\n border_list.push_back(parent);\n@@ -18007,30 +21208,30 @@\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 \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-219\n+243\n \n-\f220\n+\f244\n \n File Documentation\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@@ -18157,27 +21358,27 @@\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.22 protocones.cpp\n-\n 00766\n 00767\n }\n 00768\n // set check variables back to 0\n 00769\n this_dpt = 0.0;\n@@ -18295,19 +21496,19 @@\n return dphi;\n 00847 }\n 00848\n 00849 }\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-221\n+245\n \n-\f222\n+\f246\n \n-5.23\n+5.38\n \n File Documentation\n \n protocones.cpp\n \n 00001\n 00002 // File: protocones.cpp\n@@ -18456,15 +21657,15 @@\n //\n 00086 // - init(particle_list)\n //\n 00088\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.23 protocones.cpp\n+\f5.38 protocones.cpp\n \n 00089 // default ctor\n 00090 //-------------00091 CSphstable_cones::CSphstable_cones(){\n 00092\n nb_tot = 0;\n 00093\n hc = NULL;\n@@ -18592,17 +21793,17 @@\n cout \u00ab \"plot \u2019particles.dat\u2019 u 2:1 pt 1 ps 3\" \u00ab endl;\n 00176\n cout \u00ab \"set label 1 \u2019x\u2019 at \" \u00ab parent->_phi \u00ab \", \" \u00ab parent->_theta \u00ab endl;\n 00177 #endif\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-223\n+247\n \n-\f224\n+\f248\n \n File Documentation\n \n 00178\n 00179\n // step 1: initialise with the first cone candidate\n 00180\n@@ -18749,15 +21950,15 @@\n //UPDATED(see below):\n 00266\n //UPDATED(see below):\n cone_candidate = cone;\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.23 protocones.cpp\n+\f5.38 protocones.cpp\n \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@@ -18909,17 +22110,17 @@\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 \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-225\n+249\n \n-\f226\n+\f250\n \n File Documentation\n \n 00354\n // since tests and remaining part of te update has been performed\n 00355\n //if (cocircular_check())\n@@ -19062,15 +22263,15 @@\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 \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.23 protocones.cpp\n+\f5.38 protocones.cpp\n \n 00441\n nb_hash_occupied = hc->n_occupied_cells;\n 00442 #endif\n 00443\n 00444\n delete hc;\n@@ -19205,17 +22406,17 @@\n 00529\n angl_dir1/=angl_dir1._norm;\n 00530\n angl_dir2/=angl_dir2._norm;\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-227\n+251\n \n-\f228\n+\f252\n \n File Documentation\n \n 00531\n 00532\n // now we have te reference axis, create the CSphborder_store structure\n 00533\n@@ -19360,15 +22561,15 @@\n 00621\n if ((centre->side) && (cone.ref.not_empty())){\n 00622\n // update cone\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.23 protocones.cpp\n+\f5.38 protocones.cpp\n \n 00623\n 00624\n 00625\n 00626\n 00627\n 00628\n@@ -19408,15 +22609,15 @@\n 00662\n 00663\n 00664\n 00665\n 00666\n 00667\n \n-229\n+253\n \n cone -= (*child);\n // update info on particles inside\n centre->is_inside->cone = false;\n // update stability check quantities\n dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz); //child->perp2();\n }\n@@ -19526,15 +22727,15 @@\n 00707\n (*is_in)->cone = true;\n 00708\n }\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f230\n+\f254\n \n File Documentation\n \n 00709\n 00710\n // relabel things that got put into the border\n 00711\n@@ -19671,15 +22872,15 @@\n 00803 */\n 00804 void CSphstable_cones::recompute_cone_contents_if_needed(CSphmomentum & this_cone,\n 00805\n double & this_dpt){\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.24 protocones.h\n+\f5.39 protocones.h\n \n 00806\n 00807\n if (this_dpt > PT_TSHOLD*(fabs(this_cone.px)+fabs(this_cone.py))) {\n 00808\n if (cone.ref.is_empty()) {\n 00809\n@@ -19763,15 +22964,15 @@\n 00858\n 00859\n return intersection;\n 00860 }\n 00861\n 00862 }\n \n-5.24\n+5.39\n \n protocones.h\n \n 00001 // -*- C++ -*00003 // File: protocones.h\n //\n 00004 // Description: header file for stable cones determination (Cstable_cones)\n //\n@@ -19816,17 +23017,17 @@\n $//\n 00025 // $Date:: 2008-05-16 19:58:30 +0200 (Fri, 16 May 2008)\n $//\n 00027\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-231\n+255\n \n-\f232\n+\f256\n \n File Documentation\n \n 00028 #ifndef __PROTOCONES_H__\n 00029 #define __PROTOCONES_H__\n 00030\n 00031 #include \"momentum.h\"\n@@ -19949,17 +23150,17 @@\n std::list & border_list);\n 00187\n 00194\n void test_stability(Cmomentum & candidate,\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.25 protocones.h\n+\f5.40 protocones.h\n \n-233\n+257\n \n 00195\n const std::vector & border_vect);\n 00196\n 00203\n void compute_cone_contents();\n 00204\n@@ -20033,15 +23234,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.25\n+5.40\n \n protocones.h\n \n 00001 // -*- C++ -*00003 // File: protocones.h\n //\n 00004 // Description: header file for stable cones determination (Cstable_cones)\n //\n@@ -20096,15 +23297,15 @@\n 00032\n 00033 #include \"momentum.h\"\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n //\n \n-\f234\n+\f258\n \n File Documentation\n \n 00034 #include \"vicinity.h\"\n 00035 #include \n 00036 #include \n 00037 #include \n@@ -20228,15 +23429,15 @@\n 00181\n 00189\n bool cocircular_check();\n 00190\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.26 quadtree.cpp\n+\f5.41 siscone.cpp\n \n 00195\n void test_cone_cocircular(CSphmomentum & borderless_cone,\n 00196\n std::list & border_list);\n 00197\n 00204\n@@ -20303,3470 +23504,16 @@\n 00258\n double dpt;\n 00259 };\n 00260\n 00261 }\n 00262 #endif\n \n-5.26\n-\n-quadtree.cpp\n-\n-00001\n-00002 // File: quadtree.cpp\n-//\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-//\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:: 320\n-$//\n-00024 // $Date:: 2011-11-15 09:54:50 +0100 (Tue, 15 Nov 2011)\n-$//\n-00026\n-00027 #include \"quadtree.h\"\n-00028 #include \n-00029 #include \n-00030 #include \n-00031\n-00032 namespace siscone{\n-00033\n-00034 using namespace std;\n-00035\n-00036 /*******************************************************************\n-00037 * Cquadtree implementation\n-*\n-00038 * Implementation of a 2D quadtree.\n-*\n-00039 * This class implements the traditional two-dimensional quadtree. *\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-235\n-\n-\f236\n-\n-File Documentation\n-\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-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-00050 }\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-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-00062 }\n-00063\n-00064\n-00065 // default destructor\n-00066 // at destruction, everything is destroyed except\n-00067 // physical values at the leaves\n-00068 //-----------------------------------------------00069 Cquadtree::~Cquadtree(){\n-00070\n-if (has_child){\n-00071\n-if (v!=NULL) delete v;\n-00072\n-delete children[0][0];\n-00073\n-delete children[0][1];\n-00074\n-delete children[1][0];\n-00075\n-delete children[1][1];\n-00076\n-}\n-00077 }\n-00078\n-00079\n-00080 /*\n-00081 * init the tree.\n-00082 * By initializing the tree, we mean setting the cell parameters\n-00083 * and preparing the object to act as a seed for a new tree.\n-00084 * - _x\n-x-position of the center\n-00085 * - _y\n-y-position of the center\n-00086 * - half_size_x half x-size of the cell\n-00087 * - half_size_y half y-size of the cell\n-00088 * return 0 on success, 1 on error. Note that if the cell\n-00089 *\n-is already filled, we return an error.\n-00090 ******************************************************************/\n-00091 int Cquadtree::init(double _x, double _y, double _half_size_x, double _half_size_y){\n-00092\n-if (v!=NULL)\n-00093\n-return 1;\n-00094\n-00095\n-centre_x = _x;\n-00096\n-centre_y = _y;\n-00097\n-half_size_x = _half_size_x;\n-00098\n-half_size_y = _half_size_y;\n-00099\n-00100\n-return 0;\n-00101 }\n-00102\n-00103\n-00104 /*\n-00105 * adding a particle to the tree.\n-00106 * This method adds one vector to the quadtree structure which\n-00107 * is updated consequently.\n-00108 * - v\n-vector to add\n-00109 * return 0 on success 1 on error\n-00110 ******************************************************************/\n-00111 int Cquadtree::add(Cmomentum *v_add){\n-00112\n-// Description of the method:\n-00113\n-// -------------------------00114\n-// the addition process goes as follows:\n-00115\n-// 1. check if the cell is empty, in which case, add the particle\n-00116\n-//\n-here and leave.\n-00117\n-// 2. If there is a unique particle already inside,\n-00118\n-//\n-(a) create children\n-00119\n-//\n-(b) forward the existing particle to the appropriate child\n-00120\n-// 3. Add current particle to this cell and forward to the\n-00121\n-//\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-00126\n-if (v==NULL){\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.26 quadtree.cpp\n-\n-00127\n-v = v_add;\n-00128\n-return 0;\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-00133\n-if (!has_child){\n-00134\n-double new_half_size_x = 0.5*half_size_x;\n-00135\n-double new_half_size_y = 0.5*half_size_y;\n-00136\n-// create children\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-new_half_size_x, new_half_size_y);\n-00141\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-00145\n-00146\n-has_child = true;\n-00147\n-00148\n-// forward to child\n-00149\n-//? The following line assumes \u2019true\u2019==1 and \u2019false\u2019==0\n-00150\n-// Note: v being a single particle, eta and phi are correct\n-00151\n-children[v->eta>centre_x][v->phi>centre_y]->add(v);\n-00152\n-00153\n-// copy physical params\n-00154\n-v = new Cmomentum(*v);\n-00155\n-}\n-00156\n-00157\n-// step 3: add new particle\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-00162\n-return 0;\n-00163 }\n-00164\n-00165\n-00166 /*\n-00167 * circle intersection.\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-00171 * - cx\n-circle centre x coordinate\n-00172 * - cy\n-circle centre y coordinate\n-00173 * - cR2\n-circle radius SQUARED\n-00174 * return the checksum for the intersection\n-00175 ******************************************************************/\n-00176 Creference Cquadtree::circle_intersect(double cx, double cy, double cR2){\n-00177\n-// Description of the method:\n-00178\n-// -------------------------00179\n-// 1. check if cell is empty => no intersection\n-00180\n-// 2. if cell has 1! particle, check if it is inside the circle.\n-00181\n-//\n-If yes, add it and return, if not simply return.\n-00182\n-// 3. check if the circle intersects the square. If not, return.\n-00183\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-00187\n-// step 1: if there is no particle inside te square, no reason to go further\n-00188\n-if (v==NULL)\n-00189\n-return Creference();\n-00190\n-00191\n-double dx, dy;\n-00192\n-00193\n-// step 2: if there is only one particle inside the square, test if it is in\n-00194\n-//\n-the circle, in which case return associated reference\n-00195\n-if (!has_child){\n-00196\n-// compute the distance\n-00197\n-// Note: v has only one particle => eta and phi are defined\n-00198\n-dx = cx - v->eta;\n-00199\n-dy = fabs(cy - v->phi);\n-00200\n-if (dy>M_PI)\n-00201\n-dy -= 2.0*M_PI;\n-00202\n-00203\n-// test distance\n-00204\n-if (dx*dx+dy*dyref;\n-00206\n-}\n-00207\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-00213\n-double dx_c, dy_c;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-237\n-\n-\f238\n-\n-File Documentation\n-\n-00214\n-00215\n-// store distance with the centre of the square\n-00216\n-dx_c = fabs(cx-centre_x);\n-00217\n-dy_c = fabs(cy-centre_y);\n-00218\n-if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c;\n-00219\n-00220\n-// compute (minimal) the distance (pay attention to the periodicity in phi).\n-00221\n-dx = dx_c-half_size_x;\n-00222\n-if (dx<0) dx=0;\n-00223\n-dy = dy_c-half_size_y;\n-00224\n-if (dy<0) dy=0;\n-00225\n-00226\n-// check the distance\n-00227\n-if (dx*dx+dy*dy>=cR2){\n-00228\n-// no intersection\n-00229\n-return Creference();\n-00230\n-}\n-00231\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-00236\n-dy = dy_c+half_size_y;\n-00237\n-if (dy>M_PI) dy = M_PI;\n-00238\n-00239\n-// compute the distance\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-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-+ children[1][1]->circle_intersect(cx, cy, cR2);\n-00249 }\n-00250\n-00251\n-00252 /*\n-00253 * output a data file for drawing the grid.\n-00254 * This can be used to output a data file containing all the\n-00255 * grid subdivisions. The file contents is as follows:\n-00256 * first and second columns give center of the cell, the third\n-00257 * gives the size.\n-00258 * - flux opened stream to write to\n-00259 * return 0 on success, 1 on error\n-00260 ******************************************************************/\n-00261 int Cquadtree::save(FILE *flux){\n-00262\n-00263\n-if (flux==NULL)\n-00264\n-return 1;\n-00265\n-00266\n-if (has_child){\n-00267\n-fprintf(flux, \"%e\\t%e\\t%e\\t%e\\n\", centre_x, centre_y, half_size_x, half_size_y);\n-00268\n-children[0][0]->save(flux);\n-00269\n-children[0][1]->save(flux);\n-00270\n-children[1][0]->save(flux);\n-00271\n-children[1][1]->save(flux);\n-00272\n-}\n-00273\n-00274\n-return 0;\n-00275 }\n-00276\n-00277\n-00278 /*\n-00279 * output a data file for drawing the tree leaves.\n-00280 * This can be used to output a data file containing all the\n-00281 * tree leaves. The file contents is as follows:\n-00282 * first and second columns give center of the cell, the third\n-00283 * gives the size.\n-00284 * - flux opened stream to write to\n-00285 * return 0 on success, 1 on error\n-00286 ******************************************************************/\n-00287 int Cquadtree::save_leaves(FILE *flux){\n-00288\n-00289\n-if (flux==NULL)\n-00290\n-return 1;\n-00291\n-00292\n-if (has_child){\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-00295\n-if (children[1][0]!=NULL) children[1][0]->save_leaves(flux);\n-00296\n-if (children[1][1]!=NULL) children[1][1]->save_leaves(flux);\n-00297\n-} else {\n-00298\n-fprintf(flux, \"%e\\t%e\\t%e\\t%e\\n\", centre_x, centre_y, half_size_x, half_size_y);\n-00299\n-}\n-00300\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.27 quadtree.h\n-\n-00301\n-return 0;\n-00302 }\n-00303\n-00304 }\n-\n-5.27\n-\n-quadtree.h\n-\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-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 __QUADTREE_H__\n-00029 #define __QUADTREE_H__\n-00030\n-00031 #include \"momentum.h\"\n-00032 #include \n-00033\n-00034 namespace siscone{\n-00035\n-00043 class Cquadtree{\n-00044 public:\n-00046\n-Cquadtree();\n-00047\n-00049\n-Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y);\n-00050\n-00054\n-~Cquadtree();\n-00055\n-00067\n-int init(double _x, double _y, double _half_size_x, double _half_size_y);\n-00068\n-00076\n-int add(Cmomentum *v_add);\n-00077\n-00088\n-Creference circle_intersect(double cx, double cy, double cR2);\n-00089\n-00099\n-int save(FILE *flux);\n-00100\n-00110\n-int save_leaves(FILE *flux);\n-00111\n-00112\n-double centre_x;\n-00113\n-double centre_y;\n-00114\n-double half_size_x;\n-00115\n-double half_size_y;\n-00116\n-00117\n-Cmomentum *v;\n-00118\n-00119\n-Cquadtree* children[2][2];\n-00120\n-bool has_child;\n-00121 };\n-00122\n-00123 }\n-00124 #endif\n-\n-5.28\n-\n-ranlux.cpp\n-\n-00001 // file: ranlux.xpp\n-00002 #include \"ranlux.h\"\n-00003 #include \n-00004 #include \n-00005\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-239\n-\n-\f240\n-\n-File Documentation\n-\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-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-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-00017\n-The period of the generator is around 10^171.\n-00018\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-00023\n-Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/\n-00024\n-00025\n-See also,\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-00031\n-Kenneth G. Hamilton, F. James, \"Acceleration of RANLUX\", Computer\n-00032\n-Physics Communications, 101 (1997) 241-248\n-00033\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-00039 static const unsigned long int mask_lo = 0x00ffffffUL; // 2^24 - 1\n-00040 static const unsigned long int mask_hi = ~0x00ffffffUL;\n-00041 static const unsigned long int two24 = 16777216;\n-// 2^24\n-00042\n-00043\n-00044 // internal generator structure\n-00045 //-----------------------------00046 typedef struct {\n-00047\n-unsigned int i;\n-00048\n-unsigned int j;\n-00049\n-unsigned int n;\n-00050\n-unsigned int skip;\n-00051\n-unsigned int carry;\n-00052\n-unsigned long int u[24];\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-00065\n-unsigned int j = local_ranlux_state.j;\n-00066\n-long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i]\n-00067\n-- local_ranlux_state.carry;\n-00068\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-00078\n-if (i==0)\n-00079\n-i = 23;\n-00080\n-else\n-00081\n-i--;\n-00082\n-00083\n-local_ranlux_state.i = i;\n-00084\n-00085\n-if (j == 0)\n-00086\n-j = 23;\n-00087\n-else\n-00088\n-j--;\n-00089\n-00090\n-local_ranlux_state.j = j;\n-00091\n-00092\n-return delta;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.28 ranlux.cpp\n-\n-00093 }\n-00094\n-00095\n-00096 // set generator state\n-00097 //--------------------00098 static void ranlux_set(unsigned long int s){\n-00099\n-int i;\n-00100\n-long int seed;\n-00101\n-00102\n-if (s==0)\n-00103\n-s = 314159265;\n-/* default seed is 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-00111\n-unsigned long int k = seed/53668;\n-00112\n-seed = 40014*(seed-k*53668)-k*12211;\n-00113\n-if (seed<0){\n-00114\n-seed += 2147483563;\n-00115\n-}\n-00116\n-local_ranlux_state.u[i] = seed%two24;\n-00117\n-}\n-00118\n-00119\n-local_ranlux_state.i = 23;\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-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-}\n-00129 }\n-00130\n-00131\n-00132 // generator initialization\n-00133 //-------------------------00134 void ranlux_init(){\n-00135\n-// seed the generator\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-00143\n-const unsigned int skip = local_ranlux_state.skip;\n-00144\n-unsigned long int r = increment_state();\n-00145\n-00146\n-local_ranlux_state.n++;\n-00147\n-00148\n-if (local_ranlux_state.n == 24){\n-00149\n-unsigned int i;\n-00150\n-local_ranlux_state.n = 0;\n-00151\n-for (i = 0; i < skip; i++)\n-00152\n-increment_state();\n-00153\n-}\n-00154\n-00155\n-return r;\n-00156 }\n-00157\n-00158 // print generator state\n-00159 //----------------------00160 void ranlux_print_state(){\n-00161\n-size_t i;\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-00165\n-for (i=0;i= 0 and\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-00017\n-The period of the generator is around 10^171.\n-00018\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-00023\n-Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/\n-00024\n-00025\n-See also,\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-00031\n-Kenneth G. Hamilton, F. James, \"Acceleration of RANLUX\", Computer\n-00032\n-Physics Communications, 101 (1997) 241-248\n-00033\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.31\n-\n-reference.cpp\n-\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-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:: 311\n-$//\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 7 2025 11:57:28 for SISCone by Doxygen\n-\n-243\n-\n-\f244\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-00036 *\n-*\n-00037 * This class implements some reference variable\n-*\n-00038 * that can be used for checksums. Those checksums\n-*\n-00039 * are useful to disentengle between contents of two\n-*\n-00040 * cones without looking into their explicit particle *\n-00041 * contents.\n-*\n-00042 *******************************************************/\n-00043\n-00044 // default constructor\n-00046 Creference::Creference(){\n-00047\n-ref[0] = ref[1] = ref[2] = 0;\n-00048 }\n-00049\n-00050\n-//static unsigned int reference_bit = 1;\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-00059\n-00060\n-unsigned int r1 = ranlux_get();\n-00061\n-unsigned int r2 = ranlux_get();\n-00062\n-unsigned int r3 = ranlux_get();\n-00063\n-unsigned int r4 = ranlux_get();\n-00064\n-// since ranlux only produces 24 bits, take r4 and add 8 bits\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-ref[2] = r3+((r4 & 0x000000ff) \u00ab 24);\n-00069\n-00070\n-if (is_empty()) randomize();\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-00077 }\n-00078\n-00079 // test non-emptyness\n-00080 //-------------------00081 bool Creference::not_empty(){\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-ref[1] = r.ref[1];\n-00090\n-ref[2] = r.ref[2];\n-00091\n-return *this;\n-00092 }\n-00093\n-00094 // addition of reference\n-00095 //----------------------00096 Creference Creference::operator + (const Creference &r){\n-00097\n-Creference tmp = *this;\n-00098\n-return tmp+=r;\n-00099 }\n-00100\n-00101 // incrementation of reference\n-00102 //----------------------------00103 Creference& Creference::operator += (const Creference &r){\n-00104\n-ref[0] ^= r.ref[0];\n-00105\n-ref[1] ^= r.ref[1];\n-00106\n-ref[2] ^= r.ref[2];\n-00107\n-return *this;\n-00108 }\n-00109\n-00110 // decrementation of reference\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-00117 }\n-00118\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.32 reference.h\n-\n-00119 }\n-00120\n-\n-5.32\n-\n-reference.h\n-\n-00001 // -*- C++ -*00003 // File: reference.h\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-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 __REFERENCE_H__\n-00029 #define __REFERENCE_H__\n-00030\n-00031 namespace siscone{\n-00032\n-00043 class Creference{\n-00044 public:\n-00046\n-Creference();\n-00047\n-00049\n-void randomize();\n-00050\n-00052\n-bool is_empty();\n-00053\n-00055\n-bool not_empty();\n-00056\n-00058\n-Creference& operator = (const Creference &r);\n-00059\n-00061\n-Creference operator + (const Creference &r);\n-00062\n-00064\n-Creference& operator += (const Creference &r);\n-00065\n-00067\n-Creference& operator -= (const Creference &r);\n-00068\n-00070\n-inline unsigned int operator[] (int i) {return ref[i];}\n-00071\n-00072\n-unsigned int ref[3];\n-00073 };\n-00074\n-00076 Creference operator + (Creference &r1, Creference &r2);\n-00077\n-00079 bool operator == (const Creference &r1, const Creference &r2);\n-00080\n-00082 bool operator != (const Creference &r1, const Creference &r2);\n-00083\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-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-00100 }\n-00101\n-00102 // difference test for two references\n-00103 //----------------------------------\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-245\n-\n-\f246\n-\n-File Documentation\n-\n-00104 inline bool operator < (const Creference &r1, const Creference &r2){\n-00105\n-return (r1.ref[0] &_particles, double _radius, double _f,\n-00077\n-int _n_pass_max=0, double _ptmin=0.0,\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-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-00143\n-static std::ostream * banner_stream() {return _banner_ostr;}\n-00144\n-00145 private:\n-00146\n-bool rerun_allowed;\n-00147\n-static std::ostream * _banner_ostr;\n-00148\n-00150\n-void _initialise_if_needed();\n-00151\n-00152 };\n-00153\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.34 siscone.h\n-\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\n-\n-siscone.h\n-\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-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-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-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-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-00134\n-static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}\n-00135\n-00140\n-static std::ostream * banner_stream() {return _banner_ostr;}\n-00141\n-00142 private:\n-00143\n-bool rerun_allowed;\n-00144\n-static std::ostream * _banner_ostr;\n-00145\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-247\n-\n-\f248\n-\n-File Documentation\n-\n-00147\n-void _initialise_if_needed();\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\n-\n-siscone_error.cpp\n-\n-00001\n-00002 // File: siscone_error.cpp\n-//\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.36\n-\n-siscone_error.h\n-\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.37 hash.cpp\n-\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-00047\n-if (m_print_errors) std::cerr \u00ab \"siscone::Csiscone_error: \"\u00ab message_in \u00ab std::endl;\n-00048\n-};\n-00049\n-00051\n-std::string message() const {return m_message;};\n-00052\n-00055\n-static void setm_print_errors(bool print_errors) {\n-00056\n-m_print_errors = print_errors;};\n-00057\n-00058 private:\n-00059\n-std::string m_message;\n-00060\n-static bool m_print_errors;\n-00061 };\n-00062\n-00063 }\n-00064 #endif\n-\n-5.37\n-\n-hash.cpp\n-\n-00001\n-00002 // File: hash.cpp\n-//\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-249\n-\n-\f250\n-\n-File Documentation\n-\n-00054\n-00055\n-// determine hash size\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-00063\n-// create hash\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-00085\n-delete elm;\n-00086\n-}\n-00087\n-}\n-00088\n-00089\n-delete[] hash_array;\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-00097 * - child\n-child particle defining the cone\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-00104\n-int index = (v->ref.ref[0]) & mask;\n-00105\n-00106\n-// check the array cell corresponding to our reference\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-00114\n-do{\n-00115\n-// if it is not present, add it\n-00116\n-if (elm==NULL){\n-00117\n-// create element\n-00118\n-elm = new hash_element;\n-00119\n-00120\n-// set its varibles\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-00125\n-//compute vectors centre\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-00139\n-return 0;\n-00140\n-}\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.37 hash.cpp\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-00155\n-return 0;\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-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-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-00197\n-return 0;\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-00208\n-return 1;\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-00215 * - centre\n-centre of the circle\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-00220\n-double dx, dy;\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-00227\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-00069\n-// set the array to 0\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-00101 * - p_io\n-whether the parent has to belong to the cone or not\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-00107\n-int index = (v->ref.ref[0]) & mask;\n-00108\n-00109\n-// check the array cell corresponding to our reference\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-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-00123\n-// set its varibles\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-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-00141\n-// if the cone is already there, simply update stability status\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-00146\n-//cout \u00ab \" parent/child: \"\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-00153\n-return 0;\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f254\n-\n-File Documentation\n-\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-00172\n-//cout \u00ab \"-- stable candidate: \" \u00ab v->ref[0] \u00ab \":\" \u00ab endl;\n-00173\n-00174\n-// check the array cell corresponding to our reference\n-00175\n-elm = hash_array[index];\n-00176\n-do{\n-00177\n-// if it is not present, add it\n-00178\n-if (elm==NULL){\n-00179\n-// create element\n-00180\n-elm = new sph_hash_element;\n-00181\n-00182\n-// set its varibles\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-00188\n-// update hash\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-00198\n-return 0;\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.39\n-\n-hash.h\n-\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-00048\n-double eta;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.40 hash.h\n-\n-255\n-\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-00081\n-int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io);\n-00082\n-00090\n-int insert(Cmomentum *v);\n-00091\n-00093\n-hash_element **hash_array;\n-00094\n-00096\n-int n_cones;\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-00108\n-double R2;\n-00109\n-00118\n-inline bool is_inside(Cmomentum *centre, Cmomentum *v);\n-00119 };\n-00120\n-00121 }\n-00122 #endif\n-\n-5.40\n-\n-hash.h\n-\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-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-00049\n-bool is_stable;\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-//\n-\n-\f256\n-\n-File Documentation\n-\n-00069\n-00079\n-int insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool c_io);\n-00080\n-00088\n-int insert(CSphmomentum *v);\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-00102\n-int mask;\n-00103\n-00106\n-double R2;\n-00107\n-00109\n-double tan2R;\n-00110 };\n-00111\n-00112 }\n-00113 #endif\n-\n 5.41\n \n-momentum.cpp\n-\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-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-00058\n-// compute eta and phi\n-00059\n-build_etaphi();\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.41 momentum.cpp\n-\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-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-00125\n-return *this;\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-00135\n-// note: the factor n (ref.nb) cancels in all expressions !!\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-257\n-\n-\f258\n-\n-File Documentation\n-\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-00151\n-return v1.eta < v2.eta;\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\n-\n-momentum.cpp\n-\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-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-\n-//\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.42 momentum.cpp\n-\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-00102\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-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-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-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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-259\n-\n-\f260\n-\n-File Documentation\n-\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-00163\n-if (pz < px){\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-00175\n-// y smallest\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-00232\n-_phi\n-= v._phi;\n-00233\n-00234\n-ref = v.ref;\n-00235\n-return *this;\n-00236 }\n-00237\n-00238 // addition of vectors\n-00239 // !!! WARNING !!! no updating of eta and phi !!!\n-00240 //------------------------------------------------\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.43 siscone.cpp\n-\n-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-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-00290\n-return v1.perp2() < v2.perp2();\n-00291 }\n-00292\n-00293 }\n-00294\n-\n-5.43\n-\n siscone.cpp\n \n 00001\n 00002 // File: siscone.cpp\n //\n 00003 // Description: source file for the main SISCone class\n //\n@@ -23809,35 +23556,35 @@\n //\n 00023 // $Revision:: 403\n $//\n 00024 // $Date:: 2016-05-19 16:52:05 +0200 (Thu, 19 May 2016)\n $//\n 00026\n 00027 #include \"config.h\"\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-261\n-\n-\f262\n-\n-File Documentation\n-\n 00028 #include \"ranlux.h\"\n 00029 #include \"momentum.h\"\n 00030 #include \"defines.h\"\n 00031 #include \"siscone.h\"\n 00032 #include \"siscone_error.h\"\n 00033 #include \n 00034 #include \n 00035 #include \n 00036\n 00037 namespace siscone{\n 00038 using namespace std;\n 00039\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+259\n+\n+\f260\n+\n+File Documentation\n+\n 00040 /***************************************************************\n 00041 * Csiscone implementation\n *\n 00042 * final class: gather everything to compute the jet contents. *\n 00043 *\n *\n 00044 * This is the class user should use.\n@@ -23941,19 +23688,14 @@\n do{\n 00112\n // initialise stable_cone finder\n 00113\n // here we use the list of remaining particles\n 00114\n // AFTER COLLINEAR CLUSTERING !!!!!!\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.43 siscone.cpp\n-\n 00115\n Cstable_cones::init(p_uncol_hard);\n 00116\n 00117\n // get stable cones\n 00118\n if (get_stable_cones(_radius)){\n@@ -23968,14 +23710,19 @@\n 00123\n add_protocones(&protocones, R2, _ptmin);\n 00124\n protocones_list.push_back(protocones);\n 00125 #ifdef DEBUG_STABLE_CONES\n 00126\n nb_hash_cones_total += nb_hash_cones;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.41 siscone.cpp\n+\n 00127\n nb_hash_occupied_total += nb_hash_occupied;\n 00128 #endif\n 00129\n } else {\n 00130\n // no new protocone: leave\n@@ -24093,23 +23840,14 @@\n 00198\n } while ((unclustered_left) && (n_left>0) && (_n_pass_max!=0));\n 00199\n 00200\n // split & merge\n 00201\n return jets.size();\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-263\n-\n-\f264\n-\n-File Documentation\n-\n 00202 }\n 00203\n 00204\n 00205 /*\n 00206 * recompute the jets with a different overlap parameter.\n 00207 * we use the same particles and R as in the preceeding call.\n 00208 * - _f\n@@ -24120,14 +23858,23 @@\n the scale choice for the split-merge procedure\n 00211 *\n NOTE: using pt leads to IR unsafety for some events with momentum\n 00212 *\n conservation. So we strongly advise not to change the default\n 00213 *\n value.\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+261\n+\n+\f262\n+\n+File Documentation\n+\n 00214 * return the number of jets found, -1 if recomputation not allowed.\n 00215 ********************************************************************/\n 00216 int Csiscone::recompute_jets(double _f, double _ptmin,\n 00217\n Esplit_merge_scale _split_merge_scale){\n 00218\n if (!rerun_allowed)\n@@ -24244,30 +23991,29 @@\n 00282\n return SISCONE_PACKAGE_NAME;\n 00283 }\n 00284\n 00285 /*\n 00286 * return SISCone version number.\n 00287 * return a string of the form \"X.Y.Z\" with possible additional tag\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.44 siscone.cpp\n-\n 00288 *\n (alpha, beta, devel) to mention stability status\n 00289 */\n 00290 string siscone_version(){\n 00291\n return SISCONE_VERSION;\n 00292 }\n 00293\n 00294 }\n \n-5.44\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.42 siscone.cpp\n+\n+5.42\n \n siscone.cpp\n \n 00001\n 00002 // File: siscone.cpp\n //\n 00003 // Description: source file for the main SISCone class\n@@ -24369,23 +24115,14 @@\n 00071 * - _radius\n cone radius\n 00072 * - _f\n shared energy threshold for splitting&merging\n 00073 * - _n_pass_max maximum number of runs\n 00074 * - _Emin\n minimum energy of the protojets\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-265\n-\n-\f266\n-\n-File Documentation\n-\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 00077 *\n conservation. So we strongly advise not to change the default\n 00078 *\n@@ -24398,14 +24135,23 @@\n 00083\n Esplit_merge_scale _split_merge_scale){\n 00084\n // make sure things are initialised\n 00085\n _initialise_if_needed();\n 00086\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+263\n+\n+\f264\n+\n+File Documentation\n+\n 00087\n // run some general safety tests (NB: f will be checked in split-merge)\n 00088\n if (_radius <= 0.0 || _radius >= 0.5*M_PI) {\n 00089\n ostringstream message;\n 00090\n@@ -24521,19 +24267,14 @@\n 00158\n Esplit_merge_scale _ordering_scale){\n 00159\n // make sure things are initialised\n 00160\n _initialise_if_needed();\n 00161\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.44 siscone.cpp\n-\n 00162\n // run some general safety tests (NB: f will be checked in split-merge)\n 00163\n if (_radius <= 0.0 || _radius >= 0.5*M_PI) {\n 00164\n ostringstream message;\n 00165\n@@ -24548,14 +24289,21 @@\n 00170\n ptcomparison.split_merge_scale = _ordering_scale;\n 00171\n partial_clear(); // make sure some things are initialised properly\n 00172\n 00173\n // init the split_merge algorithm with the initial list of particles\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.42 siscone.cpp\n+\n+265\n+\n 00174\n // this initialises particle list p_left of remaining particles to deal with\n 00175\n //\n 00176\n // this stores the \"processed\" particles in p_uncol_hard\n 00177\n@@ -24672,35 +24420,20 @@\n 00245\n init_done=true;\n 00246\n 00247\n // print the banner\n 00248\n if (_banner_ostr != 0){\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-267\n-\n-\f268\n-\n-File Documentation\n-\n 00249\n+ios::fmtflags flags_to_restore(_banner_ostr->flags());\n 00250\n 00251\n-00252\n-\n-ios::fmtflags flags_to_restore(_banner_ostr->flags());\n-\n-5.45\n-\n-vicinity.h\n-\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 (*_banner_ostr) \u00ab \"#\n http://projects.hepforge.org/siscone\n@@ -24721,14 +24454,21 @@\n o\" \u00ab endl;\n 00259\n (*_banner_ostr) \u00ab \"#\n !!!\n WARNING\n !!!\n o\" \u00ab endl;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f266\n+\n+File Documentation\n+\n 00260\n (*_banner_ostr) \u00ab \"#\n This is the version of SISCone using spherical coordinates\n o\" \u00ab endl;\n 00261\n (*_banner_ostr) \u00ab \"#\n o\" \u00ab endl;\n@@ -24778,383 +24518,287 @@\n 00293 string siscone_version(){\n 00294\n return SISCONE_VERSION;\n 00295 }\n 00296\n 00297 }\n \n-00001 // -*- C++ -*00003 // File: vicinity.h\n+5.43\n+\n+siscone.h\n+\n+00001 // -*- C++ -*00003 // File: siscone.h\n //\n-00004 // Description: header file for particle vicinity (Cvicinity class)\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+00006 // For more details, see http://projects.hepforge.org/siscone\n //\n 00007 //\n-an adaptation to spherical coordinates\n //\n-00008 // For more details, see http://projects.hepforge.org/siscone\n+00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\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+00010 // 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+00011 // 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+00012 // the Free Software Foundation; either version 2 of the License, or\n //\n-00015 // (at your option) any later version.\n+00013 // (at your option) any later version.\n //\n-00016 //\n+00014 //\n //\n-00017 // This program is distributed in the hope that it will be useful,\n+00015 // 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+00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n //\n-00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n //\n-00020 // GNU General Public License for more details.\n+00018 // GNU General Public License for more details.\n //\n-00021 //\n+00019 //\n //\n-00022 // You should have received a copy of the GNU General Public License\n+00020 // 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+00021 // 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+00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00023 //\n //\n-00026 // $Revision:: 255\n+00024 // $Revision:: 401\n $//\n-00027 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008)\n+00025 // $Date:: 2016-05-19 16:44:37 +0200 (Thu, 19 May 2016)\n $//\n-00029\n-00030 #ifndef __SPH_VICINITY_H__\n-00031 #define __SPH_VICINITY_H__\n-00032\n-\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+00077\n+int _n_pass_max=0, double _ptmin=0.0,\n+00078\n+Esplit_merge_scale _split_merge_scale=SM_pttilde);\n \n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n-\f5.46 vicinity.h\n+\f5.44 siscone.h\n \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-00062\n-double angle;\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+267\n+\n+00079\n+00097\n+int compute_jets_progressive_removal(std::vector &_particles, double _radius,\n 00098\n-void set_particle_list(std::vector &_particle_list);\n+int _n_pass_max=0, double _ptmin=0.0,\n 00099\n-00105\n-void build(CSphmomentum *_parent, double _VR);\n-00106\n-00107\n-// cone kinematical information\n-00108\n-CSphmomentum *parent;\n-00109\n-double VR;\n-00110\n-double VR2;\n-00111\n-double cosVR;\n-00112\n-double R;\n+Esplit_merge_scale _ordering_scale=SM_pttilde);\n+00100\n 00113\n-double R2;\n+int recompute_jets(double _f, double _ptmin = 0.0,\n 00114\n-double tan2R;\n+Esplit_merge_scale _split_merge_scale=SM_pttilde);\n 00115\n-double D2_R;\n-00116\n-double inv_R_EPS_COCIRC;\n 00117\n-double inv_R_2EPS_COCIRC;\n+std::vector > protocones_list;\n 00118\n 00119\n-// particle list information\n+// random number initialisation\n 00120\n-int n_part;\n+static bool init_done;\n 00121\n-std::vector plist;\n+00122 #ifdef DEBUG_STABLE_CONES\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-00129\n-// vicinity information\n-00130\n-std::vector vicinity;\n-00131\n-unsigned int vicinity_size;\n-00132\n-00133 protected:\n-00139\n-void append_to_vicinity(CSphmomentum *v);\n-00140\n-00141\n-// internal variables\n-00142\n-CSph3vector parent_centre;\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 00143\n-CSph3vector angular_dir1;\n+static std::ostream * banner_stream() {return _banner_ostr;}\n 00144\n-CSph3vector angular_dir2;\n-00145 };\n+00145 private:\n 00146\n-00147 }\n+bool rerun_allowed;\n+00147\n+static std::ostream * _banner_ostr;\n 00148\n-00149 #endif\n-\n-5.46\n-\n-vicinity.h\n-\n-00001 // -*- C++ -*-\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-269\n+00150\n+void _initialise_if_needed();\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-\f270\n+5.44\n \n-File Documentation\n+siscone.h\n \n-00003 // File: vicinity.h\n+00001 // -*- C++ -*00003 // File: siscone.h\n //\n-00004 // Description: header file for particle vicinity (Cvicinity class)\n+00004 // Description: header file for the main SISCone 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+00006 // WARNING: this is not the main SISCone trunk but\n //\n 00007 //\n+an adaptation to spherical coordinates\n //\n-00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez\n+00008 // For more details, see http://projects.hepforge.org/siscone\n //\n 00009 //\n //\n-00010 // This program is free software; you can redistribute it and/or modify\n+00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez\n+00011 //\n //\n-00011 // it under the terms of the GNU General Public License as published by\n+00012 // This program is free software; you can redistribute it and/or modify\n //\n-00012 // the Free Software Foundation; either version 2 of the License, or\n+00013 // it under the terms of the GNU General Public License as published by\n //\n-00013 // (at your option) any later version.\n+00014 // the Free Software Foundation; either version 2 of the License, or\n //\n-00014 //\n+00015 // (at your option) any later version.\n //\n-00015 // This program is distributed in the hope that it will be useful,\n+00016 //\n //\n-00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n+00017 // This program is distributed in the hope that it will be useful,\n //\n-00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of\n //\n-00018 // GNU General Public License for more details.\n+00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n //\n-00019 //\n+00020 // GNU General Public License for more details.\n //\n-00020 // You should have received a copy of the GNU General Public License\n+00021 //\n //\n-00021 // along with this program; if not, write to the Free Software\n+00022 // You should have received a copy of the GNU General Public License\n //\n-00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n-00023 //\n+00023 // along with this program; if not, write to the Free Software\n //\n-00024 // $Revision:: 123\n+00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //\n+00025 //\n+//\n+00026 // $Revision:: 401\n $//\n-00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)\n+00027 // $Date:: 2016-05-19 16:44:37 +0200 (Thu, 19 May 2016)\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+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-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-00073\n-double phi;\n-00074\n-double angle;\n-00075\n-bool side;\n+00056\n+~CSphsiscone();\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+//\n+\n+\f268\n+\n+File Documentation\n+\n+00057\n 00076\n-double cocircular_range;\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-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+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 00110\n-void set_particle_list(std::vector &_particle_list);\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+00116\n+// random number initialisation\n 00117\n-void build(Cmomentum *_parent, double _VR);\n+static bool init_done;\n 00118\n-00119\n-// cone kinematical information\n+00119 #ifdef DEBUG_STABLE_CONES\n 00120\n-Cmomentum *parent;\n-00121\n-double VR;\n+int nb_hash_cones_total, nb_hash_occupied_total;\n+00121 #endif\n 00122\n-double VR2;\n-00123\n-double R;\n-00124\n-double R2;\n-00125\n-double inv_R_EPS_COCIRC;\n-00126\n-double inv_R_2EPS_COCIRC;\n-00127\n-00128\n-// particle list information\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.47 split_merge.cpp\n-\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-00139\n-unsigned int vicinity_size;\n+static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}\n+00135\n 00140\n-00141 protected:\n+static std::ostream * banner_stream() {return _banner_ostr;}\n+00141\n+00142 private:\n+00143\n+bool rerun_allowed;\n+00144\n+static std::ostream * _banner_ostr;\n+00145\n 00147\n-void append_to_vicinity(Cmomentum *v);\n+void _initialise_if_needed();\n 00148\n-00149\n-// internal variables\n+00149 };\n 00150\n-double pcx;\n 00151\n-double pcy;\n-00152 };\n-00153\n-00154 }\n-00155\n-00156 #endif\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.47\n+5.45\n \n split_merge.cpp\n \n 00001\n 00002 // File: split_merge.cpp\n //\n 00003 // Description: source file for splitting/merging (contains the CJet class) //\n@@ -25211,14 +24855,19 @@\n 00032 #include \n // for max\n 00033 #include \n 00034 #include \n 00035 #include \n 00036 #include \n 00037 #include \n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n 00038\n 00039 namespace siscone_spherical{\n 00040\n 00041 using namespace std;\n 00042\n 00043 /********************************************************\n 00044 * class CSphjet implementation\n@@ -25241,23 +24890,14 @@\n v = CSphmomentum();\n 00056\n E_tilde = 0.0;\n 00057\n sm_var2 = 0.0;\n 00058\n pass = CJET_INEXISTENT_PASS; // initialised to a value that should\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-271\n-\n-\f272\n-\n-File Documentation\n-\n 00059\n // notappear in the end (after clustering)\n 00060 }\n 00061\n 00062 // default dtor\n 00063 //-------------00064 CSphjet::~CSphjet(){\n 00065\n@@ -25337,14 +24977,23 @@\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+269\n+\n+\f270\n+\n+File Documentation\n+\n 00125\n 00126\n // depending on the choice of ordering variable, set the result\n 00127\n switch (split_merge_scale){\n 00128\n case SM_Etilde:\n@@ -25373,21 +25022,14 @@\n 00140 #endif // EPSILON_SPLITMERGE\n 00141\n 00142\n return res;\n 00143 }\n 00144\n 00145\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.47 split_merge.cpp\n-\n-273\n-\n 00148 std::string split_merge_scale_name(Esplit_merge_scale sms) {\n 00149\n switch(sms) {\n 00150\n case SM_E:\n 00151\n return \"E (IR unsafe for pairs of identical decayed heavy particles)\";\n@@ -25498,14 +25140,19 @@\n const CSphmomentum &p = (*particles)[j1.contents[i1]];\n 00210\n (*v) += p;\n 00211\n (*E_tilde) += p.E*norm2_cross_product3(p,jet1_axis)/(*particles_norm2)[j1.contents[i1]];\n 00212\n i1++;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n 00213\n }\n 00214\n while (i2 < j2.n) {\n 00215\n const CSphmomentum &p = (*particles)[j2.contents[i2]];\n 00216\n@@ -25530,21 +25177,14 @@\n 00228 * Class used to split and merge jets.\n *\n 00229 ********************************************************/\n 00230 // default ctor\n 00231 //-------------00232 CSphsplit_merge::CSphsplit_merge(){\n 00233\n merge_identical_protocones = false;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f274\n-\n-File Documentation\n-\n 00234 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n 00235 #ifdef MERGE_IDENTICAL_PROTOCONES_DEFAULT_TRUE\n 00236\n merge_identical_protocones = true;\n 00237 #endif\n 00238 #endif\n 00239\n@@ -25632,14 +25272,23 @@\n 00295\n // ensure that ptcomparison points to our set of particles (though params not correct)\n 00296\n ptcomparison.particles = &particles;\n 00297\n ptcomparison.particles_norm2 = &particles_norm2;\n 00298\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+271\n+\n+\f272\n+\n+File Documentation\n+\n 00299\n // set up the list of particles left.\n 00300\n init_pleft();\n 00301\n 00302\n indices = new int[n];\n@@ -25664,19 +25313,14 @@\n 00316\n // - 0 means not included\n 00317\n // - i mean included at run i\n 00318\n int i,j;\n 00319\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.47 split_merge.cpp\n-\n 00320\n // copy particles removing the ones with infinite rapidity\n 00321\n j=0;\n 00322\n p_remain.clear();\n 00323\n@@ -25779,15 +25423,23 @@\n 00379\n 00380\n return 0;\n 00381 }\n 00382\n 00383\n 00384 // full clearance\n-00385 //---------------00386 int CSphsplit_merge::full_clear(){\n+00385 //----------------\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n+273\n+\n+00386 int CSphsplit_merge::full_clear(){\n 00387\n partial_clear();\n 00388\n 00389\n // clear previously allocated memory\n 00390\n if (indices != NULL){\n@@ -25809,70 +25461,59 @@\n 00402 //------------------------------------------------------------------------00403 int CSphsplit_merge::merge_collinear_and_remove_soft(){\n 00404\n int i,j;\n 00405\n vector p_sorted;\n 00406\n bool collinear;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-275\n-\n-\f276\n-\n 00407\n+double dphi;\n 00408\n 00409\n+p_uncol_hard.clear();\n 00410\n 00411\n+// we first sort the particles according to their theta angle\n 00412\n+for (i=0;iM_PI) dphi = twopi-dphi;\n 00434\n@@ -25934,14 +25575,21 @@\n CSphjet jet;\n 00468\n 00469\n if (protocones->size()==0)\n 00470\n return 1;\n 00471\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f274\n+\n+File Documentation\n+\n 00472\n E_min = Emin;\n 00473\n double R = sqrt(R2);\n 00474\n tan2R = tan(R);\n 00475\n@@ -25971,19 +25619,14 @@\n 00489\n // initialise variables\n 00490\n c = &(*p_it);\n 00491\n 00492\n // browse particles to create cone contents\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.47 split_merge.cpp\n-\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 00496\n@@ -26093,14 +25736,21 @@\n 00555 #endif\n 00556\n j++;\n 00557\n }\n 00558\n }\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n+275\n+\n 00559 #ifdef DEBUG_SPLIT_MERGE\n 00560\n cout \u00ab endl;\n 00561 #endif\n 00562\n n_left = j;\n 00563\n@@ -26121,23 +25771,14 @@\n 00574 // - Emin\n minimal energy allowed for jets\n 00575 * return 0 on success, 1 on error\n 00576 *\n 00577 * The list of remaining particles (and the uncollinear-hard ones)\n 00578 * is updated.\n 00579 */\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-277\n-\n-\f278\n-\n-File Documentation\n-\n 00580 int CSphsplit_merge::add_hardest_protocone_to_jets(std::vector *protocones, double R2,\n double Emin){\n 00581\n 00582\n int i;\n 00583\n CSphmomentum *c;\n@@ -26249,14 +25890,21 @@\n 00641\n jet_candidate.sm_var2 = get_sm_var2(jet_candidate.v, jet_candidate.E_tilde);\n 00642\n }\n 00643\n 00644\n // now check if it is possibly the hardest\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f276\n+\n+File Documentation\n+\n 00645\n if ((! found_jet) ||\n 00646\n (_user_scale ? _user_scale->is_larger(jet_candidate, jet)\n 00647\n : ptcomparison(jet_candidate, jet))){\n 00648\n@@ -26285,19 +25933,14 @@\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.47 split_merge.cpp\n-\n 00666\n int p_remain_index = 0;\n 00667\n int contents_index = 0;\n 00668\n //sort(next_jet.contents.begin(),next_jet.contents.end());\n 00669\n@@ -26400,14 +26043,19 @@\n 00728\n message \u00ab \" (legal values are 0end()){\n 00756 #ifdef DEBUG_SPLIT_MERGE\n 00757\n@@ -26564,14 +26203,23 @@\n 00815\n }\n 00816\n } while (candidates->size()>0);\n 00817\n 00818\n // sort jets by Energy\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+277\n+\n+\f278\n+\n+File Documentation\n+\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@@ -26594,19 +26242,14 @@\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.47 split_merge.cpp\n-\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@@ -26714,14 +26357,19 @@\n }\n 00902\n 00903\n fprintf(stdout, \"\\n\");\n 00904\n return 0;\n 00905 }\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\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@@ -26745,23 +26393,14 @@\n 00923\n i1=i2=idx_size=0;\n 00924\n is_overlap = false;\n 00925\n CSphmomentum v;\n 00926\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-281\n-\n-\f282\n-\n-File Documentation\n-\n 00927\n // compute overlap\n 00928\n // at the same time, we store union in indices\n 00929\n do{\n 00930\n@@ -26868,14 +26507,23 @@\n 00990\n i1=i2=0;\n 00991\n jet2.v = jet1.v = CSphmomentum();\n 00992\n 00993\n // compute centroids\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+279\n+\n+\f280\n+\n+File Documentation\n+\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@@ -26909,19 +26557,14 @@\n } else if (j1.contents[i1]>j2.contents[i2]){\n 01012\n // particle i2 belong only to jet 2\n 01013\n v = &(particles[j2.contents[i2]]);\n 01014\n jet2.contents.push_back(j2.contents[i2]);\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.47 split_merge.cpp\n-\n 01015\n jet2.v += *v;\n 01016\n //jet2.pt_tilde += pt[j2.contents[i2]];\n 01017\n i2++;\n 01018\n@@ -27037,14 +26680,19 @@\n compute_Etilde(jet1);\n 01077\n compute_Etilde(jet2);\n 01078\n 01079\n // remove previous jets\n 01080 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.45 split_merge.cpp\n+\n 01081\n cand_refs.erase(j1.v.ref);\n 01082\n cand_refs.erase(j2.v.ref);\n 01083 #endif\n 01084\n candidates->erase(it_j1);\n@@ -27067,23 +26715,14 @@\n 01096 // by 1 single jets containing both of them.\n 01097 // - it_j1 iterator of the first jet in \u2019candidates\u2019\n 01098 // - it_j2 iterator of the second jet in \u2019candidates\u2019\n 01099 // return true on success, false on error\n 01101 bool CSphsplit_merge::merge(cjet_iterator &it_j1, cjet_iterator &it_j2){\n 01102\n CSphjet jet;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-283\n-\n-\f284\n-\n-File Documentation\n-\n 01103\n int i;\n 01104\n 01105\n // build new jet\n 01106\n // note: particles within j1 & j2 have already been stored in indices\n@@ -27186,14 +26825,23 @@\n + ptcomparison.SM_scale_name());\n 01176\n }\n 01177\n 01178\n //return 0.0;\n 01179 }\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+281\n+\n+\f282\n+\n+File Documentation\n+\n 01180\n 01181\n 01182\n 01184 void CSphsplit_merge::compute_Etilde(CSphjet &jet){\n 01185\n jet.v.build_norm();\n 01186\n@@ -27222,19 +26870,15 @@\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 \n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.48 split_merge.cpp\n-\n-5.48\n+5.46\n \n split_merge.cpp\n \n 00001\n 00002 // File: split_merge.cpp\n //\n 00003 // Description: source file for splitting/merging (contains the CJet class) //\n@@ -27321,14 +26965,19 @@\n 00056\n pass = CJET_INEXISTENT_PASS; // initialised to a value that should\n 00057\n // notappear in the end (after clustering)\n 00058 }\n 00059\n 00060 // default dtor\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.46 split_merge.cpp\n+\n 00061 //-------------00062 Cjet::~Cjet(){\n 00063\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 00069\n@@ -27347,23 +26996,14 @@\n 00080 // depending on \u2019split_merge_scale\u2019 choice\n 00081 //\n 00082 // with EPSILON_SPLITMERGE defined, this attempts to identify\n 00083 // delicate cases where two jets have identical momenta except for\n 00084 // softish particles -- the difference of pt\u2019s may not be correctly\n 00085 // identified normally and so lead to problems for the fate of the\n 00086 // softish particle.\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-285\n-\n-\f286\n-\n-File Documentation\n-\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@@ -27464,14 +27104,23 @@\n + SM_scale_name());\n 00145\n }\n 00146\n res = qdiff > 0;\n 00147\n }\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+283\n+\n+\f284\n+\n+File Documentation\n+\n 00148 #endif // EPSILON_SPLITMERGE\n 00149\n 00150\n return res;\n 00151 }\n 00152\n 00153\n@@ -27506,21 +27155,14 @@\n 00172 // get the difference between 2 jets\n 00173 // - j1\n first jet\n 00174 // - j2\n second jet\n 00175 // - v\n jet1-jet2\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.48 split_merge.cpp\n-\n-287\n-\n 00176 // - pt_tilde\n jet1-jet2 pt_tilde\n 00177 // return true if overlapping, false if disjoint\n 00178 //----------------------------------------------00179 void Csplit_merge_ptcomparison::get_difference(const Cjet &j1, const Cjet &j2, Cmomentum *v, double\n *pt_tilde) const {\n 00180\n int i1,i2;\n@@ -27613,14 +27255,21 @@\n 00231 #endif\n 00232 #endif\n 00233\n _user_scale = NULL;\n 00234\n indices = NULL;\n 00235\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.46 split_merge.cpp\n+\n+285\n+\n 00236\n // ensure that ptcomparison points to our set of particles (though params not correct)\n 00237\n ptcomparison.particles = &particles;\n 00238\n ptcomparison.pt = &pt;\n 00239\n@@ -27649,21 +27298,14 @@\n full_clear();\n 00256 }\n 00257\n 00258\n 00259 // initialisation function\n 00260 // - _particles list of particles\n 00261 // - protocones list of protocones (initial jet candidates)\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f288\n-\n-File Documentation\n-\n 00262 // - R2\n cone radius (squared)\n 00263 // - ptmin\n minimal pT allowed for jets\n 00264 //------------------------------------------------------------00265 int Csplit_merge::init(vector & /*_particles*/, vector *protocones, double R2,\n double ptmin){\n 00266\n@@ -27752,14 +27394,21 @@\n p_remain.clear();\n 00319\n for (i=0;i p_sorted;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.46 split_merge.cpp\n+\n+287\n+\n 00409\n bool collinear;\n 00410\n double dphi;\n 00411\n 00412\n p_uncol_hard.clear();\n@@ -27945,21 +27594,14 @@\n // check if there is(are) particle(s) with the \u2019same\u2019 eta\n 00432\n collinear = false;\n 00433\n j=i+1;\n 00434\n while ((jM_PI) dphi = twopi-dphi;\n 00437\n if (dphipz)!=v->E){\n 00495\n dx = eta - v->eta;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f288\n+\n+File Documentation\n+\n 00496\n dy = fabs(phi - v->phi);\n 00497\n if (dy>M_PI)\n 00498\n dy -= twopi;\n 00499\n@@ -28108,21 +27757,14 @@\n cout \u00ab \"adding jet: \";\n 00519\n for (int i2=0;i2size()==0)\n 00583\n return 1;\n 00584\n 00585\n pt_min2 = ptmin*ptmin;\n@@ -28258,21 +27905,14 @@\n jet_candidate.contents.clear();\n 00605\n for (i=0;ipz)!=v->E){\n 00610\n dx = eta - v->eta;\n 00611\n@@ -28376,14 +28016,23 @@\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+289\n+\n+\f290\n+\n+File Documentation\n+\n 00669\n //sort(next_jet.contents.begin(),next_jet.contents.end());\n 00670\n for (int index=0;indexend()){\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.46 split_merge.cpp\n+\n 00756 #ifdef DEBUG_SPLIT_MERGE\n 00757\n show();\n 00758 #endif\n 00759\n // check overlapping\n 00760\n@@ -28574,23 +28223,14 @@\n // update iterators\n 00779\n j2 = j1 = candidates->begin();\n 00780\n j2_relindex = 0;\n 00781\n }\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-293\n-\n-\f294\n-\n-File Documentation\n-\n 00782\n }\n 00783\n // watch out: split/merge might have caused new jets with pt <\n 00784\n // ptmin to disappear, so the total number of jets may\n 00785\n@@ -28688,14 +28328,23 @@\n 00840\n j1->v.eta, j1->v.phi, j1->v.perp(), j1->n);\n 00841\n }\n 00842\n 00843\n fprintf(flux, \"# jet contents\\n\");\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+291\n+\n+\f292\n+\n+File Documentation\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 00846\n j1 = &(*it_j);\n 00847\n@@ -28731,19 +28380,14 @@\n for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){\n 00867\n j = &(*it_j);\n 00868\n fprintf(stdout, \"jet %2d: %e\\t%e\\t%e\\t%e\\t\", i1+1,\n 00869\n j->v.px, j->v.py, j->v.pz, j->v.E);\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.48 split_merge.cpp\n-\n 00870\n for (i2=0;i2n;i2++)\n 00871\n fprintf(stdout, \"%d \", j->contents[i2]);\n 00872\n fprintf(stdout, \"\\n\");\n 00873\n@@ -28843,14 +28487,19 @@\n 00927\n } while ((i1eta;\n 01021\n dy1 = fabs(phi1 - v->phi);\n 01022\n@@ -29054,19 +28703,14 @@\n if (d1sqeta,v->phi);\n 01047\n } else {\n 01048\n@@ -29163,14 +28807,21 @@\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 01104 // return true on success, false on error\n 01106 bool Csplit_merge::merge(cjet_iterator &it_j1, cjet_iterator &it_j2){\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.47 split_merge.h\n+\n+295\n+\n 01107\n Cjet jet;\n 01108\n int i;\n 01109\n 01110\n // build new jet\n@@ -29209,23 +28860,14 @@\n 01129\n candidates->erase(it_j1);\n 01130\n candidates->erase(it_j2);\n 01131\n 01132\n // reinsert new candidate\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-297\n-\n-\f298\n-\n-File Documentation\n-\n 01133\n insert(jet);\n 01134\n 01135\n return true;\n 01136 }\n 01137\n@@ -29290,37 +28932,47 @@\n 01182\n 01183\n //return 0.0;\n 01184 }\n 01185\n 01186 }\n \n-5.49\n+5.47\n \n split_merge.h\n \n 00001 // -*- C++ -*00003 // File: split_merge.h\n-//\n-00004 // Description: header file for splitting/merging (contains the CJet class) //\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-//\n 00012 // This program is free software; you can redistribute it and/or modify\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+//\n+//\n+//\n+//\n+//\n+//\n //\n+//\n+//\n+//\n+\n+\f296\n+\n+File Documentation\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@@ -29353,23 +29005,14 @@\n 00033 #include \n 00034 #include \n 00035 #include \"geom_2d.h\"\n 00036 #include \"momentum.h\"\n 00037 #include \n 00038 #include \n 00039 #include \n-\n-//\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.49 split_merge.h\n-\n-299\n-\n 00040 #include \n 00041 #include \n 00042\n 00043 namespace siscone_spherical{\n 00044\n 00045 const int CJET_INEXISTENT_PASS = -2;\n 00046\n@@ -29443,14 +29086,21 @@\n 00161\n 00162 // iterator types\n 00164 typedef std::multiset::iterator\n cjet_iterator;\n 00165\n 00167 typedef std::vector::iterator jet_iterator;\n 00168\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.47 split_merge.h\n+\n+297\n+\n 00169\n 00170\n 00175 class CSphsplit_merge{\n 00176 public:\n 00178\n CSphsplit_merge();\n 00179\n@@ -29481,72 +29131,63 @@\n }\n 00225\n 00227\n // cleaning functions //\n 00229\n 00231\n int partial_clear();\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f300\n-\n 00232\n 00234\n+int full_clear();\n 00235\n 00237\n+// user-defined stable-cone ordering //\n 00239\n 00245\n+class Cuser_scale_base{\n 00246\n+public:\n 00248\n+virtual ~Cuser_scale_base(){}\n 00249\n 00254\n+virtual double operator()(const CSphjet & jet) const = 0;\n 00255\n 00266\n+virtual bool is_larger(const CSphjet & a, const CSphjet & b) const{\n 00267\n+return (a.sm_var2 > b.sm_var2);\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 00280\n+const Cuser_scale_base * user_scale() const { return _user_scale; }\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 00305\n+int add_protocones(std::vector *protocones, double R2, double Emin=0.0);\n 00306\n 00317\n-\n-File Documentation\n-\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-\n 00318\n 00328\n int perform(double overlap_tshold, double Emin=0.0);\n 00329\n 00330\n 00332\n // save and debug functions //\n@@ -29588,14 +29229,21 @@\n int *indices;\n 00361\n int idx_size;\n 00362\n 00371\n bool merge_identical_protocones;\n 00372\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f298\n+\n+File Documentation\n+\n 00374\n CSphsplit_merge_ptcomparison ptcomparison;\n 00375\n 00382\n double SM_var2_hardest_cut_off;\n 00383\n 00391\n@@ -29626,19 +29274,14 @@\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.50 split_merge.h\n-\n 00453\n 00455\n double E_min;\n 00456\n 00462\n bool use_E_weighted_splitting;\n 00463\n@@ -29652,15 +29295,15 @@\n 00472 };\n 00473\n 00474 }\n 00475\n 00476\n 00477 #endif\n \n-5.50\n+5.48\n \n split_merge.h\n \n 00001 // -*- C++ -*00003 // File: split_merge.h\n //\n 00004 // Description: header file for splitting/merging (contains the CJet class) //\n 00005 // This file is part of the SISCone project.\n@@ -29714,14 +29357,21 @@\n 00034 #include \"momentum.h\"\n 00035 #include \n 00036 #include \n 00037 #include \n 00038 #include \n 00039 #include \n 00040\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.48 split_merge.h\n+\n+299\n+\n 00041 namespace siscone{\n 00042\n 00043 const int CJET_INEXISTENT_PASS = -2;\n 00044\n 00054 class Cjet{\n 00055 public:\n 00057\n@@ -29749,23 +29399,14 @@\n int pass;\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-301\n-\n-\f302\n-\n-File Documentation\n-\n 00097\n SM_pt,\n 00098\n SM_Et,\n 00100\n SM_mt,\n 00102\n@@ -29845,14 +29486,21 @@\n 00234\n 00236\n int partial_clear();\n 00237\n 00239\n int full_clear();\n 00240\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f300\n+\n+File Documentation\n+\n 00242\n // user-defined stable-cone ordering //\n 00244\n 00250\n class Cuser_scale_base{\n 00251\n public:\n@@ -29887,21 +29535,14 @@\n 00291\n 00299\n int merge_collinear_and_remove_soft();\n 00300\n 00308\n int add_protocones(std::vector *protocones, double R2, double ptmin=0.0);\n 00309\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.51 vicinity.cpp\n-\n-303\n-\n 00320\n int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double ptmin=0.0);\n 00321\n 00331\n int perform(double overlap_tshold, double ptmin=0.0);\n 00332\n 00333\n@@ -29989,56 +29630,54 @@\n double pt_min2;\n 00456\n 00462\n bool use_pt_weighted_splitting;\n 00463\n 00466\n const Cuser_scale_base *_user_scale;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.49 vicinity.cpp\n+\n+301\n+\n 00467\n 00468 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES\n 00470\n std::set cand_refs;\n 00471 #endif\n 00472 };\n 00473\n 00474 }\n 00475\n 00476\n 00477 #endif\n \n-5.51\n+5.49\n \n vicinity.cpp\n \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 // WARNING: this is not the main SISCone trunk but\n+//\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-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-//\n-//\n-//\n-//\n-//\n //\n+00007 // For more details, see http://projects.hepforge.org/siscone\n //\n+00008 //\n //\n-\n-\f304\n-\n-File Documentation\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@@ -30120,14 +29759,23 @@\n quadtree = NULL;\n 00068 #endif\n 00069\n 00070\n parent = NULL;\n 00071\n VR2 = VR = 0.0;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+//\n+\n+\f302\n+\n+File Documentation\n+\n 00072\n 00073 }\n 00074\n 00075 // constructor with initialisation\n 00076 //--------------------------------00077 CSphvicinity::CSphvicinity(vector &_particle_list){\n 00078\n parent = NULL;\n@@ -30153,19 +29801,14 @@\n 00093\n 00094 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00095\n if (quadtree!=NULL)\n 00096\n delete quadtree;\n 00097 #endif\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.51 vicinity.cpp\n-\n 00098 }\n 00099\n 00100 /*\n 00101 * set the particle_list\n 00102 * - particle_list\n list of particles (type CSphmomentum)\n 00103 * - n\n@@ -30260,14 +29903,19 @@\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 00158\n // append particle to the vicinity_elm list\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.49 vicinity.cpp\n+\n 00159\n j = 0;\n 00160\n for (i=0;iadd(&plist[i]);\n@@ -30300,23 +29948,14 @@\n 00181\n parent = _parent;\n 00182\n 00183\n VR = _VR;\n 00184\n VR2 = VR*VR;\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-305\n-\n-\f306\n-\n-File Documentation\n-\n 00185\n cosVR = cos(VR);\n 00186\n R2 = 0.25*VR2;\n 00187\n R\n = 0.5*VR;\n@@ -30410,68 +30049,79 @@\n 00243\n CSph3vector vnormal = *v;\n 00244\n vnormal/=v->_norm;\n 00245\n dot/=v->_norm;\n 00246\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+303\n+\n+\f304\n+\n+File Documentation\n+\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 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 00258\n-ve_list[i].centre.build_norm();\n 00259\n-ve_list[i].centre/=ve_list[i].centre._norm;\n 00260\n-CSph3vector diff = ve_list[i].centre - parent_centre;\n 00261\n-//ve_list[i].angle = atan2(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, diff));\n 00262\n-ve_list[i].angle = sort_angle(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, diff));\n 00263\n-ve_list[i].side = true;\n 00264\n-ve_list[i].cocircular.clear();\n 00265\n-vicinity.push_back(&(ve_list[i]));\n 00266\n 00267\n-// second angle (-)\n 00268\n-ve_list[i+1].centre = median - transverse;\n 00269\n-ve_list[i+1].centre.build_norm();\n 00270\n-ve_list[i+1].centre/=ve_list[i+1].centre._norm;\n 00271\n-diff = ve_list[i+1].centre - parent_centre;\n 00272\n-ve_list[i+1].angle = sort_angle(dot_product3(angular_dir2, diff),dot_product3(angular_dir1,\n \n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+// really check if the distance is less than VR\n+if (dot>cosVR){\n+CSph3vector cross = cross_product3(parent_centre,vnormal);\n \n-\f5.52 vicinity.cpp\n+5.50\n+\n+vicinity.cpp\n \n+// for the centres\n+CSph3vector median = (parent_centre+vnormal);\n+double amplT = sqrt((tan2R*(1+dot)+(dot-1))*(1+dot));\n+CSph3vector transverse = amplT*cross/cross._norm;\n+// first angle (+)\n+ve_list[i].centre = median + transverse;\n+ve_list[i].centre.build_norm();\n+ve_list[i].centre/=ve_list[i].centre._norm;\n+CSph3vector diff = ve_list[i].centre - parent_centre;\n+//ve_list[i].angle = atan2(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, diff));\n+ve_list[i].angle = sort_angle(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, diff));\n+ve_list[i].side = true;\n+ve_list[i].cocircular.clear();\n+vicinity.push_back(&(ve_list[i]));\n+\n+// second angle (-)\n+ve_list[i+1].centre = median - transverse;\n+ve_list[i+1].centre.build_norm();\n+ve_list[i+1].centre/=ve_list[i+1].centre._norm;\n+diff = ve_list[i+1].centre - parent_centre;\n+ve_list[i+1].angle = sort_angle(dot_product3(angular_dir2, diff),dot_product3(angular_dir1,\n diff));\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@@ -30517,18 +30167,14 @@\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\n-\n-vicinity.cpp\n-\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@@ -30568,14 +30214,19 @@\n 00022 //\n //\n 00023 // $Revision:: 388\n $//\n 00024 // $Date:: 2016-03-03 10:42:25 +0100 (Thu, 03 Mar 2016)\n $//\n 00026\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.50 vicinity.cpp\n+\n 00027 #include \"vicinity.h\"\n 00028 #include \n 00029 #include \n 00030 #include \n 00031\n 00032 namespace siscone{\n 00033\n@@ -30600,23 +30251,14 @@\n 00048\n 00049\n 00050 /*************************************************************\n 00051 * Cvicinity implementation\n *\n 00052 * list of element in the vicinity of a parent.\n *\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-307\n-\n-\f308\n-\n-File Documentation\n-\n 00053 * class used to manage the points which are in the vicinity *\n 00054 * of a parent point. The construction of the list can be\n *\n 00055 * made from a list of points or from a quadtree.\n *\n 00056 *************************************************************/\n 00057\n@@ -30692,14 +30334,23 @@\n if (ve_list!=NULL){\n 00111\n delete[] ve_list;\n 00112\n }\n 00113\n vicinity.clear();\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+305\n+\n+\f306\n+\n+File Documentation\n+\n 00114 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00115\n if (quadtree!=NULL)\n 00116\n delete quadtree;\n 00117 #endif\n 00118\n@@ -30740,19 +30391,14 @@\n 00136\n plist[n_part].index = n_part;\n 00137\n 00138\n // make sure the reference is randomly created\n 00139\n plist[n_part].ref.randomize();\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-\f5.52 vicinity.cpp\n-\n 00140\n 00141 #ifdef USE_QUADTREE_FOR_STABILITY_TEST\n 00142\n if (fabs(plist[n_part].eta)>eta_max) eta_max=fabs(plist[n_part].eta);\n 00143 #endif\n 00144\n 00145\n@@ -30845,14 +30491,19 @@\n 00197\n append_to_vicinity(&plist[i]);\n 00198\n }\n 00199\n 00200\n // sort the vicinity\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.50 vicinity.cpp\n+\n 00201\n sort(vicinity.begin(), vicinity.end(), ve_less);\n 00202\n 00203\n vicinity_size = vicinity.size();\n 00204 }\n 00205\n@@ -30882,23 +30533,14 @@\n 00224\n if (v==parent)\n 00225\n return;\n 00226\n 00227\n int i=2*(v->index);\n-\n-Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n-\n-309\n-\n-\f310\n-\n-File Documentation\n-\n 00228\n 00229\n // compute the distance of the i-th particle with the parent\n 00230\n dx = v->eta - pcx;\n 00231\n dy = v->phi - pcy;\n@@ -31007,28 +30649,403 @@\n c = dot_product(OP,OC);\n 00286\n s = fabs(cross_product(OP,OC));\n 00287\n double inv_err1 = s * inv_R_EPS_COCIRC;\n 00288\n double inv_err2_sq = (R2-c) * inv_R_2EPS_COCIRC;\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+307\n+\n+\f308\n+\n+File Documentation\n+\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\n+\n+vicinity.h\n+\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+00062\n+double angle;\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+00098\n+void set_particle_list(std::vector &_particle_list);\n+00099\n+00105\n+void build(CSphmomentum *_parent, double _VR);\n+00106\n+\n+//\n+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+\f5.52 vicinity.h\n+\n+00107\n+// cone kinematical information\n+00108\n+CSphmomentum *parent;\n+00109\n+double VR;\n+00110\n+double VR2;\n+00111\n+double cosVR;\n+00112\n+double R;\n+00113\n+double R2;\n+00114\n+double tan2R;\n+00115\n+double D2_R;\n+00116\n+double inv_R_EPS_COCIRC;\n+00117\n+double inv_R_2EPS_COCIRC;\n+00118\n+00119\n+// particle list information\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+00129\n+// vicinity information\n+00130\n+std::vector vicinity;\n+00131\n+unsigned int vicinity_size;\n+00132\n+00133 protected:\n+00139\n+void append_to_vicinity(CSphmomentum *v);\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\n+\n+vicinity.h\n+\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+\n+Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n+\n+309\n+\n+\f310\n+\n+File Documentation\n+\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+00071\n+// centre variables\n+00072\n+double eta;\n+00073\n+double phi;\n+00074\n+double angle;\n+00075\n+bool side;\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+00117\n+void build(Cmomentum *_parent, double _VR);\n+00118\n+00119\n+// cone kinematical information\n+00120\n+Cmomentum *parent;\n+00121\n+double VR;\n+00122\n+double VR2;\n+00123\n+double R;\n+00124\n+double R2;\n+00125\n+double inv_R_EPS_COCIRC;\n+00126\n+double inv_R_2EPS_COCIRC;\n+00127\n+00128\n+// particle list information\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+00139\n+unsigned int vicinity_size;\n+00140\n+00141 protected:\n+00147\n+void append_to_vicinity(Cmomentum *v);\n+00148\n+00149\n+// internal variables\n+00150\n+double pcx;\n+00151\n+double pcy;\n+00152 };\n+00153\n+00154 }\n+00155\n+00156 #endif\n+\n Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen\n \n \fIndex\n _norm\n siscone::Cjet_area, 31\n siscone_spherical::CSph3vector, 71\n add\n@@ -31268,22 +31285,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, 42\n-examples/area.cpp, 179\n-examples/main.cpp, 184\n-examples/options.cpp, 186\n-examples/options.h, 189\n-examples/sample.cpp, 189\n-examples/spherical.cpp, 191\n-examples/test.cpp, 192\n-examples/times.cpp, 193\n+examples/area.cpp, 189\n+examples/main.cpp, 179\n+examples/options.cpp, 180\n+examples/options.h, 183\n+examples/sample.cpp, 184\n+examples/spherical.cpp, 185\n+examples/test.cpp, 186\n+examples/times.cpp, 188\n \n 313\n \n siscone::hash_cones, 167\n siscone_spherical::sph_hash_cones, 174\n hash_cones\n siscone::hash_cones, 165\n@@ -31374,15 +31391,15 @@\n \f314\n \n INDEX\n \n siscone::hash_element, 169\n siscone_spherical::sph_hash_element, 177\n j\n-siscone::ranlux_state_t, 170\n+siscone::ranlux_state_t, 171\n jet_areas\n siscone::Carea, 15\n jets\n siscone::Csplit_merge, 136\n siscone_spherical::CSphsplit_merge, 102\n mask\n siscone::hash_cones, 167\n@@ -31414,15 +31431,15 @@\n n\n siscone::Cjet, 27\n siscone::Csplit_merge, 137\n siscone::ranlux_state_t, 171\n siscone_spherical::CSphjet, 77\n siscone_spherical::CSphsplit_merge, 103\n n_cones\n-siscone::hash_cones, 167\n+siscone::hash_cones, 168\n siscone_spherical::sph_hash_cones, 175\n n_left\n siscone::Csplit_merge, 137\n siscone_spherical::CSphsplit_merge, 103\n n_part\n siscone::Cvicinity, 157\n siscone_spherical::CSphvicinity, 123\n@@ -31620,23 +31637,23 @@\n siscone_spherical::sph_hash_cones, 175\n randomize\n siscone::Creference, 53\n range\n siscone::Cjet, 27\n siscone_spherical::CSphjet, 77\n ranlux.h\n-ranlux_get, 242\n-ranlux_init, 242\n-ranlux_print_state, 242\n+ranlux_get, 214\n+ranlux_init, 214\n+ranlux_print_state, 214\n ranlux_get\n-ranlux.h, 242\n+ranlux.h, 214\n ranlux_init\n-ranlux.h, 242\n+ranlux.h, 214\n ranlux_print_state\n-ranlux.h, 242\n+ranlux.h, 214\n recompute_jets\n siscone::Csiscone, 61\n siscone_spherical::CSphsiscone, 92\n ref\n siscone::Cmomentum, 39\n siscone::Creference, 53\n siscone::hash_element, 170\n@@ -31670,56 +31687,56 @@\n siscone_spherical::CSphsplit_merge, 101\n side\n siscone::Cvicinity_elm, 162\n siscone_spherical::CSphvicinity_elm, 127\n \n INDEX\n \n-siscone/area.cpp, 180\n+siscone/area.cpp, 191\n siscone/area.h, 195\n siscone/circulator.h, 196\n siscone/config.h, 197\n siscone/config_raw.h, 198\n siscone/defines.h, 199, 201\n-siscone/geom_2d.cpp, 202\n-siscone/geom_2d.h, 206\n-siscone/hash.cpp, 249\n-siscone/hash.h, 254\n-siscone/momentum.cpp, 256\n-siscone/momentum.h, 208\n-siscone/protocones.cpp, 212\n-siscone/protocones.h, 231\n-siscone/quadtree.cpp, 235\n-siscone/quadtree.h, 239\n-siscone/ranlux.cpp, 239\n-siscone/ranlux.h, 242, 243\n-siscone/reference.cpp, 243\n-siscone/reference.h, 245\n-siscone/siscone.cpp, 261\n-siscone/siscone.h, 246\n-siscone/siscone_error.cpp, 248\n-siscone/siscone_error.h, 248\n-siscone/spherical/geom_2d.cpp, 204\n-siscone/spherical/geom_2d.h, 207\n-siscone/spherical/hash.cpp, 252\n-siscone/spherical/hash.h, 255\n-siscone/spherical/momentum.cpp, 258\n-siscone/spherical/momentum.h, 210\n-siscone/spherical/protocones.cpp, 222\n-siscone/spherical/protocones.h, 233\n-siscone/spherical/siscone.cpp, 265\n-siscone/spherical/siscone.h, 247\n-siscone/spherical/split_merge.cpp, 271\n-siscone/spherical/split_merge.h, 298\n-siscone/spherical/vicinity.cpp, 303\n-siscone/spherical/vicinity.h, 268\n-siscone/split_merge.cpp, 285\n-siscone/split_merge.h, 301\n-siscone/vicinity.cpp, 307\n-siscone/vicinity.h, 269\n+siscone/geom_2d.cpp, 219\n+siscone/geom_2d.h, 223\n+siscone/hash.cpp, 202\n+siscone/hash.h, 225\n+siscone/momentum.cpp, 227\n+siscone/momentum.h, 232\n+siscone/protocones.cpp, 236\n+siscone/protocones.h, 255\n+siscone/quadtree.cpp, 207\n+siscone/quadtree.h, 211\n+siscone/ranlux.cpp, 212\n+siscone/ranlux.h, 214, 215\n+siscone/reference.cpp, 215\n+siscone/reference.h, 217\n+siscone/siscone.cpp, 259\n+siscone/siscone.h, 266\n+siscone/siscone_error.cpp, 218\n+siscone/siscone_error.h, 218\n+siscone/spherical/geom_2d.cpp, 221\n+siscone/spherical/geom_2d.h, 224\n+siscone/spherical/hash.cpp, 205\n+siscone/spherical/hash.h, 226\n+siscone/spherical/momentum.cpp, 229\n+siscone/spherical/momentum.h, 234\n+siscone/spherical/protocones.cpp, 246\n+siscone/spherical/protocones.h, 257\n+siscone/spherical/siscone.cpp, 263\n+siscone/spherical/siscone.h, 267\n+siscone/spherical/split_merge.cpp, 268\n+siscone/spherical/split_merge.h, 295\n+siscone/spherical/vicinity.cpp, 301\n+siscone/spherical/vicinity.h, 308\n+siscone/split_merge.cpp, 282\n+siscone/split_merge.h, 298\n+siscone/vicinity.cpp, 304\n+siscone/vicinity.h, 309\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@@ -31943,26 +31960,26 @@\n siscone::hash_cones, 164\n \u223chash_cones, 166\n hash_array, 167\n hash_cones, 165\n insert, 166\n is_inside, 167\n mask, 167\n-n_cones, 167\n+n_cones, 168\n R2, 168\n siscone::hash_element, 168\n eta, 169\n is_stable, 169\n next, 169\n phi, 169\n ref, 170\n siscone::ranlux_state_t, 170\n carry, 170\n i, 170\n-j, 170\n+j, 171\n n, 171\n skip, 171\n u, 171\n siscone_spherical::CSph3vector, 64\n _norm, 71\n _phi, 71\n _theta, 71\n@@ -32169,15 +32186,15 @@\n cocircular_range, 127\n user_scale\n is_inside, 127\n siscone::Csplit_merge, 135\n side, 127\n siscone_spherical::CSphsplit_merge, 101\n v, 127\n-siscone_spherical::sph_hash_cones, 171\n+siscone_spherical::sph_hash_cones, 172\n v\n \u223csph_hash_cones, 173\n siscone::Cjet, 28\n hash_array, 174\n siscone::Cquadtree, 50\n insert, 173, 174\n siscone::Cvicinity_elm, 162\n"}]}]}]}]}]}]}