--- /srv/rebuilderd/tmp/rebuilderd3RKHma/inputs/siscone-doc-html_3.0.5-3_all.deb +++ /srv/rebuilderd/tmp/rebuilderd3RKHma/out/siscone-doc-html_3.0.5-3_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2025-01-07 11:57:28.000000 debian-binary │ --rw-r--r-- 0 0 0 8564 2025-01-07 11:57:28.000000 control.tar.xz │ --rw-r--r-- 0 0 0 1178424 2025-01-07 11:57:28.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 8560 2025-01-07 11:57:28.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 1179084 2025-01-07 11:57:28.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: siscone-doc-html │ │ │ Source: siscone │ │ │ Version: 3.0.5-3 │ │ │ Architecture: all │ │ │ Maintainer: Debian Science Maintainers │ │ │ -Installed-Size: 5810 │ │ │ +Installed-Size: 5830 │ │ │ Depends: libjs-jquery │ │ │ Section: doc │ │ │ Priority: optional │ │ │ Multi-Arch: foreign │ │ │ Homepage: http://projects.hepforge.org/siscone/ │ │ │ Description: Developer's reference manual of SISCone (HTML) │ │ │ SISCone implements a Seedless Infrared (IR) Safe Cone jet algorithm, it takes │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -87,19 +87,19 @@ │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ --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 │ │ │ +-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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ --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 │ │ │ +-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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ @@ -211,22 +211,22 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 6638 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_s.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3190 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_t.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2318 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_u.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4263 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_v.html │ │ │ -rw-r--r-- 0 root (0) root (0) 30417 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_vars.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2154 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_x.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5351 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/functions_~.html │ │ │ --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 │ │ │ --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 │ │ │ +-rw-r--r-- 0 root (0) root (0) 34266 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8cpp_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31824 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8h_source.html │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ --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 │ │ │ +-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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ @@ -280,42 +280,42 @@ │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ --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 │ │ │ +-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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ --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 │ │ │ --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 │ │ │ --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 │ │ │ +-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 │ │ │ +-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 │ │ │ +-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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ --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 │ │ │ --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 │ │ │ +-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 │ │ │ +-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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ --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 │ │ │ --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 │ │ │ +-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 │ │ │ +-rw-r--r-- 0 root (0) root (0) 38354 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2geom__2d_8cpp_source.html │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -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 │ │ │ -rw-r--r-- 0 root (0) root (0) 43293 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-html/html/devel/spherical_2protocones_8h_source.html │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__cones.html │ │ │ @@ -196,15 +196,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
Returns
0 on success, 1 on error
│ │ │ │ │ │

Definition at line 171 of file hash.cpp.

│ │ │ │ │ │ -

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.

│ │ │ +

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

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

◆ insert() [2/2]

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

Definition at line 102 of file hash.cpp.

│ │ │ │ │ │ -

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.

│ │ │ +

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.

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │

◆ is_inside()

│ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -66,18 +66,16 @@ │ │ │ │ insert a new candidate into the hash. │ │ │ │ Parameters │ │ │ │ v 4-momentum of te cone to add Note, in this case, we assume stability. │ │ │ │ We also assume that eta and phi are computed for v │ │ │ │ Returns │ │ │ │ 0 on success, 1 on error │ │ │ │ Definition at line _1_7_1 of file _h_a_s_h_._c_p_p. │ │ │ │ -References _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_e_t_a, _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_e_t_a, _h_a_s_h___a_r_r_a_y, │ │ │ │ -_s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_i_s___s_t_a_b_l_e, _m_a_s_k, _n___c_o_n_e_s, _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_n_e_x_t, │ │ │ │ -_s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_p_h_i, _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_p_h_i, _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_: │ │ │ │ -_r_e_f, _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_r_e_f, and _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e_:_:_r_e_f. │ │ │ │ +References _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_e_t_a, _h_a_s_h___a_r_r_a_y, _m_a_s_k, _n___c_o_n_e_s, _s_i_s_c_o_n_e_:_: │ │ │ │ +_C_m_o_m_e_n_t_u_m_:_:_p_h_i, _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_r_e_f, and _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e_:_:_r_e_f. │ │ │ │ ********** _?◆_? iinnsseerrtt(()) [[22//22]] ********** │ │ │ │ _i_n_t siscone::hash_cones::insert ( _C_m_o_m_e_n_t_u_m *  vv, │ │ │ │ _C_m_o_m_e_n_t_u_m *  ppaarreenntt, │ │ │ │ _C_m_o_m_e_n_t_u_m *  cchhiilldd, │ │ │ │ _b_o_o_l  pp__iioo, │ │ │ │ _b_o_o_l  cc__iioo  │ │ │ │ ) │ │ │ │ @@ -87,19 +85,17 @@ │ │ │ │ parent parent particle defining the cone │ │ │ │ child child particle defining the cone │ │ │ │ p_io whether the parent has to belong to the cone or not │ │ │ │ c_io whether the child has to belong to the cone or not │ │ │ │ Returns │ │ │ │ 0 on success, 1 on error │ │ │ │ Definition at line _1_0_2 of file _h_a_s_h_._c_p_p. │ │ │ │ -References _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_b_u_i_l_d___e_t_a_p_h_i_(_), _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_e_t_a, │ │ │ │ -_s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_e_t_a, _h_a_s_h___a_r_r_a_y, _i_s___i_n_s_i_d_e_(_), _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_: │ │ │ │ -_i_s___s_t_a_b_l_e, _m_a_s_k, _n___c_o_n_e_s, _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_n_e_x_t, _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_: │ │ │ │ -_p_h_i, _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_p_h_i, _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_r_e_f, _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_: │ │ │ │ -_r_e_f, and _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e_:_:_r_e_f. │ │ │ │ +References _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_b_u_i_l_d___e_t_a_p_h_i_(_), _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_e_t_a, │ │ │ │ +_h_a_s_h___a_r_r_a_y, _i_s___i_n_s_i_d_e_(_), _m_a_s_k, _n___c_o_n_e_s, _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_p_h_i, _s_i_s_c_o_n_e_:_: │ │ │ │ +_C_m_o_m_e_n_t_u_m_:_:_r_e_f, and _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e_:_:_r_e_f. │ │ │ │ ********** _?◆_? iiss__iinnssiiddee(()) ********** │ │ │ │ _b_o_o_l siscone::hash_cones::is_inside ( _C_m_o_m_e_n_t_u_m *  cceennttrree, │ │ │ │ _C_m_o_m_e_n_t_u_m *  vv  inline │ │ │ │ ) │ │ │ │ test if a particle is inside a cone of given centre. │ │ │ │ check if the particle of coordinates 'v' is inside the circle of radius R │ │ │ │ centered at 'centre'. │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/classsiscone_1_1hash__element.html │ │ │ @@ -102,16 +102,14 @@ │ │ │ │ │ │
│ │ │ │ │ │

centre: eta coordinate

│ │ │ │ │ │

Definition at line 48 of file hash.h.

│ │ │ │ │ │ -

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

│ │ │ - │ │ │
│ │ │ │ │ │ │ │ │

◆ is_stable

│ │ │ │ │ │
│ │ │
│ │ │ @@ -122,16 +120,14 @@ │ │ │ │ │ │
│ │ │ │ │ │

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

│ │ │ │ │ │

Definition at line 50 of file hash.h.

│ │ │ │ │ │ -

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

│ │ │ - │ │ │
│ │ │
│ │ │ │ │ │

◆ next

│ │ │ │ │ │
│ │ │
│ │ │ @@ -142,15 +138,15 @@ │ │ │ │ │ │
│ │ │ │ │ │

pointer to the next element

│ │ │ │ │ │

Definition at line 52 of file hash.h.

│ │ │ │ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │

◆ phi

│ │ │ │ │ │
│ │ │ @@ -162,16 +158,14 @@ │ │ │ │ │ │
│ │ │ │ │ │

centre: phi coordinate

│ │ │ │ │ │

Definition at line 49 of file hash.h.

│ │ │ │ │ │ -

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

│ │ │ - │ │ │
│ │ │ │ │ │ │ │ │

◆ ref

│ │ │ │ │ │
│ │ │
│ │ │ @@ -182,16 +176,14 @@ │ │ │ │ │ │
│ │ │ │ │ │

reference

│ │ │ │ │ │

Definition at line 47 of file hash.h.

│ │ │ │ │ │ -

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

│ │ │ - │ │ │
│ │ │
│ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -31,34 +31,29 @@ │ │ │ │ stbility with the parent-child particles (border particles). │ │ │ │ Definition at line _4_5 of file _h_a_s_h_._h. │ │ │ │ ********** MMeemmbbeerr DDaattaa DDooccuummeennttaattiioonn ********** │ │ │ │ ********** _?◆_? eettaa ********** │ │ │ │ _d_o_u_b_l_e siscone::hash_element::eta │ │ │ │ centre: eta coordinate │ │ │ │ Definition at line _4_8 of file _h_a_s_h_._h. │ │ │ │ -Referenced by _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_), and _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_). │ │ │ │ ********** _?◆_? iiss__ssttaabbllee ********** │ │ │ │ _b_o_o_l siscone::hash_element::is_stable │ │ │ │ true if stable w.r.t. "border particles" │ │ │ │ Definition at line _5_0 of file _h_a_s_h_._h. │ │ │ │ -Referenced by _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_), and _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_). │ │ │ │ ********** _?◆_? nneexxtt ********** │ │ │ │ _h_a_s_h___e_l_e_m_e_n_t* siscone::hash_element::next │ │ │ │ pointer to the next element │ │ │ │ Definition at line _5_2 of file _h_a_s_h_._h. │ │ │ │ -Referenced by _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_), _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_), and │ │ │ │ -_s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_~_h_a_s_h___c_o_n_e_s_(_). │ │ │ │ +Referenced by _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_~_h_a_s_h___c_o_n_e_s_(_). │ │ │ │ ********** _?◆_? pphhii ********** │ │ │ │ _d_o_u_b_l_e siscone::hash_element::phi │ │ │ │ centre: phi coordinate │ │ │ │ Definition at line _4_9 of file _h_a_s_h_._h. │ │ │ │ -Referenced by _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_), and _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_). │ │ │ │ ********** _?◆_? rreeff ********** │ │ │ │ _C_r_e_f_e_r_e_n_c_e siscone::hash_element::ref │ │ │ │ reference │ │ │ │ Definition at line _4_7 of file _h_a_s_h_._h. │ │ │ │ -Referenced by _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_), and _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t_(_). │ │ │ │ =============================================================================== │ │ │ │ The documentation for this class was generated from the following file: │ │ │ │ * siscone/_h_a_s_h_._h │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8cpp_source.html │ │ │ @@ -111,55 +111,55 @@ │ │ │
57// ctor with initialisation
│ │ │
58// we initialise with a centre (in eta,phi) and a radius
│ │ │
59// - c_eta eta coordinate of the centre
│ │ │
60// - c_phi phi coordinate of the centre
│ │ │
61// - R radius
│ │ │
62//-------------------------------------------------------
│ │ │
│ │ │ -
63Ceta_phi_range::Ceta_phi_range(double c_eta, double c_phi, double R){
│ │ │ +
63Ceta_phi_range::Ceta_phi_range(double c_eta, double c_phi, double R){
│ │ │
64 // determination of the eta range
│ │ │
65 //-------------------------------
│ │ │ -
66 double xmin = max(c_eta-R,eta_min+0.0001);
│ │ │ -
67 double xmax = min(c_eta+R,eta_max-0.0001);
│ │ │ +
66 double xmin = max(c_eta-R,eta_min+0.0001);
│ │ │ +
67 double xmax = min(c_eta+R,eta_max-0.0001);
│ │ │
68
│ │ │ -
69 unsigned int cell_min = get_eta_cell(xmin);
│ │ │ -
70 unsigned int cell_max = get_eta_cell(xmax);
│ │ │ +
69 unsigned int cell_min = get_eta_cell(xmin);
│ │ │ +
70 unsigned int cell_max = get_eta_cell(xmax);
│ │ │
71
│ │ │
72 // warning: if cell_max==2^31, 2*cell_max==0 hence,
│ │ │
73 // even if the next formula is formally (2*cell_max-cell_min),
│ │ │
74 // expressing it as (cell_max-cell_min)+cell_max is safe.
│ │ │ -
75 eta_range = (cell_max-cell_min)+cell_max;
│ │ │ + │ │ │
76
│ │ │
77 // determination of the phi range
│ │ │
78 // !! taking care of periodicity !!
│ │ │
79 //---------------------------------
│ │ │ -
80 xmin = phi_in_range(c_phi-R);
│ │ │ -
81 xmax = phi_in_range(c_phi+R);
│ │ │ +
80 xmin = phi_in_range(c_phi-R);
│ │ │ +
81 xmax = phi_in_range(c_phi+R);
│ │ │
82
│ │ │ -
83 cell_min = get_phi_cell(xmin);
│ │ │ -
84 cell_max = get_phi_cell(xmax);
│ │ │ +
83 cell_min = get_phi_cell(xmin);
│ │ │ +
84 cell_max = get_phi_cell(xmax);
│ │ │
85
│ │ │
86 // Also, if the interval goes through pi, inversion is needed
│ │ │ -
87 if (xmax>xmin)
│ │ │ -
88 phi_range = (cell_max-cell_min)+cell_max;
│ │ │ +
87 if (xmax>xmin)
│ │ │ + │ │ │
89 else {
│ │ │ -
90 phi_range = (cell_min==cell_max)
│ │ │ + │ │ │
91 ? PHI_RANGE_MASK
│ │ │ -
92 : ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max);
│ │ │ +
92 : ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max);
│ │ │
93 }
│ │ │
94}
│ │ │
│ │ │
95
│ │ │
96// assignment of range
│ │ │
97// - r range to assign to current one
│ │ │
98//---------------------------------------
│ │ │
│ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ +
100 eta_range = r.eta_range;
│ │ │ +
101 phi_range = r.phi_range;
│ │ │
102
│ │ │
103 return *this;
│ │ │
104}
│ │ │
│ │ │
105
│ │ │
106// add a particle to the range
│ │ │
107// - eta eta coordinate of the particle
│ │ │ @@ -180,30 +180,30 @@ │ │ │
120
│ │ │
121
│ │ │
122// test overlap
│ │ │
123// - r1 first range
│ │ │
124// - r2 second range
│ │ │
125// return true if overlap, false otherwise.
│ │ │
126//------------------------------------------
│ │ │ -
127bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2){
│ │ │ +
127bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2){
│ │ │
128 // check overlap in eta AND phi
│ │ │ -
129 return ((r1.eta_range & r2.eta_range) && (r1.phi_range & r2.phi_range));
│ │ │ +
129 return ((r1.eta_range & r2.eta_range) && (r1.phi_range & r2.phi_range));
│ │ │
130}
│ │ │
131
│ │ │
132// compute union
│ │ │
133// Note: we assume that the two intervals overlap
│ │ │
134// - r1 first range
│ │ │
135// - r2 second range
│ │ │
136// \return union of the two ranges
│ │ │
137//------------------------------------------
│ │ │
138const Ceta_phi_range range_union (const Ceta_phi_range &r1, const Ceta_phi_range &r2){
│ │ │
139 Ceta_phi_range tmp;
│ │ │
140
│ │ │
141 // compute union in eta
│ │ │ -
142 tmp.eta_range = r1.eta_range | r2.eta_range;
│ │ │ +
142 tmp.eta_range = r1.eta_range | r2.eta_range;
│ │ │
143
│ │ │
144 // compute union in phi
│ │ │
145 tmp.phi_range = r1.phi_range | r2.phi_range;
│ │ │
146
│ │ │
147 return tmp;
│ │ │
148}
│ │ │
149
│ │ │ @@ -212,14 +212,15 @@ │ │ │
unsigned int eta_range
eta range as a binary coding of covered cells
Definition geom_2d.h:143
│ │ │
static double eta_max
maximal value for eta
Definition geom_2d.h:150
│ │ │
int add_particle(const double eta, const double phi)
add a particle to the range
Definition geom_2d.cpp:111
│ │ │
static double eta_min
minimal value for eta
Definition geom_2d.h:149
│ │ │
Ceta_phi_range & operator=(const Ceta_phi_range &r)
assignment of range
Definition geom_2d.cpp:99
│ │ │
Ceta_phi_range()
default ctor
Definition geom_2d.cpp:52
│ │ │
unsigned int phi_range
phi range as a binary coding of covered cells
Definition geom_2d.h:146
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -59,53 +59,53 @@ │ │ │ │ 56 │ │ │ │ 57// ctor with initialisation │ │ │ │ 58// we initialise with a centre (in eta,phi) and a radius │ │ │ │ 59// - c_eta eta coordinate of the centre │ │ │ │ 60// - c_phi phi coordinate of the centre │ │ │ │ 61// - R radius │ │ │ │ 62//------------------------------------------------------- │ │ │ │ -_6_3_C_e_t_a___p_h_i___r_a_n_g_e_:_:_C_e_t_a___p_h_i___r_a_n_g_e(double c_eta, double c_phi, double R){ │ │ │ │ +_6_3_C_e_t_a___p_h_i___r_a_n_g_e_:_:_C_e_t_a___p_h_i___r_a_n_g_e(double _c___e_t_a, double _c___p_h_i, double R){ │ │ │ │ 64 // determination of the eta range │ │ │ │ 65 //------------------------------- │ │ │ │ -66 double xmin = max(c_eta-R,_e_t_a___m_i_n+0.0001); │ │ │ │ -67 double xmax = min(c_eta+R,_e_t_a___m_a_x-0.0001); │ │ │ │ +66 double _x_m_i_n = _m_a_x(_c___e_t_a-R,_e_t_a___m_i_n+0.0001); │ │ │ │ +67 double _x_m_a_x = _m_i_n(_c___e_t_a+R,_e_t_a___m_a_x-0.0001); │ │ │ │ 68 │ │ │ │ -69 unsigned int cell_min = get_eta_cell(xmin); │ │ │ │ -70 unsigned int cell_max = get_eta_cell(xmax); │ │ │ │ +69 unsigned int _c_e_l_l___m_i_n = get_eta_cell(_x_m_i_n); │ │ │ │ +70 unsigned int _c_e_l_l___m_a_x = get_eta_cell(_x_m_a_x); │ │ │ │ 71 │ │ │ │ 72 // warning: if cell_max==2^31, 2*cell_max==0 hence, │ │ │ │ 73 // even if the next formula is formally (2*cell_max-cell_min), │ │ │ │ 74 // expressing it as (cell_max-cell_min)+cell_max is safe. │ │ │ │ -75 _e_t_a___r_a_n_g_e = (cell_max-cell_min)+cell_max; │ │ │ │ +75 _e_t_a___r_a_n_g_e = (_c_e_l_l___m_a_x-_c_e_l_l___m_i_n)+_c_e_l_l___m_a_x; │ │ │ │ 76 │ │ │ │ 77 // determination of the phi range │ │ │ │ 78 // !! taking care of periodicity !! │ │ │ │ 79 //--------------------------------- │ │ │ │ -80 xmin = phi_in_range(c_phi-R); │ │ │ │ -81 xmax = phi_in_range(c_phi+R); │ │ │ │ +80 _x_m_i_n = phi_in_range(_c___p_h_i-R); │ │ │ │ +81 _x_m_a_x = phi_in_range(_c___p_h_i+R); │ │ │ │ 82 │ │ │ │ -83 cell_min = get_phi_cell(xmin); │ │ │ │ -84 cell_max = get_phi_cell(xmax); │ │ │ │ +83 _c_e_l_l___m_i_n = get_phi_cell(_x_m_i_n); │ │ │ │ +84 _c_e_l_l___m_a_x = get_phi_cell(_x_m_a_x); │ │ │ │ 85 │ │ │ │ 86 // Also, if the interval goes through pi, inversion is needed │ │ │ │ -87 if (xmax>xmin) │ │ │ │ -88 _p_h_i___r_a_n_g_e = (cell_max-cell_min)+cell_max; │ │ │ │ +87 if (_x_m_a_x>_x_m_i_n) │ │ │ │ +88 _p_h_i___r_a_n_g_e = (_c_e_l_l___m_a_x-_c_e_l_l___m_i_n)+_c_e_l_l___m_a_x; │ │ │ │ 89 else { │ │ │ │ -90 _p_h_i___r_a_n_g_e = (cell_min==cell_max) │ │ │ │ +90 _p_h_i___r_a_n_g_e = (_c_e_l_l___m_i_n==_c_e_l_l___m_a_x) │ │ │ │ 91 ? PHI_RANGE_MASK │ │ │ │ -92 : ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max); │ │ │ │ +92 : ((PHI_RANGE_MASK^(_c_e_l_l___m_i_n-_c_e_l_l___m_a_x)) + _c_e_l_l___m_a_x); │ │ │ │ 93 } │ │ │ │ 94} │ │ │ │ 95 │ │ │ │ 96// assignment of range │ │ │ │ 97// - r range to assign to current one │ │ │ │ 98//--------------------------------------- │ │ │ │ -_9_9_C_e_t_a___p_h_i___r_a_n_g_e& _C_e_t_a___p_h_i___r_a_n_g_e_:_:_o_p_e_r_a_t_o_r_ _=_ (const _C_e_t_a___p_h_i___r_a_n_g_e &r){ │ │ │ │ -100 _e_t_a___r_a_n_g_e = r._e_t_a___r_a_n_g_e; │ │ │ │ -101 _p_h_i___r_a_n_g_e = r._p_h_i___r_a_n_g_e; │ │ │ │ +_9_9_C_e_t_a___p_h_i___r_a_n_g_e& _C_e_t_a___p_h_i___r_a_n_g_e_:_:_o_p_e_r_a_t_o_r_ _=_ (const _C_e_t_a___p_h_i___r_a_n_g_e &_r){ │ │ │ │ +100 _e_t_a___r_a_n_g_e = _r.eta_range; │ │ │ │ +101 _p_h_i___r_a_n_g_e = _r.phi_range; │ │ │ │ 102 │ │ │ │ 103 return *this; │ │ │ │ 104} │ │ │ │ 105 │ │ │ │ 106// add a particle to the range │ │ │ │ 107// - eta eta coordinate of the particle │ │ │ │ 108// - phi phi coordinate of the particle │ │ │ │ @@ -123,31 +123,31 @@ │ │ │ │ 120 │ │ │ │ 121 │ │ │ │ 122// test overlap │ │ │ │ 123// - r1 first range │ │ │ │ 124// - r2 second range │ │ │ │ 125// return true if overlap, false otherwise. │ │ │ │ 126//------------------------------------------ │ │ │ │ -127bool is_range_overlap(const _C_e_t_a___p_h_i___r_a_n_g_e &r1, const _C_e_t_a___p_h_i___r_a_n_g_e &r2){ │ │ │ │ +127bool is_range_overlap(const _C_e_t_a___p_h_i___r_a_n_g_e &_r_1, const _C_e_t_a___p_h_i___r_a_n_g_e &_r_2){ │ │ │ │ 128 // check overlap in eta AND phi │ │ │ │ -129 return ((r1._e_t_a___r_a_n_g_e & r2._e_t_a___r_a_n_g_e) && (r1._p_h_i___r_a_n_g_e & r2._p_h_i___r_a_n_g_e)); │ │ │ │ +129 return ((_r_1.eta_range & _r_2.eta_range) && (_r_1.phi_range & _r_2.phi_range)); │ │ │ │ 130} │ │ │ │ 131 │ │ │ │ 132// compute union │ │ │ │ 133// Note: we assume that the two intervals overlap │ │ │ │ 134// - r1 first range │ │ │ │ 135// - r2 second range │ │ │ │ 136// \return union of the two ranges │ │ │ │ 137//------------------------------------------ │ │ │ │ 138const Ceta_phi_range range_union (const Ceta_phi_range &r1, const │ │ │ │ Ceta_phi_range &r2){ │ │ │ │ 139 Ceta_phi_range tmp; │ │ │ │ 140 │ │ │ │ 141 // compute union in eta │ │ │ │ -142 tmp._e_t_a___r_a_n_g_e = r1.eta_range | r2.eta_range; │ │ │ │ +142 tmp.eta_range = r1.eta_range | r2.eta_range; │ │ │ │ 143 │ │ │ │ 144 // compute union in phi │ │ │ │ 145 tmp.phi_range = r1.phi_range | r2.phi_range; │ │ │ │ 146 │ │ │ │ 147 return tmp; │ │ │ │ 148} │ │ │ │ 149 │ │ │ │ @@ -179,9 +179,13 @@ │ │ │ │ Ceta_phi_range() │ │ │ │ default ctor │ │ │ │ DDeeffiinniittiioonn _g_e_o_m___2_d_._c_p_p_:_5_2 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_e_t_a___p_h_i___r_a_n_g_e_:_:_p_h_i___r_a_n_g_e │ │ │ │ unsigned int phi_range │ │ │ │ phi range as a binary coding of covered cells │ │ │ │ DDeeffiinniittiioonn _g_e_o_m___2_d_._h_:_1_4_6 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/geom__2d_8h_source.html │ │ │ @@ -109,21 +109,21 @@ │ │ │
67
│ │ │
68
│ │ │
│ │ │
73class Ctwovect {
│ │ │
74public:
│ │ │
76 Ctwovect() : x(0.0), y(0.0) {}
│ │ │
77
│ │ │ -
81 Ctwovect(double _x, double _y) : x(_x), y(_y) {}
│ │ │ +
81 Ctwovect(double _x, double _y) : x(_x), y(_y) {}
│ │ │
82
│ │ │
84 double x, y;
│ │ │
85
│ │ │
87 inline double mod2() const {return pow2(x)+pow2(y);}
│ │ │
88
│ │ │ -
90 inline double modulus() const {return sqrt(mod2());}
│ │ │ +
90 inline double modulus() const {return sqrt(mod2());}
│ │ │
91};
│ │ │
│ │ │
92
│ │ │
93
│ │ │
98inline double dot_product(const Ctwovect & a, const Ctwovect & b) {
│ │ │
99 return a.x*b.x + a.y*b.y;
│ │ │
100}
│ │ │ @@ -135,35 +135,35 @@ │ │ │
110
│ │ │
111
│ │ │
│ │ │ │ │ │
121public:
│ │ │ │ │ │
124
│ │ │ -
130 Ceta_phi_range(double c_eta, double c_phi, double R);
│ │ │ +
130 Ceta_phi_range(double c_eta, double c_phi, double R);
│ │ │
131
│ │ │ - │ │ │ + │ │ │
135
│ │ │
140 int add_particle(const double eta, const double phi);
│ │ │
141
│ │ │
143 unsigned int eta_range;
│ │ │
144
│ │ │
146 unsigned int phi_range;
│ │ │
147
│ │ │
148 // extremal value for eta
│ │ │
149 static double eta_min;
│ │ │
150 static double eta_max;
│ │ │
151
│ │ │
152private:
│ │ │
154 inline unsigned int get_eta_cell(double eta){
│ │ │ -
155 return (unsigned int) (1u << ((int) (32*((eta-eta_min)/(eta_max-eta_min)))));
│ │ │ +
155 return (unsigned int) (1u << ((int) (32*((eta-eta_min)/(eta_max-eta_min)))));
│ │ │
156 }
│ │ │
157
│ │ │
159 inline unsigned int get_phi_cell(double phi){
│ │ │ -
160 return (unsigned int) (1u << ((int) (32*phi/twopi+16)%32));
│ │ │ +
160 return (unsigned int) (1u << ((int) (32*phi/twopi+16)%32));
│ │ │
161 }
│ │ │
162};
│ │ │
│ │ │
163
│ │ │
168bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2);
│ │ │
169
│ │ │
175const Ceta_phi_range range_union(const Ceta_phi_range &r1, const Ceta_phi_range &r2);
│ │ │ @@ -181,14 +181,15 @@ │ │ │
unsigned int phi_range
phi range as a binary coding of covered cells
Definition geom_2d.h:146
│ │ │
class for holding a two-vector
Definition geom_2d.h:73
│ │ │
double mod2() const
norm (modulud square) of the vector
Definition geom_2d.h:87
│ │ │
double x
vector coordinates
Definition geom_2d.h:84
│ │ │
Ctwovect()
default ctor
Definition geom_2d.h:76
│ │ │
double modulus() const
modulus of the vector
Definition geom_2d.h:90
│ │ │
Ctwovect(double _x, double _y)
ctor with initialisation
Definition geom_2d.h:81
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │
│ │ │
const double twopi
definition of 2*M_PI which is useful a bit everyhere!
Definition defines.h:114
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -59,21 +59,21 @@ │ │ │ │ 66inline double pow2(double x) {return x*x;} │ │ │ │ 67 │ │ │ │ 68 │ │ │ │ _7_3class _C_t_w_o_v_e_c_t { │ │ │ │ 74public: │ │ │ │ _7_6 _C_t_w_o_v_e_c_t() : _x(0.0), y(0.0) {} │ │ │ │ 77 │ │ │ │ -_8_1 _C_t_w_o_v_e_c_t(double _x, double _y) : _x(_x), y(_y) {} │ │ │ │ +_8_1 _C_t_w_o_v_e_c_t(double ___x, double ___y) : _x(___x), y(___y) {} │ │ │ │ 82 │ │ │ │ _8_4 double _x, y; │ │ │ │ 85 │ │ │ │ _8_7 inline double _m_o_d_2() const {return pow2(_x)+pow2(y);} │ │ │ │ 88 │ │ │ │ -_9_0 inline double _m_o_d_u_l_u_s() const {return sqrt(_m_o_d_2());} │ │ │ │ +_9_0 inline double _m_o_d_u_l_u_s() const {return _s_q_r_t(_m_o_d_2());} │ │ │ │ 91}; │ │ │ │ 92 │ │ │ │ 93 │ │ │ │ 98inline double dot_product(const Ctwovect & a, const Ctwovect & b) { │ │ │ │ 99 return a.x*b.x + a.y*b.y; │ │ │ │ 100} │ │ │ │ 101 │ │ │ │ @@ -83,36 +83,36 @@ │ │ │ │ 109} │ │ │ │ 110 │ │ │ │ 111 │ │ │ │ _1_2_0class _C_e_t_a___p_h_i___r_a_n_g_e{ │ │ │ │ 121public: │ │ │ │ 123 _C_e_t_a___p_h_i___r_a_n_g_e(); │ │ │ │ 124 │ │ │ │ -130 _C_e_t_a___p_h_i___r_a_n_g_e(double c_eta, double c_phi, double R); │ │ │ │ +130 _C_e_t_a___p_h_i___r_a_n_g_e(double _c___e_t_a, double _c___p_h_i, double R); │ │ │ │ 131 │ │ │ │ -134 _C_e_t_a___p_h_i___r_a_n_g_e& _o_p_e_r_a_t_o_r_ _=_ (const _C_e_t_a___p_h_i___r_a_n_g_e &r); │ │ │ │ +134 _C_e_t_a___p_h_i___r_a_n_g_e& _o_p_e_r_a_t_o_r_ _=_ (const _C_e_t_a___p_h_i___r_a_n_g_e &_r); │ │ │ │ 135 │ │ │ │ 140 int _a_d_d___p_a_r_t_i_c_l_e(const double eta, const double phi); │ │ │ │ 141 │ │ │ │ _1_4_3 unsigned int _e_t_a___r_a_n_g_e; │ │ │ │ 144 │ │ │ │ _1_4_6 unsigned int _p_h_i___r_a_n_g_e; │ │ │ │ 147 │ │ │ │ 148 // extremal value for eta │ │ │ │ _1_4_9 static double _e_t_a___m_i_n; │ │ │ │ _1_5_0 static double _e_t_a___m_a_x; │ │ │ │ 151 │ │ │ │ 152private: │ │ │ │ 154 inline unsigned int get_eta_cell(double eta){ │ │ │ │ -155 return (unsigned int) (1u << ((int) (32*((eta-_e_t_a___m_i_n)/(_e_t_a___m_a_x- │ │ │ │ +155 return (unsigned int) (1u << ((_i_n_t) (32*((eta-_e_t_a___m_i_n)/(_e_t_a___m_a_x- │ │ │ │ _e_t_a___m_i_n))))); │ │ │ │ 156 } │ │ │ │ 157 │ │ │ │ 159 inline unsigned int get_phi_cell(double phi){ │ │ │ │ -160 return (unsigned int) (1u << ((int) (32*phi/_t_w_o_p_i+16)%32)); │ │ │ │ +160 return (unsigned int) (1u << ((_i_n_t) (32*phi/_t_w_o_p_i+16)%32)); │ │ │ │ 161 } │ │ │ │ 162}; │ │ │ │ 163 │ │ │ │ 168bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2); │ │ │ │ 169 │ │ │ │ 175const Ceta_phi_range range_union(const Ceta_phi_range &r1, const │ │ │ │ Ceta_phi_range &r2); │ │ │ │ @@ -170,14 +170,18 @@ │ │ │ │ double modulus() const │ │ │ │ modulus of the vector │ │ │ │ DDeeffiinniittiioonn _g_e_o_m___2_d_._h_:_9_0 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_t_w_o_v_e_c_t_:_:_C_t_w_o_v_e_c_t │ │ │ │ Ctwovect(double _x, double _y) │ │ │ │ ctor with initialisation │ │ │ │ DDeeffiinniittiioonn _g_e_o_m___2_d_._h_:_8_1 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ _d_e_f_i_n_e_s_._h │ │ │ │ _t_w_o_p_i │ │ │ │ const double twopi │ │ │ │ definition of 2*M_PI which is useful a bit everyhere! │ │ │ │ DDeeffiinniittiioonn _d_e_f_i_n_e_s_._h_:_1_1_4 │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/hash_8cpp_source.html │ │ │ @@ -93,55 +93,55 @@ │ │ │
41 **************************************************************/
│ │ │
42
│ │ │
43// constructor with initialisation
│ │ │
44// - _Np number of particles
│ │ │
45// - _R2 cone radius (squared)
│ │ │
46//-----------------------------------
│ │ │
│ │ │ -
47hash_cones::hash_cones(int _Np, double _R2){
│ │ │ + │ │ │
48 int i;
│ │ │
49
│ │ │
50 n_cones = 0;
│ │ │
51#ifdef DEBUG_STABLE_CONES
│ │ │ -
52 n_occupied_cells = 0;
│ │ │ + │ │ │
53#endif
│ │ │
54
│ │ │
55 // determine hash size
│ │ │
56 // for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4
│ │ │
57 //mask = 1 << (int) (2*log(double(_Np))/log(2.0));
│ │ │
58 //if (mask<=1) mask=2;
│ │ │ -
59 int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0));
│ │ │ -
60 if (nbits<1) nbits=1;
│ │ │ -
61 mask = 1 << nbits;
│ │ │ +
59 int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0));
│ │ │ +
60 if (nbits<1) nbits=1;
│ │ │ +
61 mask = 1 << nbits;
│ │ │
62
│ │ │
63 // create hash
│ │ │ │ │ │
65 mask--;
│ │ │
66
│ │ │
67 // set the array to 0
│ │ │
68 //? needed ?
│ │ │
69 for (i=0;i<mask+1;i++)
│ │ │ -
70 hash_array[i] = NULL;
│ │ │ +
70 hash_array[i] = NULL;
│ │ │
71
│ │ │ -
72 R2 = _R2;
│ │ │ +
72 R2 = _R2;
│ │ │
73}
│ │ │
│ │ │
74
│ │ │
75// destructor
│ │ │
76//------------
│ │ │
│ │ │ │ │ │
78 int i;
│ │ │ -
79 hash_element *elm;
│ │ │ + │ │ │
80
│ │ │
81 for (i=0;i<mask+1;i++){
│ │ │ -
82 while (hash_array[i]!=NULL){
│ │ │ -
83 elm = hash_array[i];
│ │ │ +
82 while (hash_array[i]!=NULL){
│ │ │ +
83 elm = hash_array[i];
│ │ │
84 hash_array[i] = hash_array[i]->next;
│ │ │ -
85 delete elm;
│ │ │ +
85 delete elm;
│ │ │
86 }
│ │ │
87 }
│ │ │
88
│ │ │
89 delete[] hash_array;
│ │ │
90}
│ │ │
│ │ │
91
│ │ │ @@ -152,71 +152,71 @@ │ │ │
96 * - parent parent particle defining the cone
│ │ │
97 * - child child particle defining the cone
│ │ │
98 * - p_io whether the parent has to belong to the cone or not
│ │ │
99 * - c_io whether the child has to belong to the cone or not
│ │ │
100 * return 0 on success, 1 on error
│ │ │
101 ***********************************************************************/
│ │ │
│ │ │ -
102int hash_cones::insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io){
│ │ │ -
103 hash_element *elm;
│ │ │ +
102int hash_cones::insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io){
│ │ │ + │ │ │
104 int index = (v->ref.ref[0]) & mask;
│ │ │
105
│ │ │
106 // check the array cell corresponding to our reference
│ │ │ -
107 elm = hash_array[index];
│ │ │ +
107 elm = hash_array[index];
│ │ │
108
│ │ │
109#ifdef DEBUG_STABLE_CONES
│ │ │ -
110 if (elm==NULL)
│ │ │ -
111 n_occupied_cells++;
│ │ │ +
110 if (elm==NULL)
│ │ │ + │ │ │
112#endif
│ │ │
113
│ │ │
114 do{
│ │ │
115 // if it is not present, add it
│ │ │ -
116 if (elm==NULL){
│ │ │ +
116 if (elm==NULL){
│ │ │
117 // create element
│ │ │ -
118 elm = new hash_element;
│ │ │ +
118 elm = new hash_element;
│ │ │
119
│ │ │
120 // set its varibles
│ │ │
121 // Note: at this level, eta and phi have already been computed
│ │ │
122 // through Cmomentum::build_etaphi.
│ │ │ -
123 elm->ref = v->ref;
│ │ │ +
123 elm->ref = v->ref;
│ │ │
124
│ │ │
125 //compute vectors centre
│ │ │
126 v->build_etaphi();
│ │ │ -
127 elm->eta = v->eta;
│ │ │ -
128 elm->phi = v->phi;
│ │ │ +
127 elm->eta = v->eta;
│ │ │ +
128 elm->phi = v->phi;
│ │ │
129 // if at least one of the two is_inside tests gives a result != from the expected,
│ │ │
130 // the || will be true hence !(...) false as wanted
│ │ │ -
131 elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
│ │ │ +
131 elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
│ │ │
132 //cout << "-- new status of " << v->ref[0] << ":" << elm->is_stable << endl;
│ │ │
133
│ │ │
134 // update hash
│ │ │ -
135 elm->next = hash_array[index];
│ │ │ -
136 hash_array[index] = elm;
│ │ │ +
135 elm->next = hash_array[index];
│ │ │ +
136 hash_array[index] = elm;
│ │ │
137
│ │ │
138 n_cones++;
│ │ │
139 return 0;
│ │ │
140 }
│ │ │
141
│ │ │
142 // if the cone is already there, simply update stability status
│ │ │ -
143 if (v->ref == elm->ref){
│ │ │ +
143 if (v->ref == elm->ref){
│ │ │
144 // there is only an update to perform to see if the cone is still stable
│ │ │ -
145 if (elm->is_stable){
│ │ │ +
145 if (elm->is_stable){
│ │ │
146 v->build_etaphi();
│ │ │ -
147 elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
│ │ │ +
147 elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
│ │ │
148 //cout << " parent/child: "
│ │ │
149 // << parent->ref[0] << ":" << is_inside(v, parent) << ":" << p_io << " "
│ │ │
150 // << child->ref[0] << ":" << is_inside(v, child) << ":" << c_io << endl;
│ │ │
151 //cout << "-- rep status of " << v->ref[0] << ":" << elm->is_stable << endl;
│ │ │
152 //cout << v->eta << " " << v->phi << endl;
│ │ │
153 //cout << (child->eta) << " " << child->phi << endl;
│ │ │
154 }
│ │ │
155 return 0;
│ │ │
156 }
│ │ │
157
│ │ │ -
158 elm = elm->next;
│ │ │ +
158 elm = elm->next;
│ │ │
159 } while (1);
│ │ │
160
│ │ │
161 return 1;
│ │ │
162}
│ │ │
│ │ │
163
│ │ │
164/*
│ │ │ @@ -224,48 +224,48 @@ │ │ │
166 * - v 4-momentum of te cone to add
│ │ │
167 * Note, in this case, we assume stability. We also assume
│ │ │
168 * that eta and phi are computed for v
│ │ │
169 * return 0 on success, 1 on error
│ │ │
170 ***********************************************************************/
│ │ │
│ │ │ │ │ │ -
172 hash_element *elm;
│ │ │ + │ │ │
173 int index = (v->ref.ref[0]) & mask;
│ │ │
174 //cout << "-- stable candidate: " << v->ref[0] << ":" << endl;
│ │ │
175
│ │ │
176 // check the array cell corresponding to our reference
│ │ │ -
177 elm = hash_array[index];
│ │ │ +
177 elm = hash_array[index];
│ │ │
178 do{
│ │ │
179 // if it is not present, add it
│ │ │ -
180 if (elm==NULL){
│ │ │ +
180 if (elm==NULL){
│ │ │
181 // create element
│ │ │ -
182 elm = new hash_element;
│ │ │ +
182 elm = new hash_element;
│ │ │
183
│ │ │
184 // set its varibles
│ │ │
185 // Note: at this level, eta and phi have already been computed
│ │ │
186 // through Cmomentum::build_etaphi.
│ │ │ -
187 elm->ref = v->ref;
│ │ │ -
188 elm->eta = v->eta;
│ │ │ -
189 elm->phi = v->phi;
│ │ │ -
190 elm->is_stable = true;
│ │ │ +
187 elm->ref = v->ref;
│ │ │ +
188 elm->eta = v->eta;
│ │ │ +
189 elm->phi = v->phi;
│ │ │ +
190 elm->is_stable = true;
│ │ │
191
│ │ │
192 // update hash
│ │ │ -
193 elm->next = hash_array[index];
│ │ │ -
194 hash_array[index] = elm;
│ │ │ +
193 elm->next = hash_array[index];
│ │ │ +
194 hash_array[index] = elm;
│ │ │
195
│ │ │
196 n_cones++;
│ │ │
197 return 0;
│ │ │
198 }
│ │ │
199
│ │ │
200 // if the cone is already there, we have nothing to do
│ │ │ -
201 if (v->ref == elm->ref){
│ │ │ +
201 if (v->ref == elm->ref){
│ │ │
202 return 0;
│ │ │
203 }
│ │ │
204
│ │ │ -
205 elm = elm->next;
│ │ │ +
205 elm = elm->next;
│ │ │
206 } while (1);
│ │ │
207
│ │ │
208 return 1;
│ │ │
209}
│ │ │
│ │ │
210
│ │ │
211/*
│ │ │ @@ -274,46 +274,43 @@ │ │ │
214 * centered at 'centre'.
│ │ │
215 * - centre centre of the circle
│ │ │
216 * - v particle to test
│ │ │
217 * return true if inside, false if outside
│ │ │
218 ******************************************************************************/
│ │ │
│ │ │ │ │ │ -
220 double dx, dy;
│ │ │ +
220 double dx, dy;
│ │ │
221
│ │ │ -
222 dx = centre->eta - v->eta;
│ │ │ -
223 dy = fabs(centre->phi - v->phi);
│ │ │ -
224 if (dy>M_PI)
│ │ │ -
225 dy -= 2.0*M_PI;
│ │ │ +
222 dx = centre->eta - v->eta;
│ │ │ +
223 dy = fabs(centre->phi - v->phi);
│ │ │ +
224 if (dy>M_PI)
│ │ │ +
225 dy -= 2.0*M_PI;
│ │ │
226
│ │ │ -
227 return dx*dx+dy*dy<R2;
│ │ │ +
227 return dx*dx+dy*dy<R2;
│ │ │
228}
│ │ │
│ │ │
229
│ │ │
230}
│ │ │
base class for dynamic coordinates management
Definition momentum.h:49
│ │ │
Creference ref
reference number for the vector
Definition momentum.h:122
│ │ │
double eta
particle pseudo-rapidity
Definition momentum.h:114
│ │ │
void build_etaphi()
build eta-phi from 4-momentum info !!! WARNING !!! !!! computing eta and phi is time-consuming !...
Definition momentum.cpp:134
│ │ │
double phi
particle azimuthal angle
Definition momentum.h:115
│ │ │
unsigned int ref[3]
actual data for the reference
Definition reference.h:72
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │
int mask
number of occupied cells
Definition hash.h:104
│ │ │
hash_element ** hash_array
the cone data itself
Definition hash.h:93
│ │ │
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
│ │ │
double R2
circle radius (squared) NOTE: need to be set before any call to 'insert'
Definition hash.h:108
│ │ │
int n_cones
number of elements
Definition hash.h:96
│ │ │
bool is_inside(Cmomentum *centre, Cmomentum *v)
test if a particle is inside a cone of given centre.
Definition hash.cpp:219
│ │ │
hash_cones(int _Np, double _R2)
constructor with initialisation
Definition hash.cpp:47
│ │ │
~hash_cones()
destructor
Definition hash.cpp:77
│ │ │
information on store cones candidates.
Definition hash.h:45
│ │ │
hash_element * next
pointer to the next element
Definition hash.h:52
│ │ │ -
bool is_stable
true if stable w.r.t. "border particles"
Definition hash.h:50
│ │ │ -
double eta
centre: eta coordinate
Definition hash.h:48
│ │ │ -
Creference ref
reference
Definition hash.h:47
│ │ │ -
double phi
centre: phi coordinate
Definition hash.h:49
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -43,53 +43,53 @@ │ │ │ │ 40 * functions to manipulate them. * │ │ │ │ 41 **************************************************************/ │ │ │ │ 42 │ │ │ │ 43// constructor with initialisation │ │ │ │ 44// - _Np number of particles │ │ │ │ 45// - _R2 cone radius (squared) │ │ │ │ 46//----------------------------------- │ │ │ │ -_4_7_h_a_s_h___c_o_n_e_s_:_:_h_a_s_h___c_o_n_e_s(int _Np, double _R2){ │ │ │ │ +_4_7_h_a_s_h___c_o_n_e_s_:_:_h_a_s_h___c_o_n_e_s(int ___N_p, double ___R_2){ │ │ │ │ 48 int i; │ │ │ │ 49 │ │ │ │ 50 _n___c_o_n_e_s = 0; │ │ │ │ 51#ifdef DEBUG_STABLE_CONES │ │ │ │ -52 n_occupied_cells = 0; │ │ │ │ +52 _n___o_c_c_u_p_i_e_d___c_e_l_l_s = 0; │ │ │ │ 53#endif │ │ │ │ 54 │ │ │ │ 55 // determine hash size │ │ │ │ 56 // for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4 │ │ │ │ 57 //mask = 1 << (int) (2*log(double(_Np))/log(2.0)); │ │ │ │ 58 //if (mask<=1) mask=2; │ │ │ │ -59 int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0)); │ │ │ │ -60 if (nbits<1) nbits=1; │ │ │ │ -61 _m_a_s_k = 1 << nbits; │ │ │ │ +59 int _n_b_i_t_s = (_i_n_t) (_l_o_g(___N_p*___R_2*___N_p/4.0)/_l_o_g(2.0)); │ │ │ │ +60 if (_n_b_i_t_s<1) _n_b_i_t_s=1; │ │ │ │ +61 _m_a_s_k = 1 << _n_b_i_t_s; │ │ │ │ 62 │ │ │ │ 63 // create hash │ │ │ │ 64 _h_a_s_h___a_r_r_a_y = new _h_a_s_h___e_l_e_m_e_n_t*[_m_a_s_k]; │ │ │ │ 65 _m_a_s_k--; │ │ │ │ 66 │ │ │ │ 67 // set the array to 0 │ │ │ │ 68 //? needed ? │ │ │ │ 69 for (i=0;i<_m_a_s_k+1;i++) │ │ │ │ -70 _h_a_s_h___a_r_r_a_y[i] = NULL; │ │ │ │ +70 _h_a_s_h___a_r_r_a_y[i] = _N_U_L_L; │ │ │ │ 71 │ │ │ │ -72 _R_2 = _R2; │ │ │ │ +72 _R_2 = ___R_2; │ │ │ │ 73} │ │ │ │ 74 │ │ │ │ 75// destructor │ │ │ │ 76//------------ │ │ │ │ _7_7_h_a_s_h___c_o_n_e_s_:_:_~_h_a_s_h___c_o_n_e_s(){ │ │ │ │ 78 int i; │ │ │ │ -79 _h_a_s_h___e_l_e_m_e_n_t *elm; │ │ │ │ +79 _h_a_s_h___e_l_e_m_e_n_t *_e_l_m; │ │ │ │ 80 │ │ │ │ 81 for (i=0;i<_m_a_s_k+1;i++){ │ │ │ │ -82 while (_h_a_s_h___a_r_r_a_y[i]!=NULL){ │ │ │ │ -83 elm = _h_a_s_h___a_r_r_a_y[i]; │ │ │ │ +82 while (_h_a_s_h___a_r_r_a_y[i]!=_N_U_L_L){ │ │ │ │ +83 _e_l_m = _h_a_s_h___a_r_r_a_y[i]; │ │ │ │ 84 _h_a_s_h___a_r_r_a_y[i] = _h_a_s_h___a_r_r_a_y[i]->_n_e_x_t; │ │ │ │ -85 delete elm; │ │ │ │ +85 delete _e_l_m; │ │ │ │ 86 } │ │ │ │ 87 } │ │ │ │ 88 │ │ │ │ 89 delete[] _h_a_s_h___a_r_r_a_y; │ │ │ │ 90} │ │ │ │ 91 │ │ │ │ 92 │ │ │ │ @@ -99,123 +99,123 @@ │ │ │ │ 96 * - parent parent particle defining the cone │ │ │ │ 97 * - child child particle defining the cone │ │ │ │ 98 * - p_io whether the parent has to belong to the cone or not │ │ │ │ 99 * - c_io whether the child has to belong to the cone or not │ │ │ │ 100 * return 0 on success, 1 on error │ │ │ │ 101 ***********************************************************************/ │ │ │ │ _1_0_2int _h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t(_C_m_o_m_e_n_t_u_m *v, _C_m_o_m_e_n_t_u_m *parent, _C_m_o_m_e_n_t_u_m *child, │ │ │ │ -bool p_io, bool c_io){ │ │ │ │ -103 _h_a_s_h___e_l_e_m_e_n_t *elm; │ │ │ │ +bool _p___i_o, bool _c___i_o){ │ │ │ │ +103 _h_a_s_h___e_l_e_m_e_n_t *_e_l_m; │ │ │ │ 104 int index = (v->_r_e_f._r_e_f[0]) & _m_a_s_k; │ │ │ │ 105 │ │ │ │ 106 // check the array cell corresponding to our reference │ │ │ │ -107 elm = _h_a_s_h___a_r_r_a_y[index]; │ │ │ │ +107 _e_l_m = _h_a_s_h___a_r_r_a_y[index]; │ │ │ │ 108 │ │ │ │ 109#ifdef DEBUG_STABLE_CONES │ │ │ │ -110 if (elm==NULL) │ │ │ │ -111 n_occupied_cells++; │ │ │ │ +110 if (_e_l_m==_N_U_L_L) │ │ │ │ +111 _n___o_c_c_u_p_i_e_d___c_e_l_l_s++; │ │ │ │ 112#endif │ │ │ │ 113 │ │ │ │ 114 do{ │ │ │ │ 115 // if it is not present, add it │ │ │ │ -116 if (elm==NULL){ │ │ │ │ +116 if (_e_l_m==_N_U_L_L){ │ │ │ │ 117 // create element │ │ │ │ -118 elm = new _h_a_s_h___e_l_e_m_e_n_t; │ │ │ │ +118 _e_l_m = new _h_a_s_h___e_l_e_m_e_n_t; │ │ │ │ 119 │ │ │ │ 120 // set its varibles │ │ │ │ 121 // Note: at this level, eta and phi have already been computed │ │ │ │ 122 // through Cmomentum::build_etaphi. │ │ │ │ -123 elm->_r_e_f = v->_r_e_f; │ │ │ │ +123 _e_l_m->ref = v->_r_e_f; │ │ │ │ 124 │ │ │ │ 125 //compute vectors centre │ │ │ │ 126 v->_b_u_i_l_d___e_t_a_p_h_i(); │ │ │ │ -127 elm->_e_t_a = v->_e_t_a; │ │ │ │ -128 elm->_p_h_i = v->_p_h_i; │ │ │ │ +127 _e_l_m->eta = v->_e_t_a; │ │ │ │ +128 _e_l_m->phi = v->_p_h_i; │ │ │ │ 129 // if at least one of the two is_inside tests gives a result != from the │ │ │ │ expected, │ │ │ │ 130 // the || will be true hence !(...) false as wanted │ │ │ │ -131 elm->_i_s___s_t_a_b_l_e = !((_i_s___i_n_s_i_d_e(v, parent)^p_io)||(_i_s___i_n_s_i_d_e(v, │ │ │ │ -child)^c_io)); │ │ │ │ +131 _e_l_m->is_stable = !((_i_s___i_n_s_i_d_e(v, parent)^_p___i_o)||(_i_s___i_n_s_i_d_e(v, │ │ │ │ +child)^_c___i_o)); │ │ │ │ 132 //cout << "-- new status of " << v->ref[0] << ":" << elm->is_stable << │ │ │ │ endl; │ │ │ │ 133 │ │ │ │ 134 // update hash │ │ │ │ -135 elm->_n_e_x_t = _h_a_s_h___a_r_r_a_y[index]; │ │ │ │ -136 _h_a_s_h___a_r_r_a_y[index] = elm; │ │ │ │ +135 _e_l_m->next = _h_a_s_h___a_r_r_a_y[index]; │ │ │ │ +136 _h_a_s_h___a_r_r_a_y[index] = _e_l_m; │ │ │ │ 137 │ │ │ │ 138 _n___c_o_n_e_s++; │ │ │ │ 139 return 0; │ │ │ │ 140 } │ │ │ │ 141 │ │ │ │ 142 // if the cone is already there, simply update stability status │ │ │ │ -143 if (v->_r_e_f == elm->_r_e_f){ │ │ │ │ +143 if (v->_r_e_f == _e_l_m->ref){ │ │ │ │ 144 // there is only an update to perform to see if the cone is still stable │ │ │ │ -145 if (elm->_i_s___s_t_a_b_l_e){ │ │ │ │ +145 if (_e_l_m->is_stable){ │ │ │ │ 146 v->_b_u_i_l_d___e_t_a_p_h_i(); │ │ │ │ -147 elm->_i_s___s_t_a_b_l_e = !((_i_s___i_n_s_i_d_e(v, parent)^p_io)||(_i_s___i_n_s_i_d_e(v, │ │ │ │ -child)^c_io)); │ │ │ │ +147 _e_l_m->is_stable = !((_i_s___i_n_s_i_d_e(v, parent)^_p___i_o)||(_i_s___i_n_s_i_d_e(v, │ │ │ │ +child)^_c___i_o)); │ │ │ │ 148 //cout << " parent/child: " │ │ │ │ 149 // << parent->ref[0] << ":" << is_inside(v, parent) << ":" << p_io << " " │ │ │ │ 150 // << child->ref[0] << ":" << is_inside(v, child) << ":" << c_io << endl; │ │ │ │ 151 //cout << "-- rep status of " << v->ref[0] << ":" << elm->is_stable << │ │ │ │ endl; │ │ │ │ 152 //cout << v->eta << " " << v->phi << endl; │ │ │ │ 153 //cout << (child->eta) << " " << child->phi << endl; │ │ │ │ 154 } │ │ │ │ 155 return 0; │ │ │ │ 156 } │ │ │ │ 157 │ │ │ │ -158 elm = elm->_n_e_x_t; │ │ │ │ +158 _e_l_m = _e_l_m->next; │ │ │ │ 159 } while (1); │ │ │ │ 160 │ │ │ │ 161 return 1; │ │ │ │ 162} │ │ │ │ 163 │ │ │ │ 164/* │ │ │ │ 165 * insert a new candidate into the hash. │ │ │ │ 166 * - v 4-momentum of te cone to add │ │ │ │ 167 * Note, in this case, we assume stability. We also assume │ │ │ │ 168 * that eta and phi are computed for v │ │ │ │ 169 * return 0 on success, 1 on error │ │ │ │ 170 ***********************************************************************/ │ │ │ │ _1_7_1int _h_a_s_h___c_o_n_e_s_:_:_i_n_s_e_r_t(_C_m_o_m_e_n_t_u_m *v){ │ │ │ │ -172 _h_a_s_h___e_l_e_m_e_n_t *elm; │ │ │ │ +172 _h_a_s_h___e_l_e_m_e_n_t *_e_l_m; │ │ │ │ 173 int index = (v->_r_e_f._r_e_f[0]) & _m_a_s_k; │ │ │ │ 174 //cout << "-- stable candidate: " << v->ref[0] << ":" << endl; │ │ │ │ 175 │ │ │ │ 176 // check the array cell corresponding to our reference │ │ │ │ -177 elm = _h_a_s_h___a_r_r_a_y[index]; │ │ │ │ +177 _e_l_m = _h_a_s_h___a_r_r_a_y[index]; │ │ │ │ 178 do{ │ │ │ │ 179 // if it is not present, add it │ │ │ │ -180 if (elm==NULL){ │ │ │ │ +180 if (_e_l_m==_N_U_L_L){ │ │ │ │ 181 // create element │ │ │ │ -182 elm = new _h_a_s_h___e_l_e_m_e_n_t; │ │ │ │ +182 _e_l_m = new _h_a_s_h___e_l_e_m_e_n_t; │ │ │ │ 183 │ │ │ │ 184 // set its varibles │ │ │ │ 185 // Note: at this level, eta and phi have already been computed │ │ │ │ 186 // through Cmomentum::build_etaphi. │ │ │ │ -187 elm->_r_e_f = v->_r_e_f; │ │ │ │ -188 elm->_e_t_a = v->_e_t_a; │ │ │ │ -189 elm->_p_h_i = v->_p_h_i; │ │ │ │ -190 elm->_i_s___s_t_a_b_l_e = true; │ │ │ │ +187 _e_l_m->ref = v->_r_e_f; │ │ │ │ +188 _e_l_m->eta = v->_e_t_a; │ │ │ │ +189 _e_l_m->phi = v->_p_h_i; │ │ │ │ +190 _e_l_m->is_stable = true; │ │ │ │ 191 │ │ │ │ 192 // update hash │ │ │ │ -193 elm->_n_e_x_t = _h_a_s_h___a_r_r_a_y[index]; │ │ │ │ -194 _h_a_s_h___a_r_r_a_y[index] = elm; │ │ │ │ +193 _e_l_m->next = _h_a_s_h___a_r_r_a_y[index]; │ │ │ │ +194 _h_a_s_h___a_r_r_a_y[index] = _e_l_m; │ │ │ │ 195 │ │ │ │ 196 _n___c_o_n_e_s++; │ │ │ │ 197 return 0; │ │ │ │ 198 } │ │ │ │ 199 │ │ │ │ 200 // if the cone is already there, we have nothing to do │ │ │ │ -201 if (v->_r_e_f == elm->_r_e_f){ │ │ │ │ +201 if (v->_r_e_f == _e_l_m->ref){ │ │ │ │ 202 return 0; │ │ │ │ 203 } │ │ │ │ 204 │ │ │ │ -205 elm = elm->_n_e_x_t; │ │ │ │ +205 _e_l_m = _e_l_m->next; │ │ │ │ 206 } while (1); │ │ │ │ 207 │ │ │ │ 208 return 1; │ │ │ │ 209} │ │ │ │ 210 │ │ │ │ 211/* │ │ │ │ 212 * test if a particle is inside a cone of given centre. │ │ │ │ @@ -223,22 +223,22 @@ │ │ │ │ 214 * centered at 'centre'. │ │ │ │ 215 * - centre centre of the circle │ │ │ │ 216 * - v particle to test │ │ │ │ 217 * return true if inside, false if outside │ │ │ │ 218 │ │ │ │ ******************************************************************************/ │ │ │ │ _2_1_9inline bool _h_a_s_h___c_o_n_e_s_:_:_i_s___i_n_s_i_d_e(_C_m_o_m_e_n_t_u_m *centre, _C_m_o_m_e_n_t_u_m *v){ │ │ │ │ -220 double dx, dy; │ │ │ │ +220 double _d_x, _d_y; │ │ │ │ 221 │ │ │ │ -222 dx = centre->_e_t_a - v->_e_t_a; │ │ │ │ -223 dy = fabs(centre->_p_h_i - v->_p_h_i); │ │ │ │ -224 if (dy>M_PI) │ │ │ │ -225 dy -= 2.0*M_PI; │ │ │ │ +222 _d_x = centre->_e_t_a - v->_e_t_a; │ │ │ │ +223 _d_y = _f_a_b_s(centre->_p_h_i - v->_p_h_i); │ │ │ │ +224 if (_d_y>M_PI) │ │ │ │ +225 _d_y -= 2.0*M_PI; │ │ │ │ 226 │ │ │ │ -227 return dx*dx+dy*dy<_R_2; │ │ │ │ +227 return _d_x*_d_x+_d_y*_d_y<_R_2; │ │ │ │ 228} │ │ │ │ 229 │ │ │ │ 230} │ │ │ │ _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m │ │ │ │ base class for dynamic coordinates management │ │ │ │ DDeeffiinniittiioonn _m_o_m_e_n_t_u_m_._h_:_4_9 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_r_e_f │ │ │ │ @@ -258,14 +258,18 @@ │ │ │ │ double phi │ │ │ │ particle azimuthal angle │ │ │ │ DDeeffiinniittiioonn _m_o_m_e_n_t_u_m_._h_:_1_1_5 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e_:_:_r_e_f │ │ │ │ unsigned int ref[3] │ │ │ │ actual data for the reference │ │ │ │ DDeeffiinniittiioonn _r_e_f_e_r_e_n_c_e_._h_:_7_2 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_m_a_s_k │ │ │ │ int mask │ │ │ │ number of occupied cells │ │ │ │ DDeeffiinniittiioonn _h_a_s_h_._h_:_1_0_4 │ │ │ │ _s_i_s_c_o_n_e_:_:_h_a_s_h___c_o_n_e_s_:_:_h_a_s_h___a_r_r_a_y │ │ │ │ hash_element ** hash_array │ │ │ │ the cone data itself │ │ │ │ @@ -298,25 +302,9 @@ │ │ │ │ _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t │ │ │ │ information on store cones candidates. │ │ │ │ DDeeffiinniittiioonn _h_a_s_h_._h_:_4_5 │ │ │ │ _s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_n_e_x_t │ │ │ │ hash_element * next │ │ │ │ pointer to the next element │ │ │ │ DDeeffiinniittiioonn _h_a_s_h_._h_:_5_2 │ │ │ │ -_s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_i_s___s_t_a_b_l_e │ │ │ │ -bool is_stable │ │ │ │ -true if stable w.r.t. "border particles" │ │ │ │ -DDeeffiinniittiioonn _h_a_s_h_._h_:_5_0 │ │ │ │ -_s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_e_t_a │ │ │ │ -double eta │ │ │ │ -centre: eta coordinate │ │ │ │ -DDeeffiinniittiioonn _h_a_s_h_._h_:_4_8 │ │ │ │ -_s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_r_e_f │ │ │ │ -Creference ref │ │ │ │ -reference │ │ │ │ -DDeeffiinniittiioonn _h_a_s_h_._h_:_4_7 │ │ │ │ -_s_i_s_c_o_n_e_:_:_h_a_s_h___e_l_e_m_e_n_t_:_:_p_h_i │ │ │ │ -double phi │ │ │ │ -centre: phi coordinate │ │ │ │ -DDeeffiinniittiioonn _h_a_s_h_._h_:_4_9 │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/momentum_8cpp_source.html │ │ │ @@ -100,34 +100,34 @@ │ │ │
47 index = -1;
│ │ │
48}
│ │ │ │ │ │
49
│ │ │
50// ctor with initialisation
│ │ │
51//--------------------------
│ │ │
│ │ │ -
52Cmomentum::Cmomentum(double _px, double _py, double _pz, double _E){
│ │ │ -
53 px = _px;
│ │ │ -
54 py = _py;
│ │ │ -
55 pz = _pz;
│ │ │ -
56 E = _E;
│ │ │ +
52Cmomentum::Cmomentum(double _px, double _py, double _pz, double _E){
│ │ │ +
53 px = _px;
│ │ │ +
54 py = _py;
│ │ │ +
55 pz = _pz;
│ │ │ +
56 E = _E;
│ │ │
57
│ │ │
58 // compute eta and phi
│ │ │ │ │ │
60 ref = Creference();
│ │ │
61}
│ │ │
│ │ │
62
│ │ │
63// ctor with detailed initialisation
│ │ │
64//-----------------------------------
│ │ │
│ │ │ -
65Cmomentum::Cmomentum(double _eta, double _phi, Creference _ref){
│ │ │ -
66 eta = _eta;
│ │ │ + │ │ │ +
66 eta = _eta;
│ │ │
67 phi = _phi;
│ │ │
68
│ │ │ -
69 ref = _ref;
│ │ │ +
69 ref = _ref;
│ │ │
70}
│ │ │
│ │ │
71
│ │ │
72// default dtor
│ │ │
73//--------------
│ │ │
│ │ │ │ │ │ @@ -153,16 +153,16 @@ │ │ │
│ │ │
92
│ │ │
93// addition of vectors
│ │ │
94// !!! WARNING !!! no updating of eta and phi !!!
│ │ │
95//------------------------------------------------
│ │ │
│ │ │ │ │ │ -
97 Cmomentum tmp = *this;
│ │ │ -
98 return tmp+=v;
│ │ │ +
97 Cmomentum tmp = *this;
│ │ │ +
98 return tmp+=v;
│ │ │
99}
│ │ │
│ │ │
100
│ │ │
101// incrementation of vectors
│ │ │
102// !!! WARNING !!! no updating of eta and phi !!!
│ │ │
103//------------------------------------------------
│ │ │
│ │ │ @@ -198,25 +198,25 @@ │ │ │
130// !!! computing eta and phi is time-consuming !!!
│ │ │
131// !!! use this whenever you need eta or phi !!!
│ │ │
132// !!! automatically called for single-particle !!!
│ │ │
133//--------------------------------------------------
│ │ │
│ │ │ │ │ │
135 // note: the factor n (ref.nb) cancels in all expressions !!
│ │ │ -
136 eta = 0.5*log((E+pz)/(E-pz));
│ │ │ -
137 phi = atan2(py,px);
│ │ │ +
136 eta = 0.5*log((E+pz)/(E-pz));
│ │ │ +
137 phi = atan2(py,px);
│ │ │
138}
│ │ │
│ │ │
139
│ │ │
140
│ │ │
141// ordering of two vectors
│ │ │
142// the default ordering is w.r.t. their references
│ │ │
143//-------------------------------------------------
│ │ │ -
144bool operator < (const Cmomentum &v1, const Cmomentum &v2){
│ │ │ -
145 return v1.ref < v2.ref;
│ │ │ +
144bool operator < (const Cmomentum &v1, const Cmomentum &v2){
│ │ │ +
145 return v1.ref < v2.ref;
│ │ │
146}
│ │ │
147
│ │ │
148// ordering of vectors in eta (e.g. used in collinear tests)
│ │ │
149//-----------------------------------------------------------
│ │ │
150bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2){
│ │ │
151 return v1.eta < v2.eta;
│ │ │
152}
│ │ │ @@ -242,14 +242,15 @@ │ │ │
double px
x-momentum
Definition momentum.h:109
│ │ │
Cmomentum & operator=(const Cmomentum &v)
assignment of vectors
Definition momentum.cpp:80
│ │ │
double E
energy
Definition momentum.h:112
│ │ │
double pz
z-momentum
Definition momentum.h:111
│ │ │
Cmomentum()
default ctor
Definition momentum.cpp:42
│ │ │
double phi
particle azimuthal angle
Definition momentum.h:115
│ │ │
references used for checksums.
Definition reference.h:43
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -48,32 +48,32 @@ │ │ │ │ 45 _p_x = _p_y = _p_z = _E = 0.0; │ │ │ │ 46 _r_e_f = _C_r_e_f_e_r_e_n_c_e(); │ │ │ │ 47 _i_n_d_e_x = -1; │ │ │ │ 48} │ │ │ │ 49 │ │ │ │ 50// ctor with initialisation │ │ │ │ 51//-------------------------- │ │ │ │ -_5_2_C_m_o_m_e_n_t_u_m_:_:_C_m_o_m_e_n_t_u_m(double _px, double _py, double _pz, double _E){ │ │ │ │ -53 _p_x = _px; │ │ │ │ -54 _p_y = _py; │ │ │ │ -55 _p_z = _pz; │ │ │ │ -56 _E = _E; │ │ │ │ +_5_2_C_m_o_m_e_n_t_u_m_:_:_C_m_o_m_e_n_t_u_m(double ___p_x, double ___p_y, double ___p_z, double ___E){ │ │ │ │ +53 _p_x = ___p_x; │ │ │ │ +54 _p_y = ___p_y; │ │ │ │ +55 _p_z = ___p_z; │ │ │ │ +56 _E = ___E; │ │ │ │ 57 │ │ │ │ 58 // compute eta and phi │ │ │ │ 59 _b_u_i_l_d___e_t_a_p_h_i(); │ │ │ │ 60 _r_e_f = _C_r_e_f_e_r_e_n_c_e(); │ │ │ │ 61} │ │ │ │ 62 │ │ │ │ 63// ctor with detailed initialisation │ │ │ │ 64//----------------------------------- │ │ │ │ -_6_5_C_m_o_m_e_n_t_u_m_:_:_C_m_o_m_e_n_t_u_m(double _eta, double _phi, _C_r_e_f_e_r_e_n_c_e _ref){ │ │ │ │ -66 _e_t_a = _eta; │ │ │ │ +_6_5_C_m_o_m_e_n_t_u_m_:_:_C_m_o_m_e_n_t_u_m(double ___e_t_a, double _phi, _C_r_e_f_e_r_e_n_c_e ___r_e_f){ │ │ │ │ +66 _e_t_a = ___e_t_a; │ │ │ │ 67 _p_h_i = _phi; │ │ │ │ 68 │ │ │ │ -69 _r_e_f = _ref; │ │ │ │ +69 _r_e_f = ___r_e_f; │ │ │ │ 70} │ │ │ │ 71 │ │ │ │ 72// default dtor │ │ │ │ 73//-------------- │ │ │ │ _7_4_C_m_o_m_e_n_t_u_m_:_:_~_C_m_o_m_e_n_t_u_m(){ │ │ │ │ 75 │ │ │ │ 76} │ │ │ │ @@ -93,16 +93,16 @@ │ │ │ │ 90 return *this; │ │ │ │ 91} │ │ │ │ 92 │ │ │ │ 93// addition of vectors │ │ │ │ 94// !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ 95//------------------------------------------------ │ │ │ │ _9_6const _C_m_o_m_e_n_t_u_m _C_m_o_m_e_n_t_u_m_:_:_o_p_e_r_a_t_o_r_ _+_ (const _C_m_o_m_e_n_t_u_m &v){ │ │ │ │ -97 _C_m_o_m_e_n_t_u_m tmp = *this; │ │ │ │ -98 return tmp+=v; │ │ │ │ +97 _C_m_o_m_e_n_t_u_m _t_m_p = *this; │ │ │ │ +98 return _t_m_p+=v; │ │ │ │ 99} │ │ │ │ 100 │ │ │ │ 101// incrementation of vectors │ │ │ │ 102// !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ 103//------------------------------------------------ │ │ │ │ _1_0_4_C_m_o_m_e_n_t_u_m& _C_m_o_m_e_n_t_u_m_:_:_o_p_e_r_a_t_o_r_ _+_=_ (const _C_m_o_m_e_n_t_u_m &v){ │ │ │ │ 105 _p_x+=v._p_x; │ │ │ │ @@ -132,24 +132,24 @@ │ │ │ │ 129// !!! WARNING !!! │ │ │ │ 130// !!! computing eta and phi is time-consuming !!! │ │ │ │ 131// !!! use this whenever you need eta or phi !!! │ │ │ │ 132// !!! automatically called for single-particle !!! │ │ │ │ 133//-------------------------------------------------- │ │ │ │ _1_3_4void _C_m_o_m_e_n_t_u_m_:_:_b_u_i_l_d___e_t_a_p_h_i(){ │ │ │ │ 135 // note: the factor n (ref.nb) cancels in all expressions !! │ │ │ │ -136 _e_t_a = 0.5*log((_E+_p_z)/(_E-_p_z)); │ │ │ │ -137 _p_h_i = atan2(_p_y,_p_x); │ │ │ │ +136 _e_t_a = 0.5*_l_o_g((_E+_p_z)/(_E-_p_z)); │ │ │ │ +137 _p_h_i = _a_t_a_n_2(_p_y,_p_x); │ │ │ │ 138} │ │ │ │ 139 │ │ │ │ 140 │ │ │ │ 141// ordering of two vectors │ │ │ │ 142// the default ordering is w.r.t. their references │ │ │ │ 143//------------------------------------------------- │ │ │ │ -144bool operator < (const _C_m_o_m_e_n_t_u_m &v1, const _C_m_o_m_e_n_t_u_m &v2){ │ │ │ │ -145 return v1._r_e_f < v2._r_e_f; │ │ │ │ +144bool _o_p_e_r_a_t_o_r_ _<_ (const _C_m_o_m_e_n_t_u_m &_v_1, const _C_m_o_m_e_n_t_u_m &_v_2){ │ │ │ │ +145 return _v_1.ref < _v_2.ref; │ │ │ │ 146} │ │ │ │ 147 │ │ │ │ 148// ordering of vectors in eta (e.g. used in collinear tests) │ │ │ │ 149//----------------------------------------------------------- │ │ │ │ 150bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2){ │ │ │ │ 151 return v1.eta < v2.eta; │ │ │ │ 152} │ │ │ │ @@ -225,9 +225,13 @@ │ │ │ │ _s_i_s_c_o_n_e_:_:_C_m_o_m_e_n_t_u_m_:_:_p_h_i │ │ │ │ double phi │ │ │ │ particle azimuthal angle │ │ │ │ DDeeffiinniittiioonn _m_o_m_e_n_t_u_m_._h_:_1_1_5 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e │ │ │ │ references used for checksums. │ │ │ │ DDeeffiinniittiioonn _r_e_f_e_r_e_n_c_e_._h_:_4_3 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8cpp_source.html │ │ │ @@ -92,44 +92,44 @@ │ │ │
40 * The elements at each node are of 'Cmomentum' type. *
│ │ │
41 *******************************************************************/
│ │ │
42
│ │ │
43// default ctor
│ │ │
44//--------------
│ │ │
│ │ │ │ │ │ -
46 v = NULL;
│ │ │ +
46 v = NULL;
│ │ │
47
│ │ │ -
48 children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;
│ │ │ +
48 children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;
│ │ │
49 has_child = false;
│ │ │
50}
│ │ │
│ │ │
51
│ │ │
52
│ │ │
53// ctor with initialisation (see init for details)
│ │ │
54//--------------------------
│ │ │
│ │ │ -
55Cquadtree::Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y){
│ │ │ -
56 v = NULL;
│ │ │ +
55Cquadtree::Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y){
│ │ │ +
56 v = NULL;
│ │ │
57
│ │ │ -
58 children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;
│ │ │ +
58 children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL;
│ │ │
59 has_child = false;
│ │ │
60
│ │ │ -
61 init(_x, _y, _half_size_x, _half_size_y);
│ │ │ + │ │ │
62}
│ │ │
│ │ │
63
│ │ │
64
│ │ │
65// default destructor
│ │ │
66// at destruction, everything is destroyed except
│ │ │
67// physical values at the leaves
│ │ │
68//------------------------------------------------
│ │ │
│ │ │ │ │ │
70 if (has_child){
│ │ │ -
71 if (v!=NULL) delete v;
│ │ │ +
71 if (v!=NULL) delete v;
│ │ │
72 delete children[0][0];
│ │ │
73 delete children[0][1];
│ │ │
74 delete children[1][0];
│ │ │
75 delete children[1][1];
│ │ │
76 }
│ │ │
77}
│ │ │
│ │ │ @@ -143,86 +143,86 @@ │ │ │
85 * - _y y-position of the center
│ │ │
86 * - half_size_x half x-size of the cell
│ │ │
87 * - half_size_y half y-size of the cell
│ │ │
88 * return 0 on success, 1 on error. Note that if the cell
│ │ │
89 * is already filled, we return an error.
│ │ │
90 ******************************************************************/
│ │ │
│ │ │ -
91int Cquadtree::init(double _x, double _y, double _half_size_x, double _half_size_y){
│ │ │ -
92 if (v!=NULL)
│ │ │ +
91int Cquadtree::init(double _x, double _y, double _half_size_x, double _half_size_y){
│ │ │ +
92 if (v!=NULL)
│ │ │
93 return 1;
│ │ │
94
│ │ │ -
95 centre_x = _x;
│ │ │ -
96 centre_y = _y;
│ │ │ -
97 half_size_x = _half_size_x;
│ │ │ -
98 half_size_y = _half_size_y;
│ │ │ +
95 centre_x = _x;
│ │ │ +
96 centre_y = _y;
│ │ │ + │ │ │ + │ │ │
99
│ │ │
100 return 0;
│ │ │
101}
│ │ │
│ │ │
102
│ │ │
103
│ │ │
104/*
│ │ │
105 * adding a particle to the tree.
│ │ │
106 * This method adds one vector to the quadtree structure which
│ │ │
107 * is updated consequently.
│ │ │
108 * - v vector to add
│ │ │
109 * return 0 on success 1 on error
│ │ │
110 ******************************************************************/
│ │ │
│ │ │ - │ │ │ + │ │ │
112 // Description of the method:
│ │ │
113 // --------------------------
│ │ │
114 // the addition process goes as follows:
│ │ │
115 // 1. check if the cell is empty, in which case, add the particle
│ │ │
116 // here and leave.
│ │ │
117 // 2. If there is a unique particle already inside,
│ │ │
118 // (a) create children
│ │ │
119 // (b) forward the existing particle to the appropriate child
│ │ │
120 // 3. Add current particle to this cell and forward to the
│ │ │
121 // adequate child
│ │ │
122 // NOTE: we assume in the whole procedure that the particle is
│ │ │
123 // indeed inside the cell !
│ │ │
124
│ │ │
125 // step 1: the case of empty cells
│ │ │ -
126 if (v==NULL){
│ │ │ -
127 v = v_add;
│ │ │ +
126 if (v==NULL){
│ │ │ +
127 v = v_add;
│ │ │
128 return 0;
│ │ │
129 }
│ │ │
130
│ │ │
131 // step 2: additional work if 1! particle already present
│ │ │
132 // we use the fact that only 1-particle systems have no child
│ │ │
133 if (!has_child){
│ │ │ -
134 double new_half_size_x = 0.5*half_size_x;
│ │ │ -
135 double new_half_size_y = 0.5*half_size_y;
│ │ │ +
134 double new_half_size_x = 0.5*half_size_x;
│ │ │ +
135 double new_half_size_y = 0.5*half_size_y;
│ │ │
136 // create children
│ │ │ -
137 children[0][0] = new Cquadtree(centre_x-new_half_size_x, centre_y-new_half_size_y,
│ │ │ -
138 new_half_size_x, new_half_size_y);
│ │ │ -
139 children[0][1] = new Cquadtree(centre_x-new_half_size_x, centre_y+new_half_size_y,
│ │ │ -
140 new_half_size_x, new_half_size_y);
│ │ │ -
141 children[1][0] = new Cquadtree(centre_x+new_half_size_x, centre_y-new_half_size_y,
│ │ │ -
142 new_half_size_x, new_half_size_y);
│ │ │ -
143 children[1][1] = new Cquadtree(centre_x+new_half_size_x, centre_y+new_half_size_y,
│ │ │ -
144 new_half_size_x, new_half_size_y);
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
145
│ │ │
146 has_child = true;
│ │ │
147
│ │ │
148 // forward to child
│ │ │
149 //? The following line assumes 'true'==1 and 'false'==0
│ │ │
150 // Note: v being a single particle, eta and phi are correct
│ │ │ │ │ │
152
│ │ │
153 // copy physical params
│ │ │
154 v = new Cmomentum(*v);
│ │ │
155 }
│ │ │
156
│ │ │
157 // step 3: add new particle
│ │ │
158 // Note: v_add being a single particle, eta and phi are correct
│ │ │ -
159 children[v_add->eta>centre_x][v_add->phi>centre_y]->add(v_add);
│ │ │ -
160 *v+=*v_add;
│ │ │ + │ │ │ +
160 *v+=*v_add;
│ │ │
161
│ │ │
162 return 0;
│ │ │
163}
│ │ │
│ │ │
164
│ │ │
165
│ │ │
166/*
│ │ │ @@ -232,112 +232,112 @@ │ │ │
170 * in the circle.
│ │ │
171 * - cx circle centre x coordinate
│ │ │
172 * - cy circle centre y coordinate
│ │ │
173 * - cR2 circle radius SQUARED
│ │ │
174 * return the checksum for the intersection
│ │ │
175 ******************************************************************/
│ │ │
│ │ │ -
176Creference Cquadtree::circle_intersect(double cx, double cy, double cR2){
│ │ │ + │ │ │
177 // Description of the method:
│ │ │
178 // --------------------------
│ │ │
179 // 1. check if cell is empty => no intersection
│ │ │
180 // 2. if cell has 1! particle, check if it is inside the circle.
│ │ │
181 // If yes, add it and return, if not simply return.
│ │ │
182 // 3. check if the circle intersects the square. If not, return.
│ │ │
183 // 4. check if the square is inside the circle.
│ │ │
184 // If yes, add it to qt and return.
│ │ │
185 // 5. check intersections with children.
│ │ │
186
│ │ │
187 // step 1: if there is no particle inside te square, no reason to go further
│ │ │ -
188 if (v==NULL)
│ │ │ +
188 if (v==NULL)
│ │ │
189 return Creference();
│ │ │
190
│ │ │ -
191 double dx, dy;
│ │ │ +
191 double dx, dy;
│ │ │
192
│ │ │
193 // step 2: if there is only one particle inside the square, test if it is in
│ │ │
194 // the circle, in which case return associated reference
│ │ │
195 if (!has_child){
│ │ │
196 // compute the distance
│ │ │
197 // Note: v has only one particle => eta and phi are defined
│ │ │ -
198 dx = cx - v->eta;
│ │ │ -
199 dy = fabs(cy - v->phi);
│ │ │ -
200 if (dy>M_PI)
│ │ │ -
201 dy -= 2.0*M_PI;
│ │ │ +
198 dx = cx - v->eta;
│ │ │ +
199 dy = fabs(cy - v->phi);
│ │ │ +
200 if (dy>M_PI)
│ │ │ +
201 dy -= 2.0*M_PI;
│ │ │
202
│ │ │
203 // test distance
│ │ │ -
204 if (dx*dx+dy*dy<cR2){
│ │ │ +
204 if (dx*dx+dy*dy<cR2){
│ │ │
205 return v->ref;
│ │ │
206 }
│ │ │
207
│ │ │
208 return Creference();
│ │ │
209 }
│ │ │
210
│ │ │
211 // step 3: check if there is an intersection
│ │ │
212 //double ryp, rym;
│ │ │ -
213 double dx_c, dy_c;
│ │ │ +
213 double dx_c, dy_c;
│ │ │
214
│ │ │
215 // store distance with the centre of the square
│ │ │ -
216 dx_c = fabs(cx-centre_x);
│ │ │ -
217 dy_c = fabs(cy-centre_y);
│ │ │ -
218 if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c;
│ │ │ +
216 dx_c = fabs(cx-centre_x);
│ │ │ +
217 dy_c = fabs(cy-centre_y);
│ │ │ +
218 if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c;
│ │ │
219
│ │ │
220 // compute (minimal) the distance (pay attention to the periodicity in phi).
│ │ │ -
221 dx = dx_c-half_size_x;
│ │ │ -
222 if (dx<0) dx=0;
│ │ │ -
223 dy = dy_c-half_size_y;
│ │ │ -
224 if (dy<0) dy=0;
│ │ │ + │ │ │ +
222 if (dx<0) dx=0;
│ │ │ + │ │ │ +
224 if (dy<0) dy=0;
│ │ │
225
│ │ │
226 // check the distance
│ │ │ -
227 if (dx*dx+dy*dy>=cR2){
│ │ │ +
227 if (dx*dx+dy*dy>=cR2){
│ │ │
228 // no intersection
│ │ │
229 return Creference();
│ │ │
230 }
│ │ │
231
│ │ │
232 // step 4: check if included
│ │ │
233
│ │ │
234 // compute the (maximal) distance
│ │ │ -
235 dx = dx_c+half_size_x;
│ │ │ -
236 dy = dy_c+half_size_y;
│ │ │ -
237 if (dy>M_PI) dy = M_PI;
│ │ │ + │ │ │ + │ │ │ +
237 if (dy>M_PI) dy = M_PI;
│ │ │
238
│ │ │
239 // compute the distance
│ │ │ -
240 if (dx*dx+dy*dy<cR2){
│ │ │ +
240 if (dx*dx+dy*dy<cR2){
│ │ │
241 return v->ref;
│ │ │
242 }
│ │ │
243
│ │ │
244 // step 5: the square is not fully in. Recurse to children
│ │ │ -
245 return children[0][0]->circle_intersect(cx, cy, cR2)
│ │ │ -
246 + children[0][1]->circle_intersect(cx, cy, cR2)
│ │ │ -
247 + children[1][0]->circle_intersect(cx, cy, cR2)
│ │ │ -
248 + children[1][1]->circle_intersect(cx, cy, cR2);
│ │ │ +
245 return children[0][0]->circle_intersect(cx, cy, cR2)
│ │ │ +
246 + children[0][1]->circle_intersect(cx, cy, cR2)
│ │ │ +
247 + children[1][0]->circle_intersect(cx, cy, cR2)
│ │ │ +
248 + children[1][1]->circle_intersect(cx, cy, cR2);
│ │ │
249}
│ │ │
│ │ │
250
│ │ │
251
│ │ │
252/*
│ │ │
253 * output a data file for drawing the grid.
│ │ │
254 * This can be used to output a data file containing all the
│ │ │
255 * grid subdivisions. The file contents is as follows:
│ │ │
256 * first and second columns give center of the cell, the third
│ │ │
257 * gives the size.
│ │ │
258 * - flux opened stream to write to
│ │ │
259 * return 0 on success, 1 on error
│ │ │
260 ******************************************************************/
│ │ │
│ │ │ -
261int Cquadtree::save(FILE *flux){
│ │ │ + │ │ │
262
│ │ │ -
263 if (flux==NULL)
│ │ │ +
263 if (flux==NULL)
│ │ │
264 return 1;
│ │ │
265
│ │ │
266 if (has_child){
│ │ │ -
267 fprintf(flux, "%e\t%e\t%e\t%e\n", centre_x, centre_y, half_size_x, half_size_y);
│ │ │ -
268 children[0][0]->save(flux);
│ │ │ -
269 children[0][1]->save(flux);
│ │ │ -
270 children[1][0]->save(flux);
│ │ │ -
271 children[1][1]->save(flux);
│ │ │ +
267 fprintf(flux, "%e\t%e\t%e\t%e\n", centre_x, centre_y, half_size_x, half_size_y);
│ │ │ +
268 children[0][0]->save(flux);
│ │ │ +
269 children[0][1]->save(flux);
│ │ │ +
270 children[1][0]->save(flux);
│ │ │ +
271 children[1][1]->save(flux);
│ │ │
272 }
│ │ │
273
│ │ │
274 return 0;
│ │ │
275}
│ │ │
│ │ │
276
│ │ │
277
│ │ │ @@ -347,26 +347,26 @@ │ │ │
281 * tree leaves. The file contents is as follows:
│ │ │
282 * first and second columns give center of the cell, the third
│ │ │
283 * gives the size.
│ │ │
284 * - flux opened stream to write to
│ │ │
285 * return 0 on success, 1 on error
│ │ │
286 ******************************************************************/
│ │ │
│ │ │ - │ │ │ + │ │ │
288
│ │ │ -
289 if (flux==NULL)
│ │ │ +
289 if (flux==NULL)
│ │ │
290 return 1;
│ │ │
291
│ │ │
292 if (has_child){
│ │ │ -
293 if (children[0][0]!=NULL) children[0][0]->save_leaves(flux);
│ │ │ -
294 if (children[0][1]!=NULL) children[0][1]->save_leaves(flux);
│ │ │ -
295 if (children[1][0]!=NULL) children[1][0]->save_leaves(flux);
│ │ │ -
296 if (children[1][1]!=NULL) children[1][1]->save_leaves(flux);
│ │ │ +
293 if (children[0][0]!=NULL) children[0][0]->save_leaves(flux);
│ │ │ +
294 if (children[0][1]!=NULL) children[0][1]->save_leaves(flux);
│ │ │ +
295 if (children[1][0]!=NULL) children[1][0]->save_leaves(flux);
│ │ │ +
296 if (children[1][1]!=NULL) children[1][1]->save_leaves(flux);
│ │ │
297 } else {
│ │ │ -
298 fprintf(flux, "%e\t%e\t%e\t%e\n", centre_x, centre_y, half_size_x, half_size_y);
│ │ │ +
298 fprintf(flux, "%e\t%e\t%e\t%e\n", centre_x, centre_y, half_size_x, half_size_y);
│ │ │
299 }
│ │ │
300
│ │ │
301 return 0;
│ │ │
302}
│ │ │
│ │ │
303
│ │ │
304}
│ │ │ @@ -385,14 +385,15 @@ │ │ │
int save_leaves(FILE *flux)
output a data file for drawing the tree leaves.
Definition quadtree.cpp:287
│ │ │
double centre_y
y-position of the centre of the cell
Definition quadtree.h:113
│ │ │
bool has_child
true if not a leaf
Definition quadtree.h:120
│ │ │
Cmomentum * v
physical contents
Definition quadtree.h:117
│ │ │
int init(double _x, double _y, double _half_size_x, double _half_size_y)
init the tree.
Definition quadtree.cpp:91
│ │ │
Cquadtree * children[2][2]
sub-cells ( 0,1->left-right; 0,1->bottom,top)
Definition quadtree.h:119
│ │ │
references used for checksums.
Definition reference.h:43
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -42,41 +42,41 @@ │ │ │ │ 39 * This class implements the traditional two-dimensional quadtree. * │ │ │ │ 40 * The elements at each node are of 'Cmomentum' type. * │ │ │ │ 41 *******************************************************************/ │ │ │ │ 42 │ │ │ │ 43// default ctor │ │ │ │ 44//-------------- │ │ │ │ _4_5_C_q_u_a_d_t_r_e_e_:_:_C_q_u_a_d_t_r_e_e(){ │ │ │ │ -46 _v = NULL; │ │ │ │ +46 _v = _N_U_L_L; │ │ │ │ 47 │ │ │ │ -48 _c_h_i_l_d_r_e_n[0][0] = _c_h_i_l_d_r_e_n[0][1] = _c_h_i_l_d_r_e_n[1][0] = _c_h_i_l_d_r_e_n[1][1] = NULL; │ │ │ │ +48 _c_h_i_l_d_r_e_n[0][0] = _c_h_i_l_d_r_e_n[0][1] = _c_h_i_l_d_r_e_n[1][0] = _c_h_i_l_d_r_e_n[1][1] = _N_U_L_L; │ │ │ │ 49 _h_a_s___c_h_i_l_d = false; │ │ │ │ 50} │ │ │ │ 51 │ │ │ │ 52 │ │ │ │ 53// ctor with initialisation (see init for details) │ │ │ │ 54//-------------------------- │ │ │ │ -_5_5_C_q_u_a_d_t_r_e_e_:_:_C_q_u_a_d_t_r_e_e(double _x, double _y, double _half_size_x, double │ │ │ │ -_half_size_y){ │ │ │ │ -56 _v = NULL; │ │ │ │ +_5_5_C_q_u_a_d_t_r_e_e_:_:_C_q_u_a_d_t_r_e_e(double ___x, double ___y, double ___h_a_l_f___s_i_z_e___x, double │ │ │ │ +___h_a_l_f___s_i_z_e___y){ │ │ │ │ +56 _v = _N_U_L_L; │ │ │ │ 57 │ │ │ │ -58 _c_h_i_l_d_r_e_n[0][0] = _c_h_i_l_d_r_e_n[0][1] = _c_h_i_l_d_r_e_n[1][0] = _c_h_i_l_d_r_e_n[1][1] = NULL; │ │ │ │ +58 _c_h_i_l_d_r_e_n[0][0] = _c_h_i_l_d_r_e_n[0][1] = _c_h_i_l_d_r_e_n[1][0] = _c_h_i_l_d_r_e_n[1][1] = _N_U_L_L; │ │ │ │ 59 _h_a_s___c_h_i_l_d = false; │ │ │ │ 60 │ │ │ │ -61 _i_n_i_t(_x, _y, _half_size_x, _half_size_y); │ │ │ │ +61 _i_n_i_t(___x, ___y, ___h_a_l_f___s_i_z_e___x, ___h_a_l_f___s_i_z_e___y); │ │ │ │ 62} │ │ │ │ 63 │ │ │ │ 64 │ │ │ │ 65// default destructor │ │ │ │ 66// at destruction, everything is destroyed except │ │ │ │ 67// physical values at the leaves │ │ │ │ 68//------------------------------------------------ │ │ │ │ _6_9_C_q_u_a_d_t_r_e_e_:_:_~_C_q_u_a_d_t_r_e_e(){ │ │ │ │ 70 if (_h_a_s___c_h_i_l_d){ │ │ │ │ -71 if (_v!=NULL) delete _v; │ │ │ │ +71 if (_v!=_N_U_L_L) delete _v; │ │ │ │ 72 delete _c_h_i_l_d_r_e_n[0][0]; │ │ │ │ 73 delete _c_h_i_l_d_r_e_n[0][1]; │ │ │ │ 74 delete _c_h_i_l_d_r_e_n[1][0]; │ │ │ │ 75 delete _c_h_i_l_d_r_e_n[1][1]; │ │ │ │ 76 } │ │ │ │ 77} │ │ │ │ 78 │ │ │ │ @@ -88,89 +88,89 @@ │ │ │ │ 84 * - _x x-position of the center │ │ │ │ 85 * - _y y-position of the center │ │ │ │ 86 * - half_size_x half x-size of the cell │ │ │ │ 87 * - half_size_y half y-size of the cell │ │ │ │ 88 * return 0 on success, 1 on error. Note that if the cell │ │ │ │ 89 * is already filled, we return an error. │ │ │ │ 90 ******************************************************************/ │ │ │ │ -_9_1int _C_q_u_a_d_t_r_e_e_:_:_i_n_i_t(double _x, double _y, double _half_size_x, double │ │ │ │ -_half_size_y){ │ │ │ │ -92 if (_v!=NULL) │ │ │ │ +_9_1int _C_q_u_a_d_t_r_e_e_:_:_i_n_i_t(double ___x, double ___y, double ___h_a_l_f___s_i_z_e___x, double │ │ │ │ +___h_a_l_f___s_i_z_e___y){ │ │ │ │ +92 if (_v!=_N_U_L_L) │ │ │ │ 93 return 1; │ │ │ │ 94 │ │ │ │ -95 _c_e_n_t_r_e___x = _x; │ │ │ │ -96 _c_e_n_t_r_e___y = _y; │ │ │ │ -97 _h_a_l_f___s_i_z_e___x = _half_size_x; │ │ │ │ -98 _h_a_l_f___s_i_z_e___y = _half_size_y; │ │ │ │ +95 _c_e_n_t_r_e___x = ___x; │ │ │ │ +96 _c_e_n_t_r_e___y = ___y; │ │ │ │ +97 _h_a_l_f___s_i_z_e___x = ___h_a_l_f___s_i_z_e___x; │ │ │ │ +98 _h_a_l_f___s_i_z_e___y = ___h_a_l_f___s_i_z_e___y; │ │ │ │ 99 │ │ │ │ 100 return 0; │ │ │ │ 101} │ │ │ │ 102 │ │ │ │ 103 │ │ │ │ 104/* │ │ │ │ 105 * adding a particle to the tree. │ │ │ │ 106 * This method adds one vector to the quadtree structure which │ │ │ │ 107 * is updated consequently. │ │ │ │ 108 * - v vector to add │ │ │ │ 109 * return 0 on success 1 on error │ │ │ │ 110 ******************************************************************/ │ │ │ │ -_1_1_1int _C_q_u_a_d_t_r_e_e_:_:_a_d_d(_C_m_o_m_e_n_t_u_m *v_add){ │ │ │ │ +_1_1_1int _C_q_u_a_d_t_r_e_e_:_:_a_d_d(_C_m_o_m_e_n_t_u_m *_v___a_d_d){ │ │ │ │ 112 // Description of the method: │ │ │ │ 113 // -------------------------- │ │ │ │ 114 // the addition process goes as follows: │ │ │ │ 115 // 1. check if the cell is empty, in which case, add the particle │ │ │ │ 116 // here and leave. │ │ │ │ 117 // 2. If there is a unique particle already inside, │ │ │ │ 118 // (a) create children │ │ │ │ 119 // (b) forward the existing particle to the appropriate child │ │ │ │ 120 // 3. Add current particle to this cell and forward to the │ │ │ │ 121 // adequate child │ │ │ │ 122 // NOTE: we assume in the whole procedure that the particle is │ │ │ │ 123 // indeed inside the cell ! │ │ │ │ 124 │ │ │ │ 125 // step 1: the case of empty cells │ │ │ │ -126 if (_v==NULL){ │ │ │ │ -127 _v = v_add; │ │ │ │ +126 if (_v==_N_U_L_L){ │ │ │ │ +127 _v = _v___a_d_d; │ │ │ │ 128 return 0; │ │ │ │ 129 } │ │ │ │ 130 │ │ │ │ 131 // step 2: additional work if 1! particle already present │ │ │ │ 132 // we use the fact that only 1-particle systems have no child │ │ │ │ 133 if (!_h_a_s___c_h_i_l_d){ │ │ │ │ -134 double new_half_size_x = 0.5*_h_a_l_f___s_i_z_e___x; │ │ │ │ -135 double new_half_size_y = 0.5*_h_a_l_f___s_i_z_e___y; │ │ │ │ +134 double _n_e_w___h_a_l_f___s_i_z_e___x = 0.5*_h_a_l_f___s_i_z_e___x; │ │ │ │ +135 double _n_e_w___h_a_l_f___s_i_z_e___y = 0.5*_h_a_l_f___s_i_z_e___y; │ │ │ │ 136 // create children │ │ │ │ -137 _c_h_i_l_d_r_e_n[0][0] = new _C_q_u_a_d_t_r_e_e(_c_e_n_t_r_e___x-new_half_size_x, _c_e_n_t_r_e___y- │ │ │ │ -new_half_size_y, │ │ │ │ -138 new_half_size_x, new_half_size_y); │ │ │ │ -139 _c_h_i_l_d_r_e_n[0][1] = new _C_q_u_a_d_t_r_e_e(_c_e_n_t_r_e___x-new_half_size_x, │ │ │ │ -_c_e_n_t_r_e___y+new_half_size_y, │ │ │ │ -140 new_half_size_x, new_half_size_y); │ │ │ │ -141 _c_h_i_l_d_r_e_n[1][0] = new _C_q_u_a_d_t_r_e_e(_c_e_n_t_r_e___x+new_half_size_x, _c_e_n_t_r_e___y- │ │ │ │ -new_half_size_y, │ │ │ │ -142 new_half_size_x, new_half_size_y); │ │ │ │ -143 _c_h_i_l_d_r_e_n[1][1] = new _C_q_u_a_d_t_r_e_e(_c_e_n_t_r_e___x+new_half_size_x, │ │ │ │ -_c_e_n_t_r_e___y+new_half_size_y, │ │ │ │ -144 new_half_size_x, new_half_size_y); │ │ │ │ +137 _c_h_i_l_d_r_e_n[0][0] = new _C_q_u_a_d_t_r_e_e(_c_e_n_t_r_e___x-_n_e_w___h_a_l_f___s_i_z_e___x, _c_e_n_t_r_e___y- │ │ │ │ +_n_e_w___h_a_l_f___s_i_z_e___y, │ │ │ │ +138 _n_e_w___h_a_l_f___s_i_z_e___x, _n_e_w___h_a_l_f___s_i_z_e___y); │ │ │ │ +139 _c_h_i_l_d_r_e_n[0][1] = new _C_q_u_a_d_t_r_e_e(_c_e_n_t_r_e___x-_n_e_w___h_a_l_f___s_i_z_e___x, │ │ │ │ +_c_e_n_t_r_e___y+_n_e_w___h_a_l_f___s_i_z_e___y, │ │ │ │ +140 _n_e_w___h_a_l_f___s_i_z_e___x, _n_e_w___h_a_l_f___s_i_z_e___y); │ │ │ │ +141 _c_h_i_l_d_r_e_n[1][0] = new _C_q_u_a_d_t_r_e_e(_c_e_n_t_r_e___x+_n_e_w___h_a_l_f___s_i_z_e___x, _c_e_n_t_r_e___y- │ │ │ │ +_n_e_w___h_a_l_f___s_i_z_e___y, │ │ │ │ +142 _n_e_w___h_a_l_f___s_i_z_e___x, _n_e_w___h_a_l_f___s_i_z_e___y); │ │ │ │ +143 _c_h_i_l_d_r_e_n[1][1] = new _C_q_u_a_d_t_r_e_e(_c_e_n_t_r_e___x+_n_e_w___h_a_l_f___s_i_z_e___x, │ │ │ │ +_c_e_n_t_r_e___y+_n_e_w___h_a_l_f___s_i_z_e___y, │ │ │ │ +144 _n_e_w___h_a_l_f___s_i_z_e___x, _n_e_w___h_a_l_f___s_i_z_e___y); │ │ │ │ 145 │ │ │ │ 146 _h_a_s___c_h_i_l_d = true; │ │ │ │ 147 │ │ │ │ 148 // forward to child │ │ │ │ 149 //? The following line assumes 'true'==1 and 'false'==0 │ │ │ │ 150 // Note: v being a single particle, eta and phi are correct │ │ │ │ 151 _c_h_i_l_d_r_e_n[_v->_e_t_a>_c_e_n_t_r_e___x][_v->_p_h_i>_c_e_n_t_r_e___y]->_a_d_d(_v); │ │ │ │ 152 │ │ │ │ 153 // copy physical params │ │ │ │ 154 _v = new _C_m_o_m_e_n_t_u_m(*_v); │ │ │ │ 155 } │ │ │ │ 156 │ │ │ │ 157 // step 3: add new particle │ │ │ │ 158 // Note: v_add being a single particle, eta and phi are correct │ │ │ │ -159 _c_h_i_l_d_r_e_n[v_add->_e_t_a>_c_e_n_t_r_e___x][v_add->_p_h_i>_c_e_n_t_r_e___y]->_a_d_d(v_add); │ │ │ │ -160 *_v+=*v_add; │ │ │ │ +159 _c_h_i_l_d_r_e_n[_v___a_d_d->eta>_c_e_n_t_r_e___x][_v___a_d_d->phi>_c_e_n_t_r_e___y]->_a_d_d(_v___a_d_d); │ │ │ │ +160 *_v+=*_v___a_d_d; │ │ │ │ 161 │ │ │ │ 162 return 0; │ │ │ │ 163} │ │ │ │ 164 │ │ │ │ 165 │ │ │ │ 166/* │ │ │ │ 167 * circle intersection. │ │ │ │ @@ -178,114 +178,114 @@ │ │ │ │ 169 * The output takes the form of a quadtree with all squares included │ │ │ │ 170 * in the circle. │ │ │ │ 171 * - cx circle centre x coordinate │ │ │ │ 172 * - cy circle centre y coordinate │ │ │ │ 173 * - cR2 circle radius SQUARED │ │ │ │ 174 * return the checksum for the intersection │ │ │ │ 175 ******************************************************************/ │ │ │ │ -_1_7_6_C_r_e_f_e_r_e_n_c_e _C_q_u_a_d_t_r_e_e_:_:_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(double cx, double cy, double cR2){ │ │ │ │ +_1_7_6_C_r_e_f_e_r_e_n_c_e _C_q_u_a_d_t_r_e_e_:_:_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(double _c_x, double _c_y, double _c_R_2){ │ │ │ │ 177 // Description of the method: │ │ │ │ 178 // -------------------------- │ │ │ │ 179 // 1. check if cell is empty => no intersection │ │ │ │ 180 // 2. if cell has 1! particle, check if it is inside the circle. │ │ │ │ 181 // If yes, add it and return, if not simply return. │ │ │ │ 182 // 3. check if the circle intersects the square. If not, return. │ │ │ │ 183 // 4. check if the square is inside the circle. │ │ │ │ 184 // If yes, add it to qt and return. │ │ │ │ 185 // 5. check intersections with children. │ │ │ │ 186 │ │ │ │ 187 // step 1: if there is no particle inside te square, no reason to go │ │ │ │ further │ │ │ │ -188 if (_v==NULL) │ │ │ │ +188 if (_v==_N_U_L_L) │ │ │ │ 189 return _C_r_e_f_e_r_e_n_c_e(); │ │ │ │ 190 │ │ │ │ -191 double dx, dy; │ │ │ │ +191 double _d_x, _d_y; │ │ │ │ 192 │ │ │ │ 193 // step 2: if there is only one particle inside the square, test if it is │ │ │ │ in │ │ │ │ 194 // the circle, in which case return associated reference │ │ │ │ 195 if (!_h_a_s___c_h_i_l_d){ │ │ │ │ 196 // compute the distance │ │ │ │ 197 // Note: v has only one particle => eta and phi are defined │ │ │ │ -198 dx = cx - _v->_e_t_a; │ │ │ │ -199 dy = fabs(cy - _v->_p_h_i); │ │ │ │ -200 if (dy>M_PI) │ │ │ │ -201 dy -= 2.0*M_PI; │ │ │ │ +198 _d_x = _c_x - _v->_e_t_a; │ │ │ │ +199 _d_y = _f_a_b_s(_c_y - _v->_p_h_i); │ │ │ │ +200 if (_d_y>M_PI) │ │ │ │ +201 _d_y -= 2.0*M_PI; │ │ │ │ 202 │ │ │ │ 203 // test distance │ │ │ │ -204 if (dx*dx+dy*dy_r_e_f; │ │ │ │ 206 } │ │ │ │ 207 │ │ │ │ 208 return _C_r_e_f_e_r_e_n_c_e(); │ │ │ │ 209 } │ │ │ │ 210 │ │ │ │ 211 // step 3: check if there is an intersection │ │ │ │ 212 //double ryp, rym; │ │ │ │ -213 double dx_c, dy_c; │ │ │ │ +213 double _d_x___c, _d_y___c; │ │ │ │ 214 │ │ │ │ 215 // store distance with the centre of the square │ │ │ │ -216 dx_c = fabs(cx-_c_e_n_t_r_e___x); │ │ │ │ -217 dy_c = fabs(cy-_c_e_n_t_r_e___y); │ │ │ │ -218 if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c; │ │ │ │ +216 _d_x___c = _f_a_b_s(_c_x-_c_e_n_t_r_e___x); │ │ │ │ +217 _d_y___c = _f_a_b_s(_c_y-_c_e_n_t_r_e___y); │ │ │ │ +218 if (_d_y___c>M_PI) _d_y___c = 2.0*M_PI-_d_y___c; │ │ │ │ 219 │ │ │ │ 220 // compute (minimal) the distance (pay attention to the periodicity in │ │ │ │ phi). │ │ │ │ -221 dx = dx_c-_h_a_l_f___s_i_z_e___x; │ │ │ │ -222 if (dx<0) dx=0; │ │ │ │ -223 dy = dy_c-_h_a_l_f___s_i_z_e___y; │ │ │ │ -224 if (dy<0) dy=0; │ │ │ │ +221 _d_x = _d_x___c-_h_a_l_f___s_i_z_e___x; │ │ │ │ +222 if (_d_x<0) _d_x=0; │ │ │ │ +223 _d_y = _d_y___c-_h_a_l_f___s_i_z_e___y; │ │ │ │ +224 if (_d_y<0) _d_y=0; │ │ │ │ 225 │ │ │ │ 226 // check the distance │ │ │ │ -227 if (dx*dx+dy*dy>=cR2){ │ │ │ │ +227 if (_d_x*_d_x+_d_y*_d_y>=_c_R_2){ │ │ │ │ 228 // no intersection │ │ │ │ 229 return _C_r_e_f_e_r_e_n_c_e(); │ │ │ │ 230 } │ │ │ │ 231 │ │ │ │ 232 // step 4: check if included │ │ │ │ 233 │ │ │ │ 234 // compute the (maximal) distance │ │ │ │ -235 dx = dx_c+_h_a_l_f___s_i_z_e___x; │ │ │ │ -236 dy = dy_c+_h_a_l_f___s_i_z_e___y; │ │ │ │ -237 if (dy>M_PI) dy = M_PI; │ │ │ │ +235 _d_x = _d_x___c+_h_a_l_f___s_i_z_e___x; │ │ │ │ +236 _d_y = _d_y___c+_h_a_l_f___s_i_z_e___y; │ │ │ │ +237 if (_d_y>M_PI) _d_y = M_PI; │ │ │ │ 238 │ │ │ │ 239 // compute the distance │ │ │ │ -240 if (dx*dx+dy*dy_r_e_f; │ │ │ │ 242 } │ │ │ │ 243 │ │ │ │ 244 // step 5: the square is not fully in. Recurse to children │ │ │ │ -245 return _c_h_i_l_d_r_e_n[0][0]->_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(cx, cy, cR2) │ │ │ │ -246 + _c_h_i_l_d_r_e_n[0][1]->_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(cx, cy, cR2) │ │ │ │ -247 + _c_h_i_l_d_r_e_n[1][0]->_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(cx, cy, cR2) │ │ │ │ -248 + _c_h_i_l_d_r_e_n[1][1]->_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(cx, cy, cR2); │ │ │ │ +245 return _c_h_i_l_d_r_e_n[0][0]->_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(_c_x, _c_y, _c_R_2) │ │ │ │ +246 + _c_h_i_l_d_r_e_n[0][1]->_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(_c_x, _c_y, _c_R_2) │ │ │ │ +247 + _c_h_i_l_d_r_e_n[1][0]->_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(_c_x, _c_y, _c_R_2) │ │ │ │ +248 + _c_h_i_l_d_r_e_n[1][1]->_c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(_c_x, _c_y, _c_R_2); │ │ │ │ 249} │ │ │ │ 250 │ │ │ │ 251 │ │ │ │ 252/* │ │ │ │ 253 * output a data file for drawing the grid. │ │ │ │ 254 * This can be used to output a data file containing all the │ │ │ │ 255 * grid subdivisions. The file contents is as follows: │ │ │ │ 256 * first and second columns give center of the cell, the third │ │ │ │ 257 * gives the size. │ │ │ │ 258 * - flux opened stream to write to │ │ │ │ 259 * return 0 on success, 1 on error │ │ │ │ 260 ******************************************************************/ │ │ │ │ -_2_6_1int _C_q_u_a_d_t_r_e_e_:_:_s_a_v_e(FILE *flux){ │ │ │ │ +_2_6_1int _C_q_u_a_d_t_r_e_e_:_:_s_a_v_e(_F_I_L_E *_f_l_u_x){ │ │ │ │ 262 │ │ │ │ -263 if (flux==NULL) │ │ │ │ +263 if (_f_l_u_x==_N_U_L_L) │ │ │ │ 264 return 1; │ │ │ │ 265 │ │ │ │ 266 if (_h_a_s___c_h_i_l_d){ │ │ │ │ -267 fprintf(flux, "%e\t%e\t%e\t%e\n", _c_e_n_t_r_e___x, _c_e_n_t_r_e___y, _h_a_l_f___s_i_z_e___x, │ │ │ │ +267 _f_p_r_i_n_t_f(_f_l_u_x, "%e\t%e\t%e\t%e\n", _c_e_n_t_r_e___x, _c_e_n_t_r_e___y, _h_a_l_f___s_i_z_e___x, │ │ │ │ _h_a_l_f___s_i_z_e___y); │ │ │ │ -268 _c_h_i_l_d_r_e_n[0][0]->_s_a_v_e(flux); │ │ │ │ -269 _c_h_i_l_d_r_e_n[0][1]->_s_a_v_e(flux); │ │ │ │ -270 _c_h_i_l_d_r_e_n[1][0]->_s_a_v_e(flux); │ │ │ │ -271 _c_h_i_l_d_r_e_n[1][1]->_s_a_v_e(flux); │ │ │ │ +268 _c_h_i_l_d_r_e_n[0][0]->_s_a_v_e(_f_l_u_x); │ │ │ │ +269 _c_h_i_l_d_r_e_n[0][1]->_s_a_v_e(_f_l_u_x); │ │ │ │ +270 _c_h_i_l_d_r_e_n[1][0]->_s_a_v_e(_f_l_u_x); │ │ │ │ +271 _c_h_i_l_d_r_e_n[1][1]->_s_a_v_e(_f_l_u_x); │ │ │ │ 272 } │ │ │ │ 273 │ │ │ │ 274 return 0; │ │ │ │ 275} │ │ │ │ 276 │ │ │ │ 277 │ │ │ │ 278/* │ │ │ │ @@ -293,26 +293,26 @@ │ │ │ │ 280 * This can be used to output a data file containing all the │ │ │ │ 281 * tree leaves. The file contents is as follows: │ │ │ │ 282 * first and second columns give center of the cell, the third │ │ │ │ 283 * gives the size. │ │ │ │ 284 * - flux opened stream to write to │ │ │ │ 285 * return 0 on success, 1 on error │ │ │ │ 286 ******************************************************************/ │ │ │ │ -_2_8_7int _C_q_u_a_d_t_r_e_e_:_:_s_a_v_e___l_e_a_v_e_s(FILE *flux){ │ │ │ │ +_2_8_7int _C_q_u_a_d_t_r_e_e_:_:_s_a_v_e___l_e_a_v_e_s(_F_I_L_E *_f_l_u_x){ │ │ │ │ 288 │ │ │ │ -289 if (flux==NULL) │ │ │ │ +289 if (_f_l_u_x==_N_U_L_L) │ │ │ │ 290 return 1; │ │ │ │ 291 │ │ │ │ 292 if (_h_a_s___c_h_i_l_d){ │ │ │ │ -293 if (_c_h_i_l_d_r_e_n[0][0]!=NULL) _c_h_i_l_d_r_e_n[0][0]->_s_a_v_e___l_e_a_v_e_s(flux); │ │ │ │ -294 if (_c_h_i_l_d_r_e_n[0][1]!=NULL) _c_h_i_l_d_r_e_n[0][1]->_s_a_v_e___l_e_a_v_e_s(flux); │ │ │ │ -295 if (_c_h_i_l_d_r_e_n[1][0]!=NULL) _c_h_i_l_d_r_e_n[1][0]->_s_a_v_e___l_e_a_v_e_s(flux); │ │ │ │ -296 if (_c_h_i_l_d_r_e_n[1][1]!=NULL) _c_h_i_l_d_r_e_n[1][1]->_s_a_v_e___l_e_a_v_e_s(flux); │ │ │ │ +293 if (_c_h_i_l_d_r_e_n[0][0]!=_N_U_L_L) _c_h_i_l_d_r_e_n[0][0]->_s_a_v_e___l_e_a_v_e_s(_f_l_u_x); │ │ │ │ +294 if (_c_h_i_l_d_r_e_n[0][1]!=_N_U_L_L) _c_h_i_l_d_r_e_n[0][1]->_s_a_v_e___l_e_a_v_e_s(_f_l_u_x); │ │ │ │ +295 if (_c_h_i_l_d_r_e_n[1][0]!=_N_U_L_L) _c_h_i_l_d_r_e_n[1][0]->_s_a_v_e___l_e_a_v_e_s(_f_l_u_x); │ │ │ │ +296 if (_c_h_i_l_d_r_e_n[1][1]!=_N_U_L_L) _c_h_i_l_d_r_e_n[1][1]->_s_a_v_e___l_e_a_v_e_s(_f_l_u_x); │ │ │ │ 297 } else { │ │ │ │ -298 fprintf(flux, "%e\t%e\t%e\t%e\n", _c_e_n_t_r_e___x, _c_e_n_t_r_e___y, _h_a_l_f___s_i_z_e___x, │ │ │ │ +298 _f_p_r_i_n_t_f(_f_l_u_x, "%e\t%e\t%e\t%e\n", _c_e_n_t_r_e___x, _c_e_n_t_r_e___y, _h_a_l_f___s_i_z_e___x, │ │ │ │ _h_a_l_f___s_i_z_e___y); │ │ │ │ 299 } │ │ │ │ 300 │ │ │ │ 301 return 0; │ │ │ │ 302} │ │ │ │ 303 │ │ │ │ 304} │ │ │ │ @@ -387,9 +387,13 @@ │ │ │ │ _s_i_s_c_o_n_e_:_:_C_q_u_a_d_t_r_e_e_:_:_c_h_i_l_d_r_e_n │ │ │ │ Cquadtree * children[2][2] │ │ │ │ sub-cells ( 0,1->left-right; 0,1->bottom,top) │ │ │ │ DDeeffiinniittiioonn _q_u_a_d_t_r_e_e_._h_:_1_1_9 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e │ │ │ │ references used for checksums. │ │ │ │ DDeeffiinniittiioonn _r_e_f_e_r_e_n_c_e_._h_:_4_3 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/quadtree_8h_source.html │ │ │ @@ -85,27 +85,27 @@ │ │ │
34namespace siscone{
│ │ │
35
│ │ │
│ │ │ │ │ │
44 public:
│ │ │
46 Cquadtree();
│ │ │
47
│ │ │ -
49 Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y);
│ │ │ +
49 Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y);
│ │ │
50
│ │ │
54 ~Cquadtree();
│ │ │
55
│ │ │ -
67 int init(double _x, double _y, double _half_size_x, double _half_size_y);
│ │ │ +
67 int init(double _x, double _y, double _half_size_x, double _half_size_y);
│ │ │
68
│ │ │ -
76 int add(Cmomentum *v_add);
│ │ │ +
76 int add(Cmomentum *v_add);
│ │ │
77
│ │ │ -
88 Creference circle_intersect(double cx, double cy, double cR2);
│ │ │ +
88 Creference circle_intersect(double cx, double cy, double cR2);
│ │ │
89
│ │ │ -
99 int save(FILE *flux);
│ │ │ +
99 int save(FILE *flux);
│ │ │
100
│ │ │ -
110 int save_leaves(FILE *flux);
│ │ │ +
110 int save_leaves(FILE *flux);
│ │ │
111
│ │ │
112 double centre_x;
│ │ │
113 double centre_y;
│ │ │
114 double half_size_x;
│ │ │
115 double half_size_y;
│ │ │
116
│ │ │ │ │ │ @@ -130,14 +130,15 @@ │ │ │
int save_leaves(FILE *flux)
output a data file for drawing the tree leaves.
Definition quadtree.cpp:287
│ │ │
double centre_y
y-position of the centre of the cell
Definition quadtree.h:113
│ │ │
bool has_child
true if not a leaf
Definition quadtree.h:120
│ │ │
Cmomentum * v
physical contents
Definition quadtree.h:117
│ │ │
int init(double _x, double _y, double _half_size_x, double _half_size_y)
init the tree.
Definition quadtree.cpp:91
│ │ │
Cquadtree * children[2][2]
sub-cells ( 0,1->left-right; 0,1->bottom,top)
Definition quadtree.h:119
│ │ │
references used for checksums.
Definition reference.h:43
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -35,27 +35,27 @@ │ │ │ │ 33 │ │ │ │ 34namespace siscone{ │ │ │ │ 35 │ │ │ │ _4_3class _C_q_u_a_d_t_r_e_e{ │ │ │ │ 44 public: │ │ │ │ 46 _C_q_u_a_d_t_r_e_e(); │ │ │ │ 47 │ │ │ │ -49 _C_q_u_a_d_t_r_e_e(double _x, double _y, double _half_size_x, double _half_size_y); │ │ │ │ +49 _C_q_u_a_d_t_r_e_e(double ___x, double ___y, double ___h_a_l_f___s_i_z_e___x, double ___h_a_l_f___s_i_z_e___y); │ │ │ │ 50 │ │ │ │ 54 _~_C_q_u_a_d_t_r_e_e(); │ │ │ │ 55 │ │ │ │ -67 int _i_n_i_t(double _x, double _y, double _half_size_x, double _half_size_y); │ │ │ │ +67 int _i_n_i_t(double ___x, double ___y, double ___h_a_l_f___s_i_z_e___x, double ___h_a_l_f___s_i_z_e___y); │ │ │ │ 68 │ │ │ │ -76 int _a_d_d(_C_m_o_m_e_n_t_u_m *v_add); │ │ │ │ +76 int _a_d_d(_C_m_o_m_e_n_t_u_m *_v___a_d_d); │ │ │ │ 77 │ │ │ │ -88 _C_r_e_f_e_r_e_n_c_e _c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(double cx, double cy, double cR2); │ │ │ │ +88 _C_r_e_f_e_r_e_n_c_e _c_i_r_c_l_e___i_n_t_e_r_s_e_c_t(double _c_x, double _c_y, double _c_R_2); │ │ │ │ 89 │ │ │ │ -99 int _s_a_v_e(FILE *flux); │ │ │ │ +99 int _s_a_v_e(_F_I_L_E *_f_l_u_x); │ │ │ │ 100 │ │ │ │ -110 int _s_a_v_e___l_e_a_v_e_s(FILE *flux); │ │ │ │ +110 int _s_a_v_e___l_e_a_v_e_s(_F_I_L_E *_f_l_u_x); │ │ │ │ 111 │ │ │ │ _1_1_2 double _c_e_n_t_r_e___x; │ │ │ │ _1_1_3 double _c_e_n_t_r_e___y; │ │ │ │ _1_1_4 double _h_a_l_f___s_i_z_e___x; │ │ │ │ _1_1_5 double _h_a_l_f___s_i_z_e___y; │ │ │ │ 116 │ │ │ │ _1_1_7 _C_m_o_m_e_n_t_u_m *_v; │ │ │ │ @@ -128,9 +128,13 @@ │ │ │ │ _s_i_s_c_o_n_e_:_:_C_q_u_a_d_t_r_e_e_:_:_c_h_i_l_d_r_e_n │ │ │ │ Cquadtree * children[2][2] │ │ │ │ sub-cells ( 0,1->left-right; 0,1->bottom,top) │ │ │ │ DDeeffiinniittiioonn _q_u_a_d_t_r_e_e_._h_:_1_1_9 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e │ │ │ │ references used for checksums. │ │ │ │ DDeeffiinniittiioonn _r_e_f_e_r_e_n_c_e_._h_:_4_3 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/ranlux_8cpp_source.html │ │ │ @@ -114,20 +114,20 @@ │ │ │
59
│ │ │
60
│ │ │
61// incrementation of the generator state
│ │ │
62//---------------------------------------
│ │ │
63static inline unsigned long int increment_state(){
│ │ │
64 unsigned int i = local_ranlux_state.i;
│ │ │
65 unsigned int j = local_ranlux_state.j;
│ │ │ -
66 long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i]
│ │ │ +
66 long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i]
│ │ │
67 - local_ranlux_state.carry;
│ │ │
68
│ │ │ -
69 if (delta & mask_hi){
│ │ │ +
69 if (delta & mask_hi){
│ │ │
70 local_ranlux_state.carry = 1;
│ │ │ -
71 delta &= mask_lo;
│ │ │ +
71 delta &= mask_lo;
│ │ │
72 } else {
│ │ │
73 local_ranlux_state.carry = 0;
│ │ │
74 }
│ │ │
75
│ │ │
76 local_ranlux_state.u[i] = delta;
│ │ │
77
│ │ │
78 if (i==0)
│ │ │ @@ -220,14 +220,15 @@ │ │ │
165 for (i=0;i<n;i++){
│ │ │
166 /* FIXME: we're assuming that a char is 8 bits */
│ │ │
167 printf("%.2x", *(p+i));
│ │ │
168 }
│ │ │
169}
│ │ │
170
│ │ │
171}
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -62,20 +62,20 @@ │ │ │ │ 59 │ │ │ │ 60 │ │ │ │ 61// incrementation of the generator state │ │ │ │ 62//--------------------------------------- │ │ │ │ 63static inline unsigned long int increment_state(){ │ │ │ │ 64 unsigned int i = local_ranlux_state.i; │ │ │ │ 65 unsigned int j = local_ranlux_state.j; │ │ │ │ -66 long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i] │ │ │ │ +66 long int _d_e_l_t_a = local_ranlux_state.u[j] - local_ranlux_state.u[i] │ │ │ │ 67 - local_ranlux_state.carry; │ │ │ │ 68 │ │ │ │ -69 if (delta & mask_hi){ │ │ │ │ +69 if (_d_e_l_t_a & mask_hi){ │ │ │ │ 70 local_ranlux_state.carry = 1; │ │ │ │ -71 delta &= mask_lo; │ │ │ │ +71 _d_e_l_t_a &= mask_lo; │ │ │ │ 72 } else { │ │ │ │ 73 local_ranlux_state.carry = 0; │ │ │ │ 74 } │ │ │ │ 75 │ │ │ │ 76 local_ranlux_state.u[i] = delta; │ │ │ │ 77 │ │ │ │ 78 if (i==0) │ │ │ │ @@ -168,12 +168,16 @@ │ │ │ │ 165 for (i=0;i │ │ │ │ │ │
55// ref[0] = reference_bit;
│ │ │
56// ref[1] = 0;
│ │ │
57// ref[2] = 0;
│ │ │
58// reference_bit <<= 1;
│ │ │
59
│ │ │ -
60 unsigned int r1 = ranlux_get();
│ │ │ -
61 unsigned int r2 = ranlux_get();
│ │ │ -
62 unsigned int r3 = ranlux_get();
│ │ │ -
63 unsigned int r4 = ranlux_get();
│ │ │ +
60 unsigned int r1 = ranlux_get();
│ │ │ +
61 unsigned int r2 = ranlux_get();
│ │ │ +
62 unsigned int r3 = ranlux_get();
│ │ │ +
63 unsigned int r4 = ranlux_get();
│ │ │
64 // since ranlux only produces 24 bits, take r4 and add 8 bits
│ │ │
65 // from it to each of r1,r2, r3 to get 3*32 bits.
│ │ │ -
66 ref[0] = r1+((r4 & 0x00ff0000) << 8);
│ │ │ -
67 ref[1] = r2+((r4 & 0x0000ff00) << 16);
│ │ │ -
68 ref[2] = r3+((r4 & 0x000000ff) << 24);
│ │ │ +
66 ref[0] = r1+((r4 & 0x00ff0000) << 8);
│ │ │ +
67 ref[1] = r2+((r4 & 0x0000ff00) << 16);
│ │ │ +
68 ref[2] = r3+((r4 & 0x000000ff) << 24);
│ │ │
69
│ │ │
70 if (is_empty()) randomize();
│ │ │
71}
│ │ │ │ │ │
72
│ │ │
73// test emptyness
│ │ │
74//----------------
│ │ │ @@ -140,49 +140,49 @@ │ │ │
82 return (ref[0]!=0) || (ref[1]!=0) || (ref[2]!=0);
│ │ │
83}
│ │ │ │ │ │
84
│ │ │
85// assignment of reference
│ │ │
86//-------------------------
│ │ │
│ │ │ - │ │ │ -
88 ref[0] = r.ref[0];
│ │ │ -
89 ref[1] = r.ref[1];
│ │ │ -
90 ref[2] = r.ref[2];
│ │ │ + │ │ │ +
88 ref[0] = r.ref[0];
│ │ │ +
89 ref[1] = r.ref[1];
│ │ │ +
90 ref[2] = r.ref[2];
│ │ │
91 return *this;
│ │ │
92}
│ │ │
│ │ │
93
│ │ │
94// addition of reference
│ │ │
95//-----------------------
│ │ │
│ │ │ - │ │ │ -
97 Creference tmp = *this;
│ │ │ -
98 return tmp+=r;
│ │ │ + │ │ │ +
97 Creference tmp = *this;
│ │ │ +
98 return tmp+=r;
│ │ │
99}
│ │ │
│ │ │
100
│ │ │
101// incrementation of reference
│ │ │
102//-----------------------------
│ │ │
│ │ │ - │ │ │ -
104 ref[0] ^= r.ref[0];
│ │ │ -
105 ref[1] ^= r.ref[1];
│ │ │ -
106 ref[2] ^= r.ref[2];
│ │ │ + │ │ │ +
104 ref[0] ^= r.ref[0];
│ │ │ +
105 ref[1] ^= r.ref[1];
│ │ │ +
106 ref[2] ^= r.ref[2];
│ │ │
107 return *this;
│ │ │
108}
│ │ │
│ │ │
109
│ │ │
110// decrementation of reference
│ │ │
111//-----------------------------
│ │ │
│ │ │ - │ │ │ -
113 ref[0] ^= r.ref[0];
│ │ │ -
114 ref[1] ^= r.ref[1];
│ │ │ -
115 ref[2] ^= r.ref[2];
│ │ │ + │ │ │ +
113 ref[0] ^= r.ref[0];
│ │ │ +
114 ref[1] ^= r.ref[1];
│ │ │ +
115 ref[2] ^= r.ref[2];
│ │ │
116 return *this;
│ │ │
117}
│ │ │
│ │ │
118
│ │ │
119}
│ │ │
120
│ │ │
references used for checksums.
Definition reference.h:43
│ │ │ @@ -191,14 +191,15 @@ │ │ │
Creference & operator=(const Creference &r)
assignment of reference
Definition reference.cpp:87
│ │ │
Creference()
default constructor
Definition reference.cpp:46
│ │ │
void randomize()
create a random reference
Definition reference.cpp:54
│ │ │
Creference & operator+=(const Creference &r)
incrementation of reference
│ │ │
bool not_empty()
test non-emptyness
Definition reference.cpp:81
│ │ │
Creference & operator-=(const Creference &r)
decrementation of reference
│ │ │
unsigned int ref[3]
actual data for the reference
Definition reference.h:72
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -55,23 +55,23 @@ │ │ │ │ 53//--------------------------- │ │ │ │ _5_4void _C_r_e_f_e_r_e_n_c_e_:_:_r_a_n_d_o_m_i_z_e(){ │ │ │ │ 55// ref[0] = reference_bit; │ │ │ │ 56// ref[1] = 0; │ │ │ │ 57// ref[2] = 0; │ │ │ │ 58// reference_bit <<= 1; │ │ │ │ 59 │ │ │ │ -60 unsigned int r1 = ranlux_get(); │ │ │ │ -61 unsigned int r2 = ranlux_get(); │ │ │ │ -62 unsigned int r3 = ranlux_get(); │ │ │ │ -63 unsigned int r4 = ranlux_get(); │ │ │ │ +60 unsigned int _r_1 = ranlux_get(); │ │ │ │ +61 unsigned int _r_2 = ranlux_get(); │ │ │ │ +62 unsigned int _r_3 = ranlux_get(); │ │ │ │ +63 unsigned int _r_4 = ranlux_get(); │ │ │ │ 64 // since ranlux only produces 24 bits, take r4 and add 8 bits │ │ │ │ 65 // from it to each of r1,r2, r3 to get 3*32 bits. │ │ │ │ -66 _r_e_f[0] = r1+((r4 & 0x00ff0000) << 8); │ │ │ │ -67 _r_e_f[1] = r2+((r4 & 0x0000ff00) << 16); │ │ │ │ -68 _r_e_f[2] = r3+((r4 & 0x000000ff) << 24); │ │ │ │ +66 _r_e_f[0] = _r_1+((_r_4 & 0x00ff0000) << 8); │ │ │ │ +67 _r_e_f[1] = _r_2+((_r_4 & 0x0000ff00) << 16); │ │ │ │ +68 _r_e_f[2] = _r_3+((_r_4 & 0x000000ff) << 24); │ │ │ │ 69 │ │ │ │ 70 if (_i_s___e_m_p_t_y()) _r_a_n_d_o_m_i_z_e(); │ │ │ │ 71} │ │ │ │ 72 │ │ │ │ 73// test emptyness │ │ │ │ 74//---------------- │ │ │ │ _7_5bool _C_r_e_f_e_r_e_n_c_e_:_:_i_s___e_m_p_t_y(){ │ │ │ │ @@ -82,43 +82,43 @@ │ │ │ │ 80//-------------------- │ │ │ │ _8_1bool _C_r_e_f_e_r_e_n_c_e_:_:_n_o_t___e_m_p_t_y(){ │ │ │ │ 82 return (_r_e_f[0]!=0) || (_r_e_f[1]!=0) || (_r_e_f[2]!=0); │ │ │ │ 83} │ │ │ │ 84 │ │ │ │ 85// assignment of reference │ │ │ │ 86//------------------------- │ │ │ │ -_8_7_C_r_e_f_e_r_e_n_c_e& _C_r_e_f_e_r_e_n_c_e_:_:_o_p_e_r_a_t_o_r_ _=_ (const _C_r_e_f_e_r_e_n_c_e &r){ │ │ │ │ -88 _r_e_f[0] = r._r_e_f[0]; │ │ │ │ -89 _r_e_f[1] = r._r_e_f[1]; │ │ │ │ -90 _r_e_f[2] = r._r_e_f[2]; │ │ │ │ +_8_7_C_r_e_f_e_r_e_n_c_e& _C_r_e_f_e_r_e_n_c_e_:_:_o_p_e_r_a_t_o_r_ _=_ (const _C_r_e_f_e_r_e_n_c_e &_r){ │ │ │ │ +88 _r_e_f[0] = _r.ref[0]; │ │ │ │ +89 _r_e_f[1] = _r.ref[1]; │ │ │ │ +90 _r_e_f[2] = _r.ref[2]; │ │ │ │ 91 return *this; │ │ │ │ 92} │ │ │ │ 93 │ │ │ │ 94// addition of reference │ │ │ │ 95//----------------------- │ │ │ │ -_9_6_C_r_e_f_e_r_e_n_c_e _C_r_e_f_e_r_e_n_c_e_:_:_o_p_e_r_a_t_o_r_ _+_ (const _C_r_e_f_e_r_e_n_c_e &r){ │ │ │ │ -97 _C_r_e_f_e_r_e_n_c_e tmp = *this; │ │ │ │ -98 return tmp+=r; │ │ │ │ +_9_6_C_r_e_f_e_r_e_n_c_e _C_r_e_f_e_r_e_n_c_e_:_:_o_p_e_r_a_t_o_r_ _+_ (const _C_r_e_f_e_r_e_n_c_e &_r){ │ │ │ │ +97 _C_r_e_f_e_r_e_n_c_e _t_m_p = *this; │ │ │ │ +98 return _t_m_p+=_r; │ │ │ │ 99} │ │ │ │ 100 │ │ │ │ 101// incrementation of reference │ │ │ │ 102//----------------------------- │ │ │ │ -_1_0_3_C_r_e_f_e_r_e_n_c_e& _C_r_e_f_e_r_e_n_c_e_:_:_o_p_e_r_a_t_o_r_ _+_=_ (const _C_r_e_f_e_r_e_n_c_e &r){ │ │ │ │ -104 _r_e_f[0] ^= r._r_e_f[0]; │ │ │ │ -105 _r_e_f[1] ^= r._r_e_f[1]; │ │ │ │ -106 _r_e_f[2] ^= r._r_e_f[2]; │ │ │ │ +_1_0_3_C_r_e_f_e_r_e_n_c_e& _C_r_e_f_e_r_e_n_c_e_:_:_o_p_e_r_a_t_o_r_ _+_=_ (const _C_r_e_f_e_r_e_n_c_e &_r){ │ │ │ │ +104 _r_e_f[0] ^= _r.ref[0]; │ │ │ │ +105 _r_e_f[1] ^= _r.ref[1]; │ │ │ │ +106 _r_e_f[2] ^= _r.ref[2]; │ │ │ │ 107 return *this; │ │ │ │ 108} │ │ │ │ 109 │ │ │ │ 110// decrementation of reference │ │ │ │ 111//----------------------------- │ │ │ │ -_1_1_2_C_r_e_f_e_r_e_n_c_e& _C_r_e_f_e_r_e_n_c_e_:_:_o_p_e_r_a_t_o_r_ _-_=_ (const _C_r_e_f_e_r_e_n_c_e &r){ │ │ │ │ -113 _r_e_f[0] ^= r._r_e_f[0]; │ │ │ │ -114 _r_e_f[1] ^= r._r_e_f[1]; │ │ │ │ -115 _r_e_f[2] ^= r._r_e_f[2]; │ │ │ │ +_1_1_2_C_r_e_f_e_r_e_n_c_e& _C_r_e_f_e_r_e_n_c_e_:_:_o_p_e_r_a_t_o_r_ _-_=_ (const _C_r_e_f_e_r_e_n_c_e &_r){ │ │ │ │ +113 _r_e_f[0] ^= _r.ref[0]; │ │ │ │ +114 _r_e_f[1] ^= _r.ref[1]; │ │ │ │ +115 _r_e_f[2] ^= _r.ref[2]; │ │ │ │ 116 return *this; │ │ │ │ 117} │ │ │ │ 118 │ │ │ │ 119} │ │ │ │ 120 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e │ │ │ │ references used for checksums. │ │ │ │ @@ -155,10 +155,14 @@ │ │ │ │ Creference & operator-=(const Creference &r) │ │ │ │ decrementation of reference │ │ │ │ DDeeffiinniittiioonn _r_e_f_e_r_e_n_c_e_._c_p_p_:_1_1_2 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e_:_:_r_e_f │ │ │ │ unsigned int ref[3] │ │ │ │ actual data for the reference │ │ │ │ DDeeffiinniittiioonn _r_e_f_e_r_e_n_c_e_._h_:_7_2 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ _r_a_n_l_u_x_._h │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/reference_8h_source.html │ │ │ @@ -88,43 +88,43 @@ │ │ │
47
│ │ │
49 void randomize();
│ │ │
50
│ │ │
52 bool is_empty();
│ │ │
53
│ │ │
55 bool not_empty();
│ │ │
56
│ │ │ - │ │ │ + │ │ │
59
│ │ │ - │ │ │ + │ │ │
62
│ │ │ - │ │ │ + │ │ │
65
│ │ │ - │ │ │ + │ │ │
68
│ │ │
70 inline unsigned int operator[] (int i) {return ref[i];}
│ │ │
71
│ │ │
72 unsigned int ref[3];
│ │ │
73};
│ │ │ │ │ │
74
│ │ │ -
76Creference operator + (Creference &r1, Creference &r2);
│ │ │ + │ │ │
77
│ │ │ -
79bool operator == (const Creference &r1, const Creference &r2);
│ │ │ +
79bool operator == (const Creference &r1, const Creference &r2);
│ │ │
80
│ │ │ -
82bool operator != (const Creference &r1, const Creference &r2);
│ │ │ +
82bool operator != (const Creference &r1, const Creference &r2);
│ │ │
83
│ │ │ -
85bool operator < (const Creference &r1, const Creference &r2);
│ │ │ +
85bool operator < (const Creference &r1, const Creference &r2);
│ │ │
86
│ │ │
87
│ │ │
88//=============== inline material ================
│ │ │
89
│ │ │
90// equality test for two references
│ │ │
91//----------------------------------
│ │ │ -
92inline bool operator == (const Creference &r1, const Creference &r2){
│ │ │ -
93 return (r1.ref[0]==r2.ref[0]) && (r1.ref[1]==r2.ref[1]) && (r1.ref[2]==r2.ref[2]);
│ │ │ +
92inline bool operator == (const Creference &r1, const Creference &r2){
│ │ │ +
93 return (r1.ref[0]==r2.ref[0]) && (r1.ref[1]==r2.ref[1]) && (r1.ref[2]==r2.ref[2]);
│ │ │
94}
│ │ │
95
│ │ │
96// difference test for two references
│ │ │
97//----------------------------------
│ │ │
98inline bool operator != (const Creference &r1, const Creference &r2){
│ │ │
99 return (r1.ref[0]!=r2.ref[0]) || (r1.ref[1]!=r2.ref[1]) || (r1.ref[2]!=r2.ref[2]);
│ │ │
100}
│ │ │ @@ -146,14 +146,15 @@ │ │ │
unsigned int operator[](int i)
accessing the reference
Definition reference.h:70
│ │ │
Creference()
default constructor
Definition reference.cpp:46
│ │ │
void randomize()
create a random reference
Definition reference.cpp:54
│ │ │
Creference & operator+=(const Creference &r)
incrementation of reference
│ │ │
bool not_empty()
test non-emptyness
Definition reference.cpp:81
│ │ │
Creference & operator-=(const Creference &r)
decrementation of reference
│ │ │
unsigned int ref[3]
actual data for the reference
Definition reference.h:72
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -38,43 +38,43 @@ │ │ │ │ 47 │ │ │ │ 49 void _r_a_n_d_o_m_i_z_e(); │ │ │ │ 50 │ │ │ │ 52 bool _i_s___e_m_p_t_y(); │ │ │ │ 53 │ │ │ │ 55 bool _n_o_t___e_m_p_t_y(); │ │ │ │ 56 │ │ │ │ -58 _C_r_e_f_e_r_e_n_c_e& _o_p_e_r_a_t_o_r_ _=_ (const _C_r_e_f_e_r_e_n_c_e &r); │ │ │ │ +58 _C_r_e_f_e_r_e_n_c_e& _o_p_e_r_a_t_o_r_ _=_ (const _C_r_e_f_e_r_e_n_c_e &_r); │ │ │ │ 59 │ │ │ │ -61 _C_r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_ _+_ (const _C_r_e_f_e_r_e_n_c_e &r); │ │ │ │ +61 _C_r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_ _+_ (const _C_r_e_f_e_r_e_n_c_e &_r); │ │ │ │ 62 │ │ │ │ -64 _C_r_e_f_e_r_e_n_c_e& _o_p_e_r_a_t_o_r_ _+_=_ (const _C_r_e_f_e_r_e_n_c_e &r); │ │ │ │ +64 _C_r_e_f_e_r_e_n_c_e& _o_p_e_r_a_t_o_r_ _+_=_ (const _C_r_e_f_e_r_e_n_c_e &_r); │ │ │ │ 65 │ │ │ │ -67 _C_r_e_f_e_r_e_n_c_e& _o_p_e_r_a_t_o_r_ _-_=_ (const _C_r_e_f_e_r_e_n_c_e &r); │ │ │ │ +67 _C_r_e_f_e_r_e_n_c_e& _o_p_e_r_a_t_o_r_ _-_=_ (const _C_r_e_f_e_r_e_n_c_e &_r); │ │ │ │ 68 │ │ │ │ _7_0 inline unsigned int _o_p_e_r_a_t_o_r_[_]_ (int i) {return _r_e_f[i];} │ │ │ │ 71 │ │ │ │ _7_2 unsigned int _r_e_f[3]; │ │ │ │ 73}; │ │ │ │ 74 │ │ │ │ -76_C_r_e_f_e_r_e_n_c_e operator + (_C_r_e_f_e_r_e_n_c_e &r1, _C_r_e_f_e_r_e_n_c_e &r2); │ │ │ │ +76_C_r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_ _+_ (_C_r_e_f_e_r_e_n_c_e &_r_1, _C_r_e_f_e_r_e_n_c_e &_r_2); │ │ │ │ 77 │ │ │ │ -79bool operator == (const _C_r_e_f_e_r_e_n_c_e &r1, const _C_r_e_f_e_r_e_n_c_e &r2); │ │ │ │ +79bool _o_p_e_r_a_t_o_r_ _=_=_ (const _C_r_e_f_e_r_e_n_c_e &_r_1, const _C_r_e_f_e_r_e_n_c_e &_r_2); │ │ │ │ 80 │ │ │ │ -82bool operator != (const _C_r_e_f_e_r_e_n_c_e &r1, const _C_r_e_f_e_r_e_n_c_e &r2); │ │ │ │ +82bool _o_p_e_r_a_t_o_r_ _!_=_ (const _C_r_e_f_e_r_e_n_c_e &_r_1, const _C_r_e_f_e_r_e_n_c_e &_r_2); │ │ │ │ 83 │ │ │ │ -85bool operator < (const _C_r_e_f_e_r_e_n_c_e &r1, const _C_r_e_f_e_r_e_n_c_e &r2); │ │ │ │ +85bool _o_p_e_r_a_t_o_r_ _<_ (const _C_r_e_f_e_r_e_n_c_e &_r_1, const _C_r_e_f_e_r_e_n_c_e &_r_2); │ │ │ │ 86 │ │ │ │ 87 │ │ │ │ 88//=============== inline material ================ │ │ │ │ 89 │ │ │ │ 90// equality test for two references │ │ │ │ 91//---------------------------------- │ │ │ │ -92inline bool operator == (const _C_r_e_f_e_r_e_n_c_e &r1, const _C_r_e_f_e_r_e_n_c_e &r2){ │ │ │ │ -93 return (r1._r_e_f[0]==r2._r_e_f[0]) && (r1._r_e_f[1]==r2._r_e_f[1]) && (r1._r_e_f │ │ │ │ -[2]==r2._r_e_f[2]); │ │ │ │ +92inline bool _o_p_e_r_a_t_o_r_ _=_=_ (const _C_r_e_f_e_r_e_n_c_e &_r_1, const _C_r_e_f_e_r_e_n_c_e &_r_2){ │ │ │ │ +93 return (_r_1.ref[0]==_r_2.ref[0]) && (_r_1.ref[1]==_r_2.ref[1]) && (_r_1.ref │ │ │ │ +[2]==_r_2.ref[2]); │ │ │ │ 94} │ │ │ │ 95 │ │ │ │ 96// difference test for two references │ │ │ │ 97//---------------------------------- │ │ │ │ 98inline bool operator != (const Creference &r1, const Creference &r2){ │ │ │ │ 99 return (r1.ref[0]!=r2.ref[0]) || (r1.ref[1]!=r2.ref[1]) || (r1.ref │ │ │ │ [2]!=r2.ref[2]); │ │ │ │ @@ -129,9 +129,13 @@ │ │ │ │ Creference & operator-=(const Creference &r) │ │ │ │ decrementation of reference │ │ │ │ DDeeffiinniittiioonn _r_e_f_e_r_e_n_c_e_._c_p_p_:_1_1_2 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_r_e_f_e_r_e_n_c_e_:_:_r_e_f │ │ │ │ unsigned int ref[3] │ │ │ │ actual data for the reference │ │ │ │ DDeeffiinniittiioonn _r_e_f_e_r_e_n_c_e_._h_:_7_2 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/siscone__error_8h_source.html │ │ │ @@ -86,25 +86,25 @@ │ │ │
35
│ │ │
│ │ │ │ │ │
39public:
│ │ │ │ │ │
42
│ │ │
│ │ │ -
45 Csiscone_error(const std::string & message_in) {
│ │ │ -
46 m_message = message_in;
│ │ │ -
47 if (m_print_errors) std::cerr << "siscone::Csiscone_error: "<< message_in << std::endl;
│ │ │ +
45 Csiscone_error(const std::string & message_in) {
│ │ │ +
46 m_message = message_in;
│ │ │ +
47 if (m_print_errors) std::cerr << "siscone::Csiscone_error: "<< message_in << std::endl;
│ │ │
48 };
│ │ │
│ │ │
49
│ │ │
51 std::string message() const {return m_message;};
│ │ │
52
│ │ │
│ │ │ -
55 static void setm_print_errors(bool print_errors) {
│ │ │ -
56 m_print_errors = print_errors;};
│ │ │ +
55 static void setm_print_errors(bool print_errors) {
│ │ │ +
56 m_print_errors = print_errors;};
│ │ │
│ │ │
57
│ │ │
58private:
│ │ │
59 std::string m_message;
│ │ │
60 static bool m_print_errors;
│ │ │
61};
│ │ │
│ │ │ @@ -112,14 +112,15 @@ │ │ │
63}
│ │ │
64#endif
│ │ │
class corresponding to errors that will be thrown by siscone
│ │ │
Csiscone_error()
default ctor
│ │ │
Csiscone_error(const std::string &message_in)
ctor with a given error message
│ │ │
std::string message() const
access to the error message
│ │ │
static void setm_print_errors(bool print_errors)
switch on/off the error message printing
│ │ │ +
a circulator that is foreseen to take as template member either a pointer or an iterator;
Definition circulator.h:36
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -35,24 +35,24 @@ │ │ │ │ 33 │ │ │ │ 34namespace siscone{ │ │ │ │ 35 │ │ │ │ _3_8class _C_s_i_s_c_o_n_e___e_r_r_o_r { │ │ │ │ 39public: │ │ │ │ _4_1 _C_s_i_s_c_o_n_e___e_r_r_o_r() {;}; │ │ │ │ 42 │ │ │ │ -_4_5 _C_s_i_s_c_o_n_e___e_r_r_o_r(const std::string & message_in) { │ │ │ │ -46 m_message = message_in; │ │ │ │ -47 if (m_print_errors) std::cerr << "siscone::Csiscone_error: "<< message_in << │ │ │ │ +_4_5 _C_s_i_s_c_o_n_e___e_r_r_o_r(const std::string & _m_e_s_s_a_g_e___i_n) { │ │ │ │ +46 m_message = _m_e_s_s_a_g_e___i_n; │ │ │ │ +47 if (m_print_errors) std::cerr << "siscone::Csiscone_error: "<< _m_e_s_s_a_g_e___i_n << │ │ │ │ std::endl; │ │ │ │ 48 }; │ │ │ │ 49 │ │ │ │ _5_1 std::string _m_e_s_s_a_g_e() const {return m_message;}; │ │ │ │ 52 │ │ │ │ -_5_5 static void _s_e_t_m___p_r_i_n_t___e_r_r_o_r_s(bool print_errors) { │ │ │ │ -56 m_print_errors = print_errors;}; │ │ │ │ +_5_5 static void _s_e_t_m___p_r_i_n_t___e_r_r_o_r_s(bool _p_r_i_n_t___e_r_r_o_r_s) { │ │ │ │ +56 m_print_errors = _p_r_i_n_t___e_r_r_o_r_s;}; │ │ │ │ 57 │ │ │ │ 58private: │ │ │ │ 59 std::string m_message; │ │ │ │ 60 static bool m_print_errors; │ │ │ │ 61}; │ │ │ │ 62 │ │ │ │ 63} │ │ │ │ @@ -72,9 +72,13 @@ │ │ │ │ std::string message() const │ │ │ │ access to the error message │ │ │ │ DDeeffiinniittiioonn _s_i_s_c_o_n_e___e_r_r_o_r_._h_:_5_1 │ │ │ │ _s_i_s_c_o_n_e_:_:_C_s_i_s_c_o_n_e___e_r_r_o_r_:_:_s_e_t_m___p_r_i_n_t___e_r_r_o_r_s │ │ │ │ static void setm_print_errors(bool print_errors) │ │ │ │ switch on/off the error message printing │ │ │ │ DDeeffiinniittiioonn _s_i_s_c_o_n_e___e_r_r_o_r_._h_:_5_5 │ │ │ │ +_s_i_s_c_o_n_e_:_:_c_i_r_c_u_l_a_t_o_r │ │ │ │ +a circulator that is foreseen to take as template member either a pointer or an │ │ │ │ +iterator; │ │ │ │ +DDeeffiinniittiioonn _c_i_r_c_u_l_a_t_o_r_._h_:_3_6 │ │ │ │ =============================================================================== │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/siscone-doc-html/html/devel/spherical_2geom__2d_8cpp_source.html │ │ │ @@ -226,21 +226,20 @@ │ │ │
166const CSphtheta_phi_range range_union (const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){
│ │ │
167 CSphtheta_phi_range tmp;
│ │ │
168
│ │ │
169 // compute union in eta
│ │ │
170 tmp.theta_range = r1.theta_range | r2.theta_range;
│ │ │
171
│ │ │
172 // compute union in phi
│ │ │ -
173 tmp.phi_range = r1.phi_range | r2.phi_range;
│ │ │ +
173 tmp.phi_range = r1.phi_range | r2.phi_range;
│ │ │
174
│ │ │
175 return tmp;
│ │ │
176}
│ │ │
177
│ │ │
178}
│ │ │ -
unsigned int phi_range
phi range as a binary coding of covered cells
Definition geom_2d.h:146
│ │ │
class for holding a covering range in eta-phi
Definition geom_2d.h:52
│ │ │
int add_particle(const double theta, const double phi)
add a particle to the range
Definition geom_2d.cpp:130
│ │ │
CSphtheta_phi_range & operator=(const CSphtheta_phi_range &r)
assignment of range
Definition geom_2d.cpp:118
│ │ │
static double theta_max
maximal value for theta (set to pi)
Definition geom_2d.h:82
│ │ │
unsigned int theta_range
theta range as a binary coding of covered cells
Definition geom_2d.h:75
│ │ │
static double theta_min
extremal value for theta
Definition geom_2d.h:81
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -175,24 +175,20 @@ │ │ │ │ CSphtheta_phi_range &r2){ │ │ │ │ 167 CSphtheta_phi_range tmp; │ │ │ │ 168 │ │ │ │ 169 // compute union in eta │ │ │ │ 170 tmp.theta_range = r1.theta_range | r2.theta_range; │ │ │ │ 171 │ │ │ │ 172 // compute union in phi │ │ │ │ -173 tmp._p_h_i___r_a_n_g_e = r1.phi_range | r2.phi_range; │ │ │ │ +173 tmp.phi_range = r1.phi_range | r2.phi_range; │ │ │ │ 174 │ │ │ │ 175 return tmp; │ │ │ │ 176} │ │ │ │ 177 │ │ │ │ 178} │ │ │ │ -_s_i_s_c_o_n_e_:_:_C_e_t_a___p_h_i___r_a_n_g_e_:_:_p_h_i___r_a_n_g_e │ │ │ │ -unsigned int phi_range │ │ │ │ -phi range as a binary coding of covered cells │ │ │ │ -DDeeffiinniittiioonn _g_e_o_m___2_d_._h_:_1_4_6 │ │ │ │ _s_i_s_c_o_n_e___s_p_h_e_r_i_c_a_l_:_:_C_S_p_h_t_h_e_t_a___p_h_i___r_a_n_g_e │ │ │ │ class for holding a covering range in eta-phi │ │ │ │ DDeeffiinniittiioonn _g_e_o_m___2_d_._h_:_5_2 │ │ │ │ _s_i_s_c_o_n_e___s_p_h_e_r_i_c_a_l_:_:_C_S_p_h_t_h_e_t_a___p_h_i___r_a_n_g_e_:_:_a_d_d___p_a_r_t_i_c_l_e │ │ │ │ int add_particle(const double theta, const double phi) │ │ │ │ add a particle to the range │ │ │ │ DDeeffiinniittiioonn _g_e_o_m___2_d_._c_p_p_:_1_3_0