xcoll 0.5.12__py3-none-any.whl → 0.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xcoll might be problematic. Click here for more details.

Files changed (336) hide show
  1. xcoll/__init__.py +5 -18
  2. xcoll/__init__.py.orig +26 -0
  3. xcoll/beam_elements/__init__.py +1 -0
  4. xcoll/beam_elements/absorber.py +12 -2
  5. xcoll/beam_elements/base.py +162 -62
  6. xcoll/beam_elements/blowup.py +1 -0
  7. xcoll/beam_elements/elements_src/black_absorber.h +57 -58
  8. xcoll/beam_elements/elements_src/black_crystal.h +49 -50
  9. xcoll/beam_elements/elements_src/everest_block.h +21 -11
  10. xcoll/beam_elements/elements_src/everest_collimator.h +100 -91
  11. xcoll/beam_elements/elements_src/everest_crystal.h +145 -140
  12. xcoll/beam_elements/elements_src/transparent_collimator.h +126 -0
  13. xcoll/beam_elements/elements_src/transparent_crystal.h +118 -0
  14. xcoll/beam_elements/everest.py +16 -5
  15. xcoll/beam_elements/monitor.py +1 -0
  16. xcoll/beam_elements/transparent.py +83 -0
  17. xcoll/colldb.py +15 -6
  18. xcoll/general.py +1 -1
  19. xcoll/general.py.orig +20 -0
  20. xcoll/headers/particle_states.py +51 -0
  21. xcoll/initial_distribution.py +121 -91
  22. xcoll/initial_distribution.py.orig +256 -0
  23. xcoll/interaction_record/interaction_record.py +2 -1
  24. xcoll/interaction_record/interaction_types.py +2 -2
  25. xcoll/line_tools.py +163 -73
  26. xcoll/lossmap.py +519 -127
  27. xcoll/plot.py +109 -0
  28. xcoll/rf_sweep.py +6 -0
  29. xcoll/scattering_routines/engine.py +414 -217
  30. xcoll/scattering_routines/environment.py +297 -0
  31. xcoll/scattering_routines/everest/amorphous.h +95 -71
  32. xcoll/scattering_routines/everest/{channeling.h → channelling.h} +121 -112
  33. xcoll/scattering_routines/everest/constants.h +1 -1
  34. xcoll/scattering_routines/everest/crystal_parameters.h +9 -9
  35. xcoll/scattering_routines/everest/everest.h +8 -3
  36. xcoll/scattering_routines/everest/everest.py +2 -1
  37. xcoll/scattering_routines/everest/ionisation_loss.h +141 -0
  38. xcoll/scattering_routines/everest/jaw.h +19 -24
  39. xcoll/scattering_routines/everest/materials.py +2 -0
  40. xcoll/scattering_routines/everest/multiple_coulomb_scattering.h +2 -2
  41. xcoll/scattering_routines/everest/nuclear_interaction.h +35 -19
  42. xcoll/scattering_routines/everest/properties.h +3 -72
  43. xcoll/xaux.py +65 -109
  44. {xcoll-0.5.12.dist-info → xcoll-0.6.1.dist-info}/METADATA +5 -5
  45. xcoll-0.6.1.dist-info/RECORD +138 -0
  46. xcoll/_manager.py +0 -22
  47. xcoll/headers/particle_states.h +0 -25
  48. xcoll/install.py +0 -35
  49. xcoll/scattering_routines/geant4/collimasim/.git +0 -1
  50. xcoll/scattering_routines/geant4/collimasim/.gitignore +0 -12
  51. xcoll/scattering_routines/geant4/collimasim/.gitmodules +0 -3
  52. xcoll/scattering_routines/geant4/collimasim/CMakeLists.txt +0 -26
  53. xcoll/scattering_routines/geant4/collimasim/README.md +0 -21
  54. xcoll/scattering_routines/geant4/collimasim/docs/Makefile +0 -20
  55. xcoll/scattering_routines/geant4/collimasim/docs/make.bat +0 -35
  56. xcoll/scattering_routines/geant4/collimasim/docs/source/collimasim.rst +0 -10
  57. xcoll/scattering_routines/geant4/collimasim/docs/source/conf.py +0 -59
  58. xcoll/scattering_routines/geant4/collimasim/docs/source/index.rst +0 -26
  59. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.appveyor.yml +0 -37
  60. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-format +0 -19
  61. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-tidy +0 -65
  62. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.cmake-format.yaml +0 -73
  63. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.git +0 -1
  64. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CODEOWNERS +0 -9
  65. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CONTRIBUTING.md +0 -386
  66. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +0 -45
  67. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/config.yml +0 -8
  68. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/dependabot.yml +0 -16
  69. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler.yml +0 -8
  70. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler_merged.yml +0 -3
  71. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/pull_request_template.md +0 -19
  72. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/ci.yml +0 -969
  73. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/configure.yml +0 -84
  74. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/format.yml +0 -48
  75. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/labeler.yml +0 -16
  76. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/pip.yml +0 -103
  77. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.gitignore +0 -45
  78. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.pre-commit-config.yaml +0 -151
  79. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.readthedocs.yml +0 -3
  80. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/CMakeLists.txt +0 -297
  81. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/LICENSE +0 -29
  82. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/MANIFEST.in +0 -6
  83. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/README.rst +0 -180
  84. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Doxyfile +0 -23
  85. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Makefile +0 -192
  86. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/_static/theme_overrides.css +0 -11
  87. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/chrono.rst +0 -81
  88. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/custom.rst +0 -93
  89. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/eigen.rst +0 -310
  90. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/functional.rst +0 -109
  91. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/index.rst +0 -43
  92. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/overview.rst +0 -171
  93. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/stl.rst +0 -251
  94. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/strings.rst +0 -305
  95. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/classes.rst +0 -1297
  96. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/embedding.rst +0 -262
  97. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/exceptions.rst +0 -396
  98. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/functions.rst +0 -568
  99. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/misc.rst +0 -337
  100. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/index.rst +0 -13
  101. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/numpy.rst +0 -463
  102. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/object.rst +0 -286
  103. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/utilities.rst +0 -155
  104. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/smart_ptrs.rst +0 -174
  105. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/basics.rst +0 -308
  106. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.py +0 -91
  107. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.rst +0 -95
  108. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/changelog.rst +0 -2050
  109. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/classes.rst +0 -542
  110. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/cmake/index.rst +0 -8
  111. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/compiling.rst +0 -648
  112. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/conf.py +0 -381
  113. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/faq.rst +0 -343
  114. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/index.rst +0 -48
  115. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/installing.rst +0 -105
  116. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/limitations.rst +0 -72
  117. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11-logo.png +0 -0
  118. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
  119. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.svg +0 -427
  120. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
  121. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.svg +0 -427
  122. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/reference.rst +0 -130
  123. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/release.rst +0 -96
  124. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/requirements.txt +0 -8
  125. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/upgrade.rst +0 -548
  126. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/attr.h +0 -605
  127. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/buffer_info.h +0 -144
  128. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/cast.h +0 -1432
  129. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/chrono.h +0 -213
  130. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/common.h +0 -2
  131. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/complex.h +0 -65
  132. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/class.h +0 -709
  133. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/common.h +0 -1021
  134. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/descr.h +0 -104
  135. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/init.h +0 -346
  136. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/internals.h +0 -467
  137. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/type_caster_base.h +0 -978
  138. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/typeid.h +0 -55
  139. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eigen.h +0 -606
  140. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/embed.h +0 -284
  141. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eval.h +0 -163
  142. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/functional.h +0 -121
  143. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/gil.h +0 -193
  144. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/iostream.h +0 -275
  145. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/numpy.h +0 -1741
  146. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/operators.h +0 -163
  147. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/options.h +0 -65
  148. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pybind11.h +0 -2497
  149. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pytypes.h +0 -1879
  150. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl/filesystem.h +0 -103
  151. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl.h +0 -375
  152. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl_bind.h +0 -747
  153. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/noxfile.py +0 -88
  154. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__init__.py +0 -11
  155. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__main__.py +0 -52
  156. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.py +0 -12
  157. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.pyi +0 -6
  158. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/commands.py +0 -21
  159. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/py.typed +0 -0
  160. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.py +0 -482
  161. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.pyi +0 -63
  162. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pyproject.toml +0 -41
  163. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.cfg +0 -56
  164. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.py +0 -155
  165. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/CMakeLists.txt +0 -503
  166. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/conftest.py +0 -208
  167. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/constructor_stats.h +0 -275
  168. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/cross_module_gil_utils.cpp +0 -73
  169. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/env.py +0 -33
  170. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/pytest.ini +0 -0
  171. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/test_files.py +0 -279
  172. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/pytest.ini +0 -0
  173. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/test_setuphelper.py +0 -143
  174. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/local_bindings.h +0 -85
  175. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/object.h +0 -179
  176. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_cross_module_tests.cpp +0 -151
  177. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.cpp +0 -91
  178. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.h +0 -85
  179. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pytest.ini +0 -19
  180. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/requirements.txt +0 -12
  181. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.cpp +0 -26
  182. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.py +0 -25
  183. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.cpp +0 -216
  184. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.py +0 -163
  185. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.cpp +0 -286
  186. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.py +0 -536
  187. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.cpp +0 -107
  188. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.py +0 -248
  189. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.cpp +0 -227
  190. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.py +0 -202
  191. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.cpp +0 -84
  192. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.py +0 -210
  193. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.cpp +0 -550
  194. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.py +0 -473
  195. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/CMakeLists.txt +0 -84
  196. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/embed.cpp +0 -21
  197. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +0 -28
  198. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +0 -39
  199. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +0 -46
  200. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/main.cpp +0 -6
  201. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +0 -41
  202. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +0 -35
  203. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +0 -41
  204. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/test.py +0 -10
  205. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.cpp +0 -165
  206. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.py +0 -53
  207. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.cpp +0 -238
  208. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.py +0 -126
  209. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.cpp +0 -141
  210. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.py +0 -117
  211. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.cpp +0 -41
  212. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.py +0 -50
  213. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.cpp +0 -69
  214. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.py +0 -42
  215. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.cpp +0 -348
  216. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.py +0 -771
  217. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/CMakeLists.txt +0 -47
  218. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/catch.cpp +0 -22
  219. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/external_module.cpp +0 -23
  220. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.cpp +0 -326
  221. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.py +0 -15
  222. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.cpp +0 -148
  223. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.py +0 -272
  224. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.cpp +0 -119
  225. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.py +0 -51
  226. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval_call.py +0 -5
  227. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.cpp +0 -285
  228. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.h +0 -12
  229. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.py +0 -265
  230. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.cpp +0 -397
  231. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.py +0 -520
  232. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.cpp +0 -49
  233. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.py +0 -94
  234. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.cpp +0 -125
  235. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.py +0 -331
  236. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.cpp +0 -153
  237. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.py +0 -284
  238. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.cpp +0 -107
  239. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.py +0 -257
  240. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.cpp +0 -412
  241. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.py +0 -517
  242. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.cpp +0 -102
  243. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.py +0 -92
  244. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.cpp +0 -233
  245. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.py +0 -360
  246. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.cpp +0 -472
  247. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.py +0 -593
  248. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.cpp +0 -524
  249. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.py +0 -441
  250. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.cpp +0 -103
  251. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.py +0 -267
  252. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.cpp +0 -73
  253. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.py +0 -59
  254. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.cpp +0 -235
  255. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.py +0 -146
  256. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.cpp +0 -189
  257. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.py +0 -82
  258. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.cpp +0 -560
  259. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.py +0 -651
  260. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.cpp +0 -500
  261. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.py +0 -253
  262. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.cpp +0 -452
  263. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.py +0 -318
  264. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.cpp +0 -342
  265. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.py +0 -291
  266. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.cpp +0 -131
  267. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.py +0 -318
  268. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.cpp +0 -144
  269. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.py +0 -29
  270. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.cpp +0 -66
  271. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.py +0 -44
  272. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.cpp +0 -22
  273. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.py +0 -9
  274. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.cpp +0 -510
  275. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.py +0 -408
  276. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-numpy-scipy.supp +0 -140
  277. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-python.supp +0 -117
  278. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindCatch.cmake +0 -70
  279. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindEigen3.cmake +0 -86
  280. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindPythonLibsNew.cmake +0 -257
  281. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/check-style.sh +0 -44
  282. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/cmake_uninstall.cmake.in +0 -23
  283. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/libsize.py +0 -39
  284. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/make_changelog.py +0 -64
  285. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Common.cmake +0 -402
  286. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Config.cmake.in +0 -233
  287. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11NewTools.cmake +0 -276
  288. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Tools.cmake +0 -214
  289. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pyproject.toml +0 -3
  290. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_global.py.in +0 -65
  291. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_main.py.in +0 -41
  292. xcoll/scattering_routines/geant4/collimasim/pyproject.toml +0 -8
  293. xcoll/scattering_routines/geant4/collimasim/setup.py +0 -144
  294. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.cpp +0 -403
  295. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.hh +0 -100
  296. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.cpp +0 -763
  297. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.hh +0 -118
  298. xcoll/scattering_routines/geant4/collimasim/src/collimasim/__init__.py +0 -8
  299. xcoll/scattering_routines/geant4/collimasim/src/collimasim/bindings.cpp +0 -63
  300. xcoll/scattering_routines/geant4/collimasim/src/collimasim/pyCollimatorPass.py +0 -142
  301. xcoll/scattering_routines/geant4/collimasim/src/collimasim/xtrack_collimator.py +0 -556
  302. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/PKG-INFO +0 -6
  303. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/SOURCES.txt +0 -24
  304. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/dependency_links.txt +0 -1
  305. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/not-zip-safe +0 -1
  306. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/top_level.txt +0 -1
  307. xcoll/scattering_routines/geant4/collimasim/tests/README.md +0 -25
  308. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_forions.dat +0 -25
  309. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_new_example.dat +0 -18
  310. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_old_example.dat +0 -68
  311. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_testing.dat +0 -15
  312. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_yaml_example.yaml +0 -110
  313. xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps.dat +0 -7
  314. xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps_pyat_test.dat +0 -3
  315. xcoll/scattering_routines/geant4/collimasim/tests/resources/collonly_twiss_file_example.tfs +0 -54
  316. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings.gmad +0 -3
  317. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings_black_absorber.gmad +0 -3
  318. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings_ions.gmad +0 -5
  319. xcoll/scattering_routines/geant4/collimasim/tests/resources/twiss_file_testing.tfs +0 -51
  320. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat.py +0 -65
  321. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_passmethod.py +0 -59
  322. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_tracking.py +0 -102
  323. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack.py +0 -75
  324. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_angle.py +0 -74
  325. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_colldb_load.py +0 -84
  326. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_interaction.py +0 -159
  327. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_interaction_ion.py +0 -99
  328. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_ions.py +0 -78
  329. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_lost_energy.py +0 -88
  330. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tilt.py +0 -80
  331. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tracking.py +0 -97
  332. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tracking_ions.py +0 -96
  333. xcoll-0.5.12.dist-info/RECORD +0 -415
  334. {xcoll-0.5.12.dist-info → xcoll-0.6.1.dist-info}/LICENSE +0 -0
  335. {xcoll-0.5.12.dist-info → xcoll-0.6.1.dist-info}/NOTICE +0 -0
  336. {xcoll-0.5.12.dist-info → xcoll-0.6.1.dist-info}/WHEEL +0 -0
@@ -107,7 +107,7 @@ double* scamcs(LocalParticle* part, double x0, double xp0, double s) {
107
107
 
108
108
 
109
109
  /*gpufun*/
110
- void mcs(EverestData restrict everest, LocalParticle* part, double length, double p, int edge_check){
110
+ void mcs(EverestData restrict everest, LocalParticle* part, double length, double pc, int edge_check){
111
111
  InteractionRecordData record = everest->coll->record;
112
112
  RecordIndex record_index = everest->coll->record_index;
113
113
  int8_t sc = everest->coll->record_scatterings;
@@ -118,7 +118,7 @@ void mcs(EverestData restrict everest, LocalParticle* part, double length, doubl
118
118
 
119
119
  double const radl = everest->coll->radl;
120
120
  double s;
121
- double theta = 13.6e-3/p;
121
+ double theta = 13.6e-3/pc;
122
122
  double h = 0.001;
123
123
  double dh = 0.0001;
124
124
  double bn0 = 0.4330127019;
@@ -27,23 +27,29 @@ double nuclear_interaction(EverestData restrict everest, LocalParticle* part, do
27
27
  ichoix += 1;
28
28
  }
29
29
 
30
- //Do the interaction
30
+ // Do the interaction
31
+ // Scattered angle is cos theta = 1 + t / (2p^2) for elastic scattering
32
+ // from Mandelstam t = (p1-p3)^2) = 2m^2 - 2E1E3 + 2p1.p3
33
+ // if elastic, p1 = p3, and hence t = 2m^2 - 2(m^2 + p^2) + 2p^2 cos(theta)
31
34
  int64_t i_slot = -1;
32
35
  if (ichoix==1) {
33
36
  if (sc) i_slot = InteractionRecordData_log(record, record_index, part, XC_ABSORBED);
34
37
  LocalParticle_set_state(part, XC_LOST_ON_EVEREST_COLL);
35
38
 
36
39
  } else {
37
- double teta;
38
- if (ichoix==2) { // p-n elastic
40
+ double sqrt_t_p;
41
+ if (ichoix==2) {
42
+ // p-n elastic
39
43
  if (sc) i_slot = InteractionRecordData_log(record, record_index, part, XC_PN_ELASTIC);
40
- teta = sqrt(RandomExponential_generate(part)/everest->bn)/pc;
44
+ sqrt_t_p = sqrt(RandomExponential_generate(part)/everest->bn)/pc;
41
45
 
42
- } else if (ichoix==3) { // p-p elastic
46
+ } else if (ichoix==3) {
47
+ // p-p elastic
43
48
  if (sc) i_slot = InteractionRecordData_log(record, record_index, part, XC_PP_ELASTIC);
44
- teta = sqrt(RandomExponential_generate(part)/everest->bpp)/pc;
49
+ sqrt_t_p = sqrt(RandomExponential_generate(part)/everest->bpp)/pc;
45
50
 
46
- } else if (ichoix==4) { // Single diffractive
51
+ } else if (ichoix==4) {
52
+ // Single diffractive
47
53
  if (sc) i_slot = InteractionRecordData_log(record, record_index, part, XC_SINGLE_DIFFRACTIVE);
48
54
  double xm2 = exp(RandomUniform_generate(part)*everest->xln15s);
49
55
  double bsd;
@@ -56,25 +62,35 @@ double nuclear_interaction(EverestData restrict everest, LocalParticle* part, do
56
62
  }
57
63
  double pc_in = pc;
58
64
  pc = pc*(1 - xm2/everest->ecmsq);
59
- // Corrected 1/p into 1/sqrt(pp')
60
- teta = sqrt(RandomExponential_generate(part)/bsd)/sqrt(pc_in*pc);
65
+ if (pc <= 1.e-9 || pc != pc) {
66
+ // Very small (<1eV) or NaN
67
+ if (sc) InteractionRecordData_log(record, record_index, part, XC_ABSORBED);
68
+ LocalParticle_set_state(part, XC_LOST_ON_EVEREST_COLL);
69
+ pc = 1.e-9;
70
+ sqrt_t_p = 0;
71
+ } else {
72
+ // Corrected 1/p into 1/sqrt(pp')
73
+ sqrt_t_p = sqrt(RandomExponential_generate(part)/bsd)/sqrt(pc_in*pc);
74
+ }
61
75
 
62
- } else { // Coulomb
76
+ } else {
77
+ // Coulomb
63
78
  if (sc) i_slot = InteractionRecordData_log(record, record_index, part, XC_COULOMB);
64
- teta = sqrt(RandomRutherford_generate(everest->coll->rng, part))/pc;
79
+ sqrt_t_p = sqrt(RandomRutherford_generate(everest->coll->rng, part))/pc;
65
80
  }
66
81
 
67
- // TODO: I am not convinced that we can just sample two independent random numbers
68
- // I believe it should be tan(tx) = cos(phi) * tan(teta) and tan(ty) = sin(phi) * tan(teta)
69
- // with phi uniformly sampled between 0 and 2 pi
70
- double tx = teta*RandomNormal_generate(part);
71
- double tz = teta*RandomNormal_generate(part);
82
+ // theta = arccos(1 + t/(2p^2)) => tan(theta) = sqrt( -t/p^2 * (1 + t/(4p^2)) ) / (1 + t/(2p^2))
83
+ // Note that in elastic scattering, t < 0, but we sampled t > 0 so we need to flip the sign
84
+ double tan_theta = sqrt_t_p * sqrt(1 - sqrt_t_p*sqrt_t_p/4)/(1 - sqrt_t_p*sqrt_t_p/2);
85
+ double alpha = 2*M_PI*RandomUniform_generate(part);
86
+ double tan_theta_x = tan_theta*cos(alpha);
87
+ double tan_theta_y = tan_theta*sin(alpha);
72
88
 
73
- //Change the angles
89
+ // Change the angles
74
90
  #ifdef XCOLL_USE_EXACT
75
- LocalParticle_add_to_exact_xp_yp(part, tx, tz);
91
+ LocalParticle_add_to_exact_xp_yp(part, tan_theta_x, tan_theta_y);
76
92
  #else
77
- LocalParticle_add_to_xp_yp(part, tx, tz);
93
+ LocalParticle_add_to_xp_yp(part, tan_theta_x, tan_theta_y);
78
94
  #endif
79
95
 
80
96
  if (sc) InteractionRecordData_log_child(record, i_slot, part);
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
  /*gpufun*/
14
- void calculate_scattering(EverestData restrict everest, double p) {
14
+ void calculate_scattering(EverestData restrict everest, double pc) {
15
15
  if (everest->coll->only_mcs){ // TODO: this should be done smarter
16
16
  return;
17
17
  }
@@ -26,7 +26,7 @@ void calculate_scattering(EverestData restrict everest, double p) {
26
26
 
27
27
  double csect[6];
28
28
 
29
- everest->ecmsq = 2*XC_PROTON_MASS*1.0e-3*p;
29
+ everest->ecmsq = 2*XC_PROTON_MASS*1.0e-3*pc;
30
30
  double ecmsq = everest->ecmsq;
31
31
  everest->xln15s = log(0.15*ecmsq);
32
32
 
@@ -93,76 +93,7 @@ void calculate_scattering(EverestData restrict everest, double p) {
93
93
 
94
94
 
95
95
  /*gpufun*/
96
- void calculate_ionisation_properties(EverestData restrict everest, double pc) {
97
- if (everest->coll->only_mcs){ // TODO: this should be done smarter
98
- return;
99
- }
100
-
101
- // Material properties
102
- double const exenergy = everest->coll->exenergy;
103
- double const rho = everest->coll->rho;
104
- double const anuc = everest->coll->anuc;
105
- double const zatom = everest->coll->zatom;
106
-
107
- // Energy variables
108
- double momentum = pc*1.0e3; // [MeV]
109
- double energy = sqrt(pow(momentum, 2.) + pow(XC_PROTON_MASS, 2.)); // [MeV]
110
- double gammar = energy/XC_PROTON_MASS;
111
- double betar = momentum/energy;
112
- double bgr = betar*gammar;
113
- double mep = XC_ELECTRON_MASS/XC_PROTON_MASS; // Electron/proton
114
-
115
- // tmax is max energy loss from kinematics
116
- double tmax = 2.*XC_ELECTRON_MASS*pow(bgr, 2.)/ (1. + 2.*gammar*mep + pow(mep, 2.)); // [MeV]
117
- double plen = sqrt(rho*zatom/anuc)*28.816e-6; // [MeV]
118
-
119
- everest->energy_loss = 0.5*log(2.*XC_ELECTRON_MASS*bgr*bgr*tmax/pow(exenergy, 2.)) + 0.5;
120
- everest->energy_loss -= pow(betar, 2.);
121
- everest->energy_loss -= log(plen/exenergy);
122
- everest->energy_loss -= log(bgr);
123
- everest->energy_loss *= XC_BETHE_BLOCH*zatom/(anuc* pow(betar, 2.))*rho*1.0e-1; // [GeV/m]
124
-
125
- everest->energy_loss_tail = 0.5*log(2*XC_ELECTRON_MASS*bgr*bgr*tmax/pow(exenergy, 2.)) + 0.5;
126
- everest->energy_loss_tail -= pow(betar, 2.);
127
- everest->energy_loss_tail -= log(plen/exenergy);
128
- everest->energy_loss_tail -= log(bgr);
129
- everest->energy_loss_tail += pow(tmax, 2.)/(8.*pow(energy, 2.));
130
- everest->energy_loss_tail *= XC_BETHE_BLOCH*zatom/(anuc*pow(betar, 2.))*rho*1.0e-1; // [GeV/m]
131
-
132
- double Tt = everest->energy_loss*1.0e3 + XC_BETHE_BLOCH*zatom*4.0e2*rho/(anuc*pow(betar, 2.)); // [MeV/m]
133
-
134
- // Calculate different coefficients for terms in dz (length) to get the tail probability
135
- double const prob_factor = rho*1.e2*XC_BETHE_BLOCH*zatom/(anuc*pow(betar, 2.));
136
- everest->prob_tail_c1 = prob_factor * 0.5 / Tt;
137
- everest->prob_tail_c2 = prob_factor * (
138
- tmax/(4.*pow(energy, 2.)) - 0.5/tmax
139
- - log(tmax/Tt)*pow(betar,2.)/(2.*tmax)
140
- ); // * dz
141
- everest->prob_tail_c3 = prob_factor * pow(betar,2.)/(2.*tmax); // * dz * log(dz)
142
- everest->prob_tail_c4 = -prob_factor * Tt/(4.*pow(energy, 2.)); // * dz * dz
143
- }
144
-
145
-
146
- /*gpufun*/
147
- double calcionloss(EverestData restrict everest, LocalParticle* part, double length) {
148
-
149
- #ifdef XCOLL_REFINE_ENERGY
150
- calculate_ionisation_properties(everest, pc);
151
- #endif
152
-
153
- double prob_tail = everest->prob_tail_c1 + everest->prob_tail_c2 * length
154
- + everest->prob_tail_c3 * length * log(length) + everest->prob_tail_c4 * length * length;
155
-
156
- if (RandomUniform_generate(part) < prob_tail) {
157
- return everest->energy_loss_tail;
158
- } else {
159
- return everest->energy_loss;
160
- }
161
- }
162
-
163
-
164
- /*gpufun*/
165
- double calculate_dechanneling_length(EverestData restrict everest, double pc) {
96
+ double calculate_dechannelling_length(EverestData restrict everest, double pc) {
166
97
  // Material properties
167
98
  double const exenergy = everest->coll->exenergy;
168
99
 
xcoll/xaux.py CHANGED
@@ -1,117 +1,73 @@
1
1
  # copyright ############################### #
2
2
  # This file is part of the Xcoll Package. #
3
- # Copyright (c) CERN, 2024. #
3
+ # Copyright (c) CERN, 2025. #
4
4
  # ######################################### #
5
5
 
6
- import functools
7
- from pathlib import Path
8
-
9
- FsPath = Path
10
-
11
-
12
- def singleton(cls):
13
- # Store the original __new__ method if it exists
14
- original_new = cls.__new__ if hasattr(cls, '__new__') else None
15
-
16
- # Define a new __new__ method for the singleton
17
- def singleton_new(cls, *args, **kwargs):
18
- if not hasattr(cls, 'instance'):
19
- cls.instance = (original_new(cls, *args, **kwargs)
20
- if original_new
21
- else super(cls, cls).__new__(cls))
22
- cls.instance._initialised = False
23
- return cls.instance
24
- cls.__new__ = singleton_new
25
-
26
- # Define the get_self method
27
- @classmethod
28
- def get_self(cls, **kwargs):
29
- # Filter kwargs to include only ClassProperty attributes
30
- filtered_kwargs = {key: value for key, value in kwargs.items()
31
- if key in ClassProperty.get_properties(cls) or
32
- key in getattr(cls, '_xofields', {})}
33
- return cls(**filtered_kwargs)
34
- cls.get_self = get_self
35
-
36
- return cls
37
-
38
-
39
-
40
- class ClassPropertyMeta(type):
41
- def __setattr__(cls, key, value):
42
- # Check if the attribute is a ClassProperty
43
- for parent in cls.__mro__:
44
- if key in parent.__dict__ and isinstance(parent.__dict__[key], ClassProperty):
45
- return parent.__dict__[key].__set__(cls, value)
46
- return super(ClassPropertyMeta, cls).__setattr__(key, value)
6
+ # Tenporary file that defines xaux tools - to be used until xaux is in main Xsuite release cycle
47
7
 
8
+ import os
9
+ import base64
10
+ import shutil
11
+ import inspect
12
+ import functools
13
+ import numpy as np
14
+ from pathlib import PosixPath
48
15
 
49
- class ClassProperty:
50
- _registry = {} # Registry to store ClassProperty names for each class
51
16
 
52
- @classmethod
53
- def get_properties(cls, owner, parents=True):
54
- if not parents:
55
- return cls._registry.get(owner, [])
17
+ class FsPath(PosixPath):
18
+ def copy_to(self, other, **kwargs):
19
+ if self.is_dir():
20
+ shutil.copytree(self, other / self.name, dirs_exist_ok=True)
56
21
  else:
57
- return [prop for parent in owner.__mro__
58
- for prop in cls._registry.get(parent, [])]
59
-
60
- def __init__(self, fget=None, fset=None, fdel=None, doc=None):
61
- functools.update_wrapper(self, fget)
62
- self.fget = fget
63
- self.fset = fset
64
- self.fdel = fdel
65
- if doc is None and fget is not None:
66
- doc = fget.__doc__
67
- self.__doc__ = doc
68
-
69
- def __set_name__(self, owner, name):
70
- self.name = name
71
- # Verify that the class is a subclass of ClassPropertyMeta
72
- if ClassPropertyMeta not in type(owner).__mro__:
73
- raise AttributeError(f"Class `{owner.__name__}` must be a subtype of ClassPropertyMeta!")
74
- # Add the property name to the registry for the class
75
- if owner not in ClassProperty._registry:
76
- ClassProperty._registry[owner] = []
77
- ClassProperty._registry[owner].append(name)
78
- # Create default getter, setter, and deleter
79
- if self.fget is None:
80
- def _getter(*args, **kwargs):
81
- raise AttributeError(f"Unreadable attribute `{name}` for class {owner.__name__}!")
82
- self.fget = _getter
83
- if self.fset is None:
84
- def _setter(self, *args, **kwargs):
85
- raise AttributeError(f"Can't set attribute `{name}` for class {owner.__name__}!")
86
- self.fset = _setter
87
- if self.fdel is None:
88
- def _deleter(*args, **kwargs):
89
- raise AttributeError(f"Can't delete attribute `{name}` for class {owner.__name__}!")
90
- self.fdel = _deleter
91
-
92
- def __get__(self, instance, owner):
93
- if owner is None:
94
- owner = type(instance)
95
- try:
96
- return self.fget(owner)
97
- except ValueError:
98
- # Return a fallback if initialization fails
99
- return None
100
-
101
- def __set__(self, cls, value):
102
- self.fset(cls, value)
103
-
104
- def __delete__(self, instance):
105
- self.fdel(instance.__class__)
106
-
107
- def getter(self, fget):
108
- self.fget = fget
109
- return self
110
-
111
- def setter(self, fset):
112
- self.fset = fset
113
- return self
114
-
115
- def deleter(self, fdel):
116
- self.fdel = fdel
117
- return self
22
+ shutil.copy(self, other)
23
+ def move_to(self, other, **kwargs):
24
+ shutil.move(self, other)
25
+ def rmtree(self, *args, **kwargs):
26
+ shutil.rmtree(self, *args, **kwargs)
27
+
28
+
29
+
30
+ def ranID(*, length=12, size=1, only_alphanumeric=False):
31
+ """Base64 encoded random ID.
32
+ Args:
33
+ length (int): Length of the ID string, rounded up to
34
+ the closest multiple of 4. Default 12.
35
+ size (int): Number of random IDs to generate.
36
+ Default 1.
37
+ only_alphanumeric (bool): If True, only alphanumeric
38
+ characters are used. Default False.
39
+ Returns:
40
+ str: Random ID string.
41
+ """
42
+ if length < 1:
43
+ raise ValueError("Length must be greater than 0!")
44
+ if size < 1:
45
+ raise ValueError("Size must be greater than 0!")
46
+ if size > 1:
47
+ return [ranID(length=length, only_alphanumeric=only_alphanumeric)
48
+ for _ in range(size)]
49
+ length = int(np.ceil(length/4))
50
+ if only_alphanumeric:
51
+ ran = ''
52
+ for _ in range(length):
53
+ while True:
54
+ this_ran = ranID(length=4, only_alphanumeric=False)
55
+ if this_ran.isalnum():
56
+ break
57
+ ran += this_ran
58
+ return ran
59
+ else:
60
+ random_bytes = os.urandom(3*length)
61
+ return base64.urlsafe_b64encode(random_bytes).decode('utf-8')
62
+
63
+
64
+
65
+ def count_required_arguments(func):
66
+ i = 0
67
+ sig = inspect.signature(func)
68
+ for param in sig.parameters.values():
69
+ if (param.kind == inspect.Parameter.POSITIONAL_ONLY \
70
+ or param.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD) \
71
+ and param.default == inspect.Parameter.empty:
72
+ i += 1
73
+ return i
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xcoll
3
- Version: 0.5.12
3
+ Version: 0.6.1
4
4
  Summary: Xsuite collimation package
5
5
  Home-page: https://github.com/xsuite/xcoll
6
6
  License: Apache 2.0
@@ -18,10 +18,10 @@ Provides-Extra: tests
18
18
  Requires-Dist: numpy (>=1.0)
19
19
  Requires-Dist: pandas (>=1.4)
20
20
  Requires-Dist: ruamel-yaml (>=0.17.31,<0.18.0) ; extra == "tests"
21
- Requires-Dist: xdeps (>=0.8.4)
22
- Requires-Dist: xobjects (>=0.4.6)
23
- Requires-Dist: xpart (>=0.19.3)
24
- Requires-Dist: xtrack (>=0.72.2)
21
+ Requires-Dist: xdeps (>=0.10.5)
22
+ Requires-Dist: xobjects (>=0.5.0)
23
+ Requires-Dist: xpart (>=0.23.0)
24
+ Requires-Dist: xtrack (>=0.84.6)
25
25
  Project-URL: Repository, https://github.com/xsuite/xcoll
26
26
  Description-Content-Type: text/markdown
27
27
 
@@ -0,0 +1,138 @@
1
+ LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
2
+ NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
3
+ xcoll/__init__.py,sha256=wEk3szUGeeN2Bg7_nx2D2pCgzRR0zcbEcWCP33p-e3I,854
4
+ xcoll/__init__.py.orig,sha256=h9YXS-ZlmC-ZWLoLoAe8V175f2xc6E9gfoe_VjRYwBw,1172
5
+ xcoll/beam_elements/__init__.py,sha256=qu2-LefWfEKZHfALGqZo97DTrwdZVh7Sp97V-3XokJU,1189
6
+ xcoll/beam_elements/absorber.py,sha256=Gw1l1ng1MqF0dRTk7YhkiPAoinS5xsTASMxMDWGsmTw,2842
7
+ xcoll/beam_elements/base.py,sha256=mjnzLbZ-GC56N56Eq5r5oQB8cLmeaqR5oEH1-FnS_H4,57816
8
+ xcoll/beam_elements/blowup.py,sha256=0jfuxaIwXsEY4e6DlzGmv29OY7DGRKhbb2L-qKJwImQ,8079
9
+ xcoll/beam_elements/elements_src/black_absorber.h,sha256=AXs_bNLaK8xBl8IeLJvGz7AfFaasruPMtYz8lbRtqG4,4705
10
+ xcoll/beam_elements/elements_src/black_crystal.h,sha256=ZlLkJec4_naeoS3jEx-vQVAKBI0dInzMZq06pzKQOn0,4355
11
+ xcoll/beam_elements/elements_src/blowup.h,sha256=YlTt7YxswLM0ZjPuEjuE7xzjQ3hMt6FX9V3MbqVYmN4,1564
12
+ xcoll/beam_elements/elements_src/emittance_monitor.h,sha256=vlHzQFoUjKQHWBmzpaSzRbILtxSWqEasMtxHC-FFoAc,7078
13
+ xcoll/beam_elements/elements_src/everest_block.h,sha256=ITSzfiqwm8ZNIkAj_odQkAjKhPcdT8b0AUlq_uxtsqI,6562
14
+ xcoll/beam_elements/elements_src/everest_collimator.h,sha256=fkD5GazVv2zlmqyb6s9zVNMq6baXeFb_pf7gg9TKjNc,9787
15
+ xcoll/beam_elements/elements_src/everest_crystal.h,sha256=LISp_9NEWMIi5GvZ3LwPfeSbmsbXvHWcTqxW6eCCsiE,11951
16
+ xcoll/beam_elements/elements_src/transparent_collimator.h,sha256=pA_Fxx85N87iSbpHSjR2OSOx6JN9e38T1pOUKrC7zxs,4610
17
+ xcoll/beam_elements/elements_src/transparent_crystal.h,sha256=DGX4uL0hpm4njOypoPuEWtMzYxnL9jQkf2ZrGaS0alI,4128
18
+ xcoll/beam_elements/everest.py,sha256=iJva_S0OQnmG-qj7rIAiUCssu5WL_Qs5P_n6Qx-IWzo,9080
19
+ xcoll/beam_elements/monitor.py,sha256=baMYT_PNya8KX35ReeMwk5Cm04ePUqiDF_s69L5GTX0,16968
20
+ xcoll/beam_elements/transparent.py,sha256=AZOWfH3dvsetL6DjQGejUgX7T18e_3omIIffG_1gwc0,2894
21
+ xcoll/colldb.py,sha256=WaJC6gkDNVvxo65OhucTM6Fwo6pgRFHNnBnHSkiX7AQ,31054
22
+ xcoll/general.py,sha256=mXL1LaNUxbgXm4AthRJ_7j5oA48cgPDtksQwYmPzLXY,534
23
+ xcoll/general.py.orig,sha256=AvtA-RygKcKCRLDkldzzwG7Q7GlBI49df3aNWe-rr_Y,603
24
+ xcoll/headers/checks.h,sha256=qdXsOTBOK1MwW6bdFF93j4yE648mcDtEv5rGN1w9sfk,1582
25
+ xcoll/headers/particle_states.py,sha256=N8ehLtg99358I4RGCJ3sjuKCk2LVdGqgVx2xGoHrRdM,1959
26
+ xcoll/initial_distribution.py,sha256=CHhqeCVjVOyaBWhfy2sDgLwIgtXZoqcTW-su-M2YByE,10989
27
+ xcoll/initial_distribution.py.orig,sha256=PRZwBtQ2qY_2g6f879IEhUxmNu1tpTArt-qKYNqpjSI,11223
28
+ xcoll/interaction_record/__init__.py,sha256=UFoLiKa-z2oX7YoszP-7Vgdt1nM6kT382v1CaIu8_u0,50
29
+ xcoll/interaction_record/interaction_record.py,sha256=cCjfVCYUJaV0Y-pCljA2_u8GLyhHt7zNjbSXkE7cRO4,13299
30
+ xcoll/interaction_record/interaction_record_src/interaction_record.h,sha256=0rNagnfSGc2i1jauOMIcDbj9QFic9dV_MOyqVx1kw5Q,6067
31
+ xcoll/interaction_record/interaction_types.py,sha256=XTeg2dcImMpqhTqzkJKh6JYam2v9gUMhED-dDKLsilk,2894
32
+ xcoll/line_tools.py,sha256=JBySkKKZ-RGumqAZF_8PSQ3OV0M87P78NeQgbXAdFc4,16699
33
+ xcoll/lossmap.py,sha256=HLdhej9tUjk36T5BulVWurJtfiNa61L_1X7-8kT6JoQ,28407
34
+ xcoll/plot.py,sha256=27fYdXstPg3o8XyeBlPuD2yz0GR3dKkNWy4kO2BD9WA,4071
35
+ xcoll/rf_sweep.py,sha256=hMgW15uTp7qPprdlHCZBjOOe8Emdm-R0TfxPDoRXnJU,9021
36
+ xcoll/scattering_routines/engine.py,sha256=1VCBEZLMd5orFo3sZqK51NrqbqELBVrbsz6bB2SXsFQ,22962
37
+ xcoll/scattering_routines/environment.py,sha256=xZ8A7XfvSfpe8vYbM5oD5qbcp8Tuag5qWAI6VqgGUlA,12033
38
+ xcoll/scattering_routines/everest/__init__.py,sha256=7lkkeZ1liBjXVHCuRpgzZI6ohzHVMj5uJBO792147XY,286
39
+ xcoll/scattering_routines/everest/amorphous.h,sha256=8v_5P94LDxeLp1xI2nvwdbEPJNDY6LTB1CwXv4AwjZs,11806
40
+ xcoll/scattering_routines/everest/channelling.h,sha256=WrYBcvGWP2Da47__AGbbKsT8yvZmHhVZd5F1gku--GU,10941
41
+ xcoll/scattering_routines/everest/constants.h,sha256=_y9QqKAUSwPOkk8A4BF8ILNdDDJf66eINJwda8skwZM,1380
42
+ xcoll/scattering_routines/everest/crystal_parameters.h,sha256=QtmSQM4qzVXfjdkxs0ns8utqtqZ_u-Ej_y6m7UOKITo,6001
43
+ xcoll/scattering_routines/everest/everest.h,sha256=T9mESIy_oC86WJSsU7LY_A0iqHT2PKl5MmhnKQaGVSg,3200
44
+ xcoll/scattering_routines/everest/everest.py,sha256=aKy5d7HGiqEphFZDZE4RnYbxh0j10Boc04EZ0By9WdM,1542
45
+ xcoll/scattering_routines/everest/ionisation_loss.h,sha256=QIujj_qrKOY7L7CVFNSyexjlDJ94sfilvakhfWVfe44,6108
46
+ xcoll/scattering_routines/everest/jaw.h,sha256=4Ml9FofWPkGlvw6oWNdbZQIYV4K1xhfbEkNwwfDcITc,2069
47
+ xcoll/scattering_routines/everest/materials.py,sha256=pKQfrMNrqU3sitICTRjqfvwsvHrBDSUf3jfmOEE5Kls,10292
48
+ xcoll/scattering_routines/everest/multiple_coulomb_scattering.h,sha256=oX_ZN32eLcZX3VdYn4kAnT5wMKVTe4fLudPgbX9w37Y,5434
49
+ xcoll/scattering_routines/everest/nuclear_interaction.h,sha256=07yg9AD3jAfPetFVSY6cXT0iN5tBCrXXmYWvGMTaUDI,3892
50
+ xcoll/scattering_routines/everest/properties.h,sha256=AJf7Q_iPsiXTavnguzsNozdoH4NYGdDvyqP3iXychKU,3845
51
+ xcoll/scattering_routines/fluka/flukaio/.git,sha256=5ZxurpwP1waJk2Zu2AstENGOp4rXU8-C-oU4CypmIVI,73
52
+ xcoll/scattering_routines/fluka/flukaio/.gitignore,sha256=bhrpWiAnKChkcwIaIPX_zKxyG2nCtNzNgQAHnIJa8Fw,12
53
+ xcoll/scattering_routines/fluka/flukaio/CMakeLists.txt,sha256=iWWqTC26UqcuQWQj_JCKtX6iiOb7arnhQ9kOo1fDVkE,591
54
+ xcoll/scattering_routines/fluka/flukaio/ComponentMakefile,sha256=JgZVBFGEe1NtNWoCFBQQQuqUU63CuUsJ01y7C8yoR8c,5951
55
+ xcoll/scattering_routines/fluka/flukaio/Makefile,sha256=2RMI62VExb2Wx7J031hHIVhhv6p8mfUc7_vynGcskrw,3404
56
+ xcoll/scattering_routines/fluka/flukaio/README,sha256=jn-0UQ7MOjy9xXbw5VTkOjgq2j1W7B2zE35DRspHhRA,611
57
+ xcoll/scattering_routines/fluka/flukaio/doc/Doxyfile,sha256=jo47N7f4AR-KPiL36Jj9Za5F1Frp8eRL845F6siC3jc,65455
58
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO.asciidoc,sha256=vvEaZ7SI3wit3OjNPEDDqjOWD8u3SzFzJrPrG_eQhzg,45517
59
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO.epub,sha256=msmaZhUq_iaUvfT4wMiKXwzcJwleeFb77qD_ioX7cqE,138089
60
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO.html,sha256=lxRW82DbktTH3wCm8DACwyeSD7pb3VIW6QnTdS75hsc,74567
61
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO.pdf,sha256=xsOPD4gFpe7PnQyEQIfxk0PekjK4YJtxTvrF_aX-Xag,233955
62
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__1.png,sha256=RjuZmNCDHSryVvqGaVTHBGOnxocNgIGMnkwjTT2kPmA,36021
63
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__2.png,sha256=YXtIj92Obu-Tml4ScibCJbfNo3egjIGoe7mSP7FXMdY,2904
64
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__3.png,sha256=jsRi-MYzLU8TCcMrilp20dDZ8cZYWRL3AebGts0D-UU,23826
65
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__4.png,sha256=v1_945h1-oEps38VyOdfIJLKcJEledckzFB_JXfagso,3956
66
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__5.png,sha256=dD0qouz9OBy8LNAeNrc_SyBJdNlEw9Y9S7GGftMZoXk,7017
67
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__6.png,sha256=_w_PLC7SbmfFC-yXuuw-wJdBPlZOsyCbA84Q9yHY0Mg,33614
68
+ xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__7.png,sha256=sOPu0rKPsKtb9-zJmP0APMl1Swf6DQzvOwa2Wd3balU,51182
69
+ xcoll/scattering_routines/fluka/flukaio/doc/Makefile,sha256=HzLTLkzE4v-fkZH_q139T9KGm5jqDlDUanm4T-NrAh8,146
70
+ xcoll/scattering_routines/fluka/flukaio/doc/docbook.xsl,sha256=C5fAdTixTP0Y1AgxEGuhXfBMHRKQUfu4_8HkGUaDT08,74068
71
+ xcoll/scattering_routines/fluka/flukaio/include/Connection.h,sha256=gAlJAJoi0DV7OrRDlnc2yxf9EE1m1TNY1Tx3UC7UVDk,2793
72
+ xcoll/scattering_routines/fluka/flukaio/include/FlukaIO.h,sha256=ROly1bNu8vAMRSSHCA1w3Ffe8EUttu5g_WusKyVbKVY,1976
73
+ xcoll/scattering_routines/fluka/flukaio/include/FlukaIOServer.h,sha256=81_z_od7Iu-kZIy3uKa4Qaoiz7HXzF8mBdAgEZN7CNE,757
74
+ xcoll/scattering_routines/fluka/flukaio/include/FortranFlukaIO.h,sha256=7e18HlHpPzcfbuVtw5YcvGCmCWcZ6PIZw1j8Ao-u32s,5954
75
+ xcoll/scattering_routines/fluka/flukaio/include/Message.h,sha256=7UWWjCGwNEcVjee2c32CYDXPKAGvds-JFv7P-Penmqc,1731
76
+ xcoll/scattering_routines/fluka/flukaio/include/ParticleInfo.h,sha256=9-LEorFn0_uTxH7cnN8VS_B1m4C0Jokj1S--5I9mJ24,1328
77
+ xcoll/scattering_routines/fluka/flukaio/lib/libFlukaIO64.a,sha256=EyPMYXw-gGyro22gbMzHVQ2x2otddQhlqadP_b45XNA,82884
78
+ xcoll/scattering_routines/fluka/flukaio/lib/libFlukaIO64.so,sha256=RhlyKPX_KqxlOlxd0mllVtxCCFXwHgzhHVAnDIugdaE,66688
79
+ xcoll/scattering_routines/fluka/flukaio/samples/ClientTest.c,sha256=tm-xzz169gsbAC6OWIYcngZeNpc3RhxHlvPYNCoiA6Y,2907
80
+ xcoll/scattering_routines/fluka/flukaio/samples/ServerTest.c,sha256=s-x2KbssquSUda4yLAb0pRLqUOfdsS3US_enedCpiVA,2330
81
+ xcoll/scattering_routines/fluka/flukaio/samples/fclient.f,sha256=lF7G0xgpdteRSNtNWiZVG4kkeiKduwrk-WufFb8EtXc,3629
82
+ xcoll/scattering_routines/fluka/flukaio/samples/fserver.f,sha256=SO1bkHvlw52GC1mw17G0k05XfhosdHiXkq4qYaNAPp0,2995
83
+ xcoll/scattering_routines/fluka/flukaio/src/Connection.c,sha256=WlQpBki9bIausYuZyZqXNnyDfTyVFTO4iSFVutn7gFU,5769
84
+ xcoll/scattering_routines/fluka/flukaio/src/Connection.d,sha256=w1ijLCfHpVGm7UNvORrezmjgVyBQPn4GifiOWXaYb4s,5882
85
+ xcoll/scattering_routines/fluka/flukaio/src/Connection.o,sha256=qyEuE5B-L2awz6KWdU1ER4mptA1n-qpYh72-4k6js5o,13008
86
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.c,sha256=yRKw5BizRyS_G2dnD61HH2ManwYqoAEfMEkZhEPV7MI,4804
87
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.d,sha256=CUaHIRw5C7_SptwLSJBOML33XvE7lZWhJzfuBXKirw8,3829
88
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.o,sha256=SZuNUlyt0fVb0k7_ypbTRlSX7bsbtyEN14VsBFb93vg,12440
89
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.c,sha256=GMsE2lk32f5K-8bbYC7fJYZU5C_sMxTa6zkqNR215XM,1541
90
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.d,sha256=fSxhMLdzngyIK6WgIySYL4dZzWQRDAlb4FEHMwIZmA0,2445
91
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.h,sha256=S6ksRwhjGPJ2CxRagP43pXsXnJV90tGVVt7lEREXoFE,288
92
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.o,sha256=uKzcFMpTnR-6ZQt77vkNGS9HhMIIQWL12VjvCEA-YNE,7664
93
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.c,sha256=EQV_XaZ6iqCBkguX-3ojtyBw3zKjAqksIqr9djd6hnU,1925
94
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.d,sha256=QXDFEiuImczHPlhBm1CceKLKRjqCnH7514L2t-1Vh-0,5905
95
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.o,sha256=q89-SL6XaZx76XSZ6Vq8yvJqY_YQtOeXlb5fFuwjctE,7536
96
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer_private.h,sha256=VZpGHBS5bLuN7j_WRxCye1cNgxK6LPfo6gW7X47T-QE,396
97
+ xcoll/scattering_routines/fluka/flukaio/src/FlukaIO_private.h,sha256=t459fyfh8KTW2y2kVAjzBKUDzppnypkBE0IjLKxkEzs,421
98
+ xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.c,sha256=2lHLmtFYvITsuFbJ9_OU11ry3IPkOmmKQIorZQ4XyR0,11512
99
+ xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.d,sha256=fdq8pRR-0ulVlvanaiTCLQPBKLNTxj9hOkqNADcqjcI,3240
100
+ xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.o,sha256=1HwWdEr_g2E3Fc6p8DZuiBWJOAA52PDwP5TpzZOENB8,23400
101
+ xcoll/scattering_routines/fluka/flukaio/src/NetIO.c,sha256=tZwvJEA1fuoOC54i6E0GISEaiRMJt3HgqXKTqtxFeuc,6361
102
+ xcoll/scattering_routines/fluka/flukaio/src/NetIO.d,sha256=p9yB2w56mNwi9-XgF69YXF9pJyEiQQYo6D99Y9aFbv8,5716
103
+ xcoll/scattering_routines/fluka/flukaio/src/NetIO.h,sha256=hv0-sQ9aMcOyBh6QfKgR3ibIe37k8szm8dc1-45UG_U,902
104
+ xcoll/scattering_routines/fluka/flukaio/src/NetIO.o,sha256=eZUZ5JzAXijE4IhRnWU5BUnHJhA97XNRhL70-mX452I,16816
105
+ xcoll/scattering_routines/fluka/flukaio/src/tags,sha256=nXICMFzoWSyZKssmB6uviGaI3cLd_u4gBku2NNTNWNU,14484
106
+ xcoll/scattering_routines/fluka/flukaio/tests/AllTests.cpp,sha256=4ChxFO2TpNmwNiMEI-UHMYLg62y6K5iEBGcoKZiCDpI,166
107
+ xcoll/scattering_routines/fluka/flukaio/tests/CommonTest.h,sha256=CZtIENoRY_D_BVRuS3eIiii1G-EPKpxHUh4E4cwfqmg,152
108
+ xcoll/scattering_routines/fluka/flukaio/tests/ConnectionTest.cpp,sha256=Z9MQu0R7xRQEBnAA9rG7b-EqJnyiawBlGkhz-pATvEM,2464
109
+ xcoll/scattering_routines/fluka/flukaio/tests/FlukaIOServerTest.cpp,sha256=GJMyEcJ2E9XtvbQx3Huxr7h_bsEqfqSMaoSU0Mw-MV8,1851
110
+ xcoll/scattering_routines/fluka/flukaio/tests/FlukaIOTest.cpp,sha256=9iOsTJlR8BmDeOn16bb4Zk_Pwxyem6hhi6jdKS7TGPo,11293
111
+ xcoll/scattering_routines/fluka/flukaio/tests/FortranFlukaIOTest.cpp,sha256=28aX0J-63kzuwDsB5KrrQ9-m_KE4FE9cVMJk6GKQGyg,14331
112
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeConnection.c,sha256=w1ggaUuolcg_5IwP_iY2ZV7FMHjrdOTfhj_k-ReRpCQ,526
113
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeConnection.h,sha256=fXR8m7OhG4QwYyyb0vFrXyXVg6F37ooSED8LkIj2Ieo,226
114
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIO.c,sha256=o6Nh82ILb4qY_g3hdoM2_J8saffeBnOLzCeQrugwcxg,2244
115
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIO.h,sha256=_cKsqrwvMstieLWdxsUfStsXhm_TcnwtoGUxp2AE-As,1660
116
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIOHandshake.c,sha256=Kv89mqdpYJabbjbDNESpsCZgWhb-D7NB1ktoNxVMmrw,549
117
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIOHandshake.h,sha256=GWX3oySTSnd_K84hmT1WqAKBmViaohmd_18Ii7uhlX4,395
118
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIOServer.c,sha256=dfZVteG9cKqtvEefROUWWcdXnhYDqEyNoc4OyisrUzA,360
119
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIOServer.h,sha256=0yKRoJmJwoFpjLWatgi_WaWgPwKb0UHNdA7AQzv9PMY,280
120
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFortranFlukaIO.h,sha256=WxAjG2SPlWqMG38iHBM8GQwh5yp031jAGeyPi4y9G4c,330
121
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeNetIO.c,sha256=JcgCWxbT-ZOeG0c9mz1kk3PfXjaazaUk2P_ROtoBKaY,1452
122
+ xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeNetIO.h,sha256=JTMU9FtCBJkitsnHp7kWKUbPSN4rviRfJgVHK26AuPY,906
123
+ xcoll/scattering_routines/geometry/__init__.py,sha256=a2DFji3U6Msj-aJE2Dt5Il8FgesfICJHeK9yQj4zHa4,221
124
+ xcoll/scattering_routines/geometry/collimator_geometry.h,sha256=0gHiSEALJtQdW0mUav7GmES4JCAvq-xmch_ZRPkCfUI,7819
125
+ xcoll/scattering_routines/geometry/crystal_geometry.h,sha256=DHuQPMKq_Q0uK0WW2YRd7oxxhMwRPWtNUUn5fBW4Cxc,4968
126
+ xcoll/scattering_routines/geometry/geometry.py,sha256=bF8v7aEP09E4_EMkN0KEJFU-PQrBSOB0Xv699VBUzRY,1102
127
+ xcoll/scattering_routines/geometry/get_s.h,sha256=TWxZ-GjCcLrOV1wota7ltE53Nit0LQASoXmsqn-N0LQ,2947
128
+ xcoll/scattering_routines/geometry/methods.h,sha256=I8ik46SgkCHHtZ99anbdb3ZC7A_5Q809fgpeWMajdkY,3747
129
+ xcoll/scattering_routines/geometry/objects.h,sha256=A5ktGvVlSkC4hUsI_PQFsE80CuDwYbcioxKGRmEf2I0,5499
130
+ xcoll/scattering_routines/geometry/rotation.h,sha256=lO3RaQBys9r0ROMjR8T8Rr7UsIEm-H9_C_70Nwz4MXY,701
131
+ xcoll/scattering_routines/geometry/segments.h,sha256=7nKnnin2ByxkKyaYwGvFaqgLQg5uBba4CdLHL7L3iQs,7667
132
+ xcoll/scattering_routines/geometry/sort.h,sha256=b1MkFO2ddzv1fWGeQzsLuz46qo2pKyRSXHjoAEVU7Ts,5763
133
+ xcoll/xaux.py,sha256=mh4E_jhaUFm2LOKawJ0b6X4zuz8JiJhx6w7GcnRgIXQ,2291
134
+ xcoll-0.6.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
135
+ xcoll-0.6.1.dist-info/METADATA,sha256=qZ6WjBbpMtmyC5jeyM39MTNXw779decuHpGDHOShgpY,2676
136
+ xcoll-0.6.1.dist-info/NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
137
+ xcoll-0.6.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
138
+ xcoll-0.6.1.dist-info/RECORD,,
xcoll/_manager.py DELETED
@@ -1,22 +0,0 @@
1
- # copyright ############################### #
2
- # This file is part of the Xcoll package. #
3
- # Copyright (c) CERN, 2024. #
4
- # ######################################### #
5
-
6
-
7
- class CollimatorManager:
8
-
9
- def __init__(self, **kwargs):
10
- raise ValueError("`CollimatorManager` is deprecated. Use `CollimatorDatabase` instead.")
11
-
12
- @classmethod
13
- def from_yaml(cls, file, **kwargs):
14
- raise ValueError("`CollimatorManager` is deprecated. Use `CollimatorDatabase` instead.")
15
-
16
- @classmethod
17
- def from_json(cls, file, **kwargs):
18
- raise ValueError("`CollimatorManager` is deprecated. Use `CollimatorDatabase` instead.")
19
-
20
- @classmethod
21
- def from_dict(cls, file, **kwargs):
22
- raise ValueError("`CollimatorManager` is deprecated. Use `CollimatorDatabase` instead.")
@@ -1,25 +0,0 @@
1
- // copyright ############################### #
2
- // This file is part of the Xcoll package. #
3
- // Copyright (c) CERN, 2024. #
4
- // ######################################### #
5
-
6
- #ifndef XCOLL_STATES_H
7
- #define XCOLL_STATES_H
8
-
9
- #define XC_LOST_ON_EVEREST_BLOCK -330
10
- #define XC_LOST_ON_EVEREST_COLL -331
11
- #define XC_LOST_ON_EVEREST_CRYSTAL -332
12
- #define XC_LOST_ON_FLUKA_BLOCK -333
13
- #define XC_LOST_ON_FLUKA_COLL -334
14
- #define XC_LOST_ON_FLUKA_CRYSTAL -335
15
- #define XC_LOST_ON_GEANT4_BLOCK -336
16
- #define XC_LOST_ON_GEANT4_COLL -337
17
- #define XC_LOST_ON_GEANT4_CRYSTAL -338
18
- #define XC_LOST_ON_ABSORBER -340
19
-
20
- #define XC_ERR_INVALID_TRACK -390
21
- #define XC_ERR_NOT_IMPLEMENTED -391
22
- #define XC_ERR_INVALID_XOFIELD -392
23
- #define XC_ERR -399
24
-
25
- #endif /* XCOLL_STATES_H */
xcoll/install.py DELETED
@@ -1,35 +0,0 @@
1
- # copyright ############################### #
2
- # This file is part of the Xcoll package. #
3
- # Copyright (c) CERN, 2024. #
4
- # ######################################### #
5
-
6
- from warnings import warn
7
-
8
- # This file is deprecated and will be removed in the future.
9
-
10
-
11
- def install_elements(line, names, elements, *, at_s=None, apertures=None, need_apertures=False, s_tol=1.e-6):
12
- warn("The function xcoll.install_elements() is deprecated and will be removed in the future. "
13
- + "Please use line.collimators.install() instead.", FutureWarning)
14
- line.collimators.install(names=names, elements=elements, at_s=at_s, apertures=apertures,
15
- need_apertures=need_apertures, s_tol=s_tol)
16
-
17
- def check_element_position(line, name, s_start, s_end, at_s, length=None, s_tol=1.e-6):
18
- warn("The function xcoll.check_element_position() is deprecated and will be removed "
19
- + "in the future. Please use line.collimators.check_position() instead.", FutureWarning)
20
- return line.collimators.check_position(name, s_start, s_end, at_s, length=length, s_tol=s_tol)
21
-
22
- def get_apertures_at_s(tab, s, s_tol=1.e-6):
23
- warn("The function xcoll.get_apertures_at_s() is deprecated and will be removed in the future. "
24
- + "Please use line.collimators.get_apertures_at_s() instead.", FutureWarning)
25
- return get_apertures_at_s(s, s_tol=s_tol)
26
-
27
- def get_aperture_for_element(line, name, s_start, s_end, aperture=None, tab=None, s_tol=1.e-6):
28
- warn("The function xcoll.get_aperture_for_element() is deprecated and will be removed in the future. "
29
- + "Please use line.collimators.get_aperture() instead.", FutureWarning)
30
- return line.get_aperture(name, s_start, s_end, aperture=aperture, tab=tab, s_tol=s_tol)
31
-
32
- def prepare_space_for_element(line, name, s_start, s_end, tab=None, s_tol=1.e-6):
33
- warn("The function xcoll.prepare_space_for_element() is deprecated and will be removed in the future. "
34
- + "Please use line.collimators.prepare_space() instead.", FutureWarning)
35
- return line.collimators.prepare_space(name, s_start, s_end, tab=tab, s_tol=s_tol)
@@ -1 +0,0 @@
1
- gitdir: ../../../../.git/modules/xcoll/scattering_routines/geant4/collimasim