--- /srv/rebuilderd/tmp/rebuilderd3RKHma/inputs/siscone-doc-pdf_3.0.5-3_all.deb +++ /srv/rebuilderd/tmp/rebuilderd3RKHma/out/siscone-doc-pdf_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 808 2025-01-07 11:57:28.000000 control.tar.xz │ --rw-r--r-- 0 0 0 1647152 2025-01-07 11:57:28.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 1652508 2025-01-07 11:57:28.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: siscone-doc-pdf │ │ │ Source: siscone │ │ │ Version: 3.0.5-3 │ │ │ Architecture: all │ │ │ Maintainer: Debian Science Maintainers │ │ │ -Installed-Size: 1620 │ │ │ +Installed-Size: 1625 │ │ │ Section: doc │ │ │ Priority: optional │ │ │ Multi-Arch: foreign │ │ │ Homepage: http://projects.hepforge.org/siscone/ │ │ │ Description: Developer's reference manual of SISCone (PDF) │ │ │ SISCone implements a Seedless Infrared (IR) Safe Cone jet algorithm, it takes │ │ │ N^2*ln(N) time to find jets among N particles, comparing to N*2^N time of │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -3,10 +3,10 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/doc/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/ │ │ │ -rw-r--r-- 0 root (0) root (0) 1083 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/changelog.Debian.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 16688 2020-04-24 08:56:01.000000 ./usr/share/doc/siscone-doc-pdf/changelog.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 1151 2025-01-07 11:56:31.000000 ./usr/share/doc/siscone-doc-pdf/copyright │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/pdf/ │ │ │ --rw-r--r-- 0 root (0) root (0) 1627199 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 1632459 2025-01-07 11:57:28.000000 ./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-07 11:57:28.000000 ./usr/share/doc-base/ │ │ │ -rw-r--r-- 0 root (0) root (0) 240 2025-01-07 11:56:31.000000 ./usr/share/doc-base/siscone-doc-pdf.siscone-pdf │ │ ├── ./usr/share/doc/siscone-doc-pdf/pdf/refman.pdf.gz │ │ │ ├── refman.pdf │ │ │ │ ├── pdftotext {} - │ │ │ │ │ @@ -1577,15 +1577,15 @@ │ │ │ │ │ 4.33.2.2 ∼hash_cones() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 │ │ │ │ │ 4.33.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 │ │ │ │ │ 4.33.3.1 insert() [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 │ │ │ │ │ 4.33.3.2 insert() [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 │ │ │ │ │ 4.33.3.3 is_inside() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 │ │ │ │ │ 4.33.4 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 │ │ │ │ │ 4.33.4.1 hash_array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 │ │ │ │ │ -4.33.4.2 mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 │ │ │ │ │ +4.33.4.2 mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 │ │ │ │ │ 4.33.4.3 n_cones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 │ │ │ │ │ 4.33.4.4 R2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 │ │ │ │ │ 4.34 siscone::hash_element Class Reference │ │ │ │ │ │ │ │ │ │ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 │ │ │ │ │ │ │ │ │ │ 4.34.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 │ │ │ │ │ @@ -1600,25 +1600,25 @@ │ │ │ │ │ │ │ │ │ │ xiv │ │ │ │ │ │ │ │ │ │ 4.35 siscone::ranlux_state_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 │ │ │ │ │ 4.35.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 │ │ │ │ │ 4.35.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 │ │ │ │ │ 4.35.2.1 carry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 │ │ │ │ │ -4.35.2.2 i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 │ │ │ │ │ +4.35.2.2 i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 │ │ │ │ │ 4.35.2.3 j . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 │ │ │ │ │ 4.35.2.4 n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 │ │ │ │ │ 4.35.2.5 skip │ │ │ │ │ │ │ │ │ │ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 │ │ │ │ │ │ │ │ │ │ 4.35.2.6 u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 │ │ │ │ │ 4.36 siscone_spherical::sph_hash_cones Class Reference │ │ │ │ │ │ │ │ │ │ -. . . . . . . . . . . . . . . . . . . . . . . . 172 │ │ │ │ │ +. . . . . . . . . . . . . . . . . . . . . . . . 171 │ │ │ │ │ │ │ │ │ │ 4.36.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 │ │ │ │ │ 4.36.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 │ │ │ │ │ 4.36.2.1 sph_hash_cones() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 │ │ │ │ │ 4.36.2.2 ∼sph_hash_cones() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 │ │ │ │ │ 4.36.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 │ │ │ │ │ 4.36.3.1 insert() [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 │ │ │ │ │ @@ -1683,66 +1683,66 @@ │ │ │ │ │ 5.14.1.4 PT_TSHOLD │ │ │ │ │ │ │ │ │ │ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 │ │ │ │ │ │ │ │ │ │ 5.14.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 │ │ │ │ │ 5.14.2.1 twopi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 │ │ │ │ │ 5.15 defines.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 │ │ │ │ │ -5.16 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 │ │ │ │ │ -5.17 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 │ │ │ │ │ -5.18 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 │ │ │ │ │ -5.19 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 │ │ │ │ │ -5.20 quadtree.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 │ │ │ │ │ -5.21 quadtree.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 │ │ │ │ │ -5.22 ranlux.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 │ │ │ │ │ -5.23 siscone/ranlux.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 │ │ │ │ │ -5.23.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 │ │ │ │ │ -5.23.1.1 ranlux_get() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 │ │ │ │ │ -5.23.1.2 ranlux_init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 │ │ │ │ │ -5.23.1.3 ranlux_print_state() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 │ │ │ │ │ -5.24 ranlux.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 │ │ │ │ │ -5.25 reference.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 │ │ │ │ │ -5.26 reference.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 │ │ │ │ │ -5.27 siscone_error.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 │ │ │ │ │ -5.28 siscone_error.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 │ │ │ │ │ -5.29 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 │ │ │ │ │ -5.30 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 │ │ │ │ │ -5.31 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 │ │ │ │ │ -5.32 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 │ │ │ │ │ -5.33 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 │ │ │ │ │ -5.34 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 │ │ │ │ │ -5.35 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 │ │ │ │ │ -5.36 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 │ │ │ │ │ -5.37 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 │ │ │ │ │ -5.38 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 │ │ │ │ │ -5.39 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 │ │ │ │ │ -5.40 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 │ │ │ │ │ -5.41 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 │ │ │ │ │ -5.42 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 │ │ │ │ │ +5.16 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 │ │ │ │ │ +5.17 hash.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 │ │ │ │ │ +5.18 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 │ │ │ │ │ +5.19 momentum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 │ │ │ │ │ +5.20 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 │ │ │ │ │ +5.21 protocones.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 │ │ │ │ │ +5.22 quadtree.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 │ │ │ │ │ +5.23 quadtree.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 │ │ │ │ │ +5.24 ranlux.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 │ │ │ │ │ +5.25 siscone/ranlux.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 │ │ │ │ │ +5.25.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 │ │ │ │ │ +5.25.1.1 ranlux_get() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 │ │ │ │ │ +5.25.1.2 ranlux_init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 │ │ │ │ │ +5.25.1.3 ranlux_print_state() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 │ │ │ │ │ +5.26 ranlux.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 │ │ │ │ │ +5.27 reference.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 │ │ │ │ │ +5.28 reference.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 │ │ │ │ │ +5.29 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 │ │ │ │ │ +5.30 siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 │ │ │ │ │ +5.31 siscone_error.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 │ │ │ │ │ +5.32 siscone_error.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 │ │ │ │ │ +5.33 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 │ │ │ │ │ +5.34 geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 │ │ │ │ │ +5.35 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 │ │ │ │ │ +5.36 geom_2d.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 │ │ │ │ │ +5.37 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 │ │ │ │ │ +5.38 hash.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 │ │ │ │ │ +5.39 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 │ │ │ │ │ +5.40 momentum.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 │ │ │ │ │ +5.41 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 │ │ │ │ │ +5.42 protocones.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 │ │ │ │ │ │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ xvi │ │ │ │ │ │ │ │ │ │ 5.43 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 │ │ │ │ │ 5.44 siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 │ │ │ │ │ -5.45 split_merge.cpp │ │ │ │ │ +5.45 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 │ │ │ │ │ +5.46 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 │ │ │ │ │ +5.47 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 │ │ │ │ │ +5.48 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 │ │ │ │ │ +5.49 split_merge.cpp │ │ │ │ │ │ │ │ │ │ -. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 │ │ │ │ │ +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 │ │ │ │ │ │ │ │ │ │ -5.46 split_merge.cpp │ │ │ │ │ +5.50 split_merge.cpp │ │ │ │ │ │ │ │ │ │ -. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 │ │ │ │ │ +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 │ │ │ │ │ │ │ │ │ │ -5.47 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 │ │ │ │ │ -5.48 split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 │ │ │ │ │ -5.49 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 │ │ │ │ │ -5.50 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 │ │ │ │ │ -5.51 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 │ │ │ │ │ -5.52 vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 │ │ │ │ │ +5.51 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 │ │ │ │ │ +5.52 vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 │ │ │ │ │ Index │ │ │ │ │ │ │ │ │ │ 311 │ │ │ │ │ │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ Chapter 1 │ │ │ │ │ @@ -1826,15 +1826,15 @@ │ │ │ │ │ siscone_spherical::sph_hash_cones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ siscone_spherical::sph_hash_element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ │ │ │ │ 163 │ │ │ │ │ 164 │ │ │ │ │ 168 │ │ │ │ │ 170 │ │ │ │ │ -172 │ │ │ │ │ +171 │ │ │ │ │ 176 │ │ │ │ │ │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ Chapter 2 │ │ │ │ │ │ │ │ │ │ Class Index │ │ │ │ │ @@ -1958,15 +1958,15 @@ │ │ │ │ │ 153 │ │ │ │ │ 160 │ │ │ │ │ │ │ │ │ │ 163 │ │ │ │ │ 164 │ │ │ │ │ 168 │ │ │ │ │ 170 │ │ │ │ │ -172 │ │ │ │ │ +171 │ │ │ │ │ 176 │ │ │ │ │ │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ Chapter 3 │ │ │ │ │ │ │ │ │ │ File Index │ │ │ │ │ @@ -2023,35 +2023,35 @@ │ │ │ │ │ 188 │ │ │ │ │ 191 │ │ │ │ │ 195 │ │ │ │ │ 196 │ │ │ │ │ 197 │ │ │ │ │ 198 │ │ │ │ │ 199 │ │ │ │ │ +245 │ │ │ │ │ +249 │ │ │ │ │ +251 │ │ │ │ │ 202 │ │ │ │ │ -206 │ │ │ │ │ -220 │ │ │ │ │ -225 │ │ │ │ │ +257 │ │ │ │ │ +204 │ │ │ │ │ +207 │ │ │ │ │ +262 │ │ │ │ │ 227 │ │ │ │ │ -232 │ │ │ │ │ +230 │ │ │ │ │ +231 │ │ │ │ │ +233 │ │ │ │ │ +235 │ │ │ │ │ 236 │ │ │ │ │ -255 │ │ │ │ │ -208 │ │ │ │ │ -212 │ │ │ │ │ -213 │ │ │ │ │ -215 │ │ │ │ │ -216 │ │ │ │ │ -218 │ │ │ │ │ -259 │ │ │ │ │ +237 │ │ │ │ │ 266 │ │ │ │ │ -219 │ │ │ │ │ -219 │ │ │ │ │ -282 │ │ │ │ │ -298 │ │ │ │ │ -304 │ │ │ │ │ +244 │ │ │ │ │ +244 │ │ │ │ │ +290 │ │ │ │ │ +270 │ │ │ │ │ +307 │ │ │ │ │ │ │ │ │ │ 6 │ │ │ │ │ │ │ │ │ │ File Index │ │ │ │ │ │ │ │ │ │ siscone/vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ siscone/spherical/geom_2d.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ @@ -2065,29 +2065,29 @@ │ │ │ │ │ siscone/spherical/siscone.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ siscone/spherical/siscone.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ siscone/spherical/split_merge.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ siscone/spherical/split_merge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ siscone/spherical/vicinity.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ siscone/spherical/vicinity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ │ │ │ │ -309 │ │ │ │ │ -204 │ │ │ │ │ -207 │ │ │ │ │ -223 │ │ │ │ │ -226 │ │ │ │ │ -229 │ │ │ │ │ -234 │ │ │ │ │ -245 │ │ │ │ │ -257 │ │ │ │ │ -262 │ │ │ │ │ +274 │ │ │ │ │ +247 │ │ │ │ │ +250 │ │ │ │ │ +254 │ │ │ │ │ +203 │ │ │ │ │ +258 │ │ │ │ │ +205 │ │ │ │ │ +217 │ │ │ │ │ +264 │ │ │ │ │ +240 │ │ │ │ │ 267 │ │ │ │ │ +276 │ │ │ │ │ 268 │ │ │ │ │ -295 │ │ │ │ │ -301 │ │ │ │ │ -308 │ │ │ │ │ +303 │ │ │ │ │ +273 │ │ │ │ │ │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ Chapter 4 │ │ │ │ │ │ │ │ │ │ Class Documentation │ │ │ │ │ │ │ │ │ │ @@ -11656,17 +11656,16 @@ │ │ │ │ │ 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 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. │ │ │ │ │ │ │ │ │ │ 4.33.3.2 │ │ │ │ │ │ │ │ │ │ insert() [2/2] │ │ │ │ │ │ │ │ │ │ int siscone::hash_cones::insert ( │ │ │ │ │ Cmomentum ∗ v, │ │ │ │ │ @@ -11701,41 +11700,38 @@ │ │ │ │ │ │ │ │ │ │ 167 │ │ │ │ │ │ │ │ │ │ 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. │ │ │ │ │ │ │ │ │ │ 4.33.3.3 │ │ │ │ │ │ │ │ │ │ is_inside() │ │ │ │ │ │ │ │ │ │ bool siscone::hash_cones::is_inside ( │ │ │ │ │ Cmomentum ∗ centre, │ │ │ │ │ -Cmomentum ∗ v ) [inline] │ │ │ │ │ +Cmomentum ∗ v ) │ │ │ │ │ + │ │ │ │ │ +[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'. │ │ │ │ │ Parameters │ │ │ │ │ centre │ │ │ │ │ v │ │ │ │ │ │ │ │ │ │ centre of the circle │ │ │ │ │ particle to test │ │ │ │ │ │ │ │ │ │ Returns │ │ │ │ │ true if inside, false if outside │ │ │ │ │ - │ │ │ │ │ Definition at line 219 of file hash.cpp. │ │ │ │ │ References siscone::Cmomentum::eta, siscone::Cmomentum::phi, and R2. │ │ │ │ │ Referenced by insert(). │ │ │ │ │ │ │ │ │ │ 4.33.4 │ │ │ │ │ │ │ │ │ │ Member Data Documentation │ │ │ │ │ @@ -11746,30 +11742,29 @@ │ │ │ │ │ │ │ │ │ │ hash_element∗∗ siscone::hash_cones::hash_array │ │ │ │ │ │ │ │ │ │ the cone data itself │ │ │ │ │ Definition at line 93 of file hash.h. │ │ │ │ │ Referenced by hash_cones(), insert(), insert(), and ∼hash_cones(). │ │ │ │ │ │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 168 │ │ │ │ │ - │ │ │ │ │ -Class Documentation │ │ │ │ │ - │ │ │ │ │ 4.33.4.2 │ │ │ │ │ │ │ │ │ │ mask │ │ │ │ │ │ │ │ │ │ int siscone::hash_cones::mask │ │ │ │ │ │ │ │ │ │ number of occupied cells │ │ │ │ │ number of cells-1 │ │ │ │ │ Definition at line 104 of file hash.h. │ │ │ │ │ Referenced by hash_cones(), insert(), insert(), and ∼hash_cones(). │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 168 │ │ │ │ │ + │ │ │ │ │ +Class Documentation │ │ │ │ │ │ │ │ │ │ 4.33.4.3 │ │ │ │ │ │ │ │ │ │ n_cones │ │ │ │ │ │ │ │ │ │ int siscone::hash_cones::n_cones │ │ │ │ │ │ │ │ │ │ @@ -11783,14 +11778,15 @@ │ │ │ │ │ │ │ │ │ │ double siscone::hash_cones::R2 │ │ │ │ │ │ │ │ │ │ circle radius (squared) NOTE: need to be set before any call to 'insert' │ │ │ │ │ Definition at line 108 of file hash.h. │ │ │ │ │ Referenced by hash_cones(), and is_inside(). │ │ │ │ │ The documentation for this class was generated from the following files: │ │ │ │ │ + │ │ │ │ │ • siscone/hash.h │ │ │ │ │ • siscone/hash.cpp │ │ │ │ │ │ │ │ │ │ 4.34 │ │ │ │ │ │ │ │ │ │ siscone::hash_element Class Reference │ │ │ │ │ │ │ │ │ │ @@ -11844,62 +11840,57 @@ │ │ │ │ │ │ │ │ │ │ eta │ │ │ │ │ │ │ │ │ │ double siscone::hash_element::eta │ │ │ │ │ │ │ │ │ │ centre: eta coordinate │ │ │ │ │ Definition at line 48 of file hash.h. │ │ │ │ │ -Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert(). │ │ │ │ │ │ │ │ │ │ 4.34.2.2 │ │ │ │ │ │ │ │ │ │ is_stable │ │ │ │ │ │ │ │ │ │ bool siscone::hash_element::is_stable │ │ │ │ │ │ │ │ │ │ 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(). │ │ │ │ │ │ │ │ │ │ 4.34.2.3 │ │ │ │ │ │ │ │ │ │ next │ │ │ │ │ │ │ │ │ │ hash_element∗ siscone::hash_element::next │ │ │ │ │ │ │ │ │ │ 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(). │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ 170 │ │ │ │ │ │ │ │ │ │ Class Documentation │ │ │ │ │ │ │ │ │ │ 4.34.2.4 │ │ │ │ │ │ │ │ │ │ phi │ │ │ │ │ │ │ │ │ │ double siscone::hash_element::phi │ │ │ │ │ │ │ │ │ │ centre: phi coordinate │ │ │ │ │ Definition at line 49 of file hash.h. │ │ │ │ │ -Referenced by siscone::hash_cones::insert(), and siscone::hash_cones::insert(). │ │ │ │ │ │ │ │ │ │ 4.34.2.5 │ │ │ │ │ │ │ │ │ │ ref │ │ │ │ │ │ │ │ │ │ Creference siscone::hash_element::ref │ │ │ │ │ │ │ │ │ │ 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: │ │ │ │ │ - │ │ │ │ │ • siscone/hash.h │ │ │ │ │ │ │ │ │ │ 4.35 │ │ │ │ │ │ │ │ │ │ siscone::ranlux_state_t Struct Reference │ │ │ │ │ │ │ │ │ │ Public Attributes │ │ │ │ │ @@ -11923,25 +11914,25 @@ │ │ │ │ │ 4.35.2.1 │ │ │ │ │ │ │ │ │ │ carry │ │ │ │ │ │ │ │ │ │ unsigned int siscone::ranlux_state_t::carry │ │ │ │ │ │ │ │ │ │ Definition at line 51 of file ranlux.cpp. │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 4.35 siscone::ranlux_state_t Struct Reference │ │ │ │ │ │ │ │ │ │ 4.35.2.2 │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │ │ │ │ │ │ unsigned int siscone::ranlux_state_t::i │ │ │ │ │ │ │ │ │ │ Definition at line 47 of file ranlux.cpp. │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 4.36 siscone_spherical::sph_hash_cones Class Reference │ │ │ │ │ │ │ │ │ │ 4.35.2.3 │ │ │ │ │ │ │ │ │ │ j │ │ │ │ │ │ │ │ │ │ unsigned int siscone::ranlux_state_t::j │ │ │ │ │ │ │ │ │ │ @@ -11970,29 +11961,30 @@ │ │ │ │ │ unsigned long int siscone::ranlux_state_t::u[24] │ │ │ │ │ │ │ │ │ │ Definition at line 52 of file ranlux.cpp. │ │ │ │ │ The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ • siscone/ranlux.cpp │ │ │ │ │ │ │ │ │ │ +4.36 │ │ │ │ │ + │ │ │ │ │ +siscone_spherical::sph_hash_cones Class Reference │ │ │ │ │ + │ │ │ │ │ +list of cones candidates. │ │ │ │ │ + │ │ │ │ │ +#include │ │ │ │ │ + │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ 171 │ │ │ │ │ │ │ │ │ │ 172 │ │ │ │ │ │ │ │ │ │ Class Documentation │ │ │ │ │ │ │ │ │ │ -4.36 │ │ │ │ │ - │ │ │ │ │ -siscone_spherical::sph_hash_cones Class Reference │ │ │ │ │ - │ │ │ │ │ -list of cones candidates. │ │ │ │ │ - │ │ │ │ │ -#include │ │ │ │ │ Collaboration diagram for siscone_spherical::sph_hash_cones: │ │ │ │ │ │ │ │ │ │ siscone::Creference │ │ │ │ │ ref │ │ │ │ │ siscone_spherical:: │ │ │ │ │ CSph3vector │ │ │ │ │ centre │ │ │ │ │ @@ -12018,29 +12010,31 @@ │ │ │ │ │ │ │ │ │ │ Public Attributes │ │ │ │ │ • sph_hash_element ∗∗ hash_array │ │ │ │ │ the cone data itself │ │ │ │ │ │ │ │ │ │ • int n_cones │ │ │ │ │ number of elements │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 4.36 siscone_spherical::sph_hash_cones Class Reference │ │ │ │ │ │ │ │ │ │ • int mask │ │ │ │ │ number of occupied cells │ │ │ │ │ │ │ │ │ │ • double R2 │ │ │ │ │ circle radius (squared) NOTE: need to be set before any call to 'insert' │ │ │ │ │ │ │ │ │ │ • double tan2R │ │ │ │ │ its squreed tangent │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 4.36 siscone_spherical::sph_hash_cones Class Reference │ │ │ │ │ │ │ │ │ │ 4.36.1 │ │ │ │ │ │ │ │ │ │ +173 │ │ │ │ │ + │ │ │ │ │ Detailed Description │ │ │ │ │ │ │ │ │ │ list of cones candidates. │ │ │ │ │ We store in this class all the hash_elements and give functions to manipulate them. │ │ │ │ │ Definition at line 61 of file hash.h. │ │ │ │ │ │ │ │ │ │ 4.36.2 │ │ │ │ │ @@ -12064,14 +12058,15 @@ │ │ │ │ │ │ │ │ │ │ cone radius │ │ │ │ │ │ │ │ │ │ Definition at line 49 of file hash.cpp. │ │ │ │ │ References hash_array, mask, n_cones, and tan2R. │ │ │ │ │ │ │ │ │ │ 4.36.2.2 ∼sph_hash_cones() │ │ │ │ │ + │ │ │ │ │ siscone_spherical::sph_hash_cones::∼sph_hash_cones ( ) │ │ │ │ │ │ │ │ │ │ destructor │ │ │ │ │ Definition at line 80 of file hash.cpp. │ │ │ │ │ References hash_array, mask, and siscone_spherical::sph_hash_element::next. │ │ │ │ │ │ │ │ │ │ 4.36.3 │ │ │ │ │ @@ -12082,29 +12077,26 @@ │ │ │ │ │ │ │ │ │ │ insert() [1/2] │ │ │ │ │ │ │ │ │ │ int siscone_spherical::sph_hash_cones::insert ( │ │ │ │ │ CSphmomentum ∗ v ) │ │ │ │ │ │ │ │ │ │ insert a new candidate into the hash. │ │ │ │ │ +Parameters │ │ │ │ │ +v │ │ │ │ │ │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ +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 │ │ │ │ │ │ │ │ │ │ -173 │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ 174 │ │ │ │ │ │ │ │ │ │ Class Documentation │ │ │ │ │ │ │ │ │ │ -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 169 of file hash.cpp. │ │ │ │ │ References siscone_spherical::sph_hash_element::centre, hash_array, siscone_spherical::sph_hash_element::is_stable, │ │ │ │ │ mask, n_cones, siscone_spherical::sph_hash_element::next, siscone::Creference::ref, and siscone_spherical::CSph3vector::ref. │ │ │ │ │ │ │ │ │ │ @@ -12137,14 +12129,15 @@ │ │ │ │ │ │ │ │ │ │ c_io │ │ │ │ │ │ │ │ │ │ whether the child has to belong to the cone or not │ │ │ │ │ │ │ │ │ │ Returns │ │ │ │ │ 0 on success, 1 on error │ │ │ │ │ + │ │ │ │ │ Definition at line 105 of file hash.cpp. │ │ │ │ │ References siscone_spherical::sph_hash_element::centre, hash_array, siscone_spherical::sph_hash_element::is_stable, │ │ │ │ │ mask, n_cones, siscone_spherical::sph_hash_element::next, siscone::Creference::ref, siscone_spherical::CSph3vector::ref, │ │ │ │ │ and tan2R. │ │ │ │ │ │ │ │ │ │ 4.36.4 │ │ │ │ │ │ │ │ │ │ @@ -12155,14 +12148,15 @@ │ │ │ │ │ hash_array │ │ │ │ │ │ │ │ │ │ sph_hash_element∗∗ siscone_spherical::sph_hash_cones::hash_array │ │ │ │ │ │ │ │ │ │ the cone data itself │ │ │ │ │ Definition at line 91 of file hash.h. │ │ │ │ │ Referenced by insert(), insert(), sph_hash_cones(), and ∼sph_hash_cones(). │ │ │ │ │ + │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ 4.36 siscone_spherical::sph_hash_cones Class Reference │ │ │ │ │ │ │ │ │ │ 4.36.4.2 │ │ │ │ │ │ │ │ │ │ mask │ │ │ │ │ @@ -15575,3122 +15569,14 @@ │ │ │ │ │ 00125 #endif │ │ │ │ │ 00126 │ │ │ │ │ 00127 #endif // __DEFINES_H__ │ │ │ │ │ 00128 │ │ │ │ │ │ │ │ │ │ 5.16 │ │ │ │ │ │ │ │ │ │ -geom_2d.cpp │ │ │ │ │ - │ │ │ │ │ -00001 │ │ │ │ │ -00002 // File: geom_2d.cpp │ │ │ │ │ -// │ │ │ │ │ -00003 // Description: source file for two-dimensional geometry tools │ │ │ │ │ -// │ │ │ │ │ -00004 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00006 // │ │ │ │ │ -// │ │ │ │ │ -00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00008 // │ │ │ │ │ -// │ │ │ │ │ -00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00012 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00013 // │ │ │ │ │ -// │ │ │ │ │ -00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00017 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00018 // │ │ │ │ │ -// │ │ │ │ │ -00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00020 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00022 // │ │ │ │ │ -// │ │ │ │ │ -00023 // $Revision:: 171 │ │ │ │ │ -$// │ │ │ │ │ -00024 // $Date:: 2007-06-19 16:26:05 +0200 (Tue, 19 Jun 2007) │ │ │ │ │ -$// │ │ │ │ │ -00026 │ │ │ │ │ -00027 #include "geom_2d.h" │ │ │ │ │ -00028 #include │ │ │ │ │ -00029 │ │ │ │ │ -00030 namespace siscone{ │ │ │ │ │ -00031 │ │ │ │ │ -00032 #define PHI_RANGE_MASK 0xFFFFFFFF │ │ │ │ │ -00033 │ │ │ │ │ -00034 /********************************************************* │ │ │ │ │ -00035 * class Ceta_phi_range implementation │ │ │ │ │ -* │ │ │ │ │ -00036 * class for holding a covering range in eta-phi │ │ │ │ │ -* │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.16 geom_2d.cpp │ │ │ │ │ - │ │ │ │ │ -00037 * │ │ │ │ │ -* │ │ │ │ │ -00038 * This class deals with ranges in the eta-phi plane. It * │ │ │ │ │ -00039 * implements methods to test if two ranges overlap and * │ │ │ │ │ -00040 * to take the union of two overlapping intervals. │ │ │ │ │ -* │ │ │ │ │ -00041 *********************************************************/ │ │ │ │ │ -00042 │ │ │ │ │ -00043 using namespace std; │ │ │ │ │ -00044 │ │ │ │ │ -00045 // static member default init │ │ │ │ │ -00046 //---------------------------00047 double Ceta_phi_range::eta_min = -100.0; │ │ │ │ │ -00048 double Ceta_phi_range::eta_max = 100.0; │ │ │ │ │ -00049 │ │ │ │ │ -00050 // default ctor │ │ │ │ │ -00051 //-------------00052 Ceta_phi_range::Ceta_phi_range(){ │ │ │ │ │ -00053 │ │ │ │ │ -eta_range = 0; │ │ │ │ │ -00054 │ │ │ │ │ -phi_range = 0; │ │ │ │ │ -00055 } │ │ │ │ │ -00056 │ │ │ │ │ -00057 // ctor with initialisation │ │ │ │ │ -00058 // we initialise with a centre (in eta,phi) and a radius │ │ │ │ │ -00059 // - c_eta │ │ │ │ │ -eta coordinate of the centre │ │ │ │ │ -00060 // - c_phi │ │ │ │ │ -phi coordinate of the centre │ │ │ │ │ -00061 // - R │ │ │ │ │ -radius │ │ │ │ │ -00062 //------------------------------------------------------00063 Ceta_phi_range::Ceta_phi_range(double c_eta, double c_phi, double R){ │ │ │ │ │ -00064 │ │ │ │ │ -// determination of the eta range │ │ │ │ │ -00065 │ │ │ │ │ -//------------------------------00066 │ │ │ │ │ -double xmin = max(c_eta-R,eta_min+0.0001); │ │ │ │ │ -00067 │ │ │ │ │ -double xmax = min(c_eta+R,eta_max-0.0001); │ │ │ │ │ -00068 │ │ │ │ │ -00069 │ │ │ │ │ -unsigned int cell_min = get_eta_cell(xmin); │ │ │ │ │ -00070 │ │ │ │ │ -unsigned int cell_max = get_eta_cell(xmax); │ │ │ │ │ -00071 │ │ │ │ │ -00072 │ │ │ │ │ -// warning: if cell_max==2^31, 2*cell_max==0 hence, │ │ │ │ │ -00073 │ │ │ │ │ -// even if the next formula is formally (2*cell_max-cell_min), │ │ │ │ │ -00074 │ │ │ │ │ -// expressing it as (cell_max-cell_min)+cell_max is safe. │ │ │ │ │ -00075 │ │ │ │ │ -eta_range = (cell_max-cell_min)+cell_max; │ │ │ │ │ -00076 │ │ │ │ │ -00077 │ │ │ │ │ -// determination of the phi range │ │ │ │ │ -00078 │ │ │ │ │ -// !! taking care of periodicity !! │ │ │ │ │ -00079 │ │ │ │ │ -//--------------------------------00080 │ │ │ │ │ -xmin = phi_in_range(c_phi-R); │ │ │ │ │ -00081 │ │ │ │ │ -xmax = phi_in_range(c_phi+R); │ │ │ │ │ -00082 │ │ │ │ │ -00083 │ │ │ │ │ -cell_min = get_phi_cell(xmin); │ │ │ │ │ -00084 │ │ │ │ │ -cell_max = get_phi_cell(xmax); │ │ │ │ │ -00085 │ │ │ │ │ -00086 │ │ │ │ │ -// Also, if the interval goes through pi, inversion is needed │ │ │ │ │ -00087 │ │ │ │ │ -if (xmax>xmin) │ │ │ │ │ -00088 │ │ │ │ │ -phi_range = (cell_max-cell_min)+cell_max; │ │ │ │ │ -00089 │ │ │ │ │ -else { │ │ │ │ │ -00090 │ │ │ │ │ -phi_range = (cell_min==cell_max) │ │ │ │ │ -00091 │ │ │ │ │ -? PHI_RANGE_MASK │ │ │ │ │ -00092 │ │ │ │ │ -: ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max); │ │ │ │ │ -00093 │ │ │ │ │ -} │ │ │ │ │ -00094 } │ │ │ │ │ -00095 │ │ │ │ │ -00096 // assignment of range │ │ │ │ │ -00097 // - r │ │ │ │ │ -range to assign to current one │ │ │ │ │ -00098 //--------------------------------------00099 Ceta_phi_range& Ceta_phi_range::operator = (const Ceta_phi_range &r){ │ │ │ │ │ -00100 │ │ │ │ │ -eta_range = r.eta_range; │ │ │ │ │ -00101 │ │ │ │ │ -phi_range = r.phi_range; │ │ │ │ │ -00102 │ │ │ │ │ -00103 │ │ │ │ │ -return *this; │ │ │ │ │ -00104 } │ │ │ │ │ -00105 │ │ │ │ │ -00106 // add a particle to the range │ │ │ │ │ -00107 // - eta eta coordinate of the particle │ │ │ │ │ -00108 // - phi phi coordinate of the particle │ │ │ │ │ -00109 // \return 0 on success, 1 on error │ │ │ │ │ -00110 //---------------------------------------00111 int Ceta_phi_range::add_particle(const double eta, const double phi){ │ │ │ │ │ -00112 │ │ │ │ │ -// deal with the eta coordinate │ │ │ │ │ -00113 │ │ │ │ │ -eta_range |= get_eta_cell(eta); │ │ │ │ │ -00114 │ │ │ │ │ -00115 │ │ │ │ │ -// deal with the phi coordinate │ │ │ │ │ -00116 │ │ │ │ │ -phi_range |= get_phi_cell(phi); │ │ │ │ │ -00117 │ │ │ │ │ -00118 │ │ │ │ │ -return 0; │ │ │ │ │ -00119 } │ │ │ │ │ -00120 │ │ │ │ │ -00121 │ │ │ │ │ -00122 // test overlap │ │ │ │ │ -00123 // - r1 first range │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -203 │ │ │ │ │ - │ │ │ │ │ - 204 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00124 // - r2 second range │ │ │ │ │ -00125 // return true if overlap, false otherwise. │ │ │ │ │ -00126 //-----------------------------------------00127 bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2){ │ │ │ │ │ -00128 │ │ │ │ │ -// check overlap in eta AND phi │ │ │ │ │ -00129 │ │ │ │ │ -return ((r1.eta_range & r2.eta_range) && (r1.phi_range & r2.phi_range)); │ │ │ │ │ -00130 } │ │ │ │ │ -00131 │ │ │ │ │ -00132 // compute union │ │ │ │ │ -00133 // Note: we assume that the two intervals overlap │ │ │ │ │ -00134 // - r1 first range │ │ │ │ │ -00135 // - r2 second range │ │ │ │ │ -00136 // \return union of the two ranges │ │ │ │ │ -00137 //-----------------------------------------00138 const Ceta_phi_range range_union (const Ceta_phi_range &r1, const Ceta_phi_range &r2){ │ │ │ │ │ -00139 │ │ │ │ │ -Ceta_phi_range tmp; │ │ │ │ │ -00140 │ │ │ │ │ -00141 │ │ │ │ │ -// compute union in eta │ │ │ │ │ -00142 │ │ │ │ │ -tmp.eta_range = r1.eta_range | r2.eta_range; │ │ │ │ │ -00143 │ │ │ │ │ -00144 │ │ │ │ │ -// compute union in phi │ │ │ │ │ -00145 │ │ │ │ │ -tmp.phi_range = r1.phi_range | r2.phi_range; │ │ │ │ │ -00146 │ │ │ │ │ -00147 │ │ │ │ │ -return tmp; │ │ │ │ │ -00148 } │ │ │ │ │ -00149 │ │ │ │ │ -00150 } │ │ │ │ │ - │ │ │ │ │ -5.17 │ │ │ │ │ - │ │ │ │ │ -geom_2d.cpp │ │ │ │ │ - │ │ │ │ │ -00001 │ │ │ │ │ -00002 // File: geom_2d.cpp │ │ │ │ │ -// │ │ │ │ │ -00003 // Description: source file for two-dimensional geometry tools │ │ │ │ │ -// │ │ │ │ │ -00004 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00005 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ -// │ │ │ │ │ -00006 // │ │ │ │ │ -an adaptation to spherical coordinates │ │ │ │ │ -// │ │ │ │ │ -00007 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00008 // │ │ │ │ │ -// │ │ │ │ │ -00009 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ -00010 // │ │ │ │ │ -// │ │ │ │ │ -00011 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00012 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00013 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00014 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00015 // │ │ │ │ │ -// │ │ │ │ │ -00016 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00019 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00020 // │ │ │ │ │ -// │ │ │ │ │ -00021 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00022 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00024 // │ │ │ │ │ -// │ │ │ │ │ -00025 // $Revision:: 378 │ │ │ │ │ -$// │ │ │ │ │ -00026 // $Date:: 2016-02-24 15:10:38 +0100 (Wed, 24 Feb 2016) │ │ │ │ │ -$// │ │ │ │ │ -00028 │ │ │ │ │ -00029 #include "geom_2d.h" │ │ │ │ │ -00030 #include │ │ │ │ │ -00031 │ │ │ │ │ -00032 namespace siscone_spherical{ │ │ │ │ │ -00033 │ │ │ │ │ -00034 #define PHI_RANGE_MASK 0xFFFFFFFF │ │ │ │ │ -00035 │ │ │ │ │ -00036 /********************************************************* │ │ │ │ │ -00037 * class CSphtheta_phi_range implementation │ │ │ │ │ -* │ │ │ │ │ -00038 * class for holding a covering range in eta-phi │ │ │ │ │ -* │ │ │ │ │ -00039 * │ │ │ │ │ -* │ │ │ │ │ -00040 * This class deals with ranges in the eta-phi plane. It * │ │ │ │ │ -00041 * implements methods to test if two ranges overlap and * │ │ │ │ │ -00042 * to take the union of two overlapping intervals. │ │ │ │ │ -* │ │ │ │ │ -00043 *********************************************************/ │ │ │ │ │ -00044 │ │ │ │ │ -00045 using namespace std; │ │ │ │ │ -00046 │ │ │ │ │ -00047 // static member default init │ │ │ │ │ -00048 //---------------------------00049 double CSphtheta_phi_range::theta_min = 0.0; │ │ │ │ │ -00050 double CSphtheta_phi_range::theta_max = M_PI; │ │ │ │ │ -00051 │ │ │ │ │ -00052 // default ctor │ │ │ │ │ -00053 //-------------00054 CSphtheta_phi_range::CSphtheta_phi_range(){ │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.17 geom_2d.cpp │ │ │ │ │ - │ │ │ │ │ -00055 │ │ │ │ │ -theta_range = 0; │ │ │ │ │ -00056 │ │ │ │ │ -phi_range = 0; │ │ │ │ │ -00057 } │ │ │ │ │ -00058 │ │ │ │ │ -00059 // ctor with initialisation │ │ │ │ │ -00060 // we initialise with a centre (in eta,phi) and a radius │ │ │ │ │ -00061 // - c_theta theta coordinate of the centre │ │ │ │ │ -00062 // - c_phi │ │ │ │ │ -phi coordinate of the centre │ │ │ │ │ -00063 // - R │ │ │ │ │ -radius │ │ │ │ │ -00064 //------------------------------------------------------00065 CSphtheta_phi_range::CSphtheta_phi_range(double c_theta, double c_phi, double R){ │ │ │ │ │ -00066 │ │ │ │ │ -// determination of the eta range │ │ │ │ │ -00067 │ │ │ │ │ -//------------------------------00068 │ │ │ │ │ -double xmin = max(c_theta-R,theta_min+0.00001); │ │ │ │ │ -00069 │ │ │ │ │ -double xmax = min(c_theta+R,theta_max-0.00001); │ │ │ │ │ -00070 │ │ │ │ │ -00071 │ │ │ │ │ -unsigned int cell_min = get_theta_cell(xmin); │ │ │ │ │ -00072 │ │ │ │ │ -unsigned int cell_max = get_theta_cell(xmax); │ │ │ │ │ -00073 │ │ │ │ │ -00074 │ │ │ │ │ -// warning: if cell_max==2^31, 2*cell_max==0 hence, │ │ │ │ │ -00075 │ │ │ │ │ -// even if the next formula is formally (2*cell_max-cell_min), │ │ │ │ │ -00076 │ │ │ │ │ -// expressing it as (cell_max-cell_min)+cell_max is safe. │ │ │ │ │ -00077 │ │ │ │ │ -theta_range = (cell_max-cell_min)+cell_max; │ │ │ │ │ -00078 │ │ │ │ │ -00079 │ │ │ │ │ -// determination of the phi range │ │ │ │ │ -00080 │ │ │ │ │ -// !! taking care of periodicity !! │ │ │ │ │ -00081 │ │ │ │ │ -// !! and the theta dependence │ │ │ │ │ -!! │ │ │ │ │ -00082 │ │ │ │ │ -//--------------------------------00083 │ │ │ │ │ -double ymin,ymax; │ │ │ │ │ -00084 │ │ │ │ │ -double extra = asin(R/M_PI); │ │ │ │ │ -00085 │ │ │ │ │ -// if the theta range comes too close to the endpoints (theta=0 or │ │ │ │ │ -00086 │ │ │ │ │ -// theta=pi), then keep the full phi range │ │ │ │ │ -00087 │ │ │ │ │ -if (xmin<=theta_min+extra){ │ │ │ │ │ -00088 │ │ │ │ │ -ymin = -M_PI+0.00001; │ │ │ │ │ -00089 │ │ │ │ │ -ymax = M_PI-0.00001; │ │ │ │ │ -00090 │ │ │ │ │ -} else if (xmax>=theta_max-extra){ │ │ │ │ │ -00091 │ │ │ │ │ -ymin = -M_PI+0.00001; │ │ │ │ │ -00092 │ │ │ │ │ -ymax = M_PI-0.00001; │ │ │ │ │ -00093 │ │ │ │ │ -} else { │ │ │ │ │ -00094 │ │ │ │ │ -extra = max(1.0/sin(xmin), 1.0/sin(xmax)); │ │ │ │ │ -00095 │ │ │ │ │ -ymin = (c_phi-R)*extra; │ │ │ │ │ -00096 │ │ │ │ │ -while (ymin<-M_PI) ymin+=twopi; │ │ │ │ │ -00097 │ │ │ │ │ -while (ymin> M_PI) ymin-=twopi; │ │ │ │ │ -00098 │ │ │ │ │ -ymax = (c_phi-R)*extra; │ │ │ │ │ -00099 │ │ │ │ │ -while (ymax<-M_PI) ymax+=twopi; │ │ │ │ │ -00100 │ │ │ │ │ -while (ymax> M_PI) ymax-=twopi; │ │ │ │ │ -00101 │ │ │ │ │ -} │ │ │ │ │ -00102 │ │ │ │ │ -cell_min = get_phi_cell(ymin); │ │ │ │ │ -00103 │ │ │ │ │ -cell_max = get_phi_cell(ymax); │ │ │ │ │ -00104 │ │ │ │ │ -00105 │ │ │ │ │ -// Also, if the interval goes through pi, inversion is needed │ │ │ │ │ -00106 │ │ │ │ │ -if (ymax>ymin) │ │ │ │ │ -00107 │ │ │ │ │ -phi_range = (cell_max-cell_min)+cell_max; │ │ │ │ │ -00108 │ │ │ │ │ -else { │ │ │ │ │ -00109 │ │ │ │ │ -phi_range = (cell_min==cell_max) │ │ │ │ │ -00110 │ │ │ │ │ -? PHI_RANGE_MASK │ │ │ │ │ -00111 │ │ │ │ │ -: ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max); │ │ │ │ │ -00112 │ │ │ │ │ -} │ │ │ │ │ -00113 } │ │ │ │ │ -00114 │ │ │ │ │ -00115 // assignment of range │ │ │ │ │ -00116 // - r │ │ │ │ │ -range to assign to current one │ │ │ │ │ -00117 //--------------------------------------00118 CSphtheta_phi_range& CSphtheta_phi_range::operator = (const CSphtheta_phi_range &r){ │ │ │ │ │ -00119 │ │ │ │ │ -theta_range = r.theta_range; │ │ │ │ │ -00120 │ │ │ │ │ -phi_range = r.phi_range; │ │ │ │ │ -00121 │ │ │ │ │ -00122 │ │ │ │ │ -return *this; │ │ │ │ │ -00123 } │ │ │ │ │ -00124 │ │ │ │ │ -00125 // add a particle to the range │ │ │ │ │ -00126 // - eta eta coordinate of the particle │ │ │ │ │ -00127 // - phi phi coordinate of the particle │ │ │ │ │ -00128 // \return 0 on success, 1 on error │ │ │ │ │ -00129 //---------------------------------------00130 int CSphtheta_phi_range::add_particle(const double theta, const double phi){ │ │ │ │ │ -00131 │ │ │ │ │ -// get the theta cell │ │ │ │ │ -00132 │ │ │ │ │ -unsigned int theta_cell = get_theta_cell(theta); │ │ │ │ │ -00133 │ │ │ │ │ -00134 │ │ │ │ │ -// deal with the eta coordinate │ │ │ │ │ -00135 │ │ │ │ │ -theta_range |= theta_cell; │ │ │ │ │ -00136 │ │ │ │ │ -00137 │ │ │ │ │ -// deal with the phi coordinate │ │ │ │ │ -00138 │ │ │ │ │ -// │ │ │ │ │ -00139 │ │ │ │ │ -// watch out: if the theta_cell includes theta==0 or theta==pi, │ │ │ │ │ -00140 │ │ │ │ │ -// incude the full phi range │ │ │ │ │ -00141 │ │ │ │ │ -if ((theta_cell == 0x1) || (theta_cell == 0x80000000)) │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -205 │ │ │ │ │ - │ │ │ │ │ - 206 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00142 │ │ │ │ │ -phi_range = 0xffffffff; │ │ │ │ │ -00143 │ │ │ │ │ -else │ │ │ │ │ -00144 │ │ │ │ │ -phi_range |= get_phi_cell(phi); │ │ │ │ │ -00145 │ │ │ │ │ -00146 │ │ │ │ │ -return 0; │ │ │ │ │ -00147 } │ │ │ │ │ -00148 │ │ │ │ │ -00149 │ │ │ │ │ -00150 // test overlap │ │ │ │ │ -00151 // - r1 first range │ │ │ │ │ -00152 // - r2 second range │ │ │ │ │ -00153 // return true if overlap, false otherwise. │ │ │ │ │ -00154 //-----------------------------------------00155 bool is_range_overlap(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){ │ │ │ │ │ -00156 │ │ │ │ │ -// check overlap in eta AND phi │ │ │ │ │ -00157 │ │ │ │ │ -return ((r1.theta_range & r2.theta_range) && (r1.phi_range & r2.phi_range)); │ │ │ │ │ -00158 } │ │ │ │ │ -00159 │ │ │ │ │ -00160 // compute union │ │ │ │ │ -00161 // Note: we assume that the two intervals overlap │ │ │ │ │ -00162 // - r1 first range │ │ │ │ │ -00163 // - r2 second range │ │ │ │ │ -00164 // \return union of the two ranges │ │ │ │ │ -00165 //-----------------------------------------00166 const CSphtheta_phi_range range_union (const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){ │ │ │ │ │ -00167 │ │ │ │ │ -CSphtheta_phi_range tmp; │ │ │ │ │ -00168 │ │ │ │ │ -00169 │ │ │ │ │ -// compute union in eta │ │ │ │ │ -00170 │ │ │ │ │ -tmp.theta_range = r1.theta_range | r2.theta_range; │ │ │ │ │ -00171 │ │ │ │ │ -00172 │ │ │ │ │ -// compute union in phi │ │ │ │ │ -00173 │ │ │ │ │ -tmp.phi_range = r1.phi_range | r2.phi_range; │ │ │ │ │ -00174 │ │ │ │ │ -00175 │ │ │ │ │ -return tmp; │ │ │ │ │ -00176 } │ │ │ │ │ -00177 │ │ │ │ │ -00178 } │ │ │ │ │ - │ │ │ │ │ -5.18 │ │ │ │ │ - │ │ │ │ │ -geom_2d.h │ │ │ │ │ - │ │ │ │ │ -00001 // -*- C++ -*00003 // File: geom_2d.h │ │ │ │ │ -// │ │ │ │ │ -00004 // Description: header file for two-dimensional geometry tools │ │ │ │ │ -// │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00007 // │ │ │ │ │ -// │ │ │ │ │ -00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00009 // │ │ │ │ │ -// │ │ │ │ │ -00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00013 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00014 // │ │ │ │ │ -// │ │ │ │ │ -00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00018 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00019 // │ │ │ │ │ -// │ │ │ │ │ -00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00021 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00023 // │ │ │ │ │ -// │ │ │ │ │ -00024 // $Revision:: 422 │ │ │ │ │ -$// │ │ │ │ │ -00025 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020) │ │ │ │ │ -$// │ │ │ │ │ -00027 │ │ │ │ │ -00028 #ifndef __GEOM_2D_H__ │ │ │ │ │ -00029 #define __GEOM_2D_H__ │ │ │ │ │ -00030 │ │ │ │ │ -00031 #include │ │ │ │ │ -00032 #include │ │ │ │ │ -00033 #include "defines.h" │ │ │ │ │ -00034 │ │ │ │ │ -00035 #ifndef M_PI │ │ │ │ │ -00036 #define M_PI 3.141592653589793238462643383279502884197 │ │ │ │ │ -00037 #endif │ │ │ │ │ -00038 │ │ │ │ │ -00039 namespace siscone{ │ │ │ │ │ -00040 │ │ │ │ │ -00043 inline double phi_in_range(double phi) { │ │ │ │ │ -00044 │ │ │ │ │ -if │ │ │ │ │ -(phi <= -M_PI) phi += twopi; │ │ │ │ │ -00045 │ │ │ │ │ -else if (phi > │ │ │ │ │ -M_PI) phi -= twopi; │ │ │ │ │ -00046 │ │ │ │ │ -return phi; │ │ │ │ │ -00047 } │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.19 geom_2d.h │ │ │ │ │ - │ │ │ │ │ -207 │ │ │ │ │ - │ │ │ │ │ -00048 │ │ │ │ │ -00052 inline double dphi(double phi1, double phi2) { │ │ │ │ │ -00053 │ │ │ │ │ -return phi_in_range(phi1-phi2); │ │ │ │ │ -00054 } │ │ │ │ │ -00055 │ │ │ │ │ -00056 │ │ │ │ │ -00060 inline double abs_dphi(double phi1, double phi2) { │ │ │ │ │ -00061 │ │ │ │ │ -double delta = fabs(phi1-phi2); │ │ │ │ │ -00062 │ │ │ │ │ -return delta > M_PI ? twopi-delta : delta; │ │ │ │ │ -00063 } │ │ │ │ │ -00064 │ │ │ │ │ -00066 inline double pow2(double x) {return x*x;} │ │ │ │ │ -00067 │ │ │ │ │ -00068 │ │ │ │ │ -00073 class Ctwovect { │ │ │ │ │ -00074 public: │ │ │ │ │ -00076 │ │ │ │ │ -Ctwovect() : x(0.0), y(0.0) {} │ │ │ │ │ -00077 │ │ │ │ │ -00081 │ │ │ │ │ -Ctwovect(double _x, double _y) : x(_x), y(_y) {} │ │ │ │ │ -00082 │ │ │ │ │ -00084 │ │ │ │ │ -double x, y; │ │ │ │ │ -00085 │ │ │ │ │ -00087 │ │ │ │ │ -inline double mod2() const {return pow2(x)+pow2(y);} │ │ │ │ │ -00088 │ │ │ │ │ -00090 │ │ │ │ │ -inline double modulus() const {return sqrt(mod2());} │ │ │ │ │ -00091 }; │ │ │ │ │ -00092 │ │ │ │ │ -00093 │ │ │ │ │ -00098 inline double dot_product(const Ctwovect & a, const Ctwovect & b) { │ │ │ │ │ -00099 │ │ │ │ │ -return a.x*b.x + a.y*b.y; │ │ │ │ │ -00100 } │ │ │ │ │ -00101 │ │ │ │ │ -00102 │ │ │ │ │ -00107 inline double cross_product(const Ctwovect & a, const Ctwovect & b) { │ │ │ │ │ -00108 │ │ │ │ │ -return a.x*b.y - a.y*b.x; │ │ │ │ │ -00109 } │ │ │ │ │ -00110 │ │ │ │ │ -00111 │ │ │ │ │ -00120 class Ceta_phi_range{ │ │ │ │ │ -00121 public: │ │ │ │ │ -00123 │ │ │ │ │ -Ceta_phi_range(); │ │ │ │ │ -00124 │ │ │ │ │ -00130 │ │ │ │ │ -Ceta_phi_range(double c_eta, double c_phi, double R); │ │ │ │ │ -00131 │ │ │ │ │ -00134 │ │ │ │ │ -Ceta_phi_range& operator = (const Ceta_phi_range &r); │ │ │ │ │ -00135 │ │ │ │ │ -00140 │ │ │ │ │ -int add_particle(const double eta, const double phi); │ │ │ │ │ -00141 │ │ │ │ │ -00143 │ │ │ │ │ -unsigned int eta_range; │ │ │ │ │ -00144 │ │ │ │ │ -00146 │ │ │ │ │ -unsigned int phi_range; │ │ │ │ │ -00147 │ │ │ │ │ -00148 │ │ │ │ │ -// extremal value for eta │ │ │ │ │ -00149 │ │ │ │ │ -static double eta_min; │ │ │ │ │ -00150 │ │ │ │ │ -static double eta_max; │ │ │ │ │ -00151 │ │ │ │ │ -00152 private: │ │ │ │ │ -00154 │ │ │ │ │ -inline unsigned int get_eta_cell(double eta){ │ │ │ │ │ -00155 │ │ │ │ │ -return (unsigned int) (1u « ((int) (32*((eta-eta_min)/(eta_max-eta_min))))); │ │ │ │ │ -00156 │ │ │ │ │ -} │ │ │ │ │ -00157 │ │ │ │ │ -00159 │ │ │ │ │ -inline unsigned int get_phi_cell(double phi){ │ │ │ │ │ -00160 │ │ │ │ │ -return (unsigned int) (1u « ((int) (32*phi/twopi+16)%32)); │ │ │ │ │ -00161 │ │ │ │ │ -} │ │ │ │ │ -00162 }; │ │ │ │ │ -00163 │ │ │ │ │ -00168 bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2); │ │ │ │ │ -00169 │ │ │ │ │ -00175 const Ceta_phi_range range_union(const Ceta_phi_range &r1, const Ceta_phi_range &r2); │ │ │ │ │ -00176 │ │ │ │ │ -00177 } │ │ │ │ │ -00178 │ │ │ │ │ -00179 #endif │ │ │ │ │ - │ │ │ │ │ -5.19 │ │ │ │ │ - │ │ │ │ │ -geom_2d.h │ │ │ │ │ - │ │ │ │ │ -00001 // -*- C++ -*00003 // File: geom_2d.h │ │ │ │ │ -00004 // Description: header file for two-dimensional geometry tools │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -00006 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ -00007 // │ │ │ │ │ -an adaptation to spherical coordinates │ │ │ │ │ -00008 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ - 208 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00009 // │ │ │ │ │ -// │ │ │ │ │ -00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00011 // │ │ │ │ │ -// │ │ │ │ │ -00012 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00013 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00014 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00015 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00016 // │ │ │ │ │ -// │ │ │ │ │ -00017 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00020 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00021 // │ │ │ │ │ -// │ │ │ │ │ -00022 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00023 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00025 // │ │ │ │ │ -// │ │ │ │ │ -00026 // $Revision:: 422 │ │ │ │ │ -$// │ │ │ │ │ -00027 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020) │ │ │ │ │ -$// │ │ │ │ │ -00029 │ │ │ │ │ -00030 #ifndef __SPH_GEOM_2D_H__ │ │ │ │ │ -00031 #define __SPH_GEOM_2D_H__ │ │ │ │ │ -00032 │ │ │ │ │ -00033 #include │ │ │ │ │ -00034 #include │ │ │ │ │ -00035 #include │ │ │ │ │ -00036 #include │ │ │ │ │ -00037 │ │ │ │ │ -00038 #ifndef M_PI │ │ │ │ │ -00039 #define M_PI 3.141592653589793238462643383279502884197 │ │ │ │ │ -00040 #endif │ │ │ │ │ -00041 │ │ │ │ │ -00042 namespace siscone_spherical{ │ │ │ │ │ -00043 │ │ │ │ │ -00052 class CSphtheta_phi_range{ │ │ │ │ │ -00053 public: │ │ │ │ │ -00055 │ │ │ │ │ -CSphtheta_phi_range(); │ │ │ │ │ -00056 │ │ │ │ │ -00062 │ │ │ │ │ -CSphtheta_phi_range(double c_theta, double c_phi, double R); │ │ │ │ │ -00063 │ │ │ │ │ -00066 │ │ │ │ │ -CSphtheta_phi_range& operator = (const CSphtheta_phi_range &r); │ │ │ │ │ -00067 │ │ │ │ │ -00072 │ │ │ │ │ -int add_particle(const double theta, const double phi); │ │ │ │ │ -00073 │ │ │ │ │ -00075 │ │ │ │ │ -unsigned int theta_range; │ │ │ │ │ -00076 │ │ │ │ │ -00078 │ │ │ │ │ -unsigned int phi_range; │ │ │ │ │ -00079 │ │ │ │ │ -00081 │ │ │ │ │ -static double theta_min; │ │ │ │ │ -00082 │ │ │ │ │ -static double theta_max; │ │ │ │ │ -00083 │ │ │ │ │ -00084 private: │ │ │ │ │ -00086 │ │ │ │ │ -inline unsigned int get_theta_cell(double theta){ │ │ │ │ │ -00087 │ │ │ │ │ -if (theta>=theta_max) return 1u«31; │ │ │ │ │ -00088 │ │ │ │ │ -return (unsigned int) (1u « ((int) (32*((theta-theta_min)/(theta_max-theta_min))))); │ │ │ │ │ -00089 │ │ │ │ │ -} │ │ │ │ │ -00090 │ │ │ │ │ -00092 │ │ │ │ │ -inline unsigned int get_phi_cell(double phi){ │ │ │ │ │ -00093 │ │ │ │ │ -return (unsigned int) (1u « ((int) (32*phi/twopi+16)%32)); │ │ │ │ │ -00094 │ │ │ │ │ -} │ │ │ │ │ -00095 }; │ │ │ │ │ -00096 │ │ │ │ │ -00101 bool is_range_overlap(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2); │ │ │ │ │ -00102 │ │ │ │ │ -00108 const CSphtheta_phi_range range_union(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2); │ │ │ │ │ -00109 │ │ │ │ │ -00110 } │ │ │ │ │ -00111 │ │ │ │ │ -00112 #endif │ │ │ │ │ - │ │ │ │ │ -5.20 │ │ │ │ │ - │ │ │ │ │ -quadtree.cpp │ │ │ │ │ - │ │ │ │ │ -00001 │ │ │ │ │ -00002 // File: quadtree.cpp │ │ │ │ │ -00003 // Description: source file for quadtree management (Cquadtree class) │ │ │ │ │ -00004 // This file is part of the SISCone project. │ │ │ │ │ -00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -00006 // │ │ │ │ │ -00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -00008 // │ │ │ │ │ -00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.20 quadtree.cpp │ │ │ │ │ - │ │ │ │ │ -00012 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00013 // │ │ │ │ │ -// │ │ │ │ │ -00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00017 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00018 // │ │ │ │ │ -// │ │ │ │ │ -00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00020 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00022 // │ │ │ │ │ -// │ │ │ │ │ -00023 // $Revision:: 320 │ │ │ │ │ -$// │ │ │ │ │ -00024 // $Date:: 2011-11-15 09:54:50 +0100 (Tue, 15 Nov 2011) │ │ │ │ │ -$// │ │ │ │ │ -00026 │ │ │ │ │ -00027 #include "quadtree.h" │ │ │ │ │ -00028 #include │ │ │ │ │ -00029 #include │ │ │ │ │ -00030 #include │ │ │ │ │ -00031 │ │ │ │ │ -00032 namespace siscone{ │ │ │ │ │ -00033 │ │ │ │ │ -00034 using namespace std; │ │ │ │ │ -00035 │ │ │ │ │ -00036 /******************************************************************* │ │ │ │ │ -00037 * Cquadtree implementation │ │ │ │ │ -* │ │ │ │ │ -00038 * Implementation of a 2D quadtree. │ │ │ │ │ -* │ │ │ │ │ -00039 * This class implements the traditional two-dimensional quadtree. * │ │ │ │ │ -00040 * The elements at each node are of ’Cmomentum’ type. │ │ │ │ │ -* │ │ │ │ │ -00041 *******************************************************************/ │ │ │ │ │ -00042 │ │ │ │ │ -00043 // default ctor │ │ │ │ │ -00044 //-------------00045 Cquadtree::Cquadtree(){ │ │ │ │ │ -00046 │ │ │ │ │ -v = NULL; │ │ │ │ │ -00047 │ │ │ │ │ -00048 │ │ │ │ │ -children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL; │ │ │ │ │ -00049 │ │ │ │ │ -has_child = false; │ │ │ │ │ -00050 } │ │ │ │ │ -00051 │ │ │ │ │ -00052 │ │ │ │ │ -00053 // ctor with initialisation (see init for details) │ │ │ │ │ -00054 //-------------------------00055 Cquadtree::Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y){ │ │ │ │ │ -00056 │ │ │ │ │ -v = NULL; │ │ │ │ │ -00057 │ │ │ │ │ -00058 │ │ │ │ │ -children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL; │ │ │ │ │ -00059 │ │ │ │ │ -has_child = false; │ │ │ │ │ -00060 │ │ │ │ │ -00061 │ │ │ │ │ -init(_x, _y, _half_size_x, _half_size_y); │ │ │ │ │ -00062 } │ │ │ │ │ -00063 │ │ │ │ │ -00064 │ │ │ │ │ -00065 // default destructor │ │ │ │ │ -00066 // at destruction, everything is destroyed except │ │ │ │ │ -00067 // physical values at the leaves │ │ │ │ │ -00068 //-----------------------------------------------00069 Cquadtree::~Cquadtree(){ │ │ │ │ │ -00070 │ │ │ │ │ -if (has_child){ │ │ │ │ │ -00071 │ │ │ │ │ -if (v!=NULL) delete v; │ │ │ │ │ -00072 │ │ │ │ │ -delete children[0][0]; │ │ │ │ │ -00073 │ │ │ │ │ -delete children[0][1]; │ │ │ │ │ -00074 │ │ │ │ │ -delete children[1][0]; │ │ │ │ │ -00075 │ │ │ │ │ -delete children[1][1]; │ │ │ │ │ -00076 │ │ │ │ │ -} │ │ │ │ │ -00077 } │ │ │ │ │ -00078 │ │ │ │ │ -00079 │ │ │ │ │ -00080 /* │ │ │ │ │ -00081 * init the tree. │ │ │ │ │ -00082 * By initializing the tree, we mean setting the cell parameters │ │ │ │ │ -00083 * and preparing the object to act as a seed for a new tree. │ │ │ │ │ -00084 * - _x │ │ │ │ │ -x-position of the center │ │ │ │ │ -00085 * - _y │ │ │ │ │ -y-position of the center │ │ │ │ │ -00086 * - half_size_x half x-size of the cell │ │ │ │ │ -00087 * - half_size_y half y-size of the cell │ │ │ │ │ -00088 * return 0 on success, 1 on error. Note that if the cell │ │ │ │ │ -00089 * │ │ │ │ │ -is already filled, we return an error. │ │ │ │ │ -00090 ******************************************************************/ │ │ │ │ │ -00091 int Cquadtree::init(double _x, double _y, double _half_size_x, double _half_size_y){ │ │ │ │ │ -00092 │ │ │ │ │ -if (v!=NULL) │ │ │ │ │ -00093 │ │ │ │ │ -return 1; │ │ │ │ │ -00094 │ │ │ │ │ -00095 │ │ │ │ │ -centre_x = _x; │ │ │ │ │ -00096 │ │ │ │ │ -centre_y = _y; │ │ │ │ │ -00097 │ │ │ │ │ -half_size_x = _half_size_x; │ │ │ │ │ -00098 │ │ │ │ │ -half_size_y = _half_size_y; │ │ │ │ │ -00099 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -209 │ │ │ │ │ - │ │ │ │ │ - 210 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00100 │ │ │ │ │ -return 0; │ │ │ │ │ -00101 } │ │ │ │ │ -00102 │ │ │ │ │ -00103 │ │ │ │ │ -00104 /* │ │ │ │ │ -00105 * adding a particle to the tree. │ │ │ │ │ -00106 * This method adds one vector to the quadtree structure which │ │ │ │ │ -00107 * is updated consequently. │ │ │ │ │ -00108 * - v │ │ │ │ │ -vector to add │ │ │ │ │ -00109 * return 0 on success 1 on error │ │ │ │ │ -00110 ******************************************************************/ │ │ │ │ │ -00111 int Cquadtree::add(Cmomentum *v_add){ │ │ │ │ │ -00112 │ │ │ │ │ -// Description of the method: │ │ │ │ │ -00113 │ │ │ │ │ -// -------------------------00114 │ │ │ │ │ -// the addition process goes as follows: │ │ │ │ │ -00115 │ │ │ │ │ -// 1. check if the cell is empty, in which case, add the particle │ │ │ │ │ -00116 │ │ │ │ │ -// │ │ │ │ │ -here and leave. │ │ │ │ │ -00117 │ │ │ │ │ -// 2. If there is a unique particle already inside, │ │ │ │ │ -00118 │ │ │ │ │ -// │ │ │ │ │ -(a) create children │ │ │ │ │ -00119 │ │ │ │ │ -// │ │ │ │ │ -(b) forward the existing particle to the appropriate child │ │ │ │ │ -00120 │ │ │ │ │ -// 3. Add current particle to this cell and forward to the │ │ │ │ │ -00121 │ │ │ │ │ -// │ │ │ │ │ -adequate child │ │ │ │ │ -00122 │ │ │ │ │ -// NOTE: we assume in the whole procedure that the particle is │ │ │ │ │ -00123 │ │ │ │ │ -// │ │ │ │ │ -indeed inside the cell ! │ │ │ │ │ -00124 │ │ │ │ │ -00125 │ │ │ │ │ -// step 1: the case of empty cells │ │ │ │ │ -00126 │ │ │ │ │ -if (v==NULL){ │ │ │ │ │ -00127 │ │ │ │ │ -v = v_add; │ │ │ │ │ -00128 │ │ │ │ │ -return 0; │ │ │ │ │ -00129 │ │ │ │ │ -} │ │ │ │ │ -00130 │ │ │ │ │ -00131 │ │ │ │ │ -// step 2: additional work if 1! particle already present │ │ │ │ │ -00132 │ │ │ │ │ -// │ │ │ │ │ -we use the fact that only 1-particle systems have no child │ │ │ │ │ -00133 │ │ │ │ │ -if (!has_child){ │ │ │ │ │ -00134 │ │ │ │ │ -double new_half_size_x = 0.5*half_size_x; │ │ │ │ │ -00135 │ │ │ │ │ -double new_half_size_y = 0.5*half_size_y; │ │ │ │ │ -00136 │ │ │ │ │ -// create children │ │ │ │ │ -00137 │ │ │ │ │ -children[0][0] = new Cquadtree(centre_x-new_half_size_x, centre_y-new_half_size_y, │ │ │ │ │ -00138 │ │ │ │ │ -new_half_size_x, new_half_size_y); │ │ │ │ │ -00139 │ │ │ │ │ -children[0][1] = new Cquadtree(centre_x-new_half_size_x, centre_y+new_half_size_y, │ │ │ │ │ -00140 │ │ │ │ │ -new_half_size_x, new_half_size_y); │ │ │ │ │ -00141 │ │ │ │ │ -children[1][0] = new Cquadtree(centre_x+new_half_size_x, centre_y-new_half_size_y, │ │ │ │ │ -00142 │ │ │ │ │ -new_half_size_x, new_half_size_y); │ │ │ │ │ -00143 │ │ │ │ │ -children[1][1] = new Cquadtree(centre_x+new_half_size_x, centre_y+new_half_size_y, │ │ │ │ │ -00144 │ │ │ │ │ -new_half_size_x, new_half_size_y); │ │ │ │ │ -00145 │ │ │ │ │ -00146 │ │ │ │ │ -has_child = true; │ │ │ │ │ -00147 │ │ │ │ │ -00148 │ │ │ │ │ -// forward to child │ │ │ │ │ -00149 │ │ │ │ │ -//? The following line assumes ’true’==1 and ’false’==0 │ │ │ │ │ -00150 │ │ │ │ │ -// Note: v being a single particle, eta and phi are correct │ │ │ │ │ -00151 │ │ │ │ │ -children[v->eta>centre_x][v->phi>centre_y]->add(v); │ │ │ │ │ -00152 │ │ │ │ │ -00153 │ │ │ │ │ -// copy physical params │ │ │ │ │ -00154 │ │ │ │ │ -v = new Cmomentum(*v); │ │ │ │ │ -00155 │ │ │ │ │ -} │ │ │ │ │ -00156 │ │ │ │ │ -00157 │ │ │ │ │ -// step 3: add new particle │ │ │ │ │ -00158 │ │ │ │ │ -// Note: v_add being a single particle, eta and phi are correct │ │ │ │ │ -00159 │ │ │ │ │ -children[v_add->eta>centre_x][v_add->phi>centre_y]->add(v_add); │ │ │ │ │ -00160 │ │ │ │ │ -*v+=*v_add; │ │ │ │ │ -00161 │ │ │ │ │ -00162 │ │ │ │ │ -return 0; │ │ │ │ │ -00163 } │ │ │ │ │ -00164 │ │ │ │ │ -00165 │ │ │ │ │ -00166 /* │ │ │ │ │ -00167 * circle intersection. │ │ │ │ │ -00168 * computes the intersection with a circle of given centre and radius. │ │ │ │ │ -00169 * The output takes the form of a quadtree with all squares included │ │ │ │ │ -00170 * in the circle. │ │ │ │ │ -00171 * - cx │ │ │ │ │ -circle centre x coordinate │ │ │ │ │ -00172 * - cy │ │ │ │ │ -circle centre y coordinate │ │ │ │ │ -00173 * - cR2 │ │ │ │ │ -circle radius SQUARED │ │ │ │ │ -00174 * return the checksum for the intersection │ │ │ │ │ -00175 ******************************************************************/ │ │ │ │ │ -00176 Creference Cquadtree::circle_intersect(double cx, double cy, double cR2){ │ │ │ │ │ -00177 │ │ │ │ │ -// Description of the method: │ │ │ │ │ -00178 │ │ │ │ │ -// -------------------------00179 │ │ │ │ │ -// 1. check if cell is empty => no intersection │ │ │ │ │ -00180 │ │ │ │ │ -// 2. if cell has 1! particle, check if it is inside the circle. │ │ │ │ │ -00181 │ │ │ │ │ -// │ │ │ │ │ -If yes, add it and return, if not simply return. │ │ │ │ │ -00182 │ │ │ │ │ -// 3. check if the circle intersects the square. If not, return. │ │ │ │ │ -00183 │ │ │ │ │ -// 4. check if the square is inside the circle. │ │ │ │ │ -00184 │ │ │ │ │ -// │ │ │ │ │ -If yes, add it to qt and return. │ │ │ │ │ -00185 │ │ │ │ │ -// 5. check intersections with children. │ │ │ │ │ -00186 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.20 quadtree.cpp │ │ │ │ │ - │ │ │ │ │ -00187 │ │ │ │ │ -// step 1: if there is no particle inside te square, no reason to go further │ │ │ │ │ -00188 │ │ │ │ │ -if (v==NULL) │ │ │ │ │ -00189 │ │ │ │ │ -return Creference(); │ │ │ │ │ -00190 │ │ │ │ │ -00191 │ │ │ │ │ -double dx, dy; │ │ │ │ │ -00192 │ │ │ │ │ -00193 │ │ │ │ │ -// step 2: if there is only one particle inside the square, test if it is in │ │ │ │ │ -00194 │ │ │ │ │ -// │ │ │ │ │ -the circle, in which case return associated reference │ │ │ │ │ -00195 │ │ │ │ │ -if (!has_child){ │ │ │ │ │ -00196 │ │ │ │ │ -// compute the distance │ │ │ │ │ -00197 │ │ │ │ │ -// Note: v has only one particle => eta and phi are defined │ │ │ │ │ -00198 │ │ │ │ │ -dx = cx - v->eta; │ │ │ │ │ -00199 │ │ │ │ │ -dy = fabs(cy - v->phi); │ │ │ │ │ -00200 │ │ │ │ │ -if (dy>M_PI) │ │ │ │ │ -00201 │ │ │ │ │ -dy -= 2.0*M_PI; │ │ │ │ │ -00202 │ │ │ │ │ -00203 │ │ │ │ │ -// test distance │ │ │ │ │ -00204 │ │ │ │ │ -if (dx*dx+dy*dyref; │ │ │ │ │ -00206 │ │ │ │ │ -} │ │ │ │ │ -00207 │ │ │ │ │ -00208 │ │ │ │ │ -return Creference(); │ │ │ │ │ -00209 │ │ │ │ │ -} │ │ │ │ │ -00210 │ │ │ │ │ -00211 │ │ │ │ │ -// step 3: check if there is an intersection │ │ │ │ │ -00212 │ │ │ │ │ -//double ryp, rym; │ │ │ │ │ -00213 │ │ │ │ │ -double dx_c, dy_c; │ │ │ │ │ -00214 │ │ │ │ │ -00215 │ │ │ │ │ -// store distance with the centre of the square │ │ │ │ │ -00216 │ │ │ │ │ -dx_c = fabs(cx-centre_x); │ │ │ │ │ -00217 │ │ │ │ │ -dy_c = fabs(cy-centre_y); │ │ │ │ │ -00218 │ │ │ │ │ -if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c; │ │ │ │ │ -00219 │ │ │ │ │ -00220 │ │ │ │ │ -// compute (minimal) the distance (pay attention to the periodicity in phi). │ │ │ │ │ -00221 │ │ │ │ │ -dx = dx_c-half_size_x; │ │ │ │ │ -00222 │ │ │ │ │ -if (dx<0) dx=0; │ │ │ │ │ -00223 │ │ │ │ │ -dy = dy_c-half_size_y; │ │ │ │ │ -00224 │ │ │ │ │ -if (dy<0) dy=0; │ │ │ │ │ -00225 │ │ │ │ │ -00226 │ │ │ │ │ -// check the distance │ │ │ │ │ -00227 │ │ │ │ │ -if (dx*dx+dy*dy>=cR2){ │ │ │ │ │ -00228 │ │ │ │ │ -// no intersection │ │ │ │ │ -00229 │ │ │ │ │ -return Creference(); │ │ │ │ │ -00230 │ │ │ │ │ -} │ │ │ │ │ -00231 │ │ │ │ │ -00232 │ │ │ │ │ -// step 4: check if included │ │ │ │ │ -00233 │ │ │ │ │ -00234 │ │ │ │ │ -// compute the (maximal) distance │ │ │ │ │ -00235 │ │ │ │ │ -dx = dx_c+half_size_x; │ │ │ │ │ -00236 │ │ │ │ │ -dy = dy_c+half_size_y; │ │ │ │ │ -00237 │ │ │ │ │ -if (dy>M_PI) dy = M_PI; │ │ │ │ │ -00238 │ │ │ │ │ -00239 │ │ │ │ │ -// compute the distance │ │ │ │ │ -00240 │ │ │ │ │ -if (dx*dx+dy*dyref; │ │ │ │ │ -00242 │ │ │ │ │ -} │ │ │ │ │ -00243 │ │ │ │ │ -00244 │ │ │ │ │ -// step 5: the square is not fully in. Recurse to children │ │ │ │ │ -00245 │ │ │ │ │ -return children[0][0]->circle_intersect(cx, cy, cR2) │ │ │ │ │ -00246 │ │ │ │ │ -+ children[0][1]->circle_intersect(cx, cy, cR2) │ │ │ │ │ -00247 │ │ │ │ │ -+ children[1][0]->circle_intersect(cx, cy, cR2) │ │ │ │ │ -00248 │ │ │ │ │ -+ children[1][1]->circle_intersect(cx, cy, cR2); │ │ │ │ │ -00249 } │ │ │ │ │ -00250 │ │ │ │ │ -00251 │ │ │ │ │ -00252 /* │ │ │ │ │ -00253 * output a data file for drawing the grid. │ │ │ │ │ -00254 * This can be used to output a data file containing all the │ │ │ │ │ -00255 * grid subdivisions. The file contents is as follows: │ │ │ │ │ -00256 * first and second columns give center of the cell, the third │ │ │ │ │ -00257 * gives the size. │ │ │ │ │ -00258 * - flux opened stream to write to │ │ │ │ │ -00259 * return 0 on success, 1 on error │ │ │ │ │ -00260 ******************************************************************/ │ │ │ │ │ -00261 int Cquadtree::save(FILE *flux){ │ │ │ │ │ -00262 │ │ │ │ │ -00263 │ │ │ │ │ -if (flux==NULL) │ │ │ │ │ -00264 │ │ │ │ │ -return 1; │ │ │ │ │ -00265 │ │ │ │ │ -00266 │ │ │ │ │ -if (has_child){ │ │ │ │ │ -00267 │ │ │ │ │ -fprintf(flux, "%e\t%e\t%e\t%e\n", centre_x, centre_y, half_size_x, half_size_y); │ │ │ │ │ -00268 │ │ │ │ │ -children[0][0]->save(flux); │ │ │ │ │ -00269 │ │ │ │ │ -children[0][1]->save(flux); │ │ │ │ │ -00270 │ │ │ │ │ -children[1][0]->save(flux); │ │ │ │ │ -00271 │ │ │ │ │ -children[1][1]->save(flux); │ │ │ │ │ -00272 │ │ │ │ │ -} │ │ │ │ │ -00273 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -211 │ │ │ │ │ - │ │ │ │ │ - 212 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00274 │ │ │ │ │ -return 0; │ │ │ │ │ -00275 } │ │ │ │ │ -00276 │ │ │ │ │ -00277 │ │ │ │ │ -00278 /* │ │ │ │ │ -00279 * output a data file for drawing the tree leaves. │ │ │ │ │ -00280 * This can be used to output a data file containing all the │ │ │ │ │ -00281 * tree leaves. The file contents is as follows: │ │ │ │ │ -00282 * first and second columns give center of the cell, the third │ │ │ │ │ -00283 * gives the size. │ │ │ │ │ -00284 * - flux opened stream to write to │ │ │ │ │ -00285 * return 0 on success, 1 on error │ │ │ │ │ -00286 ******************************************************************/ │ │ │ │ │ -00287 int Cquadtree::save_leaves(FILE *flux){ │ │ │ │ │ -00288 │ │ │ │ │ -00289 │ │ │ │ │ -if (flux==NULL) │ │ │ │ │ -00290 │ │ │ │ │ -return 1; │ │ │ │ │ -00291 │ │ │ │ │ -00292 │ │ │ │ │ -if (has_child){ │ │ │ │ │ -00293 │ │ │ │ │ -if (children[0][0]!=NULL) children[0][0]->save_leaves(flux); │ │ │ │ │ -00294 │ │ │ │ │ -if (children[0][1]!=NULL) children[0][1]->save_leaves(flux); │ │ │ │ │ -00295 │ │ │ │ │ -if (children[1][0]!=NULL) children[1][0]->save_leaves(flux); │ │ │ │ │ -00296 │ │ │ │ │ -if (children[1][1]!=NULL) children[1][1]->save_leaves(flux); │ │ │ │ │ -00297 │ │ │ │ │ -} else { │ │ │ │ │ -00298 │ │ │ │ │ -fprintf(flux, "%e\t%e\t%e\t%e\n", centre_x, centre_y, half_size_x, half_size_y); │ │ │ │ │ -00299 │ │ │ │ │ -} │ │ │ │ │ -00300 │ │ │ │ │ -00301 │ │ │ │ │ -return 0; │ │ │ │ │ -00302 } │ │ │ │ │ -00303 │ │ │ │ │ -00304 } │ │ │ │ │ - │ │ │ │ │ -5.21 │ │ │ │ │ - │ │ │ │ │ -quadtree.h │ │ │ │ │ - │ │ │ │ │ -00001 // -*- C++ -*00003 // File: quadtree.h │ │ │ │ │ -// │ │ │ │ │ -00004 // Description: header file for quadtree management (Cquadtree class) │ │ │ │ │ -// │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00007 // │ │ │ │ │ -// │ │ │ │ │ -00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00009 // │ │ │ │ │ -// │ │ │ │ │ -00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00013 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00014 // │ │ │ │ │ -// │ │ │ │ │ -00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00018 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00019 // │ │ │ │ │ -// │ │ │ │ │ -00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00021 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00023 // │ │ │ │ │ -// │ │ │ │ │ -00024 // $Revision:: 123 │ │ │ │ │ -$// │ │ │ │ │ -00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ -$// │ │ │ │ │ -00027 │ │ │ │ │ -00028 #ifndef __QUADTREE_H__ │ │ │ │ │ -00029 #define __QUADTREE_H__ │ │ │ │ │ -00030 │ │ │ │ │ -00031 #include "momentum.h" │ │ │ │ │ -00032 #include │ │ │ │ │ -00033 │ │ │ │ │ -00034 namespace siscone{ │ │ │ │ │ -00035 │ │ │ │ │ -00043 class Cquadtree{ │ │ │ │ │ -00044 public: │ │ │ │ │ -00046 │ │ │ │ │ -Cquadtree(); │ │ │ │ │ -00047 │ │ │ │ │ -00049 │ │ │ │ │ -Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y); │ │ │ │ │ -00050 │ │ │ │ │ -00054 │ │ │ │ │ -~Cquadtree(); │ │ │ │ │ -00055 │ │ │ │ │ -00067 │ │ │ │ │ -int init(double _x, double _y, double _half_size_x, double _half_size_y); │ │ │ │ │ -00068 │ │ │ │ │ -00076 │ │ │ │ │ -int add(Cmomentum *v_add); │ │ │ │ │ -00077 │ │ │ │ │ -00088 │ │ │ │ │ -Creference circle_intersect(double cx, double cy, double cR2); │ │ │ │ │ -00089 │ │ │ │ │ -00099 │ │ │ │ │ -int save(FILE *flux); │ │ │ │ │ -00100 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.22 ranlux.cpp │ │ │ │ │ - │ │ │ │ │ -00110 │ │ │ │ │ -int save_leaves(FILE *flux); │ │ │ │ │ -00111 │ │ │ │ │ -00112 │ │ │ │ │ -double centre_x; │ │ │ │ │ -00113 │ │ │ │ │ -double centre_y; │ │ │ │ │ -00114 │ │ │ │ │ -double half_size_x; │ │ │ │ │ -00115 │ │ │ │ │ -double half_size_y; │ │ │ │ │ -00116 │ │ │ │ │ -00117 │ │ │ │ │ -Cmomentum *v; │ │ │ │ │ -00118 │ │ │ │ │ -00119 │ │ │ │ │ -Cquadtree* children[2][2]; │ │ │ │ │ -00120 │ │ │ │ │ -bool has_child; │ │ │ │ │ -00121 }; │ │ │ │ │ -00122 │ │ │ │ │ -00123 } │ │ │ │ │ -00124 #endif │ │ │ │ │ - │ │ │ │ │ -5.22 │ │ │ │ │ - │ │ │ │ │ -ranlux.cpp │ │ │ │ │ - │ │ │ │ │ -00001 // file: ranlux.xpp │ │ │ │ │ -00002 #include "ranlux.h" │ │ │ │ │ -00003 #include │ │ │ │ │ -00004 #include │ │ │ │ │ -00005 │ │ │ │ │ -00006 /* This is a lagged fibonacci generator with skipping developed by Luescher. │ │ │ │ │ -00007 │ │ │ │ │ -The sequence is a series of 24-bit integers, x_n, │ │ │ │ │ -00008 │ │ │ │ │ -00009 │ │ │ │ │ -x_n = d_n + b_n │ │ │ │ │ -00010 │ │ │ │ │ -00011 │ │ │ │ │ -where d_n = x_{n-10} - x_{n-24} - c_{n-1}, b_n = 0 if d_n >= 0 and │ │ │ │ │ -00012 │ │ │ │ │ -b_n = 2^24 if d_n < 0, c_n = 0 if d_n >= 0 and c_n = 1 if d_n < 0, │ │ │ │ │ -00013 │ │ │ │ │ -where after 24 samples a group of p integers are "skipped", to │ │ │ │ │ -00014 │ │ │ │ │ -reduce correlations. By default p = 199, but can be increased to │ │ │ │ │ -00015 │ │ │ │ │ -365. │ │ │ │ │ -00016 │ │ │ │ │ -00017 │ │ │ │ │ -The period of the generator is around 10^171. │ │ │ │ │ -00018 │ │ │ │ │ -00019 │ │ │ │ │ -From: M. Luescher, "A portable high-quality random number generator │ │ │ │ │ -00020 │ │ │ │ │ -for lattice field theory calculations", Computer Physics │ │ │ │ │ -00021 │ │ │ │ │ -Communications, 79 (1994) 100-110. │ │ │ │ │ -00022 │ │ │ │ │ -00023 │ │ │ │ │ -Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/ │ │ │ │ │ -00024 │ │ │ │ │ -00025 │ │ │ │ │ -See also, │ │ │ │ │ -00026 │ │ │ │ │ -00027 │ │ │ │ │ -F. James, "RANLUX: A Fortran implementation of the high-quality │ │ │ │ │ -00028 │ │ │ │ │ -pseudo-random number generator of Luscher", Computer Physics │ │ │ │ │ -00029 │ │ │ │ │ -Communications, 79 (1994) 111-114 │ │ │ │ │ -00030 │ │ │ │ │ -00031 │ │ │ │ │ -Kenneth G. Hamilton, F. James, "Acceleration of RANLUX", Computer │ │ │ │ │ -00032 │ │ │ │ │ -Physics Communications, 101 (1997) 241-248 │ │ │ │ │ -00033 │ │ │ │ │ -00034 │ │ │ │ │ -Kenneth G. Hamilton, "Assembler RANLUX for PCs", Computer Physics │ │ │ │ │ -00035 │ │ │ │ │ -Communications, 101 (1997) 249-253 */ │ │ │ │ │ -00036 │ │ │ │ │ -00037 namespace siscone{ │ │ │ │ │ -00038 │ │ │ │ │ -00039 static const unsigned long int mask_lo = 0x00ffffffUL; // 2^24 - 1 │ │ │ │ │ -00040 static const unsigned long int mask_hi = ~0x00ffffffUL; │ │ │ │ │ -00041 static const unsigned long int two24 = 16777216; │ │ │ │ │ -// 2^24 │ │ │ │ │ -00042 │ │ │ │ │ -00043 │ │ │ │ │ -00044 // internal generator structure │ │ │ │ │ -00045 //-----------------------------00046 typedef struct { │ │ │ │ │ -00047 │ │ │ │ │ -unsigned int i; │ │ │ │ │ -00048 │ │ │ │ │ -unsigned int j; │ │ │ │ │ -00049 │ │ │ │ │ -unsigned int n; │ │ │ │ │ -00050 │ │ │ │ │ -unsigned int skip; │ │ │ │ │ -00051 │ │ │ │ │ -unsigned int carry; │ │ │ │ │ -00052 │ │ │ │ │ -unsigned long int u[24]; │ │ │ │ │ -00053 } ranlux_state_t; │ │ │ │ │ -00054 │ │ │ │ │ -00055 │ │ │ │ │ -00056 // internal generator state │ │ │ │ │ -00057 //-------------------------00058 ranlux_state_t local_ranlux_state; │ │ │ │ │ -00059 │ │ │ │ │ -00060 │ │ │ │ │ -00061 // incrementation of the generator state │ │ │ │ │ -00062 //--------------------------------------00063 static inline unsigned long int increment_state(){ │ │ │ │ │ -00064 │ │ │ │ │ -unsigned int i = local_ranlux_state.i; │ │ │ │ │ -00065 │ │ │ │ │ -unsigned int j = local_ranlux_state.j; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -213 │ │ │ │ │ - │ │ │ │ │ - 214 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00066 │ │ │ │ │ -long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i] │ │ │ │ │ -00067 │ │ │ │ │ -- local_ranlux_state.carry; │ │ │ │ │ -00068 │ │ │ │ │ -00069 │ │ │ │ │ -if (delta & mask_hi){ │ │ │ │ │ -00070 │ │ │ │ │ -local_ranlux_state.carry = 1; │ │ │ │ │ -00071 │ │ │ │ │ -delta &= mask_lo; │ │ │ │ │ -00072 │ │ │ │ │ -} else { │ │ │ │ │ -00073 │ │ │ │ │ -local_ranlux_state.carry = 0; │ │ │ │ │ -00074 │ │ │ │ │ -} │ │ │ │ │ -00075 │ │ │ │ │ -00076 │ │ │ │ │ -local_ranlux_state.u[i] = delta; │ │ │ │ │ -00077 │ │ │ │ │ -00078 │ │ │ │ │ -if (i==0) │ │ │ │ │ -00079 │ │ │ │ │ -i = 23; │ │ │ │ │ -00080 │ │ │ │ │ -else │ │ │ │ │ -00081 │ │ │ │ │ -i--; │ │ │ │ │ -00082 │ │ │ │ │ -00083 │ │ │ │ │ -local_ranlux_state.i = i; │ │ │ │ │ -00084 │ │ │ │ │ -00085 │ │ │ │ │ -if (j == 0) │ │ │ │ │ -00086 │ │ │ │ │ -j = 23; │ │ │ │ │ -00087 │ │ │ │ │ -else │ │ │ │ │ -00088 │ │ │ │ │ -j--; │ │ │ │ │ -00089 │ │ │ │ │ -00090 │ │ │ │ │ -local_ranlux_state.j = j; │ │ │ │ │ -00091 │ │ │ │ │ -00092 │ │ │ │ │ -return delta; │ │ │ │ │ -00093 } │ │ │ │ │ -00094 │ │ │ │ │ -00095 │ │ │ │ │ -00096 // set generator state │ │ │ │ │ -00097 //--------------------00098 static void ranlux_set(unsigned long int s){ │ │ │ │ │ -00099 │ │ │ │ │ -int i; │ │ │ │ │ -00100 │ │ │ │ │ -long int seed; │ │ │ │ │ -00101 │ │ │ │ │ -00102 │ │ │ │ │ -if (s==0) │ │ │ │ │ -00103 │ │ │ │ │ -s = 314159265; │ │ │ │ │ -/* default seed is 314159265 */ │ │ │ │ │ -00104 │ │ │ │ │ -00105 │ │ │ │ │ -seed = s; │ │ │ │ │ -00106 │ │ │ │ │ -00107 │ │ │ │ │ -/* This is the initialization algorithm of F. James, widely in use │ │ │ │ │ -00108 │ │ │ │ │ -for RANLUX. */ │ │ │ │ │ -00109 │ │ │ │ │ -00110 │ │ │ │ │ -for (i=0;i<24;i++){ │ │ │ │ │ -00111 │ │ │ │ │ -unsigned long int k = seed/53668; │ │ │ │ │ -00112 │ │ │ │ │ -seed = 40014*(seed-k*53668)-k*12211; │ │ │ │ │ -00113 │ │ │ │ │ -if (seed<0){ │ │ │ │ │ -00114 │ │ │ │ │ -seed += 2147483563; │ │ │ │ │ -00115 │ │ │ │ │ -} │ │ │ │ │ -00116 │ │ │ │ │ -local_ranlux_state.u[i] = seed%two24; │ │ │ │ │ -00117 │ │ │ │ │ -} │ │ │ │ │ -00118 │ │ │ │ │ -00119 │ │ │ │ │ -local_ranlux_state.i = 23; │ │ │ │ │ -00120 │ │ │ │ │ -local_ranlux_state.j = 9; │ │ │ │ │ -00121 │ │ │ │ │ -local_ranlux_state.n = 0; │ │ │ │ │ -00122 │ │ │ │ │ -local_ranlux_state.skip = 389-24; // 389 => best decorrelation │ │ │ │ │ -00123 │ │ │ │ │ -00124 │ │ │ │ │ -if (local_ranlux_state.u[23]&mask_hi){ │ │ │ │ │ -00125 │ │ │ │ │ -local_ranlux_state.carry = 1; │ │ │ │ │ -00126 │ │ │ │ │ -} else { │ │ │ │ │ -00127 │ │ │ │ │ -local_ranlux_state.carry = 0; │ │ │ │ │ -00128 │ │ │ │ │ -} │ │ │ │ │ -00129 } │ │ │ │ │ -00130 │ │ │ │ │ -00131 │ │ │ │ │ -00132 // generator initialization │ │ │ │ │ -00133 //-------------------------00134 void ranlux_init(){ │ │ │ │ │ -00135 │ │ │ │ │ -// seed the generator │ │ │ │ │ -00136 │ │ │ │ │ -ranlux_set(0); │ │ │ │ │ -00137 } │ │ │ │ │ -00138 │ │ │ │ │ -00139 │ │ │ │ │ -00140 // get random number │ │ │ │ │ -00141 //------------------00142 unsigned long int ranlux_get(){ │ │ │ │ │ -00143 │ │ │ │ │ -const unsigned int skip = local_ranlux_state.skip; │ │ │ │ │ -00144 │ │ │ │ │ -unsigned long int r = increment_state(); │ │ │ │ │ -00145 │ │ │ │ │ -00146 │ │ │ │ │ -local_ranlux_state.n++; │ │ │ │ │ -00147 │ │ │ │ │ -00148 │ │ │ │ │ -if (local_ranlux_state.n == 24){ │ │ │ │ │ -00149 │ │ │ │ │ -unsigned int i; │ │ │ │ │ -00150 │ │ │ │ │ -local_ranlux_state.n = 0; │ │ │ │ │ -00151 │ │ │ │ │ -for (i = 0; i < skip; i++) │ │ │ │ │ -00152 │ │ │ │ │ -increment_state(); │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.23 siscone/ranlux.h File Reference │ │ │ │ │ - │ │ │ │ │ -215 │ │ │ │ │ - │ │ │ │ │ -00153 │ │ │ │ │ -} │ │ │ │ │ -00154 │ │ │ │ │ -00155 │ │ │ │ │ -return r; │ │ │ │ │ -00156 } │ │ │ │ │ -00157 │ │ │ │ │ -00158 // print generator state │ │ │ │ │ -00159 //----------------------00160 void ranlux_print_state(){ │ │ │ │ │ -00161 │ │ │ │ │ -size_t i; │ │ │ │ │ -00162 │ │ │ │ │ -unsigned char *p = (unsigned char *) (&local_ranlux_state); │ │ │ │ │ -00163 │ │ │ │ │ -const size_t n = sizeof (ranlux_state_t); │ │ │ │ │ -00164 │ │ │ │ │ -00165 │ │ │ │ │ -for (i=0;i= 0 and │ │ │ │ │ -00012 │ │ │ │ │ -b_n = 2^24 if d_n < 0, c_n = 0 if d_n >= 0 and c_n = 1 if d_n < 0, │ │ │ │ │ -00013 │ │ │ │ │ -where after 24 samples a group of p integers are "skipped", to │ │ │ │ │ -00014 │ │ │ │ │ -reduce correlations. By default p = 199, but can be increased to │ │ │ │ │ -00015 │ │ │ │ │ -365. │ │ │ │ │ -00016 │ │ │ │ │ -00017 │ │ │ │ │ -The period of the generator is around 10^171. │ │ │ │ │ -00018 │ │ │ │ │ -00019 │ │ │ │ │ -From: M. Luescher, "A portable high-quality random number generator │ │ │ │ │ -00020 │ │ │ │ │ -for lattice field theory calculations", Computer Physics │ │ │ │ │ -00021 │ │ │ │ │ -Communications, 79 (1994) 100-110. │ │ │ │ │ -00022 │ │ │ │ │ -00023 │ │ │ │ │ -Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/ │ │ │ │ │ -00024 │ │ │ │ │ -00025 │ │ │ │ │ -See also, │ │ │ │ │ -00026 │ │ │ │ │ -00027 │ │ │ │ │ -F. James, "RANLUX: A Fortran implementation of the high-quality │ │ │ │ │ -00028 │ │ │ │ │ -pseudo-random number generator of Luscher", Computer Physics │ │ │ │ │ -00029 │ │ │ │ │ -Communications, 79 (1994) 111-114 │ │ │ │ │ -00030 │ │ │ │ │ -00031 │ │ │ │ │ -Kenneth G. Hamilton, F. James, "Acceleration of RANLUX", Computer │ │ │ │ │ -00032 │ │ │ │ │ -Physics Communications, 101 (1997) 241-248 │ │ │ │ │ -00033 │ │ │ │ │ -00034 │ │ │ │ │ -Kenneth G. Hamilton, "Assembler RANLUX for PCs", Computer Physics │ │ │ │ │ -00035 │ │ │ │ │ -Communications, 101 (1997) 249-253 */ │ │ │ │ │ -00036 │ │ │ │ │ -00037 namespace siscone{ │ │ │ │ │ -00038 │ │ │ │ │ -00040 void ranlux_init(); │ │ │ │ │ -00041 │ │ │ │ │ -00043 unsigned long int ranlux_get(); │ │ │ │ │ -00044 │ │ │ │ │ -00046 void ranlux_print_state(); │ │ │ │ │ -00047 │ │ │ │ │ -00048 } │ │ │ │ │ -00049 #endif │ │ │ │ │ - │ │ │ │ │ -5.25 │ │ │ │ │ - │ │ │ │ │ -reference.cpp │ │ │ │ │ - │ │ │ │ │ -00001 │ │ │ │ │ -00002 // File: reference.cpp │ │ │ │ │ -00003 // Description: source file for checkxor management (Creference class) │ │ │ │ │ -00004 // This file is part of the SISCone project. │ │ │ │ │ -00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -00006 // │ │ │ │ │ -00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -00008 // │ │ │ │ │ -00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -00012 // (at your option) any later version. │ │ │ │ │ -00013 // │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.25 reference.cpp │ │ │ │ │ - │ │ │ │ │ -00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00017 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00018 // │ │ │ │ │ -// │ │ │ │ │ -00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00020 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00022 // │ │ │ │ │ -// │ │ │ │ │ -00023 // $Revision:: 311 │ │ │ │ │ -$// │ │ │ │ │ -00024 // $Date:: 2011-10-05 23:27:09 +0200 (Wed, 05 Oct 2011) │ │ │ │ │ -$// │ │ │ │ │ -00026 │ │ │ │ │ -00027 #include "reference.h" │ │ │ │ │ -00028 #include "ranlux.h" │ │ │ │ │ -00029 #include │ │ │ │ │ -00030 │ │ │ │ │ -00031 namespace siscone{ │ │ │ │ │ -00032 │ │ │ │ │ -00033 /******************************************************* │ │ │ │ │ -00034 * Creference implementation │ │ │ │ │ -* │ │ │ │ │ -00035 * references used for checksums. │ │ │ │ │ -* │ │ │ │ │ -00036 * │ │ │ │ │ -* │ │ │ │ │ -00037 * This class implements some reference variable │ │ │ │ │ -* │ │ │ │ │ -00038 * that can be used for checksums. Those checksums │ │ │ │ │ -* │ │ │ │ │ -00039 * are useful to disentengle between contents of two │ │ │ │ │ -* │ │ │ │ │ -00040 * cones without looking into their explicit particle * │ │ │ │ │ -00041 * contents. │ │ │ │ │ -* │ │ │ │ │ -00042 *******************************************************/ │ │ │ │ │ -00043 │ │ │ │ │ -00044 // default constructor │ │ │ │ │ -00046 Creference::Creference(){ │ │ │ │ │ -00047 │ │ │ │ │ -ref[0] = ref[1] = ref[2] = 0; │ │ │ │ │ -00048 } │ │ │ │ │ -00049 │ │ │ │ │ -00050 │ │ │ │ │ -//static unsigned int reference_bit = 1; │ │ │ │ │ -00051 │ │ │ │ │ -00052 // create a random reference │ │ │ │ │ -00053 //--------------------------00054 void Creference::randomize(){ │ │ │ │ │ -00055 // ref[0] = reference_bit; │ │ │ │ │ -00056 // ref[1] = 0; │ │ │ │ │ -00057 // ref[2] = 0; │ │ │ │ │ -00058 // reference_bit «= 1; │ │ │ │ │ -00059 │ │ │ │ │ -00060 │ │ │ │ │ -unsigned int r1 = ranlux_get(); │ │ │ │ │ -00061 │ │ │ │ │ -unsigned int r2 = ranlux_get(); │ │ │ │ │ -00062 │ │ │ │ │ -unsigned int r3 = ranlux_get(); │ │ │ │ │ -00063 │ │ │ │ │ -unsigned int r4 = ranlux_get(); │ │ │ │ │ -00064 │ │ │ │ │ -// since ranlux only produces 24 bits, take r4 and add 8 bits │ │ │ │ │ -00065 │ │ │ │ │ -// from it to each of r1,r2, r3 to get 3*32 bits. │ │ │ │ │ -00066 │ │ │ │ │ -ref[0] = r1+((r4 & 0x00ff0000) « 8); │ │ │ │ │ -00067 │ │ │ │ │ -ref[1] = r2+((r4 & 0x0000ff00) « 16); │ │ │ │ │ -00068 │ │ │ │ │ -ref[2] = r3+((r4 & 0x000000ff) « 24); │ │ │ │ │ -00069 │ │ │ │ │ -00070 │ │ │ │ │ -if (is_empty()) randomize(); │ │ │ │ │ -00071 } │ │ │ │ │ -00072 │ │ │ │ │ -00073 // test emptyness │ │ │ │ │ -00074 //---------------00075 bool Creference::is_empty(){ │ │ │ │ │ -00076 │ │ │ │ │ -return (ref[0]==0) && (ref[1]==0) && (ref[2]==0); │ │ │ │ │ -00077 } │ │ │ │ │ -00078 │ │ │ │ │ -00079 // test non-emptyness │ │ │ │ │ -00080 //-------------------00081 bool Creference::not_empty(){ │ │ │ │ │ -00082 │ │ │ │ │ -return (ref[0]!=0) || (ref[1]!=0) || (ref[2]!=0); │ │ │ │ │ -00083 } │ │ │ │ │ -00084 │ │ │ │ │ -00085 // assignment of reference │ │ │ │ │ -00086 //------------------------00087 Creference& Creference::operator = (const Creference &r){ │ │ │ │ │ -00088 │ │ │ │ │ -ref[0] = r.ref[0]; │ │ │ │ │ -00089 │ │ │ │ │ -ref[1] = r.ref[1]; │ │ │ │ │ -00090 │ │ │ │ │ -ref[2] = r.ref[2]; │ │ │ │ │ -00091 │ │ │ │ │ -return *this; │ │ │ │ │ -00092 } │ │ │ │ │ -00093 │ │ │ │ │ -00094 // addition of reference │ │ │ │ │ -00095 //----------------------00096 Creference Creference::operator + (const Creference &r){ │ │ │ │ │ -00097 │ │ │ │ │ -Creference tmp = *this; │ │ │ │ │ -00098 │ │ │ │ │ -return tmp+=r; │ │ │ │ │ -00099 } │ │ │ │ │ -00100 │ │ │ │ │ -00101 // incrementation of reference │ │ │ │ │ -00102 //----------------------------- │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -217 │ │ │ │ │ - │ │ │ │ │ - 218 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00103 Creference& Creference::operator += (const Creference &r){ │ │ │ │ │ -00104 │ │ │ │ │ -ref[0] ^= r.ref[0]; │ │ │ │ │ -00105 │ │ │ │ │ -ref[1] ^= r.ref[1]; │ │ │ │ │ -00106 │ │ │ │ │ -ref[2] ^= r.ref[2]; │ │ │ │ │ -00107 │ │ │ │ │ -return *this; │ │ │ │ │ -00108 } │ │ │ │ │ -00109 │ │ │ │ │ -00110 // decrementation of reference │ │ │ │ │ -00111 //----------------------------00112 Creference& Creference::operator -= (const Creference &r){ │ │ │ │ │ -00113 │ │ │ │ │ -ref[0] ^= r.ref[0]; │ │ │ │ │ -00114 │ │ │ │ │ -ref[1] ^= r.ref[1]; │ │ │ │ │ -00115 │ │ │ │ │ -ref[2] ^= r.ref[2]; │ │ │ │ │ -00116 │ │ │ │ │ -return *this; │ │ │ │ │ -00117 } │ │ │ │ │ -00118 │ │ │ │ │ -00119 } │ │ │ │ │ -00120 │ │ │ │ │ - │ │ │ │ │ -5.26 │ │ │ │ │ - │ │ │ │ │ -reference.h │ │ │ │ │ - │ │ │ │ │ -00001 // -*- C++ -*00003 // File: reference.h │ │ │ │ │ -// │ │ │ │ │ -00004 // Description: header file for checkxor management (Creference class) │ │ │ │ │ -// │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00007 // │ │ │ │ │ -// │ │ │ │ │ -00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00009 // │ │ │ │ │ -// │ │ │ │ │ -00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00013 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00014 // │ │ │ │ │ -// │ │ │ │ │ -00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00018 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00019 // │ │ │ │ │ -// │ │ │ │ │ -00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00021 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00023 // │ │ │ │ │ -// │ │ │ │ │ -00024 // $Revision:: 123 │ │ │ │ │ -$// │ │ │ │ │ -00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ -$// │ │ │ │ │ -00027 │ │ │ │ │ -00028 #ifndef __REFERENCE_H__ │ │ │ │ │ -00029 #define __REFERENCE_H__ │ │ │ │ │ -00030 │ │ │ │ │ -00031 namespace siscone{ │ │ │ │ │ -00032 │ │ │ │ │ -00043 class Creference{ │ │ │ │ │ -00044 public: │ │ │ │ │ -00046 │ │ │ │ │ -Creference(); │ │ │ │ │ -00047 │ │ │ │ │ -00049 │ │ │ │ │ -void randomize(); │ │ │ │ │ -00050 │ │ │ │ │ -00052 │ │ │ │ │ -bool is_empty(); │ │ │ │ │ -00053 │ │ │ │ │ -00055 │ │ │ │ │ -bool not_empty(); │ │ │ │ │ -00056 │ │ │ │ │ -00058 │ │ │ │ │ -Creference& operator = (const Creference &r); │ │ │ │ │ -00059 │ │ │ │ │ -00061 │ │ │ │ │ -Creference operator + (const Creference &r); │ │ │ │ │ -00062 │ │ │ │ │ -00064 │ │ │ │ │ -Creference& operator += (const Creference &r); │ │ │ │ │ -00065 │ │ │ │ │ -00067 │ │ │ │ │ -Creference& operator -= (const Creference &r); │ │ │ │ │ -00068 │ │ │ │ │ -00070 │ │ │ │ │ -inline unsigned int operator[] (int i) {return ref[i];} │ │ │ │ │ -00071 │ │ │ │ │ -00072 │ │ │ │ │ -unsigned int ref[3]; │ │ │ │ │ -00073 }; │ │ │ │ │ -00074 │ │ │ │ │ -00076 Creference operator + (Creference &r1, Creference &r2); │ │ │ │ │ -00077 │ │ │ │ │ -00079 bool operator == (const Creference &r1, const Creference &r2); │ │ │ │ │ -00080 │ │ │ │ │ -00082 bool operator != (const Creference &r1, const Creference &r2); │ │ │ │ │ -00083 │ │ │ │ │ -00085 bool operator < (const Creference &r1, const Creference &r2); │ │ │ │ │ -00086 │ │ │ │ │ -00087 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.27 siscone_error.cpp │ │ │ │ │ - │ │ │ │ │ -219 │ │ │ │ │ - │ │ │ │ │ -00088 //=============== inline material ================ │ │ │ │ │ -00089 │ │ │ │ │ -00090 // equality test for two references │ │ │ │ │ -00091 //---------------------------------00092 inline bool operator == (const Creference &r1, const Creference &r2){ │ │ │ │ │ -00093 │ │ │ │ │ -return (r1.ref[0]==r2.ref[0]) && (r1.ref[1]==r2.ref[1]) && (r1.ref[2]==r2.ref[2]); │ │ │ │ │ -00094 } │ │ │ │ │ -00095 │ │ │ │ │ -00096 // difference test for two references │ │ │ │ │ -00097 //---------------------------------00098 inline bool operator != (const Creference &r1, const Creference &r2){ │ │ │ │ │ -00099 │ │ │ │ │ -return (r1.ref[0]!=r2.ref[0]) || (r1.ref[1]!=r2.ref[1]) || (r1.ref[2]!=r2.ref[2]); │ │ │ │ │ -00100 } │ │ │ │ │ -00101 │ │ │ │ │ -00102 // difference test for two references │ │ │ │ │ -00103 //---------------------------------00104 inline bool operator < (const Creference &r1, const Creference &r2){ │ │ │ │ │ -00105 │ │ │ │ │ -return (r1.ref[0] │ │ │ │ │ -00032 #include │ │ │ │ │ -00033 │ │ │ │ │ -00034 namespace siscone{ │ │ │ │ │ -00035 │ │ │ │ │ -00038 class Csiscone_error { │ │ │ │ │ -00039 public: │ │ │ │ │ -00041 │ │ │ │ │ -Csiscone_error() {;}; │ │ │ │ │ -00042 │ │ │ │ │ -00045 │ │ │ │ │ -Csiscone_error(const std::string & message_in) { │ │ │ │ │ -00046 │ │ │ │ │ -m_message = message_in; │ │ │ │ │ -00047 │ │ │ │ │ -if (m_print_errors) std::cerr « "siscone::Csiscone_error: "« message_in « std::endl; │ │ │ │ │ -00048 │ │ │ │ │ -}; │ │ │ │ │ -00049 │ │ │ │ │ -00051 │ │ │ │ │ -std::string message() const {return m_message;}; │ │ │ │ │ -00052 │ │ │ │ │ -00055 │ │ │ │ │ -static void setm_print_errors(bool print_errors) { │ │ │ │ │ -00056 │ │ │ │ │ -m_print_errors = print_errors;}; │ │ │ │ │ -00057 │ │ │ │ │ -00058 private: │ │ │ │ │ -00059 │ │ │ │ │ -std::string m_message; │ │ │ │ │ -00060 │ │ │ │ │ -static bool m_print_errors; │ │ │ │ │ -00061 }; │ │ │ │ │ -00062 │ │ │ │ │ -00063 } │ │ │ │ │ -00064 #endif │ │ │ │ │ - │ │ │ │ │ -5.29 │ │ │ │ │ - │ │ │ │ │ -hash.cpp │ │ │ │ │ - │ │ │ │ │ -00001 │ │ │ │ │ -00002 // File: hash.cpp │ │ │ │ │ -// │ │ │ │ │ -00003 // Description: source file for classes hash_element and hash_cones │ │ │ │ │ -// │ │ │ │ │ -00004 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00006 // │ │ │ │ │ -// │ │ │ │ │ -00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00008 // │ │ │ │ │ -// │ │ │ │ │ -00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00012 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00013 // │ │ │ │ │ -// │ │ │ │ │ -00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00017 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00018 // │ │ │ │ │ -// │ │ │ │ │ -00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00020 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00022 // │ │ │ │ │ -// │ │ │ │ │ -00023 // $Revision:: 225 │ │ │ │ │ -$// │ │ │ │ │ -00024 // $Date:: 2008-05-20 16:59:47 +0200 (Tue, 20 May 2008) │ │ │ │ │ -$// │ │ │ │ │ -00026 │ │ │ │ │ -00027 #include │ │ │ │ │ -00028 #include │ │ │ │ │ -00029 #include "hash.h" │ │ │ │ │ -00030 #include │ │ │ │ │ -00031 │ │ │ │ │ -00032 namespace siscone{ │ │ │ │ │ -00033 │ │ │ │ │ -00034 using namespace std; │ │ │ │ │ -00035 │ │ │ │ │ -00036 /************************************************************** │ │ │ │ │ -00037 * implementation of hash_cones │ │ │ │ │ -* │ │ │ │ │ -00038 * list of cones candidates. │ │ │ │ │ -* │ │ │ │ │ -00039 * We store in this class all the hash_elements and give │ │ │ │ │ -* │ │ │ │ │ -00040 * functions to manipulate them. │ │ │ │ │ -* │ │ │ │ │ -00041 **************************************************************/ │ │ │ │ │ -00042 │ │ │ │ │ -00043 // constructor with initialisation │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.29 hash.cpp │ │ │ │ │ - │ │ │ │ │ -00044 // - _Np number of particles │ │ │ │ │ -00045 // - _R2 cone radius (squared) │ │ │ │ │ -00046 //----------------------------------00047 hash_cones::hash_cones(int _Np, double _R2){ │ │ │ │ │ -00048 │ │ │ │ │ -int i; │ │ │ │ │ -00049 │ │ │ │ │ -00050 │ │ │ │ │ -n_cones = 0; │ │ │ │ │ -00051 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ -00052 │ │ │ │ │ -n_occupied_cells = 0; │ │ │ │ │ -00053 #endif │ │ │ │ │ -00054 │ │ │ │ │ -00055 │ │ │ │ │ -// determine hash size │ │ │ │ │ -00056 │ │ │ │ │ -// for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4 │ │ │ │ │ -00057 │ │ │ │ │ -//mask = 1 « (int) (2*log(double(_Np))/log(2.0)); │ │ │ │ │ -00058 │ │ │ │ │ -//if (mask<=1) mask=2; │ │ │ │ │ -00059 │ │ │ │ │ -int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0)); │ │ │ │ │ -00060 │ │ │ │ │ -if (nbits<1) nbits=1; │ │ │ │ │ -00061 │ │ │ │ │ -mask = 1 « nbits; │ │ │ │ │ -00062 │ │ │ │ │ -00063 │ │ │ │ │ -// create hash │ │ │ │ │ -00064 │ │ │ │ │ -hash_array = new hash_element*[mask]; │ │ │ │ │ -00065 │ │ │ │ │ -mask--; │ │ │ │ │ -00066 │ │ │ │ │ -00067 │ │ │ │ │ -// set the array to 0 │ │ │ │ │ -00068 │ │ │ │ │ -//? needed ? │ │ │ │ │ -00069 │ │ │ │ │ -for (i=0;inext; │ │ │ │ │ -00085 │ │ │ │ │ -delete elm; │ │ │ │ │ -00086 │ │ │ │ │ -} │ │ │ │ │ -00087 │ │ │ │ │ -} │ │ │ │ │ -00088 │ │ │ │ │ -00089 │ │ │ │ │ -delete[] hash_array; │ │ │ │ │ -00090 } │ │ │ │ │ -00091 │ │ │ │ │ -00092 │ │ │ │ │ -00093 /* │ │ │ │ │ -00094 * insert a new candidate into the hash. │ │ │ │ │ -00095 * - v │ │ │ │ │ -4-momentum of the cone to add │ │ │ │ │ -00096 * - parent parent particle defining the cone │ │ │ │ │ -00097 * - child │ │ │ │ │ -child particle defining the cone │ │ │ │ │ -00098 * - p_io │ │ │ │ │ -whether the parent has to belong to the cone or not │ │ │ │ │ -00099 * - c_io │ │ │ │ │ -whether the child has to belong to the cone or not │ │ │ │ │ -00100 * return 0 on success, 1 on error │ │ │ │ │ -00101 ***********************************************************************/ │ │ │ │ │ -00102 int hash_cones::insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io){ │ │ │ │ │ -00103 │ │ │ │ │ -hash_element *elm; │ │ │ │ │ -00104 │ │ │ │ │ -int index = (v->ref.ref[0]) & mask; │ │ │ │ │ -00105 │ │ │ │ │ -00106 │ │ │ │ │ -// check the array cell corresponding to our reference │ │ │ │ │ -00107 │ │ │ │ │ -elm = hash_array[index]; │ │ │ │ │ -00108 │ │ │ │ │ -00109 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ -00110 │ │ │ │ │ -if (elm==NULL) │ │ │ │ │ -00111 │ │ │ │ │ -n_occupied_cells++; │ │ │ │ │ -00112 #endif │ │ │ │ │ -00113 │ │ │ │ │ -00114 │ │ │ │ │ -do{ │ │ │ │ │ -00115 │ │ │ │ │ -// if it is not present, add it │ │ │ │ │ -00116 │ │ │ │ │ -if (elm==NULL){ │ │ │ │ │ -00117 │ │ │ │ │ -// create element │ │ │ │ │ -00118 │ │ │ │ │ -elm = new hash_element; │ │ │ │ │ -00119 │ │ │ │ │ -00120 │ │ │ │ │ -// set its varibles │ │ │ │ │ -00121 │ │ │ │ │ -// Note: at this level, eta and phi have already been computed │ │ │ │ │ -00122 │ │ │ │ │ -// │ │ │ │ │ -through Cmomentum::build_etaphi. │ │ │ │ │ -00123 │ │ │ │ │ -elm->ref = v->ref; │ │ │ │ │ -00124 │ │ │ │ │ -00125 │ │ │ │ │ -//compute vectors centre │ │ │ │ │ -00126 │ │ │ │ │ -v->build_etaphi(); │ │ │ │ │ -00127 │ │ │ │ │ -elm->eta = v->eta; │ │ │ │ │ -00128 │ │ │ │ │ -elm->phi = v->phi; │ │ │ │ │ -00129 │ │ │ │ │ -// if at least one of the two is_inside tests gives a result != from the expected, │ │ │ │ │ -00130 │ │ │ │ │ -// the || will be true hence !(...) false as wanted │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -221 │ │ │ │ │ - │ │ │ │ │ - 222 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00131 │ │ │ │ │ -elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io)); │ │ │ │ │ -00132 │ │ │ │ │ -//cout « "-- new status of " « v->ref[0] « ":" « elm->is_stable « endl; │ │ │ │ │ -00133 │ │ │ │ │ -00134 │ │ │ │ │ -// update hash │ │ │ │ │ -00135 │ │ │ │ │ -elm->next = hash_array[index]; │ │ │ │ │ -00136 │ │ │ │ │ -hash_array[index] = elm; │ │ │ │ │ -00137 │ │ │ │ │ -00138 │ │ │ │ │ -n_cones++; │ │ │ │ │ -00139 │ │ │ │ │ -return 0; │ │ │ │ │ -00140 │ │ │ │ │ -} │ │ │ │ │ -00141 │ │ │ │ │ -00142 │ │ │ │ │ -// if the cone is already there, simply update stability status │ │ │ │ │ -00143 │ │ │ │ │ -if (v->ref == elm->ref){ │ │ │ │ │ -00144 │ │ │ │ │ -// there is only an update to perform to see if the cone is still stable │ │ │ │ │ -00145 │ │ │ │ │ -if (elm->is_stable){ │ │ │ │ │ -00146 │ │ │ │ │ -v->build_etaphi(); │ │ │ │ │ -00147 │ │ │ │ │ -elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io)); │ │ │ │ │ -00148 │ │ │ │ │ -//cout « " parent/child: " │ │ │ │ │ -00149 │ │ │ │ │ -// │ │ │ │ │ -« parent->ref[0] « ":" « is_inside(v, parent) « ":" « p_io « " " │ │ │ │ │ -00150 │ │ │ │ │ -// │ │ │ │ │ -« child->ref[0] « ":" « is_inside(v, child) « ":" « c_io « endl; │ │ │ │ │ -00151 │ │ │ │ │ -//cout « "-- rep status of " « v->ref[0] « ":" « elm->is_stable « endl; │ │ │ │ │ -00152 │ │ │ │ │ -//cout « v->eta « " " « v->phi « endl; │ │ │ │ │ -00153 │ │ │ │ │ -//cout « (child->eta) « " " « child->phi « endl; │ │ │ │ │ -00154 │ │ │ │ │ -} │ │ │ │ │ -00155 │ │ │ │ │ -return 0; │ │ │ │ │ -00156 │ │ │ │ │ -} │ │ │ │ │ -00157 │ │ │ │ │ -00158 │ │ │ │ │ -elm = elm->next; │ │ │ │ │ -00159 │ │ │ │ │ -} while (1); │ │ │ │ │ -00160 │ │ │ │ │ -00161 │ │ │ │ │ -return 1; │ │ │ │ │ -00162 } │ │ │ │ │ -00163 │ │ │ │ │ -00164 /* │ │ │ │ │ -00165 * insert a new candidate into the hash. │ │ │ │ │ -00166 * - v │ │ │ │ │ -4-momentum of te cone to add │ │ │ │ │ -00167 * Note, in this case, we assume stability. We also assume │ │ │ │ │ -00168 * that eta and phi are computed for v │ │ │ │ │ -00169 * return 0 on success, 1 on error │ │ │ │ │ -00170 ***********************************************************************/ │ │ │ │ │ -00171 int hash_cones::insert(Cmomentum *v){ │ │ │ │ │ -00172 │ │ │ │ │ -hash_element *elm; │ │ │ │ │ -00173 │ │ │ │ │ -int index = (v->ref.ref[0]) & mask; │ │ │ │ │ -00174 │ │ │ │ │ -//cout « "-- stable candidate: " « v->ref[0] « ":" « endl; │ │ │ │ │ -00175 │ │ │ │ │ -00176 │ │ │ │ │ -// check the array cell corresponding to our reference │ │ │ │ │ -00177 │ │ │ │ │ -elm = hash_array[index]; │ │ │ │ │ -00178 │ │ │ │ │ -do{ │ │ │ │ │ -00179 │ │ │ │ │ -// if it is not present, add it │ │ │ │ │ -00180 │ │ │ │ │ -if (elm==NULL){ │ │ │ │ │ -00181 │ │ │ │ │ -// create element │ │ │ │ │ -00182 │ │ │ │ │ -elm = new hash_element; │ │ │ │ │ -00183 │ │ │ │ │ -00184 │ │ │ │ │ -// set its varibles │ │ │ │ │ -00185 │ │ │ │ │ -// Note: at this level, eta and phi have already been computed │ │ │ │ │ -00186 │ │ │ │ │ -// │ │ │ │ │ -through Cmomentum::build_etaphi. │ │ │ │ │ -00187 │ │ │ │ │ -elm->ref = v->ref; │ │ │ │ │ -00188 │ │ │ │ │ -elm->eta = v->eta; │ │ │ │ │ -00189 │ │ │ │ │ -elm->phi = v->phi; │ │ │ │ │ -00190 │ │ │ │ │ -elm->is_stable = true; │ │ │ │ │ -00191 │ │ │ │ │ -00192 │ │ │ │ │ -// update hash │ │ │ │ │ -00193 │ │ │ │ │ -elm->next = hash_array[index]; │ │ │ │ │ -00194 │ │ │ │ │ -hash_array[index] = elm; │ │ │ │ │ -00195 │ │ │ │ │ -00196 │ │ │ │ │ -n_cones++; │ │ │ │ │ -00197 │ │ │ │ │ -return 0; │ │ │ │ │ -00198 │ │ │ │ │ -} │ │ │ │ │ -00199 │ │ │ │ │ -00200 │ │ │ │ │ -// if the cone is already there, we have nothing to do │ │ │ │ │ -00201 │ │ │ │ │ -if (v->ref == elm->ref){ │ │ │ │ │ -00202 │ │ │ │ │ -return 0; │ │ │ │ │ -00203 │ │ │ │ │ -} │ │ │ │ │ -00204 │ │ │ │ │ -00205 │ │ │ │ │ -elm = elm->next; │ │ │ │ │ -00206 │ │ │ │ │ -} while (1); │ │ │ │ │ -00207 │ │ │ │ │ -00208 │ │ │ │ │ -return 1; │ │ │ │ │ -00209 } │ │ │ │ │ -00210 │ │ │ │ │ -00211 /* │ │ │ │ │ -00212 * test if a particle is inside a cone of given centre. │ │ │ │ │ -00213 * check if the particle of coordinates ’v’ is inside the circle of radius R │ │ │ │ │ -00214 * centered at ’centre’. │ │ │ │ │ -00215 * - centre │ │ │ │ │ -centre of the circle │ │ │ │ │ -00216 * - v │ │ │ │ │ -particle to test │ │ │ │ │ -00217 * return true if inside, false if outside │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.30 hash.cpp │ │ │ │ │ - │ │ │ │ │ -223 │ │ │ │ │ - │ │ │ │ │ -00218 ******************************************************************************/ │ │ │ │ │ -00219 inline bool hash_cones::is_inside(Cmomentum *centre, Cmomentum *v){ │ │ │ │ │ -00220 │ │ │ │ │ -double dx, dy; │ │ │ │ │ -00221 │ │ │ │ │ -00222 │ │ │ │ │ -dx = centre->eta - v->eta; │ │ │ │ │ -00223 │ │ │ │ │ -dy = fabs(centre->phi - v->phi); │ │ │ │ │ -00224 │ │ │ │ │ -if (dy>M_PI) │ │ │ │ │ -00225 │ │ │ │ │ -dy -= 2.0*M_PI; │ │ │ │ │ -00226 │ │ │ │ │ -00227 │ │ │ │ │ -return dx*dx+dy*dy │ │ │ │ │ -00030 #include │ │ │ │ │ -00031 #include "hash.h" │ │ │ │ │ -00032 #include │ │ │ │ │ -00033 │ │ │ │ │ -00034 namespace siscone_spherical{ │ │ │ │ │ -00035 │ │ │ │ │ -00036 using namespace std; │ │ │ │ │ -00037 │ │ │ │ │ -00038 /************************************************************** │ │ │ │ │ -00039 * implementation of sph_hash_cones │ │ │ │ │ -* │ │ │ │ │ -00040 * list of cones candidates. │ │ │ │ │ -* │ │ │ │ │ -00041 * We store in this class all the sph_hash_element and give │ │ │ │ │ -* │ │ │ │ │ -00042 * functions to manipulate them. │ │ │ │ │ -* │ │ │ │ │ -00043 **************************************************************/ │ │ │ │ │ -00044 │ │ │ │ │ -00045 // constructor with initialisation │ │ │ │ │ -00046 // - _Np │ │ │ │ │ -number of particles │ │ │ │ │ -00047 // - _radius cone radius │ │ │ │ │ -00048 //----------------------------------00049 sph_hash_cones::sph_hash_cones(int _Np, double _radius){ │ │ │ │ │ -00050 │ │ │ │ │ -int i; │ │ │ │ │ -00051 │ │ │ │ │ -00052 │ │ │ │ │ -n_cones = 0; │ │ │ │ │ -00053 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ -00054 │ │ │ │ │ -n_occupied_cells = 0; │ │ │ │ │ -00055 #endif │ │ │ │ │ -00056 │ │ │ │ │ -00057 │ │ │ │ │ -// determine hash size │ │ │ │ │ -00058 │ │ │ │ │ -// for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4 │ │ │ │ │ -00059 │ │ │ │ │ -//mask = 1 « (int) (2*log(double(_Np))/log(2.0)); │ │ │ │ │ -00060 │ │ │ │ │ -//if (mask<=1) mask=2; │ │ │ │ │ -00061 │ │ │ │ │ -int nbits = (int) (log(_Np*_radius*_radius*_Np/4.0)/log(2.0)); │ │ │ │ │ -00062 │ │ │ │ │ -if (nbits<1) nbits=1; │ │ │ │ │ -00063 │ │ │ │ │ -mask = 1 « nbits; │ │ │ │ │ -00064 │ │ │ │ │ -00065 │ │ │ │ │ -// create hash │ │ │ │ │ -00066 │ │ │ │ │ -hash_array = new sph_hash_element*[mask]; │ │ │ │ │ -00067 │ │ │ │ │ -mask--; │ │ │ │ │ -00068 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ - 224 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00069 │ │ │ │ │ -// set the array to 0 │ │ │ │ │ -00070 │ │ │ │ │ -//? needed ? │ │ │ │ │ -00071 │ │ │ │ │ -for (i=0;inext; │ │ │ │ │ -00088 │ │ │ │ │ -delete elm; │ │ │ │ │ -00089 │ │ │ │ │ -} │ │ │ │ │ -00090 │ │ │ │ │ -} │ │ │ │ │ -00091 │ │ │ │ │ -00092 │ │ │ │ │ -delete[] hash_array; │ │ │ │ │ -00093 } │ │ │ │ │ -00094 │ │ │ │ │ -00095 │ │ │ │ │ -00096 /* │ │ │ │ │ -00097 * insert a new candidate into the hash. │ │ │ │ │ -00098 * - v │ │ │ │ │ -4-momentum of the cone to add │ │ │ │ │ -00099 * - parent parent particle defining the cone │ │ │ │ │ -00100 * - child │ │ │ │ │ -child particle defining the cone │ │ │ │ │ -00101 * - p_io │ │ │ │ │ -whether the parent has to belong to the cone or not │ │ │ │ │ -00102 * - c_io │ │ │ │ │ -whether the child has to belong to the cone or not │ │ │ │ │ -00103 * return 0 on success, 1 on error │ │ │ │ │ -00104 ***********************************************************************/ │ │ │ │ │ -00105 int sph_hash_cones::insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool │ │ │ │ │ -c_io){ │ │ │ │ │ -00106 │ │ │ │ │ -sph_hash_element *elm; │ │ │ │ │ -00107 │ │ │ │ │ -int index = (v->ref.ref[0]) & mask; │ │ │ │ │ -00108 │ │ │ │ │ -00109 │ │ │ │ │ -// check the array cell corresponding to our reference │ │ │ │ │ -00110 │ │ │ │ │ -elm = hash_array[index]; │ │ │ │ │ -00111 │ │ │ │ │ -00112 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ -00113 │ │ │ │ │ -if (elm==NULL) │ │ │ │ │ -00114 │ │ │ │ │ -n_occupied_cells++; │ │ │ │ │ -00115 #endif │ │ │ │ │ -00116 │ │ │ │ │ -00117 │ │ │ │ │ -do{ │ │ │ │ │ -00118 │ │ │ │ │ -// if it is not present, add it │ │ │ │ │ -00119 │ │ │ │ │ -if (elm==NULL){ │ │ │ │ │ -00120 │ │ │ │ │ -// create element │ │ │ │ │ -00121 │ │ │ │ │ -elm = new sph_hash_element; │ │ │ │ │ -00122 │ │ │ │ │ -00123 │ │ │ │ │ -// set its varibles │ │ │ │ │ -00124 │ │ │ │ │ -// Note: at this level, eta and phi have already been computed │ │ │ │ │ -00125 │ │ │ │ │ -// │ │ │ │ │ -through CSphmomentum::build_thetaphi. │ │ │ │ │ -00126 │ │ │ │ │ -elm->centre = *v; │ │ │ │ │ -00127 │ │ │ │ │ -00128 │ │ │ │ │ -// if at least one of the two is_closer tests gives a result != from the expected, │ │ │ │ │ -00129 │ │ │ │ │ -// the || will be true hence !(...) false as wanted │ │ │ │ │ -00130 │ │ │ │ │ -elm->is_stable = !((is_closer(v, parent, tan2R)^p_io)||(is_closer(v, child, tan2R)^c_io)); │ │ │ │ │ -00131 │ │ │ │ │ -//cout « "-- new status of " « v->ref[0] « ":" « elm->is_stable « endl; │ │ │ │ │ -00132 │ │ │ │ │ -00133 │ │ │ │ │ -// update hash │ │ │ │ │ -00134 │ │ │ │ │ -elm->next = hash_array[index]; │ │ │ │ │ -00135 │ │ │ │ │ -hash_array[index] = elm; │ │ │ │ │ -00136 │ │ │ │ │ -00137 │ │ │ │ │ -n_cones++; │ │ │ │ │ -00138 │ │ │ │ │ -return 0; │ │ │ │ │ -00139 │ │ │ │ │ -} │ │ │ │ │ -00140 │ │ │ │ │ -00141 │ │ │ │ │ -// if the cone is already there, simply update stability status │ │ │ │ │ -00142 │ │ │ │ │ -if (v->ref == elm->centre.ref){ │ │ │ │ │ -00143 │ │ │ │ │ -// there is only an update to perform to see if the cone is still stable │ │ │ │ │ -00144 │ │ │ │ │ -if (elm->is_stable){ │ │ │ │ │ -00145 │ │ │ │ │ -elm->is_stable = !((is_closer(v, parent, tan2R)^p_io)||(is_closer(v, child, tan2R)^c_io)); │ │ │ │ │ -00146 │ │ │ │ │ -//cout « " parent/child: " │ │ │ │ │ -00147 │ │ │ │ │ -// │ │ │ │ │ -« parent->ref[0] « ":" « is_closer(v, parent) « ":" « p_io « " " │ │ │ │ │ -00148 │ │ │ │ │ -// │ │ │ │ │ -« child->ref[0] « ":" « is_closer(v, child) « ":" « c_io « endl; │ │ │ │ │ -00149 │ │ │ │ │ -//cout « "-- rep status of " « v->ref[0] « ":" « elm->is_stable « endl; │ │ │ │ │ -00150 │ │ │ │ │ -//cout « v->eta « " " « v->phi « endl; │ │ │ │ │ -00151 │ │ │ │ │ -//cout « (child->eta) « " " « child->phi « endl; │ │ │ │ │ -00152 │ │ │ │ │ -} │ │ │ │ │ -00153 │ │ │ │ │ -return 0; │ │ │ │ │ -00154 │ │ │ │ │ -} │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.31 hash.h │ │ │ │ │ - │ │ │ │ │ -00155 │ │ │ │ │ -00156 │ │ │ │ │ -elm = elm->next; │ │ │ │ │ -00157 │ │ │ │ │ -} while (1); │ │ │ │ │ -00158 │ │ │ │ │ -00159 │ │ │ │ │ -return 1; │ │ │ │ │ -00160 } │ │ │ │ │ -00161 │ │ │ │ │ -00162 /* │ │ │ │ │ -00163 * insert a new candidate into the hash. │ │ │ │ │ -00164 * - v │ │ │ │ │ -4-momentum of te cone to add │ │ │ │ │ -00165 * Note, in this case, we assume stability. We also assume │ │ │ │ │ -00166 * that eta and phi are computed for v │ │ │ │ │ -00167 * return 0 on success, 1 on error │ │ │ │ │ -00168 ***********************************************************************/ │ │ │ │ │ -00169 int sph_hash_cones::insert(CSphmomentum *v){ │ │ │ │ │ -00170 │ │ │ │ │ -sph_hash_element *elm; │ │ │ │ │ -00171 │ │ │ │ │ -int index = (v->ref.ref[0]) & mask; │ │ │ │ │ -00172 │ │ │ │ │ -//cout « "-- stable candidate: " « v->ref[0] « ":" « endl; │ │ │ │ │ -00173 │ │ │ │ │ -00174 │ │ │ │ │ -// check the array cell corresponding to our reference │ │ │ │ │ -00175 │ │ │ │ │ -elm = hash_array[index]; │ │ │ │ │ -00176 │ │ │ │ │ -do{ │ │ │ │ │ -00177 │ │ │ │ │ -// if it is not present, add it │ │ │ │ │ -00178 │ │ │ │ │ -if (elm==NULL){ │ │ │ │ │ -00179 │ │ │ │ │ -// create element │ │ │ │ │ -00180 │ │ │ │ │ -elm = new sph_hash_element; │ │ │ │ │ -00181 │ │ │ │ │ -00182 │ │ │ │ │ -// set its varibles │ │ │ │ │ -00183 │ │ │ │ │ -// Note: at this level, eta and phi have already been computed │ │ │ │ │ -00184 │ │ │ │ │ -// │ │ │ │ │ -through CSphmomentum::build_thetaphi. │ │ │ │ │ -00185 │ │ │ │ │ -elm->centre = *v; │ │ │ │ │ -00186 │ │ │ │ │ -elm->is_stable = true; │ │ │ │ │ -00187 │ │ │ │ │ -00188 │ │ │ │ │ -// update hash │ │ │ │ │ -00189 │ │ │ │ │ -elm->next = hash_array[index]; │ │ │ │ │ -00190 │ │ │ │ │ -hash_array[index] = elm; │ │ │ │ │ -00191 │ │ │ │ │ -00192 │ │ │ │ │ -n_cones++; │ │ │ │ │ -00193 │ │ │ │ │ -return 0; │ │ │ │ │ -00194 │ │ │ │ │ -} │ │ │ │ │ -00195 │ │ │ │ │ -00196 │ │ │ │ │ -// if the cone is already there, we have nothing to do │ │ │ │ │ -00197 │ │ │ │ │ -if (v->ref == elm->centre.ref){ │ │ │ │ │ -00198 │ │ │ │ │ -return 0; │ │ │ │ │ -00199 │ │ │ │ │ -} │ │ │ │ │ -00200 │ │ │ │ │ -00201 │ │ │ │ │ -elm = elm->next; │ │ │ │ │ -00202 │ │ │ │ │ -} while (1); │ │ │ │ │ -00203 │ │ │ │ │ -00204 │ │ │ │ │ -return 1; │ │ │ │ │ -00205 } │ │ │ │ │ -00206 │ │ │ │ │ -00207 } │ │ │ │ │ - │ │ │ │ │ -5.31 │ │ │ │ │ - │ │ │ │ │ hash.h │ │ │ │ │ │ │ │ │ │ 00001 // -*- C++ -*00003 // File: hash.h │ │ │ │ │ // │ │ │ │ │ 00004 // Description: header file for classes hash_element and hash_cones │ │ │ │ │ // │ │ │ │ │ 00005 // This file is part of the SISCone project. │ │ │ │ │ @@ -18733,31 +15619,29 @@ │ │ │ │ │ 00024 // $Revision:: 224 │ │ │ │ │ $// │ │ │ │ │ 00025 // $Date:: 2008-05-16 19:58:30 +0200 (Fri, 16 May 2008) │ │ │ │ │ $// │ │ │ │ │ 00027 │ │ │ │ │ 00028 #ifndef __HASH_H__ │ │ │ │ │ 00029 #define __HASH_H__ │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -225 │ │ │ │ │ - │ │ │ │ │ - 226 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00030 │ │ │ │ │ 00031 #include "momentum.h" │ │ │ │ │ 00032 #include "reference.h" │ │ │ │ │ 00033 │ │ │ │ │ 00034 namespace siscone{ │ │ │ │ │ 00035 │ │ │ │ │ 00045 class hash_element{ │ │ │ │ │ 00046 public: │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.17 hash.h │ │ │ │ │ + │ │ │ │ │ +203 │ │ │ │ │ + │ │ │ │ │ 00047 │ │ │ │ │ Creference ref; │ │ │ │ │ 00048 │ │ │ │ │ double eta; │ │ │ │ │ 00049 │ │ │ │ │ double phi; │ │ │ │ │ 00050 │ │ │ │ │ @@ -18801,15 +15685,15 @@ │ │ │ │ │ 00118 │ │ │ │ │ inline bool is_inside(Cmomentum *centre, Cmomentum *v); │ │ │ │ │ 00119 }; │ │ │ │ │ 00120 │ │ │ │ │ 00121 } │ │ │ │ │ 00122 #endif │ │ │ │ │ │ │ │ │ │ -5.32 │ │ │ │ │ +5.17 │ │ │ │ │ │ │ │ │ │ hash.h │ │ │ │ │ │ │ │ │ │ 00001 // -*- C++ -*00003 // File: hash.h │ │ │ │ │ // │ │ │ │ │ 00004 // Description: header file for classes hash_element and hash_cones │ │ │ │ │ // │ │ │ │ │ @@ -18866,32 +15750,34 @@ │ │ │ │ │ 00034 │ │ │ │ │ 00035 namespace siscone_spherical{ │ │ │ │ │ 00036 │ │ │ │ │ 00046 class sph_hash_element{ │ │ │ │ │ 00047 public: │ │ │ │ │ 00048 │ │ │ │ │ CSph3vector centre; │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.33 momentum.cpp │ │ │ │ │ - │ │ │ │ │ 00049 │ │ │ │ │ bool is_stable; │ │ │ │ │ 00050 │ │ │ │ │ 00051 │ │ │ │ │ sph_hash_element *next; │ │ │ │ │ 00052 }; │ │ │ │ │ 00053 │ │ │ │ │ 00061 class sph_hash_cones{ │ │ │ │ │ 00062 public: │ │ │ │ │ 00065 │ │ │ │ │ sph_hash_cones(int _Np, double _radius); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ + 204 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00066 │ │ │ │ │ 00068 │ │ │ │ │ ~sph_hash_cones(); │ │ │ │ │ 00069 │ │ │ │ │ 00079 │ │ │ │ │ int insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool c_io); │ │ │ │ │ 00080 │ │ │ │ │ @@ -18918,723 +15804,48 @@ │ │ │ │ │ 00109 │ │ │ │ │ double tan2R; │ │ │ │ │ 00110 }; │ │ │ │ │ 00111 │ │ │ │ │ 00112 } │ │ │ │ │ 00113 #endif │ │ │ │ │ │ │ │ │ │ -5.33 │ │ │ │ │ - │ │ │ │ │ -momentum.cpp │ │ │ │ │ - │ │ │ │ │ -00001 │ │ │ │ │ -00002 // File: momentum.cpp │ │ │ │ │ -// │ │ │ │ │ -00003 // Description: source file for 4-momentum class Cmomentum │ │ │ │ │ -// │ │ │ │ │ -00004 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00006 // │ │ │ │ │ -// │ │ │ │ │ -00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00008 // │ │ │ │ │ -// │ │ │ │ │ -00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00012 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00013 // │ │ │ │ │ -// │ │ │ │ │ -00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00017 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00018 // │ │ │ │ │ -// │ │ │ │ │ -00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00020 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00022 // │ │ │ │ │ -// │ │ │ │ │ -00023 // $Revision:: 123 │ │ │ │ │ -$// │ │ │ │ │ -00024 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ -$// │ │ │ │ │ -00026 │ │ │ │ │ -00027 #include "momentum.h" │ │ │ │ │ -00028 #include │ │ │ │ │ -00029 #include │ │ │ │ │ -00030 │ │ │ │ │ -00031 namespace siscone{ │ │ │ │ │ -00032 │ │ │ │ │ -00033 /************************************************************************* │ │ │ │ │ -00034 * class Cmomentum │ │ │ │ │ -* │ │ │ │ │ -00035 * This class contains the information for particle or group of │ │ │ │ │ -* │ │ │ │ │ -00036 * particles management. │ │ │ │ │ -* │ │ │ │ │ -00037 * It includes all Lorentz properties as well as tools for summing them. * │ │ │ │ │ -00038 *************************************************************************/ │ │ │ │ │ -00039 │ │ │ │ │ -00040 // default ctor │ │ │ │ │ -00041 //-------------00042 Cmomentum::Cmomentum(){ │ │ │ │ │ -00043 │ │ │ │ │ -eta = 0.0; │ │ │ │ │ -00044 │ │ │ │ │ -phi = 0.0; │ │ │ │ │ -00045 │ │ │ │ │ -px = py = pz = E = 0.0; │ │ │ │ │ -00046 │ │ │ │ │ -ref = Creference(); │ │ │ │ │ -00047 │ │ │ │ │ -index = -1; │ │ │ │ │ -00048 } │ │ │ │ │ -00049 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -227 │ │ │ │ │ - │ │ │ │ │ - 228 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00050 // ctor with initialisation │ │ │ │ │ -00051 //-------------------------00052 Cmomentum::Cmomentum(double _px, double _py, double _pz, double _E){ │ │ │ │ │ -00053 │ │ │ │ │ -px = _px; │ │ │ │ │ -00054 │ │ │ │ │ -py = _py; │ │ │ │ │ -00055 │ │ │ │ │ -pz = _pz; │ │ │ │ │ -00056 │ │ │ │ │ -E = _E; │ │ │ │ │ -00057 │ │ │ │ │ -00058 │ │ │ │ │ -// compute eta and phi │ │ │ │ │ -00059 │ │ │ │ │ -build_etaphi(); │ │ │ │ │ -00060 │ │ │ │ │ -ref = Creference(); │ │ │ │ │ -00061 } │ │ │ │ │ -00062 │ │ │ │ │ -00063 // ctor with detailed initialisation │ │ │ │ │ -00064 //----------------------------------00065 Cmomentum::Cmomentum(double _eta, double _phi, Creference _ref){ │ │ │ │ │ -00066 │ │ │ │ │ -eta = _eta; │ │ │ │ │ -00067 │ │ │ │ │ -phi = _phi; │ │ │ │ │ -00068 │ │ │ │ │ -00069 │ │ │ │ │ -ref = _ref; │ │ │ │ │ -00070 } │ │ │ │ │ -00071 │ │ │ │ │ -00072 // default dtor │ │ │ │ │ -00073 //-------------00074 Cmomentum::~Cmomentum(){ │ │ │ │ │ -00075 │ │ │ │ │ -00076 } │ │ │ │ │ -00077 │ │ │ │ │ -00078 // assignment of vectors │ │ │ │ │ -00079 //----------------------00080 Cmomentum& Cmomentum::operator = (const Cmomentum &v){ │ │ │ │ │ -00081 │ │ │ │ │ -px = v.px; │ │ │ │ │ -00082 │ │ │ │ │ -py = v.py; │ │ │ │ │ -00083 │ │ │ │ │ -pz = v.pz; │ │ │ │ │ -00084 │ │ │ │ │ -E = v.E; │ │ │ │ │ -00085 │ │ │ │ │ -00086 │ │ │ │ │ -eta = v.eta; │ │ │ │ │ -00087 │ │ │ │ │ -phi = v.phi; │ │ │ │ │ -00088 │ │ │ │ │ -00089 │ │ │ │ │ -ref = v.ref; │ │ │ │ │ -00090 │ │ │ │ │ -return *this; │ │ │ │ │ -00091 } │ │ │ │ │ -00092 │ │ │ │ │ -00093 // addition of vectors │ │ │ │ │ -00094 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ -00095 //-----------------------------------------------00096 const Cmomentum Cmomentum::operator + (const Cmomentum &v){ │ │ │ │ │ -00097 │ │ │ │ │ -Cmomentum tmp = *this; │ │ │ │ │ -00098 │ │ │ │ │ -return tmp+=v; │ │ │ │ │ -00099 } │ │ │ │ │ -00100 │ │ │ │ │ -00101 // incrementation of vectors │ │ │ │ │ -00102 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ -00103 //-----------------------------------------------00104 Cmomentum& Cmomentum::operator += (const Cmomentum &v){ │ │ │ │ │ -00105 │ │ │ │ │ -px+=v.px; │ │ │ │ │ -00106 │ │ │ │ │ -py+=v.py; │ │ │ │ │ -00107 │ │ │ │ │ -pz+=v.pz; │ │ │ │ │ -00108 │ │ │ │ │ -E +=v.E; │ │ │ │ │ -00109 │ │ │ │ │ -00110 │ │ │ │ │ -ref+=v.ref; │ │ │ │ │ -00111 │ │ │ │ │ -00112 │ │ │ │ │ -return *this; │ │ │ │ │ -00113 } │ │ │ │ │ -00114 │ │ │ │ │ -00115 // incrementation of vectors │ │ │ │ │ -00116 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ -00117 //-----------------------------------------------00118 Cmomentum& Cmomentum::operator -= (const Cmomentum &v){ │ │ │ │ │ -00119 │ │ │ │ │ -px-=v.px; │ │ │ │ │ -00120 │ │ │ │ │ -py-=v.py; │ │ │ │ │ -00121 │ │ │ │ │ -pz-=v.pz; │ │ │ │ │ -00122 │ │ │ │ │ -E -=v.E; │ │ │ │ │ -00123 │ │ │ │ │ -00124 │ │ │ │ │ -ref-=v.ref; │ │ │ │ │ -00125 │ │ │ │ │ -return *this; │ │ │ │ │ -00126 } │ │ │ │ │ -00127 │ │ │ │ │ -00128 // build eta-phi from 4-momentum info │ │ │ │ │ -00129 // !!! │ │ │ │ │ -WARNING │ │ │ │ │ -!!! │ │ │ │ │ -00130 // !!! computing eta and phi is time-consuming !!! │ │ │ │ │ -00131 // !!! use this whenever you need eta or phi │ │ │ │ │ -!!! │ │ │ │ │ -00132 // !!! automatically called for single-particle !!! │ │ │ │ │ -00133 //-------------------------------------------------00134 void Cmomentum::build_etaphi(){ │ │ │ │ │ -00135 │ │ │ │ │ -// note: the factor n (ref.nb) cancels in all expressions !! │ │ │ │ │ -00136 │ │ │ │ │ -eta = 0.5*log((E+pz)/(E-pz)); │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.34 momentum.cpp │ │ │ │ │ - │ │ │ │ │ -229 │ │ │ │ │ - │ │ │ │ │ -00137 │ │ │ │ │ -phi = atan2(py,px); │ │ │ │ │ -00138 } │ │ │ │ │ -00139 │ │ │ │ │ -00140 │ │ │ │ │ -00141 // ordering of two vectors │ │ │ │ │ -00142 // the default ordering is w.r.t. their references │ │ │ │ │ -00143 //------------------------------------------------00144 bool operator < (const Cmomentum &v1, const Cmomentum &v2){ │ │ │ │ │ -00145 │ │ │ │ │ -return v1.ref < v2.ref; │ │ │ │ │ -00146 } │ │ │ │ │ -00147 │ │ │ │ │ -00148 // ordering of vectors in eta (e.g. used in collinear tests) │ │ │ │ │ -00149 //----------------------------------------------------------00150 bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2){ │ │ │ │ │ -00151 │ │ │ │ │ -return v1.eta < v2.eta; │ │ │ │ │ -00152 } │ │ │ │ │ -00153 │ │ │ │ │ -00154 // ordering of vectors in pt │ │ │ │ │ -00155 //--------------------------00156 bool momentum_pt_less(const Cmomentum &v1, const Cmomentum &v2){ │ │ │ │ │ -00157 │ │ │ │ │ -return v1.perp2() < v2.perp2(); │ │ │ │ │ -00158 } │ │ │ │ │ -00159 │ │ │ │ │ -00160 } │ │ │ │ │ -00161 │ │ │ │ │ - │ │ │ │ │ -5.34 │ │ │ │ │ - │ │ │ │ │ -momentum.cpp │ │ │ │ │ - │ │ │ │ │ -00001 │ │ │ │ │ -00002 // File: momentum.cpp │ │ │ │ │ -// │ │ │ │ │ -00003 // Description: source file for 4-momentum class Cmomentum │ │ │ │ │ -// │ │ │ │ │ -00004 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00005 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ -// │ │ │ │ │ -00006 // │ │ │ │ │ -an adaptation to spherical coordinates │ │ │ │ │ -// │ │ │ │ │ -00007 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00008 // │ │ │ │ │ -// │ │ │ │ │ -00009 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ -00010 // │ │ │ │ │ -// │ │ │ │ │ -00011 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00012 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00013 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00014 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00015 // │ │ │ │ │ -// │ │ │ │ │ -00016 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00019 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00020 // │ │ │ │ │ -// │ │ │ │ │ -00021 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00022 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00024 // │ │ │ │ │ -// │ │ │ │ │ -00025 // $Revision:: 255 │ │ │ │ │ -$// │ │ │ │ │ -00026 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008) │ │ │ │ │ -$// │ │ │ │ │ -00028 │ │ │ │ │ -00029 #include "momentum.h" │ │ │ │ │ -00030 #include │ │ │ │ │ -00031 #include │ │ │ │ │ -00032 │ │ │ │ │ -00033 namespace siscone_spherical{ │ │ │ │ │ -00034 │ │ │ │ │ -00035 /************************************************************************* │ │ │ │ │ -00036 * class CSph3vector │ │ │ │ │ -* │ │ │ │ │ -00037 * This class contains the information for particle or group of │ │ │ │ │ -* │ │ │ │ │ -00038 * particles management. │ │ │ │ │ -* │ │ │ │ │ -00039 *************************************************************************/ │ │ │ │ │ -00040 │ │ │ │ │ -00041 // default ctor │ │ │ │ │ -00042 //-------------00043 CSph3vector::CSph3vector(){ │ │ │ │ │ -00044 │ │ │ │ │ -_theta = _phi = _norm = 0.0; │ │ │ │ │ -00045 │ │ │ │ │ -px = py = pz = 0.0; │ │ │ │ │ -00046 │ │ │ │ │ -ref = siscone::Creference(); │ │ │ │ │ -00047 } │ │ │ │ │ -00048 │ │ │ │ │ -00049 // ctor with initialisation │ │ │ │ │ -00050 //-------------------------00051 CSph3vector::CSph3vector(double _px, double _py, double _pz){ │ │ │ │ │ -00052 │ │ │ │ │ -px = _px; │ │ │ │ │ -00053 │ │ │ │ │ -py = _py; │ │ │ │ │ -00054 │ │ │ │ │ -pz = _pz; │ │ │ │ │ -00055 │ │ │ │ │ -00056 │ │ │ │ │ -// compute the norm │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ - 230 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00057 │ │ │ │ │ -build_norm(); │ │ │ │ │ -00058 │ │ │ │ │ -00059 │ │ │ │ │ -ref = siscone::Creference(); │ │ │ │ │ -00060 } │ │ │ │ │ -00061 │ │ │ │ │ -00062 // default dtor │ │ │ │ │ -00063 //-------------00064 CSph3vector::~CSph3vector(){ │ │ │ │ │ -00065 │ │ │ │ │ -00066 } │ │ │ │ │ -00067 │ │ │ │ │ -00068 │ │ │ │ │ -00069 // assignment of vectors │ │ │ │ │ -00070 //----------------------00071 CSph3vector& CSph3vector::operator = (const CSph3vector &v){ │ │ │ │ │ -00072 │ │ │ │ │ -px = v.px; │ │ │ │ │ -00073 │ │ │ │ │ -py = v.py; │ │ │ │ │ -00074 │ │ │ │ │ -pz = v.pz; │ │ │ │ │ -00075 │ │ │ │ │ -00076 │ │ │ │ │ -_norm = v._norm; │ │ │ │ │ -00077 │ │ │ │ │ -_theta = v._theta; │ │ │ │ │ -00078 │ │ │ │ │ -_phi │ │ │ │ │ -= v._phi; │ │ │ │ │ -00079 │ │ │ │ │ -00080 │ │ │ │ │ -ref = v.ref; │ │ │ │ │ -00081 │ │ │ │ │ -return *this; │ │ │ │ │ -00082 } │ │ │ │ │ -00083 │ │ │ │ │ -00084 // addition of vectors │ │ │ │ │ -00085 //-----------------------------------------------00086 const CSph3vector CSph3vector::operator + (const CSph3vector &v){ │ │ │ │ │ -00087 │ │ │ │ │ -CSph3vector tmp = *this; │ │ │ │ │ -00088 │ │ │ │ │ -return tmp+=v; │ │ │ │ │ -00089 } │ │ │ │ │ -00090 │ │ │ │ │ -00091 // subtraction of vectors │ │ │ │ │ -00092 //-----------------------------------------------00093 const CSph3vector CSph3vector::operator - (const CSph3vector &v){ │ │ │ │ │ -00094 │ │ │ │ │ -CSph3vector tmp = *this; │ │ │ │ │ -00095 │ │ │ │ │ -return tmp-=v; │ │ │ │ │ -00096 } │ │ │ │ │ -00097 │ │ │ │ │ -00098 // division by constant │ │ │ │ │ -00099 //-----------------------------------------------00100 const CSph3vector CSph3vector::operator / (const double &r){ │ │ │ │ │ -00101 │ │ │ │ │ -CSph3vector tmp = *this; │ │ │ │ │ -00102 │ │ │ │ │ -return tmp/=r; │ │ │ │ │ -00103 } │ │ │ │ │ -00104 │ │ │ │ │ -00105 // incrementation │ │ │ │ │ -00106 //-----------------------------------------------00107 CSph3vector& CSph3vector::operator += (const CSph3vector &v){ │ │ │ │ │ -00108 │ │ │ │ │ -px+=v.px; │ │ │ │ │ -00109 │ │ │ │ │ -py+=v.py; │ │ │ │ │ -00110 │ │ │ │ │ -pz+=v.pz; │ │ │ │ │ -00111 │ │ │ │ │ -00112 │ │ │ │ │ -return *this; │ │ │ │ │ -00113 } │ │ │ │ │ -00114 │ │ │ │ │ -00115 // decrementation │ │ │ │ │ -00116 //-----------------------------------------------00117 CSph3vector& CSph3vector::operator -= (const CSph3vector &v){ │ │ │ │ │ -00118 │ │ │ │ │ -px-=v.px; │ │ │ │ │ -00119 │ │ │ │ │ -py-=v.py; │ │ │ │ │ -00120 │ │ │ │ │ -pz-=v.pz; │ │ │ │ │ -00121 │ │ │ │ │ -00122 │ │ │ │ │ -return *this; │ │ │ │ │ -00123 } │ │ │ │ │ -00124 │ │ │ │ │ -00125 // multiplication by a constant │ │ │ │ │ -00126 //-----------------------------------------------00127 CSph3vector& CSph3vector::operator *= (const double &r){ │ │ │ │ │ -00128 │ │ │ │ │ -px*=r; │ │ │ │ │ -00129 │ │ │ │ │ -py*=r; │ │ │ │ │ -00130 │ │ │ │ │ -pz*=r; │ │ │ │ │ -00131 │ │ │ │ │ -00132 │ │ │ │ │ -return *this; │ │ │ │ │ -00133 } │ │ │ │ │ -00134 │ │ │ │ │ -00135 // division by a constant │ │ │ │ │ -00136 //-----------------------------------------------00137 CSph3vector& CSph3vector::operator /= (const double &r){ │ │ │ │ │ -00138 │ │ │ │ │ -px/=r; │ │ │ │ │ -00139 │ │ │ │ │ -py/=r; │ │ │ │ │ -00140 │ │ │ │ │ -pz/=r; │ │ │ │ │ -00141 │ │ │ │ │ -00142 │ │ │ │ │ -_norm/=r; │ │ │ │ │ -00143 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.34 momentum.cpp │ │ │ │ │ - │ │ │ │ │ -00144 │ │ │ │ │ -return *this; │ │ │ │ │ -00145 } │ │ │ │ │ -00146 │ │ │ │ │ -00147 // build norm from 3-momentum info │ │ │ │ │ -00148 void CSph3vector::build_norm(){ │ │ │ │ │ -00149 │ │ │ │ │ -_norm = norm(); │ │ │ │ │ -00150 } │ │ │ │ │ -00151 │ │ │ │ │ -00152 // build norm from 3-momentum info │ │ │ │ │ -00153 void CSph3vector::build_thetaphi(){ │ │ │ │ │ -00154 │ │ │ │ │ -_theta = theta(); │ │ │ │ │ -00155 │ │ │ │ │ -_phi = phi(); │ │ │ │ │ -00156 } │ │ │ │ │ -00157 │ │ │ │ │ -00158 │ │ │ │ │ -00159 // for this direction, compute the two reference directions │ │ │ │ │ -00160 // used to measure angles │ │ │ │ │ -00161 void CSph3vector::get_angular_directions(CSph3vector &angular_dir1, CSph3vector &angular_dir2){ │ │ │ │ │ -00162 │ │ │ │ │ -if (px < py){ │ │ │ │ │ -00163 │ │ │ │ │ -if (pz < px){ │ │ │ │ │ -00164 │ │ │ │ │ -// z smallest │ │ │ │ │ -00165 │ │ │ │ │ -angular_dir1 = CSph3vector(-py, px, 0.0); │ │ │ │ │ -00166 │ │ │ │ │ -} else { │ │ │ │ │ -00167 │ │ │ │ │ -// x smallest │ │ │ │ │ -00168 │ │ │ │ │ -angular_dir1 = CSph3vector(0.0, -pz, py); │ │ │ │ │ -00169 │ │ │ │ │ -} │ │ │ │ │ -00170 │ │ │ │ │ -} else { │ │ │ │ │ -00171 │ │ │ │ │ -if (pz < py){ │ │ │ │ │ -00172 │ │ │ │ │ -// z smallest │ │ │ │ │ -00173 │ │ │ │ │ -angular_dir1 = CSph3vector(-py, px, 0.0); │ │ │ │ │ -00174 │ │ │ │ │ -} else { │ │ │ │ │ -00175 │ │ │ │ │ -// y smallest │ │ │ │ │ -00176 │ │ │ │ │ -angular_dir1 = CSph3vector(-pz, 0.0, px); │ │ │ │ │ -00177 │ │ │ │ │ -} │ │ │ │ │ -00178 │ │ │ │ │ -} │ │ │ │ │ -00179 │ │ │ │ │ -angular_dir2 = cross_product3(*this, angular_dir1); │ │ │ │ │ -00180 │ │ │ │ │ -// We’ll simply take x & y so the reflection symmetry is not broken │ │ │ │ │ -00181 │ │ │ │ │ -//angular_dir1 = CSph3vector(0.0, -pz, py); │ │ │ │ │ -00182 │ │ │ │ │ -//angular_dir2 = CSph3vector(-pz, 0.0, -px); │ │ │ │ │ -00183 } │ │ │ │ │ -00184 │ │ │ │ │ -00185 /************************************************************************* │ │ │ │ │ -00186 * class CSphmomentum │ │ │ │ │ -* │ │ │ │ │ -00187 * This class contains the information for particle or group of │ │ │ │ │ -* │ │ │ │ │ -00188 * particles management. │ │ │ │ │ -* │ │ │ │ │ -00189 * It includes all Lorentz properties as well as tools for summing them. * │ │ │ │ │ -00190 *************************************************************************/ │ │ │ │ │ -00191 │ │ │ │ │ -00192 // default ctor │ │ │ │ │ -00193 //-------------00194 CSphmomentum::CSphmomentum(){ │ │ │ │ │ -00195 │ │ │ │ │ -E=0.0; │ │ │ │ │ -00196 │ │ │ │ │ -index = -1; │ │ │ │ │ -00197 } │ │ │ │ │ -00198 │ │ │ │ │ -00199 // ctor with initialisation │ │ │ │ │ -00200 //-------------------------00201 CSphmomentum::CSphmomentum(double _px, double _py, double _pz, double _E) │ │ │ │ │ -00202 │ │ │ │ │ -: CSph3vector(_px, _py, _pz) { │ │ │ │ │ -00203 │ │ │ │ │ -E = _E; │ │ │ │ │ -00204 │ │ │ │ │ -00205 │ │ │ │ │ -// compute the angles │ │ │ │ │ -00206 │ │ │ │ │ -build_thetaphi(); │ │ │ │ │ -00207 } │ │ │ │ │ -00208 │ │ │ │ │ -00209 // ctor with initialisation │ │ │ │ │ -00210 //-------------------------00211 CSphmomentum::CSphmomentum(CSph3vector &_v, double _E) │ │ │ │ │ -00212 │ │ │ │ │ -: CSph3vector(_v.px, _v.py, _v.pz) { │ │ │ │ │ -00213 │ │ │ │ │ -E = _E; │ │ │ │ │ -00214 } │ │ │ │ │ -00215 │ │ │ │ │ -00216 // default dtor │ │ │ │ │ -00217 //-------------00218 CSphmomentum::~CSphmomentum(){ │ │ │ │ │ -00219 │ │ │ │ │ -00220 } │ │ │ │ │ -00221 │ │ │ │ │ -00222 // assignment of vectors │ │ │ │ │ -00223 //----------------------00224 CSphmomentum& CSphmomentum::operator = (const CSphmomentum &v){ │ │ │ │ │ -00225 │ │ │ │ │ -px = v.px; │ │ │ │ │ -00226 │ │ │ │ │ -py = v.py; │ │ │ │ │ -00227 │ │ │ │ │ -pz = v.pz; │ │ │ │ │ -00228 │ │ │ │ │ -E = v.E; │ │ │ │ │ -00229 │ │ │ │ │ -00230 │ │ │ │ │ -_norm = v._norm; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -231 │ │ │ │ │ - │ │ │ │ │ - 232 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00231 │ │ │ │ │ -_theta = v._theta; │ │ │ │ │ -00232 │ │ │ │ │ -_phi │ │ │ │ │ -= v._phi; │ │ │ │ │ -00233 │ │ │ │ │ -00234 │ │ │ │ │ -ref = v.ref; │ │ │ │ │ -00235 │ │ │ │ │ -return *this; │ │ │ │ │ -00236 } │ │ │ │ │ -00237 │ │ │ │ │ -00238 // addition of vectors │ │ │ │ │ -00239 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ -00240 //-----------------------------------------------00241 const CSphmomentum CSphmomentum::operator + (const CSphmomentum &v){ │ │ │ │ │ -00242 │ │ │ │ │ -CSphmomentum tmp = *this; │ │ │ │ │ -00243 │ │ │ │ │ -return tmp+=v; │ │ │ │ │ -00244 } │ │ │ │ │ -00245 │ │ │ │ │ -00246 // incrementation of vectors │ │ │ │ │ -00247 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ -00248 //-----------------------------------------------00249 CSphmomentum& CSphmomentum::operator += (const CSphmomentum &v){ │ │ │ │ │ -00250 │ │ │ │ │ -px+=v.px; │ │ │ │ │ -00251 │ │ │ │ │ -py+=v.py; │ │ │ │ │ -00252 │ │ │ │ │ -pz+=v.pz; │ │ │ │ │ -00253 │ │ │ │ │ -E +=v.E; │ │ │ │ │ -00254 │ │ │ │ │ -00255 │ │ │ │ │ -ref+=v.ref; │ │ │ │ │ -00256 │ │ │ │ │ -00257 │ │ │ │ │ -return *this; │ │ │ │ │ -00258 } │ │ │ │ │ -00259 │ │ │ │ │ -00260 // decrementation of vectors │ │ │ │ │ -00261 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ -00262 //-----------------------------------------------00263 CSphmomentum& CSphmomentum::operator -= (const CSphmomentum &v){ │ │ │ │ │ -00264 │ │ │ │ │ -px-=v.px; │ │ │ │ │ -00265 │ │ │ │ │ -py-=v.py; │ │ │ │ │ -00266 │ │ │ │ │ -pz-=v.pz; │ │ │ │ │ -00267 │ │ │ │ │ -E -=v.E; │ │ │ │ │ -00268 │ │ │ │ │ -00269 │ │ │ │ │ -ref-=v.ref; │ │ │ │ │ -00270 │ │ │ │ │ -return *this; │ │ │ │ │ -00271 } │ │ │ │ │ -00272 │ │ │ │ │ -00273 │ │ │ │ │ -00274 // ordering of two vectors │ │ │ │ │ -00275 // the default ordering is w.r.t. their references │ │ │ │ │ -00276 //------------------------------------------------00277 bool operator < (const CSphmomentum &v1, const CSphmomentum &v2){ │ │ │ │ │ -00278 │ │ │ │ │ -return v1.ref < v2.ref; │ │ │ │ │ -00279 } │ │ │ │ │ -00280 │ │ │ │ │ -00281 // ordering of vectors in eta (e.g. used in collinear tests) │ │ │ │ │ -00282 //----------------------------------------------------------00283 bool momentum_theta_less(const CSphmomentum &v1, const CSphmomentum &v2){ │ │ │ │ │ -00284 │ │ │ │ │ -return v1._theta < v2._theta; │ │ │ │ │ -00285 } │ │ │ │ │ -00286 │ │ │ │ │ -00287 // ordering of vectors in pt │ │ │ │ │ -00288 //--------------------------00289 bool momentum_pt_less(const CSphmomentum &v1, const CSphmomentum &v2){ │ │ │ │ │ -00290 │ │ │ │ │ -return v1.perp2() < v2.perp2(); │ │ │ │ │ -00291 } │ │ │ │ │ -00292 │ │ │ │ │ -00293 } │ │ │ │ │ -00294 │ │ │ │ │ - │ │ │ │ │ -5.35 │ │ │ │ │ +5.18 │ │ │ │ │ │ │ │ │ │ momentum.h │ │ │ │ │ │ │ │ │ │ 00001 // -*- C++ -*00003 // File: momentum.h │ │ │ │ │ -00004 // Description: header file for 4-momentum class Cmomentum │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -00007 // │ │ │ │ │ -00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -00009 // │ │ │ │ │ -00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -00013 // (at your option) any later version. │ │ │ │ │ -00014 // │ │ │ │ │ -00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ - │ │ │ │ │ // │ │ │ │ │ +00004 // Description: header file for 4-momentum class Cmomentum │ │ │ │ │ // │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ // │ │ │ │ │ +00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ // │ │ │ │ │ +00007 // │ │ │ │ │ // │ │ │ │ │ +00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ // │ │ │ │ │ +00009 // │ │ │ │ │ // │ │ │ │ │ +00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ // │ │ │ │ │ +00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ // │ │ │ │ │ +00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ // │ │ │ │ │ +00013 // (at your option) any later version. │ │ │ │ │ // │ │ │ │ │ +00014 // │ │ │ │ │ // │ │ │ │ │ +00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ // │ │ │ │ │ +00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ // │ │ │ │ │ +00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ // │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.35 momentum.h │ │ │ │ │ - │ │ │ │ │ 00018 // GNU General Public License for more details. │ │ │ │ │ // │ │ │ │ │ 00019 // │ │ │ │ │ // │ │ │ │ │ 00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ // │ │ │ │ │ 00021 // along with this program; if not, write to the Free Software │ │ │ │ │ @@ -19683,14 +15894,19 @@ │ │ │ │ │ 00071 │ │ │ │ │ 00073 │ │ │ │ │ inline double mass2() const {return perpmass2()-perp2();} │ │ │ │ │ 00074 │ │ │ │ │ 00076 │ │ │ │ │ inline double perpmass() const {return sqrt((E-pz)*(E+pz));} │ │ │ │ │ 00077 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.19 momentum.h │ │ │ │ │ + │ │ │ │ │ 00079 │ │ │ │ │ inline double perpmass2() const {return (E-pz)*(E+pz);} │ │ │ │ │ 00080 │ │ │ │ │ 00082 │ │ │ │ │ inline double Et() const {return E/sqrt(1.0+pz*pz/perp2());} │ │ │ │ │ 00083 │ │ │ │ │ 00085 │ │ │ │ │ @@ -19753,32 +15969,23 @@ │ │ │ │ │ 00148 │ │ │ │ │ dy = fabs(phi - v->phi); │ │ │ │ │ 00149 │ │ │ │ │ if (dy>M_PI) │ │ │ │ │ 00150 │ │ │ │ │ dy -= twopi; │ │ │ │ │ 00151 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -233 │ │ │ │ │ - │ │ │ │ │ - 234 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00152 │ │ │ │ │ return dx*dx+dy*dy; │ │ │ │ │ 00153 } │ │ │ │ │ 00154 │ │ │ │ │ 00155 } │ │ │ │ │ 00156 │ │ │ │ │ 00157 #endif │ │ │ │ │ │ │ │ │ │ -5.36 │ │ │ │ │ +5.19 │ │ │ │ │ │ │ │ │ │ momentum.h │ │ │ │ │ │ │ │ │ │ 00001 // -*- C++ -*00003 // File: momentum.h │ │ │ │ │ // │ │ │ │ │ 00004 // Description: header file for 4-momentum class Cmomentum │ │ │ │ │ // │ │ │ │ │ @@ -19825,14 +16032,23 @@ │ │ │ │ │ 00025 // │ │ │ │ │ // │ │ │ │ │ 00026 // $Revision:: 256 │ │ │ │ │ $// │ │ │ │ │ 00027 // $Date:: 2008-07-14 13:52:16 +0200 (Mon, 14 Jul 2008) │ │ │ │ │ $// │ │ │ │ │ 00029 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +205 │ │ │ │ │ + │ │ │ │ │ + 206 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00030 #ifndef __SPH_VECTOR_H__ │ │ │ │ │ 00031 #define __SPH_VECTOR_H__ │ │ │ │ │ 00032 │ │ │ │ │ 00033 #include │ │ │ │ │ 00034 #include │ │ │ │ │ 00035 #include │ │ │ │ │ 00036 #include "geom_2d.h" │ │ │ │ │ @@ -19889,19 +16105,14 @@ │ │ │ │ │ 00107 │ │ │ │ │ 00109 │ │ │ │ │ inline double phi() const {return atan2(py, px);} │ │ │ │ │ 00110 │ │ │ │ │ 00112 │ │ │ │ │ inline double theta() const {return atan2(perp(),pz);} │ │ │ │ │ 00113 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.36 momentum.h │ │ │ │ │ - │ │ │ │ │ 00120 │ │ │ │ │ void build_norm(); │ │ │ │ │ 00121 │ │ │ │ │ 00125 │ │ │ │ │ void build_thetaphi(); │ │ │ │ │ 00126 │ │ │ │ │ 00129 │ │ │ │ │ @@ -19955,14 +16166,21 @@ │ │ │ │ │ 00183 │ │ │ │ │ 00185 │ │ │ │ │ inline double perpmass2() const {return (E-pz)*(E+pz);} │ │ │ │ │ 00186 │ │ │ │ │ 00188 │ │ │ │ │ inline double Et() const {return E/sqrt(1.0+pz*pz/perp2());} │ │ │ │ │ 00189 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.20 protocones.cpp │ │ │ │ │ + │ │ │ │ │ +207 │ │ │ │ │ + │ │ │ │ │ 00191 │ │ │ │ │ inline double Et2() const {return E*E/(1.0+pz*pz/perp2());} │ │ │ │ │ 00192 │ │ │ │ │ 00194 │ │ │ │ │ CSphmomentum& operator = (const CSphmomentum &v); │ │ │ │ │ 00195 │ │ │ │ │ 00198 │ │ │ │ │ @@ -20027,23 +16245,14 @@ │ │ │ │ │ //tmp.pz = v1.px*v2.py-v1.py*v2.px; │ │ │ │ │ 00254 │ │ │ │ │ //return tmp; │ │ │ │ │ 00255 │ │ │ │ │ return CSph3vector(v1.py*v2.pz-v1.pz*v2.py, │ │ │ │ │ 00256 │ │ │ │ │ v1.pz*v2.px-v1.px*v2.pz, │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -235 │ │ │ │ │ - │ │ │ │ │ - 236 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00257 │ │ │ │ │ v1.px*v2.py-v1.py*v2.px); │ │ │ │ │ 00258 } │ │ │ │ │ 00259 │ │ │ │ │ 00263 inline double norm2_cross_product3(const CSph3vector &v1, const CSph3vector &v2){ │ │ │ │ │ 00264 │ │ │ │ │ return sqr(v1.py*v2.pz-v1.pz*v2.py) + sqr(v1.pz*v2.px-v1.px*v2.pz) + sqr(v1.px*v2.py-v1.py*v2.px); │ │ │ │ │ @@ -20080,19 +16289,26 @@ │ │ │ │ │ CSph3vector tmp = v; │ │ │ │ │ 00309 │ │ │ │ │ return tmp*=r; │ │ │ │ │ 00310 } │ │ │ │ │ 00311 } │ │ │ │ │ 00312 #endif │ │ │ │ │ │ │ │ │ │ -5.37 │ │ │ │ │ +5.20 │ │ │ │ │ │ │ │ │ │ protocones.cpp │ │ │ │ │ │ │ │ │ │ 00001 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 208 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00002 // File: protocones.cpp │ │ │ │ │ // │ │ │ │ │ 00003 // Description: source file for stable cones determination (Cstable_cones) │ │ │ │ │ // │ │ │ │ │ 00004 // This file is part of the SISCone project. │ │ │ │ │ // │ │ │ │ │ 00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ @@ -20175,19 +16391,14 @@ │ │ │ │ │ * │ │ │ │ │ 00047 * - test_stability(candidate, border_list) │ │ │ │ │ * │ │ │ │ │ 00048 * - updat_cone_cocircular() │ │ │ │ │ * │ │ │ │ │ 00049 * RECOMPUTATION OF CONE CONTENTS │ │ │ │ │ * │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.37 protocones.cpp │ │ │ │ │ - │ │ │ │ │ 00050 * - compute_cone_contents() │ │ │ │ │ * │ │ │ │ │ 00051 * - recompute_cone_contents() │ │ │ │ │ * │ │ │ │ │ 00052 * - recompute_cone_contents_if_needed() │ │ │ │ │ * │ │ │ │ │ 00053 * VARIOUS TOOLS │ │ │ │ │ @@ -20238,14 +16449,19 @@ │ │ │ │ │ 00086 │ │ │ │ │ 00087 // default ctor │ │ │ │ │ 00088 //-------------00089 Cstable_cones::Cstable_cones(){ │ │ │ │ │ 00090 │ │ │ │ │ nb_tot = 0; │ │ │ │ │ 00091 │ │ │ │ │ hc = NULL; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.20 protocones.cpp │ │ │ │ │ + │ │ │ │ │ 00092 } │ │ │ │ │ 00093 │ │ │ │ │ 00094 // ctor with initialisation │ │ │ │ │ 00095 //-------------------------00096 Cstable_cones::Cstable_cones(vector &_particle_list) │ │ │ │ │ 00097 │ │ │ │ │ : Cvicinity(_particle_list){ │ │ │ │ │ 00098 │ │ │ │ │ @@ -20299,23 +16515,14 @@ │ │ │ │ │ 00134 /* │ │ │ │ │ 00135 * compute stable cones. │ │ │ │ │ 00136 * This function really does the job i.e. computes │ │ │ │ │ 00137 * the list of stable cones (in a seedless way) │ │ │ │ │ 00138 * - _radius: radius of the cones │ │ │ │ │ 00139 * The number of stable cones found is returned │ │ │ │ │ 00140 *********************************************************************/ │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -237 │ │ │ │ │ - │ │ │ │ │ - 238 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00141 int Cstable_cones::get_stable_cones(double _radius){ │ │ │ │ │ 00142 │ │ │ │ │ int p_idx; │ │ │ │ │ 00143 │ │ │ │ │ 00144 │ │ │ │ │ // check if everything is correctly initialised │ │ │ │ │ 00145 │ │ │ │ │ @@ -20381,14 +16588,23 @@ │ │ │ │ │ 00177 │ │ │ │ │ } while (!update_cone()); │ │ │ │ │ 00178 │ │ │ │ │ } │ │ │ │ │ 00179 │ │ │ │ │ 00180 │ │ │ │ │ return proceed_with_stability(); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +209 │ │ │ │ │ + │ │ │ │ │ + 210 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00181 } │ │ │ │ │ 00182 │ │ │ │ │ 00183 │ │ │ │ │ 00185 // ALGORITHM MAIN STEPS │ │ │ │ │ // │ │ │ │ │ 00186 // - init_cone() │ │ │ │ │ // │ │ │ │ │ @@ -20452,19 +16668,14 @@ │ │ │ │ │ return 0; │ │ │ │ │ 00224 } │ │ │ │ │ 00225 │ │ │ │ │ 00226 │ │ │ │ │ 00227 /* │ │ │ │ │ 00228 * test cones. │ │ │ │ │ 00229 * We check if the cone(s) built with the present parent and child │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.37 protocones.cpp │ │ │ │ │ - │ │ │ │ │ 00230 * are stable │ │ │ │ │ 00231 * return 0 on success 1 on error │ │ │ │ │ 00232 *********************************************************************/ │ │ │ │ │ 00233 int Cstable_cones::test_cone(){ │ │ │ │ │ 00234 │ │ │ │ │ Creference weighted_cone_ref; │ │ │ │ │ 00235 │ │ │ │ │ @@ -20526,14 +16737,19 @@ │ │ │ │ │ hc->insert(&cone_candidate, parent, child, false, true); │ │ │ │ │ 00266 │ │ │ │ │ } │ │ │ │ │ 00267 │ │ │ │ │ 00268 │ │ │ │ │ nb_tot+=2; │ │ │ │ │ 00269 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.20 protocones.cpp │ │ │ │ │ + │ │ │ │ │ 00270 │ │ │ │ │ return 0; │ │ │ │ │ 00271 } │ │ │ │ │ 00272 │ │ │ │ │ 00273 │ │ │ │ │ 00274 /* │ │ │ │ │ 00275 * update the cone │ │ │ │ │ @@ -20604,23 +16820,14 @@ │ │ │ │ │ return update_cone(); │ │ │ │ │ 00313 │ │ │ │ │ 00314 │ │ │ │ │ 00315 │ │ │ │ │ // update the cone w.r.t. the new child │ │ │ │ │ 00316 │ │ │ │ │ // only required if the new child was already inside in which │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -239 │ │ │ │ │ - │ │ │ │ │ - 240 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00317 │ │ │ │ │ // case we need to remove it. We also know that the child is │ │ │ │ │ 00318 │ │ │ │ │ // inside iff its side is +. │ │ │ │ │ 00319 │ │ │ │ │ if ((centre->side) && (cone.ref.not_empty())){ │ │ │ │ │ 00320 │ │ │ │ │ @@ -20679,14 +16886,23 @@ │ │ │ │ │ 00353 │ │ │ │ │ int i; // ,n; │ │ │ │ │ 00354 │ │ │ │ │ hash_element *elm; │ │ │ │ │ 00355 │ │ │ │ │ 00356 │ │ │ │ │ //n=0; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +211 │ │ │ │ │ + │ │ │ │ │ + 212 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00357 │ │ │ │ │ for (i=0;i<=hc->mask;i++){ │ │ │ │ │ 00358 │ │ │ │ │ // test ith cell of the hash array │ │ │ │ │ 00359 │ │ │ │ │ elm = hc->hash_array[i]; │ │ │ │ │ 00360 │ │ │ │ │ @@ -20761,19 +16977,14 @@ │ │ │ │ │ 00399 } │ │ │ │ │ 00400 │ │ │ │ │ 00401 │ │ │ │ │ 00403 // ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS │ │ │ │ │ // │ │ │ │ │ 00404 // - cocircular_pt_less(v1, v2) │ │ │ │ │ // │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.37 protocones.cpp │ │ │ │ │ - │ │ │ │ │ 00405 // - prepare_cocircular_list() │ │ │ │ │ // │ │ │ │ │ 00406 // - test_cone_cocircular() │ │ │ │ │ // │ │ │ │ │ 00407 // - test_stability(candidate, border_vect) │ │ │ │ │ // │ │ │ │ │ 00408 // - updat_cone_cocircular() │ │ │ │ │ @@ -20830,14 +17041,21 @@ │ │ │ │ │ } else { │ │ │ │ │ 00444 │ │ │ │ │ break; │ │ │ │ │ 00445 │ │ │ │ │ } │ │ │ │ │ 00446 │ │ │ │ │ } │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.20 protocones.cpp │ │ │ │ │ + │ │ │ │ │ +213 │ │ │ │ │ + │ │ │ │ │ 00447 │ │ │ │ │ 00448 │ │ │ │ │ // search backwards │ │ │ │ │ 00449 │ │ │ │ │ search.set_position(here); │ │ │ │ │ 00450 │ │ │ │ │ while (true) { │ │ │ │ │ @@ -20907,23 +17125,14 @@ │ │ │ │ │ 00490 │ │ │ │ │ circulator::iterator > mid(start), end(start); │ │ │ │ │ 00491 │ │ │ │ │ 00492 │ │ │ │ │ // test the borderless cone │ │ │ │ │ 00493 │ │ │ │ │ Cmomentum candidate = borderless_cone; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -241 │ │ │ │ │ - │ │ │ │ │ - 242 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00494 │ │ │ │ │ candidate.build_etaphi(); │ │ │ │ │ 00495 │ │ │ │ │ if (candidate.ref.not_empty()) │ │ │ │ │ 00496 │ │ │ │ │ test_stability(candidate, border_vect); │ │ │ │ │ 00497 │ │ │ │ │ @@ -20986,14 +17195,21 @@ │ │ │ │ │ for (unsigned i = 0; i < border_vect.size(); i++) { │ │ │ │ │ 00537 │ │ │ │ │ if (is_inside(&candidate, border_vect[i].mom) ^ (border_vect[i].is_in)) { │ │ │ │ │ 00538 │ │ │ │ │ stable = false; │ │ │ │ │ 00539 │ │ │ │ │ break; // it’s unstable so there’s no point continuing │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 214 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00540 │ │ │ │ │ } │ │ │ │ │ 00541 │ │ │ │ │ } │ │ │ │ │ 00542 │ │ │ │ │ 00543 │ │ │ │ │ if (stable) hc->insert(&candidate); │ │ │ │ │ @@ -21060,19 +17276,14 @@ │ │ │ │ │ 00583 │ │ │ │ │ Cmomentum cone_removal; │ │ │ │ │ 00584 │ │ │ │ │ Cmomentum border = *parent; │ │ │ │ │ 00585 │ │ │ │ │ border_list.push_back(parent); │ │ │ │ │ 00586 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.37 protocones.cpp │ │ │ │ │ - │ │ │ │ │ 00587 │ │ │ │ │ // make sure child appears in the border region │ │ │ │ │ 00588 │ │ │ │ │ centre->cocircular.push_back(centre); │ │ │ │ │ 00589 │ │ │ │ │ 00590 │ │ │ │ │ // now establish the full contents of the cone minus the cocircular │ │ │ │ │ @@ -21140,14 +17351,19 @@ │ │ │ │ │ 00623 │ │ │ │ │ 00624 │ │ │ │ │ // now prepare the hard work │ │ │ │ │ 00625 │ │ │ │ │ if (consider) { │ │ │ │ │ 00626 │ │ │ │ │ // record the fact that we’ve now seen this combination │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.20 protocones.cpp │ │ │ │ │ + │ │ │ │ │ 00627 │ │ │ │ │ multiple_centre_done.push_back(pair(borderless_cone.ref, │ │ │ │ │ 00628 │ │ │ │ │ border.ref)); │ │ │ │ │ 00629 │ │ │ │ │ 00630 │ │ │ │ │ // first figure out whether our cone momentum is good │ │ │ │ │ @@ -21221,23 +17437,14 @@ │ │ │ │ │ 00680 │ │ │ │ │ circulator::iterator > │ │ │ │ │ 00681 │ │ │ │ │ start(vicinity.begin()+first_cone, vicinity.begin(), vicinity.end()); │ │ │ │ │ 00682 │ │ │ │ │ 00683 │ │ │ │ │ circulator::iterator > here(start); │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -243 │ │ │ │ │ - │ │ │ │ │ - 244 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00684 │ │ │ │ │ 00685 │ │ │ │ │ // note that in the following algorithm, the cone contents never includes │ │ │ │ │ 00686 │ │ │ │ │ // the child. Indeed, if it has positive sign, then it will be set as │ │ │ │ │ 00687 │ │ │ │ │ // outside at the last step in the loop. If it has negative sign, then the │ │ │ │ │ @@ -21293,14 +17500,23 @@ │ │ │ │ │ unsigned int i; │ │ │ │ │ 00720 │ │ │ │ │ 00721 │ │ │ │ │ // set momentum to 0 │ │ │ │ │ 00722 │ │ │ │ │ cone = Cmomentum(); │ │ │ │ │ 00723 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +215 │ │ │ │ │ + │ │ │ │ │ + 216 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00724 │ │ │ │ │ // Important note: we can browse only the particles │ │ │ │ │ 00725 │ │ │ │ │ // in vicinity since all particles in the cone are │ │ │ │ │ 00726 │ │ │ │ │ // withing a distance 2R w.r.t. parent hence in vicinity. │ │ │ │ │ 00727 │ │ │ │ │ @@ -21373,21 +17589,14 @@ │ │ │ │ │ } │ │ │ │ │ 00768 │ │ │ │ │ // set check variables back to 0 │ │ │ │ │ 00769 │ │ │ │ │ this_dpt = 0.0; │ │ │ │ │ 00770 │ │ │ │ │ } │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.38 protocones.cpp │ │ │ │ │ - │ │ │ │ │ -245 │ │ │ │ │ - │ │ │ │ │ 00771 │ │ │ │ │ 00772 } │ │ │ │ │ 00773 │ │ │ │ │ 00774 │ │ │ │ │ 00776 // VARIOUS TOOLS │ │ │ │ │ // │ │ │ │ │ 00777 // - circle_intersect() │ │ │ │ │ @@ -21441,14 +17650,19 @@ │ │ │ │ │ 00808 │ │ │ │ │ } │ │ │ │ │ 00809 │ │ │ │ │ 00810 │ │ │ │ │ return intersection; │ │ │ │ │ 00811 } │ │ │ │ │ 00812 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.21 protocones.cpp │ │ │ │ │ + │ │ │ │ │ 00813 /* │ │ │ │ │ 00814 * test if a particle is inside a cone of given centre. │ │ │ │ │ 00815 * check if the particle of coordinates ’v’ is inside the circle of radius R │ │ │ │ │ 00816 * centered at ’centre’. │ │ │ │ │ 00817 * - centre │ │ │ │ │ centre of the circle │ │ │ │ │ 00818 * - v │ │ │ │ │ @@ -21494,31 +17708,23 @@ │ │ │ │ │ 00845 │ │ │ │ │ 00846 │ │ │ │ │ return dphi; │ │ │ │ │ 00847 } │ │ │ │ │ 00848 │ │ │ │ │ 00849 } │ │ │ │ │ │ │ │ │ │ -5.38 │ │ │ │ │ +5.21 │ │ │ │ │ │ │ │ │ │ protocones.cpp │ │ │ │ │ │ │ │ │ │ 00001 │ │ │ │ │ 00002 // File: protocones.cpp │ │ │ │ │ +// │ │ │ │ │ 00003 // Description: source file for stable cones determination (Cstable_cones) │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ // │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ - 246 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00004 // This file is part of the SISCone project. │ │ │ │ │ // │ │ │ │ │ 00005 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ // │ │ │ │ │ 00006 // │ │ │ │ │ an adaptation to spherical coordinates │ │ │ │ │ // │ │ │ │ │ @@ -21588,14 +17794,23 @@ │ │ │ │ │ * │ │ │ │ │ 00042 * - test_cone() │ │ │ │ │ * │ │ │ │ │ 00043 * - update_cone() │ │ │ │ │ * │ │ │ │ │ 00044 * - proceed_with_stability() │ │ │ │ │ * │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +217 │ │ │ │ │ + │ │ │ │ │ + 218 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00045 * ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS │ │ │ │ │ * │ │ │ │ │ 00046 * - cocircular_pt_less(v1, v2) │ │ │ │ │ * │ │ │ │ │ 00047 * - prepare_cocircular_list() │ │ │ │ │ * │ │ │ │ │ 00048 * - test_cone_cocircular() │ │ │ │ │ @@ -21660,19 +17875,14 @@ │ │ │ │ │ 00088 │ │ │ │ │ 00089 // default ctor │ │ │ │ │ 00090 //-------------00091 CSphstable_cones::CSphstable_cones(){ │ │ │ │ │ 00092 │ │ │ │ │ nb_tot = 0; │ │ │ │ │ 00093 │ │ │ │ │ hc = NULL; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.38 protocones.cpp │ │ │ │ │ - │ │ │ │ │ 00094 } │ │ │ │ │ 00095 │ │ │ │ │ 00096 // ctor with initialisation │ │ │ │ │ 00097 //-------------------------00098 CSphstable_cones::CSphstable_cones(vector &_particle_list) │ │ │ │ │ 00099 │ │ │ │ │ : CSphvicinity(_particle_list){ │ │ │ │ │ 00100 │ │ │ │ │ @@ -21719,14 +17929,19 @@ │ │ │ │ │ 00129 │ │ │ │ │ 00130 │ │ │ │ │ 00132 // ALGORITHM MAIN ENTRY │ │ │ │ │ // │ │ │ │ │ 00133 // - get_stable_cone(radius) │ │ │ │ │ // │ │ │ │ │ 00135 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.21 protocones.cpp │ │ │ │ │ + │ │ │ │ │ 00136 /* │ │ │ │ │ 00137 * compute stable cones. │ │ │ │ │ 00138 * This function really does the job i.e. computes │ │ │ │ │ 00139 * the list of stable cones (in a seedless way) │ │ │ │ │ 00140 * - _radius: radius of the cones │ │ │ │ │ 00141 * The number of stable cones found is returned │ │ │ │ │ 00142 *********************************************************************/ │ │ │ │ │ @@ -21798,23 +18013,14 @@ │ │ │ │ │ 00179 │ │ │ │ │ // step 1: initialise with the first cone candidate │ │ │ │ │ 00180 │ │ │ │ │ init_cone(); │ │ │ │ │ 00181 │ │ │ │ │ 00182 │ │ │ │ │ do{ │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -247 │ │ │ │ │ - │ │ │ │ │ - 248 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00183 │ │ │ │ │ // step 2: test cone stability for that pair (P,C) │ │ │ │ │ 00184 │ │ │ │ │ test_cone(); │ │ │ │ │ 00185 │ │ │ │ │ 00186 │ │ │ │ │ // step 3: go to the next cone child candidate C │ │ │ │ │ @@ -21871,14 +18077,23 @@ │ │ │ │ │ 00221 │ │ │ │ │ // Hence, we do nothing here ! │ │ │ │ │ 00222 │ │ │ │ │ 00223 │ │ │ │ │ // init set child C │ │ │ │ │ 00224 │ │ │ │ │ centre = vicinity[first_cone]; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +219 │ │ │ │ │ + │ │ │ │ │ + 220 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00225 │ │ │ │ │ child = centre->v; │ │ │ │ │ 00226 │ │ │ │ │ centre_idx = first_cone; │ │ │ │ │ 00227 │ │ │ │ │ 00228 │ │ │ │ │ // build the initial cone (nodist: avoids calculating distances -00229 │ │ │ │ │ @@ -21961,19 +18176,14 @@ │ │ │ │ │ //UPDATED(see below): } else { │ │ │ │ │ 00270 │ │ │ │ │ //UPDATED(see below): │ │ │ │ │ // test when 1! of the particles is in the cone │ │ │ │ │ 00271 │ │ │ │ │ //UPDATED(see below): │ │ │ │ │ cone_candidate = cone + *parent; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.38 protocones.cpp │ │ │ │ │ - │ │ │ │ │ 00272 │ │ │ │ │ //UPDATED(see below): │ │ │ │ │ hc->insert(&cone_candidate, parent, child, true, false); │ │ │ │ │ 00273 │ │ │ │ │ //UPDATED(see below): │ │ │ │ │ 00274 │ │ │ │ │ //UPDATED(see below): │ │ │ │ │ @@ -22037,14 +18247,19 @@ │ │ │ │ │ 00306 │ │ │ │ │ return 0; │ │ │ │ │ 00307 } │ │ │ │ │ 00308 │ │ │ │ │ 00309 │ │ │ │ │ 00310 /* │ │ │ │ │ 00311 * update the cone │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.21 protocones.cpp │ │ │ │ │ + │ │ │ │ │ 00312 * go to the next child for that parent and update ’cone’ appropriately │ │ │ │ │ 00313 * return 0 if update candidate found, 1 otherwise │ │ │ │ │ 00314 ***********************************************************************/ │ │ │ │ │ 00315 int CSphstable_cones::update_cone(){ │ │ │ │ │ 00316 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ 00317 │ │ │ │ │ cout « "call ’circles_plot.gp’ ’" « centre->centre.px « "’ ’" │ │ │ │ │ @@ -22116,23 +18331,14 @@ │ │ │ │ │ 00355 │ │ │ │ │ //if (cocircular_check()) │ │ │ │ │ 00356 │ │ │ │ │ if (cocircular_check()){ │ │ │ │ │ 00357 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ 00358 │ │ │ │ │ cout « " Co-circular case detected" « endl; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -249 │ │ │ │ │ - │ │ │ │ │ - 250 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00359 #endif │ │ │ │ │ 00360 │ │ │ │ │ return update_cone(); │ │ │ │ │ 00361 │ │ │ │ │ } │ │ │ │ │ 00362 │ │ │ │ │ 00363 │ │ │ │ │ @@ -22193,14 +18399,23 @@ │ │ │ │ │ } │ │ │ │ │ 00394 │ │ │ │ │ 00395 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ 00396 │ │ │ │ │ cout « "’" « endl; │ │ │ │ │ 00397 #endif │ │ │ │ │ 00398 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +221 │ │ │ │ │ + │ │ │ │ │ + 222 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00399 │ │ │ │ │ return 0; │ │ │ │ │ 00400 } │ │ │ │ │ 00401 │ │ │ │ │ 00402 │ │ │ │ │ 00403 /* │ │ │ │ │ 00404 * compute stability of all enumerated candidates. │ │ │ │ │ @@ -22268,19 +18483,14 @@ │ │ │ │ │ nb_hash_occupied = hc->n_occupied_cells; │ │ │ │ │ 00442 #endif │ │ │ │ │ 00443 │ │ │ │ │ 00444 │ │ │ │ │ delete hc; │ │ │ │ │ 00445 │ │ │ │ │ hc=NULL; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.38 protocones.cpp │ │ │ │ │ - │ │ │ │ │ 00446 │ │ │ │ │ 00447 │ │ │ │ │ return protocones.size(); │ │ │ │ │ 00448 } │ │ │ │ │ 00449 │ │ │ │ │ 00450 │ │ │ │ │ 00452 // ALGORITHM MAIN STEPS FOR COCIRCULAR SITUATIONS │ │ │ │ │ @@ -22331,14 +18541,19 @@ │ │ │ │ │ // search forwards for things that should have "here" included in │ │ │ │ │ 00486 │ │ │ │ │ // their cocircularity list │ │ │ │ │ 00487 │ │ │ │ │ while (true) { │ │ │ │ │ 00488 │ │ │ │ │ ++search; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.21 protocones.cpp │ │ │ │ │ + │ │ │ │ │ 00489 │ │ │ │ │ if ( siscone::abs_dphi((*search())->angle, here_pntr->angle) < │ │ │ │ │ 00490 │ │ │ │ │ here_pntr->cocircular_range │ │ │ │ │ 00491 │ │ │ │ │ && search() != here()) { │ │ │ │ │ 00492 │ │ │ │ │ @@ -22412,23 +18627,14 @@ │ │ │ │ │ // now we have te reference axis, create the CSphborder_store structure │ │ │ │ │ 00533 │ │ │ │ │ vector border_vect; │ │ │ │ │ 00534 │ │ │ │ │ border_vect.reserve(border_list.size()); │ │ │ │ │ 00535 │ │ │ │ │ for (list::iterator it = border_list.begin(); │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -251 │ │ │ │ │ - │ │ │ │ │ - 252 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00536 │ │ │ │ │ it != border_list.end(); it++) { │ │ │ │ │ 00537 │ │ │ │ │ border_vect.push_back(CSphborder_store(*it, centre->centre, angl_dir1, angl_dir2)); │ │ │ │ │ 00538 │ │ │ │ │ } │ │ │ │ │ 00539 │ │ │ │ │ @@ -22494,14 +18700,23 @@ │ │ │ │ │ 00572 │ │ │ │ │ 00573 │ │ │ │ │ // mid corresponds to momentum that we need to include to get the │ │ │ │ │ 00574 │ │ │ │ │ // full cone │ │ │ │ │ 00575 │ │ │ │ │ mid()->is_in = true; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +223 │ │ │ │ │ + │ │ │ │ │ + 224 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00576 │ │ │ │ │ candidate += *(mid()->mom); │ │ │ │ │ 00577 │ │ │ │ │ test_stability(candidate, border_vect); │ │ │ │ │ 00578 } │ │ │ │ │ 00579 │ │ │ │ │ 00580 │ │ │ │ │ @@ -22566,97 +18781,94 @@ │ │ │ │ │ cone -= (*child); │ │ │ │ │ 00624 │ │ │ │ │ 00625 │ │ │ │ │ // update info on particles inside │ │ │ │ │ 00626 │ │ │ │ │ centre->is_inside->cone = false; │ │ │ │ │ 00627 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.38 protocones.cpp │ │ │ │ │ - │ │ │ │ │ 00628 │ │ │ │ │ +// update stability check quantities │ │ │ │ │ 00629 │ │ │ │ │ +dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz); //child->perp2(); │ │ │ │ │ 00630 │ │ │ │ │ +} │ │ │ │ │ 00631 │ │ │ │ │ 00632 │ │ │ │ │ 00633 │ │ │ │ │ +// now establish the list of unique children in the list │ │ │ │ │ 00634 │ │ │ │ │ +// first make sure parent and child are in! │ │ │ │ │ 00635 │ │ │ │ │ 00636 │ │ │ │ │ +list removed_from_cone; │ │ │ │ │ 00637 │ │ │ │ │ +list put_in_border; │ │ │ │ │ 00638 │ │ │ │ │ +list border_list; │ │ │ │ │ 00639 │ │ │ │ │ 00640 │ │ │ │ │ +CSphmomentum cone_removal; │ │ │ │ │ 00641 │ │ │ │ │ +CSphmomentum border = *parent; │ │ │ │ │ 00642 │ │ │ │ │ +border_list.push_back(parent); │ │ │ │ │ 00643 │ │ │ │ │ 00644 │ │ │ │ │ +// make sure child appears in the border region │ │ │ │ │ 00645 │ │ │ │ │ +centre->cocircular.push_back(centre); │ │ │ │ │ 00646 │ │ │ │ │ 00647 │ │ │ │ │ +// now establish the full contents of the cone minus the cocircular │ │ │ │ │ 00648 │ │ │ │ │ +// region and of the cocircular region itself │ │ │ │ │ 00649 │ │ │ │ │ +for(list::iterator it = centre->cocircular.begin(); │ │ │ │ │ 00650 │ │ │ │ │ +it != centre->cocircular.end(); it++) { │ │ │ │ │ 00651 │ │ │ │ │ 00652 │ │ │ │ │ +if ((*it)->is_inside->cone) { │ │ │ │ │ 00653 │ │ │ │ │ +cone_removal │ │ │ │ │ ++= *((*it)->v); │ │ │ │ │ 00654 │ │ │ │ │ +(*it)->is_inside->cone = false; │ │ │ │ │ 00655 │ │ │ │ │ +removed_from_cone.push_back((*it)->is_inside); │ │ │ │ │ 00656 │ │ │ │ │ +} │ │ │ │ │ 00657 │ │ │ │ │ 00658 │ │ │ │ │ +// if a point appears twice (i.e. with + and - sign) in the list of │ │ │ │ │ 00659 │ │ │ │ │ +// points on the border, we take care not to include it twice. │ │ │ │ │ 00660 │ │ │ │ │ +// Note that this situation may appear when a point is at a distance │ │ │ │ │ 00661 │ │ │ │ │ +// close to 2R from the parent │ │ │ │ │ 00662 │ │ │ │ │ +if (!(*it)->is_inside->cocirc) { │ │ │ │ │ 00663 │ │ │ │ │ +border += *((*it)->v); │ │ │ │ │ 00664 │ │ │ │ │ +(*it)->is_inside->cocirc = true; │ │ │ │ │ 00665 │ │ │ │ │ +put_in_border.push_back((*it)->is_inside); │ │ │ │ │ 00666 │ │ │ │ │ +border_list.push_back((*it)->v); │ │ │ │ │ 00667 │ │ │ │ │ +//cout « " adding particle " « (*it)->v->_theta « ", " « (*it)->v->_phi « " to the border list" │ │ │ │ │ │ │ │ │ │ -253 │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ -// update stability check quantities │ │ │ │ │ -dpt += fabs(child->px)+fabs(child->py)+fabs(child->pz); //child->perp2(); │ │ │ │ │ -} │ │ │ │ │ + 5.21 protocones.cpp │ │ │ │ │ │ │ │ │ │ -// now establish the list of unique children in the list │ │ │ │ │ -// first make sure parent and child are in! │ │ │ │ │ -list removed_from_cone; │ │ │ │ │ -list put_in_border; │ │ │ │ │ -list border_list; │ │ │ │ │ -CSphmomentum cone_removal; │ │ │ │ │ -CSphmomentum border = *parent; │ │ │ │ │ -border_list.push_back(parent); │ │ │ │ │ -// make sure child appears in the border region │ │ │ │ │ -centre->cocircular.push_back(centre); │ │ │ │ │ -// now establish the full contents of the cone minus the cocircular │ │ │ │ │ -// region and of the cocircular region itself │ │ │ │ │ -for(list::iterator it = centre->cocircular.begin(); │ │ │ │ │ -it != centre->cocircular.end(); it++) { │ │ │ │ │ -if ((*it)->is_inside->cone) { │ │ │ │ │ -cone_removal │ │ │ │ │ -+= *((*it)->v); │ │ │ │ │ -(*it)->is_inside->cone = false; │ │ │ │ │ -removed_from_cone.push_back((*it)->is_inside); │ │ │ │ │ -} │ │ │ │ │ +225 │ │ │ │ │ │ │ │ │ │ -// if a point appears twice (i.e. with + and - sign) in the list of │ │ │ │ │ -// points on the border, we take care not to include it twice. │ │ │ │ │ -// Note that this situation may appear when a point is at a distance │ │ │ │ │ -// close to 2R from the parent │ │ │ │ │ -if (!(*it)->is_inside->cocirc) { │ │ │ │ │ -border += *((*it)->v); │ │ │ │ │ -(*it)->is_inside->cocirc = true; │ │ │ │ │ -put_in_border.push_back((*it)->is_inside); │ │ │ │ │ -border_list.push_back((*it)->v); │ │ │ │ │ -//cout « " adding particle " « (*it)->v->_theta « ", " « (*it)->v->_phi « " to the border list" │ │ │ │ │ « endl; │ │ │ │ │ 00668 │ │ │ │ │ } │ │ │ │ │ 00669 │ │ │ │ │ } │ │ │ │ │ 00670 │ │ │ │ │ 00671 │ │ │ │ │ @@ -22733,21 +18945,14 @@ │ │ │ │ │ // relabel things that got put into the border │ │ │ │ │ 00711 │ │ │ │ │ for(list::iterator is_in = put_in_border.begin(); │ │ │ │ │ 00712 │ │ │ │ │ is_in != put_in_border.end(); is_in++) { │ │ │ │ │ 00713 │ │ │ │ │ (*is_in)->cocirc = false; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 254 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00714 │ │ │ │ │ } │ │ │ │ │ 00715 │ │ │ │ │ 00716 │ │ │ │ │ // we’re done with everything -- return true to signal to user that we’ve │ │ │ │ │ 00717 │ │ │ │ │ // been through the co-circularity rigmarole │ │ │ │ │ @@ -22808,14 +19013,21 @@ │ │ │ │ │ 00760 │ │ │ │ │ } while (here != start); │ │ │ │ │ 00761 │ │ │ │ │ 00762 │ │ │ │ │ // once we’ve reached the start the ’is_inside’ information should be │ │ │ │ │ 00763 │ │ │ │ │ // 100% complete, so we can use it to calculate the cone contents │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 226 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00764 │ │ │ │ │ // and then exit │ │ │ │ │ 00765 │ │ │ │ │ recompute_cone_contents(); │ │ │ │ │ 00766 │ │ │ │ │ return; │ │ │ │ │ 00767 │ │ │ │ │ @@ -22878,19 +19090,14 @@ │ │ │ │ │ if (this_dpt > PT_TSHOLD*(fabs(this_cone.px)+fabs(this_cone.py))) { │ │ │ │ │ 00808 │ │ │ │ │ if (cone.ref.is_empty()) { │ │ │ │ │ 00809 │ │ │ │ │ this_cone = CSphmomentum(); │ │ │ │ │ 00810 │ │ │ │ │ } else { │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.39 protocones.h │ │ │ │ │ - │ │ │ │ │ 00811 │ │ │ │ │ // set momentum to 0 │ │ │ │ │ 00812 │ │ │ │ │ this_cone = CSphmomentum(); │ │ │ │ │ 00813 │ │ │ │ │ 00814 │ │ │ │ │ // Important note: we can browse only the particles │ │ │ │ │ @@ -22947,14 +19154,19 @@ │ │ │ │ │ 00848 ******************************************************************/ │ │ │ │ │ 00849 siscone::Creference CSphstable_cones::circle_intersect(CSph3vector &cone_centre){ │ │ │ │ │ 00850 │ │ │ │ │ siscone::Creference intersection; │ │ │ │ │ 00851 │ │ │ │ │ int i; │ │ │ │ │ 00852 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.22 quadtree.cpp │ │ │ │ │ + │ │ │ │ │ 00853 │ │ │ │ │ for (i=0;i │ │ │ │ │ -00034 #include │ │ │ │ │ -00035 #include │ │ │ │ │ -00036 #include "hash.h" │ │ │ │ │ -00037 │ │ │ │ │ -00038 #include "defines.h" │ │ │ │ │ -00039 │ │ │ │ │ -00040 namespace siscone{ │ │ │ │ │ -00041 │ │ │ │ │ -00053 class Cborder_store{ │ │ │ │ │ -00054 public: │ │ │ │ │ +00026 │ │ │ │ │ +00027 #include "quadtree.h" │ │ │ │ │ +00028 #include │ │ │ │ │ +00029 #include │ │ │ │ │ +00030 #include │ │ │ │ │ +00031 │ │ │ │ │ +00032 namespace siscone{ │ │ │ │ │ +00033 │ │ │ │ │ +00034 using namespace std; │ │ │ │ │ +00035 │ │ │ │ │ +00036 /******************************************************************* │ │ │ │ │ +00037 * Cquadtree implementation │ │ │ │ │ +* │ │ │ │ │ +00038 * Implementation of a 2D quadtree. │ │ │ │ │ +* │ │ │ │ │ +00039 * This class implements the traditional two-dimensional quadtree. * │ │ │ │ │ +00040 * The elements at each node are of ’Cmomentum’ type. │ │ │ │ │ +* │ │ │ │ │ +00041 *******************************************************************/ │ │ │ │ │ +00042 │ │ │ │ │ +00043 // default ctor │ │ │ │ │ +00044 //-------------00045 Cquadtree::Cquadtree(){ │ │ │ │ │ +00046 │ │ │ │ │ +v = NULL; │ │ │ │ │ +00047 │ │ │ │ │ +00048 │ │ │ │ │ +children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL; │ │ │ │ │ +00049 │ │ │ │ │ +has_child = false; │ │ │ │ │ +00050 } │ │ │ │ │ +00051 │ │ │ │ │ +00052 │ │ │ │ │ +00053 // ctor with initialisation (see init for details) │ │ │ │ │ +00054 //-------------------------00055 Cquadtree::Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y){ │ │ │ │ │ 00056 │ │ │ │ │ -Cborder_store(Cmomentum * momentum, double centre_eta, double centre_phi) : │ │ │ │ │ +v = NULL; │ │ │ │ │ 00057 │ │ │ │ │ -mom(momentum), is_in(false) { │ │ │ │ │ 00058 │ │ │ │ │ -angle = atan2(mom->phi - centre_phi, mom->eta - centre_eta); │ │ │ │ │ +children[0][0] = children[0][1] = children[1][0] = children[1][1] = NULL; │ │ │ │ │ 00059 │ │ │ │ │ -} │ │ │ │ │ +has_child = false; │ │ │ │ │ 00060 │ │ │ │ │ 00061 │ │ │ │ │ -Cmomentum * mom; │ │ │ │ │ -00062 │ │ │ │ │ -double angle; │ │ │ │ │ +init(_x, _y, _half_size_x, _half_size_y); │ │ │ │ │ +00062 } │ │ │ │ │ 00063 │ │ │ │ │ -bool │ │ │ │ │ -is_in; │ │ │ │ │ -00064 }; │ │ │ │ │ -00065 │ │ │ │ │ -00066 │ │ │ │ │ -00069 inline bool operator<(const Cborder_store & a, const Cborder_store & b) { │ │ │ │ │ +00064 │ │ │ │ │ +00065 // default destructor │ │ │ │ │ +00066 // at destruction, everything is destroyed except │ │ │ │ │ +00067 // physical values at the leaves │ │ │ │ │ +00068 //-----------------------------------------------00069 Cquadtree::~Cquadtree(){ │ │ │ │ │ 00070 │ │ │ │ │ -return a.angle < b.angle; │ │ │ │ │ -00071 } │ │ │ │ │ +if (has_child){ │ │ │ │ │ +00071 │ │ │ │ │ +if (v!=NULL) delete v; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +227 │ │ │ │ │ + │ │ │ │ │ + 228 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00072 │ │ │ │ │ +delete children[0][0]; │ │ │ │ │ 00073 │ │ │ │ │ -00082 class Cstable_cones : public Cvicinity{ │ │ │ │ │ -00083 public: │ │ │ │ │ -00085 │ │ │ │ │ -Cstable_cones(); │ │ │ │ │ -00086 │ │ │ │ │ -00088 │ │ │ │ │ -Cstable_cones(std::vector &_particle_list); │ │ │ │ │ -00089 │ │ │ │ │ -00091 │ │ │ │ │ -~Cstable_cones(); │ │ │ │ │ +delete children[0][1]; │ │ │ │ │ +00074 │ │ │ │ │ +delete children[1][0]; │ │ │ │ │ +00075 │ │ │ │ │ +delete children[1][1]; │ │ │ │ │ +00076 │ │ │ │ │ +} │ │ │ │ │ +00077 } │ │ │ │ │ +00078 │ │ │ │ │ +00079 │ │ │ │ │ +00080 /* │ │ │ │ │ +00081 * init the tree. │ │ │ │ │ +00082 * By initializing the tree, we mean setting the cell parameters │ │ │ │ │ +00083 * and preparing the object to act as a seed for a new tree. │ │ │ │ │ +00084 * - _x │ │ │ │ │ +x-position of the center │ │ │ │ │ +00085 * - _y │ │ │ │ │ +y-position of the center │ │ │ │ │ +00086 * - half_size_x half x-size of the cell │ │ │ │ │ +00087 * - half_size_y half y-size of the cell │ │ │ │ │ +00088 * return 0 on success, 1 on error. Note that if the cell │ │ │ │ │ +00089 * │ │ │ │ │ +is already filled, we return an error. │ │ │ │ │ +00090 ******************************************************************/ │ │ │ │ │ +00091 int Cquadtree::init(double _x, double _y, double _half_size_x, double _half_size_y){ │ │ │ │ │ 00092 │ │ │ │ │ +if (v!=NULL) │ │ │ │ │ +00093 │ │ │ │ │ +return 1; │ │ │ │ │ +00094 │ │ │ │ │ +00095 │ │ │ │ │ +centre_x = _x; │ │ │ │ │ +00096 │ │ │ │ │ +centre_y = _y; │ │ │ │ │ 00097 │ │ │ │ │ -void init(std::vector &_particle_list); │ │ │ │ │ +half_size_x = _half_size_x; │ │ │ │ │ 00098 │ │ │ │ │ -00106 │ │ │ │ │ -int get_stable_cones(double _radius); │ │ │ │ │ -00107 │ │ │ │ │ -00109 │ │ │ │ │ -std::vector protocones; │ │ │ │ │ -00110 │ │ │ │ │ +half_size_y = _half_size_y; │ │ │ │ │ +00099 │ │ │ │ │ +00100 │ │ │ │ │ +return 0; │ │ │ │ │ +00101 } │ │ │ │ │ +00102 │ │ │ │ │ +00103 │ │ │ │ │ +00104 /* │ │ │ │ │ +00105 * adding a particle to the tree. │ │ │ │ │ +00106 * This method adds one vector to the quadtree structure which │ │ │ │ │ +00107 * is updated consequently. │ │ │ │ │ +00108 * - v │ │ │ │ │ +vector to add │ │ │ │ │ +00109 * return 0 on success 1 on error │ │ │ │ │ +00110 ******************************************************************/ │ │ │ │ │ +00111 int Cquadtree::add(Cmomentum *v_add){ │ │ │ │ │ 00112 │ │ │ │ │ -hash_cones *hc; │ │ │ │ │ +// Description of the method: │ │ │ │ │ 00113 │ │ │ │ │ +// -------------------------00114 │ │ │ │ │ +// the addition process goes as follows: │ │ │ │ │ 00115 │ │ │ │ │ -int nb_tot; │ │ │ │ │ -00116 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +// 1. check if the cell is empty, in which case, add the particle │ │ │ │ │ +00116 │ │ │ │ │ +// │ │ │ │ │ +here and leave. │ │ │ │ │ 00117 │ │ │ │ │ -int nb_hash_cones, nb_hash_occupied; │ │ │ │ │ -00118 #endif │ │ │ │ │ +// 2. If there is a unique particle already inside, │ │ │ │ │ +00118 │ │ │ │ │ +// │ │ │ │ │ +(a) create children │ │ │ │ │ 00119 │ │ │ │ │ -00120 protected: │ │ │ │ │ +// │ │ │ │ │ +(b) forward the existing particle to the appropriate child │ │ │ │ │ +00120 │ │ │ │ │ +// 3. Add current particle to this cell and forward to the │ │ │ │ │ +00121 │ │ │ │ │ +// │ │ │ │ │ +adequate child │ │ │ │ │ 00122 │ │ │ │ │ -double R; │ │ │ │ │ +// NOTE: we assume in the whole procedure that the particle is │ │ │ │ │ 00123 │ │ │ │ │ +// │ │ │ │ │ +indeed inside the cell ! │ │ │ │ │ +00124 │ │ │ │ │ 00125 │ │ │ │ │ -double R2; │ │ │ │ │ +// step 1: the case of empty cells │ │ │ │ │ 00126 │ │ │ │ │ -00127 private: │ │ │ │ │ +if (v==NULL){ │ │ │ │ │ +00127 │ │ │ │ │ +v = v_add; │ │ │ │ │ +00128 │ │ │ │ │ +return 0; │ │ │ │ │ +00129 │ │ │ │ │ +} │ │ │ │ │ 00130 │ │ │ │ │ -Cmomentum cone; │ │ │ │ │ 00131 │ │ │ │ │ +// step 2: additional work if 1! particle already present │ │ │ │ │ +00132 │ │ │ │ │ +// │ │ │ │ │ +we use the fact that only 1-particle systems have no child │ │ │ │ │ 00133 │ │ │ │ │ -Cmomentum *child; │ │ │ │ │ +if (!has_child){ │ │ │ │ │ 00134 │ │ │ │ │ +double new_half_size_x = 0.5*half_size_x; │ │ │ │ │ +00135 │ │ │ │ │ +double new_half_size_y = 0.5*half_size_y; │ │ │ │ │ 00136 │ │ │ │ │ -Cvicinity_elm *centre; │ │ │ │ │ +// create children │ │ │ │ │ 00137 │ │ │ │ │ +children[0][0] = new Cquadtree(centre_x-new_half_size_x, centre_y-new_half_size_y, │ │ │ │ │ +00138 │ │ │ │ │ +new_half_size_x, new_half_size_y); │ │ │ │ │ 00139 │ │ │ │ │ -unsigned int centre_idx; │ │ │ │ │ +children[0][1] = new Cquadtree(centre_x-new_half_size_x, centre_y+new_half_size_y, │ │ │ │ │ 00140 │ │ │ │ │ +new_half_size_x, new_half_size_y); │ │ │ │ │ +00141 │ │ │ │ │ +children[1][0] = new Cquadtree(centre_x+new_half_size_x, centre_y-new_half_size_y, │ │ │ │ │ 00142 │ │ │ │ │ -unsigned int first_cone; │ │ │ │ │ +new_half_size_x, new_half_size_y); │ │ │ │ │ 00143 │ │ │ │ │ +children[1][1] = new Cquadtree(centre_x+new_half_size_x, centre_y+new_half_size_y, │ │ │ │ │ +00144 │ │ │ │ │ +new_half_size_x, new_half_size_y); │ │ │ │ │ +00145 │ │ │ │ │ +00146 │ │ │ │ │ +has_child = true; │ │ │ │ │ +00147 │ │ │ │ │ +00148 │ │ │ │ │ +// forward to child │ │ │ │ │ 00149 │ │ │ │ │ -int init_cone(); │ │ │ │ │ +//? The following line assumes ’true’==1 and ’false’==0 │ │ │ │ │ 00150 │ │ │ │ │ +// Note: v being a single particle, eta and phi are correct │ │ │ │ │ +00151 │ │ │ │ │ +children[v->eta>centre_x][v->phi>centre_y]->add(v); │ │ │ │ │ +00152 │ │ │ │ │ +00153 │ │ │ │ │ +// copy physical params │ │ │ │ │ +00154 │ │ │ │ │ +v = new Cmomentum(*v); │ │ │ │ │ +00155 │ │ │ │ │ +} │ │ │ │ │ +00156 │ │ │ │ │ 00157 │ │ │ │ │ -int test_cone(); │ │ │ │ │ +// step 3: add new particle │ │ │ │ │ 00158 │ │ │ │ │ +// Note: v_add being a single particle, eta and phi are correct │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.22 quadtree.cpp │ │ │ │ │ + │ │ │ │ │ +00159 │ │ │ │ │ +children[v_add->eta>centre_x][v_add->phi>centre_y]->add(v_add); │ │ │ │ │ +00160 │ │ │ │ │ +*v+=*v_add; │ │ │ │ │ +00161 │ │ │ │ │ +00162 │ │ │ │ │ +return 0; │ │ │ │ │ +00163 } │ │ │ │ │ 00164 │ │ │ │ │ -int update_cone(); │ │ │ │ │ 00165 │ │ │ │ │ -00166 │ │ │ │ │ -/* │ │ │ │ │ -00167 │ │ │ │ │ -* run through the vicinity of the current parent and for each child │ │ │ │ │ -00168 │ │ │ │ │ -* indicate which members are cocircular... │ │ │ │ │ -00169 │ │ │ │ │ -*/ │ │ │ │ │ -00170 │ │ │ │ │ -void prepare_cocircular_lists(); │ │ │ │ │ -00171 │ │ │ │ │ -00179 │ │ │ │ │ -bool cocircular_check(); │ │ │ │ │ +00166 /* │ │ │ │ │ +00167 * circle intersection. │ │ │ │ │ +00168 * computes the intersection with a circle of given centre and radius. │ │ │ │ │ +00169 * The output takes the form of a quadtree with all squares included │ │ │ │ │ +00170 * in the circle. │ │ │ │ │ +00171 * - cx │ │ │ │ │ +circle centre x coordinate │ │ │ │ │ +00172 * - cy │ │ │ │ │ +circle centre y coordinate │ │ │ │ │ +00173 * - cR2 │ │ │ │ │ +circle radius SQUARED │ │ │ │ │ +00174 * return the checksum for the intersection │ │ │ │ │ +00175 ******************************************************************/ │ │ │ │ │ +00176 Creference Cquadtree::circle_intersect(double cx, double cy, double cR2){ │ │ │ │ │ +00177 │ │ │ │ │ +// Description of the method: │ │ │ │ │ +00178 │ │ │ │ │ +// -------------------------00179 │ │ │ │ │ +// 1. check if cell is empty => no intersection │ │ │ │ │ 00180 │ │ │ │ │ +// 2. if cell has 1! particle, check if it is inside the circle. │ │ │ │ │ +00181 │ │ │ │ │ +// │ │ │ │ │ +If yes, add it and return, if not simply return. │ │ │ │ │ +00182 │ │ │ │ │ +// 3. check if the circle intersects the square. If not, return. │ │ │ │ │ +00183 │ │ │ │ │ +// 4. check if the square is inside the circle. │ │ │ │ │ +00184 │ │ │ │ │ +// │ │ │ │ │ +If yes, add it to qt and return. │ │ │ │ │ 00185 │ │ │ │ │ -void test_cone_cocircular(Cmomentum & borderless_cone, │ │ │ │ │ +// 5. check intersections with children. │ │ │ │ │ 00186 │ │ │ │ │ -std::list & border_list); │ │ │ │ │ 00187 │ │ │ │ │ +// step 1: if there is no particle inside te square, no reason to go further │ │ │ │ │ +00188 │ │ │ │ │ +if (v==NULL) │ │ │ │ │ +00189 │ │ │ │ │ +return Creference(); │ │ │ │ │ +00190 │ │ │ │ │ +00191 │ │ │ │ │ +double dx, dy; │ │ │ │ │ +00192 │ │ │ │ │ +00193 │ │ │ │ │ +// step 2: if there is only one particle inside the square, test if it is in │ │ │ │ │ 00194 │ │ │ │ │ -void test_stability(Cmomentum & candidate, │ │ │ │ │ +// │ │ │ │ │ +the circle, in which case return associated reference │ │ │ │ │ 00195 │ │ │ │ │ -const std::vector & border_vect); │ │ │ │ │ +if (!has_child){ │ │ │ │ │ 00196 │ │ │ │ │ +// compute the distance │ │ │ │ │ +00197 │ │ │ │ │ +// Note: v has only one particle => eta and phi are defined │ │ │ │ │ +00198 │ │ │ │ │ +dx = cx - v->eta; │ │ │ │ │ +00199 │ │ │ │ │ +dy = fabs(cy - v->phi); │ │ │ │ │ +00200 │ │ │ │ │ +if (dy>M_PI) │ │ │ │ │ +00201 │ │ │ │ │ +dy -= 2.0*M_PI; │ │ │ │ │ +00202 │ │ │ │ │ 00203 │ │ │ │ │ -void compute_cone_contents(); │ │ │ │ │ +// test distance │ │ │ │ │ 00204 │ │ │ │ │ +if (dx*dx+dy*dyref; │ │ │ │ │ +00206 │ │ │ │ │ +} │ │ │ │ │ +00207 │ │ │ │ │ +00208 │ │ │ │ │ +return Creference(); │ │ │ │ │ +00209 │ │ │ │ │ +} │ │ │ │ │ 00210 │ │ │ │ │ -void recompute_cone_contents(); │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.40 protocones.h │ │ │ │ │ - │ │ │ │ │ -257 │ │ │ │ │ - │ │ │ │ │ 00211 │ │ │ │ │ +// step 3: check if there is an intersection │ │ │ │ │ 00212 │ │ │ │ │ -/* │ │ │ │ │ +//double ryp, rym; │ │ │ │ │ 00213 │ │ │ │ │ -* if we have gone beyond the acceptable threshold of change, compute │ │ │ │ │ +double dx_c, dy_c; │ │ │ │ │ 00214 │ │ │ │ │ -* the cone momentum from particle list. in this version, we use the │ │ │ │ │ 00215 │ │ │ │ │ -* ’pincluded’ information from the Cvicinity class, but we don’t │ │ │ │ │ +// store distance with the centre of the square │ │ │ │ │ 00216 │ │ │ │ │ -* change the member cone, only the locally supplied one │ │ │ │ │ +dx_c = fabs(cx-centre_x); │ │ │ │ │ 00217 │ │ │ │ │ -*/ │ │ │ │ │ +dy_c = fabs(cy-centre_y); │ │ │ │ │ 00218 │ │ │ │ │ -void recompute_cone_contents_if_needed(Cmomentum & this_cone, double & this_dpt); │ │ │ │ │ +if (dy_c>M_PI) dy_c = 2.0*M_PI-dy_c; │ │ │ │ │ 00219 │ │ │ │ │ +00220 │ │ │ │ │ +// compute (minimal) the distance (pay attention to the periodicity in phi). │ │ │ │ │ +00221 │ │ │ │ │ +dx = dx_c-half_size_x; │ │ │ │ │ +00222 │ │ │ │ │ +if (dx<0) dx=0; │ │ │ │ │ +00223 │ │ │ │ │ +dy = dy_c-half_size_y; │ │ │ │ │ +00224 │ │ │ │ │ +if (dy<0) dy=0; │ │ │ │ │ 00225 │ │ │ │ │ -int proceed_with_stability(); │ │ │ │ │ 00226 │ │ │ │ │ +// check the distance │ │ │ │ │ 00227 │ │ │ │ │ -/* │ │ │ │ │ +if (dx*dx+dy*dy>=cR2){ │ │ │ │ │ 00228 │ │ │ │ │ -* circle intersection. │ │ │ │ │ +// no intersection │ │ │ │ │ 00229 │ │ │ │ │ -* computes the intersection with a circle of given centre and radius. │ │ │ │ │ +return Creference(); │ │ │ │ │ 00230 │ │ │ │ │ -* The output takes the form of a checkxor of the intersection’s particles │ │ │ │ │ +} │ │ │ │ │ 00231 │ │ │ │ │ -circle centre x coordinate │ │ │ │ │ -* - cx │ │ │ │ │ 00232 │ │ │ │ │ -circle centre y coordinate │ │ │ │ │ -* - cy │ │ │ │ │ +// step 4: check if included │ │ │ │ │ 00233 │ │ │ │ │ -* return the checkxor for the intersection │ │ │ │ │ 00234 │ │ │ │ │ -******************************************************************/ │ │ │ │ │ +// compute the (maximal) distance │ │ │ │ │ 00235 │ │ │ │ │ -Creference circle_intersect(double cx, double cy); │ │ │ │ │ +dx = dx_c+half_size_x; │ │ │ │ │ 00236 │ │ │ │ │ +dy = dy_c+half_size_y; │ │ │ │ │ +00237 │ │ │ │ │ +if (dy>M_PI) dy = M_PI; │ │ │ │ │ 00238 │ │ │ │ │ -Cmomentum cone_candidate; │ │ │ │ │ 00239 │ │ │ │ │ +// compute the distance │ │ │ │ │ +00240 │ │ │ │ │ +if (dx*dx+dy*dy child_list; │ │ │ │ │ +return v->ref; │ │ │ │ │ 00242 │ │ │ │ │ +} │ │ │ │ │ +00243 │ │ │ │ │ +00244 │ │ │ │ │ +// step 5: the square is not fully in. Recurse to children │ │ │ │ │ 00245 │ │ │ │ │ -std::vector< std::pair > multiple_centre_done; │ │ │ │ │ +return children[0][0]->circle_intersect(cx, cy, cR2) │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +229 │ │ │ │ │ + │ │ │ │ │ + 230 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00246 │ │ │ │ │ ++ children[0][1]->circle_intersect(cx, cy, cR2) │ │ │ │ │ 00247 │ │ │ │ │ -// information for updating cone contents to avoid rounding errors │ │ │ │ │ ++ children[1][0]->circle_intersect(cx, cy, cR2) │ │ │ │ │ 00248 │ │ │ │ │ -double dpt; │ │ │ │ │ -00249 │ │ │ │ │ -00258 │ │ │ │ │ -inline bool is_inside(Cmomentum *centre, Cmomentum *v); │ │ │ │ │ -00259 }; │ │ │ │ │ -00260 │ │ │ │ │ -00261 /* │ │ │ │ │ -00262 * compute the absolute value of the difference between 2 angles. │ │ │ │ │ -00263 * We take care of the 2pi periodicity │ │ │ │ │ -00264 * \param angle1 │ │ │ │ │ -first angle │ │ │ │ │ -00265 * \param angle2 │ │ │ │ │ -second angle │ │ │ │ │ -00266 * \return the absolute value of the difference between the angles │ │ │ │ │ -00267 *****************************************************************/ │ │ │ │ │ -00268 inline double abs_dangle(double &angle1, double &angle2); │ │ │ │ │ ++ children[1][1]->circle_intersect(cx, cy, cR2); │ │ │ │ │ +00249 } │ │ │ │ │ +00250 │ │ │ │ │ +00251 │ │ │ │ │ +00252 /* │ │ │ │ │ +00253 * output a data file for drawing the grid. │ │ │ │ │ +00254 * This can be used to output a data file containing all the │ │ │ │ │ +00255 * grid subdivisions. The file contents is as follows: │ │ │ │ │ +00256 * first and second columns give center of the cell, the third │ │ │ │ │ +00257 * gives the size. │ │ │ │ │ +00258 * - flux opened stream to write to │ │ │ │ │ +00259 * return 0 on success, 1 on error │ │ │ │ │ +00260 ******************************************************************/ │ │ │ │ │ +00261 int Cquadtree::save(FILE *flux){ │ │ │ │ │ +00262 │ │ │ │ │ +00263 │ │ │ │ │ +if (flux==NULL) │ │ │ │ │ +00264 │ │ │ │ │ +return 1; │ │ │ │ │ +00265 │ │ │ │ │ +00266 │ │ │ │ │ +if (has_child){ │ │ │ │ │ +00267 │ │ │ │ │ +fprintf(flux, "%e\t%e\t%e\t%e\n", centre_x, centre_y, half_size_x, half_size_y); │ │ │ │ │ +00268 │ │ │ │ │ +children[0][0]->save(flux); │ │ │ │ │ 00269 │ │ │ │ │ -00270 } │ │ │ │ │ -00271 #endif │ │ │ │ │ +children[0][1]->save(flux); │ │ │ │ │ +00270 │ │ │ │ │ +children[1][0]->save(flux); │ │ │ │ │ +00271 │ │ │ │ │ +children[1][1]->save(flux); │ │ │ │ │ +00272 │ │ │ │ │ +} │ │ │ │ │ +00273 │ │ │ │ │ +00274 │ │ │ │ │ +return 0; │ │ │ │ │ +00275 } │ │ │ │ │ +00276 │ │ │ │ │ +00277 │ │ │ │ │ +00278 /* │ │ │ │ │ +00279 * output a data file for drawing the tree leaves. │ │ │ │ │ +00280 * This can be used to output a data file containing all the │ │ │ │ │ +00281 * tree leaves. The file contents is as follows: │ │ │ │ │ +00282 * first and second columns give center of the cell, the third │ │ │ │ │ +00283 * gives the size. │ │ │ │ │ +00284 * - flux opened stream to write to │ │ │ │ │ +00285 * return 0 on success, 1 on error │ │ │ │ │ +00286 ******************************************************************/ │ │ │ │ │ +00287 int Cquadtree::save_leaves(FILE *flux){ │ │ │ │ │ +00288 │ │ │ │ │ +00289 │ │ │ │ │ +if (flux==NULL) │ │ │ │ │ +00290 │ │ │ │ │ +return 1; │ │ │ │ │ +00291 │ │ │ │ │ +00292 │ │ │ │ │ +if (has_child){ │ │ │ │ │ +00293 │ │ │ │ │ +if (children[0][0]!=NULL) children[0][0]->save_leaves(flux); │ │ │ │ │ +00294 │ │ │ │ │ +if (children[0][1]!=NULL) children[0][1]->save_leaves(flux); │ │ │ │ │ +00295 │ │ │ │ │ +if (children[1][0]!=NULL) children[1][0]->save_leaves(flux); │ │ │ │ │ +00296 │ │ │ │ │ +if (children[1][1]!=NULL) children[1][1]->save_leaves(flux); │ │ │ │ │ +00297 │ │ │ │ │ +} else { │ │ │ │ │ +00298 │ │ │ │ │ +fprintf(flux, "%e\t%e\t%e\t%e\n", centre_x, centre_y, half_size_x, half_size_y); │ │ │ │ │ +00299 │ │ │ │ │ +} │ │ │ │ │ +00300 │ │ │ │ │ +00301 │ │ │ │ │ +return 0; │ │ │ │ │ +00302 } │ │ │ │ │ +00303 │ │ │ │ │ +00304 } │ │ │ │ │ │ │ │ │ │ -5.40 │ │ │ │ │ +5.23 │ │ │ │ │ │ │ │ │ │ -protocones.h │ │ │ │ │ +quadtree.h │ │ │ │ │ │ │ │ │ │ -00001 // -*- C++ -*00003 // File: protocones.h │ │ │ │ │ +00001 // -*- C++ -*00003 // File: quadtree.h │ │ │ │ │ // │ │ │ │ │ -00004 // Description: header file for stable cones determination (Cstable_cones) │ │ │ │ │ +00004 // Description: header file for quadtree management (Cquadtree class) │ │ │ │ │ // │ │ │ │ │ 00005 // This file is part of the SISCone project. │ │ │ │ │ // │ │ │ │ │ -00006 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ +00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ // │ │ │ │ │ 00007 // │ │ │ │ │ -an adaptation to spherical coordinates │ │ │ │ │ // │ │ │ │ │ -00008 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ // │ │ │ │ │ 00009 // │ │ │ │ │ // │ │ │ │ │ -00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ -00011 // │ │ │ │ │ -// │ │ │ │ │ -00012 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ // │ │ │ │ │ -00013 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ // │ │ │ │ │ -00014 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ // │ │ │ │ │ -00015 // (at your option) any later version. │ │ │ │ │ +00013 // (at your option) any later version. │ │ │ │ │ // │ │ │ │ │ -00016 // │ │ │ │ │ +00014 // │ │ │ │ │ // │ │ │ │ │ -00017 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ // │ │ │ │ │ -00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ // │ │ │ │ │ -00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ // │ │ │ │ │ -00020 // GNU General Public License for more details. │ │ │ │ │ +00018 // GNU General Public License for more details. │ │ │ │ │ // │ │ │ │ │ -00021 // │ │ │ │ │ +00019 // │ │ │ │ │ // │ │ │ │ │ -00022 // You should have received a copy of the GNU General Public License │ │ │ │ │ +00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ // │ │ │ │ │ -00023 // along with this program; if not, write to the Free Software │ │ │ │ │ +00021 // along with this program; if not, write to the Free Software │ │ │ │ │ // │ │ │ │ │ -00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00025 // │ │ │ │ │ +00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.24 ranlux.cpp │ │ │ │ │ + │ │ │ │ │ +00023 // │ │ │ │ │ // │ │ │ │ │ -00026 // $Revision:: 255 │ │ │ │ │ +00024 // $Revision:: 123 │ │ │ │ │ $// │ │ │ │ │ -00027 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008) │ │ │ │ │ +00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ $// │ │ │ │ │ +00027 │ │ │ │ │ +00028 #ifndef __QUADTREE_H__ │ │ │ │ │ +00029 #define __QUADTREE_H__ │ │ │ │ │ +00030 │ │ │ │ │ +00031 #include "momentum.h" │ │ │ │ │ +00032 #include │ │ │ │ │ +00033 │ │ │ │ │ +00034 namespace siscone{ │ │ │ │ │ +00035 │ │ │ │ │ +00043 class Cquadtree{ │ │ │ │ │ +00044 public: │ │ │ │ │ +00046 │ │ │ │ │ +Cquadtree(); │ │ │ │ │ +00047 │ │ │ │ │ +00049 │ │ │ │ │ +Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y); │ │ │ │ │ +00050 │ │ │ │ │ +00054 │ │ │ │ │ +~Cquadtree(); │ │ │ │ │ +00055 │ │ │ │ │ +00067 │ │ │ │ │ +int init(double _x, double _y, double _half_size_x, double _half_size_y); │ │ │ │ │ +00068 │ │ │ │ │ +00076 │ │ │ │ │ +int add(Cmomentum *v_add); │ │ │ │ │ +00077 │ │ │ │ │ +00088 │ │ │ │ │ +Creference circle_intersect(double cx, double cy, double cR2); │ │ │ │ │ +00089 │ │ │ │ │ +00099 │ │ │ │ │ +int save(FILE *flux); │ │ │ │ │ +00100 │ │ │ │ │ +00110 │ │ │ │ │ +int save_leaves(FILE *flux); │ │ │ │ │ +00111 │ │ │ │ │ +00112 │ │ │ │ │ +double centre_x; │ │ │ │ │ +00113 │ │ │ │ │ +double centre_y; │ │ │ │ │ +00114 │ │ │ │ │ +double half_size_x; │ │ │ │ │ +00115 │ │ │ │ │ +double half_size_y; │ │ │ │ │ +00116 │ │ │ │ │ +00117 │ │ │ │ │ +Cmomentum *v; │ │ │ │ │ +00118 │ │ │ │ │ +00119 │ │ │ │ │ +Cquadtree* children[2][2]; │ │ │ │ │ +00120 │ │ │ │ │ +bool has_child; │ │ │ │ │ +00121 }; │ │ │ │ │ +00122 │ │ │ │ │ +00123 } │ │ │ │ │ +00124 #endif │ │ │ │ │ + │ │ │ │ │ +5.24 │ │ │ │ │ + │ │ │ │ │ +ranlux.cpp │ │ │ │ │ + │ │ │ │ │ +00001 // file: ranlux.xpp │ │ │ │ │ +00002 #include "ranlux.h" │ │ │ │ │ +00003 #include │ │ │ │ │ +00004 #include │ │ │ │ │ +00005 │ │ │ │ │ +00006 /* This is a lagged fibonacci generator with skipping developed by Luescher. │ │ │ │ │ +00007 │ │ │ │ │ +The sequence is a series of 24-bit integers, x_n, │ │ │ │ │ +00008 │ │ │ │ │ +00009 │ │ │ │ │ +x_n = d_n + b_n │ │ │ │ │ +00010 │ │ │ │ │ +00011 │ │ │ │ │ +where d_n = x_{n-10} - x_{n-24} - c_{n-1}, b_n = 0 if d_n >= 0 and │ │ │ │ │ +00012 │ │ │ │ │ +b_n = 2^24 if d_n < 0, c_n = 0 if d_n >= 0 and c_n = 1 if d_n < 0, │ │ │ │ │ +00013 │ │ │ │ │ +where after 24 samples a group of p integers are "skipped", to │ │ │ │ │ +00014 │ │ │ │ │ +reduce correlations. By default p = 199, but can be increased to │ │ │ │ │ +00015 │ │ │ │ │ +365. │ │ │ │ │ +00016 │ │ │ │ │ +00017 │ │ │ │ │ +The period of the generator is around 10^171. │ │ │ │ │ +00018 │ │ │ │ │ +00019 │ │ │ │ │ +From: M. Luescher, "A portable high-quality random number generator │ │ │ │ │ +00020 │ │ │ │ │ +for lattice field theory calculations", Computer Physics │ │ │ │ │ +00021 │ │ │ │ │ +Communications, 79 (1994) 100-110. │ │ │ │ │ +00022 │ │ │ │ │ +00023 │ │ │ │ │ +Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/ │ │ │ │ │ +00024 │ │ │ │ │ +00025 │ │ │ │ │ +See also, │ │ │ │ │ +00026 │ │ │ │ │ +00027 │ │ │ │ │ +F. James, "RANLUX: A Fortran implementation of the high-quality │ │ │ │ │ +00028 │ │ │ │ │ +pseudo-random number generator of Luscher", Computer Physics │ │ │ │ │ 00029 │ │ │ │ │ -00030 #ifndef __SPH_PROTOCONES_H__ │ │ │ │ │ -00031 #define __SPH_PROTOCONES_H__ │ │ │ │ │ +Communications, 79 (1994) 111-114 │ │ │ │ │ +00030 │ │ │ │ │ +00031 │ │ │ │ │ +Kenneth G. Hamilton, F. James, "Acceleration of RANLUX", Computer │ │ │ │ │ 00032 │ │ │ │ │ -00033 #include "momentum.h" │ │ │ │ │ -00034 #include "vicinity.h" │ │ │ │ │ -00035 #include │ │ │ │ │ -00036 #include │ │ │ │ │ -00037 #include │ │ │ │ │ -00038 #include "hash.h" │ │ │ │ │ +Physics Communications, 101 (1997) 241-248 │ │ │ │ │ +00033 │ │ │ │ │ +00034 │ │ │ │ │ +Kenneth G. Hamilton, "Assembler RANLUX for PCs", Computer Physics │ │ │ │ │ +00035 │ │ │ │ │ +Communications, 101 (1997) 249-253 */ │ │ │ │ │ +00036 │ │ │ │ │ +00037 namespace siscone{ │ │ │ │ │ │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ -// │ │ │ │ │ +231 │ │ │ │ │ │ │ │ │ │ - 258 │ │ │ │ │ + 232 │ │ │ │ │ │ │ │ │ │ File Documentation │ │ │ │ │ │ │ │ │ │ -00039 │ │ │ │ │ -00040 #include │ │ │ │ │ -00041 │ │ │ │ │ -00042 namespace siscone_spherical{ │ │ │ │ │ +00038 │ │ │ │ │ +00039 static const unsigned long int mask_lo = 0x00ffffffUL; // 2^24 - 1 │ │ │ │ │ +00040 static const unsigned long int mask_hi = ~0x00ffffffUL; │ │ │ │ │ +00041 static const unsigned long int two24 = 16777216; │ │ │ │ │ +// 2^24 │ │ │ │ │ +00042 │ │ │ │ │ 00043 │ │ │ │ │ -00055 class CSphborder_store{ │ │ │ │ │ -00056 public: │ │ │ │ │ -00058 │ │ │ │ │ -CSphborder_store(CSphmomentum * momentum, CSph3vector ¢re, CSph3vector &angl_dir1, CSph3vector │ │ │ │ │ -&angl_dir2) : │ │ │ │ │ +00044 // internal generator structure │ │ │ │ │ +00045 //-----------------------------00046 typedef struct { │ │ │ │ │ +00047 │ │ │ │ │ +unsigned int i; │ │ │ │ │ +00048 │ │ │ │ │ +unsigned int j; │ │ │ │ │ +00049 │ │ │ │ │ +unsigned int n; │ │ │ │ │ +00050 │ │ │ │ │ +unsigned int skip; │ │ │ │ │ +00051 │ │ │ │ │ +unsigned int carry; │ │ │ │ │ +00052 │ │ │ │ │ +unsigned long int u[24]; │ │ │ │ │ +00053 } ranlux_state_t; │ │ │ │ │ +00054 │ │ │ │ │ +00055 │ │ │ │ │ +00056 // internal generator state │ │ │ │ │ +00057 //-------------------------00058 ranlux_state_t local_ranlux_state; │ │ │ │ │ 00059 │ │ │ │ │ -mom(momentum), is_in(false) { │ │ │ │ │ 00060 │ │ │ │ │ -CSph3vector diff = (*momentum) - centre; │ │ │ │ │ -00061 │ │ │ │ │ -angle = atan2(dot_product3(diff, angl_dir2), dot_product3(diff, angl_dir1)); │ │ │ │ │ -00062 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ -00063 │ │ │ │ │ -std::cout « " adding point " « momentum->_theta « ", " « momentum->_phi │ │ │ │ │ +00061 // incrementation of the generator state │ │ │ │ │ +00062 //--------------------------------------00063 static inline unsigned long int increment_state(){ │ │ │ │ │ 00064 │ │ │ │ │ -« " at an angle of " « angle « std::endl; │ │ │ │ │ -00065 #endif │ │ │ │ │ +unsigned int i = local_ranlux_state.i; │ │ │ │ │ +00065 │ │ │ │ │ +unsigned int j = local_ranlux_state.j; │ │ │ │ │ 00066 │ │ │ │ │ -} │ │ │ │ │ +long int delta = local_ranlux_state.u[j] - local_ranlux_state.u[i] │ │ │ │ │ 00067 │ │ │ │ │ +- local_ranlux_state.carry; │ │ │ │ │ 00068 │ │ │ │ │ -CSphmomentum * mom; │ │ │ │ │ 00069 │ │ │ │ │ -double angle; │ │ │ │ │ +if (delta & mask_hi){ │ │ │ │ │ 00070 │ │ │ │ │ -bool │ │ │ │ │ -is_in; │ │ │ │ │ -00071 }; │ │ │ │ │ +local_ranlux_state.carry = 1; │ │ │ │ │ +00071 │ │ │ │ │ +delta &= mask_lo; │ │ │ │ │ 00072 │ │ │ │ │ +} else { │ │ │ │ │ 00073 │ │ │ │ │ -00076 inline bool operator<(const CSphborder_store & a, const CSphborder_store & b) { │ │ │ │ │ +local_ranlux_state.carry = 0; │ │ │ │ │ +00074 │ │ │ │ │ +} │ │ │ │ │ +00075 │ │ │ │ │ +00076 │ │ │ │ │ +local_ranlux_state.u[i] = delta; │ │ │ │ │ 00077 │ │ │ │ │ -return a.angle < b.angle; │ │ │ │ │ -00078 } │ │ │ │ │ +00078 │ │ │ │ │ +if (i==0) │ │ │ │ │ 00079 │ │ │ │ │ +i = 23; │ │ │ │ │ 00080 │ │ │ │ │ -00089 class CSphstable_cones : public CSphvicinity{ │ │ │ │ │ -00090 public: │ │ │ │ │ +else │ │ │ │ │ +00081 │ │ │ │ │ +i--; │ │ │ │ │ +00082 │ │ │ │ │ +00083 │ │ │ │ │ +local_ranlux_state.i = i; │ │ │ │ │ +00084 │ │ │ │ │ +00085 │ │ │ │ │ +if (j == 0) │ │ │ │ │ +00086 │ │ │ │ │ +j = 23; │ │ │ │ │ +00087 │ │ │ │ │ +else │ │ │ │ │ +00088 │ │ │ │ │ +j--; │ │ │ │ │ +00089 │ │ │ │ │ +00090 │ │ │ │ │ +local_ranlux_state.j = j; │ │ │ │ │ +00091 │ │ │ │ │ 00092 │ │ │ │ │ -CSphstable_cones(); │ │ │ │ │ -00093 │ │ │ │ │ +return delta; │ │ │ │ │ +00093 } │ │ │ │ │ +00094 │ │ │ │ │ 00095 │ │ │ │ │ -CSphstable_cones(std::vector &_particle_list); │ │ │ │ │ -00096 │ │ │ │ │ -00098 │ │ │ │ │ -~CSphstable_cones(); │ │ │ │ │ +00096 // set generator state │ │ │ │ │ +00097 //--------------------00098 static void ranlux_set(unsigned long int s){ │ │ │ │ │ 00099 │ │ │ │ │ +int i; │ │ │ │ │ +00100 │ │ │ │ │ +long int seed; │ │ │ │ │ +00101 │ │ │ │ │ +00102 │ │ │ │ │ +if (s==0) │ │ │ │ │ +00103 │ │ │ │ │ +s = 314159265; │ │ │ │ │ +/* default seed is 314159265 */ │ │ │ │ │ 00104 │ │ │ │ │ -void init(std::vector &_particle_list); │ │ │ │ │ 00105 │ │ │ │ │ +seed = s; │ │ │ │ │ +00106 │ │ │ │ │ +00107 │ │ │ │ │ +/* This is the initialization algorithm of F. James, widely in use │ │ │ │ │ +00108 │ │ │ │ │ +for RANLUX. */ │ │ │ │ │ +00109 │ │ │ │ │ +00110 │ │ │ │ │ +for (i=0;i<24;i++){ │ │ │ │ │ +00111 │ │ │ │ │ +unsigned long int k = seed/53668; │ │ │ │ │ +00112 │ │ │ │ │ +seed = 40014*(seed-k*53668)-k*12211; │ │ │ │ │ 00113 │ │ │ │ │ -int get_stable_cones(double _radius); │ │ │ │ │ +if (seed<0){ │ │ │ │ │ 00114 │ │ │ │ │ +seed += 2147483563; │ │ │ │ │ +00115 │ │ │ │ │ +} │ │ │ │ │ 00116 │ │ │ │ │ -std::vector protocones; │ │ │ │ │ +local_ranlux_state.u[i] = seed%two24; │ │ │ │ │ 00117 │ │ │ │ │ +} │ │ │ │ │ +00118 │ │ │ │ │ 00119 │ │ │ │ │ -sph_hash_cones *hc; │ │ │ │ │ +local_ranlux_state.i = 23; │ │ │ │ │ 00120 │ │ │ │ │ +local_ranlux_state.j = 9; │ │ │ │ │ +00121 │ │ │ │ │ +local_ranlux_state.n = 0; │ │ │ │ │ 00122 │ │ │ │ │ -int nb_tot; │ │ │ │ │ -00123 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +local_ranlux_state.skip = 389-24; // 389 => best decorrelation │ │ │ │ │ +00123 │ │ │ │ │ 00124 │ │ │ │ │ -int nb_hash_cones, nb_hash_occupied; │ │ │ │ │ -00125 #endif │ │ │ │ │ +if (local_ranlux_state.u[23]&mask_hi){ │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.25 siscone/ranlux.h File Reference │ │ │ │ │ + │ │ │ │ │ +233 │ │ │ │ │ + │ │ │ │ │ +00125 │ │ │ │ │ +local_ranlux_state.carry = 1; │ │ │ │ │ 00126 │ │ │ │ │ -00127 protected: │ │ │ │ │ -00129 │ │ │ │ │ -double R; │ │ │ │ │ +} else { │ │ │ │ │ +00127 │ │ │ │ │ +local_ranlux_state.carry = 0; │ │ │ │ │ +00128 │ │ │ │ │ +} │ │ │ │ │ +00129 } │ │ │ │ │ 00130 │ │ │ │ │ -00132 │ │ │ │ │ -double R2; │ │ │ │ │ -00133 │ │ │ │ │ +00131 │ │ │ │ │ +00132 // generator initialization │ │ │ │ │ +00133 //-------------------------00134 void ranlux_init(){ │ │ │ │ │ 00135 │ │ │ │ │ -double tan2R; │ │ │ │ │ +// seed the generator │ │ │ │ │ 00136 │ │ │ │ │ -00137 private: │ │ │ │ │ -00140 │ │ │ │ │ -CSphmomentum cone; │ │ │ │ │ -00141 │ │ │ │ │ +ranlux_set(0); │ │ │ │ │ +00137 } │ │ │ │ │ +00138 │ │ │ │ │ +00139 │ │ │ │ │ +00140 // get random number │ │ │ │ │ +00141 //------------------00142 unsigned long int ranlux_get(){ │ │ │ │ │ 00143 │ │ │ │ │ -CSphmomentum *child; │ │ │ │ │ +const unsigned int skip = local_ranlux_state.skip; │ │ │ │ │ 00144 │ │ │ │ │ +unsigned long int r = increment_state(); │ │ │ │ │ +00145 │ │ │ │ │ 00146 │ │ │ │ │ -CSphvicinity_elm *centre; │ │ │ │ │ +local_ranlux_state.n++; │ │ │ │ │ 00147 │ │ │ │ │ +00148 │ │ │ │ │ +if (local_ranlux_state.n == 24){ │ │ │ │ │ 00149 │ │ │ │ │ -unsigned int centre_idx; │ │ │ │ │ +unsigned int i; │ │ │ │ │ 00150 │ │ │ │ │ +local_ranlux_state.n = 0; │ │ │ │ │ +00151 │ │ │ │ │ +for (i = 0; i < skip; i++) │ │ │ │ │ 00152 │ │ │ │ │ -unsigned int first_cone; │ │ │ │ │ +increment_state(); │ │ │ │ │ 00153 │ │ │ │ │ -00159 │ │ │ │ │ -int init_cone(); │ │ │ │ │ -00160 │ │ │ │ │ +} │ │ │ │ │ +00154 │ │ │ │ │ +00155 │ │ │ │ │ +return r; │ │ │ │ │ +00156 } │ │ │ │ │ +00157 │ │ │ │ │ +00158 // print generator state │ │ │ │ │ +00159 //----------------------00160 void ranlux_print_state(){ │ │ │ │ │ +00161 │ │ │ │ │ +size_t i; │ │ │ │ │ +00162 │ │ │ │ │ +unsigned char *p = (unsigned char *) (&local_ranlux_state); │ │ │ │ │ +00163 │ │ │ │ │ +const size_t n = sizeof (ranlux_state_t); │ │ │ │ │ +00164 │ │ │ │ │ +00165 │ │ │ │ │ +for (i=0;i & border_list); │ │ │ │ │ -00197 │ │ │ │ │ -00204 │ │ │ │ │ -void test_stability(CSphmomentum & candidate, │ │ │ │ │ -00205 │ │ │ │ │ -const std::vector & border_vect); │ │ │ │ │ +} │ │ │ │ │ +00169 } │ │ │ │ │ +00170 │ │ │ │ │ +00171 } │ │ │ │ │ + │ │ │ │ │ +5.25 │ │ │ │ │ │ │ │ │ │ +siscone/ranlux.h File Reference │ │ │ │ │ + │ │ │ │ │ +This graph shows which files directly or indirectly include this file: │ │ │ │ │ + │ │ │ │ │ +siscone/ranlux.h │ │ │ │ │ + │ │ │ │ │ +siscone/ranlux.cpp │ │ │ │ │ + │ │ │ │ │ +siscone/reference.cpp │ │ │ │ │ + │ │ │ │ │ +Functions │ │ │ │ │ +• void siscone::ranlux_init () │ │ │ │ │ +initialize 'ranlux' generator │ │ │ │ │ + │ │ │ │ │ +• unsigned long int siscone::ranlux_get () │ │ │ │ │ +generate random value (24 bits) │ │ │ │ │ + │ │ │ │ │ +• void siscone::ranlux_print_state () │ │ │ │ │ +save state of the generator │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ - 5.41 siscone.cpp │ │ │ │ │ +siscone/siscone.cpp │ │ │ │ │ │ │ │ │ │ -00206 │ │ │ │ │ -00213 │ │ │ │ │ -void compute_cone_contents(); │ │ │ │ │ -00214 │ │ │ │ │ -00220 │ │ │ │ │ -void recompute_cone_contents(); │ │ │ │ │ -00221 │ │ │ │ │ -00222 │ │ │ │ │ -/* │ │ │ │ │ -00223 │ │ │ │ │ -* if we have gone beyond the acceptable threshold of change, compute │ │ │ │ │ -00224 │ │ │ │ │ -* the cone momentum from particle list. in this version, we use the │ │ │ │ │ -00225 │ │ │ │ │ -* ’pincluded’ information from the CSphvicinity class, but we don’t │ │ │ │ │ -00226 │ │ │ │ │ -* change the member cone, only the locally supplied one │ │ │ │ │ -00227 │ │ │ │ │ -*/ │ │ │ │ │ -00228 │ │ │ │ │ -void recompute_cone_contents_if_needed(CSphmomentum & this_cone, double & this_dpt); │ │ │ │ │ -00229 │ │ │ │ │ -00235 │ │ │ │ │ -int proceed_with_stability(); │ │ │ │ │ -00236 │ │ │ │ │ -00237 │ │ │ │ │ -/* │ │ │ │ │ -00238 │ │ │ │ │ -* circle intersection. │ │ │ │ │ -00239 │ │ │ │ │ -* computes the intersection with a circle of given centre and radius. │ │ │ │ │ -00240 │ │ │ │ │ -* The output takes the form of a checkxor of the intersection’s particles │ │ │ │ │ -00241 │ │ │ │ │ -circle centre x coordinate │ │ │ │ │ -* - cx │ │ │ │ │ -00242 │ │ │ │ │ -circle centre y coordinate │ │ │ │ │ -* - cy │ │ │ │ │ -00243 │ │ │ │ │ -* return the checkxor for the intersection │ │ │ │ │ -00244 │ │ │ │ │ -******************************************************************/ │ │ │ │ │ -00245 │ │ │ │ │ -siscone::Creference circle_intersect(CSph3vector &cone_centre); │ │ │ │ │ -00246 │ │ │ │ │ -00248 │ │ │ │ │ -CSphmomentum cone_candidate; │ │ │ │ │ -00249 │ │ │ │ │ -00251 │ │ │ │ │ -std::vector child_list; │ │ │ │ │ -00252 │ │ │ │ │ -00255 │ │ │ │ │ -std::vector< std::pair > multiple_centre_done; │ │ │ │ │ -00256 │ │ │ │ │ -00257 │ │ │ │ │ -// information for updating cone contents to avoid rounding errors │ │ │ │ │ -00258 │ │ │ │ │ -double dpt; │ │ │ │ │ -00259 }; │ │ │ │ │ -00260 │ │ │ │ │ -00261 } │ │ │ │ │ -00262 #endif │ │ │ │ │ +siscone/spherical/siscone.cpp │ │ │ │ │ │ │ │ │ │ -5.41 │ │ │ │ │ + 234 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +5.25.1 │ │ │ │ │ + │ │ │ │ │ +Function Documentation │ │ │ │ │ + │ │ │ │ │ +5.25.1.1 │ │ │ │ │ + │ │ │ │ │ +ranlux_get() │ │ │ │ │ + │ │ │ │ │ +unsigned long int siscone::ranlux_get ( ) │ │ │ │ │ + │ │ │ │ │ +generate random value (24 bits) │ │ │ │ │ +Definition at line 142 of file ranlux.cpp. │ │ │ │ │ + │ │ │ │ │ +5.25.1.2 │ │ │ │ │ + │ │ │ │ │ +ranlux_init() │ │ │ │ │ + │ │ │ │ │ +void siscone::ranlux_init ( ) │ │ │ │ │ + │ │ │ │ │ +initialize 'ranlux' generator │ │ │ │ │ +Definition at line 134 of file ranlux.cpp. │ │ │ │ │ + │ │ │ │ │ +5.25.1.3 │ │ │ │ │ + │ │ │ │ │ +ranlux_print_state() │ │ │ │ │ + │ │ │ │ │ +void siscone::ranlux_print_state ( ) │ │ │ │ │ + │ │ │ │ │ +save state of the generator │ │ │ │ │ +Definition at line 160 of file ranlux.cpp. │ │ │ │ │ + │ │ │ │ │ +5.26 │ │ │ │ │ + │ │ │ │ │ +ranlux.h │ │ │ │ │ + │ │ │ │ │ +Go to the documentation of this file. │ │ │ │ │ +00001 │ │ │ │ │ +00002 │ │ │ │ │ +00003 #ifndef __RANLUX_H__ │ │ │ │ │ +00004 #define __RANLUX_H__ │ │ │ │ │ +00005 │ │ │ │ │ +00006 /* This is a lagged fibonacci generator with skipping developed by Luescher. │ │ │ │ │ +00007 │ │ │ │ │ +The sequence is a series of 24-bit integers, x_n, │ │ │ │ │ +00008 │ │ │ │ │ +00009 │ │ │ │ │ +x_n = d_n + b_n │ │ │ │ │ +00010 │ │ │ │ │ +00011 │ │ │ │ │ +where d_n = x_{n-10} - x_{n-24} - c_{n-1}, b_n = 0 if d_n >= 0 and │ │ │ │ │ +00012 │ │ │ │ │ +b_n = 2^24 if d_n < 0, c_n = 0 if d_n >= 0 and c_n = 1 if d_n < 0, │ │ │ │ │ +00013 │ │ │ │ │ +where after 24 samples a group of p integers are "skipped", to │ │ │ │ │ +00014 │ │ │ │ │ +reduce correlations. By default p = 199, but can be increased to │ │ │ │ │ +00015 │ │ │ │ │ +365. │ │ │ │ │ +00016 │ │ │ │ │ +00017 │ │ │ │ │ +The period of the generator is around 10^171. │ │ │ │ │ +00018 │ │ │ │ │ +00019 │ │ │ │ │ +From: M. Luescher, "A portable high-quality random number generator │ │ │ │ │ +00020 │ │ │ │ │ +for lattice field theory calculations", Computer Physics │ │ │ │ │ +00021 │ │ │ │ │ +Communications, 79 (1994) 100-110. │ │ │ │ │ +00022 │ │ │ │ │ +00023 │ │ │ │ │ +Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/ │ │ │ │ │ +00024 │ │ │ │ │ +00025 │ │ │ │ │ +See also, │ │ │ │ │ +00026 │ │ │ │ │ +00027 │ │ │ │ │ +F. James, "RANLUX: A Fortran implementation of the high-quality │ │ │ │ │ +00028 │ │ │ │ │ +pseudo-random number generator of Luscher", Computer Physics │ │ │ │ │ +00029 │ │ │ │ │ +Communications, 79 (1994) 111-114 │ │ │ │ │ +00030 │ │ │ │ │ +00031 │ │ │ │ │ +Kenneth G. Hamilton, F. James, "Acceleration of RANLUX", Computer │ │ │ │ │ +00032 │ │ │ │ │ +Physics Communications, 101 (1997) 241-248 │ │ │ │ │ +00033 │ │ │ │ │ +00034 │ │ │ │ │ +Kenneth G. Hamilton, "Assembler RANLUX for PCs", Computer Physics │ │ │ │ │ +00035 │ │ │ │ │ +Communications, 101 (1997) 249-253 */ │ │ │ │ │ +00036 │ │ │ │ │ +00037 namespace siscone{ │ │ │ │ │ +00038 │ │ │ │ │ +00040 void ranlux_init(); │ │ │ │ │ +00041 │ │ │ │ │ +00043 unsigned long int ranlux_get(); │ │ │ │ │ +00044 │ │ │ │ │ +00046 void ranlux_print_state(); │ │ │ │ │ +00047 │ │ │ │ │ +00048 } │ │ │ │ │ +00049 #endif │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.27 reference.cpp │ │ │ │ │ + │ │ │ │ │ +5.27 │ │ │ │ │ + │ │ │ │ │ +reference.cpp │ │ │ │ │ + │ │ │ │ │ +00001 │ │ │ │ │ +00002 // File: reference.cpp │ │ │ │ │ +// │ │ │ │ │ +00003 // Description: source file for checkxor management (Creference class) │ │ │ │ │ +// │ │ │ │ │ +00004 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00006 // │ │ │ │ │ +// │ │ │ │ │ +00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00008 // │ │ │ │ │ +// │ │ │ │ │ +00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00012 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00013 // │ │ │ │ │ +// │ │ │ │ │ +00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00017 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00018 // │ │ │ │ │ +// │ │ │ │ │ +00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00020 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00022 // │ │ │ │ │ +// │ │ │ │ │ +00023 // $Revision:: 311 │ │ │ │ │ +$// │ │ │ │ │ +00024 // $Date:: 2011-10-05 23:27:09 +0200 (Wed, 05 Oct 2011) │ │ │ │ │ +$// │ │ │ │ │ +00026 │ │ │ │ │ +00027 #include "reference.h" │ │ │ │ │ +00028 #include "ranlux.h" │ │ │ │ │ +00029 #include │ │ │ │ │ +00030 │ │ │ │ │ +00031 namespace siscone{ │ │ │ │ │ +00032 │ │ │ │ │ +00033 /******************************************************* │ │ │ │ │ +00034 * Creference implementation │ │ │ │ │ +* │ │ │ │ │ +00035 * references used for checksums. │ │ │ │ │ +* │ │ │ │ │ +00036 * │ │ │ │ │ +* │ │ │ │ │ +00037 * This class implements some reference variable │ │ │ │ │ +* │ │ │ │ │ +00038 * that can be used for checksums. Those checksums │ │ │ │ │ +* │ │ │ │ │ +00039 * are useful to disentengle between contents of two │ │ │ │ │ +* │ │ │ │ │ +00040 * cones without looking into their explicit particle * │ │ │ │ │ +00041 * contents. │ │ │ │ │ +* │ │ │ │ │ +00042 *******************************************************/ │ │ │ │ │ +00043 │ │ │ │ │ +00044 // default constructor │ │ │ │ │ +00046 Creference::Creference(){ │ │ │ │ │ +00047 │ │ │ │ │ +ref[0] = ref[1] = ref[2] = 0; │ │ │ │ │ +00048 } │ │ │ │ │ +00049 │ │ │ │ │ +00050 │ │ │ │ │ +//static unsigned int reference_bit = 1; │ │ │ │ │ +00051 │ │ │ │ │ +00052 // create a random reference │ │ │ │ │ +00053 //--------------------------00054 void Creference::randomize(){ │ │ │ │ │ +00055 // ref[0] = reference_bit; │ │ │ │ │ +00056 // ref[1] = 0; │ │ │ │ │ +00057 // ref[2] = 0; │ │ │ │ │ +00058 // reference_bit «= 1; │ │ │ │ │ +00059 │ │ │ │ │ +00060 │ │ │ │ │ +unsigned int r1 = ranlux_get(); │ │ │ │ │ +00061 │ │ │ │ │ +unsigned int r2 = ranlux_get(); │ │ │ │ │ +00062 │ │ │ │ │ +unsigned int r3 = ranlux_get(); │ │ │ │ │ +00063 │ │ │ │ │ +unsigned int r4 = ranlux_get(); │ │ │ │ │ +00064 │ │ │ │ │ +// since ranlux only produces 24 bits, take r4 and add 8 bits │ │ │ │ │ +00065 │ │ │ │ │ +// from it to each of r1,r2, r3 to get 3*32 bits. │ │ │ │ │ +00066 │ │ │ │ │ +ref[0] = r1+((r4 & 0x00ff0000) « 8); │ │ │ │ │ +00067 │ │ │ │ │ +ref[1] = r2+((r4 & 0x0000ff00) « 16); │ │ │ │ │ +00068 │ │ │ │ │ +ref[2] = r3+((r4 & 0x000000ff) « 24); │ │ │ │ │ +00069 │ │ │ │ │ +00070 │ │ │ │ │ +if (is_empty()) randomize(); │ │ │ │ │ +00071 } │ │ │ │ │ +00072 │ │ │ │ │ +00073 // test emptyness │ │ │ │ │ +00074 //---------------00075 bool Creference::is_empty(){ │ │ │ │ │ +00076 │ │ │ │ │ +return (ref[0]==0) && (ref[1]==0) && (ref[2]==0); │ │ │ │ │ +00077 } │ │ │ │ │ +00078 │ │ │ │ │ +00079 // test non-emptyness │ │ │ │ │ +00080 //-------------------00081 bool Creference::not_empty(){ │ │ │ │ │ +00082 │ │ │ │ │ +return (ref[0]!=0) || (ref[1]!=0) || (ref[2]!=0); │ │ │ │ │ +00083 } │ │ │ │ │ +00084 │ │ │ │ │ +00085 // assignment of reference │ │ │ │ │ +00086 //------------------------00087 Creference& Creference::operator = (const Creference &r){ │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +235 │ │ │ │ │ + │ │ │ │ │ + 236 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00088 │ │ │ │ │ +ref[0] = r.ref[0]; │ │ │ │ │ +00089 │ │ │ │ │ +ref[1] = r.ref[1]; │ │ │ │ │ +00090 │ │ │ │ │ +ref[2] = r.ref[2]; │ │ │ │ │ +00091 │ │ │ │ │ +return *this; │ │ │ │ │ +00092 } │ │ │ │ │ +00093 │ │ │ │ │ +00094 // addition of reference │ │ │ │ │ +00095 //----------------------00096 Creference Creference::operator + (const Creference &r){ │ │ │ │ │ +00097 │ │ │ │ │ +Creference tmp = *this; │ │ │ │ │ +00098 │ │ │ │ │ +return tmp+=r; │ │ │ │ │ +00099 } │ │ │ │ │ +00100 │ │ │ │ │ +00101 // incrementation of reference │ │ │ │ │ +00102 //----------------------------00103 Creference& Creference::operator += (const Creference &r){ │ │ │ │ │ +00104 │ │ │ │ │ +ref[0] ^= r.ref[0]; │ │ │ │ │ +00105 │ │ │ │ │ +ref[1] ^= r.ref[1]; │ │ │ │ │ +00106 │ │ │ │ │ +ref[2] ^= r.ref[2]; │ │ │ │ │ +00107 │ │ │ │ │ +return *this; │ │ │ │ │ +00108 } │ │ │ │ │ +00109 │ │ │ │ │ +00110 // decrementation of reference │ │ │ │ │ +00111 //----------------------------00112 Creference& Creference::operator -= (const Creference &r){ │ │ │ │ │ +00113 │ │ │ │ │ +ref[0] ^= r.ref[0]; │ │ │ │ │ +00114 │ │ │ │ │ +ref[1] ^= r.ref[1]; │ │ │ │ │ +00115 │ │ │ │ │ +ref[2] ^= r.ref[2]; │ │ │ │ │ +00116 │ │ │ │ │ +return *this; │ │ │ │ │ +00117 } │ │ │ │ │ +00118 │ │ │ │ │ +00119 } │ │ │ │ │ +00120 │ │ │ │ │ + │ │ │ │ │ +5.28 │ │ │ │ │ + │ │ │ │ │ +reference.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: reference.h │ │ │ │ │ +// │ │ │ │ │ +00004 // Description: header file for checkxor management (Creference class) │ │ │ │ │ +// │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +// │ │ │ │ │ +00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00013 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00014 // │ │ │ │ │ +// │ │ │ │ │ +00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00018 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00019 // │ │ │ │ │ +// │ │ │ │ │ +00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00021 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00023 // │ │ │ │ │ +// │ │ │ │ │ +00024 // $Revision:: 123 │ │ │ │ │ +$// │ │ │ │ │ +00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ +$// │ │ │ │ │ +00027 │ │ │ │ │ +00028 #ifndef __REFERENCE_H__ │ │ │ │ │ +00029 #define __REFERENCE_H__ │ │ │ │ │ +00030 │ │ │ │ │ +00031 namespace siscone{ │ │ │ │ │ +00032 │ │ │ │ │ +00043 class Creference{ │ │ │ │ │ +00044 public: │ │ │ │ │ +00046 │ │ │ │ │ +Creference(); │ │ │ │ │ +00047 │ │ │ │ │ +00049 │ │ │ │ │ +void randomize(); │ │ │ │ │ +00050 │ │ │ │ │ +00052 │ │ │ │ │ +bool is_empty(); │ │ │ │ │ +00053 │ │ │ │ │ +00055 │ │ │ │ │ +bool not_empty(); │ │ │ │ │ +00056 │ │ │ │ │ +00058 │ │ │ │ │ +Creference& operator = (const Creference &r); │ │ │ │ │ +00059 │ │ │ │ │ +00061 │ │ │ │ │ +Creference operator + (const Creference &r); │ │ │ │ │ +00062 │ │ │ │ │ +00064 │ │ │ │ │ +Creference& operator += (const Creference &r); │ │ │ │ │ +00065 │ │ │ │ │ +00067 │ │ │ │ │ +Creference& operator -= (const Creference &r); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.29 siscone.cpp │ │ │ │ │ + │ │ │ │ │ +00068 │ │ │ │ │ +00070 │ │ │ │ │ +inline unsigned int operator[] (int i) {return ref[i];} │ │ │ │ │ +00071 │ │ │ │ │ +00072 │ │ │ │ │ +unsigned int ref[3]; │ │ │ │ │ +00073 }; │ │ │ │ │ +00074 │ │ │ │ │ +00076 Creference operator + (Creference &r1, Creference &r2); │ │ │ │ │ +00077 │ │ │ │ │ +00079 bool operator == (const Creference &r1, const Creference &r2); │ │ │ │ │ +00080 │ │ │ │ │ +00082 bool operator != (const Creference &r1, const Creference &r2); │ │ │ │ │ +00083 │ │ │ │ │ +00085 bool operator < (const Creference &r1, const Creference &r2); │ │ │ │ │ +00086 │ │ │ │ │ +00087 │ │ │ │ │ +00088 //=============== inline material ================ │ │ │ │ │ +00089 │ │ │ │ │ +00090 // equality test for two references │ │ │ │ │ +00091 //---------------------------------00092 inline bool operator == (const Creference &r1, const Creference &r2){ │ │ │ │ │ +00093 │ │ │ │ │ +return (r1.ref[0]==r2.ref[0]) && (r1.ref[1]==r2.ref[1]) && (r1.ref[2]==r2.ref[2]); │ │ │ │ │ +00094 } │ │ │ │ │ +00095 │ │ │ │ │ +00096 // difference test for two references │ │ │ │ │ +00097 //---------------------------------00098 inline bool operator != (const Creference &r1, const Creference &r2){ │ │ │ │ │ +00099 │ │ │ │ │ +return (r1.ref[0]!=r2.ref[0]) || (r1.ref[1]!=r2.ref[1]) || (r1.ref[2]!=r2.ref[2]); │ │ │ │ │ +00100 } │ │ │ │ │ +00101 │ │ │ │ │ +00102 // difference test for two references │ │ │ │ │ +00103 //---------------------------------00104 inline bool operator < (const Creference &r1, const Creference &r2){ │ │ │ │ │ +00105 │ │ │ │ │ +return (r1.ref[0]0) && (_n_pass_max!=0)); │ │ │ │ │ @@ -23860,28 +20882,28 @@ │ │ │ │ │ NOTE: using pt leads to IR unsafety for some events with momentum │ │ │ │ │ 00212 * │ │ │ │ │ conservation. So we strongly advise not to change the default │ │ │ │ │ 00213 * │ │ │ │ │ value. │ │ │ │ │ 00214 * return the number of jets found, -1 if recomputation not allowed. │ │ │ │ │ 00215 ********************************************************************/ │ │ │ │ │ -00216 int Csiscone::recompute_jets(double _f, double _ptmin, │ │ │ │ │ -00217 │ │ │ │ │ -Esplit_merge_scale _split_merge_scale){ │ │ │ │ │ -00218 │ │ │ │ │ -if (!rerun_allowed) │ │ │ │ │ │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ -261 │ │ │ │ │ +239 │ │ │ │ │ │ │ │ │ │ - 262 │ │ │ │ │ + 240 │ │ │ │ │ │ │ │ │ │ File Documentation │ │ │ │ │ │ │ │ │ │ +00216 int Csiscone::recompute_jets(double _f, double _ptmin, │ │ │ │ │ +00217 │ │ │ │ │ +Esplit_merge_scale _split_merge_scale){ │ │ │ │ │ +00218 │ │ │ │ │ +if (!rerun_allowed) │ │ │ │ │ 00219 │ │ │ │ │ return -1; │ │ │ │ │ 00220 │ │ │ │ │ 00221 │ │ │ │ │ ptcomparison.split_merge_scale = _split_merge_scale; │ │ │ │ │ 00222 │ │ │ │ │ 00223 │ │ │ │ │ @@ -24001,29 +21023,28 @@ │ │ │ │ │ 00290 string siscone_version(){ │ │ │ │ │ 00291 │ │ │ │ │ return SISCONE_VERSION; │ │ │ │ │ 00292 } │ │ │ │ │ 00293 │ │ │ │ │ 00294 } │ │ │ │ │ │ │ │ │ │ -5.42 │ │ │ │ │ +5.30 │ │ │ │ │ │ │ │ │ │ siscone.cpp │ │ │ │ │ │ │ │ │ │ 00001 │ │ │ │ │ -00002 // File: siscone.cpp │ │ │ │ │ -00003 // Description: source file for the main SISCone class │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ - 5.42 siscone.cpp │ │ │ │ │ + 5.30 siscone.cpp │ │ │ │ │ │ │ │ │ │ +00002 // File: siscone.cpp │ │ │ │ │ +// │ │ │ │ │ +00003 // Description: source file for the main SISCone class │ │ │ │ │ +// │ │ │ │ │ 00004 // This file is part of the SISCone project. │ │ │ │ │ // │ │ │ │ │ 00005 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ // │ │ │ │ │ 00006 // │ │ │ │ │ an adaptation to spherical coordinates │ │ │ │ │ // │ │ │ │ │ @@ -24143,27 +21164,27 @@ │ │ │ │ │ 00086 │ │ │ │ │ 00087 │ │ │ │ │ // run some general safety tests (NB: f will be checked in split-merge) │ │ │ │ │ 00088 │ │ │ │ │ if (_radius <= 0.0 || _radius >= 0.5*M_PI) { │ │ │ │ │ 00089 │ │ │ │ │ ostringstream message; │ │ │ │ │ -00090 │ │ │ │ │ -message « "Illegal value for cone radius, R = " « _radius │ │ │ │ │ -00091 │ │ │ │ │ -« " (legal values are 0flush(); │ │ │ │ │ @@ -24520,14 +21541,2977 @@ │ │ │ │ │ 00293 string siscone_version(){ │ │ │ │ │ 00294 │ │ │ │ │ return SISCONE_VERSION; │ │ │ │ │ 00295 } │ │ │ │ │ 00296 │ │ │ │ │ 00297 } │ │ │ │ │ │ │ │ │ │ +5.31 │ │ │ │ │ + │ │ │ │ │ +siscone_error.cpp │ │ │ │ │ + │ │ │ │ │ +00001 │ │ │ │ │ +00002 // File: siscone_error.cpp │ │ │ │ │ +// │ │ │ │ │ +00003 // Description: source file for SISCone error messages (Csiscone_error) │ │ │ │ │ +// │ │ │ │ │ +00004 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00006 // │ │ │ │ │ +// │ │ │ │ │ +00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00008 // │ │ │ │ │ +// │ │ │ │ │ +00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00012 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00013 // │ │ │ │ │ +// │ │ │ │ │ +00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00017 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00018 // │ │ │ │ │ +// │ │ │ │ │ +00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00020 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00022 // │ │ │ │ │ +// │ │ │ │ │ +00023 // $Revision:: 123 │ │ │ │ │ +$// │ │ │ │ │ +00024 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ +$// │ │ │ │ │ +00026 │ │ │ │ │ +00027 #include "siscone_error.h" │ │ │ │ │ +00028 │ │ │ │ │ +00029 namespace siscone{ │ │ │ │ │ +00030 │ │ │ │ │ +00031 bool Csiscone_error::m_print_errors = true; │ │ │ │ │ +00032 │ │ │ │ │ +00033 } │ │ │ │ │ + │ │ │ │ │ +5.32 │ │ │ │ │ + │ │ │ │ │ +siscone_error.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: siscone_error.h │ │ │ │ │ +00004 // Description: header file for SISCone error messages (Csiscone_error) │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ +00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +00007 // │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.33 geom_2d.cpp │ │ │ │ │ + │ │ │ │ │ +00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00013 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00014 // │ │ │ │ │ +// │ │ │ │ │ +00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00018 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00019 // │ │ │ │ │ +// │ │ │ │ │ +00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00021 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00023 // │ │ │ │ │ +// │ │ │ │ │ +00024 // $Revision:: 327 │ │ │ │ │ +$// │ │ │ │ │ +00025 // $Date:: 2011-11-25 15:19:39 +0100 (Fri, 25 Nov 2011) │ │ │ │ │ +$// │ │ │ │ │ +00027 │ │ │ │ │ +00028 #ifndef __SISCONE_ERROR_H__ │ │ │ │ │ +00029 #define __SISCONE_ERROR_H__ │ │ │ │ │ +00030 │ │ │ │ │ +00031 #include │ │ │ │ │ +00032 #include │ │ │ │ │ +00033 │ │ │ │ │ +00034 namespace siscone{ │ │ │ │ │ +00035 │ │ │ │ │ +00038 class Csiscone_error { │ │ │ │ │ +00039 public: │ │ │ │ │ +00041 │ │ │ │ │ +Csiscone_error() {;}; │ │ │ │ │ +00042 │ │ │ │ │ +00045 │ │ │ │ │ +Csiscone_error(const std::string & message_in) { │ │ │ │ │ +00046 │ │ │ │ │ +m_message = message_in; │ │ │ │ │ +00047 │ │ │ │ │ +if (m_print_errors) std::cerr « "siscone::Csiscone_error: "« message_in « std::endl; │ │ │ │ │ +00048 │ │ │ │ │ +}; │ │ │ │ │ +00049 │ │ │ │ │ +00051 │ │ │ │ │ +std::string message() const {return m_message;}; │ │ │ │ │ +00052 │ │ │ │ │ +00055 │ │ │ │ │ +static void setm_print_errors(bool print_errors) { │ │ │ │ │ +00056 │ │ │ │ │ +m_print_errors = print_errors;}; │ │ │ │ │ +00057 │ │ │ │ │ +00058 private: │ │ │ │ │ +00059 │ │ │ │ │ +std::string m_message; │ │ │ │ │ +00060 │ │ │ │ │ +static bool m_print_errors; │ │ │ │ │ +00061 }; │ │ │ │ │ +00062 │ │ │ │ │ +00063 } │ │ │ │ │ +00064 #endif │ │ │ │ │ + │ │ │ │ │ +5.33 │ │ │ │ │ + │ │ │ │ │ +geom_2d.cpp │ │ │ │ │ + │ │ │ │ │ +00001 │ │ │ │ │ +00002 // File: geom_2d.cpp │ │ │ │ │ +// │ │ │ │ │ +00003 // Description: source file for two-dimensional geometry tools │ │ │ │ │ +// │ │ │ │ │ +00004 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00006 // │ │ │ │ │ +// │ │ │ │ │ +00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00008 // │ │ │ │ │ +// │ │ │ │ │ +00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00012 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00013 // │ │ │ │ │ +// │ │ │ │ │ +00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00017 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00018 // │ │ │ │ │ +// │ │ │ │ │ +00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00020 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00022 // │ │ │ │ │ +// │ │ │ │ │ +00023 // $Revision:: 171 │ │ │ │ │ +$// │ │ │ │ │ +00024 // $Date:: 2007-06-19 16:26:05 +0200 (Tue, 19 Jun 2007) │ │ │ │ │ +$// │ │ │ │ │ +00026 │ │ │ │ │ +00027 #include "geom_2d.h" │ │ │ │ │ +00028 #include │ │ │ │ │ +00029 │ │ │ │ │ +00030 namespace siscone{ │ │ │ │ │ +00031 │ │ │ │ │ +00032 #define PHI_RANGE_MASK 0xFFFFFFFF │ │ │ │ │ +00033 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +245 │ │ │ │ │ + │ │ │ │ │ + 246 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00034 /********************************************************* │ │ │ │ │ +00035 * class Ceta_phi_range implementation │ │ │ │ │ +* │ │ │ │ │ +00036 * class for holding a covering range in eta-phi │ │ │ │ │ +* │ │ │ │ │ +00037 * │ │ │ │ │ +* │ │ │ │ │ +00038 * This class deals with ranges in the eta-phi plane. It * │ │ │ │ │ +00039 * implements methods to test if two ranges overlap and * │ │ │ │ │ +00040 * to take the union of two overlapping intervals. │ │ │ │ │ +* │ │ │ │ │ +00041 *********************************************************/ │ │ │ │ │ +00042 │ │ │ │ │ +00043 using namespace std; │ │ │ │ │ +00044 │ │ │ │ │ +00045 // static member default init │ │ │ │ │ +00046 //---------------------------00047 double Ceta_phi_range::eta_min = -100.0; │ │ │ │ │ +00048 double Ceta_phi_range::eta_max = 100.0; │ │ │ │ │ +00049 │ │ │ │ │ +00050 // default ctor │ │ │ │ │ +00051 //-------------00052 Ceta_phi_range::Ceta_phi_range(){ │ │ │ │ │ +00053 │ │ │ │ │ +eta_range = 0; │ │ │ │ │ +00054 │ │ │ │ │ +phi_range = 0; │ │ │ │ │ +00055 } │ │ │ │ │ +00056 │ │ │ │ │ +00057 // ctor with initialisation │ │ │ │ │ +00058 // we initialise with a centre (in eta,phi) and a radius │ │ │ │ │ +00059 // - c_eta │ │ │ │ │ +eta coordinate of the centre │ │ │ │ │ +00060 // - c_phi │ │ │ │ │ +phi coordinate of the centre │ │ │ │ │ +00061 // - R │ │ │ │ │ +radius │ │ │ │ │ +00062 //------------------------------------------------------00063 Ceta_phi_range::Ceta_phi_range(double c_eta, double c_phi, double R){ │ │ │ │ │ +00064 │ │ │ │ │ +// determination of the eta range │ │ │ │ │ +00065 │ │ │ │ │ +//------------------------------00066 │ │ │ │ │ +double xmin = max(c_eta-R,eta_min+0.0001); │ │ │ │ │ +00067 │ │ │ │ │ +double xmax = min(c_eta+R,eta_max-0.0001); │ │ │ │ │ +00068 │ │ │ │ │ +00069 │ │ │ │ │ +unsigned int cell_min = get_eta_cell(xmin); │ │ │ │ │ +00070 │ │ │ │ │ +unsigned int cell_max = get_eta_cell(xmax); │ │ │ │ │ +00071 │ │ │ │ │ +00072 │ │ │ │ │ +// warning: if cell_max==2^31, 2*cell_max==0 hence, │ │ │ │ │ +00073 │ │ │ │ │ +// even if the next formula is formally (2*cell_max-cell_min), │ │ │ │ │ +00074 │ │ │ │ │ +// expressing it as (cell_max-cell_min)+cell_max is safe. │ │ │ │ │ +00075 │ │ │ │ │ +eta_range = (cell_max-cell_min)+cell_max; │ │ │ │ │ +00076 │ │ │ │ │ +00077 │ │ │ │ │ +// determination of the phi range │ │ │ │ │ +00078 │ │ │ │ │ +// !! taking care of periodicity !! │ │ │ │ │ +00079 │ │ │ │ │ +//--------------------------------00080 │ │ │ │ │ +xmin = phi_in_range(c_phi-R); │ │ │ │ │ +00081 │ │ │ │ │ +xmax = phi_in_range(c_phi+R); │ │ │ │ │ +00082 │ │ │ │ │ +00083 │ │ │ │ │ +cell_min = get_phi_cell(xmin); │ │ │ │ │ +00084 │ │ │ │ │ +cell_max = get_phi_cell(xmax); │ │ │ │ │ +00085 │ │ │ │ │ +00086 │ │ │ │ │ +// Also, if the interval goes through pi, inversion is needed │ │ │ │ │ +00087 │ │ │ │ │ +if (xmax>xmin) │ │ │ │ │ +00088 │ │ │ │ │ +phi_range = (cell_max-cell_min)+cell_max; │ │ │ │ │ +00089 │ │ │ │ │ +else { │ │ │ │ │ +00090 │ │ │ │ │ +phi_range = (cell_min==cell_max) │ │ │ │ │ +00091 │ │ │ │ │ +? PHI_RANGE_MASK │ │ │ │ │ +00092 │ │ │ │ │ +: ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max); │ │ │ │ │ +00093 │ │ │ │ │ +} │ │ │ │ │ +00094 } │ │ │ │ │ +00095 │ │ │ │ │ +00096 // assignment of range │ │ │ │ │ +00097 // - r │ │ │ │ │ +range to assign to current one │ │ │ │ │ +00098 //--------------------------------------00099 Ceta_phi_range& Ceta_phi_range::operator = (const Ceta_phi_range &r){ │ │ │ │ │ +00100 │ │ │ │ │ +eta_range = r.eta_range; │ │ │ │ │ +00101 │ │ │ │ │ +phi_range = r.phi_range; │ │ │ │ │ +00102 │ │ │ │ │ +00103 │ │ │ │ │ +return *this; │ │ │ │ │ +00104 } │ │ │ │ │ +00105 │ │ │ │ │ +00106 // add a particle to the range │ │ │ │ │ +00107 // - eta eta coordinate of the particle │ │ │ │ │ +00108 // - phi phi coordinate of the particle │ │ │ │ │ +00109 // \return 0 on success, 1 on error │ │ │ │ │ +00110 //---------------------------------------00111 int Ceta_phi_range::add_particle(const double eta, const double phi){ │ │ │ │ │ +00112 │ │ │ │ │ +// deal with the eta coordinate │ │ │ │ │ +00113 │ │ │ │ │ +eta_range |= get_eta_cell(eta); │ │ │ │ │ +00114 │ │ │ │ │ +00115 │ │ │ │ │ +// deal with the phi coordinate │ │ │ │ │ +00116 │ │ │ │ │ +phi_range |= get_phi_cell(phi); │ │ │ │ │ +00117 │ │ │ │ │ +00118 │ │ │ │ │ +return 0; │ │ │ │ │ +00119 } │ │ │ │ │ +00120 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.34 geom_2d.cpp │ │ │ │ │ + │ │ │ │ │ +247 │ │ │ │ │ + │ │ │ │ │ +00121 │ │ │ │ │ +00122 // test overlap │ │ │ │ │ +00123 // - r1 first range │ │ │ │ │ +00124 // - r2 second range │ │ │ │ │ +00125 // return true if overlap, false otherwise. │ │ │ │ │ +00126 //-----------------------------------------00127 bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2){ │ │ │ │ │ +00128 │ │ │ │ │ +// check overlap in eta AND phi │ │ │ │ │ +00129 │ │ │ │ │ +return ((r1.eta_range & r2.eta_range) && (r1.phi_range & r2.phi_range)); │ │ │ │ │ +00130 } │ │ │ │ │ +00131 │ │ │ │ │ +00132 // compute union │ │ │ │ │ +00133 // Note: we assume that the two intervals overlap │ │ │ │ │ +00134 // - r1 first range │ │ │ │ │ +00135 // - r2 second range │ │ │ │ │ +00136 // \return union of the two ranges │ │ │ │ │ +00137 //-----------------------------------------00138 const Ceta_phi_range range_union (const Ceta_phi_range &r1, const Ceta_phi_range &r2){ │ │ │ │ │ +00139 │ │ │ │ │ +Ceta_phi_range tmp; │ │ │ │ │ +00140 │ │ │ │ │ +00141 │ │ │ │ │ +// compute union in eta │ │ │ │ │ +00142 │ │ │ │ │ +tmp.eta_range = r1.eta_range | r2.eta_range; │ │ │ │ │ +00143 │ │ │ │ │ +00144 │ │ │ │ │ +// compute union in phi │ │ │ │ │ +00145 │ │ │ │ │ +tmp.phi_range = r1.phi_range | r2.phi_range; │ │ │ │ │ +00146 │ │ │ │ │ +00147 │ │ │ │ │ +return tmp; │ │ │ │ │ +00148 } │ │ │ │ │ +00149 │ │ │ │ │ +00150 } │ │ │ │ │ + │ │ │ │ │ +5.34 │ │ │ │ │ + │ │ │ │ │ +geom_2d.cpp │ │ │ │ │ + │ │ │ │ │ +00001 │ │ │ │ │ +00002 // File: geom_2d.cpp │ │ │ │ │ +// │ │ │ │ │ +00003 // Description: source file for two-dimensional geometry tools │ │ │ │ │ +// │ │ │ │ │ +00004 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00005 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ +// │ │ │ │ │ +00006 // │ │ │ │ │ +an adaptation to spherical coordinates │ │ │ │ │ +// │ │ │ │ │ +00007 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00008 // │ │ │ │ │ +// │ │ │ │ │ +00009 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ +00010 // │ │ │ │ │ +// │ │ │ │ │ +00011 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00012 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00013 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00014 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00015 // │ │ │ │ │ +// │ │ │ │ │ +00016 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00019 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00020 // │ │ │ │ │ +// │ │ │ │ │ +00021 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00022 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00024 // │ │ │ │ │ +// │ │ │ │ │ +00025 // $Revision:: 378 │ │ │ │ │ +$// │ │ │ │ │ +00026 // $Date:: 2016-02-24 15:10:38 +0100 (Wed, 24 Feb 2016) │ │ │ │ │ +$// │ │ │ │ │ +00028 │ │ │ │ │ +00029 #include "geom_2d.h" │ │ │ │ │ +00030 #include │ │ │ │ │ +00031 │ │ │ │ │ +00032 namespace siscone_spherical{ │ │ │ │ │ +00033 │ │ │ │ │ +00034 #define PHI_RANGE_MASK 0xFFFFFFFF │ │ │ │ │ +00035 │ │ │ │ │ +00036 /********************************************************* │ │ │ │ │ +00037 * class CSphtheta_phi_range implementation │ │ │ │ │ +* │ │ │ │ │ +00038 * class for holding a covering range in eta-phi │ │ │ │ │ +* │ │ │ │ │ +00039 * │ │ │ │ │ +* │ │ │ │ │ +00040 * This class deals with ranges in the eta-phi plane. It * │ │ │ │ │ +00041 * implements methods to test if two ranges overlap and * │ │ │ │ │ +00042 * to take the union of two overlapping intervals. │ │ │ │ │ +* │ │ │ │ │ +00043 *********************************************************/ │ │ │ │ │ +00044 │ │ │ │ │ +00045 using namespace std; │ │ │ │ │ +00046 │ │ │ │ │ +00047 // static member default init │ │ │ │ │ +00048 //---------------------------00049 double CSphtheta_phi_range::theta_min = 0.0; │ │ │ │ │ +00050 double CSphtheta_phi_range::theta_max = M_PI; │ │ │ │ │ +00051 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ + 248 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00052 // default ctor │ │ │ │ │ +00053 //-------------00054 CSphtheta_phi_range::CSphtheta_phi_range(){ │ │ │ │ │ +00055 │ │ │ │ │ +theta_range = 0; │ │ │ │ │ +00056 │ │ │ │ │ +phi_range = 0; │ │ │ │ │ +00057 } │ │ │ │ │ +00058 │ │ │ │ │ +00059 // ctor with initialisation │ │ │ │ │ +00060 // we initialise with a centre (in eta,phi) and a radius │ │ │ │ │ +00061 // - c_theta theta coordinate of the centre │ │ │ │ │ +00062 // - c_phi │ │ │ │ │ +phi coordinate of the centre │ │ │ │ │ +00063 // - R │ │ │ │ │ +radius │ │ │ │ │ +00064 //------------------------------------------------------00065 CSphtheta_phi_range::CSphtheta_phi_range(double c_theta, double c_phi, double R){ │ │ │ │ │ +00066 │ │ │ │ │ +// determination of the eta range │ │ │ │ │ +00067 │ │ │ │ │ +//------------------------------00068 │ │ │ │ │ +double xmin = max(c_theta-R,theta_min+0.00001); │ │ │ │ │ +00069 │ │ │ │ │ +double xmax = min(c_theta+R,theta_max-0.00001); │ │ │ │ │ +00070 │ │ │ │ │ +00071 │ │ │ │ │ +unsigned int cell_min = get_theta_cell(xmin); │ │ │ │ │ +00072 │ │ │ │ │ +unsigned int cell_max = get_theta_cell(xmax); │ │ │ │ │ +00073 │ │ │ │ │ +00074 │ │ │ │ │ +// warning: if cell_max==2^31, 2*cell_max==0 hence, │ │ │ │ │ +00075 │ │ │ │ │ +// even if the next formula is formally (2*cell_max-cell_min), │ │ │ │ │ +00076 │ │ │ │ │ +// expressing it as (cell_max-cell_min)+cell_max is safe. │ │ │ │ │ +00077 │ │ │ │ │ +theta_range = (cell_max-cell_min)+cell_max; │ │ │ │ │ +00078 │ │ │ │ │ +00079 │ │ │ │ │ +// determination of the phi range │ │ │ │ │ +00080 │ │ │ │ │ +// !! taking care of periodicity !! │ │ │ │ │ +00081 │ │ │ │ │ +// !! and the theta dependence │ │ │ │ │ +!! │ │ │ │ │ +00082 │ │ │ │ │ +//--------------------------------00083 │ │ │ │ │ +double ymin,ymax; │ │ │ │ │ +00084 │ │ │ │ │ +double extra = asin(R/M_PI); │ │ │ │ │ +00085 │ │ │ │ │ +// if the theta range comes too close to the endpoints (theta=0 or │ │ │ │ │ +00086 │ │ │ │ │ +// theta=pi), then keep the full phi range │ │ │ │ │ +00087 │ │ │ │ │ +if (xmin<=theta_min+extra){ │ │ │ │ │ +00088 │ │ │ │ │ +ymin = -M_PI+0.00001; │ │ │ │ │ +00089 │ │ │ │ │ +ymax = M_PI-0.00001; │ │ │ │ │ +00090 │ │ │ │ │ +} else if (xmax>=theta_max-extra){ │ │ │ │ │ +00091 │ │ │ │ │ +ymin = -M_PI+0.00001; │ │ │ │ │ +00092 │ │ │ │ │ +ymax = M_PI-0.00001; │ │ │ │ │ +00093 │ │ │ │ │ +} else { │ │ │ │ │ +00094 │ │ │ │ │ +extra = max(1.0/sin(xmin), 1.0/sin(xmax)); │ │ │ │ │ +00095 │ │ │ │ │ +ymin = (c_phi-R)*extra; │ │ │ │ │ +00096 │ │ │ │ │ +while (ymin<-M_PI) ymin+=twopi; │ │ │ │ │ +00097 │ │ │ │ │ +while (ymin> M_PI) ymin-=twopi; │ │ │ │ │ +00098 │ │ │ │ │ +ymax = (c_phi-R)*extra; │ │ │ │ │ +00099 │ │ │ │ │ +while (ymax<-M_PI) ymax+=twopi; │ │ │ │ │ +00100 │ │ │ │ │ +while (ymax> M_PI) ymax-=twopi; │ │ │ │ │ +00101 │ │ │ │ │ +} │ │ │ │ │ +00102 │ │ │ │ │ +cell_min = get_phi_cell(ymin); │ │ │ │ │ +00103 │ │ │ │ │ +cell_max = get_phi_cell(ymax); │ │ │ │ │ +00104 │ │ │ │ │ +00105 │ │ │ │ │ +// Also, if the interval goes through pi, inversion is needed │ │ │ │ │ +00106 │ │ │ │ │ +if (ymax>ymin) │ │ │ │ │ +00107 │ │ │ │ │ +phi_range = (cell_max-cell_min)+cell_max; │ │ │ │ │ +00108 │ │ │ │ │ +else { │ │ │ │ │ +00109 │ │ │ │ │ +phi_range = (cell_min==cell_max) │ │ │ │ │ +00110 │ │ │ │ │ +? PHI_RANGE_MASK │ │ │ │ │ +00111 │ │ │ │ │ +: ((PHI_RANGE_MASK^(cell_min-cell_max)) + cell_max); │ │ │ │ │ +00112 │ │ │ │ │ +} │ │ │ │ │ +00113 } │ │ │ │ │ +00114 │ │ │ │ │ +00115 // assignment of range │ │ │ │ │ +00116 // - r │ │ │ │ │ +range to assign to current one │ │ │ │ │ +00117 //--------------------------------------00118 CSphtheta_phi_range& CSphtheta_phi_range::operator = (const CSphtheta_phi_range &r){ │ │ │ │ │ +00119 │ │ │ │ │ +theta_range = r.theta_range; │ │ │ │ │ +00120 │ │ │ │ │ +phi_range = r.phi_range; │ │ │ │ │ +00121 │ │ │ │ │ +00122 │ │ │ │ │ +return *this; │ │ │ │ │ +00123 } │ │ │ │ │ +00124 │ │ │ │ │ +00125 // add a particle to the range │ │ │ │ │ +00126 // - eta eta coordinate of the particle │ │ │ │ │ +00127 // - phi phi coordinate of the particle │ │ │ │ │ +00128 // \return 0 on success, 1 on error │ │ │ │ │ +00129 //---------------------------------------00130 int CSphtheta_phi_range::add_particle(const double theta, const double phi){ │ │ │ │ │ +00131 │ │ │ │ │ +// get the theta cell │ │ │ │ │ +00132 │ │ │ │ │ +unsigned int theta_cell = get_theta_cell(theta); │ │ │ │ │ +00133 │ │ │ │ │ +00134 │ │ │ │ │ +// deal with the eta coordinate │ │ │ │ │ +00135 │ │ │ │ │ +theta_range |= theta_cell; │ │ │ │ │ +00136 │ │ │ │ │ +00137 │ │ │ │ │ +// deal with the phi coordinate │ │ │ │ │ +00138 │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.35 geom_2d.h │ │ │ │ │ + │ │ │ │ │ +249 │ │ │ │ │ + │ │ │ │ │ +00139 │ │ │ │ │ +// watch out: if the theta_cell includes theta==0 or theta==pi, │ │ │ │ │ +00140 │ │ │ │ │ +// incude the full phi range │ │ │ │ │ +00141 │ │ │ │ │ +if ((theta_cell == 0x1) || (theta_cell == 0x80000000)) │ │ │ │ │ +00142 │ │ │ │ │ +phi_range = 0xffffffff; │ │ │ │ │ +00143 │ │ │ │ │ +else │ │ │ │ │ +00144 │ │ │ │ │ +phi_range |= get_phi_cell(phi); │ │ │ │ │ +00145 │ │ │ │ │ +00146 │ │ │ │ │ +return 0; │ │ │ │ │ +00147 } │ │ │ │ │ +00148 │ │ │ │ │ +00149 │ │ │ │ │ +00150 // test overlap │ │ │ │ │ +00151 // - r1 first range │ │ │ │ │ +00152 // - r2 second range │ │ │ │ │ +00153 // return true if overlap, false otherwise. │ │ │ │ │ +00154 //-----------------------------------------00155 bool is_range_overlap(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){ │ │ │ │ │ +00156 │ │ │ │ │ +// check overlap in eta AND phi │ │ │ │ │ +00157 │ │ │ │ │ +return ((r1.theta_range & r2.theta_range) && (r1.phi_range & r2.phi_range)); │ │ │ │ │ +00158 } │ │ │ │ │ +00159 │ │ │ │ │ +00160 // compute union │ │ │ │ │ +00161 // Note: we assume that the two intervals overlap │ │ │ │ │ +00162 // - r1 first range │ │ │ │ │ +00163 // - r2 second range │ │ │ │ │ +00164 // \return union of the two ranges │ │ │ │ │ +00165 //-----------------------------------------00166 const CSphtheta_phi_range range_union (const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2){ │ │ │ │ │ +00167 │ │ │ │ │ +CSphtheta_phi_range tmp; │ │ │ │ │ +00168 │ │ │ │ │ +00169 │ │ │ │ │ +// compute union in eta │ │ │ │ │ +00170 │ │ │ │ │ +tmp.theta_range = r1.theta_range | r2.theta_range; │ │ │ │ │ +00171 │ │ │ │ │ +00172 │ │ │ │ │ +// compute union in phi │ │ │ │ │ +00173 │ │ │ │ │ +tmp.phi_range = r1.phi_range | r2.phi_range; │ │ │ │ │ +00174 │ │ │ │ │ +00175 │ │ │ │ │ +return tmp; │ │ │ │ │ +00176 } │ │ │ │ │ +00177 │ │ │ │ │ +00178 } │ │ │ │ │ + │ │ │ │ │ +5.35 │ │ │ │ │ + │ │ │ │ │ +geom_2d.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: geom_2d.h │ │ │ │ │ +// │ │ │ │ │ +00004 // Description: header file for two-dimensional geometry tools │ │ │ │ │ +// │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +// │ │ │ │ │ +00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00013 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00014 // │ │ │ │ │ +// │ │ │ │ │ +00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00018 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00019 // │ │ │ │ │ +// │ │ │ │ │ +00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00021 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00023 // │ │ │ │ │ +// │ │ │ │ │ +00024 // $Revision:: 422 │ │ │ │ │ +$// │ │ │ │ │ +00025 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020) │ │ │ │ │ +$// │ │ │ │ │ +00027 │ │ │ │ │ +00028 #ifndef __GEOM_2D_H__ │ │ │ │ │ +00029 #define __GEOM_2D_H__ │ │ │ │ │ +00030 │ │ │ │ │ +00031 #include │ │ │ │ │ +00032 #include │ │ │ │ │ +00033 #include "defines.h" │ │ │ │ │ +00034 │ │ │ │ │ +00035 #ifndef M_PI │ │ │ │ │ +00036 #define M_PI 3.141592653589793238462643383279502884197 │ │ │ │ │ +00037 #endif │ │ │ │ │ +00038 │ │ │ │ │ +00039 namespace siscone{ │ │ │ │ │ +00040 │ │ │ │ │ +00043 inline double phi_in_range(double phi) { │ │ │ │ │ +00044 │ │ │ │ │ +if │ │ │ │ │ +(phi <= -M_PI) phi += twopi; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 250 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00045 │ │ │ │ │ +else if (phi > │ │ │ │ │ +M_PI) phi -= twopi; │ │ │ │ │ +00046 │ │ │ │ │ +return phi; │ │ │ │ │ +00047 } │ │ │ │ │ +00048 │ │ │ │ │ +00052 inline double dphi(double phi1, double phi2) { │ │ │ │ │ +00053 │ │ │ │ │ +return phi_in_range(phi1-phi2); │ │ │ │ │ +00054 } │ │ │ │ │ +00055 │ │ │ │ │ +00056 │ │ │ │ │ +00060 inline double abs_dphi(double phi1, double phi2) { │ │ │ │ │ +00061 │ │ │ │ │ +double delta = fabs(phi1-phi2); │ │ │ │ │ +00062 │ │ │ │ │ +return delta > M_PI ? twopi-delta : delta; │ │ │ │ │ +00063 } │ │ │ │ │ +00064 │ │ │ │ │ +00066 inline double pow2(double x) {return x*x;} │ │ │ │ │ +00067 │ │ │ │ │ +00068 │ │ │ │ │ +00073 class Ctwovect { │ │ │ │ │ +00074 public: │ │ │ │ │ +00076 │ │ │ │ │ +Ctwovect() : x(0.0), y(0.0) {} │ │ │ │ │ +00077 │ │ │ │ │ +00081 │ │ │ │ │ +Ctwovect(double _x, double _y) : x(_x), y(_y) {} │ │ │ │ │ +00082 │ │ │ │ │ +00084 │ │ │ │ │ +double x, y; │ │ │ │ │ +00085 │ │ │ │ │ +00087 │ │ │ │ │ +inline double mod2() const {return pow2(x)+pow2(y);} │ │ │ │ │ +00088 │ │ │ │ │ +00090 │ │ │ │ │ +inline double modulus() const {return sqrt(mod2());} │ │ │ │ │ +00091 }; │ │ │ │ │ +00092 │ │ │ │ │ +00093 │ │ │ │ │ +00098 inline double dot_product(const Ctwovect & a, const Ctwovect & b) { │ │ │ │ │ +00099 │ │ │ │ │ +return a.x*b.x + a.y*b.y; │ │ │ │ │ +00100 } │ │ │ │ │ +00101 │ │ │ │ │ +00102 │ │ │ │ │ +00107 inline double cross_product(const Ctwovect & a, const Ctwovect & b) { │ │ │ │ │ +00108 │ │ │ │ │ +return a.x*b.y - a.y*b.x; │ │ │ │ │ +00109 } │ │ │ │ │ +00110 │ │ │ │ │ +00111 │ │ │ │ │ +00120 class Ceta_phi_range{ │ │ │ │ │ +00121 public: │ │ │ │ │ +00123 │ │ │ │ │ +Ceta_phi_range(); │ │ │ │ │ +00124 │ │ │ │ │ +00130 │ │ │ │ │ +Ceta_phi_range(double c_eta, double c_phi, double R); │ │ │ │ │ +00131 │ │ │ │ │ +00134 │ │ │ │ │ +Ceta_phi_range& operator = (const Ceta_phi_range &r); │ │ │ │ │ +00135 │ │ │ │ │ +00140 │ │ │ │ │ +int add_particle(const double eta, const double phi); │ │ │ │ │ +00141 │ │ │ │ │ +00143 │ │ │ │ │ +unsigned int eta_range; │ │ │ │ │ +00144 │ │ │ │ │ +00146 │ │ │ │ │ +unsigned int phi_range; │ │ │ │ │ +00147 │ │ │ │ │ +00148 │ │ │ │ │ +// extremal value for eta │ │ │ │ │ +00149 │ │ │ │ │ +static double eta_min; │ │ │ │ │ +00150 │ │ │ │ │ +static double eta_max; │ │ │ │ │ +00151 │ │ │ │ │ +00152 private: │ │ │ │ │ +00154 │ │ │ │ │ +inline unsigned int get_eta_cell(double eta){ │ │ │ │ │ +00155 │ │ │ │ │ +return (unsigned int) (1u « ((int) (32*((eta-eta_min)/(eta_max-eta_min))))); │ │ │ │ │ +00156 │ │ │ │ │ +} │ │ │ │ │ +00157 │ │ │ │ │ +00159 │ │ │ │ │ +inline unsigned int get_phi_cell(double phi){ │ │ │ │ │ +00160 │ │ │ │ │ +return (unsigned int) (1u « ((int) (32*phi/twopi+16)%32)); │ │ │ │ │ +00161 │ │ │ │ │ +} │ │ │ │ │ +00162 }; │ │ │ │ │ +00163 │ │ │ │ │ +00168 bool is_range_overlap(const Ceta_phi_range &r1, const Ceta_phi_range &r2); │ │ │ │ │ +00169 │ │ │ │ │ +00175 const Ceta_phi_range range_union(const Ceta_phi_range &r1, const Ceta_phi_range &r2); │ │ │ │ │ +00176 │ │ │ │ │ +00177 } │ │ │ │ │ +00178 │ │ │ │ │ +00179 #endif │ │ │ │ │ + │ │ │ │ │ +5.36 │ │ │ │ │ + │ │ │ │ │ +geom_2d.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: geom_2d.h │ │ │ │ │ +00004 // Description: header file for two-dimensional geometry tools │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.37 hash.cpp │ │ │ │ │ + │ │ │ │ │ +251 │ │ │ │ │ + │ │ │ │ │ +00006 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +an adaptation to spherical coordinates │ │ │ │ │ +// │ │ │ │ │ +00008 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00011 // │ │ │ │ │ +// │ │ │ │ │ +00012 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00013 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00014 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00015 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00016 // │ │ │ │ │ +// │ │ │ │ │ +00017 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00020 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00021 // │ │ │ │ │ +// │ │ │ │ │ +00022 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00023 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00025 // │ │ │ │ │ +// │ │ │ │ │ +00026 // $Revision:: 422 │ │ │ │ │ +$// │ │ │ │ │ +00027 // $Date:: 2020-04-22 11:51:09 +0200 (Wed, 22 Apr 2020) │ │ │ │ │ +$// │ │ │ │ │ +00029 │ │ │ │ │ +00030 #ifndef __SPH_GEOM_2D_H__ │ │ │ │ │ +00031 #define __SPH_GEOM_2D_H__ │ │ │ │ │ +00032 │ │ │ │ │ +00033 #include │ │ │ │ │ +00034 #include │ │ │ │ │ +00035 #include │ │ │ │ │ +00036 #include │ │ │ │ │ +00037 │ │ │ │ │ +00038 #ifndef M_PI │ │ │ │ │ +00039 #define M_PI 3.141592653589793238462643383279502884197 │ │ │ │ │ +00040 #endif │ │ │ │ │ +00041 │ │ │ │ │ +00042 namespace siscone_spherical{ │ │ │ │ │ +00043 │ │ │ │ │ +00052 class CSphtheta_phi_range{ │ │ │ │ │ +00053 public: │ │ │ │ │ +00055 │ │ │ │ │ +CSphtheta_phi_range(); │ │ │ │ │ +00056 │ │ │ │ │ +00062 │ │ │ │ │ +CSphtheta_phi_range(double c_theta, double c_phi, double R); │ │ │ │ │ +00063 │ │ │ │ │ +00066 │ │ │ │ │ +CSphtheta_phi_range& operator = (const CSphtheta_phi_range &r); │ │ │ │ │ +00067 │ │ │ │ │ +00072 │ │ │ │ │ +int add_particle(const double theta, const double phi); │ │ │ │ │ +00073 │ │ │ │ │ +00075 │ │ │ │ │ +unsigned int theta_range; │ │ │ │ │ +00076 │ │ │ │ │ +00078 │ │ │ │ │ +unsigned int phi_range; │ │ │ │ │ +00079 │ │ │ │ │ +00081 │ │ │ │ │ +static double theta_min; │ │ │ │ │ +00082 │ │ │ │ │ +static double theta_max; │ │ │ │ │ +00083 │ │ │ │ │ +00084 private: │ │ │ │ │ +00086 │ │ │ │ │ +inline unsigned int get_theta_cell(double theta){ │ │ │ │ │ +00087 │ │ │ │ │ +if (theta>=theta_max) return 1u«31; │ │ │ │ │ +00088 │ │ │ │ │ +return (unsigned int) (1u « ((int) (32*((theta-theta_min)/(theta_max-theta_min))))); │ │ │ │ │ +00089 │ │ │ │ │ +} │ │ │ │ │ +00090 │ │ │ │ │ +00092 │ │ │ │ │ +inline unsigned int get_phi_cell(double phi){ │ │ │ │ │ +00093 │ │ │ │ │ +return (unsigned int) (1u « ((int) (32*phi/twopi+16)%32)); │ │ │ │ │ +00094 │ │ │ │ │ +} │ │ │ │ │ +00095 }; │ │ │ │ │ +00096 │ │ │ │ │ +00101 bool is_range_overlap(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2); │ │ │ │ │ +00102 │ │ │ │ │ +00108 const CSphtheta_phi_range range_union(const CSphtheta_phi_range &r1, const CSphtheta_phi_range &r2); │ │ │ │ │ +00109 │ │ │ │ │ +00110 } │ │ │ │ │ +00111 │ │ │ │ │ +00112 #endif │ │ │ │ │ + │ │ │ │ │ +5.37 │ │ │ │ │ + │ │ │ │ │ +hash.cpp │ │ │ │ │ + │ │ │ │ │ +00001 │ │ │ │ │ +00002 // File: hash.cpp │ │ │ │ │ +00003 // Description: source file for classes hash_element and hash_cones │ │ │ │ │ +00004 // This file is part of the SISCone project. │ │ │ │ │ +00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +00006 // │ │ │ │ │ +00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +00008 // │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ + 252 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00012 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00013 // │ │ │ │ │ +// │ │ │ │ │ +00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00017 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00018 // │ │ │ │ │ +// │ │ │ │ │ +00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00020 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00022 // │ │ │ │ │ +// │ │ │ │ │ +00023 // $Revision:: 225 │ │ │ │ │ +$// │ │ │ │ │ +00024 // $Date:: 2008-05-20 16:59:47 +0200 (Tue, 20 May 2008) │ │ │ │ │ +$// │ │ │ │ │ +00026 │ │ │ │ │ +00027 #include │ │ │ │ │ +00028 #include │ │ │ │ │ +00029 #include "hash.h" │ │ │ │ │ +00030 #include │ │ │ │ │ +00031 │ │ │ │ │ +00032 namespace siscone{ │ │ │ │ │ +00033 │ │ │ │ │ +00034 using namespace std; │ │ │ │ │ +00035 │ │ │ │ │ +00036 /************************************************************** │ │ │ │ │ +00037 * implementation of hash_cones │ │ │ │ │ +* │ │ │ │ │ +00038 * list of cones candidates. │ │ │ │ │ +* │ │ │ │ │ +00039 * We store in this class all the hash_elements and give │ │ │ │ │ +* │ │ │ │ │ +00040 * functions to manipulate them. │ │ │ │ │ +* │ │ │ │ │ +00041 **************************************************************/ │ │ │ │ │ +00042 │ │ │ │ │ +00043 // constructor with initialisation │ │ │ │ │ +00044 // - _Np number of particles │ │ │ │ │ +00045 // - _R2 cone radius (squared) │ │ │ │ │ +00046 //----------------------------------00047 hash_cones::hash_cones(int _Np, double _R2){ │ │ │ │ │ +00048 │ │ │ │ │ +int i; │ │ │ │ │ +00049 │ │ │ │ │ +00050 │ │ │ │ │ +n_cones = 0; │ │ │ │ │ +00051 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +00052 │ │ │ │ │ +n_occupied_cells = 0; │ │ │ │ │ +00053 #endif │ │ │ │ │ +00054 │ │ │ │ │ +00055 │ │ │ │ │ +// determine hash size │ │ │ │ │ +00056 │ │ │ │ │ +// for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4 │ │ │ │ │ +00057 │ │ │ │ │ +//mask = 1 « (int) (2*log(double(_Np))/log(2.0)); │ │ │ │ │ +00058 │ │ │ │ │ +//if (mask<=1) mask=2; │ │ │ │ │ +00059 │ │ │ │ │ +int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0)); │ │ │ │ │ +00060 │ │ │ │ │ +if (nbits<1) nbits=1; │ │ │ │ │ +00061 │ │ │ │ │ +mask = 1 « nbits; │ │ │ │ │ +00062 │ │ │ │ │ +00063 │ │ │ │ │ +// create hash │ │ │ │ │ +00064 │ │ │ │ │ +hash_array = new hash_element*[mask]; │ │ │ │ │ +00065 │ │ │ │ │ +mask--; │ │ │ │ │ +00066 │ │ │ │ │ +00067 │ │ │ │ │ +// set the array to 0 │ │ │ │ │ +00068 │ │ │ │ │ +//? needed ? │ │ │ │ │ +00069 │ │ │ │ │ +for (i=0;inext; │ │ │ │ │ +00085 │ │ │ │ │ +delete elm; │ │ │ │ │ +00086 │ │ │ │ │ +} │ │ │ │ │ +00087 │ │ │ │ │ +} │ │ │ │ │ +00088 │ │ │ │ │ +00089 │ │ │ │ │ +delete[] hash_array; │ │ │ │ │ +00090 } │ │ │ │ │ +00091 │ │ │ │ │ +00092 │ │ │ │ │ +00093 /* │ │ │ │ │ +00094 * insert a new candidate into the hash. │ │ │ │ │ +00095 * - v │ │ │ │ │ +4-momentum of the cone to add │ │ │ │ │ +00096 * - parent parent particle defining the cone │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.37 hash.cpp │ │ │ │ │ + │ │ │ │ │ +00097 * - child │ │ │ │ │ +child particle defining the cone │ │ │ │ │ +00098 * - p_io │ │ │ │ │ +whether the parent has to belong to the cone or not │ │ │ │ │ +00099 * - c_io │ │ │ │ │ +whether the child has to belong to the cone or not │ │ │ │ │ +00100 * return 0 on success, 1 on error │ │ │ │ │ +00101 ***********************************************************************/ │ │ │ │ │ +00102 int hash_cones::insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io){ │ │ │ │ │ +00103 │ │ │ │ │ +hash_element *elm; │ │ │ │ │ +00104 │ │ │ │ │ +int index = (v->ref.ref[0]) & mask; │ │ │ │ │ +00105 │ │ │ │ │ +00106 │ │ │ │ │ +// check the array cell corresponding to our reference │ │ │ │ │ +00107 │ │ │ │ │ +elm = hash_array[index]; │ │ │ │ │ +00108 │ │ │ │ │ +00109 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +00110 │ │ │ │ │ +if (elm==NULL) │ │ │ │ │ +00111 │ │ │ │ │ +n_occupied_cells++; │ │ │ │ │ +00112 #endif │ │ │ │ │ +00113 │ │ │ │ │ +00114 │ │ │ │ │ +do{ │ │ │ │ │ +00115 │ │ │ │ │ +// if it is not present, add it │ │ │ │ │ +00116 │ │ │ │ │ +if (elm==NULL){ │ │ │ │ │ +00117 │ │ │ │ │ +// create element │ │ │ │ │ +00118 │ │ │ │ │ +elm = new hash_element; │ │ │ │ │ +00119 │ │ │ │ │ +00120 │ │ │ │ │ +// set its varibles │ │ │ │ │ +00121 │ │ │ │ │ +// Note: at this level, eta and phi have already been computed │ │ │ │ │ +00122 │ │ │ │ │ +// │ │ │ │ │ +through Cmomentum::build_etaphi. │ │ │ │ │ +00123 │ │ │ │ │ +elm->ref = v->ref; │ │ │ │ │ +00124 │ │ │ │ │ +00125 │ │ │ │ │ +//compute vectors centre │ │ │ │ │ +00126 │ │ │ │ │ +v->build_etaphi(); │ │ │ │ │ +00127 │ │ │ │ │ +elm->eta = v->eta; │ │ │ │ │ +00128 │ │ │ │ │ +elm->phi = v->phi; │ │ │ │ │ +00129 │ │ │ │ │ +// if at least one of the two is_inside tests gives a result != from the expected, │ │ │ │ │ +00130 │ │ │ │ │ +// the || will be true hence !(...) false as wanted │ │ │ │ │ +00131 │ │ │ │ │ +elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io)); │ │ │ │ │ +00132 │ │ │ │ │ +//cout « "-- new status of " « v->ref[0] « ":" « elm->is_stable « endl; │ │ │ │ │ +00133 │ │ │ │ │ +00134 │ │ │ │ │ +// update hash │ │ │ │ │ +00135 │ │ │ │ │ +elm->next = hash_array[index]; │ │ │ │ │ +00136 │ │ │ │ │ +hash_array[index] = elm; │ │ │ │ │ +00137 │ │ │ │ │ +00138 │ │ │ │ │ +n_cones++; │ │ │ │ │ +00139 │ │ │ │ │ +return 0; │ │ │ │ │ +00140 │ │ │ │ │ +} │ │ │ │ │ +00141 │ │ │ │ │ +00142 │ │ │ │ │ +// if the cone is already there, simply update stability status │ │ │ │ │ +00143 │ │ │ │ │ +if (v->ref == elm->ref){ │ │ │ │ │ +00144 │ │ │ │ │ +// there is only an update to perform to see if the cone is still stable │ │ │ │ │ +00145 │ │ │ │ │ +if (elm->is_stable){ │ │ │ │ │ +00146 │ │ │ │ │ +v->build_etaphi(); │ │ │ │ │ +00147 │ │ │ │ │ +elm->is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io)); │ │ │ │ │ +00148 │ │ │ │ │ +//cout « " parent/child: " │ │ │ │ │ +00149 │ │ │ │ │ +// │ │ │ │ │ +« parent->ref[0] « ":" « is_inside(v, parent) « ":" « p_io « " " │ │ │ │ │ +00150 │ │ │ │ │ +// │ │ │ │ │ +« child->ref[0] « ":" « is_inside(v, child) « ":" « c_io « endl; │ │ │ │ │ +00151 │ │ │ │ │ +//cout « "-- rep status of " « v->ref[0] « ":" « elm->is_stable « endl; │ │ │ │ │ +00152 │ │ │ │ │ +//cout « v->eta « " " « v->phi « endl; │ │ │ │ │ +00153 │ │ │ │ │ +//cout « (child->eta) « " " « child->phi « endl; │ │ │ │ │ +00154 │ │ │ │ │ +} │ │ │ │ │ +00155 │ │ │ │ │ +return 0; │ │ │ │ │ +00156 │ │ │ │ │ +} │ │ │ │ │ +00157 │ │ │ │ │ +00158 │ │ │ │ │ +elm = elm->next; │ │ │ │ │ +00159 │ │ │ │ │ +} while (1); │ │ │ │ │ +00160 │ │ │ │ │ +00161 │ │ │ │ │ +return 1; │ │ │ │ │ +00162 } │ │ │ │ │ +00163 │ │ │ │ │ +00164 /* │ │ │ │ │ +00165 * insert a new candidate into the hash. │ │ │ │ │ +00166 * - v │ │ │ │ │ +4-momentum of te cone to add │ │ │ │ │ +00167 * Note, in this case, we assume stability. We also assume │ │ │ │ │ +00168 * that eta and phi are computed for v │ │ │ │ │ +00169 * return 0 on success, 1 on error │ │ │ │ │ +00170 ***********************************************************************/ │ │ │ │ │ +00171 int hash_cones::insert(Cmomentum *v){ │ │ │ │ │ +00172 │ │ │ │ │ +hash_element *elm; │ │ │ │ │ +00173 │ │ │ │ │ +int index = (v->ref.ref[0]) & mask; │ │ │ │ │ +00174 │ │ │ │ │ +//cout « "-- stable candidate: " « v->ref[0] « ":" « endl; │ │ │ │ │ +00175 │ │ │ │ │ +00176 │ │ │ │ │ +// check the array cell corresponding to our reference │ │ │ │ │ +00177 │ │ │ │ │ +elm = hash_array[index]; │ │ │ │ │ +00178 │ │ │ │ │ +do{ │ │ │ │ │ +00179 │ │ │ │ │ +// if it is not present, add it │ │ │ │ │ +00180 │ │ │ │ │ +if (elm==NULL){ │ │ │ │ │ +00181 │ │ │ │ │ +// create element │ │ │ │ │ +00182 │ │ │ │ │ +elm = new hash_element; │ │ │ │ │ +00183 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +253 │ │ │ │ │ + │ │ │ │ │ + 254 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00184 │ │ │ │ │ +// set its varibles │ │ │ │ │ +00185 │ │ │ │ │ +// Note: at this level, eta and phi have already been computed │ │ │ │ │ +00186 │ │ │ │ │ +// │ │ │ │ │ +through Cmomentum::build_etaphi. │ │ │ │ │ +00187 │ │ │ │ │ +elm->ref = v->ref; │ │ │ │ │ +00188 │ │ │ │ │ +elm->eta = v->eta; │ │ │ │ │ +00189 │ │ │ │ │ +elm->phi = v->phi; │ │ │ │ │ +00190 │ │ │ │ │ +elm->is_stable = true; │ │ │ │ │ +00191 │ │ │ │ │ +00192 │ │ │ │ │ +// update hash │ │ │ │ │ +00193 │ │ │ │ │ +elm->next = hash_array[index]; │ │ │ │ │ +00194 │ │ │ │ │ +hash_array[index] = elm; │ │ │ │ │ +00195 │ │ │ │ │ +00196 │ │ │ │ │ +n_cones++; │ │ │ │ │ +00197 │ │ │ │ │ +return 0; │ │ │ │ │ +00198 │ │ │ │ │ +} │ │ │ │ │ +00199 │ │ │ │ │ +00200 │ │ │ │ │ +// if the cone is already there, we have nothing to do │ │ │ │ │ +00201 │ │ │ │ │ +if (v->ref == elm->ref){ │ │ │ │ │ +00202 │ │ │ │ │ +return 0; │ │ │ │ │ +00203 │ │ │ │ │ +} │ │ │ │ │ +00204 │ │ │ │ │ +00205 │ │ │ │ │ +elm = elm->next; │ │ │ │ │ +00206 │ │ │ │ │ +} while (1); │ │ │ │ │ +00207 │ │ │ │ │ +00208 │ │ │ │ │ +return 1; │ │ │ │ │ +00209 } │ │ │ │ │ +00210 │ │ │ │ │ +00211 /* │ │ │ │ │ +00212 * test if a particle is inside a cone of given centre. │ │ │ │ │ +00213 * check if the particle of coordinates ’v’ is inside the circle of radius R │ │ │ │ │ +00214 * centered at ’centre’. │ │ │ │ │ +00215 * - centre │ │ │ │ │ +centre of the circle │ │ │ │ │ +00216 * - v │ │ │ │ │ +particle to test │ │ │ │ │ +00217 * return true if inside, false if outside │ │ │ │ │ +00218 ******************************************************************************/ │ │ │ │ │ +00219 inline bool hash_cones::is_inside(Cmomentum *centre, Cmomentum *v){ │ │ │ │ │ +00220 │ │ │ │ │ +double dx, dy; │ │ │ │ │ +00221 │ │ │ │ │ +00222 │ │ │ │ │ +dx = centre->eta - v->eta; │ │ │ │ │ +00223 │ │ │ │ │ +dy = fabs(centre->phi - v->phi); │ │ │ │ │ +00224 │ │ │ │ │ +if (dy>M_PI) │ │ │ │ │ +00225 │ │ │ │ │ +dy -= 2.0*M_PI; │ │ │ │ │ +00226 │ │ │ │ │ +00227 │ │ │ │ │ +return dx*dx+dy*dy │ │ │ │ │ +00030 #include │ │ │ │ │ +00031 #include "hash.h" │ │ │ │ │ +00032 #include │ │ │ │ │ +00033 │ │ │ │ │ +00034 namespace siscone_spherical{ │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.38 hash.cpp │ │ │ │ │ + │ │ │ │ │ +255 │ │ │ │ │ + │ │ │ │ │ +00035 │ │ │ │ │ +00036 using namespace std; │ │ │ │ │ +00037 │ │ │ │ │ +00038 /************************************************************** │ │ │ │ │ +00039 * implementation of sph_hash_cones │ │ │ │ │ +* │ │ │ │ │ +00040 * list of cones candidates. │ │ │ │ │ +* │ │ │ │ │ +00041 * We store in this class all the sph_hash_element and give │ │ │ │ │ +* │ │ │ │ │ +00042 * functions to manipulate them. │ │ │ │ │ +* │ │ │ │ │ +00043 **************************************************************/ │ │ │ │ │ +00044 │ │ │ │ │ +00045 // constructor with initialisation │ │ │ │ │ +00046 // - _Np │ │ │ │ │ +number of particles │ │ │ │ │ +00047 // - _radius cone radius │ │ │ │ │ +00048 //----------------------------------00049 sph_hash_cones::sph_hash_cones(int _Np, double _radius){ │ │ │ │ │ +00050 │ │ │ │ │ +int i; │ │ │ │ │ +00051 │ │ │ │ │ +00052 │ │ │ │ │ +n_cones = 0; │ │ │ │ │ +00053 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +00054 │ │ │ │ │ +n_occupied_cells = 0; │ │ │ │ │ +00055 #endif │ │ │ │ │ +00056 │ │ │ │ │ +00057 │ │ │ │ │ +// determine hash size │ │ │ │ │ +00058 │ │ │ │ │ +// for a ymax=5 and R=0.7, we observed an occupancy around 1/8 N^2 ~ N2 R2/4 │ │ │ │ │ +00059 │ │ │ │ │ +//mask = 1 « (int) (2*log(double(_Np))/log(2.0)); │ │ │ │ │ +00060 │ │ │ │ │ +//if (mask<=1) mask=2; │ │ │ │ │ +00061 │ │ │ │ │ +int nbits = (int) (log(_Np*_radius*_radius*_Np/4.0)/log(2.0)); │ │ │ │ │ +00062 │ │ │ │ │ +if (nbits<1) nbits=1; │ │ │ │ │ +00063 │ │ │ │ │ +mask = 1 « nbits; │ │ │ │ │ +00064 │ │ │ │ │ +00065 │ │ │ │ │ +// create hash │ │ │ │ │ +00066 │ │ │ │ │ +hash_array = new sph_hash_element*[mask]; │ │ │ │ │ +00067 │ │ │ │ │ +mask--; │ │ │ │ │ +00068 │ │ │ │ │ +00069 │ │ │ │ │ +// set the array to 0 │ │ │ │ │ +00070 │ │ │ │ │ +//? needed ? │ │ │ │ │ +00071 │ │ │ │ │ +for (i=0;inext; │ │ │ │ │ +00088 │ │ │ │ │ +delete elm; │ │ │ │ │ +00089 │ │ │ │ │ +} │ │ │ │ │ +00090 │ │ │ │ │ +} │ │ │ │ │ +00091 │ │ │ │ │ +00092 │ │ │ │ │ +delete[] hash_array; │ │ │ │ │ +00093 } │ │ │ │ │ +00094 │ │ │ │ │ +00095 │ │ │ │ │ +00096 /* │ │ │ │ │ +00097 * insert a new candidate into the hash. │ │ │ │ │ +00098 * - v │ │ │ │ │ +4-momentum of the cone to add │ │ │ │ │ +00099 * - parent parent particle defining the cone │ │ │ │ │ +00100 * - child │ │ │ │ │ +child particle defining the cone │ │ │ │ │ +00101 * - p_io │ │ │ │ │ +whether the parent has to belong to the cone or not │ │ │ │ │ +00102 * - c_io │ │ │ │ │ +whether the child has to belong to the cone or not │ │ │ │ │ +00103 * return 0 on success, 1 on error │ │ │ │ │ +00104 ***********************************************************************/ │ │ │ │ │ +00105 int sph_hash_cones::insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool │ │ │ │ │ +c_io){ │ │ │ │ │ +00106 │ │ │ │ │ +sph_hash_element *elm; │ │ │ │ │ +00107 │ │ │ │ │ +int index = (v->ref.ref[0]) & mask; │ │ │ │ │ +00108 │ │ │ │ │ +00109 │ │ │ │ │ +// check the array cell corresponding to our reference │ │ │ │ │ +00110 │ │ │ │ │ +elm = hash_array[index]; │ │ │ │ │ +00111 │ │ │ │ │ +00112 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +00113 │ │ │ │ │ +if (elm==NULL) │ │ │ │ │ +00114 │ │ │ │ │ +n_occupied_cells++; │ │ │ │ │ +00115 #endif │ │ │ │ │ +00116 │ │ │ │ │ +00117 │ │ │ │ │ +do{ │ │ │ │ │ +00118 │ │ │ │ │ +// if it is not present, add it │ │ │ │ │ +00119 │ │ │ │ │ +if (elm==NULL){ │ │ │ │ │ +00120 │ │ │ │ │ +// create element │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 256 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00121 │ │ │ │ │ +elm = new sph_hash_element; │ │ │ │ │ +00122 │ │ │ │ │ +00123 │ │ │ │ │ +// set its varibles │ │ │ │ │ +00124 │ │ │ │ │ +// Note: at this level, eta and phi have already been computed │ │ │ │ │ +00125 │ │ │ │ │ +// │ │ │ │ │ +through CSphmomentum::build_thetaphi. │ │ │ │ │ +00126 │ │ │ │ │ +elm->centre = *v; │ │ │ │ │ +00127 │ │ │ │ │ +00128 │ │ │ │ │ +// if at least one of the two is_closer tests gives a result != from the expected, │ │ │ │ │ +00129 │ │ │ │ │ +// the || will be true hence !(...) false as wanted │ │ │ │ │ +00130 │ │ │ │ │ +elm->is_stable = !((is_closer(v, parent, tan2R)^p_io)||(is_closer(v, child, tan2R)^c_io)); │ │ │ │ │ +00131 │ │ │ │ │ +//cout « "-- new status of " « v->ref[0] « ":" « elm->is_stable « endl; │ │ │ │ │ +00132 │ │ │ │ │ +00133 │ │ │ │ │ +// update hash │ │ │ │ │ +00134 │ │ │ │ │ +elm->next = hash_array[index]; │ │ │ │ │ +00135 │ │ │ │ │ +hash_array[index] = elm; │ │ │ │ │ +00136 │ │ │ │ │ +00137 │ │ │ │ │ +n_cones++; │ │ │ │ │ +00138 │ │ │ │ │ +return 0; │ │ │ │ │ +00139 │ │ │ │ │ +} │ │ │ │ │ +00140 │ │ │ │ │ +00141 │ │ │ │ │ +// if the cone is already there, simply update stability status │ │ │ │ │ +00142 │ │ │ │ │ +if (v->ref == elm->centre.ref){ │ │ │ │ │ +00143 │ │ │ │ │ +// there is only an update to perform to see if the cone is still stable │ │ │ │ │ +00144 │ │ │ │ │ +if (elm->is_stable){ │ │ │ │ │ +00145 │ │ │ │ │ +elm->is_stable = !((is_closer(v, parent, tan2R)^p_io)||(is_closer(v, child, tan2R)^c_io)); │ │ │ │ │ +00146 │ │ │ │ │ +//cout « " parent/child: " │ │ │ │ │ +00147 │ │ │ │ │ +// │ │ │ │ │ +« parent->ref[0] « ":" « is_closer(v, parent) « ":" « p_io « " " │ │ │ │ │ +00148 │ │ │ │ │ +// │ │ │ │ │ +« child->ref[0] « ":" « is_closer(v, child) « ":" « c_io « endl; │ │ │ │ │ +00149 │ │ │ │ │ +//cout « "-- rep status of " « v->ref[0] « ":" « elm->is_stable « endl; │ │ │ │ │ +00150 │ │ │ │ │ +//cout « v->eta « " " « v->phi « endl; │ │ │ │ │ +00151 │ │ │ │ │ +//cout « (child->eta) « " " « child->phi « endl; │ │ │ │ │ +00152 │ │ │ │ │ +} │ │ │ │ │ +00153 │ │ │ │ │ +return 0; │ │ │ │ │ +00154 │ │ │ │ │ +} │ │ │ │ │ +00155 │ │ │ │ │ +00156 │ │ │ │ │ +elm = elm->next; │ │ │ │ │ +00157 │ │ │ │ │ +} while (1); │ │ │ │ │ +00158 │ │ │ │ │ +00159 │ │ │ │ │ +return 1; │ │ │ │ │ +00160 } │ │ │ │ │ +00161 │ │ │ │ │ +00162 /* │ │ │ │ │ +00163 * insert a new candidate into the hash. │ │ │ │ │ +00164 * - v │ │ │ │ │ +4-momentum of te cone to add │ │ │ │ │ +00165 * Note, in this case, we assume stability. We also assume │ │ │ │ │ +00166 * that eta and phi are computed for v │ │ │ │ │ +00167 * return 0 on success, 1 on error │ │ │ │ │ +00168 ***********************************************************************/ │ │ │ │ │ +00169 int sph_hash_cones::insert(CSphmomentum *v){ │ │ │ │ │ +00170 │ │ │ │ │ +sph_hash_element *elm; │ │ │ │ │ +00171 │ │ │ │ │ +int index = (v->ref.ref[0]) & mask; │ │ │ │ │ +00172 │ │ │ │ │ +//cout « "-- stable candidate: " « v->ref[0] « ":" « endl; │ │ │ │ │ +00173 │ │ │ │ │ +00174 │ │ │ │ │ +// check the array cell corresponding to our reference │ │ │ │ │ +00175 │ │ │ │ │ +elm = hash_array[index]; │ │ │ │ │ +00176 │ │ │ │ │ +do{ │ │ │ │ │ +00177 │ │ │ │ │ +// if it is not present, add it │ │ │ │ │ +00178 │ │ │ │ │ +if (elm==NULL){ │ │ │ │ │ +00179 │ │ │ │ │ +// create element │ │ │ │ │ +00180 │ │ │ │ │ +elm = new sph_hash_element; │ │ │ │ │ +00181 │ │ │ │ │ +00182 │ │ │ │ │ +// set its varibles │ │ │ │ │ +00183 │ │ │ │ │ +// Note: at this level, eta and phi have already been computed │ │ │ │ │ +00184 │ │ │ │ │ +// │ │ │ │ │ +through CSphmomentum::build_thetaphi. │ │ │ │ │ +00185 │ │ │ │ │ +elm->centre = *v; │ │ │ │ │ +00186 │ │ │ │ │ +elm->is_stable = true; │ │ │ │ │ +00187 │ │ │ │ │ +00188 │ │ │ │ │ +// update hash │ │ │ │ │ +00189 │ │ │ │ │ +elm->next = hash_array[index]; │ │ │ │ │ +00190 │ │ │ │ │ +hash_array[index] = elm; │ │ │ │ │ +00191 │ │ │ │ │ +00192 │ │ │ │ │ +n_cones++; │ │ │ │ │ +00193 │ │ │ │ │ +return 0; │ │ │ │ │ +00194 │ │ │ │ │ +} │ │ │ │ │ +00195 │ │ │ │ │ +00196 │ │ │ │ │ +// if the cone is already there, we have nothing to do │ │ │ │ │ +00197 │ │ │ │ │ +if (v->ref == elm->centre.ref){ │ │ │ │ │ +00198 │ │ │ │ │ +return 0; │ │ │ │ │ +00199 │ │ │ │ │ +} │ │ │ │ │ +00200 │ │ │ │ │ +00201 │ │ │ │ │ +elm = elm->next; │ │ │ │ │ +00202 │ │ │ │ │ +} while (1); │ │ │ │ │ +00203 │ │ │ │ │ +00204 │ │ │ │ │ +return 1; │ │ │ │ │ +00205 } │ │ │ │ │ +00206 │ │ │ │ │ +00207 } │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.39 momentum.cpp │ │ │ │ │ + │ │ │ │ │ +5.39 │ │ │ │ │ + │ │ │ │ │ +momentum.cpp │ │ │ │ │ + │ │ │ │ │ +00001 │ │ │ │ │ +00002 // File: momentum.cpp │ │ │ │ │ +// │ │ │ │ │ +00003 // Description: source file for 4-momentum class Cmomentum │ │ │ │ │ +// │ │ │ │ │ +00004 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00005 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00006 // │ │ │ │ │ +// │ │ │ │ │ +00007 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00008 // │ │ │ │ │ +// │ │ │ │ │ +00009 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00010 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00011 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00012 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00013 // │ │ │ │ │ +// │ │ │ │ │ +00014 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00017 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00018 // │ │ │ │ │ +// │ │ │ │ │ +00019 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00020 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00021 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00022 // │ │ │ │ │ +// │ │ │ │ │ +00023 // $Revision:: 123 │ │ │ │ │ +$// │ │ │ │ │ +00024 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ +$// │ │ │ │ │ +00026 │ │ │ │ │ +00027 #include "momentum.h" │ │ │ │ │ +00028 #include │ │ │ │ │ +00029 #include │ │ │ │ │ +00030 │ │ │ │ │ +00031 namespace siscone{ │ │ │ │ │ +00032 │ │ │ │ │ +00033 /************************************************************************* │ │ │ │ │ +00034 * class Cmomentum │ │ │ │ │ +* │ │ │ │ │ +00035 * This class contains the information for particle or group of │ │ │ │ │ +* │ │ │ │ │ +00036 * particles management. │ │ │ │ │ +* │ │ │ │ │ +00037 * It includes all Lorentz properties as well as tools for summing them. * │ │ │ │ │ +00038 *************************************************************************/ │ │ │ │ │ +00039 │ │ │ │ │ +00040 // default ctor │ │ │ │ │ +00041 //-------------00042 Cmomentum::Cmomentum(){ │ │ │ │ │ +00043 │ │ │ │ │ +eta = 0.0; │ │ │ │ │ +00044 │ │ │ │ │ +phi = 0.0; │ │ │ │ │ +00045 │ │ │ │ │ +px = py = pz = E = 0.0; │ │ │ │ │ +00046 │ │ │ │ │ +ref = Creference(); │ │ │ │ │ +00047 │ │ │ │ │ +index = -1; │ │ │ │ │ +00048 } │ │ │ │ │ +00049 │ │ │ │ │ +00050 // ctor with initialisation │ │ │ │ │ +00051 //-------------------------00052 Cmomentum::Cmomentum(double _px, double _py, double _pz, double _E){ │ │ │ │ │ +00053 │ │ │ │ │ +px = _px; │ │ │ │ │ +00054 │ │ │ │ │ +py = _py; │ │ │ │ │ +00055 │ │ │ │ │ +pz = _pz; │ │ │ │ │ +00056 │ │ │ │ │ +E = _E; │ │ │ │ │ +00057 │ │ │ │ │ +00058 │ │ │ │ │ +// compute eta and phi │ │ │ │ │ +00059 │ │ │ │ │ +build_etaphi(); │ │ │ │ │ +00060 │ │ │ │ │ +ref = Creference(); │ │ │ │ │ +00061 } │ │ │ │ │ +00062 │ │ │ │ │ +00063 // ctor with detailed initialisation │ │ │ │ │ +00064 //----------------------------------00065 Cmomentum::Cmomentum(double _eta, double _phi, Creference _ref){ │ │ │ │ │ +00066 │ │ │ │ │ +eta = _eta; │ │ │ │ │ +00067 │ │ │ │ │ +phi = _phi; │ │ │ │ │ +00068 │ │ │ │ │ +00069 │ │ │ │ │ +ref = _ref; │ │ │ │ │ +00070 } │ │ │ │ │ +00071 │ │ │ │ │ +00072 // default dtor │ │ │ │ │ +00073 //-------------00074 Cmomentum::~Cmomentum(){ │ │ │ │ │ +00075 │ │ │ │ │ +00076 } │ │ │ │ │ +00077 │ │ │ │ │ +00078 // assignment of vectors │ │ │ │ │ +00079 //----------------------00080 Cmomentum& Cmomentum::operator = (const Cmomentum &v){ │ │ │ │ │ +00081 │ │ │ │ │ +px = v.px; │ │ │ │ │ +00082 │ │ │ │ │ +py = v.py; │ │ │ │ │ +00083 │ │ │ │ │ +pz = v.pz; │ │ │ │ │ +00084 │ │ │ │ │ +E = v.E; │ │ │ │ │ +00085 │ │ │ │ │ +00086 │ │ │ │ │ +eta = v.eta; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +257 │ │ │ │ │ + │ │ │ │ │ + 258 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00087 │ │ │ │ │ +phi = v.phi; │ │ │ │ │ +00088 │ │ │ │ │ +00089 │ │ │ │ │ +ref = v.ref; │ │ │ │ │ +00090 │ │ │ │ │ +return *this; │ │ │ │ │ +00091 } │ │ │ │ │ +00092 │ │ │ │ │ +00093 // addition of vectors │ │ │ │ │ +00094 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ +00095 //-----------------------------------------------00096 const Cmomentum Cmomentum::operator + (const Cmomentum &v){ │ │ │ │ │ +00097 │ │ │ │ │ +Cmomentum tmp = *this; │ │ │ │ │ +00098 │ │ │ │ │ +return tmp+=v; │ │ │ │ │ +00099 } │ │ │ │ │ +00100 │ │ │ │ │ +00101 // incrementation of vectors │ │ │ │ │ +00102 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ +00103 //-----------------------------------------------00104 Cmomentum& Cmomentum::operator += (const Cmomentum &v){ │ │ │ │ │ +00105 │ │ │ │ │ +px+=v.px; │ │ │ │ │ +00106 │ │ │ │ │ +py+=v.py; │ │ │ │ │ +00107 │ │ │ │ │ +pz+=v.pz; │ │ │ │ │ +00108 │ │ │ │ │ +E +=v.E; │ │ │ │ │ +00109 │ │ │ │ │ +00110 │ │ │ │ │ +ref+=v.ref; │ │ │ │ │ +00111 │ │ │ │ │ +00112 │ │ │ │ │ +return *this; │ │ │ │ │ +00113 } │ │ │ │ │ +00114 │ │ │ │ │ +00115 // incrementation of vectors │ │ │ │ │ +00116 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ +00117 //-----------------------------------------------00118 Cmomentum& Cmomentum::operator -= (const Cmomentum &v){ │ │ │ │ │ +00119 │ │ │ │ │ +px-=v.px; │ │ │ │ │ +00120 │ │ │ │ │ +py-=v.py; │ │ │ │ │ +00121 │ │ │ │ │ +pz-=v.pz; │ │ │ │ │ +00122 │ │ │ │ │ +E -=v.E; │ │ │ │ │ +00123 │ │ │ │ │ +00124 │ │ │ │ │ +ref-=v.ref; │ │ │ │ │ +00125 │ │ │ │ │ +return *this; │ │ │ │ │ +00126 } │ │ │ │ │ +00127 │ │ │ │ │ +00128 // build eta-phi from 4-momentum info │ │ │ │ │ +00129 // !!! │ │ │ │ │ +WARNING │ │ │ │ │ +!!! │ │ │ │ │ +00130 // !!! computing eta and phi is time-consuming !!! │ │ │ │ │ +00131 // !!! use this whenever you need eta or phi │ │ │ │ │ +!!! │ │ │ │ │ +00132 // !!! automatically called for single-particle !!! │ │ │ │ │ +00133 //-------------------------------------------------00134 void Cmomentum::build_etaphi(){ │ │ │ │ │ +00135 │ │ │ │ │ +// note: the factor n (ref.nb) cancels in all expressions !! │ │ │ │ │ +00136 │ │ │ │ │ +eta = 0.5*log((E+pz)/(E-pz)); │ │ │ │ │ +00137 │ │ │ │ │ +phi = atan2(py,px); │ │ │ │ │ +00138 } │ │ │ │ │ +00139 │ │ │ │ │ +00140 │ │ │ │ │ +00141 // ordering of two vectors │ │ │ │ │ +00142 // the default ordering is w.r.t. their references │ │ │ │ │ +00143 //------------------------------------------------00144 bool operator < (const Cmomentum &v1, const Cmomentum &v2){ │ │ │ │ │ +00145 │ │ │ │ │ +return v1.ref < v2.ref; │ │ │ │ │ +00146 } │ │ │ │ │ +00147 │ │ │ │ │ +00148 // ordering of vectors in eta (e.g. used in collinear tests) │ │ │ │ │ +00149 //----------------------------------------------------------00150 bool momentum_eta_less(const Cmomentum &v1, const Cmomentum &v2){ │ │ │ │ │ +00151 │ │ │ │ │ +return v1.eta < v2.eta; │ │ │ │ │ +00152 } │ │ │ │ │ +00153 │ │ │ │ │ +00154 // ordering of vectors in pt │ │ │ │ │ +00155 //--------------------------00156 bool momentum_pt_less(const Cmomentum &v1, const Cmomentum &v2){ │ │ │ │ │ +00157 │ │ │ │ │ +return v1.perp2() < v2.perp2(); │ │ │ │ │ +00158 } │ │ │ │ │ +00159 │ │ │ │ │ +00160 } │ │ │ │ │ +00161 │ │ │ │ │ + │ │ │ │ │ +5.40 │ │ │ │ │ + │ │ │ │ │ +momentum.cpp │ │ │ │ │ + │ │ │ │ │ +00001 │ │ │ │ │ +00002 // File: momentum.cpp │ │ │ │ │ +00003 // Description: source file for 4-momentum class Cmomentum │ │ │ │ │ +00004 // This file is part of the SISCone project. │ │ │ │ │ +00005 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.40 momentum.cpp │ │ │ │ │ + │ │ │ │ │ +00006 // │ │ │ │ │ +an adaptation to spherical coordinates │ │ │ │ │ +// │ │ │ │ │ +00007 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00008 // │ │ │ │ │ +// │ │ │ │ │ +00009 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ +00010 // │ │ │ │ │ +// │ │ │ │ │ +00011 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00012 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00013 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00014 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00015 // │ │ │ │ │ +// │ │ │ │ │ +00016 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00019 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00020 // │ │ │ │ │ +// │ │ │ │ │ +00021 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00022 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00024 // │ │ │ │ │ +// │ │ │ │ │ +00025 // $Revision:: 255 │ │ │ │ │ +$// │ │ │ │ │ +00026 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008) │ │ │ │ │ +$// │ │ │ │ │ +00028 │ │ │ │ │ +00029 #include "momentum.h" │ │ │ │ │ +00030 #include │ │ │ │ │ +00031 #include │ │ │ │ │ +00032 │ │ │ │ │ +00033 namespace siscone_spherical{ │ │ │ │ │ +00034 │ │ │ │ │ +00035 /************************************************************************* │ │ │ │ │ +00036 * class CSph3vector │ │ │ │ │ +* │ │ │ │ │ +00037 * This class contains the information for particle or group of │ │ │ │ │ +* │ │ │ │ │ +00038 * particles management. │ │ │ │ │ +* │ │ │ │ │ +00039 *************************************************************************/ │ │ │ │ │ +00040 │ │ │ │ │ +00041 // default ctor │ │ │ │ │ +00042 //-------------00043 CSph3vector::CSph3vector(){ │ │ │ │ │ +00044 │ │ │ │ │ +_theta = _phi = _norm = 0.0; │ │ │ │ │ +00045 │ │ │ │ │ +px = py = pz = 0.0; │ │ │ │ │ +00046 │ │ │ │ │ +ref = siscone::Creference(); │ │ │ │ │ +00047 } │ │ │ │ │ +00048 │ │ │ │ │ +00049 // ctor with initialisation │ │ │ │ │ +00050 //-------------------------00051 CSph3vector::CSph3vector(double _px, double _py, double _pz){ │ │ │ │ │ +00052 │ │ │ │ │ +px = _px; │ │ │ │ │ +00053 │ │ │ │ │ +py = _py; │ │ │ │ │ +00054 │ │ │ │ │ +pz = _pz; │ │ │ │ │ +00055 │ │ │ │ │ +00056 │ │ │ │ │ +// compute the norm │ │ │ │ │ +00057 │ │ │ │ │ +build_norm(); │ │ │ │ │ +00058 │ │ │ │ │ +00059 │ │ │ │ │ +ref = siscone::Creference(); │ │ │ │ │ +00060 } │ │ │ │ │ +00061 │ │ │ │ │ +00062 // default dtor │ │ │ │ │ +00063 //-------------00064 CSph3vector::~CSph3vector(){ │ │ │ │ │ +00065 │ │ │ │ │ +00066 } │ │ │ │ │ +00067 │ │ │ │ │ +00068 │ │ │ │ │ +00069 // assignment of vectors │ │ │ │ │ +00070 //----------------------00071 CSph3vector& CSph3vector::operator = (const CSph3vector &v){ │ │ │ │ │ +00072 │ │ │ │ │ +px = v.px; │ │ │ │ │ +00073 │ │ │ │ │ +py = v.py; │ │ │ │ │ +00074 │ │ │ │ │ +pz = v.pz; │ │ │ │ │ +00075 │ │ │ │ │ +00076 │ │ │ │ │ +_norm = v._norm; │ │ │ │ │ +00077 │ │ │ │ │ +_theta = v._theta; │ │ │ │ │ +00078 │ │ │ │ │ +_phi │ │ │ │ │ += v._phi; │ │ │ │ │ +00079 │ │ │ │ │ +00080 │ │ │ │ │ +ref = v.ref; │ │ │ │ │ +00081 │ │ │ │ │ +return *this; │ │ │ │ │ +00082 } │ │ │ │ │ +00083 │ │ │ │ │ +00084 // addition of vectors │ │ │ │ │ +00085 //-----------------------------------------------00086 const CSph3vector CSph3vector::operator + (const CSph3vector &v){ │ │ │ │ │ +00087 │ │ │ │ │ +CSph3vector tmp = *this; │ │ │ │ │ +00088 │ │ │ │ │ +return tmp+=v; │ │ │ │ │ +00089 } │ │ │ │ │ +00090 │ │ │ │ │ +00091 // subtraction of vectors │ │ │ │ │ +00092 //-----------------------------------------------00093 const CSph3vector CSph3vector::operator - (const CSph3vector &v){ │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +259 │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ + 260 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00094 │ │ │ │ │ +CSph3vector tmp = *this; │ │ │ │ │ +00095 │ │ │ │ │ +return tmp-=v; │ │ │ │ │ +00096 } │ │ │ │ │ +00097 │ │ │ │ │ +00098 // division by constant │ │ │ │ │ +00099 //-----------------------------------------------00100 const CSph3vector CSph3vector::operator / (const double &r){ │ │ │ │ │ +00101 │ │ │ │ │ +CSph3vector tmp = *this; │ │ │ │ │ +00102 │ │ │ │ │ +return tmp/=r; │ │ │ │ │ +00103 } │ │ │ │ │ +00104 │ │ │ │ │ +00105 // incrementation │ │ │ │ │ +00106 //-----------------------------------------------00107 CSph3vector& CSph3vector::operator += (const CSph3vector &v){ │ │ │ │ │ +00108 │ │ │ │ │ +px+=v.px; │ │ │ │ │ +00109 │ │ │ │ │ +py+=v.py; │ │ │ │ │ +00110 │ │ │ │ │ +pz+=v.pz; │ │ │ │ │ +00111 │ │ │ │ │ +00112 │ │ │ │ │ +return *this; │ │ │ │ │ +00113 } │ │ │ │ │ +00114 │ │ │ │ │ +00115 // decrementation │ │ │ │ │ +00116 //-----------------------------------------------00117 CSph3vector& CSph3vector::operator -= (const CSph3vector &v){ │ │ │ │ │ +00118 │ │ │ │ │ +px-=v.px; │ │ │ │ │ +00119 │ │ │ │ │ +py-=v.py; │ │ │ │ │ +00120 │ │ │ │ │ +pz-=v.pz; │ │ │ │ │ +00121 │ │ │ │ │ +00122 │ │ │ │ │ +return *this; │ │ │ │ │ +00123 } │ │ │ │ │ +00124 │ │ │ │ │ +00125 // multiplication by a constant │ │ │ │ │ +00126 //-----------------------------------------------00127 CSph3vector& CSph3vector::operator *= (const double &r){ │ │ │ │ │ +00128 │ │ │ │ │ +px*=r; │ │ │ │ │ +00129 │ │ │ │ │ +py*=r; │ │ │ │ │ +00130 │ │ │ │ │ +pz*=r; │ │ │ │ │ +00131 │ │ │ │ │ +00132 │ │ │ │ │ +return *this; │ │ │ │ │ +00133 } │ │ │ │ │ +00134 │ │ │ │ │ +00135 // division by a constant │ │ │ │ │ +00136 //-----------------------------------------------00137 CSph3vector& CSph3vector::operator /= (const double &r){ │ │ │ │ │ +00138 │ │ │ │ │ +px/=r; │ │ │ │ │ +00139 │ │ │ │ │ +py/=r; │ │ │ │ │ +00140 │ │ │ │ │ +pz/=r; │ │ │ │ │ +00141 │ │ │ │ │ +00142 │ │ │ │ │ +_norm/=r; │ │ │ │ │ +00143 │ │ │ │ │ +00144 │ │ │ │ │ +return *this; │ │ │ │ │ +00145 } │ │ │ │ │ +00146 │ │ │ │ │ +00147 // build norm from 3-momentum info │ │ │ │ │ +00148 void CSph3vector::build_norm(){ │ │ │ │ │ +00149 │ │ │ │ │ +_norm = norm(); │ │ │ │ │ +00150 } │ │ │ │ │ +00151 │ │ │ │ │ +00152 // build norm from 3-momentum info │ │ │ │ │ +00153 void CSph3vector::build_thetaphi(){ │ │ │ │ │ +00154 │ │ │ │ │ +_theta = theta(); │ │ │ │ │ +00155 │ │ │ │ │ +_phi = phi(); │ │ │ │ │ +00156 } │ │ │ │ │ +00157 │ │ │ │ │ +00158 │ │ │ │ │ +00159 // for this direction, compute the two reference directions │ │ │ │ │ +00160 // used to measure angles │ │ │ │ │ +00161 void CSph3vector::get_angular_directions(CSph3vector &angular_dir1, CSph3vector &angular_dir2){ │ │ │ │ │ +00162 │ │ │ │ │ +if (px < py){ │ │ │ │ │ +00163 │ │ │ │ │ +if (pz < px){ │ │ │ │ │ +00164 │ │ │ │ │ +// z smallest │ │ │ │ │ +00165 │ │ │ │ │ +angular_dir1 = CSph3vector(-py, px, 0.0); │ │ │ │ │ +00166 │ │ │ │ │ +} else { │ │ │ │ │ +00167 │ │ │ │ │ +// x smallest │ │ │ │ │ +00168 │ │ │ │ │ +angular_dir1 = CSph3vector(0.0, -pz, py); │ │ │ │ │ +00169 │ │ │ │ │ +} │ │ │ │ │ +00170 │ │ │ │ │ +} else { │ │ │ │ │ +00171 │ │ │ │ │ +if (pz < py){ │ │ │ │ │ +00172 │ │ │ │ │ +// z smallest │ │ │ │ │ +00173 │ │ │ │ │ +angular_dir1 = CSph3vector(-py, px, 0.0); │ │ │ │ │ +00174 │ │ │ │ │ +} else { │ │ │ │ │ +00175 │ │ │ │ │ +// y smallest │ │ │ │ │ +00176 │ │ │ │ │ +angular_dir1 = CSph3vector(-pz, 0.0, px); │ │ │ │ │ +00177 │ │ │ │ │ +} │ │ │ │ │ +00178 │ │ │ │ │ +} │ │ │ │ │ +00179 │ │ │ │ │ +angular_dir2 = cross_product3(*this, angular_dir1); │ │ │ │ │ +00180 │ │ │ │ │ +// We’ll simply take x & y so the reflection symmetry is not broken │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.40 momentum.cpp │ │ │ │ │ + │ │ │ │ │ +00181 │ │ │ │ │ +//angular_dir1 = CSph3vector(0.0, -pz, py); │ │ │ │ │ +00182 │ │ │ │ │ +//angular_dir2 = CSph3vector(-pz, 0.0, -px); │ │ │ │ │ +00183 } │ │ │ │ │ +00184 │ │ │ │ │ +00185 /************************************************************************* │ │ │ │ │ +00186 * class CSphmomentum │ │ │ │ │ +* │ │ │ │ │ +00187 * This class contains the information for particle or group of │ │ │ │ │ +* │ │ │ │ │ +00188 * particles management. │ │ │ │ │ +* │ │ │ │ │ +00189 * It includes all Lorentz properties as well as tools for summing them. * │ │ │ │ │ +00190 *************************************************************************/ │ │ │ │ │ +00191 │ │ │ │ │ +00192 // default ctor │ │ │ │ │ +00193 //-------------00194 CSphmomentum::CSphmomentum(){ │ │ │ │ │ +00195 │ │ │ │ │ +E=0.0; │ │ │ │ │ +00196 │ │ │ │ │ +index = -1; │ │ │ │ │ +00197 } │ │ │ │ │ +00198 │ │ │ │ │ +00199 // ctor with initialisation │ │ │ │ │ +00200 //-------------------------00201 CSphmomentum::CSphmomentum(double _px, double _py, double _pz, double _E) │ │ │ │ │ +00202 │ │ │ │ │ +: CSph3vector(_px, _py, _pz) { │ │ │ │ │ +00203 │ │ │ │ │ +E = _E; │ │ │ │ │ +00204 │ │ │ │ │ +00205 │ │ │ │ │ +// compute the angles │ │ │ │ │ +00206 │ │ │ │ │ +build_thetaphi(); │ │ │ │ │ +00207 } │ │ │ │ │ +00208 │ │ │ │ │ +00209 // ctor with initialisation │ │ │ │ │ +00210 //-------------------------00211 CSphmomentum::CSphmomentum(CSph3vector &_v, double _E) │ │ │ │ │ +00212 │ │ │ │ │ +: CSph3vector(_v.px, _v.py, _v.pz) { │ │ │ │ │ +00213 │ │ │ │ │ +E = _E; │ │ │ │ │ +00214 } │ │ │ │ │ +00215 │ │ │ │ │ +00216 // default dtor │ │ │ │ │ +00217 //-------------00218 CSphmomentum::~CSphmomentum(){ │ │ │ │ │ +00219 │ │ │ │ │ +00220 } │ │ │ │ │ +00221 │ │ │ │ │ +00222 // assignment of vectors │ │ │ │ │ +00223 //----------------------00224 CSphmomentum& CSphmomentum::operator = (const CSphmomentum &v){ │ │ │ │ │ +00225 │ │ │ │ │ +px = v.px; │ │ │ │ │ +00226 │ │ │ │ │ +py = v.py; │ │ │ │ │ +00227 │ │ │ │ │ +pz = v.pz; │ │ │ │ │ +00228 │ │ │ │ │ +E = v.E; │ │ │ │ │ +00229 │ │ │ │ │ +00230 │ │ │ │ │ +_norm = v._norm; │ │ │ │ │ +00231 │ │ │ │ │ +_theta = v._theta; │ │ │ │ │ +00232 │ │ │ │ │ +_phi │ │ │ │ │ += v._phi; │ │ │ │ │ +00233 │ │ │ │ │ +00234 │ │ │ │ │ +ref = v.ref; │ │ │ │ │ +00235 │ │ │ │ │ +return *this; │ │ │ │ │ +00236 } │ │ │ │ │ +00237 │ │ │ │ │ +00238 // addition of vectors │ │ │ │ │ +00239 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ +00240 //-----------------------------------------------00241 const CSphmomentum CSphmomentum::operator + (const CSphmomentum &v){ │ │ │ │ │ +00242 │ │ │ │ │ +CSphmomentum tmp = *this; │ │ │ │ │ +00243 │ │ │ │ │ +return tmp+=v; │ │ │ │ │ +00244 } │ │ │ │ │ +00245 │ │ │ │ │ +00246 // incrementation of vectors │ │ │ │ │ +00247 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ +00248 //-----------------------------------------------00249 CSphmomentum& CSphmomentum::operator += (const CSphmomentum &v){ │ │ │ │ │ +00250 │ │ │ │ │ +px+=v.px; │ │ │ │ │ +00251 │ │ │ │ │ +py+=v.py; │ │ │ │ │ +00252 │ │ │ │ │ +pz+=v.pz; │ │ │ │ │ +00253 │ │ │ │ │ +E +=v.E; │ │ │ │ │ +00254 │ │ │ │ │ +00255 │ │ │ │ │ +ref+=v.ref; │ │ │ │ │ +00256 │ │ │ │ │ +00257 │ │ │ │ │ +return *this; │ │ │ │ │ +00258 } │ │ │ │ │ +00259 │ │ │ │ │ +00260 // decrementation of vectors │ │ │ │ │ +00261 // !!! WARNING !!! no updating of eta and phi !!! │ │ │ │ │ +00262 //-----------------------------------------------00263 CSphmomentum& CSphmomentum::operator -= (const CSphmomentum &v){ │ │ │ │ │ +00264 │ │ │ │ │ +px-=v.px; │ │ │ │ │ +00265 │ │ │ │ │ +py-=v.py; │ │ │ │ │ +00266 │ │ │ │ │ +pz-=v.pz; │ │ │ │ │ +00267 │ │ │ │ │ +E -=v.E; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +261 │ │ │ │ │ + │ │ │ │ │ + 262 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00268 │ │ │ │ │ +00269 │ │ │ │ │ +ref-=v.ref; │ │ │ │ │ +00270 │ │ │ │ │ +return *this; │ │ │ │ │ +00271 } │ │ │ │ │ +00272 │ │ │ │ │ +00273 │ │ │ │ │ +00274 // ordering of two vectors │ │ │ │ │ +00275 // the default ordering is w.r.t. their references │ │ │ │ │ +00276 //------------------------------------------------00277 bool operator < (const CSphmomentum &v1, const CSphmomentum &v2){ │ │ │ │ │ +00278 │ │ │ │ │ +return v1.ref < v2.ref; │ │ │ │ │ +00279 } │ │ │ │ │ +00280 │ │ │ │ │ +00281 // ordering of vectors in eta (e.g. used in collinear tests) │ │ │ │ │ +00282 //----------------------------------------------------------00283 bool momentum_theta_less(const CSphmomentum &v1, const CSphmomentum &v2){ │ │ │ │ │ +00284 │ │ │ │ │ +return v1._theta < v2._theta; │ │ │ │ │ +00285 } │ │ │ │ │ +00286 │ │ │ │ │ +00287 // ordering of vectors in pt │ │ │ │ │ +00288 //--------------------------00289 bool momentum_pt_less(const CSphmomentum &v1, const CSphmomentum &v2){ │ │ │ │ │ +00290 │ │ │ │ │ +return v1.perp2() < v2.perp2(); │ │ │ │ │ +00291 } │ │ │ │ │ +00292 │ │ │ │ │ +00293 } │ │ │ │ │ +00294 │ │ │ │ │ + │ │ │ │ │ +5.41 │ │ │ │ │ + │ │ │ │ │ +protocones.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: protocones.h │ │ │ │ │ +// │ │ │ │ │ +00004 // Description: header file for stable cones determination (Cstable_cones) │ │ │ │ │ +// │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +// │ │ │ │ │ +00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00013 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00014 // │ │ │ │ │ +// │ │ │ │ │ +00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00018 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00019 // │ │ │ │ │ +// │ │ │ │ │ +00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00021 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00023 // │ │ │ │ │ +// │ │ │ │ │ +00024 // $Revision:: 224 │ │ │ │ │ +$// │ │ │ │ │ +00025 // $Date:: 2008-05-16 19:58:30 +0200 (Fri, 16 May 2008) │ │ │ │ │ +$// │ │ │ │ │ +00027 │ │ │ │ │ +00028 #ifndef __PROTOCONES_H__ │ │ │ │ │ +00029 #define __PROTOCONES_H__ │ │ │ │ │ +00030 │ │ │ │ │ +00031 #include "momentum.h" │ │ │ │ │ +00032 #include "vicinity.h" │ │ │ │ │ +00033 #include │ │ │ │ │ +00034 #include │ │ │ │ │ +00035 #include │ │ │ │ │ +00036 #include "hash.h" │ │ │ │ │ +00037 │ │ │ │ │ +00038 #include "defines.h" │ │ │ │ │ +00039 │ │ │ │ │ +00040 namespace siscone{ │ │ │ │ │ +00041 │ │ │ │ │ +00053 class Cborder_store{ │ │ │ │ │ +00054 public: │ │ │ │ │ +00056 │ │ │ │ │ +Cborder_store(Cmomentum * momentum, double centre_eta, double centre_phi) : │ │ │ │ │ +00057 │ │ │ │ │ +mom(momentum), is_in(false) { │ │ │ │ │ +00058 │ │ │ │ │ +angle = atan2(mom->phi - centre_phi, mom->eta - centre_eta); │ │ │ │ │ +00059 │ │ │ │ │ +} │ │ │ │ │ +00060 │ │ │ │ │ +00061 │ │ │ │ │ +Cmomentum * mom; │ │ │ │ │ +00062 │ │ │ │ │ +double angle; │ │ │ │ │ +00063 │ │ │ │ │ +bool │ │ │ │ │ +is_in; │ │ │ │ │ +00064 }; │ │ │ │ │ +00065 │ │ │ │ │ +00066 │ │ │ │ │ +00069 inline bool operator<(const Cborder_store & a, const Cborder_store & b) { │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.41 protocones.h │ │ │ │ │ + │ │ │ │ │ +00070 │ │ │ │ │ +return a.angle < b.angle; │ │ │ │ │ +00071 } │ │ │ │ │ +00072 │ │ │ │ │ +00073 │ │ │ │ │ +00082 class Cstable_cones : public Cvicinity{ │ │ │ │ │ +00083 public: │ │ │ │ │ +00085 │ │ │ │ │ +Cstable_cones(); │ │ │ │ │ +00086 │ │ │ │ │ +00088 │ │ │ │ │ +Cstable_cones(std::vector &_particle_list); │ │ │ │ │ +00089 │ │ │ │ │ +00091 │ │ │ │ │ +~Cstable_cones(); │ │ │ │ │ +00092 │ │ │ │ │ +00097 │ │ │ │ │ +void init(std::vector &_particle_list); │ │ │ │ │ +00098 │ │ │ │ │ +00106 │ │ │ │ │ +int get_stable_cones(double _radius); │ │ │ │ │ +00107 │ │ │ │ │ +00109 │ │ │ │ │ +std::vector protocones; │ │ │ │ │ +00110 │ │ │ │ │ +00112 │ │ │ │ │ +hash_cones *hc; │ │ │ │ │ +00113 │ │ │ │ │ +00115 │ │ │ │ │ +int nb_tot; │ │ │ │ │ +00116 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +00117 │ │ │ │ │ +int nb_hash_cones, nb_hash_occupied; │ │ │ │ │ +00118 #endif │ │ │ │ │ +00119 │ │ │ │ │ +00120 protected: │ │ │ │ │ +00122 │ │ │ │ │ +double R; │ │ │ │ │ +00123 │ │ │ │ │ +00125 │ │ │ │ │ +double R2; │ │ │ │ │ +00126 │ │ │ │ │ +00127 private: │ │ │ │ │ +00130 │ │ │ │ │ +Cmomentum cone; │ │ │ │ │ +00131 │ │ │ │ │ +00133 │ │ │ │ │ +Cmomentum *child; │ │ │ │ │ +00134 │ │ │ │ │ +00136 │ │ │ │ │ +Cvicinity_elm *centre; │ │ │ │ │ +00137 │ │ │ │ │ +00139 │ │ │ │ │ +unsigned int centre_idx; │ │ │ │ │ +00140 │ │ │ │ │ +00142 │ │ │ │ │ +unsigned int first_cone; │ │ │ │ │ +00143 │ │ │ │ │ +00149 │ │ │ │ │ +int init_cone(); │ │ │ │ │ +00150 │ │ │ │ │ +00157 │ │ │ │ │ +int test_cone(); │ │ │ │ │ +00158 │ │ │ │ │ +00164 │ │ │ │ │ +int update_cone(); │ │ │ │ │ +00165 │ │ │ │ │ +00166 │ │ │ │ │ +/* │ │ │ │ │ +00167 │ │ │ │ │ +* run through the vicinity of the current parent and for each child │ │ │ │ │ +00168 │ │ │ │ │ +* indicate which members are cocircular... │ │ │ │ │ +00169 │ │ │ │ │ +*/ │ │ │ │ │ +00170 │ │ │ │ │ +void prepare_cocircular_lists(); │ │ │ │ │ +00171 │ │ │ │ │ +00179 │ │ │ │ │ +bool cocircular_check(); │ │ │ │ │ +00180 │ │ │ │ │ +00185 │ │ │ │ │ +void test_cone_cocircular(Cmomentum & borderless_cone, │ │ │ │ │ +00186 │ │ │ │ │ +std::list & border_list); │ │ │ │ │ +00187 │ │ │ │ │ +00194 │ │ │ │ │ +void test_stability(Cmomentum & candidate, │ │ │ │ │ +00195 │ │ │ │ │ +const std::vector & border_vect); │ │ │ │ │ +00196 │ │ │ │ │ +00203 │ │ │ │ │ +void compute_cone_contents(); │ │ │ │ │ +00204 │ │ │ │ │ +00210 │ │ │ │ │ +void recompute_cone_contents(); │ │ │ │ │ +00211 │ │ │ │ │ +00212 │ │ │ │ │ +/* │ │ │ │ │ +00213 │ │ │ │ │ +* if we have gone beyond the acceptable threshold of change, compute │ │ │ │ │ +00214 │ │ │ │ │ +* the cone momentum from particle list. in this version, we use the │ │ │ │ │ +00215 │ │ │ │ │ +* ’pincluded’ information from the Cvicinity class, but we don’t │ │ │ │ │ +00216 │ │ │ │ │ +* change the member cone, only the locally supplied one │ │ │ │ │ +00217 │ │ │ │ │ +*/ │ │ │ │ │ +00218 │ │ │ │ │ +void recompute_cone_contents_if_needed(Cmomentum & this_cone, double & this_dpt); │ │ │ │ │ +00219 │ │ │ │ │ +00225 │ │ │ │ │ +int proceed_with_stability(); │ │ │ │ │ +00226 │ │ │ │ │ +00227 │ │ │ │ │ +/* │ │ │ │ │ +00228 │ │ │ │ │ +* circle intersection. │ │ │ │ │ +00229 │ │ │ │ │ +* computes the intersection with a circle of given centre and radius. │ │ │ │ │ +00230 │ │ │ │ │ +* The output takes the form of a checkxor of the intersection’s particles │ │ │ │ │ +00231 │ │ │ │ │ +circle centre x coordinate │ │ │ │ │ +* - cx │ │ │ │ │ +00232 │ │ │ │ │ +circle centre y coordinate │ │ │ │ │ +* - cy │ │ │ │ │ +00233 │ │ │ │ │ +* return the checkxor for the intersection │ │ │ │ │ +00234 │ │ │ │ │ +******************************************************************/ │ │ │ │ │ +00235 │ │ │ │ │ +Creference circle_intersect(double cx, double cy); │ │ │ │ │ +00236 │ │ │ │ │ +00238 │ │ │ │ │ +Cmomentum cone_candidate; │ │ │ │ │ +00239 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +263 │ │ │ │ │ + │ │ │ │ │ + 264 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00241 │ │ │ │ │ +std::vector child_list; │ │ │ │ │ +00242 │ │ │ │ │ +00245 │ │ │ │ │ +std::vector< std::pair > multiple_centre_done; │ │ │ │ │ +00246 │ │ │ │ │ +00247 │ │ │ │ │ +// information for updating cone contents to avoid rounding errors │ │ │ │ │ +00248 │ │ │ │ │ +double dpt; │ │ │ │ │ +00249 │ │ │ │ │ +00258 │ │ │ │ │ +inline bool is_inside(Cmomentum *centre, Cmomentum *v); │ │ │ │ │ +00259 }; │ │ │ │ │ +00260 │ │ │ │ │ +00261 /* │ │ │ │ │ +00262 * compute the absolute value of the difference between 2 angles. │ │ │ │ │ +00263 * We take care of the 2pi periodicity │ │ │ │ │ +00264 * \param angle1 │ │ │ │ │ +first angle │ │ │ │ │ +00265 * \param angle2 │ │ │ │ │ +second angle │ │ │ │ │ +00266 * \return the absolute value of the difference between the angles │ │ │ │ │ +00267 *****************************************************************/ │ │ │ │ │ +00268 inline double abs_dangle(double &angle1, double &angle2); │ │ │ │ │ +00269 │ │ │ │ │ +00270 } │ │ │ │ │ +00271 #endif │ │ │ │ │ + │ │ │ │ │ +5.42 │ │ │ │ │ + │ │ │ │ │ +protocones.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: protocones.h │ │ │ │ │ +// │ │ │ │ │ +00004 // Description: header file for stable cones determination (Cstable_cones) │ │ │ │ │ +// │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00006 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +an adaptation to spherical coordinates │ │ │ │ │ +// │ │ │ │ │ +00008 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00011 // │ │ │ │ │ +// │ │ │ │ │ +00012 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00013 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00014 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00015 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00016 // │ │ │ │ │ +// │ │ │ │ │ +00017 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00020 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00021 // │ │ │ │ │ +// │ │ │ │ │ +00022 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00023 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00025 // │ │ │ │ │ +// │ │ │ │ │ +00026 // $Revision:: 255 │ │ │ │ │ +$// │ │ │ │ │ +00027 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008) │ │ │ │ │ +$// │ │ │ │ │ +00029 │ │ │ │ │ +00030 #ifndef __SPH_PROTOCONES_H__ │ │ │ │ │ +00031 #define __SPH_PROTOCONES_H__ │ │ │ │ │ +00032 │ │ │ │ │ +00033 #include "momentum.h" │ │ │ │ │ +00034 #include "vicinity.h" │ │ │ │ │ +00035 #include │ │ │ │ │ +00036 #include │ │ │ │ │ +00037 #include │ │ │ │ │ +00038 #include "hash.h" │ │ │ │ │ +00039 │ │ │ │ │ +00040 #include │ │ │ │ │ +00041 │ │ │ │ │ +00042 namespace siscone_spherical{ │ │ │ │ │ +00043 │ │ │ │ │ +00055 class CSphborder_store{ │ │ │ │ │ +00056 public: │ │ │ │ │ +00058 │ │ │ │ │ +CSphborder_store(CSphmomentum * momentum, CSph3vector ¢re, CSph3vector &angl_dir1, CSph3vector │ │ │ │ │ +&angl_dir2) : │ │ │ │ │ +00059 │ │ │ │ │ +mom(momentum), is_in(false) { │ │ │ │ │ +00060 │ │ │ │ │ +CSph3vector diff = (*momentum) - centre; │ │ │ │ │ +00061 │ │ │ │ │ +angle = atan2(dot_product3(diff, angl_dir2), dot_product3(diff, angl_dir1)); │ │ │ │ │ +00062 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +00063 │ │ │ │ │ +std::cout « " adding point " « momentum->_theta « ", " « momentum->_phi │ │ │ │ │ +00064 │ │ │ │ │ +« " at an angle of " « angle « std::endl; │ │ │ │ │ +00065 #endif │ │ │ │ │ +00066 │ │ │ │ │ +} │ │ │ │ │ +00067 │ │ │ │ │ +00068 │ │ │ │ │ +CSphmomentum * mom; │ │ │ │ │ +00069 │ │ │ │ │ +double angle; │ │ │ │ │ +00070 │ │ │ │ │ +bool │ │ │ │ │ +is_in; │ │ │ │ │ +00071 }; │ │ │ │ │ +00072 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.42 protocones.h │ │ │ │ │ + │ │ │ │ │ +00073 │ │ │ │ │ +00076 inline bool operator<(const CSphborder_store & a, const CSphborder_store & b) { │ │ │ │ │ +00077 │ │ │ │ │ +return a.angle < b.angle; │ │ │ │ │ +00078 } │ │ │ │ │ +00079 │ │ │ │ │ +00080 │ │ │ │ │ +00089 class CSphstable_cones : public CSphvicinity{ │ │ │ │ │ +00090 public: │ │ │ │ │ +00092 │ │ │ │ │ +CSphstable_cones(); │ │ │ │ │ +00093 │ │ │ │ │ +00095 │ │ │ │ │ +CSphstable_cones(std::vector &_particle_list); │ │ │ │ │ +00096 │ │ │ │ │ +00098 │ │ │ │ │ +~CSphstable_cones(); │ │ │ │ │ +00099 │ │ │ │ │ +00104 │ │ │ │ │ +void init(std::vector &_particle_list); │ │ │ │ │ +00105 │ │ │ │ │ +00113 │ │ │ │ │ +int get_stable_cones(double _radius); │ │ │ │ │ +00114 │ │ │ │ │ +00116 │ │ │ │ │ +std::vector protocones; │ │ │ │ │ +00117 │ │ │ │ │ +00119 │ │ │ │ │ +sph_hash_cones *hc; │ │ │ │ │ +00120 │ │ │ │ │ +00122 │ │ │ │ │ +int nb_tot; │ │ │ │ │ +00123 #ifdef DEBUG_STABLE_CONES │ │ │ │ │ +00124 │ │ │ │ │ +int nb_hash_cones, nb_hash_occupied; │ │ │ │ │ +00125 #endif │ │ │ │ │ +00126 │ │ │ │ │ +00127 protected: │ │ │ │ │ +00129 │ │ │ │ │ +double R; │ │ │ │ │ +00130 │ │ │ │ │ +00132 │ │ │ │ │ +double R2; │ │ │ │ │ +00133 │ │ │ │ │ +00135 │ │ │ │ │ +double tan2R; │ │ │ │ │ +00136 │ │ │ │ │ +00137 private: │ │ │ │ │ +00140 │ │ │ │ │ +CSphmomentum cone; │ │ │ │ │ +00141 │ │ │ │ │ +00143 │ │ │ │ │ +CSphmomentum *child; │ │ │ │ │ +00144 │ │ │ │ │ +00146 │ │ │ │ │ +CSphvicinity_elm *centre; │ │ │ │ │ +00147 │ │ │ │ │ +00149 │ │ │ │ │ +unsigned int centre_idx; │ │ │ │ │ +00150 │ │ │ │ │ +00152 │ │ │ │ │ +unsigned int first_cone; │ │ │ │ │ +00153 │ │ │ │ │ +00159 │ │ │ │ │ +int init_cone(); │ │ │ │ │ +00160 │ │ │ │ │ +00167 │ │ │ │ │ +int test_cone(); │ │ │ │ │ +00168 │ │ │ │ │ +00174 │ │ │ │ │ +int update_cone(); │ │ │ │ │ +00175 │ │ │ │ │ +00176 │ │ │ │ │ +/* │ │ │ │ │ +00177 │ │ │ │ │ +* run through the vicinity of the current parent and for each child │ │ │ │ │ +00178 │ │ │ │ │ +* indicate which members are cocircular... │ │ │ │ │ +00179 │ │ │ │ │ +*/ │ │ │ │ │ +00180 │ │ │ │ │ +void prepare_cocircular_lists(); │ │ │ │ │ +00181 │ │ │ │ │ +00189 │ │ │ │ │ +bool cocircular_check(); │ │ │ │ │ +00190 │ │ │ │ │ +00195 │ │ │ │ │ +void test_cone_cocircular(CSphmomentum & borderless_cone, │ │ │ │ │ +00196 │ │ │ │ │ +std::list & border_list); │ │ │ │ │ +00197 │ │ │ │ │ +00204 │ │ │ │ │ +void test_stability(CSphmomentum & candidate, │ │ │ │ │ +00205 │ │ │ │ │ +const std::vector & border_vect); │ │ │ │ │ +00206 │ │ │ │ │ +00213 │ │ │ │ │ +void compute_cone_contents(); │ │ │ │ │ +00214 │ │ │ │ │ +00220 │ │ │ │ │ +void recompute_cone_contents(); │ │ │ │ │ +00221 │ │ │ │ │ +00222 │ │ │ │ │ +/* │ │ │ │ │ +00223 │ │ │ │ │ +* if we have gone beyond the acceptable threshold of change, compute │ │ │ │ │ +00224 │ │ │ │ │ +* the cone momentum from particle list. in this version, we use the │ │ │ │ │ +00225 │ │ │ │ │ +* ’pincluded’ information from the CSphvicinity class, but we don’t │ │ │ │ │ +00226 │ │ │ │ │ +* change the member cone, only the locally supplied one │ │ │ │ │ +00227 │ │ │ │ │ +*/ │ │ │ │ │ +00228 │ │ │ │ │ +void recompute_cone_contents_if_needed(CSphmomentum & this_cone, double & this_dpt); │ │ │ │ │ +00229 │ │ │ │ │ +00235 │ │ │ │ │ +int proceed_with_stability(); │ │ │ │ │ +00236 │ │ │ │ │ +00237 │ │ │ │ │ +/* │ │ │ │ │ +00238 │ │ │ │ │ +* circle intersection. │ │ │ │ │ +00239 │ │ │ │ │ +* computes the intersection with a circle of given centre and radius. │ │ │ │ │ +00240 │ │ │ │ │ +* The output takes the form of a checkxor of the intersection’s particles │ │ │ │ │ +00241 │ │ │ │ │ +circle centre x coordinate │ │ │ │ │ +* - cx │ │ │ │ │ +00242 │ │ │ │ │ +circle centre y coordinate │ │ │ │ │ +* - cy │ │ │ │ │ +00243 │ │ │ │ │ +* return the checkxor for the intersection │ │ │ │ │ +00244 │ │ │ │ │ +******************************************************************/ │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +265 │ │ │ │ │ + │ │ │ │ │ + 266 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00245 │ │ │ │ │ +siscone::Creference circle_intersect(CSph3vector &cone_centre); │ │ │ │ │ +00246 │ │ │ │ │ +00248 │ │ │ │ │ +CSphmomentum cone_candidate; │ │ │ │ │ +00249 │ │ │ │ │ +00251 │ │ │ │ │ +std::vector child_list; │ │ │ │ │ +00252 │ │ │ │ │ +00255 │ │ │ │ │ +std::vector< std::pair > multiple_centre_done; │ │ │ │ │ +00256 │ │ │ │ │ +00257 │ │ │ │ │ +// information for updating cone contents to avoid rounding errors │ │ │ │ │ +00258 │ │ │ │ │ +double dpt; │ │ │ │ │ +00259 }; │ │ │ │ │ +00260 │ │ │ │ │ +00261 } │ │ │ │ │ +00262 #endif │ │ │ │ │ + │ │ │ │ │ 5.43 │ │ │ │ │ │ │ │ │ │ siscone.h │ │ │ │ │ │ │ │ │ │ 00001 // -*- C++ -*00003 // File: siscone.h │ │ │ │ │ // │ │ │ │ │ 00004 // Description: header file for the main SISCone class │ │ │ │ │ @@ -24600,19 +24584,14 @@ │ │ │ │ │ 00097 │ │ │ │ │ int compute_jets_progressive_removal(std::vector &_particles, double _radius, │ │ │ │ │ 00098 │ │ │ │ │ int _n_pass_max=0, double _ptmin=0.0, │ │ │ │ │ 00099 │ │ │ │ │ Esplit_merge_scale _ordering_scale=SM_pttilde); │ │ │ │ │ 00100 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.44 siscone.h │ │ │ │ │ - │ │ │ │ │ 00113 │ │ │ │ │ int recompute_jets(double _f, double _ptmin = 0.0, │ │ │ │ │ 00114 │ │ │ │ │ Esplit_merge_scale _split_merge_scale=SM_pttilde); │ │ │ │ │ 00115 │ │ │ │ │ 00117 │ │ │ │ │ std::vector > protocones_list; │ │ │ │ │ @@ -24634,14 +24613,19 @@ │ │ │ │ │ static std::ostream * banner_stream() {return _banner_ostr;} │ │ │ │ │ 00144 │ │ │ │ │ 00145 private: │ │ │ │ │ 00146 │ │ │ │ │ bool rerun_allowed; │ │ │ │ │ 00147 │ │ │ │ │ static std::ostream * _banner_ostr; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.44 siscone.h │ │ │ │ │ + │ │ │ │ │ 00148 │ │ │ │ │ 00150 │ │ │ │ │ void _initialise_if_needed(); │ │ │ │ │ 00151 │ │ │ │ │ 00152 }; │ │ │ │ │ 00153 │ │ │ │ │ 00154 │ │ │ │ │ @@ -24729,23 +24713,14 @@ │ │ │ │ │ 00076 │ │ │ │ │ int compute_jets(std::vector &_particles, double _radius, double _f, │ │ │ │ │ 00077 │ │ │ │ │ int _n_pass_max=0, double _Emin=0.0, │ │ │ │ │ 00078 │ │ │ │ │ Esplit_merge_scale _split_merge_scale=SM_Etilde); │ │ │ │ │ 00079 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -267 │ │ │ │ │ - │ │ │ │ │ - 268 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00094 │ │ │ │ │ int compute_jets_progressive_removal(std::vector &_particles, double _radius, │ │ │ │ │ 00095 │ │ │ │ │ int _n_pass_max=0, double _Emin=0.0, │ │ │ │ │ 00096 │ │ │ │ │ Esplit_merge_scale _ordering_scale=SM_Etilde); │ │ │ │ │ 00097 │ │ │ │ │ @@ -24768,14 +24743,23 @@ │ │ │ │ │ 00121 #endif │ │ │ │ │ 00122 │ │ │ │ │ 00134 │ │ │ │ │ static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;} │ │ │ │ │ 00135 │ │ │ │ │ 00140 │ │ │ │ │ static std::ostream * banner_stream() {return _banner_ostr;} │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +267 │ │ │ │ │ + │ │ │ │ │ + 268 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00141 │ │ │ │ │ 00142 private: │ │ │ │ │ 00143 │ │ │ │ │ bool rerun_allowed; │ │ │ │ │ 00144 │ │ │ │ │ static std::ostream * _banner_ostr; │ │ │ │ │ 00145 │ │ │ │ │ @@ -24793,14 +24777,1100 @@ │ │ │ │ │ 00170 std::string siscone_version(); │ │ │ │ │ 00171 │ │ │ │ │ 00172 } │ │ │ │ │ 00173 #endif │ │ │ │ │ │ │ │ │ │ 5.45 │ │ │ │ │ │ │ │ │ │ +split_merge.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: split_merge.h │ │ │ │ │ +// │ │ │ │ │ +00004 // Description: header file for splitting/merging (contains the CJet class) // │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00006 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +an adaptation to spherical coordinates │ │ │ │ │ +// │ │ │ │ │ +00008 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ +00011 // │ │ │ │ │ +// │ │ │ │ │ +00012 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00013 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00014 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00015 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00016 // │ │ │ │ │ +// │ │ │ │ │ +00017 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00020 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00021 // │ │ │ │ │ +// │ │ │ │ │ +00022 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00023 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00025 // │ │ │ │ │ +// │ │ │ │ │ +00026 // $Revision:: 404 │ │ │ │ │ +$// │ │ │ │ │ +00027 // $Date:: 2016-05-22 12:14:42 +0200 (Sun, 22 May 2016) │ │ │ │ │ +$// │ │ │ │ │ +00029 │ │ │ │ │ +00030 #ifndef __SPH_SPLIT_MERGE_H__ │ │ │ │ │ +00031 #define __SPH_SPLIT_MERGE_H__ │ │ │ │ │ +00032 │ │ │ │ │ +00033 #include │ │ │ │ │ +00034 #include │ │ │ │ │ +00035 #include "geom_2d.h" │ │ │ │ │ +00036 #include "momentum.h" │ │ │ │ │ +00037 #include │ │ │ │ │ +00038 #include │ │ │ │ │ +00039 #include │ │ │ │ │ +00040 #include │ │ │ │ │ +00041 #include │ │ │ │ │ +00042 │ │ │ │ │ +00043 namespace siscone_spherical{ │ │ │ │ │ +00044 │ │ │ │ │ +00045 const int CJET_INEXISTENT_PASS = -2; │ │ │ │ │ +00046 │ │ │ │ │ +00056 class CSphjet{ │ │ │ │ │ +00057 public: │ │ │ │ │ +00059 │ │ │ │ │ +CSphjet(); │ │ │ │ │ +00060 │ │ │ │ │ +00062 │ │ │ │ │ +~CSphjet(); │ │ │ │ │ +00063 │ │ │ │ │ +00064 │ │ │ │ │ +CSphmomentum v; │ │ │ │ │ +00065 │ │ │ │ │ +double E_tilde; │ │ │ │ │ +00066 │ │ │ │ │ +int n; │ │ │ │ │ +00067 │ │ │ │ │ +std::vector contents; │ │ │ │ │ +00068 │ │ │ │ │ +00080 │ │ │ │ │ +double sm_var2; │ │ │ │ │ +00081 │ │ │ │ │ +00083 │ │ │ │ │ +CSphtheta_phi_range range; │ │ │ │ │ +00084 │ │ │ │ │ +00089 │ │ │ │ │ +int pass; │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.45 split_merge.h │ │ │ │ │ + │ │ │ │ │ +269 │ │ │ │ │ + │ │ │ │ │ +00090 }; │ │ │ │ │ +00091 │ │ │ │ │ +00094 │ │ │ │ │ +00096 bool jets_E_less(const CSphjet &j1, const CSphjet &j2); │ │ │ │ │ +00097 │ │ │ │ │ +00098 │ │ │ │ │ +00106 enum Esplit_merge_scale { │ │ │ │ │ +00107 │ │ │ │ │ +SM_E, │ │ │ │ │ +00108 │ │ │ │ │ +SM_Etilde │ │ │ │ │ +00109 }; │ │ │ │ │ +00110 │ │ │ │ │ +00112 std::string split_merge_scale_name(Esplit_merge_scale sms); │ │ │ │ │ +00113 │ │ │ │ │ +00119 class CSphsplit_merge_ptcomparison{ │ │ │ │ │ +00120 public: │ │ │ │ │ +00122 │ │ │ │ │ +CSphsplit_merge_ptcomparison() : │ │ │ │ │ +00123 │ │ │ │ │ +particles(0), split_merge_scale(SM_Etilde){}; │ │ │ │ │ +00124 │ │ │ │ │ +00126 │ │ │ │ │ +std::string SM_scale_name() const { │ │ │ │ │ +00127 │ │ │ │ │ +return split_merge_scale_name(split_merge_scale);} │ │ │ │ │ +00128 │ │ │ │ │ +00129 │ │ │ │ │ +std::vector * particles; │ │ │ │ │ +00130 │ │ │ │ │ +std::vector * particles_norm2; │ │ │ │ │ +00131 │ │ │ │ │ +00133 │ │ │ │ │ +bool operator()(const CSphjet &jet1, const CSphjet &jet2) const; │ │ │ │ │ +00134 │ │ │ │ │ +00146 │ │ │ │ │ +void get_difference(const CSphjet &j1, const CSphjet &j2, CSphmomentum *v, double *E_tilde) const; │ │ │ │ │ +00147 │ │ │ │ │ +00158 │ │ │ │ │ +Esplit_merge_scale split_merge_scale; │ │ │ │ │ +00159 }; │ │ │ │ │ +00160 │ │ │ │ │ +00161 │ │ │ │ │ +00162 // iterator types │ │ │ │ │ +00164 typedef std::multiset::iterator │ │ │ │ │ +cjet_iterator; │ │ │ │ │ +00165 │ │ │ │ │ +00167 typedef std::vector::iterator jet_iterator; │ │ │ │ │ +00168 │ │ │ │ │ +00169 │ │ │ │ │ +00170 │ │ │ │ │ +00175 class CSphsplit_merge{ │ │ │ │ │ +00176 public: │ │ │ │ │ +00178 │ │ │ │ │ +CSphsplit_merge(); │ │ │ │ │ +00179 │ │ │ │ │ +00181 │ │ │ │ │ +~CSphsplit_merge(); │ │ │ │ │ +00182 │ │ │ │ │ +00183 │ │ │ │ │ +00185 │ │ │ │ │ +// initialisation functions // │ │ │ │ │ +00187 │ │ │ │ │ +00196 │ │ │ │ │ +int init(std::vector &_particles, std::vector *protocones, double R2, │ │ │ │ │ +double Emin=0.0); │ │ │ │ │ +00197 │ │ │ │ │ +00203 │ │ │ │ │ +int init_particles(std::vector &_particles); │ │ │ │ │ +00204 │ │ │ │ │ +00208 │ │ │ │ │ +int init_pleft(); │ │ │ │ │ +00209 │ │ │ │ │ +00221 │ │ │ │ │ +inline int set_E_weighted_splitting(bool _use_E_weighted_splitting){ │ │ │ │ │ +00222 │ │ │ │ │ +use_E_weighted_splitting = _use_E_weighted_splitting; │ │ │ │ │ +00223 │ │ │ │ │ +return 0; │ │ │ │ │ +00224 │ │ │ │ │ +} │ │ │ │ │ +00225 │ │ │ │ │ +00227 │ │ │ │ │ +// cleaning functions // │ │ │ │ │ +00229 │ │ │ │ │ +00231 │ │ │ │ │ +int partial_clear(); │ │ │ │ │ +00232 │ │ │ │ │ +00234 │ │ │ │ │ +int full_clear(); │ │ │ │ │ +00235 │ │ │ │ │ +00237 │ │ │ │ │ +// user-defined stable-cone ordering // │ │ │ │ │ +00239 │ │ │ │ │ +00245 │ │ │ │ │ +class Cuser_scale_base{ │ │ │ │ │ +00246 │ │ │ │ │ +public: │ │ │ │ │ +00248 │ │ │ │ │ +virtual ~Cuser_scale_base(){} │ │ │ │ │ +00249 │ │ │ │ │ +00254 │ │ │ │ │ +virtual double operator()(const CSphjet & jet) const = 0; │ │ │ │ │ +00255 │ │ │ │ │ +00266 │ │ │ │ │ +virtual bool is_larger(const CSphjet & a, const CSphjet & b) const{ │ │ │ │ │ +00267 │ │ │ │ │ +return (a.sm_var2 > b.sm_var2); │ │ │ │ │ +00268 │ │ │ │ │ +} │ │ │ │ │ +00269 │ │ │ │ │ +}; │ │ │ │ │ +00270 │ │ │ │ │ +00275 │ │ │ │ │ +void set_user_scale(const Cuser_scale_base * user_scale_in){ │ │ │ │ │ +00276 │ │ │ │ │ +_user_scale = user_scale_in; │ │ │ │ │ +00277 │ │ │ │ │ +} │ │ │ │ │ +00278 │ │ │ │ │ +00280 │ │ │ │ │ +const Cuser_scale_base * user_scale() const { return _user_scale; } │ │ │ │ │ +00281 │ │ │ │ │ +00282 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 270 │ │ │ │ │ + │ │ │ │ │ +00284 │ │ │ │ │ +00286 │ │ │ │ │ +00296 │ │ │ │ │ +00297 │ │ │ │ │ +00305 │ │ │ │ │ +00306 │ │ │ │ │ +00317 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +// main parts of the algorithm // │ │ │ │ │ +int merge_collinear_and_remove_soft(); │ │ │ │ │ +int add_protocones(std::vector *protocones, double R2, double Emin=0.0); │ │ │ │ │ +int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double │ │ │ │ │ +Emin=0.0); │ │ │ │ │ + │ │ │ │ │ +00318 │ │ │ │ │ +00328 │ │ │ │ │ +int perform(double overlap_tshold, double Emin=0.0); │ │ │ │ │ +00329 │ │ │ │ │ +00330 │ │ │ │ │ +00332 │ │ │ │ │ +// save and debug functions // │ │ │ │ │ +00334 │ │ │ │ │ +00337 │ │ │ │ │ +int save_contents(FILE *flux); │ │ │ │ │ +00338 │ │ │ │ │ +00340 │ │ │ │ │ +int show(); │ │ │ │ │ +00341 │ │ │ │ │ +00342 │ │ │ │ │ +// particle information │ │ │ │ │ +00343 │ │ │ │ │ +int n; │ │ │ │ │ +00344 │ │ │ │ │ +std::vector particles; │ │ │ │ │ +00345 │ │ │ │ │ +std::vector particles_norm2; │ │ │ │ │ +00346 │ │ │ │ │ +int n_left; │ │ │ │ │ +00347 │ │ │ │ │ +std::vector p_remain; │ │ │ │ │ +00348 │ │ │ │ │ +std::vector p_uncol_hard; │ │ │ │ │ +00349 │ │ │ │ │ +int n_pass; │ │ │ │ │ +00350 │ │ │ │ │ +00354 │ │ │ │ │ +double most_ambiguous_split; │ │ │ │ │ +00355 │ │ │ │ │ +00356 │ │ │ │ │ +// jets information │ │ │ │ │ +00357 │ │ │ │ │ +std::vector jets; │ │ │ │ │ +00358 │ │ │ │ │ +00359 │ │ │ │ │ +// working entries │ │ │ │ │ +00360 │ │ │ │ │ +int *indices; │ │ │ │ │ +00361 │ │ │ │ │ +int idx_size; │ │ │ │ │ +00362 │ │ │ │ │ +00371 │ │ │ │ │ +bool merge_identical_protocones; │ │ │ │ │ +00372 │ │ │ │ │ +00374 │ │ │ │ │ +CSphsplit_merge_ptcomparison ptcomparison; │ │ │ │ │ +00375 │ │ │ │ │ +00382 │ │ │ │ │ +double SM_var2_hardest_cut_off; │ │ │ │ │ +00383 │ │ │ │ │ +00391 │ │ │ │ │ +double stable_cone_soft_E2_cutoff; │ │ │ │ │ +00392 │ │ │ │ │ +00393 private: │ │ │ │ │ +00401 │ │ │ │ │ +bool get_overlap(const CSphjet &j1, const CSphjet &j2, double *v); │ │ │ │ │ +00402 │ │ │ │ │ +00403 │ │ │ │ │ +00415 │ │ │ │ │ +bool split(cjet_iterator &it_j1, cjet_iterator &it_j2); │ │ │ │ │ +00416 │ │ │ │ │ +00425 │ │ │ │ │ +bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2); │ │ │ │ │ +00426 │ │ │ │ │ +00433 │ │ │ │ │ +bool insert(CSphjet &jet); │ │ │ │ │ +00434 │ │ │ │ │ +00441 │ │ │ │ │ +double get_sm_var2(CSphmomentum &v, double &E_tilde); │ │ │ │ │ +00442 │ │ │ │ │ +00444 │ │ │ │ │ +void compute_Etilde(CSphjet &j); │ │ │ │ │ +00445 │ │ │ │ │ +00446 │ │ │ │ │ +// jet information │ │ │ │ │ +00448 #ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR │ │ │ │ │ +00449 │ │ │ │ │ +std::unique_ptr > candidates; │ │ │ │ │ +00450 #else │ │ │ │ │ +00451 │ │ │ │ │ +std::auto_ptr > candidates; │ │ │ │ │ +00452 #endif │ │ │ │ │ +00453 │ │ │ │ │ +00455 │ │ │ │ │ +double E_min; │ │ │ │ │ +00456 │ │ │ │ │ +00462 │ │ │ │ │ +bool use_E_weighted_splitting; │ │ │ │ │ +00463 │ │ │ │ │ +00466 │ │ │ │ │ +const Cuser_scale_base *_user_scale; │ │ │ │ │ +00467 │ │ │ │ │ +00468 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES │ │ │ │ │ +00470 │ │ │ │ │ +std::set cand_refs; │ │ │ │ │ +00471 #endif │ │ │ │ │ +00472 }; │ │ │ │ │ +00473 │ │ │ │ │ +00474 } │ │ │ │ │ +00475 │ │ │ │ │ +00476 │ │ │ │ │ +00477 #endif │ │ │ │ │ + │ │ │ │ │ +5.46 │ │ │ │ │ + │ │ │ │ │ +split_merge.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*- │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.46 split_merge.h │ │ │ │ │ + │ │ │ │ │ +00003 // File: split_merge.h │ │ │ │ │ +// │ │ │ │ │ +00004 // Description: header file for splitting/merging (contains the CJet class) // │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +// │ │ │ │ │ +00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00013 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00014 // │ │ │ │ │ +// │ │ │ │ │ +00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00018 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00019 // │ │ │ │ │ +// │ │ │ │ │ +00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00021 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00023 // │ │ │ │ │ +// │ │ │ │ │ +00024 // $Revision:: 405 │ │ │ │ │ +$// │ │ │ │ │ +00025 // $Date:: 2016-05-23 20:15:02 +0200 (Mon, 23 May 2016) │ │ │ │ │ +$// │ │ │ │ │ +00027 │ │ │ │ │ +00028 #ifndef __SPLIT_MERGE_H__ │ │ │ │ │ +00029 #define __SPLIT_MERGE_H__ │ │ │ │ │ +00030 │ │ │ │ │ +00031 #include │ │ │ │ │ +00032 #include "defines.h" │ │ │ │ │ +00033 #include "geom_2d.h" │ │ │ │ │ +00034 #include "momentum.h" │ │ │ │ │ +00035 #include │ │ │ │ │ +00036 #include │ │ │ │ │ +00037 #include │ │ │ │ │ +00038 #include │ │ │ │ │ +00039 #include │ │ │ │ │ +00040 │ │ │ │ │ +00041 namespace siscone{ │ │ │ │ │ +00042 │ │ │ │ │ +00043 const int CJET_INEXISTENT_PASS = -2; │ │ │ │ │ +00044 │ │ │ │ │ +00054 class Cjet{ │ │ │ │ │ +00055 public: │ │ │ │ │ +00057 │ │ │ │ │ +Cjet(); │ │ │ │ │ +00058 │ │ │ │ │ +00060 │ │ │ │ │ +~Cjet(); │ │ │ │ │ +00061 │ │ │ │ │ +00062 │ │ │ │ │ +Cmomentum v; │ │ │ │ │ +00063 │ │ │ │ │ +double pt_tilde; │ │ │ │ │ +00064 │ │ │ │ │ +int n; │ │ │ │ │ +00065 │ │ │ │ │ +std::vector contents; │ │ │ │ │ +00066 │ │ │ │ │ +00073 │ │ │ │ │ +double sm_var2; │ │ │ │ │ +00074 │ │ │ │ │ +00076 │ │ │ │ │ +Ceta_phi_range range; │ │ │ │ │ +00077 │ │ │ │ │ +00082 │ │ │ │ │ +int pass; │ │ │ │ │ +00083 }; │ │ │ │ │ +00084 │ │ │ │ │ +00086 bool jets_pt_less(const Cjet &j1, const Cjet &j2); │ │ │ │ │ +00087 │ │ │ │ │ +00088 │ │ │ │ │ +00096 enum Esplit_merge_scale { │ │ │ │ │ +00097 │ │ │ │ │ +SM_pt, │ │ │ │ │ +00098 │ │ │ │ │ +SM_Et, │ │ │ │ │ +00100 │ │ │ │ │ +SM_mt, │ │ │ │ │ +00102 │ │ │ │ │ +SM_pttilde │ │ │ │ │ +00104 }; │ │ │ │ │ +00105 │ │ │ │ │ +00107 std::string split_merge_scale_name(Esplit_merge_scale sms); │ │ │ │ │ +00108 │ │ │ │ │ +00116 class Csplit_merge_ptcomparison{ │ │ │ │ │ +00117 public: │ │ │ │ │ +00119 │ │ │ │ │ +Csplit_merge_ptcomparison() : │ │ │ │ │ +00120 │ │ │ │ │ +particles(0), split_merge_scale(SM_pttilde){}; │ │ │ │ │ +00121 │ │ │ │ │ +00123 │ │ │ │ │ +std::string SM_scale_name() const { │ │ │ │ │ +00124 │ │ │ │ │ +return split_merge_scale_name(split_merge_scale);} │ │ │ │ │ +00125 │ │ │ │ │ +00126 │ │ │ │ │ +std::vector * particles; │ │ │ │ │ +00127 │ │ │ │ │ +std::vector * pt; │ │ │ │ │ +00128 │ │ │ │ │ +00130 │ │ │ │ │ +bool operator()(const Cjet &jet1, const Cjet &jet2) const; │ │ │ │ │ +00131 │ │ │ │ │ +00143 │ │ │ │ │ +void get_difference(const Cjet &j1, const Cjet &j2, Cmomentum *v, double *pt_tilde) const; │ │ │ │ │ +00144 │ │ │ │ │ +00163 │ │ │ │ │ +Esplit_merge_scale split_merge_scale; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +271 │ │ │ │ │ + │ │ │ │ │ + 272 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00164 }; │ │ │ │ │ +00165 │ │ │ │ │ +00166 │ │ │ │ │ +00167 // iterator types │ │ │ │ │ +00169 typedef std::multiset::iterator cjet_iterator; │ │ │ │ │ +00170 │ │ │ │ │ +00172 typedef std::vector::iterator jet_iterator; │ │ │ │ │ +00173 │ │ │ │ │ +00174 │ │ │ │ │ +00175 │ │ │ │ │ +00180 class Csplit_merge{ │ │ │ │ │ +00181 public: │ │ │ │ │ +00183 │ │ │ │ │ +Csplit_merge(); │ │ │ │ │ +00184 │ │ │ │ │ +00186 │ │ │ │ │ +~Csplit_merge(); │ │ │ │ │ +00187 │ │ │ │ │ +00188 │ │ │ │ │ +00190 │ │ │ │ │ +// initialisation functions // │ │ │ │ │ +00192 │ │ │ │ │ +00201 │ │ │ │ │ +int init(std::vector &_particles, std::vector *protocones, double R2, double │ │ │ │ │ +ptmin=0.0); │ │ │ │ │ +00202 │ │ │ │ │ +00208 │ │ │ │ │ +int init_particles(std::vector &_particles); │ │ │ │ │ +00209 │ │ │ │ │ +00213 │ │ │ │ │ +int init_pleft(); │ │ │ │ │ +00214 │ │ │ │ │ +00226 │ │ │ │ │ +inline int set_pt_weighted_splitting(bool _use_pt_weighted_splitting){ │ │ │ │ │ +00227 │ │ │ │ │ +use_pt_weighted_splitting = _use_pt_weighted_splitting; │ │ │ │ │ +00228 │ │ │ │ │ +return 0; │ │ │ │ │ +00229 │ │ │ │ │ +} │ │ │ │ │ +00230 │ │ │ │ │ +00232 │ │ │ │ │ +// cleaning functions // │ │ │ │ │ +00234 │ │ │ │ │ +00236 │ │ │ │ │ +int partial_clear(); │ │ │ │ │ +00237 │ │ │ │ │ +00239 │ │ │ │ │ +int full_clear(); │ │ │ │ │ +00240 │ │ │ │ │ +00242 │ │ │ │ │ +// user-defined stable-cone ordering // │ │ │ │ │ +00244 │ │ │ │ │ +00250 │ │ │ │ │ +class Cuser_scale_base{ │ │ │ │ │ +00251 │ │ │ │ │ +public: │ │ │ │ │ +00253 │ │ │ │ │ +virtual ~Cuser_scale_base(){} │ │ │ │ │ +00254 │ │ │ │ │ +00259 │ │ │ │ │ +virtual double operator()(const Cjet & jet) const = 0; │ │ │ │ │ +00260 │ │ │ │ │ +00271 │ │ │ │ │ +virtual bool is_larger(const Cjet & a, const Cjet & b) const{ │ │ │ │ │ +00272 │ │ │ │ │ +return (a.sm_var2 > b.sm_var2); │ │ │ │ │ +00273 │ │ │ │ │ +} │ │ │ │ │ +00274 │ │ │ │ │ +}; │ │ │ │ │ +00275 │ │ │ │ │ +00280 │ │ │ │ │ +void set_user_scale(const Cuser_scale_base * user_scale_in){ │ │ │ │ │ +00281 │ │ │ │ │ +_user_scale = user_scale_in; │ │ │ │ │ +00282 │ │ │ │ │ +} │ │ │ │ │ +00283 │ │ │ │ │ +00285 │ │ │ │ │ +const Cuser_scale_base * user_scale() const { return _user_scale; } │ │ │ │ │ +00286 │ │ │ │ │ +00287 │ │ │ │ │ +00289 │ │ │ │ │ +// main parts of the algorithm // │ │ │ │ │ +00291 │ │ │ │ │ +00299 │ │ │ │ │ +int merge_collinear_and_remove_soft(); │ │ │ │ │ +00300 │ │ │ │ │ +00308 │ │ │ │ │ +int add_protocones(std::vector *protocones, double R2, double ptmin=0.0); │ │ │ │ │ +00309 │ │ │ │ │ +00320 │ │ │ │ │ +int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double ptmin=0.0); │ │ │ │ │ +00321 │ │ │ │ │ +00331 │ │ │ │ │ +int perform(double overlap_tshold, double ptmin=0.0); │ │ │ │ │ +00332 │ │ │ │ │ +00333 │ │ │ │ │ +00335 │ │ │ │ │ +// save and debug functions // │ │ │ │ │ +00337 │ │ │ │ │ +00340 │ │ │ │ │ +int save_contents(FILE *flux); │ │ │ │ │ +00341 │ │ │ │ │ +00343 │ │ │ │ │ +int show(); │ │ │ │ │ +00344 │ │ │ │ │ +00345 │ │ │ │ │ +// particle information │ │ │ │ │ +00346 │ │ │ │ │ +int n; │ │ │ │ │ +00347 │ │ │ │ │ +std::vector particles; │ │ │ │ │ +00348 │ │ │ │ │ +std::vector pt; │ │ │ │ │ +00349 │ │ │ │ │ +int n_left; │ │ │ │ │ +00350 │ │ │ │ │ +std::vector p_remain; │ │ │ │ │ +00351 │ │ │ │ │ +std::vector p_uncol_hard; │ │ │ │ │ +00352 │ │ │ │ │ +int n_pass; │ │ │ │ │ +00353 │ │ │ │ │ +00357 │ │ │ │ │ +double most_ambiguous_split; │ │ │ │ │ +00358 │ │ │ │ │ +00359 │ │ │ │ │ +// jets information │ │ │ │ │ +00360 │ │ │ │ │ +std::vector jets; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.47 vicinity.h │ │ │ │ │ + │ │ │ │ │ +273 │ │ │ │ │ + │ │ │ │ │ +00361 │ │ │ │ │ +00362 │ │ │ │ │ +// working entries │ │ │ │ │ +00363 │ │ │ │ │ +int *indices; │ │ │ │ │ +00364 │ │ │ │ │ +int idx_size; │ │ │ │ │ +00365 │ │ │ │ │ +00374 │ │ │ │ │ +bool merge_identical_protocones; │ │ │ │ │ +00375 │ │ │ │ │ +00377 │ │ │ │ │ +Csplit_merge_ptcomparison ptcomparison; │ │ │ │ │ +00378 │ │ │ │ │ +00385 │ │ │ │ │ +double SM_var2_hardest_cut_off; │ │ │ │ │ +00386 │ │ │ │ │ +00394 │ │ │ │ │ +double stable_cone_soft_pt2_cutoff; │ │ │ │ │ +00395 │ │ │ │ │ +00396 private: │ │ │ │ │ +00404 │ │ │ │ │ +bool get_overlap(const Cjet &j1, const Cjet &j2, double *v); │ │ │ │ │ +00405 │ │ │ │ │ +00406 │ │ │ │ │ +00418 │ │ │ │ │ +bool split(cjet_iterator &it_j1, cjet_iterator &it_j2); │ │ │ │ │ +00419 │ │ │ │ │ +00428 │ │ │ │ │ +bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2); │ │ │ │ │ +00429 │ │ │ │ │ +00436 │ │ │ │ │ +bool insert(Cjet &jet); │ │ │ │ │ +00437 │ │ │ │ │ +00444 │ │ │ │ │ +double get_sm_var2(Cmomentum &v, double &pt_tilde); │ │ │ │ │ +00445 │ │ │ │ │ +00446 │ │ │ │ │ +// jet information │ │ │ │ │ +00448 #ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR │ │ │ │ │ +00449 │ │ │ │ │ +std::unique_ptr > candidates; │ │ │ │ │ +00450 #else │ │ │ │ │ +00451 │ │ │ │ │ +std::auto_ptr > candidates; │ │ │ │ │ +00452 #endif │ │ │ │ │ +00453 │ │ │ │ │ +00455 │ │ │ │ │ +double pt_min2; │ │ │ │ │ +00456 │ │ │ │ │ +00462 │ │ │ │ │ +bool use_pt_weighted_splitting; │ │ │ │ │ +00463 │ │ │ │ │ +00466 │ │ │ │ │ +const Cuser_scale_base *_user_scale; │ │ │ │ │ +00467 │ │ │ │ │ +00468 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES │ │ │ │ │ +00470 │ │ │ │ │ +std::set cand_refs; │ │ │ │ │ +00471 #endif │ │ │ │ │ +00472 }; │ │ │ │ │ +00473 │ │ │ │ │ +00474 } │ │ │ │ │ +00475 │ │ │ │ │ +00476 │ │ │ │ │ +00477 #endif │ │ │ │ │ + │ │ │ │ │ +5.47 │ │ │ │ │ + │ │ │ │ │ +vicinity.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: vicinity.h │ │ │ │ │ +// │ │ │ │ │ +00004 // Description: header file for particle vicinity (Cvicinity class) │ │ │ │ │ +// │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ +// │ │ │ │ │ +00006 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +an adaptation to spherical coordinates │ │ │ │ │ +// │ │ │ │ │ +00008 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ +00011 // │ │ │ │ │ +// │ │ │ │ │ +00012 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00013 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00014 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00015 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00016 // │ │ │ │ │ +// │ │ │ │ │ +00017 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00020 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00021 // │ │ │ │ │ +// │ │ │ │ │ +00022 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00023 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00025 // │ │ │ │ │ +// │ │ │ │ │ +00026 // $Revision:: 255 │ │ │ │ │ +$// │ │ │ │ │ +00027 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008) │ │ │ │ │ +$// │ │ │ │ │ +00029 │ │ │ │ │ +00030 #ifndef __SPH_VICINITY_H__ │ │ │ │ │ +00031 #define __SPH_VICINITY_H__ │ │ │ │ │ +00032 │ │ │ │ │ +00033 #include │ │ │ │ │ +00034 #include │ │ │ │ │ +00035 #include │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ + 274 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00036 #include "momentum.h" │ │ │ │ │ +00037 #include │ │ │ │ │ +00038 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ +00039 #include │ │ │ │ │ +00040 #endif │ │ │ │ │ +00041 │ │ │ │ │ +00042 namespace siscone_spherical{ │ │ │ │ │ +00043 │ │ │ │ │ +00044 │ │ │ │ │ +00052 class CSphvicinity_elm{ │ │ │ │ │ +00053 public: │ │ │ │ │ +00055 │ │ │ │ │ +CSphmomentum *v; │ │ │ │ │ +00056 │ │ │ │ │ +00058 │ │ │ │ │ +siscone::Cvicinity_inclusion *is_inside; │ │ │ │ │ +00059 │ │ │ │ │ +00060 │ │ │ │ │ +// centre variables │ │ │ │ │ +00061 │ │ │ │ │ +CSph3vector centre; │ │ │ │ │ +00062 │ │ │ │ │ +double angle; │ │ │ │ │ +00063 │ │ │ │ │ +bool side; │ │ │ │ │ +00064 │ │ │ │ │ +double cocircular_range; │ │ │ │ │ +00066 │ │ │ │ │ +00069 │ │ │ │ │ +std::list cocircular; │ │ │ │ │ +00070 }; │ │ │ │ │ +00071 │ │ │ │ │ +00073 bool ve_less(CSphvicinity_elm *ve1, CSphvicinity_elm *ve2); │ │ │ │ │ +00074 │ │ │ │ │ +00075 │ │ │ │ │ +00083 class CSphvicinity{ │ │ │ │ │ +00084 public: │ │ │ │ │ +00086 │ │ │ │ │ +CSphvicinity(); │ │ │ │ │ +00087 │ │ │ │ │ +00089 │ │ │ │ │ +CSphvicinity(std::vector &_particle_list); │ │ │ │ │ +00090 │ │ │ │ │ +00092 │ │ │ │ │ +~CSphvicinity(); │ │ │ │ │ +00093 │ │ │ │ │ +00098 │ │ │ │ │ +void set_particle_list(std::vector &_particle_list); │ │ │ │ │ +00099 │ │ │ │ │ +00105 │ │ │ │ │ +void build(CSphmomentum *_parent, double _VR); │ │ │ │ │ +00106 │ │ │ │ │ +00107 │ │ │ │ │ +// cone kinematical information │ │ │ │ │ +00108 │ │ │ │ │ +CSphmomentum *parent; │ │ │ │ │ +00109 │ │ │ │ │ +double VR; │ │ │ │ │ +00110 │ │ │ │ │ +double VR2; │ │ │ │ │ +00111 │ │ │ │ │ +double cosVR; │ │ │ │ │ +00112 │ │ │ │ │ +double R; │ │ │ │ │ +00113 │ │ │ │ │ +double R2; │ │ │ │ │ +00114 │ │ │ │ │ +double tan2R; │ │ │ │ │ +00115 │ │ │ │ │ +double D2_R; │ │ │ │ │ +00116 │ │ │ │ │ +double inv_R_EPS_COCIRC; │ │ │ │ │ +00117 │ │ │ │ │ +double inv_R_2EPS_COCIRC; │ │ │ │ │ +00118 │ │ │ │ │ +00119 │ │ │ │ │ +// particle list information │ │ │ │ │ +00120 │ │ │ │ │ +int n_part; │ │ │ │ │ +00121 │ │ │ │ │ +std::vector plist; │ │ │ │ │ +00123 │ │ │ │ │ +std::vector pincluded; │ │ │ │ │ +00124 │ │ │ │ │ +CSphvicinity_elm *ve_list; │ │ │ │ │ +00125 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ +00126 │ │ │ │ │ +siscone::Cquadtree *quadtree; │ │ │ │ │ +00127 #endif │ │ │ │ │ +00128 │ │ │ │ │ +00129 │ │ │ │ │ +// vicinity information │ │ │ │ │ +00130 │ │ │ │ │ +std::vector vicinity; │ │ │ │ │ +00131 │ │ │ │ │ +unsigned int vicinity_size; │ │ │ │ │ +00132 │ │ │ │ │ +00133 protected: │ │ │ │ │ +00139 │ │ │ │ │ +void append_to_vicinity(CSphmomentum *v); │ │ │ │ │ +00140 │ │ │ │ │ +00141 │ │ │ │ │ +// internal variables │ │ │ │ │ +00142 │ │ │ │ │ +CSph3vector parent_centre; │ │ │ │ │ +00143 │ │ │ │ │ +CSph3vector angular_dir1; │ │ │ │ │ +00144 │ │ │ │ │ +CSph3vector angular_dir2; │ │ │ │ │ +00145 }; │ │ │ │ │ +00146 │ │ │ │ │ +00147 } │ │ │ │ │ +00148 │ │ │ │ │ +00149 #endif │ │ │ │ │ + │ │ │ │ │ +5.48 │ │ │ │ │ + │ │ │ │ │ +vicinity.h │ │ │ │ │ + │ │ │ │ │ +00001 // -*- C++ -*00003 // File: vicinity.h │ │ │ │ │ +00004 // Description: header file for particle vicinity (Cvicinity class) │ │ │ │ │ +00005 // This file is part of the SISCone project. │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.48 vicinity.h │ │ │ │ │ + │ │ │ │ │ +00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ +// │ │ │ │ │ +00007 // │ │ │ │ │ +// │ │ │ │ │ +00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ +// │ │ │ │ │ +00009 // │ │ │ │ │ +// │ │ │ │ │ +00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ +// │ │ │ │ │ +00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ +// │ │ │ │ │ +00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ +// │ │ │ │ │ +00013 // (at your option) any later version. │ │ │ │ │ +// │ │ │ │ │ +00014 // │ │ │ │ │ +// │ │ │ │ │ +00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ +// │ │ │ │ │ +00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ +// │ │ │ │ │ +00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ +// │ │ │ │ │ +00018 // GNU General Public License for more details. │ │ │ │ │ +// │ │ │ │ │ +00019 // │ │ │ │ │ +// │ │ │ │ │ +00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ +// │ │ │ │ │ +00021 // along with this program; if not, write to the Free Software │ │ │ │ │ +// │ │ │ │ │ +00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ +00023 // │ │ │ │ │ +// │ │ │ │ │ +00024 // $Revision:: 123 │ │ │ │ │ +$// │ │ │ │ │ +00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ +$// │ │ │ │ │ +00027 │ │ │ │ │ +00028 #ifndef __VICINITY_H__ │ │ │ │ │ +00029 #define __VICINITY_H__ │ │ │ │ │ +00030 │ │ │ │ │ +00031 #include │ │ │ │ │ +00032 #include │ │ │ │ │ +00033 #include "momentum.h" │ │ │ │ │ +00034 #include "defines.h" │ │ │ │ │ +00035 #include "quadtree.h" │ │ │ │ │ +00036 │ │ │ │ │ +00037 namespace siscone{ │ │ │ │ │ +00038 │ │ │ │ │ +00039 │ │ │ │ │ +00040 │ │ │ │ │ +00046 class Cvicinity_inclusion { │ │ │ │ │ +00047 public: │ │ │ │ │ +00049 │ │ │ │ │ +Cvicinity_inclusion() : cone(false), cocirc(false) {} │ │ │ │ │ +00050 │ │ │ │ │ +00051 │ │ │ │ │ +bool cone; │ │ │ │ │ +00052 │ │ │ │ │ +bool cocirc; │ │ │ │ │ +00053 }; │ │ │ │ │ +00054 │ │ │ │ │ +00055 │ │ │ │ │ +00063 class Cvicinity_elm{ │ │ │ │ │ +00064 public: │ │ │ │ │ +00066 │ │ │ │ │ +Cmomentum *v; │ │ │ │ │ +00067 │ │ │ │ │ +00069 │ │ │ │ │ +Cvicinity_inclusion *is_inside; │ │ │ │ │ +00070 │ │ │ │ │ +00071 │ │ │ │ │ +// centre variables │ │ │ │ │ +00072 │ │ │ │ │ +double eta; │ │ │ │ │ +00073 │ │ │ │ │ +double phi; │ │ │ │ │ +00074 │ │ │ │ │ +double angle; │ │ │ │ │ +00075 │ │ │ │ │ +bool side; │ │ │ │ │ +00076 │ │ │ │ │ +double cocircular_range; │ │ │ │ │ +00078 │ │ │ │ │ +00081 │ │ │ │ │ +std::list cocircular; │ │ │ │ │ +00082 }; │ │ │ │ │ +00083 │ │ │ │ │ +00085 bool ve_less(Cvicinity_elm *ve1, Cvicinity_elm *ve2); │ │ │ │ │ +00086 │ │ │ │ │ +00087 │ │ │ │ │ +00095 class Cvicinity{ │ │ │ │ │ +00096 public: │ │ │ │ │ +00098 │ │ │ │ │ +Cvicinity(); │ │ │ │ │ +00099 │ │ │ │ │ +00101 │ │ │ │ │ +Cvicinity(std::vector &_particle_list); │ │ │ │ │ +00102 │ │ │ │ │ +00104 │ │ │ │ │ +~Cvicinity(); │ │ │ │ │ +00105 │ │ │ │ │ +00110 │ │ │ │ │ +void set_particle_list(std::vector &_particle_list); │ │ │ │ │ +00111 │ │ │ │ │ +00117 │ │ │ │ │ +void build(Cmomentum *_parent, double _VR); │ │ │ │ │ +00118 │ │ │ │ │ +00119 │ │ │ │ │ +// cone kinematical information │ │ │ │ │ +00120 │ │ │ │ │ +Cmomentum *parent; │ │ │ │ │ +00121 │ │ │ │ │ +double VR; │ │ │ │ │ +00122 │ │ │ │ │ +double VR2; │ │ │ │ │ +00123 │ │ │ │ │ +double R; │ │ │ │ │ +00124 │ │ │ │ │ +double R2; │ │ │ │ │ +00125 │ │ │ │ │ +double inv_R_EPS_COCIRC; │ │ │ │ │ +00126 │ │ │ │ │ +double inv_R_2EPS_COCIRC; │ │ │ │ │ +00127 │ │ │ │ │ +00128 │ │ │ │ │ +// particle list information │ │ │ │ │ +00129 │ │ │ │ │ +int n_part; │ │ │ │ │ +00130 │ │ │ │ │ +std::vector plist; │ │ │ │ │ +00131 │ │ │ │ │ +std::vector pincluded; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +275 │ │ │ │ │ + │ │ │ │ │ + 276 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ +00132 │ │ │ │ │ +Cvicinity_elm *ve_list; │ │ │ │ │ +00133 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ +00134 │ │ │ │ │ +Cquadtree *quadtree; │ │ │ │ │ +00135 #endif │ │ │ │ │ +00136 │ │ │ │ │ +00137 │ │ │ │ │ +// vicinity information │ │ │ │ │ +00138 │ │ │ │ │ +std::vector vicinity; │ │ │ │ │ +00139 │ │ │ │ │ +unsigned int vicinity_size; │ │ │ │ │ +00140 │ │ │ │ │ +00141 protected: │ │ │ │ │ +00147 │ │ │ │ │ +void append_to_vicinity(Cmomentum *v); │ │ │ │ │ +00148 │ │ │ │ │ +00149 │ │ │ │ │ +// internal variables │ │ │ │ │ +00150 │ │ │ │ │ +double pcx; │ │ │ │ │ +00151 │ │ │ │ │ +double pcy; │ │ │ │ │ +00152 }; │ │ │ │ │ +00153 │ │ │ │ │ +00154 } │ │ │ │ │ +00155 │ │ │ │ │ +00156 #endif │ │ │ │ │ + │ │ │ │ │ +5.49 │ │ │ │ │ + │ │ │ │ │ split_merge.cpp │ │ │ │ │ │ │ │ │ │ 00001 │ │ │ │ │ 00002 // File: split_merge.cpp │ │ │ │ │ // │ │ │ │ │ 00003 // Description: source file for splitting/merging (contains the CJet class) // │ │ │ │ │ 00004 // This file is part of the SISCone project. │ │ │ │ │ @@ -24861,19 +25931,14 @@ │ │ │ │ │ 00036 #include │ │ │ │ │ 00037 #include │ │ │ │ │ 00038 │ │ │ │ │ 00039 namespace siscone_spherical{ │ │ │ │ │ 00040 │ │ │ │ │ 00041 using namespace std; │ │ │ │ │ 00042 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.45 split_merge.cpp │ │ │ │ │ - │ │ │ │ │ 00043 /******************************************************** │ │ │ │ │ 00044 * class CSphjet implementation │ │ │ │ │ * │ │ │ │ │ 00045 * real Jet information. │ │ │ │ │ * │ │ │ │ │ 00046 * This class contains information for one single jet. * │ │ │ │ │ 00047 * That is, first, its momentum carrying information │ │ │ │ │ @@ -24895,14 +25960,19 @@ │ │ │ │ │ sm_var2 = 0.0; │ │ │ │ │ 00058 │ │ │ │ │ pass = CJET_INEXISTENT_PASS; // initialised to a value that should │ │ │ │ │ 00059 │ │ │ │ │ // notappear in the end (after clustering) │ │ │ │ │ 00060 } │ │ │ │ │ 00061 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.49 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ 00062 // default dtor │ │ │ │ │ 00063 //-------------00064 CSphjet::~CSphjet(){ │ │ │ │ │ 00065 │ │ │ │ │ 00066 } │ │ │ │ │ 00067 │ │ │ │ │ 00068 // ordering of jets in E (e.g. used in final jets ordering) │ │ │ │ │ 00069 //---------------------------------------------------------00070 bool jets_E_less(const CSphjet &j1, const CSphjet &j2){ │ │ │ │ │ @@ -24987,23 +26057,14 @@ │ │ │ │ │ // depending on the choice of ordering variable, set the result │ │ │ │ │ 00127 │ │ │ │ │ switch (split_merge_scale){ │ │ │ │ │ 00128 │ │ │ │ │ case SM_Etilde: │ │ │ │ │ 00129 │ │ │ │ │ qdiff = E_tilde_sum*E_tilde_difference; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -269 │ │ │ │ │ - │ │ │ │ │ - 270 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00130 │ │ │ │ │ break; │ │ │ │ │ 00131 │ │ │ │ │ case SM_E: │ │ │ │ │ 00132 │ │ │ │ │ qdiff = sum.E*difference.E; │ │ │ │ │ 00133 │ │ │ │ │ @@ -25028,14 +26089,23 @@ │ │ │ │ │ 00144 │ │ │ │ │ 00145 │ │ │ │ │ 00148 std::string split_merge_scale_name(Esplit_merge_scale sms) { │ │ │ │ │ 00149 │ │ │ │ │ switch(sms) { │ │ │ │ │ 00150 │ │ │ │ │ case SM_E: │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +277 │ │ │ │ │ + │ │ │ │ │ + 278 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00151 │ │ │ │ │ return "E (IR unsafe for pairs of identical decayed heavy particles)"; │ │ │ │ │ 00152 │ │ │ │ │ case SM_Etilde: │ │ │ │ │ 00153 │ │ │ │ │ return "Etilde (sum of E.[1+sin^2(theta_{i,jet})])"; │ │ │ │ │ 00154 │ │ │ │ │ @@ -25151,19 +26221,14 @@ │ │ │ │ │ while (i2 < j2.n) { │ │ │ │ │ 00215 │ │ │ │ │ const CSphmomentum &p = (*particles)[j2.contents[i2]]; │ │ │ │ │ 00216 │ │ │ │ │ (*v) -= p; │ │ │ │ │ 00217 │ │ │ │ │ (*E_tilde) -= p.E*norm2_cross_product3(p,jet2_axis)/(*particles_norm2)[j2.contents[i2]]; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.45 split_merge.cpp │ │ │ │ │ - │ │ │ │ │ 00218 │ │ │ │ │ i2++; │ │ │ │ │ 00219 │ │ │ │ │ } │ │ │ │ │ 00220 │ │ │ │ │ 00221 │ │ │ │ │ // add the direct energy contribution to Etilde │ │ │ │ │ @@ -25182,14 +26247,19 @@ │ │ │ │ │ 00231 //-------------00232 CSphsplit_merge::CSphsplit_merge(){ │ │ │ │ │ 00233 │ │ │ │ │ merge_identical_protocones = false; │ │ │ │ │ 00234 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES │ │ │ │ │ 00235 #ifdef MERGE_IDENTICAL_PROTOCONES_DEFAULT_TRUE │ │ │ │ │ 00236 │ │ │ │ │ merge_identical_protocones = true; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.49 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ 00237 #endif │ │ │ │ │ 00238 #endif │ │ │ │ │ 00239 │ │ │ │ │ _user_scale = NULL; │ │ │ │ │ 00240 │ │ │ │ │ indices = NULL; │ │ │ │ │ 00241 │ │ │ │ │ @@ -25281,23 +26351,14 @@ │ │ │ │ │ // set up the list of particles left. │ │ │ │ │ 00300 │ │ │ │ │ init_pleft(); │ │ │ │ │ 00301 │ │ │ │ │ 00302 │ │ │ │ │ indices = new int[n]; │ │ │ │ │ 00303 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -271 │ │ │ │ │ - │ │ │ │ │ - 272 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00304 │ │ │ │ │ return 0; │ │ │ │ │ 00305 } │ │ │ │ │ 00306 │ │ │ │ │ 00307 │ │ │ │ │ 00308 // build initial list of remaining particles │ │ │ │ │ 00309 //-----------------------------------------00310 int CSphsplit_merge::init_pleft(){ │ │ │ │ │ @@ -25320,14 +26381,23 @@ │ │ │ │ │ 00319 │ │ │ │ │ 00320 │ │ │ │ │ // copy particles removing the ones with infinite rapidity │ │ │ │ │ 00321 │ │ │ │ │ j=0; │ │ │ │ │ 00322 │ │ │ │ │ p_remain.clear(); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +279 │ │ │ │ │ + │ │ │ │ │ + 280 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00323 │ │ │ │ │ for (i=0;iM_PI) dphi = twopi-dphi; │ │ │ │ │ 00434 │ │ │ │ │ @@ -25584,21 +26656,14 @@ │ │ │ │ │ 00473 │ │ │ │ │ double R = sqrt(R2); │ │ │ │ │ 00474 │ │ │ │ │ tan2R = tan(R); │ │ │ │ │ 00475 │ │ │ │ │ tan2R *= tan2R; │ │ │ │ │ 00476 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 274 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00477 #ifdef DEBUG_SPLIT_MERGE │ │ │ │ │ 00478 │ │ │ │ │ cout « "particle list: "; │ │ │ │ │ 00479 │ │ │ │ │ for (int i2=0;i2 *protocones, double R2, │ │ │ │ │ double Emin){ │ │ │ │ │ 00581 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.49 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ +283 │ │ │ │ │ + │ │ │ │ │ 00582 │ │ │ │ │ int i; │ │ │ │ │ 00583 │ │ │ │ │ CSphmomentum *c; │ │ │ │ │ 00584 │ │ │ │ │ CSphmomentum *v; │ │ │ │ │ 00585 │ │ │ │ │ @@ -25900,21 +26972,14 @@ │ │ │ │ │ (_user_scale ? _user_scale->is_larger(jet_candidate, jet) │ │ │ │ │ 00647 │ │ │ │ │ : ptcomparison(jet_candidate, jet))){ │ │ │ │ │ 00648 │ │ │ │ │ jet = jet_candidate; │ │ │ │ │ 00649 │ │ │ │ │ found_jet = true; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 276 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00650 │ │ │ │ │ } │ │ │ │ │ 00651 │ │ │ │ │ } │ │ │ │ │ 00652 │ │ │ │ │ 00653 │ │ │ │ │ // make sure at least one of the jets has passed the selection │ │ │ │ │ @@ -25939,14 +27004,21 @@ │ │ │ │ │ // update the list of what particles are left │ │ │ │ │ 00666 │ │ │ │ │ int p_remain_index = 0; │ │ │ │ │ 00667 │ │ │ │ │ int contents_index = 0; │ │ │ │ │ 00668 │ │ │ │ │ //sort(next_jet.contents.begin(),next_jet.contents.end()); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 284 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00669 │ │ │ │ │ for (int index=0;indexend()){ │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.49 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ 00756 #ifdef DEBUG_SPLIT_MERGE │ │ │ │ │ 00757 │ │ │ │ │ if (j2_relindex==1) show(); │ │ │ │ │ 00758 │ │ │ │ │ cout « "check overlap between cdt 1 and cdt " « j2_relindex+1 « " with overlap " « endl; │ │ │ │ │ 00759 #endif │ │ │ │ │ 00760 │ │ │ │ │ @@ -26210,23 +27282,14 @@ │ │ │ │ │ 00819 │ │ │ │ │ sort(jets.begin(), jets.end(), jets_E_less); │ │ │ │ │ 00820 #ifdef DEBUG_SPLIT_MERGE │ │ │ │ │ 00821 │ │ │ │ │ show(); │ │ │ │ │ 00822 #endif │ │ │ │ │ 00823 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -277 │ │ │ │ │ - │ │ │ │ │ - 278 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00824 │ │ │ │ │ return jets.size(); │ │ │ │ │ 00825 } │ │ │ │ │ 00826 │ │ │ │ │ 00827 │ │ │ │ │ 00828 │ │ │ │ │ 00829 // save the event on disk │ │ │ │ │ @@ -26248,14 +27311,23 @@ │ │ │ │ │ for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){ │ │ │ │ │ 00840 │ │ │ │ │ j1 = &(*it_j); │ │ │ │ │ 00841 │ │ │ │ │ fprintf(flux, "%e\t%e\t%e\t%e\t%d\n", │ │ │ │ │ 00842 │ │ │ │ │ j1->v.px, j1->v.py, j1->v.pz, j1->v.E, j1->n); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +285 │ │ │ │ │ + │ │ │ │ │ + 286 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00843 │ │ │ │ │ } │ │ │ │ │ 00844 │ │ │ │ │ 00845 │ │ │ │ │ fprintf(flux, "# jet contents\n"); │ │ │ │ │ 00846 │ │ │ │ │ fprintf(flux, "# columns are: px, py, pz, E, particle index and jet number\n"); │ │ │ │ │ @@ -26364,19 +27436,14 @@ │ │ │ │ │ 00906 │ │ │ │ │ 00907 │ │ │ │ │ 00908 // get the overlap between 2 jets │ │ │ │ │ 00909 // - j1 │ │ │ │ │ first jet │ │ │ │ │ 00910 // - j2 │ │ │ │ │ second jet │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.45 split_merge.cpp │ │ │ │ │ - │ │ │ │ │ 00911 // - overlap2 returned overlap^2 (determined by the choice of SM variable) │ │ │ │ │ 00912 // return true if overlapping, false if disjoint │ │ │ │ │ 00913 //--------------------------------------------------------------------00914 bool CSphsplit_merge::get_overlap(const CSphjet &j1, const CSphjet &j2, double *overlap2){ │ │ │ │ │ 00915 │ │ │ │ │ // check if ranges overlap │ │ │ │ │ 00916 │ │ │ │ │ if (!is_range_overlap(j1.range,j2.range)) │ │ │ │ │ @@ -26399,14 +27466,19 @@ │ │ │ │ │ 00926 │ │ │ │ │ 00927 │ │ │ │ │ // compute overlap │ │ │ │ │ 00928 │ │ │ │ │ // at the same time, we store union in indices │ │ │ │ │ 00929 │ │ │ │ │ do{ │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.49 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ 00930 │ │ │ │ │ if (j1.contents[i1]_theta,v->_phi); │ │ │ │ │ 01019 │ │ │ │ │ } else { // (j1.contents[i1]==j2.contents[i2]) │ │ │ │ │ 01020 │ │ │ │ │ // common particle, decide which is the closest centre │ │ │ │ │ 01021 │ │ │ │ │ @@ -26689,19 +27761,14 @@ │ │ │ │ │ 01082 │ │ │ │ │ cand_refs.erase(j2.v.ref); │ │ │ │ │ 01083 #endif │ │ │ │ │ 01084 │ │ │ │ │ candidates->erase(it_j1); │ │ │ │ │ 01085 │ │ │ │ │ candidates->erase(it_j2); │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.45 split_merge.cpp │ │ │ │ │ - │ │ │ │ │ 01086 │ │ │ │ │ 01087 │ │ │ │ │ // reinsert new ones │ │ │ │ │ 01088 │ │ │ │ │ insert(jet1); │ │ │ │ │ 01089 │ │ │ │ │ insert(jet2); │ │ │ │ │ @@ -26720,14 +27787,21 @@ │ │ │ │ │ 01102 │ │ │ │ │ CSphjet jet; │ │ │ │ │ 01103 │ │ │ │ │ int i; │ │ │ │ │ 01104 │ │ │ │ │ 01105 │ │ │ │ │ // build new jet │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.49 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ +289 │ │ │ │ │ + │ │ │ │ │ 01106 │ │ │ │ │ // note: particles within j1 & j2 have already been stored in indices │ │ │ │ │ 01107 │ │ │ │ │ for (i=0;i j2.v.perp2(); │ │ │ │ │ 00070 } │ │ │ │ │ 00071 │ │ │ │ │ 00072 │ │ │ │ │ @@ -26996,14 +28062,19 @@ │ │ │ │ │ 00080 // depending on ’split_merge_scale’ choice │ │ │ │ │ 00081 // │ │ │ │ │ 00082 // with EPSILON_SPLITMERGE defined, this attempts to identify │ │ │ │ │ 00083 // delicate cases where two jets have identical momenta except for │ │ │ │ │ 00084 // softish particles -- the difference of pt’s may not be correctly │ │ │ │ │ 00085 // identified normally and so lead to problems for the fate of the │ │ │ │ │ 00086 // softish particle. │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.50 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ 00087 // │ │ │ │ │ 00088 // NB: there is a potential issue in momentum-conserving events, │ │ │ │ │ 00089 // whereby the harder of two jets becomes ill-defined when a soft │ │ │ │ │ 00090 // particle is emitted --- this may have a knock-on effect on │ │ │ │ │ 00091 // subsequent split-merge steps in cases with sufficiently large R │ │ │ │ │ 00092 // (but we don’t know what the limit is...) │ │ │ │ │ 00093 //-----------------------------------------------------------------00094 bool Csplit_merge_ptcomparison::operator ()(const Cjet &jet1, const Cjet &jet2) const{ │ │ │ │ │ @@ -27110,23 +28181,14 @@ │ │ │ │ │ } │ │ │ │ │ 00148 #endif // EPSILON_SPLITMERGE │ │ │ │ │ 00149 │ │ │ │ │ 00150 │ │ │ │ │ return res; │ │ │ │ │ 00151 } │ │ │ │ │ 00152 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -283 │ │ │ │ │ - │ │ │ │ │ - 284 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00153 │ │ │ │ │ 00156 std::string split_merge_scale_name(Esplit_merge_scale sms) { │ │ │ │ │ 00157 │ │ │ │ │ switch(sms) { │ │ │ │ │ 00158 │ │ │ │ │ case SM_pt: │ │ │ │ │ 00159 │ │ │ │ │ @@ -27155,14 +28217,23 @@ │ │ │ │ │ 00172 // get the difference between 2 jets │ │ │ │ │ 00173 // - j1 │ │ │ │ │ first jet │ │ │ │ │ 00174 // - j2 │ │ │ │ │ second jet │ │ │ │ │ 00175 // - v │ │ │ │ │ jet1-jet2 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +291 │ │ │ │ │ + │ │ │ │ │ + 292 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00176 // - pt_tilde │ │ │ │ │ jet1-jet2 pt_tilde │ │ │ │ │ 00177 // return true if overlapping, false if disjoint │ │ │ │ │ 00178 //----------------------------------------------00179 void Csplit_merge_ptcomparison::get_difference(const Cjet &j1, const Cjet &j2, Cmomentum *v, double │ │ │ │ │ *pt_tilde) const { │ │ │ │ │ 00180 │ │ │ │ │ int i1,i2; │ │ │ │ │ @@ -27264,21 +28335,14 @@ │ │ │ │ │ 00237 │ │ │ │ │ ptcomparison.particles = &particles; │ │ │ │ │ 00238 │ │ │ │ │ ptcomparison.pt = &pt; │ │ │ │ │ 00239 │ │ │ │ │ candidates.reset(new multiset(ptcomparison)); │ │ │ │ │ 00240 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.46 split_merge.cpp │ │ │ │ │ - │ │ │ │ │ -285 │ │ │ │ │ - │ │ │ │ │ 00241 │ │ │ │ │ // no hardest cut (col-unsafe) │ │ │ │ │ 00242 │ │ │ │ │ SM_var2_hardest_cut_off = -numeric_limits::max(); │ │ │ │ │ 00243 │ │ │ │ │ 00244 │ │ │ │ │ // no pt cutoff for the particles to put in p_uncol_hard │ │ │ │ │ @@ -27298,14 +28362,21 @@ │ │ │ │ │ full_clear(); │ │ │ │ │ 00256 } │ │ │ │ │ 00257 │ │ │ │ │ 00258 │ │ │ │ │ 00259 // initialisation function │ │ │ │ │ 00260 // - _particles list of particles │ │ │ │ │ 00261 // - protocones list of protocones (initial jet candidates) │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.50 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ +293 │ │ │ │ │ + │ │ │ │ │ 00262 // - R2 │ │ │ │ │ cone radius (squared) │ │ │ │ │ 00263 // - ptmin │ │ │ │ │ minimal pT allowed for jets │ │ │ │ │ 00264 //------------------------------------------------------------00265 int Csplit_merge::init(vector & /*_particles*/, vector *protocones, double R2, │ │ │ │ │ double ptmin){ │ │ │ │ │ 00266 │ │ │ │ │ @@ -27403,21 +28474,14 @@ │ │ │ │ │ // check if rapidity is not infinite or ill-defined │ │ │ │ │ 00324 │ │ │ │ │ if (fabs(particles[i].pz) < (particles[i].E)){ │ │ │ │ │ 00325 │ │ │ │ │ p_remain.push_back(particles[i]); │ │ │ │ │ 00326 │ │ │ │ │ // set up parent index for tracability │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 286 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00327 │ │ │ │ │ p_remain[j].parent_index = i; │ │ │ │ │ 00328 │ │ │ │ │ // left particles are marked with a 1 │ │ │ │ │ 00329 │ │ │ │ │ // IMPORTANT NOTE: the meaning of index in p_remain is │ │ │ │ │ 00330 │ │ │ │ │ @@ -27454,14 +28518,21 @@ │ │ │ │ │ } │ │ │ │ │ 00345 │ │ │ │ │ } │ │ │ │ │ 00346 │ │ │ │ │ n_left = p_remain.size(); │ │ │ │ │ 00347 │ │ │ │ │ n_pass = 0; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 294 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00348 │ │ │ │ │ 00349 │ │ │ │ │ Ceta_phi_range epr; │ │ │ │ │ 00350 │ │ │ │ │ epr.eta_min = eta_min-0.01; │ │ │ │ │ 00351 │ │ │ │ │ epr.eta_max = eta_max+0.01; │ │ │ │ │ @@ -27547,21 +28618,14 @@ │ │ │ │ │ bool collinear; │ │ │ │ │ 00410 │ │ │ │ │ double dphi; │ │ │ │ │ 00411 │ │ │ │ │ 00412 │ │ │ │ │ p_uncol_hard.clear(); │ │ │ │ │ 00413 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.46 split_merge.cpp │ │ │ │ │ - │ │ │ │ │ -287 │ │ │ │ │ - │ │ │ │ │ 00414 │ │ │ │ │ // we first sort the particles according to their rapidity │ │ │ │ │ 00415 │ │ │ │ │ for (i=0;iM_PI) dphi = twopi-dphi; │ │ │ │ │ 00437 │ │ │ │ │ if (dphiM_PI) │ │ │ │ │ 00498 │ │ │ │ │ dy -= twopi; │ │ │ │ │ 00499 │ │ │ │ │ if (dx*dx+dy*dyparent_index); │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 288 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00501 │ │ │ │ │ jet.v+= *v; │ │ │ │ │ 00502 │ │ │ │ │ jet.pt_tilde+= pt[v->parent_index]; │ │ │ │ │ 00503 │ │ │ │ │ v->index=0; │ │ │ │ │ 00504 │ │ │ │ │ @@ -27757,14 +28819,23 @@ │ │ │ │ │ cout « "adding jet: "; │ │ │ │ │ 00519 │ │ │ │ │ for (int i2=0;i2::iterator p_it = protocones->begin();p_it != protocones->end();p_it++){ │ │ │ │ │ @@ -27905,14 +28971,19 @@ │ │ │ │ │ jet_candidate.contents.clear(); │ │ │ │ │ 00605 │ │ │ │ │ for (i=0;ipz)!=v->E){ │ │ │ │ │ 00610 │ │ │ │ │ dx = eta - v->eta; │ │ │ │ │ 00611 │ │ │ │ │ @@ -28026,23 +29097,14 @@ │ │ │ │ │ for (int index=0;indexbegin(); │ │ │ │ │ 00780 │ │ │ │ │ j2_relindex = 0; │ │ │ │ │ 00781 │ │ │ │ │ } │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.50 split_merge.cpp │ │ │ │ │ + │ │ │ │ │ 00782 │ │ │ │ │ } │ │ │ │ │ 00783 │ │ │ │ │ // watch out: split/merge might have caused new jets with pt < │ │ │ │ │ 00784 │ │ │ │ │ // ptmin to disappear, so the total number of jets may │ │ │ │ │ 00785 │ │ │ │ │ @@ -28338,23 +29409,14 @@ │ │ │ │ │ for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){ │ │ │ │ │ 00846 │ │ │ │ │ j1 = &(*it_j); │ │ │ │ │ 00847 │ │ │ │ │ for (i2=0;i2n;i2++) │ │ │ │ │ 00848 │ │ │ │ │ fprintf(flux, "%f\t%f\t%e\t%d\t%d\n", │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -291 │ │ │ │ │ - │ │ │ │ │ - 292 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00849 │ │ │ │ │ particles[j1->contents[i2]].eta, particles[j1->contents[i2]].phi, │ │ │ │ │ 00850 │ │ │ │ │ particles[j1->contents[i2]].perp(), j1->contents[i2], i1); │ │ │ │ │ 00851 │ │ │ │ │ } │ │ │ │ │ 00852 │ │ │ │ │ @@ -28380,14 +29442,23 @@ │ │ │ │ │ for (it_j = jets.begin(), i1=0 ; it_j != jets.end() ; it_j++, i1++){ │ │ │ │ │ 00867 │ │ │ │ │ j = &(*it_j); │ │ │ │ │ 00868 │ │ │ │ │ fprintf(stdout, "jet %2d: %e\t%e\t%e\t%e\t", i1+1, │ │ │ │ │ 00869 │ │ │ │ │ j->v.px, j->v.py, j->v.pz, j->v.E); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +299 │ │ │ │ │ + │ │ │ │ │ + 300 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00870 │ │ │ │ │ for (i2=0;i2n;i2++) │ │ │ │ │ 00871 │ │ │ │ │ fprintf(stdout, "%d ", j->contents[i2]); │ │ │ │ │ 00872 │ │ │ │ │ fprintf(stdout, "\n"); │ │ │ │ │ 00873 │ │ │ │ │ @@ -28497,19 +29568,14 @@ │ │ │ │ │ while (i1eta; │ │ │ │ │ 01021 │ │ │ │ │ dy1 = fabs(phi1 - v->phi); │ │ │ │ │ 01022 │ │ │ │ │ if (dy1>M_PI) │ │ │ │ │ 01023 │ │ │ │ │ dy1 -= twopi; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -293 │ │ │ │ │ - │ │ │ │ │ - 294 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 01024 │ │ │ │ │ 01025 │ │ │ │ │ // distance w.r.t. centroid 2 │ │ │ │ │ 01026 │ │ │ │ │ dx2 = eta2 - v->eta; │ │ │ │ │ 01027 │ │ │ │ │ dy2 = fabs(phi2 - v->phi); │ │ │ │ │ @@ -28703,14 +29765,23 @@ │ │ │ │ │ if (d1sqeta,v->phi); │ │ │ │ │ 01047 │ │ │ │ │ } else { │ │ │ │ │ 01048 │ │ │ │ │ @@ -28816,21 +29887,14 @@ │ │ │ │ │ 01108 │ │ │ │ │ int i; │ │ │ │ │ 01109 │ │ │ │ │ 01110 │ │ │ │ │ // build new jet │ │ │ │ │ 01111 │ │ │ │ │ // note: particles within j1 & j2 have already been stored in indices │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.47 split_merge.h │ │ │ │ │ - │ │ │ │ │ -295 │ │ │ │ │ - │ │ │ │ │ 01112 │ │ │ │ │ for (i=0;ierase(it_j1); │ │ │ │ │ 01130 │ │ │ │ │ candidates->erase(it_j2); │ │ │ │ │ 01131 │ │ │ │ │ 01132 │ │ │ │ │ // reinsert new candidate │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.51 vicinity.cpp │ │ │ │ │ + │ │ │ │ │ +303 │ │ │ │ │ + │ │ │ │ │ 01133 │ │ │ │ │ insert(jet); │ │ │ │ │ 01134 │ │ │ │ │ 01135 │ │ │ │ │ return true; │ │ │ │ │ 01136 } │ │ │ │ │ 01137 │ │ │ │ │ @@ -28932,735 +30003,15 @@ │ │ │ │ │ 01182 │ │ │ │ │ 01183 │ │ │ │ │ //return 0.0; │ │ │ │ │ 01184 } │ │ │ │ │ 01185 │ │ │ │ │ 01186 } │ │ │ │ │ │ │ │ │ │ -5.47 │ │ │ │ │ - │ │ │ │ │ -split_merge.h │ │ │ │ │ - │ │ │ │ │ -00001 // -*- C++ -*00003 // File: split_merge.h │ │ │ │ │ -00004 // Description: header file for splitting/merging (contains the CJet class) │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -00006 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ -00007 // │ │ │ │ │ -an adaptation to spherical coordinates │ │ │ │ │ -00008 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -00009 // │ │ │ │ │ -00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ -00011 // │ │ │ │ │ -00012 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -00013 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -00014 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -00015 // (at your option) any later version. │ │ │ │ │ -00016 // │ │ │ │ │ -00017 // This program is distributed in the hope that it will be useful, │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ - 296 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00020 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00021 // │ │ │ │ │ -// │ │ │ │ │ -00022 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00023 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00025 // │ │ │ │ │ -// │ │ │ │ │ -00026 // $Revision:: 404 │ │ │ │ │ -$// │ │ │ │ │ -00027 // $Date:: 2016-05-22 12:14:42 +0200 (Sun, 22 May 2016) │ │ │ │ │ -$// │ │ │ │ │ -00029 │ │ │ │ │ -00030 #ifndef __SPH_SPLIT_MERGE_H__ │ │ │ │ │ -00031 #define __SPH_SPLIT_MERGE_H__ │ │ │ │ │ -00032 │ │ │ │ │ -00033 #include │ │ │ │ │ -00034 #include │ │ │ │ │ -00035 #include "geom_2d.h" │ │ │ │ │ -00036 #include "momentum.h" │ │ │ │ │ -00037 #include │ │ │ │ │ -00038 #include │ │ │ │ │ -00039 #include │ │ │ │ │ -00040 #include │ │ │ │ │ -00041 #include │ │ │ │ │ -00042 │ │ │ │ │ -00043 namespace siscone_spherical{ │ │ │ │ │ -00044 │ │ │ │ │ -00045 const int CJET_INEXISTENT_PASS = -2; │ │ │ │ │ -00046 │ │ │ │ │ -00056 class CSphjet{ │ │ │ │ │ -00057 public: │ │ │ │ │ -00059 │ │ │ │ │ -CSphjet(); │ │ │ │ │ -00060 │ │ │ │ │ -00062 │ │ │ │ │ -~CSphjet(); │ │ │ │ │ -00063 │ │ │ │ │ -00064 │ │ │ │ │ -CSphmomentum v; │ │ │ │ │ -00065 │ │ │ │ │ -double E_tilde; │ │ │ │ │ -00066 │ │ │ │ │ -int n; │ │ │ │ │ -00067 │ │ │ │ │ -std::vector contents; │ │ │ │ │ -00068 │ │ │ │ │ -00080 │ │ │ │ │ -double sm_var2; │ │ │ │ │ -00081 │ │ │ │ │ -00083 │ │ │ │ │ -CSphtheta_phi_range range; │ │ │ │ │ -00084 │ │ │ │ │ -00089 │ │ │ │ │ -int pass; │ │ │ │ │ -00090 }; │ │ │ │ │ -00091 │ │ │ │ │ -00094 │ │ │ │ │ -00096 bool jets_E_less(const CSphjet &j1, const CSphjet &j2); │ │ │ │ │ -00097 │ │ │ │ │ -00098 │ │ │ │ │ -00106 enum Esplit_merge_scale { │ │ │ │ │ -00107 │ │ │ │ │ -SM_E, │ │ │ │ │ -00108 │ │ │ │ │ -SM_Etilde │ │ │ │ │ -00109 }; │ │ │ │ │ -00110 │ │ │ │ │ -00112 std::string split_merge_scale_name(Esplit_merge_scale sms); │ │ │ │ │ -00113 │ │ │ │ │ -00119 class CSphsplit_merge_ptcomparison{ │ │ │ │ │ -00120 public: │ │ │ │ │ -00122 │ │ │ │ │ -CSphsplit_merge_ptcomparison() : │ │ │ │ │ -00123 │ │ │ │ │ -particles(0), split_merge_scale(SM_Etilde){}; │ │ │ │ │ -00124 │ │ │ │ │ -00126 │ │ │ │ │ -std::string SM_scale_name() const { │ │ │ │ │ -00127 │ │ │ │ │ -return split_merge_scale_name(split_merge_scale);} │ │ │ │ │ -00128 │ │ │ │ │ -00129 │ │ │ │ │ -std::vector * particles; │ │ │ │ │ -00130 │ │ │ │ │ -std::vector * particles_norm2; │ │ │ │ │ -00131 │ │ │ │ │ -00133 │ │ │ │ │ -bool operator()(const CSphjet &jet1, const CSphjet &jet2) const; │ │ │ │ │ -00134 │ │ │ │ │ -00146 │ │ │ │ │ -void get_difference(const CSphjet &j1, const CSphjet &j2, CSphmomentum *v, double *E_tilde) const; │ │ │ │ │ -00147 │ │ │ │ │ -00158 │ │ │ │ │ -Esplit_merge_scale split_merge_scale; │ │ │ │ │ -00159 }; │ │ │ │ │ -00160 │ │ │ │ │ -00161 │ │ │ │ │ -00162 // iterator types │ │ │ │ │ -00164 typedef std::multiset::iterator │ │ │ │ │ -cjet_iterator; │ │ │ │ │ -00165 │ │ │ │ │ -00167 typedef std::vector::iterator jet_iterator; │ │ │ │ │ -00168 │ │ │ │ │ -00169 │ │ │ │ │ -00170 │ │ │ │ │ -00175 class CSphsplit_merge{ │ │ │ │ │ -00176 public: │ │ │ │ │ -00178 │ │ │ │ │ -CSphsplit_merge(); │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.47 split_merge.h │ │ │ │ │ - │ │ │ │ │ -00179 │ │ │ │ │ -00181 │ │ │ │ │ -00182 │ │ │ │ │ -00183 │ │ │ │ │ -00185 │ │ │ │ │ -00187 │ │ │ │ │ -00196 │ │ │ │ │ -00197 │ │ │ │ │ -00203 │ │ │ │ │ -00204 │ │ │ │ │ -00208 │ │ │ │ │ -00209 │ │ │ │ │ -00221 │ │ │ │ │ -00222 │ │ │ │ │ -00223 │ │ │ │ │ -00224 │ │ │ │ │ -00225 │ │ │ │ │ -00227 │ │ │ │ │ -00229 │ │ │ │ │ -00231 │ │ │ │ │ -00232 │ │ │ │ │ -00234 │ │ │ │ │ -00235 │ │ │ │ │ -00237 │ │ │ │ │ -00239 │ │ │ │ │ -00245 │ │ │ │ │ -00246 │ │ │ │ │ -00248 │ │ │ │ │ -00249 │ │ │ │ │ -00254 │ │ │ │ │ -00255 │ │ │ │ │ -00266 │ │ │ │ │ -00267 │ │ │ │ │ -00268 │ │ │ │ │ -00269 │ │ │ │ │ -00270 │ │ │ │ │ -00275 │ │ │ │ │ -00276 │ │ │ │ │ -00277 │ │ │ │ │ -00278 │ │ │ │ │ -00280 │ │ │ │ │ -00281 │ │ │ │ │ -00282 │ │ │ │ │ -00284 │ │ │ │ │ -00286 │ │ │ │ │ -00296 │ │ │ │ │ -00297 │ │ │ │ │ -00305 │ │ │ │ │ -00306 │ │ │ │ │ -00317 │ │ │ │ │ -00318 │ │ │ │ │ -00328 │ │ │ │ │ -00329 │ │ │ │ │ -00330 │ │ │ │ │ -00332 │ │ │ │ │ -00334 │ │ │ │ │ -00337 │ │ │ │ │ -00338 │ │ │ │ │ -00340 │ │ │ │ │ -00341 │ │ │ │ │ -00342 │ │ │ │ │ -00343 │ │ │ │ │ -00344 │ │ │ │ │ -00345 │ │ │ │ │ -00346 │ │ │ │ │ -00347 │ │ │ │ │ -00348 │ │ │ │ │ -00349 │ │ │ │ │ -00350 │ │ │ │ │ -00354 │ │ │ │ │ -00355 │ │ │ │ │ -00356 │ │ │ │ │ -00357 │ │ │ │ │ -00358 │ │ │ │ │ -00359 │ │ │ │ │ -00360 │ │ │ │ │ -00361 │ │ │ │ │ -00362 │ │ │ │ │ -00371 │ │ │ │ │ -00372 │ │ │ │ │ -00374 │ │ │ │ │ -00375 │ │ │ │ │ -00382 │ │ │ │ │ -00383 │ │ │ │ │ -00391 │ │ │ │ │ - │ │ │ │ │ -297 │ │ │ │ │ - │ │ │ │ │ -~CSphsplit_merge(); │ │ │ │ │ - │ │ │ │ │ -// initialisation functions // │ │ │ │ │ -int init(std::vector &_particles, std::vector *protocones, double R2, │ │ │ │ │ -double Emin=0.0); │ │ │ │ │ -int init_particles(std::vector &_particles); │ │ │ │ │ -int init_pleft(); │ │ │ │ │ -inline int set_E_weighted_splitting(bool _use_E_weighted_splitting){ │ │ │ │ │ -use_E_weighted_splitting = _use_E_weighted_splitting; │ │ │ │ │ -return 0; │ │ │ │ │ -} │ │ │ │ │ -// cleaning functions // │ │ │ │ │ -int partial_clear(); │ │ │ │ │ -int full_clear(); │ │ │ │ │ -// user-defined stable-cone ordering // │ │ │ │ │ -class Cuser_scale_base{ │ │ │ │ │ -public: │ │ │ │ │ -virtual ~Cuser_scale_base(){} │ │ │ │ │ -virtual double operator()(const CSphjet & jet) const = 0; │ │ │ │ │ -virtual bool is_larger(const CSphjet & a, const CSphjet & b) const{ │ │ │ │ │ -return (a.sm_var2 > b.sm_var2); │ │ │ │ │ -} │ │ │ │ │ -}; │ │ │ │ │ -void set_user_scale(const Cuser_scale_base * user_scale_in){ │ │ │ │ │ -_user_scale = user_scale_in; │ │ │ │ │ -} │ │ │ │ │ -const Cuser_scale_base * user_scale() const { return _user_scale; } │ │ │ │ │ -// main parts of the algorithm // │ │ │ │ │ -int merge_collinear_and_remove_soft(); │ │ │ │ │ -int add_protocones(std::vector *protocones, double R2, double Emin=0.0); │ │ │ │ │ -int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double │ │ │ │ │ -Emin=0.0); │ │ │ │ │ -int perform(double overlap_tshold, double Emin=0.0); │ │ │ │ │ - │ │ │ │ │ -// save and debug functions // │ │ │ │ │ -int save_contents(FILE *flux); │ │ │ │ │ -int show(); │ │ │ │ │ -// particle information │ │ │ │ │ -int n; │ │ │ │ │ -std::vector particles; │ │ │ │ │ -std::vector particles_norm2; │ │ │ │ │ -int n_left; │ │ │ │ │ -std::vector p_remain; │ │ │ │ │ -std::vector p_uncol_hard; │ │ │ │ │ -int n_pass; │ │ │ │ │ -double most_ambiguous_split; │ │ │ │ │ -// jets information │ │ │ │ │ -std::vector jets; │ │ │ │ │ -// working entries │ │ │ │ │ -int *indices; │ │ │ │ │ -int idx_size; │ │ │ │ │ -bool merge_identical_protocones; │ │ │ │ │ -CSphsplit_merge_ptcomparison ptcomparison; │ │ │ │ │ -double SM_var2_hardest_cut_off; │ │ │ │ │ -double stable_cone_soft_E2_cutoff; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 298 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00392 │ │ │ │ │ -00393 private: │ │ │ │ │ -00401 │ │ │ │ │ -bool get_overlap(const CSphjet &j1, const CSphjet &j2, double *v); │ │ │ │ │ -00402 │ │ │ │ │ -00403 │ │ │ │ │ -00415 │ │ │ │ │ -bool split(cjet_iterator &it_j1, cjet_iterator &it_j2); │ │ │ │ │ -00416 │ │ │ │ │ -00425 │ │ │ │ │ -bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2); │ │ │ │ │ -00426 │ │ │ │ │ -00433 │ │ │ │ │ -bool insert(CSphjet &jet); │ │ │ │ │ -00434 │ │ │ │ │ -00441 │ │ │ │ │ -double get_sm_var2(CSphmomentum &v, double &E_tilde); │ │ │ │ │ -00442 │ │ │ │ │ -00444 │ │ │ │ │ -void compute_Etilde(CSphjet &j); │ │ │ │ │ -00445 │ │ │ │ │ -00446 │ │ │ │ │ -// jet information │ │ │ │ │ -00448 #ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR │ │ │ │ │ -00449 │ │ │ │ │ -std::unique_ptr > candidates; │ │ │ │ │ -00450 #else │ │ │ │ │ -00451 │ │ │ │ │ -std::auto_ptr > candidates; │ │ │ │ │ -00452 #endif │ │ │ │ │ -00453 │ │ │ │ │ -00455 │ │ │ │ │ -double E_min; │ │ │ │ │ -00456 │ │ │ │ │ -00462 │ │ │ │ │ -bool use_E_weighted_splitting; │ │ │ │ │ -00463 │ │ │ │ │ -00466 │ │ │ │ │ -const Cuser_scale_base *_user_scale; │ │ │ │ │ -00467 │ │ │ │ │ -00468 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES │ │ │ │ │ -00470 │ │ │ │ │ -std::set cand_refs; │ │ │ │ │ -00471 #endif │ │ │ │ │ -00472 }; │ │ │ │ │ -00473 │ │ │ │ │ -00474 } │ │ │ │ │ -00475 │ │ │ │ │ -00476 │ │ │ │ │ -00477 #endif │ │ │ │ │ - │ │ │ │ │ -5.48 │ │ │ │ │ - │ │ │ │ │ -split_merge.h │ │ │ │ │ - │ │ │ │ │ -00001 // -*- C++ -*00003 // File: split_merge.h │ │ │ │ │ -// │ │ │ │ │ -00004 // Description: header file for splitting/merging (contains the CJet class) // │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00007 // │ │ │ │ │ -// │ │ │ │ │ -00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00009 // │ │ │ │ │ -// │ │ │ │ │ -00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00013 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00014 // │ │ │ │ │ -// │ │ │ │ │ -00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00018 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00019 // │ │ │ │ │ -// │ │ │ │ │ -00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00021 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00023 // │ │ │ │ │ -// │ │ │ │ │ -00024 // $Revision:: 405 │ │ │ │ │ -$// │ │ │ │ │ -00025 // $Date:: 2016-05-23 20:15:02 +0200 (Mon, 23 May 2016) │ │ │ │ │ -$// │ │ │ │ │ -00027 │ │ │ │ │ -00028 #ifndef __SPLIT_MERGE_H__ │ │ │ │ │ -00029 #define __SPLIT_MERGE_H__ │ │ │ │ │ -00030 │ │ │ │ │ -00031 #include │ │ │ │ │ -00032 #include "defines.h" │ │ │ │ │ -00033 #include "geom_2d.h" │ │ │ │ │ -00034 #include "momentum.h" │ │ │ │ │ -00035 #include │ │ │ │ │ -00036 #include │ │ │ │ │ -00037 #include │ │ │ │ │ -00038 #include │ │ │ │ │ -00039 #include │ │ │ │ │ -00040 │ │ │ │ │ -00041 namespace siscone{ │ │ │ │ │ -00042 │ │ │ │ │ -00043 const int CJET_INEXISTENT_PASS = -2; │ │ │ │ │ -00044 │ │ │ │ │ -00054 class Cjet{ │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.48 split_merge.h │ │ │ │ │ - │ │ │ │ │ -299 │ │ │ │ │ - │ │ │ │ │ -00055 public: │ │ │ │ │ -00057 │ │ │ │ │ -Cjet(); │ │ │ │ │ -00058 │ │ │ │ │ -00060 │ │ │ │ │ -~Cjet(); │ │ │ │ │ -00061 │ │ │ │ │ -00062 │ │ │ │ │ -Cmomentum v; │ │ │ │ │ -00063 │ │ │ │ │ -double pt_tilde; │ │ │ │ │ -00064 │ │ │ │ │ -int n; │ │ │ │ │ -00065 │ │ │ │ │ -std::vector contents; │ │ │ │ │ -00066 │ │ │ │ │ -00073 │ │ │ │ │ -double sm_var2; │ │ │ │ │ -00074 │ │ │ │ │ -00076 │ │ │ │ │ -Ceta_phi_range range; │ │ │ │ │ -00077 │ │ │ │ │ -00082 │ │ │ │ │ -int pass; │ │ │ │ │ -00083 }; │ │ │ │ │ -00084 │ │ │ │ │ -00086 bool jets_pt_less(const Cjet &j1, const Cjet &j2); │ │ │ │ │ -00087 │ │ │ │ │ -00088 │ │ │ │ │ -00096 enum Esplit_merge_scale { │ │ │ │ │ -00097 │ │ │ │ │ -SM_pt, │ │ │ │ │ -00098 │ │ │ │ │ -SM_Et, │ │ │ │ │ -00100 │ │ │ │ │ -SM_mt, │ │ │ │ │ -00102 │ │ │ │ │ -SM_pttilde │ │ │ │ │ -00104 }; │ │ │ │ │ -00105 │ │ │ │ │ -00107 std::string split_merge_scale_name(Esplit_merge_scale sms); │ │ │ │ │ -00108 │ │ │ │ │ -00116 class Csplit_merge_ptcomparison{ │ │ │ │ │ -00117 public: │ │ │ │ │ -00119 │ │ │ │ │ -Csplit_merge_ptcomparison() : │ │ │ │ │ -00120 │ │ │ │ │ -particles(0), split_merge_scale(SM_pttilde){}; │ │ │ │ │ -00121 │ │ │ │ │ -00123 │ │ │ │ │ -std::string SM_scale_name() const { │ │ │ │ │ -00124 │ │ │ │ │ -return split_merge_scale_name(split_merge_scale);} │ │ │ │ │ -00125 │ │ │ │ │ -00126 │ │ │ │ │ -std::vector * particles; │ │ │ │ │ -00127 │ │ │ │ │ -std::vector * pt; │ │ │ │ │ -00128 │ │ │ │ │ -00130 │ │ │ │ │ -bool operator()(const Cjet &jet1, const Cjet &jet2) const; │ │ │ │ │ -00131 │ │ │ │ │ -00143 │ │ │ │ │ -void get_difference(const Cjet &j1, const Cjet &j2, Cmomentum *v, double *pt_tilde) const; │ │ │ │ │ -00144 │ │ │ │ │ -00163 │ │ │ │ │ -Esplit_merge_scale split_merge_scale; │ │ │ │ │ -00164 }; │ │ │ │ │ -00165 │ │ │ │ │ -00166 │ │ │ │ │ -00167 // iterator types │ │ │ │ │ -00169 typedef std::multiset::iterator cjet_iterator; │ │ │ │ │ -00170 │ │ │ │ │ -00172 typedef std::vector::iterator jet_iterator; │ │ │ │ │ -00173 │ │ │ │ │ -00174 │ │ │ │ │ -00175 │ │ │ │ │ -00180 class Csplit_merge{ │ │ │ │ │ -00181 public: │ │ │ │ │ -00183 │ │ │ │ │ -Csplit_merge(); │ │ │ │ │ -00184 │ │ │ │ │ -00186 │ │ │ │ │ -~Csplit_merge(); │ │ │ │ │ -00187 │ │ │ │ │ -00188 │ │ │ │ │ -00190 │ │ │ │ │ -// initialisation functions // │ │ │ │ │ -00192 │ │ │ │ │ -00201 │ │ │ │ │ -int init(std::vector &_particles, std::vector *protocones, double R2, double │ │ │ │ │ -ptmin=0.0); │ │ │ │ │ -00202 │ │ │ │ │ -00208 │ │ │ │ │ -int init_particles(std::vector &_particles); │ │ │ │ │ -00209 │ │ │ │ │ -00213 │ │ │ │ │ -int init_pleft(); │ │ │ │ │ -00214 │ │ │ │ │ -00226 │ │ │ │ │ -inline int set_pt_weighted_splitting(bool _use_pt_weighted_splitting){ │ │ │ │ │ -00227 │ │ │ │ │ -use_pt_weighted_splitting = _use_pt_weighted_splitting; │ │ │ │ │ -00228 │ │ │ │ │ -return 0; │ │ │ │ │ -00229 │ │ │ │ │ -} │ │ │ │ │ -00230 │ │ │ │ │ -00232 │ │ │ │ │ -// cleaning functions // │ │ │ │ │ -00234 │ │ │ │ │ -00236 │ │ │ │ │ -int partial_clear(); │ │ │ │ │ -00237 │ │ │ │ │ -00239 │ │ │ │ │ -int full_clear(); │ │ │ │ │ -00240 │ │ │ │ │ -00242 │ │ │ │ │ -// user-defined stable-cone ordering // │ │ │ │ │ -00244 │ │ │ │ │ -00250 │ │ │ │ │ -class Cuser_scale_base{ │ │ │ │ │ -00251 │ │ │ │ │ -public: │ │ │ │ │ -00253 │ │ │ │ │ -virtual ~Cuser_scale_base(){} │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 300 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00254 │ │ │ │ │ -00259 │ │ │ │ │ -virtual double operator()(const Cjet & jet) const = 0; │ │ │ │ │ -00260 │ │ │ │ │ -00271 │ │ │ │ │ -virtual bool is_larger(const Cjet & a, const Cjet & b) const{ │ │ │ │ │ -00272 │ │ │ │ │ -return (a.sm_var2 > b.sm_var2); │ │ │ │ │ -00273 │ │ │ │ │ -} │ │ │ │ │ -00274 │ │ │ │ │ -}; │ │ │ │ │ -00275 │ │ │ │ │ -00280 │ │ │ │ │ -void set_user_scale(const Cuser_scale_base * user_scale_in){ │ │ │ │ │ -00281 │ │ │ │ │ -_user_scale = user_scale_in; │ │ │ │ │ -00282 │ │ │ │ │ -} │ │ │ │ │ -00283 │ │ │ │ │ -00285 │ │ │ │ │ -const Cuser_scale_base * user_scale() const { return _user_scale; } │ │ │ │ │ -00286 │ │ │ │ │ -00287 │ │ │ │ │ -00289 │ │ │ │ │ -// main parts of the algorithm // │ │ │ │ │ -00291 │ │ │ │ │ -00299 │ │ │ │ │ -int merge_collinear_and_remove_soft(); │ │ │ │ │ -00300 │ │ │ │ │ -00308 │ │ │ │ │ -int add_protocones(std::vector *protocones, double R2, double ptmin=0.0); │ │ │ │ │ -00309 │ │ │ │ │ -00320 │ │ │ │ │ -int add_hardest_protocone_to_jets(std::vector *protocones, double R2, double ptmin=0.0); │ │ │ │ │ -00321 │ │ │ │ │ -00331 │ │ │ │ │ -int perform(double overlap_tshold, double ptmin=0.0); │ │ │ │ │ -00332 │ │ │ │ │ -00333 │ │ │ │ │ -00335 │ │ │ │ │ -// save and debug functions // │ │ │ │ │ -00337 │ │ │ │ │ -00340 │ │ │ │ │ -int save_contents(FILE *flux); │ │ │ │ │ -00341 │ │ │ │ │ -00343 │ │ │ │ │ -int show(); │ │ │ │ │ -00344 │ │ │ │ │ -00345 │ │ │ │ │ -// particle information │ │ │ │ │ -00346 │ │ │ │ │ -int n; │ │ │ │ │ -00347 │ │ │ │ │ -std::vector particles; │ │ │ │ │ -00348 │ │ │ │ │ -std::vector pt; │ │ │ │ │ -00349 │ │ │ │ │ -int n_left; │ │ │ │ │ -00350 │ │ │ │ │ -std::vector p_remain; │ │ │ │ │ -00351 │ │ │ │ │ -std::vector p_uncol_hard; │ │ │ │ │ -00352 │ │ │ │ │ -int n_pass; │ │ │ │ │ -00353 │ │ │ │ │ -00357 │ │ │ │ │ -double most_ambiguous_split; │ │ │ │ │ -00358 │ │ │ │ │ -00359 │ │ │ │ │ -// jets information │ │ │ │ │ -00360 │ │ │ │ │ -std::vector jets; │ │ │ │ │ -00361 │ │ │ │ │ -00362 │ │ │ │ │ -// working entries │ │ │ │ │ -00363 │ │ │ │ │ -int *indices; │ │ │ │ │ -00364 │ │ │ │ │ -int idx_size; │ │ │ │ │ -00365 │ │ │ │ │ -00374 │ │ │ │ │ -bool merge_identical_protocones; │ │ │ │ │ -00375 │ │ │ │ │ -00377 │ │ │ │ │ -Csplit_merge_ptcomparison ptcomparison; │ │ │ │ │ -00378 │ │ │ │ │ -00385 │ │ │ │ │ -double SM_var2_hardest_cut_off; │ │ │ │ │ -00386 │ │ │ │ │ -00394 │ │ │ │ │ -double stable_cone_soft_pt2_cutoff; │ │ │ │ │ -00395 │ │ │ │ │ -00396 private: │ │ │ │ │ -00404 │ │ │ │ │ -bool get_overlap(const Cjet &j1, const Cjet &j2, double *v); │ │ │ │ │ -00405 │ │ │ │ │ -00406 │ │ │ │ │ -00418 │ │ │ │ │ -bool split(cjet_iterator &it_j1, cjet_iterator &it_j2); │ │ │ │ │ -00419 │ │ │ │ │ -00428 │ │ │ │ │ -bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2); │ │ │ │ │ -00429 │ │ │ │ │ -00436 │ │ │ │ │ -bool insert(Cjet &jet); │ │ │ │ │ -00437 │ │ │ │ │ -00444 │ │ │ │ │ -double get_sm_var2(Cmomentum &v, double &pt_tilde); │ │ │ │ │ -00445 │ │ │ │ │ -00446 │ │ │ │ │ -// jet information │ │ │ │ │ -00448 #ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR │ │ │ │ │ -00449 │ │ │ │ │ -std::unique_ptr > candidates; │ │ │ │ │ -00450 #else │ │ │ │ │ -00451 │ │ │ │ │ -std::auto_ptr > candidates; │ │ │ │ │ -00452 #endif │ │ │ │ │ -00453 │ │ │ │ │ -00455 │ │ │ │ │ -double pt_min2; │ │ │ │ │ -00456 │ │ │ │ │ -00462 │ │ │ │ │ -bool use_pt_weighted_splitting; │ │ │ │ │ -00463 │ │ │ │ │ -00466 │ │ │ │ │ -const Cuser_scale_base *_user_scale; │ │ │ │ │ -00467 │ │ │ │ │ -00468 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES │ │ │ │ │ -00470 │ │ │ │ │ -std::set cand_refs; │ │ │ │ │ -00471 #endif │ │ │ │ │ -00472 }; │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.49 vicinity.cpp │ │ │ │ │ - │ │ │ │ │ -301 │ │ │ │ │ - │ │ │ │ │ -00473 │ │ │ │ │ -00474 } │ │ │ │ │ -00475 │ │ │ │ │ -00476 │ │ │ │ │ -00477 #endif │ │ │ │ │ - │ │ │ │ │ -5.49 │ │ │ │ │ +5.51 │ │ │ │ │ │ │ │ │ │ vicinity.cpp │ │ │ │ │ │ │ │ │ │ 00001 │ │ │ │ │ 00002 // File: vicinity.cpp │ │ │ │ │ // │ │ │ │ │ 00003 // Description: source file for particle vicinity (Cvicinity class) │ │ │ │ │ @@ -29717,14 +30068,23 @@ │ │ │ │ │ 00032 #include │ │ │ │ │ 00033 │ │ │ │ │ 00034 namespace siscone_spherical{ │ │ │ │ │ 00035 │ │ │ │ │ 00036 using namespace std; │ │ │ │ │ 00037 │ │ │ │ │ 00038 /************************************************************* │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +// │ │ │ │ │ + │ │ │ │ │ + 304 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00039 * CSphvicinity_elm implementation │ │ │ │ │ * │ │ │ │ │ 00040 * element in the vicinity of a parent. │ │ │ │ │ * │ │ │ │ │ 00041 * class used to manage one points in the vicinity │ │ │ │ │ * │ │ │ │ │ 00042 * of a parent point. │ │ │ │ │ @@ -29766,25 +30126,15 @@ │ │ │ │ │ parent = NULL; │ │ │ │ │ 00071 │ │ │ │ │ VR2 = VR = 0.0; │ │ │ │ │ 00072 │ │ │ │ │ 00073 } │ │ │ │ │ 00074 │ │ │ │ │ 00075 // constructor with initialisation │ │ │ │ │ -00076 //--------------------------------- │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ - 302 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00077 CSphvicinity::CSphvicinity(vector &_particle_list){ │ │ │ │ │ +00076 //--------------------------------00077 CSphvicinity::CSphvicinity(vector &_particle_list){ │ │ │ │ │ 00078 │ │ │ │ │ parent = NULL; │ │ │ │ │ 00079 │ │ │ │ │ ve_list = NULL; │ │ │ │ │ 00080 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ 00081 │ │ │ │ │ quadtree = NULL; │ │ │ │ │ @@ -29850,14 +30200,19 @@ │ │ │ │ │ 00123 │ │ │ │ │ // │ │ │ │ │ - we allocate indices to particles │ │ │ │ │ 00124 │ │ │ │ │ n_part = 0; │ │ │ │ │ 00125 │ │ │ │ │ plist.clear(); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.51 vicinity.cpp │ │ │ │ │ + │ │ │ │ │ 00126 │ │ │ │ │ pincluded.clear(); │ │ │ │ │ 00127 │ │ │ │ │ for (i=0;i<(int) _particle_list.size();i++){ │ │ │ │ │ 00128 │ │ │ │ │ // if a particle is colinear with the beam (infinite rapidity) │ │ │ │ │ 00129 │ │ │ │ │ @@ -29915,19 +30270,14 @@ │ │ │ │ │ j = 0; │ │ │ │ │ 00160 │ │ │ │ │ for (i=0;iadd(&plist[i]); │ │ │ │ │ 00163 #endif │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.49 vicinity.cpp │ │ │ │ │ - │ │ │ │ │ 00164 │ │ │ │ │ ve_list[j].v = ve_list[j+1].v = &plist[i]; │ │ │ │ │ 00165 │ │ │ │ │ ve_list[j].is_inside = ve_list[j+1].is_inside = &(pincluded[i]); │ │ │ │ │ 00166 │ │ │ │ │ j+=2; │ │ │ │ │ 00167 │ │ │ │ │ @@ -30004,14 +30354,23 @@ │ │ │ │ │ 00209 │ │ │ │ │ for (i=0;icosVR){ │ │ │ │ │ 00249 │ │ │ │ │ CSph3vector cross = cross_product3(parent_centre,vnormal); │ │ │ │ │ 00250 │ │ │ │ │ 00251 │ │ │ │ │ // for the centres │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -303 │ │ │ │ │ - │ │ │ │ │ - 304 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00252 │ │ │ │ │ +CSph3vector median = (parent_centre+vnormal); │ │ │ │ │ 00253 │ │ │ │ │ +double amplT = sqrt((tan2R*(1+dot)+(dot-1))*(1+dot)); │ │ │ │ │ 00254 │ │ │ │ │ +CSph3vector transverse = amplT*cross/cross._norm; │ │ │ │ │ 00255 │ │ │ │ │ 00256 │ │ │ │ │ +// first angle (+) │ │ │ │ │ 00257 │ │ │ │ │ +ve_list[i].centre = median + transverse; │ │ │ │ │ 00258 │ │ │ │ │ +ve_list[i].centre.build_norm(); │ │ │ │ │ 00259 │ │ │ │ │ +ve_list[i].centre/=ve_list[i].centre._norm; │ │ │ │ │ 00260 │ │ │ │ │ +CSph3vector diff = ve_list[i].centre - parent_centre; │ │ │ │ │ 00261 │ │ │ │ │ +//ve_list[i].angle = atan2(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, diff)); │ │ │ │ │ 00262 │ │ │ │ │ +ve_list[i].angle = sort_angle(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, diff)); │ │ │ │ │ 00263 │ │ │ │ │ +ve_list[i].side = true; │ │ │ │ │ 00264 │ │ │ │ │ +ve_list[i].cocircular.clear(); │ │ │ │ │ 00265 │ │ │ │ │ +vicinity.push_back(&(ve_list[i])); │ │ │ │ │ 00266 │ │ │ │ │ 00267 │ │ │ │ │ -00268 │ │ │ │ │ -00269 │ │ │ │ │ -00270 │ │ │ │ │ -00271 │ │ │ │ │ -00272 │ │ │ │ │ - │ │ │ │ │ -CSph3vector median = (parent_centre+vnormal); │ │ │ │ │ -double amplT = sqrt((tan2R*(1+dot)+(dot-1))*(1+dot)); │ │ │ │ │ -CSph3vector transverse = amplT*cross/cross._norm; │ │ │ │ │ - │ │ │ │ │ -5.50 │ │ │ │ │ - │ │ │ │ │ -vicinity.cpp │ │ │ │ │ - │ │ │ │ │ -// first angle (+) │ │ │ │ │ -ve_list[i].centre = median + transverse; │ │ │ │ │ -ve_list[i].centre.build_norm(); │ │ │ │ │ -ve_list[i].centre/=ve_list[i].centre._norm; │ │ │ │ │ -CSph3vector diff = ve_list[i].centre - parent_centre; │ │ │ │ │ -//ve_list[i].angle = atan2(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, diff)); │ │ │ │ │ -ve_list[i].angle = sort_angle(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, diff)); │ │ │ │ │ -ve_list[i].side = true; │ │ │ │ │ -ve_list[i].cocircular.clear(); │ │ │ │ │ -vicinity.push_back(&(ve_list[i])); │ │ │ │ │ - │ │ │ │ │ // second angle (-) │ │ │ │ │ +00268 │ │ │ │ │ ve_list[i+1].centre = median - transverse; │ │ │ │ │ +00269 │ │ │ │ │ ve_list[i+1].centre.build_norm(); │ │ │ │ │ +00270 │ │ │ │ │ ve_list[i+1].centre/=ve_list[i+1].centre._norm; │ │ │ │ │ +00271 │ │ │ │ │ diff = ve_list[i+1].centre - parent_centre; │ │ │ │ │ +00272 │ │ │ │ │ ve_list[i+1].angle = sort_angle(dot_product3(angular_dir2, diff),dot_product3(angular_dir1, │ │ │ │ │ diff)); │ │ │ │ │ 00273 │ │ │ │ │ ve_list[i+1].side = false; │ │ │ │ │ 00274 │ │ │ │ │ ve_list[i+1].cocircular.clear(); │ │ │ │ │ 00275 │ │ │ │ │ @@ -30169,16 +30512,25 @@ │ │ │ │ │ sqrt(1.0/inv_err2_sq); │ │ │ │ │ 00296 │ │ │ │ │ ve_list[i+1].cocircular_range = ve_list[i].cocircular_range; │ │ │ │ │ 00297 │ │ │ │ │ } │ │ │ │ │ 00298 } │ │ │ │ │ 00299 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.52 vicinity.cpp │ │ │ │ │ + │ │ │ │ │ 00300 } │ │ │ │ │ │ │ │ │ │ +5.52 │ │ │ │ │ + │ │ │ │ │ +vicinity.cpp │ │ │ │ │ + │ │ │ │ │ 00001 │ │ │ │ │ 00002 // File: vicinity.cpp │ │ │ │ │ // │ │ │ │ │ 00003 // Description: source file for particle vicinity (Cvicinity class) │ │ │ │ │ // │ │ │ │ │ 00004 // This file is part of the SISCone project. │ │ │ │ │ // │ │ │ │ │ @@ -30223,19 +30575,14 @@ │ │ │ │ │ $// │ │ │ │ │ 00026 │ │ │ │ │ 00027 #include "vicinity.h" │ │ │ │ │ 00028 #include │ │ │ │ │ 00029 #include │ │ │ │ │ 00030 #include │ │ │ │ │ 00031 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.50 vicinity.cpp │ │ │ │ │ - │ │ │ │ │ 00032 namespace siscone{ │ │ │ │ │ 00033 │ │ │ │ │ 00034 using namespace std; │ │ │ │ │ 00035 │ │ │ │ │ 00036 /************************************************************* │ │ │ │ │ 00037 * Cvicinity_elm implementation │ │ │ │ │ * │ │ │ │ │ @@ -30291,14 +30638,23 @@ │ │ │ │ │ parent = NULL; │ │ │ │ │ 00077 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ 00078 │ │ │ │ │ quadtree = NULL; │ │ │ │ │ 00079 #endif │ │ │ │ │ 00080 │ │ │ │ │ VR2 = VR = 0.0; │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +307 │ │ │ │ │ + │ │ │ │ │ + 308 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00081 │ │ │ │ │ 00082 │ │ │ │ │ ve_list = NULL; │ │ │ │ │ 00083 │ │ │ │ │ set_particle_list(_particle_list); │ │ │ │ │ 00084 } │ │ │ │ │ 00085 │ │ │ │ │ @@ -30345,23 +30701,14 @@ │ │ │ │ │ 00114 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ 00115 │ │ │ │ │ if (quadtree!=NULL) │ │ │ │ │ 00116 │ │ │ │ │ delete quadtree; │ │ │ │ │ 00117 #endif │ │ │ │ │ 00118 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -305 │ │ │ │ │ - │ │ │ │ │ - 306 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00119 │ │ │ │ │ // allocate memory array for particles │ │ │ │ │ 00120 │ │ │ │ │ // Note: - we compute max for |eta| │ │ │ │ │ 00121 │ │ │ │ │ // │ │ │ │ │ - we allocate indices to particles │ │ │ │ │ @@ -30440,14 +30787,19 @@ │ │ │ │ │ 00164 │ │ │ │ │ ve_list[j].is_inside = ve_list[j+1].is_inside = &(pincluded[i]); │ │ │ │ │ 00165 │ │ │ │ │ j+=2; │ │ │ │ │ 00166 │ │ │ │ │ } │ │ │ │ │ 00167 │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ + 5.52 vicinity.cpp │ │ │ │ │ + │ │ │ │ │ 00168 } │ │ │ │ │ 00169 │ │ │ │ │ 00170 │ │ │ │ │ 00171 /* │ │ │ │ │ 00172 * build the vicinity list from a list of points. │ │ │ │ │ 00173 * - _parent │ │ │ │ │ reference particle │ │ │ │ │ @@ -30502,19 +30854,14 @@ │ │ │ │ │ 00201 │ │ │ │ │ sort(vicinity.begin(), vicinity.end(), ve_less); │ │ │ │ │ 00202 │ │ │ │ │ 00203 │ │ │ │ │ vicinity_size = vicinity.size(); │ │ │ │ │ 00204 } │ │ │ │ │ 00205 │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.50 vicinity.cpp │ │ │ │ │ - │ │ │ │ │ 00206 │ │ │ │ │ 00208 inline double sort_angle(double s, double c){ │ │ │ │ │ 00209 │ │ │ │ │ if (s==0) return (c>0) ? 0.0 : 2.0; │ │ │ │ │ 00210 │ │ │ │ │ double t=c/s; │ │ │ │ │ 00211 │ │ │ │ │ @@ -30589,14 +30936,23 @@ │ │ │ │ │ of (parent,child) pair w.r.t. horizontal │ │ │ │ │ 00253 │ │ │ │ │ ve_list[i].angle = sort_angle(s,c); │ │ │ │ │ 00254 │ │ │ │ │ ve_list[i].eta = pcx+c; │ │ │ │ │ 00255 │ │ │ │ │ ve_list[i].phi = phi_in_range(pcy+s); │ │ │ │ │ + │ │ │ │ │ +Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ + │ │ │ │ │ +309 │ │ │ │ │ + │ │ │ │ │ + 310 │ │ │ │ │ + │ │ │ │ │ +File Documentation │ │ │ │ │ + │ │ │ │ │ 00256 │ │ │ │ │ ve_list[i].side = true; │ │ │ │ │ 00257 │ │ │ │ │ ve_list[i].cocircular.clear(); │ │ │ │ │ 00258 │ │ │ │ │ vicinity.push_back(&(ve_list[i])); │ │ │ │ │ 00259 │ │ │ │ │ @@ -30663,393 +31019,18 @@ │ │ │ │ │ 1.0/inv_err1 : │ │ │ │ │ 00291 │ │ │ │ │ sqrt(1.0/inv_err2_sq); │ │ │ │ │ 00292 │ │ │ │ │ ve_list[i+1].cocircular_range = ve_list[i].cocircular_range; │ │ │ │ │ 00293 │ │ │ │ │ } │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -307 │ │ │ │ │ - │ │ │ │ │ - 308 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ 00294 } │ │ │ │ │ 00295 │ │ │ │ │ 00296 } │ │ │ │ │ │ │ │ │ │ -5.51 │ │ │ │ │ - │ │ │ │ │ -vicinity.h │ │ │ │ │ - │ │ │ │ │ -00001 // -*- C++ -*00003 // File: vicinity.h │ │ │ │ │ -// │ │ │ │ │ -00004 // Description: header file for particle vicinity (Cvicinity class) │ │ │ │ │ -// │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00006 // WARNING: this is not the main SISCone trunk but │ │ │ │ │ -// │ │ │ │ │ -00007 // │ │ │ │ │ -an adaptation to spherical coordinates │ │ │ │ │ -// │ │ │ │ │ -00008 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00009 // │ │ │ │ │ -// │ │ │ │ │ -00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez │ │ │ │ │ -00011 // │ │ │ │ │ -// │ │ │ │ │ -00012 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00013 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00014 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00015 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00016 // │ │ │ │ │ -// │ │ │ │ │ -00017 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00020 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00021 // │ │ │ │ │ -// │ │ │ │ │ -00022 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00023 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00025 // │ │ │ │ │ -// │ │ │ │ │ -00026 // $Revision:: 255 │ │ │ │ │ -$// │ │ │ │ │ -00027 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008) │ │ │ │ │ -$// │ │ │ │ │ -00029 │ │ │ │ │ -00030 #ifndef __SPH_VICINITY_H__ │ │ │ │ │ -00031 #define __SPH_VICINITY_H__ │ │ │ │ │ -00032 │ │ │ │ │ -00033 #include │ │ │ │ │ -00034 #include │ │ │ │ │ -00035 #include │ │ │ │ │ -00036 #include "momentum.h" │ │ │ │ │ -00037 #include │ │ │ │ │ -00038 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ -00039 #include │ │ │ │ │ -00040 #endif │ │ │ │ │ -00041 │ │ │ │ │ -00042 namespace siscone_spherical{ │ │ │ │ │ -00043 │ │ │ │ │ -00044 │ │ │ │ │ -00052 class CSphvicinity_elm{ │ │ │ │ │ -00053 public: │ │ │ │ │ -00055 │ │ │ │ │ -CSphmomentum *v; │ │ │ │ │ -00056 │ │ │ │ │ -00058 │ │ │ │ │ -siscone::Cvicinity_inclusion *is_inside; │ │ │ │ │ -00059 │ │ │ │ │ -00060 │ │ │ │ │ -// centre variables │ │ │ │ │ -00061 │ │ │ │ │ -CSph3vector centre; │ │ │ │ │ -00062 │ │ │ │ │ -double angle; │ │ │ │ │ -00063 │ │ │ │ │ -bool side; │ │ │ │ │ -00064 │ │ │ │ │ -double cocircular_range; │ │ │ │ │ -00066 │ │ │ │ │ -00069 │ │ │ │ │ -std::list cocircular; │ │ │ │ │ -00070 }; │ │ │ │ │ -00071 │ │ │ │ │ -00073 bool ve_less(CSphvicinity_elm *ve1, CSphvicinity_elm *ve2); │ │ │ │ │ -00074 │ │ │ │ │ -00075 │ │ │ │ │ -00083 class CSphvicinity{ │ │ │ │ │ -00084 public: │ │ │ │ │ -00086 │ │ │ │ │ -CSphvicinity(); │ │ │ │ │ -00087 │ │ │ │ │ -00089 │ │ │ │ │ -CSphvicinity(std::vector &_particle_list); │ │ │ │ │ -00090 │ │ │ │ │ -00092 │ │ │ │ │ -~CSphvicinity(); │ │ │ │ │ -00093 │ │ │ │ │ -00098 │ │ │ │ │ -void set_particle_list(std::vector &_particle_list); │ │ │ │ │ -00099 │ │ │ │ │ -00105 │ │ │ │ │ -void build(CSphmomentum *_parent, double _VR); │ │ │ │ │ -00106 │ │ │ │ │ -00107 │ │ │ │ │ -// cone kinematical information │ │ │ │ │ -00108 │ │ │ │ │ -CSphmomentum *parent; │ │ │ │ │ -00109 │ │ │ │ │ -double VR; │ │ │ │ │ -00110 │ │ │ │ │ -double VR2; │ │ │ │ │ -00111 │ │ │ │ │ -double cosVR; │ │ │ │ │ - │ │ │ │ │ -// │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ - 5.52 vicinity.h │ │ │ │ │ - │ │ │ │ │ -00112 │ │ │ │ │ -double R; │ │ │ │ │ -00113 │ │ │ │ │ -double R2; │ │ │ │ │ -00114 │ │ │ │ │ -double tan2R; │ │ │ │ │ -00115 │ │ │ │ │ -double D2_R; │ │ │ │ │ -00116 │ │ │ │ │ -double inv_R_EPS_COCIRC; │ │ │ │ │ -00117 │ │ │ │ │ -double inv_R_2EPS_COCIRC; │ │ │ │ │ -00118 │ │ │ │ │ -00119 │ │ │ │ │ -// particle list information │ │ │ │ │ -00120 │ │ │ │ │ -int n_part; │ │ │ │ │ -00121 │ │ │ │ │ -std::vector plist; │ │ │ │ │ -00123 │ │ │ │ │ -std::vector pincluded; │ │ │ │ │ -00124 │ │ │ │ │ -CSphvicinity_elm *ve_list; │ │ │ │ │ -00125 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ -00126 │ │ │ │ │ -siscone::Cquadtree *quadtree; │ │ │ │ │ -00127 #endif │ │ │ │ │ -00128 │ │ │ │ │ -00129 │ │ │ │ │ -// vicinity information │ │ │ │ │ -00130 │ │ │ │ │ -std::vector vicinity; │ │ │ │ │ -00131 │ │ │ │ │ -unsigned int vicinity_size; │ │ │ │ │ -00132 │ │ │ │ │ -00133 protected: │ │ │ │ │ -00139 │ │ │ │ │ -void append_to_vicinity(CSphmomentum *v); │ │ │ │ │ -00140 │ │ │ │ │ -00141 │ │ │ │ │ -// internal variables │ │ │ │ │ -00142 │ │ │ │ │ -CSph3vector parent_centre; │ │ │ │ │ -00143 │ │ │ │ │ -CSph3vector angular_dir1; │ │ │ │ │ -00144 │ │ │ │ │ -CSph3vector angular_dir2; │ │ │ │ │ -00145 }; │ │ │ │ │ -00146 │ │ │ │ │ -00147 } │ │ │ │ │ -00148 │ │ │ │ │ -00149 #endif │ │ │ │ │ - │ │ │ │ │ -5.52 │ │ │ │ │ - │ │ │ │ │ -vicinity.h │ │ │ │ │ - │ │ │ │ │ -00001 // -*- C++ -*00003 // File: vicinity.h │ │ │ │ │ -// │ │ │ │ │ -00004 // Description: header file for particle vicinity (Cvicinity class) │ │ │ │ │ -// │ │ │ │ │ -00005 // This file is part of the SISCone project. │ │ │ │ │ -// │ │ │ │ │ -00006 // For more details, see http://projects.hepforge.org/siscone │ │ │ │ │ -// │ │ │ │ │ -00007 // │ │ │ │ │ -// │ │ │ │ │ -00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez │ │ │ │ │ -// │ │ │ │ │ -00009 // │ │ │ │ │ -// │ │ │ │ │ -00010 // This program is free software; you can redistribute it and/or modify │ │ │ │ │ -// │ │ │ │ │ -00011 // it under the terms of the GNU General Public License as published by │ │ │ │ │ -// │ │ │ │ │ -00012 // the Free Software Foundation; either version 2 of the License, or │ │ │ │ │ -// │ │ │ │ │ -00013 // (at your option) any later version. │ │ │ │ │ -// │ │ │ │ │ -00014 // │ │ │ │ │ -// │ │ │ │ │ -00015 // This program is distributed in the hope that it will be useful, │ │ │ │ │ -// │ │ │ │ │ -00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ │ -// │ │ │ │ │ -00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ │ -// │ │ │ │ │ -00018 // GNU General Public License for more details. │ │ │ │ │ -// │ │ │ │ │ -00019 // │ │ │ │ │ -// │ │ │ │ │ -00020 // You should have received a copy of the GNU General Public License │ │ │ │ │ -// │ │ │ │ │ -00021 // along with this program; if not, write to the Free Software │ │ │ │ │ -// │ │ │ │ │ -00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // │ │ │ │ │ -00023 // │ │ │ │ │ -// │ │ │ │ │ -00024 // $Revision:: 123 │ │ │ │ │ -$// │ │ │ │ │ -00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) │ │ │ │ │ -$// │ │ │ │ │ -00027 │ │ │ │ │ -00028 #ifndef __VICINITY_H__ │ │ │ │ │ -00029 #define __VICINITY_H__ │ │ │ │ │ -00030 │ │ │ │ │ -00031 #include │ │ │ │ │ -00032 #include │ │ │ │ │ -00033 #include "momentum.h" │ │ │ │ │ -00034 #include "defines.h" │ │ │ │ │ -00035 #include "quadtree.h" │ │ │ │ │ -00036 │ │ │ │ │ -00037 namespace siscone{ │ │ │ │ │ -00038 │ │ │ │ │ -00039 │ │ │ │ │ -00040 │ │ │ │ │ -00046 class Cvicinity_inclusion { │ │ │ │ │ -00047 public: │ │ │ │ │ -00049 │ │ │ │ │ -Cvicinity_inclusion() : cone(false), cocirc(false) {} │ │ │ │ │ -00050 │ │ │ │ │ -00051 │ │ │ │ │ -bool cone; │ │ │ │ │ -00052 │ │ │ │ │ -bool cocirc; │ │ │ │ │ -00053 }; │ │ │ │ │ -00054 │ │ │ │ │ -00055 │ │ │ │ │ -00063 class Cvicinity_elm{ │ │ │ │ │ - │ │ │ │ │ -Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ - │ │ │ │ │ -309 │ │ │ │ │ - │ │ │ │ │ - 310 │ │ │ │ │ - │ │ │ │ │ -File Documentation │ │ │ │ │ - │ │ │ │ │ -00064 public: │ │ │ │ │ -00066 │ │ │ │ │ -Cmomentum *v; │ │ │ │ │ -00067 │ │ │ │ │ -00069 │ │ │ │ │ -Cvicinity_inclusion *is_inside; │ │ │ │ │ -00070 │ │ │ │ │ -00071 │ │ │ │ │ -// centre variables │ │ │ │ │ -00072 │ │ │ │ │ -double eta; │ │ │ │ │ -00073 │ │ │ │ │ -double phi; │ │ │ │ │ -00074 │ │ │ │ │ -double angle; │ │ │ │ │ -00075 │ │ │ │ │ -bool side; │ │ │ │ │ -00076 │ │ │ │ │ -double cocircular_range; │ │ │ │ │ -00078 │ │ │ │ │ -00081 │ │ │ │ │ -std::list cocircular; │ │ │ │ │ -00082 }; │ │ │ │ │ -00083 │ │ │ │ │ -00085 bool ve_less(Cvicinity_elm *ve1, Cvicinity_elm *ve2); │ │ │ │ │ -00086 │ │ │ │ │ -00087 │ │ │ │ │ -00095 class Cvicinity{ │ │ │ │ │ -00096 public: │ │ │ │ │ -00098 │ │ │ │ │ -Cvicinity(); │ │ │ │ │ -00099 │ │ │ │ │ -00101 │ │ │ │ │ -Cvicinity(std::vector &_particle_list); │ │ │ │ │ -00102 │ │ │ │ │ -00104 │ │ │ │ │ -~Cvicinity(); │ │ │ │ │ -00105 │ │ │ │ │ -00110 │ │ │ │ │ -void set_particle_list(std::vector &_particle_list); │ │ │ │ │ -00111 │ │ │ │ │ -00117 │ │ │ │ │ -void build(Cmomentum *_parent, double _VR); │ │ │ │ │ -00118 │ │ │ │ │ -00119 │ │ │ │ │ -// cone kinematical information │ │ │ │ │ -00120 │ │ │ │ │ -Cmomentum *parent; │ │ │ │ │ -00121 │ │ │ │ │ -double VR; │ │ │ │ │ -00122 │ │ │ │ │ -double VR2; │ │ │ │ │ -00123 │ │ │ │ │ -double R; │ │ │ │ │ -00124 │ │ │ │ │ -double R2; │ │ │ │ │ -00125 │ │ │ │ │ -double inv_R_EPS_COCIRC; │ │ │ │ │ -00126 │ │ │ │ │ -double inv_R_2EPS_COCIRC; │ │ │ │ │ -00127 │ │ │ │ │ -00128 │ │ │ │ │ -// particle list information │ │ │ │ │ -00129 │ │ │ │ │ -int n_part; │ │ │ │ │ -00130 │ │ │ │ │ -std::vector plist; │ │ │ │ │ -00131 │ │ │ │ │ -std::vector pincluded; │ │ │ │ │ -00132 │ │ │ │ │ -Cvicinity_elm *ve_list; │ │ │ │ │ -00133 #ifdef USE_QUADTREE_FOR_STABILITY_TEST │ │ │ │ │ -00134 │ │ │ │ │ -Cquadtree *quadtree; │ │ │ │ │ -00135 #endif │ │ │ │ │ -00136 │ │ │ │ │ -00137 │ │ │ │ │ -// vicinity information │ │ │ │ │ -00138 │ │ │ │ │ -std::vector vicinity; │ │ │ │ │ -00139 │ │ │ │ │ -unsigned int vicinity_size; │ │ │ │ │ -00140 │ │ │ │ │ -00141 protected: │ │ │ │ │ -00147 │ │ │ │ │ -void append_to_vicinity(Cmomentum *v); │ │ │ │ │ -00148 │ │ │ │ │ -00149 │ │ │ │ │ -// internal variables │ │ │ │ │ -00150 │ │ │ │ │ -double pcx; │ │ │ │ │ -00151 │ │ │ │ │ -double pcy; │ │ │ │ │ -00152 }; │ │ │ │ │ -00153 │ │ │ │ │ -00154 } │ │ │ │ │ -00155 │ │ │ │ │ -00156 #endif │ │ │ │ │ - │ │ │ │ │ Generated on Tue Jan 7 2025 11:57:28 for SISCone by Doxygen │ │ │ │ │ │ │ │ │ │ Index │ │ │ │ │ _norm │ │ │ │ │ siscone::Cjet_area, 31 │ │ │ │ │ siscone_spherical::CSph3vector, 71 │ │ │ │ │ add │ │ │ │ │ @@ -31395,15 +31376,15 @@ │ │ │ │ │ 314 │ │ │ │ │ │ │ │ │ │ INDEX │ │ │ │ │ │ │ │ │ │ siscone::hash_element, 169 │ │ │ │ │ siscone_spherical::sph_hash_element, 177 │ │ │ │ │ j │ │ │ │ │ -siscone::ranlux_state_t, 171 │ │ │ │ │ +siscone::ranlux_state_t, 170 │ │ │ │ │ jet_areas │ │ │ │ │ siscone::Carea, 15 │ │ │ │ │ jets │ │ │ │ │ siscone::Csplit_merge, 136 │ │ │ │ │ siscone_spherical::CSphsplit_merge, 102 │ │ │ │ │ mask │ │ │ │ │ siscone::hash_cones, 167 │ │ │ │ │ @@ -31435,15 +31416,15 @@ │ │ │ │ │ n │ │ │ │ │ siscone::Cjet, 27 │ │ │ │ │ siscone::Csplit_merge, 137 │ │ │ │ │ siscone::ranlux_state_t, 171 │ │ │ │ │ siscone_spherical::CSphjet, 77 │ │ │ │ │ siscone_spherical::CSphsplit_merge, 103 │ │ │ │ │ n_cones │ │ │ │ │ -siscone::hash_cones, 168 │ │ │ │ │ +siscone::hash_cones, 167 │ │ │ │ │ siscone_spherical::sph_hash_cones, 175 │ │ │ │ │ n_left │ │ │ │ │ siscone::Csplit_merge, 137 │ │ │ │ │ siscone_spherical::CSphsplit_merge, 103 │ │ │ │ │ n_part │ │ │ │ │ siscone::Cvicinity, 157 │ │ │ │ │ siscone_spherical::CSphvicinity, 123 │ │ │ │ │ @@ -31641,23 +31622,23 @@ │ │ │ │ │ siscone_spherical::sph_hash_cones, 175 │ │ │ │ │ randomize │ │ │ │ │ siscone::Creference, 53 │ │ │ │ │ range │ │ │ │ │ siscone::Cjet, 27 │ │ │ │ │ siscone_spherical::CSphjet, 77 │ │ │ │ │ ranlux.h │ │ │ │ │ -ranlux_get, 215 │ │ │ │ │ -ranlux_init, 215 │ │ │ │ │ -ranlux_print_state, 215 │ │ │ │ │ +ranlux_get, 234 │ │ │ │ │ +ranlux_init, 234 │ │ │ │ │ +ranlux_print_state, 234 │ │ │ │ │ ranlux_get │ │ │ │ │ -ranlux.h, 215 │ │ │ │ │ +ranlux.h, 234 │ │ │ │ │ ranlux_init │ │ │ │ │ -ranlux.h, 215 │ │ │ │ │ +ranlux.h, 234 │ │ │ │ │ ranlux_print_state │ │ │ │ │ -ranlux.h, 215 │ │ │ │ │ +ranlux.h, 234 │ │ │ │ │ recompute_jets │ │ │ │ │ siscone::Csiscone, 61 │ │ │ │ │ siscone_spherical::CSphsiscone, 92 │ │ │ │ │ ref │ │ │ │ │ siscone::Cmomentum, 39 │ │ │ │ │ siscone::Creference, 53 │ │ │ │ │ siscone::hash_element, 170 │ │ │ │ │ @@ -31697,50 +31678,50 @@ │ │ │ │ │ │ │ │ │ │ siscone/area.cpp, 191 │ │ │ │ │ siscone/area.h, 195 │ │ │ │ │ siscone/circulator.h, 196 │ │ │ │ │ siscone/config.h, 197 │ │ │ │ │ siscone/config_raw.h, 198 │ │ │ │ │ siscone/defines.h, 199, 201 │ │ │ │ │ -siscone/geom_2d.cpp, 202 │ │ │ │ │ -siscone/geom_2d.h, 206 │ │ │ │ │ -siscone/hash.cpp, 220 │ │ │ │ │ -siscone/hash.h, 225 │ │ │ │ │ -siscone/momentum.cpp, 227 │ │ │ │ │ -siscone/momentum.h, 232 │ │ │ │ │ -siscone/protocones.cpp, 236 │ │ │ │ │ -siscone/protocones.h, 255 │ │ │ │ │ -siscone/quadtree.cpp, 208 │ │ │ │ │ -siscone/quadtree.h, 212 │ │ │ │ │ -siscone/ranlux.cpp, 213 │ │ │ │ │ -siscone/ranlux.h, 215, 216 │ │ │ │ │ -siscone/reference.cpp, 216 │ │ │ │ │ -siscone/reference.h, 218 │ │ │ │ │ -siscone/siscone.cpp, 259 │ │ │ │ │ +siscone/geom_2d.cpp, 245 │ │ │ │ │ +siscone/geom_2d.h, 249 │ │ │ │ │ +siscone/hash.cpp, 251 │ │ │ │ │ +siscone/hash.h, 202 │ │ │ │ │ +siscone/momentum.cpp, 257 │ │ │ │ │ +siscone/momentum.h, 204 │ │ │ │ │ +siscone/protocones.cpp, 207 │ │ │ │ │ +siscone/protocones.h, 262 │ │ │ │ │ +siscone/quadtree.cpp, 227 │ │ │ │ │ +siscone/quadtree.h, 230 │ │ │ │ │ +siscone/ranlux.cpp, 231 │ │ │ │ │ +siscone/ranlux.h, 233, 234 │ │ │ │ │ +siscone/reference.cpp, 235 │ │ │ │ │ +siscone/reference.h, 236 │ │ │ │ │ +siscone/siscone.cpp, 237 │ │ │ │ │ siscone/siscone.h, 266 │ │ │ │ │ -siscone/siscone_error.cpp, 219 │ │ │ │ │ -siscone/siscone_error.h, 219 │ │ │ │ │ -siscone/spherical/geom_2d.cpp, 204 │ │ │ │ │ -siscone/spherical/geom_2d.h, 207 │ │ │ │ │ -siscone/spherical/hash.cpp, 223 │ │ │ │ │ -siscone/spherical/hash.h, 226 │ │ │ │ │ -siscone/spherical/momentum.cpp, 229 │ │ │ │ │ -siscone/spherical/momentum.h, 234 │ │ │ │ │ -siscone/spherical/protocones.cpp, 245 │ │ │ │ │ -siscone/spherical/protocones.h, 257 │ │ │ │ │ -siscone/spherical/siscone.cpp, 262 │ │ │ │ │ +siscone/siscone_error.cpp, 244 │ │ │ │ │ +siscone/siscone_error.h, 244 │ │ │ │ │ +siscone/spherical/geom_2d.cpp, 247 │ │ │ │ │ +siscone/spherical/geom_2d.h, 250 │ │ │ │ │ +siscone/spherical/hash.cpp, 254 │ │ │ │ │ +siscone/spherical/hash.h, 203 │ │ │ │ │ +siscone/spherical/momentum.cpp, 258 │ │ │ │ │ +siscone/spherical/momentum.h, 205 │ │ │ │ │ +siscone/spherical/protocones.cpp, 217 │ │ │ │ │ +siscone/spherical/protocones.h, 264 │ │ │ │ │ +siscone/spherical/siscone.cpp, 240 │ │ │ │ │ siscone/spherical/siscone.h, 267 │ │ │ │ │ -siscone/spherical/split_merge.cpp, 268 │ │ │ │ │ -siscone/spherical/split_merge.h, 295 │ │ │ │ │ -siscone/spherical/vicinity.cpp, 301 │ │ │ │ │ -siscone/spherical/vicinity.h, 308 │ │ │ │ │ -siscone/split_merge.cpp, 282 │ │ │ │ │ -siscone/split_merge.h, 298 │ │ │ │ │ -siscone/vicinity.cpp, 304 │ │ │ │ │ -siscone/vicinity.h, 309 │ │ │ │ │ +siscone/spherical/split_merge.cpp, 276 │ │ │ │ │ +siscone/spherical/split_merge.h, 268 │ │ │ │ │ +siscone/spherical/vicinity.cpp, 303 │ │ │ │ │ +siscone/spherical/vicinity.h, 273 │ │ │ │ │ +siscone/split_merge.cpp, 290 │ │ │ │ │ +siscone/split_merge.h, 270 │ │ │ │ │ +siscone/vicinity.cpp, 307 │ │ │ │ │ +siscone/vicinity.h, 274 │ │ │ │ │ siscone::Carea, 7 │ │ │ │ │ ∼Carea, 13 │ │ │ │ │ Carea, 13 │ │ │ │ │ compute_active_areas, 13 │ │ │ │ │ compute_areas, 13 │ │ │ │ │ compute_passive_areas, 14 │ │ │ │ │ grid_eta_max, 15 │ │ │ │ │ @@ -31964,26 +31945,26 @@ │ │ │ │ │ siscone::hash_cones, 164 │ │ │ │ │ ∼hash_cones, 166 │ │ │ │ │ hash_array, 167 │ │ │ │ │ hash_cones, 165 │ │ │ │ │ insert, 166 │ │ │ │ │ is_inside, 167 │ │ │ │ │ mask, 167 │ │ │ │ │ -n_cones, 168 │ │ │ │ │ +n_cones, 167 │ │ │ │ │ R2, 168 │ │ │ │ │ siscone::hash_element, 168 │ │ │ │ │ eta, 169 │ │ │ │ │ is_stable, 169 │ │ │ │ │ next, 169 │ │ │ │ │ phi, 169 │ │ │ │ │ ref, 170 │ │ │ │ │ siscone::ranlux_state_t, 170 │ │ │ │ │ carry, 170 │ │ │ │ │ i, 170 │ │ │ │ │ -j, 171 │ │ │ │ │ +j, 170 │ │ │ │ │ n, 171 │ │ │ │ │ skip, 171 │ │ │ │ │ u, 171 │ │ │ │ │ siscone_spherical::CSph3vector, 64 │ │ │ │ │ _norm, 71 │ │ │ │ │ _phi, 71 │ │ │ │ │ _theta, 71 │ │ │ │ │ @@ -32190,15 +32171,15 @@ │ │ │ │ │ cocircular_range, 127 │ │ │ │ │ user_scale │ │ │ │ │ is_inside, 127 │ │ │ │ │ siscone::Csplit_merge, 135 │ │ │ │ │ side, 127 │ │ │ │ │ siscone_spherical::CSphsplit_merge, 101 │ │ │ │ │ v, 127 │ │ │ │ │ -siscone_spherical::sph_hash_cones, 172 │ │ │ │ │ +siscone_spherical::sph_hash_cones, 171 │ │ │ │ │ v │ │ │ │ │ ∼sph_hash_cones, 173 │ │ │ │ │ siscone::Cjet, 28 │ │ │ │ │ hash_array, 174 │ │ │ │ │ siscone::Cquadtree, 50 │ │ │ │ │ insert, 173, 174 │ │ │ │ │ siscone::Cvicinity_elm, 162