xcoll 0.5.12__py3-none-any.whl → 0.6.0__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.
- xcoll/__init__.py +5 -18
- xcoll/beam_elements/__init__.py +1 -0
- xcoll/beam_elements/absorber.py +12 -2
- xcoll/beam_elements/base.py +162 -62
- xcoll/beam_elements/blowup.py +1 -0
- xcoll/beam_elements/elements_src/black_absorber.h +57 -58
- xcoll/beam_elements/elements_src/black_crystal.h +49 -50
- xcoll/beam_elements/elements_src/everest_block.h +21 -11
- xcoll/beam_elements/elements_src/everest_collimator.h +100 -91
- xcoll/beam_elements/elements_src/everest_crystal.h +145 -140
- xcoll/beam_elements/elements_src/transparent_collimator.h +126 -0
- xcoll/beam_elements/elements_src/transparent_crystal.h +118 -0
- xcoll/beam_elements/everest.py +16 -5
- xcoll/beam_elements/monitor.py +1 -0
- xcoll/beam_elements/transparent.py +83 -0
- xcoll/colldb.py +15 -6
- xcoll/general.py +1 -1
- xcoll/headers/particle_states.py +51 -0
- xcoll/initial_distribution.py +121 -91
- xcoll/interaction_record/interaction_record.py +2 -1
- xcoll/interaction_record/interaction_types.py +2 -2
- xcoll/line_tools.py +163 -73
- xcoll/lossmap.py +519 -127
- xcoll/plot.py +109 -0
- xcoll/rf_sweep.py +6 -0
- xcoll/scattering_routines/engine.py +414 -217
- xcoll/scattering_routines/environment.py +297 -0
- xcoll/scattering_routines/everest/amorphous.h +95 -71
- xcoll/scattering_routines/everest/{channeling.h → channelling.h} +121 -112
- xcoll/scattering_routines/everest/constants.h +1 -1
- xcoll/scattering_routines/everest/crystal_parameters.h +9 -9
- xcoll/scattering_routines/everest/everest.h +8 -3
- xcoll/scattering_routines/everest/everest.py +2 -1
- xcoll/scattering_routines/everest/ionisation_loss.h +141 -0
- xcoll/scattering_routines/everest/jaw.h +19 -24
- xcoll/scattering_routines/everest/materials.py +2 -0
- xcoll/scattering_routines/everest/multiple_coulomb_scattering.h +2 -2
- xcoll/scattering_routines/everest/nuclear_interaction.h +35 -19
- xcoll/scattering_routines/everest/properties.h +3 -72
- xcoll/xaux.py +65 -109
- {xcoll-0.5.12.dist-info → xcoll-0.6.0.dist-info}/METADATA +5 -5
- xcoll-0.6.0.dist-info/RECORD +135 -0
- xcoll/_manager.py +0 -22
- xcoll/headers/particle_states.h +0 -25
- xcoll/install.py +0 -35
- xcoll/scattering_routines/geant4/collimasim/.git +0 -1
- xcoll/scattering_routines/geant4/collimasim/.gitignore +0 -12
- xcoll/scattering_routines/geant4/collimasim/.gitmodules +0 -3
- xcoll/scattering_routines/geant4/collimasim/CMakeLists.txt +0 -26
- xcoll/scattering_routines/geant4/collimasim/README.md +0 -21
- xcoll/scattering_routines/geant4/collimasim/docs/Makefile +0 -20
- xcoll/scattering_routines/geant4/collimasim/docs/make.bat +0 -35
- xcoll/scattering_routines/geant4/collimasim/docs/source/collimasim.rst +0 -10
- xcoll/scattering_routines/geant4/collimasim/docs/source/conf.py +0 -59
- xcoll/scattering_routines/geant4/collimasim/docs/source/index.rst +0 -26
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.appveyor.yml +0 -37
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-format +0 -19
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-tidy +0 -65
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.cmake-format.yaml +0 -73
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.git +0 -1
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CODEOWNERS +0 -9
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CONTRIBUTING.md +0 -386
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +0 -45
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/config.yml +0 -8
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/dependabot.yml +0 -16
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler.yml +0 -8
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler_merged.yml +0 -3
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/pull_request_template.md +0 -19
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/ci.yml +0 -969
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/configure.yml +0 -84
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/format.yml +0 -48
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/labeler.yml +0 -16
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/pip.yml +0 -103
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.gitignore +0 -45
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.pre-commit-config.yaml +0 -151
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.readthedocs.yml +0 -3
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/CMakeLists.txt +0 -297
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/LICENSE +0 -29
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/MANIFEST.in +0 -6
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/README.rst +0 -180
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Doxyfile +0 -23
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Makefile +0 -192
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/_static/theme_overrides.css +0 -11
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/chrono.rst +0 -81
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/custom.rst +0 -93
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/eigen.rst +0 -310
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/functional.rst +0 -109
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/index.rst +0 -43
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/overview.rst +0 -171
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/stl.rst +0 -251
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/strings.rst +0 -305
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/classes.rst +0 -1297
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/embedding.rst +0 -262
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/exceptions.rst +0 -396
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/functions.rst +0 -568
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/misc.rst +0 -337
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/index.rst +0 -13
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/numpy.rst +0 -463
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/object.rst +0 -286
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/utilities.rst +0 -155
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/smart_ptrs.rst +0 -174
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/basics.rst +0 -308
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.py +0 -91
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.rst +0 -95
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/changelog.rst +0 -2050
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/classes.rst +0 -542
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/cmake/index.rst +0 -8
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/compiling.rst +0 -648
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/conf.py +0 -381
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/faq.rst +0 -343
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/index.rst +0 -48
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/installing.rst +0 -105
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/limitations.rst +0 -72
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11-logo.png +0 -0
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.svg +0 -427
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.svg +0 -427
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/reference.rst +0 -130
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/release.rst +0 -96
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/requirements.txt +0 -8
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/upgrade.rst +0 -548
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/attr.h +0 -605
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/buffer_info.h +0 -144
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/cast.h +0 -1432
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/chrono.h +0 -213
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/common.h +0 -2
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/complex.h +0 -65
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/class.h +0 -709
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/common.h +0 -1021
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/descr.h +0 -104
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/init.h +0 -346
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/internals.h +0 -467
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/type_caster_base.h +0 -978
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/typeid.h +0 -55
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eigen.h +0 -606
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/embed.h +0 -284
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eval.h +0 -163
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/functional.h +0 -121
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/gil.h +0 -193
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/iostream.h +0 -275
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/numpy.h +0 -1741
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/operators.h +0 -163
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/options.h +0 -65
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pybind11.h +0 -2497
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pytypes.h +0 -1879
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl/filesystem.h +0 -103
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl.h +0 -375
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl_bind.h +0 -747
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/noxfile.py +0 -88
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__init__.py +0 -11
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__main__.py +0 -52
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.py +0 -12
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.pyi +0 -6
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/commands.py +0 -21
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/py.typed +0 -0
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.py +0 -482
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.pyi +0 -63
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pyproject.toml +0 -41
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.cfg +0 -56
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.py +0 -155
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/CMakeLists.txt +0 -503
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/conftest.py +0 -208
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/constructor_stats.h +0 -275
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/cross_module_gil_utils.cpp +0 -73
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/env.py +0 -33
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/pytest.ini +0 -0
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/test_files.py +0 -279
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/pytest.ini +0 -0
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/test_setuphelper.py +0 -143
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/local_bindings.h +0 -85
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/object.h +0 -179
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_cross_module_tests.cpp +0 -151
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.cpp +0 -91
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.h +0 -85
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pytest.ini +0 -19
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/requirements.txt +0 -12
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.cpp +0 -26
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.py +0 -25
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.cpp +0 -216
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.py +0 -163
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.cpp +0 -286
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.py +0 -536
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.cpp +0 -107
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.py +0 -248
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.cpp +0 -227
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.py +0 -202
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.cpp +0 -84
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.py +0 -210
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.cpp +0 -550
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.py +0 -473
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/CMakeLists.txt +0 -84
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/embed.cpp +0 -21
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +0 -28
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +0 -39
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +0 -46
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/main.cpp +0 -6
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +0 -41
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +0 -35
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +0 -41
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/test.py +0 -10
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.cpp +0 -165
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.py +0 -53
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.cpp +0 -238
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.py +0 -126
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.cpp +0 -141
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.py +0 -117
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.cpp +0 -41
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.py +0 -50
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.cpp +0 -69
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.py +0 -42
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.cpp +0 -348
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.py +0 -771
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/CMakeLists.txt +0 -47
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/catch.cpp +0 -22
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/external_module.cpp +0 -23
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.cpp +0 -326
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.py +0 -15
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.cpp +0 -148
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.py +0 -272
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.cpp +0 -119
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.py +0 -51
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval_call.py +0 -5
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.cpp +0 -285
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.h +0 -12
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.py +0 -265
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.cpp +0 -397
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.py +0 -520
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.cpp +0 -49
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.py +0 -94
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.cpp +0 -125
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.py +0 -331
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.cpp +0 -153
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.py +0 -284
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.cpp +0 -107
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.py +0 -257
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.cpp +0 -412
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.py +0 -517
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.cpp +0 -102
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.py +0 -92
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.cpp +0 -233
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.py +0 -360
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.cpp +0 -472
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.py +0 -593
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.cpp +0 -524
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.py +0 -441
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.cpp +0 -103
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.py +0 -267
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.cpp +0 -73
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.py +0 -59
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.cpp +0 -235
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.py +0 -146
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.cpp +0 -189
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.py +0 -82
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.cpp +0 -560
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.py +0 -651
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.cpp +0 -500
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.py +0 -253
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.cpp +0 -452
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.py +0 -318
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.cpp +0 -342
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.py +0 -291
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.cpp +0 -131
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.py +0 -318
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.cpp +0 -144
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.py +0 -29
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.cpp +0 -66
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.py +0 -44
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.cpp +0 -22
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.py +0 -9
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.cpp +0 -510
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.py +0 -408
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-numpy-scipy.supp +0 -140
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-python.supp +0 -117
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindCatch.cmake +0 -70
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindEigen3.cmake +0 -86
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindPythonLibsNew.cmake +0 -257
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/check-style.sh +0 -44
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/cmake_uninstall.cmake.in +0 -23
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/libsize.py +0 -39
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/make_changelog.py +0 -64
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Common.cmake +0 -402
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Config.cmake.in +0 -233
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11NewTools.cmake +0 -276
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Tools.cmake +0 -214
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pyproject.toml +0 -3
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_global.py.in +0 -65
- xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_main.py.in +0 -41
- xcoll/scattering_routines/geant4/collimasim/pyproject.toml +0 -8
- xcoll/scattering_routines/geant4/collimasim/setup.py +0 -144
- xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.cpp +0 -403
- xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.hh +0 -100
- xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.cpp +0 -763
- xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.hh +0 -118
- xcoll/scattering_routines/geant4/collimasim/src/collimasim/__init__.py +0 -8
- xcoll/scattering_routines/geant4/collimasim/src/collimasim/bindings.cpp +0 -63
- xcoll/scattering_routines/geant4/collimasim/src/collimasim/pyCollimatorPass.py +0 -142
- xcoll/scattering_routines/geant4/collimasim/src/collimasim/xtrack_collimator.py +0 -556
- xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/PKG-INFO +0 -6
- xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/SOURCES.txt +0 -24
- xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/dependency_links.txt +0 -1
- xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/not-zip-safe +0 -1
- xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/top_level.txt +0 -1
- xcoll/scattering_routines/geant4/collimasim/tests/README.md +0 -25
- xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_forions.dat +0 -25
- xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_new_example.dat +0 -18
- xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_old_example.dat +0 -68
- xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_testing.dat +0 -15
- xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_yaml_example.yaml +0 -110
- xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps.dat +0 -7
- xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps_pyat_test.dat +0 -3
- xcoll/scattering_routines/geant4/collimasim/tests/resources/collonly_twiss_file_example.tfs +0 -54
- xcoll/scattering_routines/geant4/collimasim/tests/resources/settings.gmad +0 -3
- xcoll/scattering_routines/geant4/collimasim/tests/resources/settings_black_absorber.gmad +0 -3
- xcoll/scattering_routines/geant4/collimasim/tests/resources/settings_ions.gmad +0 -5
- xcoll/scattering_routines/geant4/collimasim/tests/resources/twiss_file_testing.tfs +0 -51
- xcoll/scattering_routines/geant4/collimasim/tests/test_pyat.py +0 -65
- xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_passmethod.py +0 -59
- xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_tracking.py +0 -102
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack.py +0 -75
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_angle.py +0 -74
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_colldb_load.py +0 -84
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_interaction.py +0 -159
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_interaction_ion.py +0 -99
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_ions.py +0 -78
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_lost_energy.py +0 -88
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tilt.py +0 -80
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tracking.py +0 -97
- xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tracking_ions.py +0 -96
- xcoll-0.5.12.dist-info/RECORD +0 -415
- {xcoll-0.5.12.dist-info → xcoll-0.6.0.dist-info}/LICENSE +0 -0
- {xcoll-0.5.12.dist-info → xcoll-0.6.0.dist-info}/NOTICE +0 -0
- {xcoll-0.5.12.dist-info → xcoll-0.6.0.dist-info}/WHEEL +0 -0
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Database for cleaning insertion collimators. Prepared: 23 Jun 2021
|
|
2
|
-
6
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
TCP.A.B1
|
|
6
|
-
tcp.a.b1
|
|
7
|
-
10
|
|
8
|
-
C
|
|
9
|
-
0.6
|
|
10
|
-
0
|
|
11
|
-
0.0000000000000000
|
|
12
|
-
647.6350305671534
|
|
13
|
-
53.02571504616053
|
|
14
|
-
|
|
15
|
-
#
|
|
16
|
-
TCP.B.B1
|
|
17
|
-
tcp.b.b1
|
|
18
|
-
80
|
|
19
|
-
C
|
|
20
|
-
0.6
|
|
21
|
-
1.5707963267948966
|
|
22
|
-
0.0000000000000000
|
|
23
|
-
603.3821034080673
|
|
24
|
-
58.54786181209406
|
|
25
|
-
|
|
26
|
-
#
|
|
27
|
-
TCS.B1.B1
|
|
28
|
-
tcs.b1.b1
|
|
29
|
-
89.5
|
|
30
|
-
C
|
|
31
|
-
1.0
|
|
32
|
-
1.5707963267948966
|
|
33
|
-
0.0000000000000000
|
|
34
|
-
290.63093200994945
|
|
35
|
-
154.51051797015745
|
|
36
|
-
|
|
37
|
-
#
|
|
38
|
-
TCS.A1.B1
|
|
39
|
-
tcs.a1.b1
|
|
40
|
-
11.5
|
|
41
|
-
C
|
|
42
|
-
1.0
|
|
43
|
-
0
|
|
44
|
-
0.0000000000000000
|
|
45
|
-
73.34173975049991
|
|
46
|
-
390.8874328919145
|
|
47
|
-
|
|
48
|
-
#
|
|
49
|
-
TCS.A2.B1
|
|
50
|
-
tcs.a2.b1
|
|
51
|
-
11.5
|
|
52
|
-
C
|
|
53
|
-
1.0
|
|
54
|
-
0
|
|
55
|
-
0.0000000000000000
|
|
56
|
-
465.66698081057984
|
|
57
|
-
488.78492630379634
|
|
58
|
-
|
|
59
|
-
#
|
|
60
|
-
TCS.B2.B1
|
|
61
|
-
tcs.b2.b1
|
|
62
|
-
89.5
|
|
63
|
-
C
|
|
64
|
-
1.0
|
|
65
|
-
1.5707963267948966
|
|
66
|
-
0.0000000000000000
|
|
67
|
-
1783.19687950021
|
|
68
|
-
362.409353541563
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Automatically converted collimator DB from old format file 'CollDB_HL.data'
|
|
2
|
-
# Families
|
|
3
|
-
NSIG_FAM dummy 5.000000 PRIMARY
|
|
4
|
-
#
|
|
5
|
-
# Collimators
|
|
6
|
-
# name opening/fam mat. length[m] angle[deg] offset[m]
|
|
7
|
-
coll_open 90 W 10.00000 0.000000 0.000000
|
|
8
|
-
coll_skew dummy W 0.60000 45.000000 0.000000
|
|
9
|
-
coll_skew_tilted dummy W 0.60000 45.000000 0.000000
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
#ONESIDED dummy1 1
|
|
13
|
-
TILTED coll_skew_tilted 4 -9
|
|
14
|
-
# Additional Collimator Settings
|
|
15
|
-
SETTINGS
|
|
@@ -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,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()
|