xcoll 0.3.3__py3-none-any.whl → 0.3.5__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 (317) hide show
  1. xcoll/beam_elements/__init__.py +5 -0
  2. xcoll/beam_elements/absorber.py +2 -1
  3. xcoll/beam_elements/base.py +32 -17
  4. xcoll/beam_elements/collimators_src/absorber.h +5 -0
  5. xcoll/beam_elements/everest.py +14 -25
  6. xcoll/colldb.py +50 -27
  7. xcoll/general.py +1 -1
  8. xcoll/headers/checks.h +7 -1
  9. xcoll/impacts/impacts.py +2 -1
  10. xcoll/impacts/impacts_src/impacts.h +1 -6
  11. xcoll/manager.py +5 -5
  12. xcoll/rf_sweep.py +90 -19
  13. xcoll/scattering_routines/everest/__init__.py +5 -0
  14. xcoll/scattering_routines/everest/everest.py +1 -1
  15. xcoll/scattering_routines/fluka/build_fluka_input.py +58 -0
  16. xcoll/scattering_routines/fluka/flukaio/lib/libFlukaIO64.a +0 -0
  17. xcoll/scattering_routines/fluka/flukaio/lib/libFlukaIO64.so +0 -0
  18. xcoll/scattering_routines/fluka/flukaio/src/Connection.d +68 -48
  19. xcoll/scattering_routines/fluka/flukaio/src/Connection.o +0 -0
  20. xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.d +46 -37
  21. xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.o +0 -0
  22. xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.d +28 -25
  23. xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.o +0 -0
  24. xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.d +67 -47
  25. xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.o +0 -0
  26. xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.d +39 -33
  27. xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.o +0 -0
  28. xcoll/scattering_routines/fluka/flukaio/src/NetIO.d +66 -47
  29. xcoll/scattering_routines/fluka/flukaio/src/NetIO.o +0 -0
  30. {xcoll-0.3.3.dist-info → xcoll-0.3.5.dist-info}/METADATA +3 -2
  31. xcoll-0.3.5.dist-info/NOTICE +2 -0
  32. xcoll-0.3.5.dist-info/RECORD +111 -0
  33. {xcoll-0.3.3.dist-info → xcoll-0.3.5.dist-info}/WHEEL +1 -1
  34. xcoll/beam_elements/collimators_src/base_block.h +0 -14
  35. xcoll/beam_elements/collimators_src/base_collimator.h +0 -14
  36. xcoll/beam_elements/collimators_src/invalid_collimator.h +0 -15
  37. xcoll/install_collimators.py +0 -180
  38. xcoll/scattering_routines/geant4/collimasim/.git +0 -1
  39. xcoll/scattering_routines/geant4/collimasim/.gitignore +0 -12
  40. xcoll/scattering_routines/geant4/collimasim/.gitmodules +0 -3
  41. xcoll/scattering_routines/geant4/collimasim/CMakeLists.txt +0 -26
  42. xcoll/scattering_routines/geant4/collimasim/README.md +0 -21
  43. xcoll/scattering_routines/geant4/collimasim/docs/Makefile +0 -20
  44. xcoll/scattering_routines/geant4/collimasim/docs/make.bat +0 -35
  45. xcoll/scattering_routines/geant4/collimasim/docs/source/collimasim.rst +0 -10
  46. xcoll/scattering_routines/geant4/collimasim/docs/source/conf.py +0 -59
  47. xcoll/scattering_routines/geant4/collimasim/docs/source/index.rst +0 -26
  48. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.appveyor.yml +0 -37
  49. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-format +0 -19
  50. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-tidy +0 -65
  51. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.cmake-format.yaml +0 -73
  52. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.git +0 -1
  53. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CODEOWNERS +0 -9
  54. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CONTRIBUTING.md +0 -386
  55. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +0 -45
  56. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/config.yml +0 -8
  57. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/dependabot.yml +0 -16
  58. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler.yml +0 -8
  59. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler_merged.yml +0 -3
  60. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/pull_request_template.md +0 -19
  61. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/ci.yml +0 -969
  62. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/configure.yml +0 -84
  63. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/format.yml +0 -48
  64. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/labeler.yml +0 -16
  65. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/pip.yml +0 -103
  66. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.gitignore +0 -45
  67. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.pre-commit-config.yaml +0 -151
  68. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.readthedocs.yml +0 -3
  69. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/CMakeLists.txt +0 -297
  70. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/LICENSE +0 -29
  71. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/MANIFEST.in +0 -6
  72. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/README.rst +0 -180
  73. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Doxyfile +0 -23
  74. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Makefile +0 -192
  75. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/_static/theme_overrides.css +0 -11
  76. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/chrono.rst +0 -81
  77. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/custom.rst +0 -93
  78. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/eigen.rst +0 -310
  79. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/functional.rst +0 -109
  80. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/index.rst +0 -43
  81. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/overview.rst +0 -171
  82. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/stl.rst +0 -251
  83. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/strings.rst +0 -305
  84. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/classes.rst +0 -1297
  85. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/embedding.rst +0 -262
  86. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/exceptions.rst +0 -396
  87. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/functions.rst +0 -568
  88. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/misc.rst +0 -337
  89. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/index.rst +0 -13
  90. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/numpy.rst +0 -463
  91. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/object.rst +0 -286
  92. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/utilities.rst +0 -155
  93. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/smart_ptrs.rst +0 -174
  94. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/basics.rst +0 -308
  95. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.py +0 -91
  96. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.rst +0 -95
  97. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/changelog.rst +0 -2050
  98. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/classes.rst +0 -542
  99. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/cmake/index.rst +0 -8
  100. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/compiling.rst +0 -648
  101. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/conf.py +0 -381
  102. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/faq.rst +0 -343
  103. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/index.rst +0 -48
  104. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/installing.rst +0 -105
  105. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/limitations.rst +0 -72
  106. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11-logo.png +0 -0
  107. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
  108. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.svg +0 -427
  109. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
  110. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.svg +0 -427
  111. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/reference.rst +0 -130
  112. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/release.rst +0 -96
  113. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/requirements.txt +0 -8
  114. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/upgrade.rst +0 -548
  115. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/attr.h +0 -605
  116. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/buffer_info.h +0 -144
  117. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/cast.h +0 -1432
  118. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/chrono.h +0 -213
  119. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/common.h +0 -2
  120. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/complex.h +0 -65
  121. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/class.h +0 -709
  122. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/common.h +0 -1021
  123. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/descr.h +0 -104
  124. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/init.h +0 -346
  125. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/internals.h +0 -467
  126. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/type_caster_base.h +0 -978
  127. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/typeid.h +0 -55
  128. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eigen.h +0 -606
  129. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/embed.h +0 -284
  130. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eval.h +0 -163
  131. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/functional.h +0 -121
  132. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/gil.h +0 -193
  133. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/iostream.h +0 -275
  134. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/numpy.h +0 -1741
  135. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/operators.h +0 -163
  136. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/options.h +0 -65
  137. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pybind11.h +0 -2497
  138. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pytypes.h +0 -1879
  139. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl/filesystem.h +0 -103
  140. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl.h +0 -375
  141. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl_bind.h +0 -747
  142. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/noxfile.py +0 -88
  143. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__init__.py +0 -11
  144. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__main__.py +0 -52
  145. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.py +0 -12
  146. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.pyi +0 -6
  147. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/commands.py +0 -21
  148. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/py.typed +0 -0
  149. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.py +0 -482
  150. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.pyi +0 -63
  151. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pyproject.toml +0 -41
  152. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.cfg +0 -56
  153. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.py +0 -155
  154. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/CMakeLists.txt +0 -503
  155. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/conftest.py +0 -208
  156. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/constructor_stats.h +0 -275
  157. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/cross_module_gil_utils.cpp +0 -73
  158. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/env.py +0 -33
  159. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/pytest.ini +0 -0
  160. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/test_files.py +0 -279
  161. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/pytest.ini +0 -0
  162. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/test_setuphelper.py +0 -143
  163. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/local_bindings.h +0 -85
  164. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/object.h +0 -179
  165. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_cross_module_tests.cpp +0 -151
  166. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.cpp +0 -91
  167. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.h +0 -85
  168. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pytest.ini +0 -19
  169. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/requirements.txt +0 -12
  170. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.cpp +0 -26
  171. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.py +0 -25
  172. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.cpp +0 -216
  173. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.py +0 -163
  174. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.cpp +0 -286
  175. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.py +0 -536
  176. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.cpp +0 -107
  177. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.py +0 -248
  178. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.cpp +0 -227
  179. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.py +0 -202
  180. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.cpp +0 -84
  181. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.py +0 -210
  182. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.cpp +0 -550
  183. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.py +0 -473
  184. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/CMakeLists.txt +0 -84
  185. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/embed.cpp +0 -21
  186. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +0 -28
  187. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +0 -39
  188. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +0 -46
  189. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/main.cpp +0 -6
  190. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +0 -41
  191. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +0 -35
  192. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +0 -41
  193. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/test.py +0 -10
  194. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.cpp +0 -165
  195. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.py +0 -53
  196. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.cpp +0 -238
  197. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.py +0 -126
  198. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.cpp +0 -141
  199. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.py +0 -117
  200. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.cpp +0 -41
  201. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.py +0 -50
  202. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.cpp +0 -69
  203. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.py +0 -42
  204. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.cpp +0 -348
  205. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.py +0 -771
  206. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/CMakeLists.txt +0 -47
  207. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/catch.cpp +0 -22
  208. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/external_module.cpp +0 -23
  209. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.cpp +0 -326
  210. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.py +0 -15
  211. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.cpp +0 -148
  212. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.py +0 -272
  213. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.cpp +0 -119
  214. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.py +0 -51
  215. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval_call.py +0 -5
  216. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.cpp +0 -285
  217. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.h +0 -12
  218. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.py +0 -265
  219. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.cpp +0 -397
  220. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.py +0 -520
  221. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.cpp +0 -49
  222. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.py +0 -94
  223. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.cpp +0 -125
  224. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.py +0 -331
  225. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.cpp +0 -153
  226. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.py +0 -284
  227. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.cpp +0 -107
  228. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.py +0 -257
  229. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.cpp +0 -412
  230. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.py +0 -517
  231. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.cpp +0 -102
  232. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.py +0 -92
  233. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.cpp +0 -233
  234. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.py +0 -360
  235. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.cpp +0 -472
  236. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.py +0 -593
  237. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.cpp +0 -524
  238. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.py +0 -441
  239. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.cpp +0 -103
  240. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.py +0 -267
  241. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.cpp +0 -73
  242. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.py +0 -59
  243. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.cpp +0 -235
  244. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.py +0 -146
  245. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.cpp +0 -189
  246. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.py +0 -82
  247. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.cpp +0 -560
  248. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.py +0 -651
  249. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.cpp +0 -500
  250. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.py +0 -253
  251. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.cpp +0 -452
  252. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.py +0 -318
  253. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.cpp +0 -342
  254. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.py +0 -291
  255. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.cpp +0 -131
  256. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.py +0 -318
  257. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.cpp +0 -144
  258. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.py +0 -29
  259. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.cpp +0 -66
  260. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.py +0 -44
  261. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.cpp +0 -22
  262. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.py +0 -9
  263. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.cpp +0 -510
  264. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.py +0 -408
  265. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-numpy-scipy.supp +0 -140
  266. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-python.supp +0 -117
  267. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindCatch.cmake +0 -70
  268. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindEigen3.cmake +0 -86
  269. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindPythonLibsNew.cmake +0 -257
  270. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/check-style.sh +0 -44
  271. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/cmake_uninstall.cmake.in +0 -23
  272. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/libsize.py +0 -39
  273. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/make_changelog.py +0 -64
  274. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Common.cmake +0 -402
  275. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Config.cmake.in +0 -233
  276. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11NewTools.cmake +0 -276
  277. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Tools.cmake +0 -214
  278. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pyproject.toml +0 -3
  279. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_global.py.in +0 -65
  280. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_main.py.in +0 -41
  281. xcoll/scattering_routines/geant4/collimasim/pyproject.toml +0 -8
  282. xcoll/scattering_routines/geant4/collimasim/setup.py +0 -144
  283. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.cpp +0 -403
  284. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.hh +0 -100
  285. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.cpp +0 -662
  286. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.hh +0 -110
  287. xcoll/scattering_routines/geant4/collimasim/src/collimasim/__init__.py +0 -8
  288. xcoll/scattering_routines/geant4/collimasim/src/collimasim/bindings.cpp +0 -63
  289. xcoll/scattering_routines/geant4/collimasim/src/collimasim/pyCollimatorPass.py +0 -142
  290. xcoll/scattering_routines/geant4/collimasim/src/collimasim/xtrack_collimator.py +0 -475
  291. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/PKG-INFO +0 -6
  292. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/SOURCES.txt +0 -20
  293. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/dependency_links.txt +0 -1
  294. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/not-zip-safe +0 -1
  295. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/top_level.txt +0 -1
  296. xcoll/scattering_routines/geant4/collimasim/tests/README.md +0 -25
  297. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_new_example.dat +0 -18
  298. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_old_example.dat +0 -68
  299. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_testing.dat +0 -15
  300. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_yaml_example.yaml +0 -110
  301. xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps.dat +0 -7
  302. xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps_pyat_test.dat +0 -3
  303. xcoll/scattering_routines/geant4/collimasim/tests/resources/collonly_twiss_file_example.tfs +0 -54
  304. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings.gmad +0 -3
  305. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings_black_absorber.gmad +0 -3
  306. xcoll/scattering_routines/geant4/collimasim/tests/resources/twiss_file_testing.tfs +0 -51
  307. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat.py +0 -65
  308. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_passmethod.py +0 -59
  309. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_tracking.py +0 -102
  310. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack.py +0 -75
  311. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_angle.py +0 -74
  312. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_colldb_load.py +0 -84
  313. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_interaction.py +0 -159
  314. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tilt.py +0 -80
  315. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tracking.py +0 -97
  316. xcoll-0.3.3.dist-info/RECORD +0 -391
  317. {xcoll-0.3.3.dist-info → xcoll-0.3.5.dist-info}/LICENSE +0 -0
@@ -1,110 +0,0 @@
1
- %YAML 1.2
2
- ---
3
- # Each collimator is a dictionary, with the following set of keys:
4
- # required keys:
5
- # gap [sigma], length [m], angle [deg], material [BE/AL/CU/W/PB/C/C2/Si/Ge/MoGR/CuCD/Mo/Glid/Iner/VA/BL], stage
6
- # (a gap equal to 'null' disables the collimator from tracking)
7
- # optional keys:
8
- # offset [m], onesided [left/right], tilt [deg] (or tilt_left and tilt_right if different for each jaw)
9
- # special keys:
10
- # active [bool] : Whether or not a collimator is still active in operation. If false, the gap is set to null.
11
- # The difference with just manually setting the gap to 'null' is mainly semantic: these are collimators that are in principle no longer used but still present in the machine.
12
- # crystal [strip/quasi-mosaic] : Use when the collimator is a crystal of the specified type.
13
- # It allows for some extra keys: bend [m], xdim [m], ydim [m], miscut [deg], thick [m] (the thickness of the amorphous layer)
14
- #
15
- # For ease of use, the collimators can be collected in families using standard YAML syntax.
16
- # Each family contains the keys for which all members have the same value (though keys can be overwritten again in the individual collimators).
17
- #
18
- # YAML syntax refresher:
19
- # - indentation matters (spaces, no tabs)
20
- # - comments are preceded with #
21
- # - lists are represented by one item per line preceded with a dash, or in inline format as [ , ... ]
22
- # - dictoraries are represented by one "key : value" per line, or in inline format as { key : value , ... }
23
- # - the & represents a unique name tag
24
- # - the * dereferences the named element
25
- # - the merge operator << merges the subsequent element with the surrounding container (giving higher priority to the other elements in the container than those in the merged element, as to allow overwriting)
26
- Families:
27
- # Momentum cleaning
28
- - &TCP3 { gap: 15, stage: primary, material: C, length: 0.6 }
29
- - &TCSG3 { gap: 18, stage: secondary, material: C, length: 1 }
30
- - &TCLA3 { gap: 20, stage: tertiary, material: Iner, length: 1 }
31
- # Betatron cleaning
32
- - &TCP7 { gap: 5, stage: primary, material: C, length: 0.6 }
33
- - &TCSG7 { gap: 6.5, stage: secondary, material: C, length: 1 }
34
- - &TCLA7 { gap: 10, stage: tertiary, material: Iner, length: 1 }
35
- - &CRY7 { gap: null, stage: special, material: Si, length: 0.004, onesided: left, crystal: strip }
36
- # Injection protection
37
- - &TCLI { gap: null, stage: tertiary, material: C, length: 1, angle: 90 }
38
- - &TDI { gap: null, stage: tertiary, material: CU, length: 1.565, angle: 90 }
39
- # Dump protection
40
- - &TCDQ { gap: 7.3, stage: tertiary, material: C, length: 3, angle: 0, onesided: left }
41
- - &TCSP { gap: 7.3, stage: secondary, material: C, length: 1, angle: 0 }
42
- # Physics background minimalisation
43
- - &TCT15 { gap: 8.5, stage: tertiary, material: Iner, length: 1 }
44
- - &TCT2 { gap: 37, stage: tertiary, material: Iner, length: 1 }
45
- - &TCT8 { gap: 15, stage: tertiary, material: Iner, length: 1 }
46
- # Physics debris
47
- - &TCL4 { gap: 17, stage: tertiary, material: CU, length: 1, angle: 0 }
48
- - &TCL5 { gap: 42, stage: tertiary, material: CU, length: 1, angle: 0 }
49
- - &TCL6 { gap: 20, stage: tertiary, material: Iner, length: 1, angle: 0 }
50
- # Physics debris in ALICE (only for ions)
51
- - &TCLD { gap: null, stage: tertiary, material: Iner, length: 0.6, angle: 0 }
52
-
53
- Collimators:
54
- tcl.4r1.b1: { <<: *TCL4 }
55
- tcl.5r1.b1: { <<: *TCL5 }
56
- tcl.6r1.b1: { <<: *TCL6 }
57
- tctph.4l2.b1: { <<: *TCT2, angle: 0 }
58
- tctpv.4l2.b1: { <<: *TCT2, angle: 90 }
59
- tdisa.a4l2.b1: { <<: *TDI }
60
- tdisb.a4l2.b1: { <<: *TDI }
61
- tdisc.a4l2.b1: { <<: *TDI }
62
- tclia.4r2: { <<: *TCLI }
63
- tclib.6r2.b1: { <<: *TCLI }
64
- tcld.a11r2.b1: { <<: *TCLD }
65
- tcp.6l3.b1: { <<: *TCP3, angle: 0 }
66
- tcsg.5l3.b1: { <<: *TCSG3, angle: 0 }
67
- tcsg.4r3.b1: { <<: *TCSG3, angle: 0 }
68
- tcsg.a5r3.b1: { <<: *TCSG3, angle: 170.7 }
69
- tcsg.b5r3.b1: { <<: *TCSG3, angle: 10.8 }
70
- tcla.a5r3.b1: { <<: *TCLA3, angle: 90 }
71
- tcla.b5r3.b1: { <<: *TCLA3, angle: 0 }
72
- tcla.6r3.b1: { <<: *TCLA3, angle: 0 }
73
- tcla.7r3.b1: { <<: *TCLA3, angle: 0 }
74
- tctph.4l5.b1: { <<: *TCT15, angle: 0 }
75
- tctpv.4l5.b1: { <<: *TCT15, angle: 90 }
76
- tcl.4r5.b1: { <<: *TCL4, }
77
- tcl.5r5.b1: { <<: *TCL5, }
78
- tcl.6r5.b1: { <<: *TCL6, }
79
- tcdqa.a4r6.b1: { <<: *TCDQ }
80
- tcdqa.c4r6.b1: { <<: *TCDQ }
81
- tcdqa.b4r6.b1: { <<: *TCDQ }
82
- tcsp.a4r6.b1: { <<: *TCSP }
83
- tcp.d6l7.b1: { <<: *TCP7, angle: 90, material: MoGR }
84
- tcp.c6l7.b1: { <<: *TCP7, angle: 0, material: MoGR }
85
- tcp.b6l7.b1: { <<: *TCP7, angle: 127.5 }
86
- tcsg.a6l7.b1: { <<: *TCSG7, angle: 141.1 }
87
- tcpcv.a6l7.b1: { <<: *CRY7, angle: 90, bend: 85.10, xdim: 5.0e-3, ydim: 30.0e-3 }
88
- tcsg.b5l7.b1: { <<: *TCSG7, angle: 143.5 }
89
- tcsg.a5l7.b1: { <<: *TCSG7, angle: 40.7 }
90
- tcsg.d4l7.b1: { <<: *TCSG7, angle: 90, material: MoGR }
91
- tcpch.a4l7.b1: { <<: *CRY7, angle: 0, bend: 61.54, xdim: 2.0e-3, ydim: 50.0e-3 }
92
- tcsg.b4l7.b1: { <<: *TCSG7, angle: 0, active: false }
93
- tcspm.b4l7.b1: { <<: *TCSG7, angle: 0, material: MoGR }
94
- tcsg.a4l7.b1: { <<: *TCSG7, angle: 134.6 }
95
- tcsg.a4r7.b1: { <<: *TCSG7, angle: 46.3 }
96
- tcsg.b5r7.b1: { <<: *TCSG7, angle: 141.5 }
97
- tcsg.d5r7.b1: { <<: *TCSG7, angle: 51.4 }
98
- tcsg.e5r7.b1: { <<: *TCSG7, angle: 130.5, active: false }
99
- tcspm.e5r7.b1: { <<: *TCSG7, angle: 130.5, material: MoGR }
100
- tcsg.6r7.b1: { <<: *TCSG7, angle: 0.5, active: false }
101
- tcspm.6r7.b1: { <<: *TCSG7, angle: 0.5, material: MoGR }
102
- tcla.a6r7.b1: { <<: *TCLA7, angle: 90 }
103
- tcla.b6r7.b1: { <<: *TCLA7, angle: 0 }
104
- tcla.c6r7.b1: { <<: *TCLA7, angle: 90 }
105
- tcla.d6r7.b1: { <<: *TCLA7, angle: 0 }
106
- tcla.a7r7.b1: { <<: *TCLA7, angle: 0 }
107
- tctph.4l8.b1: { <<: *TCT8, angle: 0 }
108
- tctpv.4l8.b1: { <<: *TCT8, angle: 90 }
109
- tctph.4l1.b1: { <<: *TCT15, angle: 0 }
110
- tctpv.4l1.b1: { <<: *TCT15, angle: 90 }
@@ -1,7 +0,0 @@
1
- # ID name angle[rad] betax[m] betay[m] halfgap[m] Material Length[m] sigx[m] sigy[m] tilt1[rad] tilt2[rad] nsig
2
- 1 TCP.A.B1 0.0000000000E+00 6.5281394752E+02 4.9010585945E+01 9.7627267068E-03 C 6.00000E-01 9.76273E-04 2.67499E-04 0.00000E+00 0.00000E+00 1.00000E+01
3
- 2 TCP.B.B1 1.5707963268E+00 6.0822524919E+02 5.4577427992E+01 1.0064576620E-03 C 6.00000E-01 9.42342E-04 2.82282E-04 0.00000E+00 0.00000E+00 8.00000E+01
4
- 3 TCS.B1.B1 1.5707963268E+00 2.9420397502E+02 1.5419706861E+02 1.8926054435E-03 C 1.00000E+00 6.55391E-04 4.74476E-04 0.00000E+00 0.00000E+00 8.95000E+01
5
- 4 TCS.A1.B1 0.0000000000E+00 7.4276568013E+01 4.0505123230E+02 3.7870424602E-03 C 1.00000E+00 3.29308E-04 7.69009E-04 0.00000E+00 0.00000E+00 1.15000E+01
6
- 5 TCS.A2.B1 0.0000000000E+00 4.6957457165E+02 4.6632571321E+02 9.5219642278E-03 C 1.00000E+00 8.27997E-04 8.25128E-04 0.00000E+00 0.00000E+00 1.15000E+01
7
- 6 TCS.B2.B1 1.5707963268E+00 1.7829042624E+03 3.3656446316E+02 2.7961222487E-03 C 1.00000E+00 1.61339E-03 7.00988E-04 0.00000E+00 0.00000E+00 8.95000E+01
@@ -1,3 +0,0 @@
1
- # ID name angle[rad] betax[m] betay[m] halfgap[m] Material Length[m] sigx[m] sigy[m] tilt1[rad] tilt2[rad] nsig
2
- 1 DUMMY1 0.0000000000E+00 0.0000E+00 0.0000E+00 0.5 C 10 0.0000E_00 0.0000E00 0.00000E+00 0.00000E+00 0.00000E+00
3
- 2 DUMMY2 0.0000000000E+00 0.0000E+00 0.0000E+00 0.5 C 10 0.0000E_00 0.0000E00 0.00000E+00 0.00000E+00 0.00000E+00
@@ -1,54 +0,0 @@
1
- @ NAME %05s "TWISS"
2
- @ TYPE %05s "TWISS"
3
- @ SEQUENCE %04s "RING"
4
- @ PARTICLE %08s "POSITRON"
5
- @ MASS %le 0.000510998950000
6
- @ CHARGE %le 1.000000000000000
7
- @ ENERGY %le 182.500000000715403
8
- @ PC %le 182.500000000000000
9
- @ GAMMA %le 357143.591000950953458
10
- @ KBUNCH %le 16640.000000000000000
11
- @ BCURRENT %le 0.000083528805847
12
- @ SIGE %le 0.001000000000000
13
- @ SIGT %le 1.000000000000000
14
- @ NPART %le 170000000000.000030517578125
15
- @ EX %le 0.000000001460000
16
- @ EY %le 0.000000000002900
17
- @ ET %le 0.001000000000000
18
- @ BV_FLAG %le 1.000000000000000
19
- @ LENGTH %le 97756.072632636380149
20
- @ ALFA %le 0.000007256715763
21
- @ ORBIT5 %le -0.000000000000000
22
- @ GAMMATR %le 371.218783908525609
23
- @ Q1 %le 389.088569617840676
24
- @ Q2 %le 390.213002389969859
25
- @ DQ1 %le -1.845008895784288
26
- @ DQ2 %le 1.533678430906169
27
- @ DXMAX %le 0.544565677826365
28
- @ DYMAX %le -0.000000000000000
29
- @ XCOMAX %le 0.000000000000000
30
- @ YCOMAX %le 0.000000000000000
31
- @ BETXMAX %le 2039.398467490436815
32
- @ BETYMAX %le 6519.403287053469285
33
- @ XCORMS %le 0.000000000000000
34
- @ YCORMS %le 0.000000000000000
35
- @ DXRMS %le 0.123614301552443
36
- @ DYRMS %le 0.000000000000000
37
- @ DELTAP %le 0.000000000000000
38
- @ SYNCH_1 %le 0.000000000000000
39
- @ SYNCH_2 %le 0.000000000000000
40
- @ SYNCH_3 %le 0.000000000000000
41
- @ SYNCH_4 %le 0.000000000000000
42
- @ SYNCH_5 %le 0.000000000000000
43
- @ TITLE %08s "no-title"
44
- @ ORIGIN %16s "5.07.00 Linux 64"
45
- @ DATE %08s "23/06/21"
46
- @ TIME %08s "16.08.47"
47
- * NAME KEYWORD S L KS KSL K0L K1L K2L K3L K4L K1S K2S K3S K4S HKICK VKICK BETX BETY ALFX ALFY MUX MUY DX DY DPX DPY R11 R12 R22 R21 X PX Y PY T PT DELTAP VOLT LAG HARMON FREQ E1 E2 APERTYPE APER_1 APER_2 APER_3 APER_4 TILT ANGLE ASSEMBLY_ID MECH_SEP
48
- $ %s %s %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %s %le %le %le %le %le %le %d %le
49
- "TCP.A.B1" "COLLIMATOR" 42541.376398806176439 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 652.813947518136274 49.010585945401552 4.541691920251642 -0.493263766065989 173.086386348444279 173.850167284495114 0.023338170729623 0.000000000000000 0.000666633297901 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
50
- "TCP.B.B1" "COLLIMATOR" 42546.376398806176439 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 608.225249188530825 54.577427992180525 4.376047745669433 -0.620104643289806 173.087649244941503 173.865577811466409 0.026671337219128 0.000000000000000 0.000666633297901 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
51
- "TCS.B1.B1" "COLLIMATOR" 42589.196398806168872 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 294.203975019690972 154.197068613860750 2.957471034547644 -1.706369915834384 173.103787433333309 173.942868849018424 0.055216575035242 0.000000000000000 0.000666633297901 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
52
- "TCS.A1.B1" "COLLIMATOR" 42641.986398806169746 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 74.276568013352502 405.051232303137340 1.208600064424512 -3.045555897563467 173.161906278398959 173.976742541729180 0.060001365420669 0.000000000000000 -0.000000035887419 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
53
- "TCS.A2.B1" "COLLIMATOR" 42981.816398806171492 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 469.574571650545693 466.325713210186848 0.164867047878529 -1.845236100523997 173.504790441722747 174.220951873264738 0.069017034496271 0.000000000000000 -0.000506292509020 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
54
- "TCS.B2.B1" "COLLIMATOR" 43287.656398806175275 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1782.904262438686828 336.564463162150616 -6.796028267745501 2.699560767425571 173.588052793438322 174.285524754832295 -0.103874114678722 0.000000000000000 -0.000647935219349 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
@@ -1,3 +0,0 @@
1
- beam, particle="e+", momentum=182.5*GeV;
2
- !option, physicsList = "em";
3
- option, physicsList = "g4FTFP_BERT";
@@ -1,3 +0,0 @@
1
- beam, particle="e+", momentum=182.5*GeV;
2
- option, physicsList = "em";
3
- option, collimatorsAreInfiniteAbsorbers=1;
@@ -1,51 +0,0 @@
1
- @ NAME %05s "TWISS"
2
- @ TYPE %05s "TWISS"
3
- @ SEQUENCE %04s "RING"
4
- @ PARTICLE %08s "POSITRON"
5
- @ MASS %le 0.000510998950000
6
- @ CHARGE %le 1.000000000000000
7
- @ ENERGY %le 182.500000000715403
8
- @ PC %le 182.500000000000000
9
- @ GAMMA %le 357143.591000950953458
10
- @ KBUNCH %le 16640.000000000000000
11
- @ BCURRENT %le 0.000083528805847
12
- @ SIGE %le 0.001000000000000
13
- @ SIGT %le 1.000000000000000
14
- @ NPART %le 170000000000.000030517578125
15
- @ EX %le 0.000000001460000
16
- @ EY %le 0.000000000002900
17
- @ ET %le 0.001000000000000
18
- @ BV_FLAG %le 1.000000000000000
19
- @ LENGTH %le 97756.072632636380149
20
- @ ALFA %le 0.000007256715763
21
- @ ORBIT5 %le -0.000000000000000
22
- @ GAMMATR %le 371.218783908525609
23
- @ Q1 %le 389.088569617840676
24
- @ Q2 %le 390.213002389969859
25
- @ DQ1 %le -1.845008895784288
26
- @ DQ2 %le 1.533678430906169
27
- @ DXMAX %le 0.544565677826365
28
- @ DYMAX %le -0.000000000000000
29
- @ XCOMAX %le 0.000000000000000
30
- @ YCOMAX %le 0.000000000000000
31
- @ BETXMAX %le 2039.398467490436815
32
- @ BETYMAX %le 6519.403287053469285
33
- @ XCORMS %le 0.000000000000000
34
- @ YCORMS %le 0.000000000000000
35
- @ DXRMS %le 0.123614301552443
36
- @ DYRMS %le 0.000000000000000
37
- @ DELTAP %le 0.000000000000000
38
- @ SYNCH_1 %le 0.000000000000000
39
- @ SYNCH_2 %le 0.000000000000000
40
- @ SYNCH_3 %le 0.000000000000000
41
- @ SYNCH_4 %le 0.000000000000000
42
- @ SYNCH_5 %le 0.000000000000000
43
- @ TITLE %08s "no-title"
44
- @ ORIGIN %16s "5.07.00 Linux 64"
45
- @ DATE %08s "23/06/21"
46
- @ TIME %08s "16.08.47"
47
- * NAME KEYWORD S L KS KSL K0L K1L K2L K3L K4L K1S K2S K3S K4S HKICK VKICK BETX BETY ALFX ALFY MUX MUY DX DY DPX DPY R11 R12 R22 R21 X PX Y PY T PT DELTAP VOLT LAG HARMON FREQ E1 E2 APERTYPE APER_1 APER_2 APER_3 APER_4 TILT ANGLE ASSEMBLY_ID MECH_SEP
48
- $ %s %s %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %le %s %le %le %le %le %le %le %d %le
49
- "COLL_OPEN" "COLLIMATOR" 42531.376398806176439 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1000000 1000000 4.541691920251642 -0.493263766065989 173.086386348444279 173.850167284495114 0.023338170729623 0.000000000000000 0.000666633297901 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
50
- "COLL_SKEW" "COLLIMATOR" 42541.376398806176439 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1000000 1000000 4.541691920251642 -0.493263766065989 173.086386348444279 173.850167284495114 0.023338170729623 0.000000000000000 0.000666633297901 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.2000000000000 0.000000000000000 0.30000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
51
- "COLL_SKEW_TILTED" "COLLIMATOR" 42551.376398806176439 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1000000 1000000 4.541691920251642 -0.493263766065989 173.086386348444279 173.850167284495114 0.023338170729623 0.000000000000000 0.000666633297901 0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 -0.000000000000000 0.2000000000000 0.000000000000000 0.30000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 "CIRCLE" 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0 0.000000000000000
@@ -1,65 +0,0 @@
1
- import numpy as np
2
-
3
- import collimasim
4
-
5
-
6
- def test_pyat_object():
7
- # Initialise a code interface - in this case the interface to pyAT
8
- g4link = collimasim.PyATInterface(bdsimConfigFile="resources/settings.gmad", referencePdgId=-11, referenceEk=182.4994890018054,
9
- relativeEnergyCut=0.001, seed=1993)
10
-
11
- # Add collimators to the Geant4 model
12
- # Collimators are made of block jaws and are prepared individually in cells, surrounded by a perfect absorber
13
- # When a collimator is selected, the beam particles start at the beginning of the cell and are extracted at the end
14
- g4link.addCollimator(name="TESTCOLL1", material="C", length=0.6, aperture=0.1, rotation=0, xOffset=0, yOffset=0, jawTiltLeft=0, jawTiltRight=0, side=0)
15
- g4link.addCollimator("TESTCOLL2", "C", 0.6, 0.1, np.pi/2, 0, 0, 0, 0, 0)
16
-
17
-
18
- # Define some test particles
19
- #r = np.array([0.1, 0.001, 0.1, 0.001, 0, 0])
20
- r = np.array([0.0, 0., 0.0, 0., 0., 0.])
21
- r2 = np.array([0.051, 0., 0.051, 0., 0., 0.])
22
- r3 = np.array([0.0, 0., 0., 0., 0., 0.])
23
-
24
- # Add the particles to the model
25
- g4link.addParticle(r)
26
- g4link.addParticle(r2)
27
- g4link.addParticle(r3)
28
-
29
- # Select a collimator
30
- g4link.selectCollimator("TESTCOLL1")
31
-
32
- # Perform the Geant4 simulation
33
- g4link.collimate()
34
-
35
- # Collect the surviving particles - an n x 6 array where n is the number of surviving particles
36
- arr_out = g4link.collimateReturn()
37
-
38
- # For lost particles, all coordinates are NaN
39
- # print(arr_out) # Debug
40
- print(f"Pass {1}, Output size: {int(len(arr_out)/6)}, Active particles: {int(np.count_nonzero(~np.isnan(arr_out))/6)}")
41
-
42
- # Repeat the collimator pass a few times
43
- for k in range(10):
44
- g4link.clearData()
45
-
46
- # Add the particles to the model
47
- for i in range(0, len(arr_out), 6):
48
- g4link.addParticle(arr_out[i:i+6])
49
-
50
- # Select a collimator
51
- g4link.selectCollimator("TESTCOLL1")
52
-
53
- # Perform the Geant4 simulation
54
- g4link.collimate()
55
-
56
- # Collect the surviving particles - an n x 6 array where n is the number of surviving particles
57
- arr_out = g4link.collimateReturn()
58
-
59
- # print(arr_out) # Debug
60
- print(f"Pass {k+2}, Output size: {int(len(arr_out)/6)}, Active particles: {int(np.count_nonzero(~np.isnan(arr_out))/6)}")
61
-
62
- assert int(np.count_nonzero(~np.isnan(arr_out))/6) == 1
63
-
64
- if __name__ == "__main__":
65
- test_pyat_object()
@@ -1,59 +0,0 @@
1
- from at import elements, lattice_pass
2
- from at import atpass, elements
3
- from at.lattice import Lattice
4
- from at import Element, lattice_pass
5
- from at import set_shift, set_tilt
6
-
7
- # It is assumed that the pyCollimatorPass module is in pyAT
8
- from at.integrators import pyCollimatorPass
9
-
10
- import numpy
11
-
12
-
13
- def test_multiple_particles_collimator_pass():
14
- # Initialise the Geant4 interface
15
- pyCollimatorPass.initialise(bdsim_config_file="resources/settings.gmad",
16
- collimator_info="resources/collgaps.dat",
17
- reference_pdg_id=-11,
18
- reference_Ek=182.4994890018054,
19
- relative_energy_cut=0.3,
20
- seed=1991)
21
-
22
-
23
- # Prepare the collimators in the lattice. The pass method must be specified as
24
- # pyCollimatorPass and the name must match a collimator defined in BDSIM
25
- lattice = [
26
- elements.Drift('drift_upstream', 0.6, PassMethod='pyDriftPass'),
27
- elements.Element('TCP.A.B1', Length=0.6, PassMethod='pyCollimatorPass'),
28
- elements.Element('TCP.B.B1', Length=0.6, PassMethod='pyCollimatorPass'),
29
- elements.Drift('drift_downstream', 0.6)
30
- ]
31
-
32
- # Track 5 test particles
33
- rin = numpy.zeros((6, 5))
34
-
35
- rin[0, 0] = 9.762728e-3 # particle one offset in x
36
- rin[2, 1] = 10e-3 # particle two offset in y
37
- rin[2, 2] = 2e-3
38
- rin[2, 3] = 0.5e-3
39
- # The 5th particle is on the reference orbit
40
-
41
- r_original = numpy.copy(rin)
42
- r_out = lattice_pass(lattice, rin, nturns=1, refpts=range(len(lattice)))
43
-
44
- columns=["x", "px", "y", "py", "delta", "ct"]
45
- final_values = {}
46
- for i, var in enumerate(columns):
47
- final_values[var] = r_out[i, :, -1, -1]
48
-
49
- print("final values:\n")
50
- per_particle = list(zip(final_values['x'], final_values['y'], final_values['px'], final_values['py'], final_values['delta'], final_values['ct']))
51
- for pp in per_particle:
52
- print(pp)
53
-
54
- assert(sum(numpy.isnan(r_out[0, :, -1, -1])) == 2) # Number of lost partciles
55
-
56
-
57
- if __name__ == "__main__":
58
- test_multiple_particles_collimator_pass()
59
-
@@ -1,102 +0,0 @@
1
- import copy
2
- from at import elements, lattice_pass
3
- from at import atpass, elements
4
- from at.lattice import Lattice
5
- from at import Element, lattice_pass
6
- from at import set_shift, set_tilt
7
-
8
- # It is assumed that the pyCollimatorPass module is in pyAT
9
- from at.integrators import pyCollimatorPass
10
-
11
- import numpy
12
-
13
- def make_particles():
14
- numpy.random.seed(seed=1994)
15
- n_part = 1000
16
- rin = numpy.array([numpy.random.uniform(-1e-3, 1e-3, n_part),
17
- numpy.random.uniform(-1e-5, 1e-5, n_part),
18
- numpy.random.uniform(-1e-3, 1e-3, n_part),
19
- numpy.random.uniform(-1e-5, 1e-5, n_part),
20
- numpy.random.uniform(-1e-2, 1e-2, n_part),
21
- #numpy.zeros(n_part),
22
- numpy.random.uniform(-1e-4, 1e-4, n_part),
23
- #numpy.zeros(n_part),
24
- ])
25
-
26
- return rin
27
-
28
-
29
- def run_particles_g4(rin):
30
- numpy.random.seed(seed=1994)
31
-
32
- # Initialise the Geant4 interface
33
- pyCollimatorPass.initialise(bdsim_config_file="resources/settings_black_absorber.gmad",
34
- collimator_info="resources/collgaps_pyat_test.dat",
35
- reference_pdg_id=-11,
36
- reference_Ek=182.4994890018054,
37
- relative_energy_cut=0.3,
38
- seed=1991)
39
-
40
-
41
- # Prepare the collimators in the lattice. The pass method must be specified as
42
- # pyCollimatorPass and the name must match a collimator defined in BDSIM
43
- lattice = [
44
- elements.Element('DUMMY1', Length=10, PassMethod='pyCollimatorPass'),
45
- ]
46
-
47
- r_original = numpy.copy(rin)
48
- r_out = lattice_pass(lattice, rin, nturns=1, refpts=range(len(lattice)))
49
-
50
- columns=["x", "px", "y", "py", "delta", "ct"]
51
- final_values = {}
52
- for i, var in enumerate(columns):
53
- #final_values[var] = r_out[i, :, -1, -1]
54
- final_values[var] = rin[i]
55
-
56
- return final_values
57
-
58
- def run_particles_drift(rin):
59
- lattice = [
60
- elements.Drift('DRIFT1', 10),
61
- ]
62
-
63
- r_original = numpy.copy(rin)
64
- r_out = lattice_pass(lattice, rin, nturns=1, refpts=range(len(lattice)))
65
-
66
- #r_out_dr = lattice_pass(lattice2, r_original, nturns=1, refpts=range(len(lattice2)))
67
-
68
- columns=["x", "px", "y", "py", "delta", "ct"]
69
- final_values = {}
70
- for i, var in enumerate(columns):
71
- #final_values[var] = r_out[i, :, -1, -1]
72
- final_values[var] = rin[i]
73
-
74
- return final_values
75
-
76
- def test_pyat_tracking():
77
- rin = make_particles()
78
- rin1 = copy.deepcopy(rin)
79
- rin2 = copy.deepcopy(rin)
80
-
81
- final_values_g4 = run_particles_g4(rin1)
82
- final_values_dr = run_particles_drift(rin2)
83
-
84
- # BDSIM tracks trough some geometry padding now, which is not corrected for now
85
- # so use a bad tolerance of 1e-6 for all coordinates over 10 m of drift
86
- # TODO: investigate
87
-
88
- all_close = True
89
- columns=["x", "px", "y", "py", "delta", "ct"]
90
- for var in columns:
91
- atol = 1e-6
92
- rtol = 1e-5
93
- var_close = numpy.all(numpy.isclose(final_values_dr[var], final_values_g4[var], atol=atol, rtol=rtol))
94
- all_close &= var_close
95
-
96
- print("Var {}: {}".format(var, var_close))
97
-
98
- assert all_close
99
-
100
-
101
- if __name__ == "__main__":
102
- test_pyat_tracking()
@@ -1,75 +0,0 @@
1
- import numpy as np
2
- import xtrack as xt
3
- import xpart as xp
4
-
5
- import collimasim as cs
6
-
7
-
8
- def test_object_creation():
9
- N_part = 10
10
- N_max_expected_products = 10
11
-
12
- tot_num_part = N_part
13
-
14
- particles = xp.Particles(
15
- p0c = 185.e6,
16
- x = np.zeros(tot_num_part),
17
- y = np.zeros(tot_num_part),
18
- zeta = np.zeros(tot_num_part),
19
- px = np.zeros(tot_num_part),
20
- py = np.zeros(tot_num_part),
21
- delta = np.zeros(tot_num_part))
22
-
23
- particles.num_particles = N_part
24
-
25
- particles.x[1] = 0.3
26
- particles.y[2] = 0.3
27
-
28
- g4man = cs.Geant4CollimationManager(collimator_file="resources/CollDB_old_example.dat",
29
- bdsim_config_file="resources/settings.gmad",
30
- tfs_file="resources/collonly_twiss_file_example.tfs",
31
- reference_pdg_id=-11,
32
- reference_kinetic_energy=182.4994890018054e9,
33
- emittance_norm=(0.000521429683675842, 1.0357164949725628e-06),
34
- relative_energy_cut=0.001,
35
- seed=1993,
36
- batchMode=True)
37
-
38
- coll1 = cs.Geant4Collimator(name="tcp.a.b1", g4manager=g4man)
39
- coll2 = cs.Geant4Collimator(name="tcp.b.b1", g4manager=g4man)
40
-
41
-
42
- print("Particle coordinates (x) before first collimator")
43
- print (particles.delta)
44
-
45
- prods = coll1.interact(particles)
46
-
47
- print("Particle coordinates (x) after first collimator")
48
- print (particles.x)
49
-
50
- print("="*30)
51
- print("Products:")
52
- for crd in prods:
53
- print(crd, ":", prods[crd])
54
- print("="*30)
55
-
56
- prods = coll2.interact(particles)
57
-
58
- print("Particle coordinates (x) after second collimator")
59
- print (particles.x)
60
-
61
- print("="*30)
62
- print("Products:")
63
- for crd in prods:
64
- print(crd, ":", prods[crd])
65
- print("="*30)
66
-
67
- assert len(prods['x']) == 10
68
-
69
-
70
- def main():
71
- test_object_creation()
72
-
73
-
74
- if __name__ == '__main__':
75
- main()
@@ -1,74 +0,0 @@
1
- import numpy as np
2
- import xobjects as xo
3
- import xtrack as xt
4
- import xpart as xp
5
-
6
- import collimasim as cs
7
- from matplotlib import pyplot as plt
8
-
9
- import multiprocessing
10
-
11
- def make_particles():
12
- np.random.seed(seed=1994)
13
- n_part = 100
14
- particles = xp.Particles(
15
- _capacity=n_part,
16
- p0c = 1.e3, # 1 KeV dummy particles
17
- mass0 = xp.ELECTRON_MASS_EV,
18
- x=np.linspace(0.15, 0.25, n_part), # Offsets are x=0.2, y=0.3
19
- px=np.zeros(n_part),
20
- y=np.linspace(0.25, 0.35, n_part),
21
- py=np.zeros(n_part),
22
- zeta=np.zeros(n_part),
23
- delta=np.zeros(n_part),
24
- )
25
-
26
- return particles
27
-
28
-
29
- def test_xtrack_rotation():
30
- np.random.seed(seed=1994)
31
-
32
- particles = make_particles()
33
- g4man = cs.Geant4CollimationManager(collimator_file="resources/CollDB_testing.dat",
34
- bdsim_config_file="resources/settings_black_absorber.gmad",
35
- tfs_file="resources/twiss_file_testing.tfs",
36
- reference_pdg_id=-11,
37
- reference_kinetic_energy=0.510998946e6 * 10000,
38
- emittance_norm=(1.e-6, 1.e-6),
39
- relative_energy_cut=0.001,
40
- seed=1993,
41
- # batchMode=False
42
- batchMode=True
43
- )
44
-
45
- coll1 = g4man.make_xtg4_collimator("coll_skew") # Use new convenience method
46
-
47
- # Generate a simple sequence
48
- line = xt.Line(
49
- elements=[coll1,
50
- ])
51
-
52
- context = xo.ContextCpu()
53
- line.build_tracker(_context=context)
54
-
55
- part_copy = particles.copy()
56
- line.track(part_copy, num_turns=1)
57
-
58
- print(f"Lost particles: {sum(part_copy.state==-333)} / {len(part_copy.state)}")
59
- assert sum(part_copy.state==-333) == 30
60
-
61
- return part_copy
62
-
63
-
64
- def main():
65
- part_g4 = test_xtrack_rotation()
66
-
67
- # plt.scatter(part_g4.x, part_g4.y)
68
- # plt.show()
69
-
70
- print('Done!')
71
-
72
-
73
- if __name__ == '__main__':
74
- main()