xcoll 0.5.12__py3-none-any.whl → 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xcoll might be problematic. Click here for more details.
- xcoll/__init__.py +5 -18
- xcoll/__init__.py.orig +26 -0
- 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/general.py.orig +20 -0
- xcoll/headers/particle_states.py +51 -0
- xcoll/initial_distribution.py +121 -91
- xcoll/initial_distribution.py.orig +256 -0
- 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.1.dist-info}/METADATA +5 -5
- xcoll-0.6.1.dist-info/RECORD +138 -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.1.dist-info}/LICENSE +0 -0
- {xcoll-0.5.12.dist-info → xcoll-0.6.1.dist-info}/NOTICE +0 -0
- {xcoll-0.5.12.dist-info → xcoll-0.6.1.dist-info}/WHEEL +0 -0
|
@@ -33,90 +33,87 @@ void EverestCrystal_set_material(EverestCrystalData el){
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
/*gpufun*/
|
|
36
|
-
CrystalGeometry EverestCrystal_init_geometry(EverestCrystalData el, LocalParticle* part0
|
|
36
|
+
CrystalGeometry EverestCrystal_init_geometry(EverestCrystalData el, LocalParticle* part0){
|
|
37
37
|
CrystalGeometry cg = (CrystalGeometry) malloc(sizeof(CrystalGeometry_));
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
38
|
+
cg->length = EverestCrystalData_get_length(el);
|
|
39
|
+
cg->side = EverestCrystalData_get__side(el);
|
|
40
|
+
if (cg->side == 0){
|
|
41
|
+
kill_all_particles(part0, XC_ERR_INVALID_XOFIELD);
|
|
42
|
+
return cg;
|
|
43
|
+
}
|
|
44
|
+
double R = EverestCrystalData_get__bending_radius(el);
|
|
45
|
+
double t_R = EverestCrystalData_get__bending_angle(el);
|
|
46
|
+
cg->bending_radius = R;
|
|
47
|
+
cg->bending_angle = t_R;
|
|
48
|
+
cg->miscut_angle = EverestCrystalData_get_miscut(el);
|
|
49
|
+
cg->width = EverestCrystalData_get__width(el);
|
|
50
|
+
cg->height = EverestCrystalData_get__height(el);
|
|
51
|
+
cg->jaw_U = EverestCrystalData_get__jaw_U(el);
|
|
52
|
+
cg->sin_z = EverestCrystalData_get__sin_z(el);
|
|
53
|
+
cg->cos_z = EverestCrystalData_get__cos_z(el);
|
|
54
|
+
cg->sin_y = EverestCrystalData_get__sin_y(el);
|
|
55
|
+
cg->cos_y = EverestCrystalData_get__cos_y(el);
|
|
56
|
+
// Segments
|
|
57
|
+
if (cg->side == 1){
|
|
58
|
+
cg->segments = create_crystal(cg->bending_radius, cg->width, cg->length, cg->jaw_U, \
|
|
59
|
+
cg->sin_y, cg->cos_y);
|
|
60
|
+
} else if (cg->side == -1){
|
|
61
|
+
// jaw_U is the inner corner (shifted if right-sided crystal)
|
|
62
|
+
cg->segments = create_crystal(cg->bending_radius, cg->width, cg->length, cg->jaw_U - cg->width, \
|
|
63
|
+
cg->sin_y, cg->cos_y);
|
|
64
|
+
}
|
|
65
|
+
// // Jaw frame is always left-sided
|
|
66
|
+
// cg->segments_jf = create_crystal(cg->bending_radius, cg->width, cg->length, 0, 0, 1);
|
|
67
|
+
// Bend centre
|
|
68
|
+
cg->s_B = 0;
|
|
69
|
+
cg->x_B = cg->bending_radius;
|
|
70
|
+
// Miscut centre
|
|
71
|
+
cg->s_P = -R*sin(cg->miscut_angle);
|
|
72
|
+
cg->x_P = R*cos(cg->miscut_angle);
|
|
73
|
+
if (cg->side == 1 && R < 0){
|
|
74
|
+
// If R<0, a left-sided crystal bends towards the beam
|
|
75
|
+
cg->x_P = cg->x_P + cg->width;
|
|
76
|
+
cg->x_B = cg->x_B + cg->width;
|
|
77
|
+
} else if (cg->side == -1 && R > 0){
|
|
78
|
+
// If R>0, a right-sided crystal bends towards the beam
|
|
79
|
+
cg->x_P = cg->x_P - cg->width;
|
|
80
|
+
cg->x_B = cg->x_B - cg->width;
|
|
81
|
+
}
|
|
82
|
+
if (cg->side == -1){
|
|
83
|
+
// Mirror the crystal geometry
|
|
84
|
+
cg->bending_radius = -cg->bending_radius;
|
|
85
|
+
cg->bending_angle = -cg->bending_angle;
|
|
86
|
+
cg->miscut_angle = -cg->miscut_angle;
|
|
87
|
+
cg->x_P = -cg->x_P;
|
|
88
|
+
cg->x_B = -cg->x_B;
|
|
89
|
+
}
|
|
90
|
+
// From here on, crystal geometry parameters can always be treated as left-sided.
|
|
91
|
+
// Note that the segments are not mirrored, which is fine as get_s_of_first_crossing_with_vlimit
|
|
92
|
+
// is absolute (not in the jaw reference frame). It is only after a hit is registered, that we
|
|
93
|
+
// need to transform the particle to the jaw reference frame.
|
|
94
|
+
double Rb;
|
|
95
|
+
if (cg->miscut_angle > 0){
|
|
96
|
+
Rb = R - cg->width;
|
|
97
|
+
} else {
|
|
98
|
+
Rb = R;
|
|
99
|
+
}
|
|
100
|
+
cg->t_VImax = atan( (Rb*sin(t_R) - cg->s_P) / (R - Rb*cos(t_R) - cg->x_P) );
|
|
101
|
+
// Impact table
|
|
102
|
+
cg->record = EverestCrystalData_getp_internal_record(el, part0);
|
|
103
|
+
cg->record_index = NULL;
|
|
104
|
+
cg->record_impacts = 0;
|
|
105
|
+
cg->record_exits = 0;
|
|
106
|
+
if (cg->record){
|
|
107
|
+
cg->record_index = InteractionRecordData_getp__index(cg->record);
|
|
108
|
+
cg->record_impacts = EverestCrystalData_get_record_impacts(el);
|
|
109
|
+
cg->record_exits = EverestCrystalData_get_record_exits(el);
|
|
110
110
|
}
|
|
111
|
-
|
|
112
111
|
return cg;
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
/*gpufun*/
|
|
116
|
-
void EverestCrystal_free(CrystalGeometry restrict cg
|
|
117
|
-
|
|
118
|
-
destroy_crystal(cg->segments);
|
|
119
|
-
}
|
|
115
|
+
void EverestCrystal_free(CrystalGeometry restrict cg){
|
|
116
|
+
destroy_crystal(cg->segments);
|
|
120
117
|
free(cg);
|
|
121
118
|
}
|
|
122
119
|
|
|
@@ -124,35 +121,33 @@ void EverestCrystal_free(CrystalGeometry restrict cg, int8_t active){
|
|
|
124
121
|
// TODO: it would be great if we could set EverestData as an xofield, because then we could
|
|
125
122
|
// run this function at creation of the collimator instead of every turn
|
|
126
123
|
/*gpufun*/
|
|
127
|
-
EverestCollData EverestCrystal_init(EverestCrystalData el, LocalParticle* part0
|
|
124
|
+
EverestCollData EverestCrystal_init(EverestCrystalData el, LocalParticle* part0){
|
|
128
125
|
EverestCollData coll = (EverestCollData) malloc(sizeof(EverestCollData_));
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
coll->record_scatterings = EverestCrystalData_get_record_scatterings(el);
|
|
155
|
-
}
|
|
126
|
+
// Random generator and material
|
|
127
|
+
coll->rng = EverestCrystalData_getp_rutherford_rng(el);
|
|
128
|
+
CrystalMaterialData material = EverestCrystalData_getp__material(el);
|
|
129
|
+
coll->exenergy = CrystalMaterialData_get_excitation_energy(material)*1.0e3; // MeV
|
|
130
|
+
coll->rho = CrystalMaterialData_get_density(material);
|
|
131
|
+
coll->anuc = CrystalMaterialData_get_A(material);
|
|
132
|
+
coll->zatom = CrystalMaterialData_get_Z(material);
|
|
133
|
+
coll->bnref = CrystalMaterialData_get_nuclear_elastic_slope(material);
|
|
134
|
+
coll->csref[0] = CrystalMaterialData_get_cross_section(material, 0);
|
|
135
|
+
coll->csref[1] = CrystalMaterialData_get_cross_section(material, 1);
|
|
136
|
+
coll->csref[5] = CrystalMaterialData_get_cross_section(material, 5);
|
|
137
|
+
coll->only_mcs = CrystalMaterialData_get__only_mcs(material);
|
|
138
|
+
coll->dlri = CrystalMaterialData_get_crystal_radiation_length(material);
|
|
139
|
+
coll->dlyi = CrystalMaterialData_get_crystal_nuclear_length(material);
|
|
140
|
+
coll->ai = CrystalMaterialData_get_crystal_plane_distance(material);
|
|
141
|
+
coll->eum = CrystalMaterialData_get_crystal_potential(material);
|
|
142
|
+
coll->collnt = CrystalMaterialData_get_nuclear_collision_length(material);
|
|
143
|
+
coll->eta = 0.9; // Hard-coded channeling saturation factor
|
|
144
|
+
coll->orient = EverestCrystalData_get__orient(el);
|
|
145
|
+
// Impact table
|
|
146
|
+
coll->record = EverestCrystalData_getp_internal_record(el, part0);
|
|
147
|
+
coll->record_index = NULL;
|
|
148
|
+
if (coll->record){
|
|
149
|
+
coll->record_index = InteractionRecordData_getp__index(coll->record);
|
|
150
|
+
coll->record_scatterings = EverestCrystalData_get_record_scatterings(el);
|
|
156
151
|
}
|
|
157
152
|
return coll;
|
|
158
153
|
}
|
|
@@ -180,17 +175,25 @@ void EverestCrystal_track_local_particle(EverestCrystalData el, LocalParticle* p
|
|
|
180
175
|
double length = EverestCrystalData_get_length(el);
|
|
181
176
|
|
|
182
177
|
// Initialise collimator data
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
178
|
+
EverestCollData coll;
|
|
179
|
+
CrystalGeometry cg;
|
|
180
|
+
if (active){
|
|
181
|
+
// TODO: we want this to happen before tracking (instead of every turn), as a separate kernel
|
|
182
|
+
coll = EverestCrystal_init(el, part0);
|
|
183
|
+
cg = EverestCrystal_init_geometry(el, part0);
|
|
186
184
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
185
|
+
// For info
|
|
186
|
+
double const e0 = LocalParticle_get_energy0(part0);
|
|
187
|
+
double t_c0 = _critical_angle0(coll, e0);
|
|
188
|
+
double Rcrit = _critical_radius(coll, e0);
|
|
189
|
+
double t_c = _critical_angle(coll, t_c0, Rcrit / fabs(cg->bending_radius));
|
|
190
|
+
EverestCrystalData_set__critical_radius(el, Rcrit);
|
|
191
|
+
EverestCrystalData_set__critical_angle(el, t_c);
|
|
192
|
+
|
|
193
|
+
if (cg->width==0 || cg->height==0 || cg->bending_radius==0){
|
|
194
|
+
kill_all_particles(part0, XC_ERR_INVALID_XOFIELD);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
194
197
|
|
|
195
198
|
//start_per_particle_block (part0->part)
|
|
196
199
|
if (!active){
|
|
@@ -207,17 +210,21 @@ void EverestCrystal_track_local_particle(EverestCrystalData el, LocalParticle* p
|
|
|
207
210
|
LocalParticle_set_s(part, 0);
|
|
208
211
|
|
|
209
212
|
// Store initial coordinates for updating later
|
|
210
|
-
double const rvv_in
|
|
213
|
+
double const rvv_in = LocalParticle_get_rvv(part);
|
|
211
214
|
#ifdef XCOLL_USE_EXACT
|
|
212
|
-
double const xp_in
|
|
213
|
-
double const yp_in
|
|
215
|
+
double const xp_in = LocalParticle_get_exact_xp(part);
|
|
216
|
+
double const yp_in = LocalParticle_get_exact_yp(part);
|
|
214
217
|
#else
|
|
215
|
-
double const xp_in
|
|
216
|
-
double const yp_in
|
|
218
|
+
double const xp_in = LocalParticle_get_xp(part);
|
|
219
|
+
double const yp_in = LocalParticle_get_yp(part);
|
|
217
220
|
#endif
|
|
218
|
-
double const zeta_in
|
|
219
|
-
double const
|
|
220
|
-
double
|
|
221
|
+
double const zeta_in = LocalParticle_get_zeta(part);
|
|
222
|
+
double const p0c = LocalParticle_get_p0c(part);
|
|
223
|
+
double const delta = LocalParticle_get_delta(part);
|
|
224
|
+
double const qq0 = LocalParticle_get_charge_ratio(part);
|
|
225
|
+
double const chi = LocalParticle_get_chi(part);
|
|
226
|
+
double const pc_in = (1 + delta)*p0c*qq0/chi;
|
|
227
|
+
double pc_out;
|
|
221
228
|
|
|
222
229
|
// Check if hit on jaws
|
|
223
230
|
int8_t is_hit = hit_crystal_check_and_transform(part, cg);
|
|
@@ -227,17 +234,7 @@ void EverestCrystal_track_local_particle(EverestCrystalData el, LocalParticle* p
|
|
|
227
234
|
double remaining_length = length - LocalParticle_get_s(part);
|
|
228
235
|
// Scatter
|
|
229
236
|
EverestData everest = EverestCrystal_init_data(part, coll, cg);
|
|
230
|
-
|
|
231
|
-
#ifdef XCOLL_USE_EXACT
|
|
232
|
-
double const xp = LocalParticle_get_exact_xp(part);
|
|
233
|
-
#else
|
|
234
|
-
double const xp = LocalParticle_get_xp(part);
|
|
235
|
-
#endif
|
|
236
|
-
if (fabs(xp - everest->t_I) < everest->t_c) {
|
|
237
|
-
energy_out = Channel(everest, part, cg, energy_in/1.e9, remaining_length)*1.e9;
|
|
238
|
-
} else {
|
|
239
|
-
energy_out = Amorphous(everest, part, cg, energy_in/1.e9, remaining_length, 1)*1.e9;
|
|
240
|
-
}
|
|
237
|
+
pc_out = do_crystal(everest, part, cg, pc_in/1.e9, remaining_length)*1.e9;
|
|
241
238
|
free(everest);
|
|
242
239
|
}
|
|
243
240
|
|
|
@@ -246,10 +243,16 @@ void EverestCrystal_track_local_particle(EverestCrystalData el, LocalParticle* p
|
|
|
246
243
|
LocalParticle_add_to_s(part, s_coll);
|
|
247
244
|
|
|
248
245
|
LocalParticle_set_zeta(part, zeta_in);
|
|
246
|
+
|
|
249
247
|
// Hit and survived particles need correcting:
|
|
250
248
|
if (is_hit!=0 && LocalParticle_get_state(part)>0){
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
double const rpp_old = LocalParticle_get_rpp(part);
|
|
250
|
+
LocalParticle_update_delta(part, pc_out*chi/p0c/qq0 - 1);
|
|
251
|
+
// Keep angles constant (this is also correct for exact angles): px_new = px_old*(1 + δ_new)/(1 + δ_old)
|
|
252
|
+
double const scale = rpp_old / LocalParticle_get_rpp(part);
|
|
253
|
+
LocalParticle_scale_px(part, scale);
|
|
254
|
+
LocalParticle_scale_py(part, scale);
|
|
255
|
+
|
|
253
256
|
// Update zeta
|
|
254
257
|
#ifdef XCOLL_USE_EXACT
|
|
255
258
|
double xp = LocalParticle_get_exact_xp(part);
|
|
@@ -267,9 +270,11 @@ void EverestCrystal_track_local_particle(EverestCrystalData el, LocalParticle* p
|
|
|
267
270
|
}
|
|
268
271
|
}
|
|
269
272
|
//end_per_particle_block
|
|
270
|
-
|
|
271
|
-
|
|
273
|
+
if (active){
|
|
274
|
+
EverestCrystal_free(cg);
|
|
275
|
+
free(coll);
|
|
276
|
+
}
|
|
272
277
|
}
|
|
273
278
|
|
|
274
279
|
|
|
275
|
-
#endif /* XCOLL_EVEREST_CRYSTAL_H */
|
|
280
|
+
#endif /* XCOLL_EVEREST_CRYSTAL_H */
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// copyright ############################### #
|
|
2
|
+
// This file is part of the Xcoll package. #
|
|
3
|
+
// Copyright (c) CERN, 2025. #
|
|
4
|
+
// ######################################### #
|
|
5
|
+
|
|
6
|
+
#ifndef XCOLL_TRANSPARENT_COLL_H
|
|
7
|
+
#define XCOLL_TRANSPARENT_COLL_H
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/*gpufun*/
|
|
11
|
+
int8_t TransparentCollimatorData_get_record_impacts(TransparentCollimatorData el){
|
|
12
|
+
return TransparentCollimatorData_get__record_interactions(el) % 2;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/*gpufun*/
|
|
16
|
+
int8_t TransparentCollimatorData_get_record_exits(TransparentCollimatorData el){
|
|
17
|
+
return (TransparentCollimatorData_get__record_interactions(el) >> 1) % 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/*gpufun*/
|
|
21
|
+
int8_t TransparentCollimatorData_get_record_scatterings(TransparentCollimatorData el){
|
|
22
|
+
return (TransparentCollimatorData_get__record_interactions(el) >> 2) % 2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/*gpufun*/
|
|
27
|
+
CollimatorGeometry TransparentCollimator_init_geometry(TransparentCollimatorData el, LocalParticle* part0){
|
|
28
|
+
CollimatorGeometry cg = (CollimatorGeometry) malloc(sizeof(CollimatorGeometry_));
|
|
29
|
+
// Jaw corners (with tilts)
|
|
30
|
+
cg->jaw_LU = TransparentCollimatorData_get__jaw_LU(el);
|
|
31
|
+
cg->jaw_RU = TransparentCollimatorData_get__jaw_RU(el);
|
|
32
|
+
// Get angles of jaws
|
|
33
|
+
cg->sin_zL = TransparentCollimatorData_get__sin_zL(el);
|
|
34
|
+
cg->cos_zL = TransparentCollimatorData_get__cos_zL(el);
|
|
35
|
+
cg->sin_zR = TransparentCollimatorData_get__sin_zR(el);
|
|
36
|
+
cg->cos_zR = TransparentCollimatorData_get__cos_zR(el);
|
|
37
|
+
cg->sin_zDiff = TransparentCollimatorData_get__sin_zDiff(el);
|
|
38
|
+
cg->cos_zDiff = TransparentCollimatorData_get__cos_zDiff(el);
|
|
39
|
+
cg->jaws_parallel = TransparentCollimatorData_get__jaws_parallel(el);
|
|
40
|
+
// Tilts
|
|
41
|
+
cg->sin_yL = TransparentCollimatorData_get__sin_yL(el);
|
|
42
|
+
cg->cos_yL = TransparentCollimatorData_get__cos_yL(el);
|
|
43
|
+
cg->sin_yR = TransparentCollimatorData_get__sin_yR(el);
|
|
44
|
+
cg->cos_yR = TransparentCollimatorData_get__cos_yR(el);
|
|
45
|
+
// Length and segments
|
|
46
|
+
cg->length = TransparentCollimatorData_get_length(el);
|
|
47
|
+
cg->side = TransparentCollimatorData_get__side(el);
|
|
48
|
+
double s_U, s_D, x_D;
|
|
49
|
+
if (cg->side != -1){
|
|
50
|
+
s_U = cg->length/2 * (1-cg->cos_yL);
|
|
51
|
+
s_D = cg->length/2 * (1+cg->cos_yL);
|
|
52
|
+
x_D = TransparentCollimatorData_get__jaw_LD(el);
|
|
53
|
+
cg->segments_L = create_jaw(s_U, cg->jaw_LU, s_D, x_D, cg->sin_yL/cg->cos_yL, 1);
|
|
54
|
+
}
|
|
55
|
+
if (cg->side != 1){
|
|
56
|
+
s_U = cg->length/2 * (1-cg->cos_yR);
|
|
57
|
+
s_D = cg->length/2 * (1+cg->cos_yR);
|
|
58
|
+
x_D = TransparentCollimatorData_get__jaw_RD(el);
|
|
59
|
+
cg->segments_R = create_jaw(s_U, cg->jaw_RU, s_D, x_D, cg->sin_yR/cg->cos_yR, -1);
|
|
60
|
+
}
|
|
61
|
+
// Impact table
|
|
62
|
+
cg->record = TransparentCollimatorData_getp_internal_record(el, part0);
|
|
63
|
+
cg->record_index = NULL;
|
|
64
|
+
cg->record_impacts = 0;
|
|
65
|
+
cg->record_exits = 0;
|
|
66
|
+
if (cg->record){
|
|
67
|
+
cg->record_index = InteractionRecordData_getp__index(cg->record);
|
|
68
|
+
cg->record_impacts = TransparentCollimatorData_get_record_impacts(el);
|
|
69
|
+
cg->record_exits = TransparentCollimatorData_get_record_exits(el);
|
|
70
|
+
}
|
|
71
|
+
return cg;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/*gpufun*/
|
|
75
|
+
void TransparentCollimator_free(CollimatorGeometry restrict cg){
|
|
76
|
+
if (cg->side != -1){
|
|
77
|
+
destroy_jaw(cg->segments_L);
|
|
78
|
+
}
|
|
79
|
+
if (cg->side != 1){
|
|
80
|
+
destroy_jaw(cg->segments_R);
|
|
81
|
+
}
|
|
82
|
+
free(cg);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/*gpufun*/
|
|
87
|
+
void TransparentCollimator_track_local_particle(TransparentCollimatorData el, LocalParticle* part0){
|
|
88
|
+
int8_t active = TransparentCollimatorData_get_active(el);
|
|
89
|
+
active *= TransparentCollimatorData_get__tracking(el);
|
|
90
|
+
double const length = TransparentCollimatorData_get_length(el);
|
|
91
|
+
|
|
92
|
+
// Get geometry
|
|
93
|
+
CollimatorGeometry cg;
|
|
94
|
+
if (active){
|
|
95
|
+
cg = TransparentCollimator_init_geometry(el, part0);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
//start_per_particle_block (part0->part)
|
|
99
|
+
if (!active){
|
|
100
|
+
// Drift full length
|
|
101
|
+
Drift_single_particle(part, length);
|
|
102
|
+
|
|
103
|
+
} else {
|
|
104
|
+
// Check collimator initialisation
|
|
105
|
+
int8_t is_tracking = assert_tracking(part, XC_ERR_INVALID_TRACK);
|
|
106
|
+
|
|
107
|
+
if (is_tracking) {
|
|
108
|
+
// Store s-location of start of collimator
|
|
109
|
+
double s_coll = LocalParticle_get_s(part);
|
|
110
|
+
LocalParticle_set_s(part, 0);
|
|
111
|
+
|
|
112
|
+
// Check if hit on jaws
|
|
113
|
+
int8_t is_hit = hit_jaws_check_and_transform(part, cg);
|
|
114
|
+
|
|
115
|
+
// Transform back to the lab frame
|
|
116
|
+
hit_jaws_transform_back(is_hit, part, cg);
|
|
117
|
+
LocalParticle_add_to_s(part, s_coll);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
//end_per_particle_block
|
|
121
|
+
if (active){
|
|
122
|
+
TransparentCollimator_free(cg);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
#endif /* XCOLL_TRANSPARENT_COLL_H */
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// copyright ############################### #
|
|
2
|
+
// This file is part of the Xcoll package. #
|
|
3
|
+
// Copyright (c) CERN, 2025. #
|
|
4
|
+
// ######################################### #
|
|
5
|
+
|
|
6
|
+
#ifndef XCOLL_TRANSPAREN_CRY_H
|
|
7
|
+
#define XCOLL_TRANSPAREN_CRY_H
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/*gpufun*/
|
|
11
|
+
int8_t TransparentCrystalData_get_record_impacts(TransparentCrystalData el){
|
|
12
|
+
return TransparentCrystalData_get__record_interactions(el) % 2;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/*gpufun*/
|
|
16
|
+
int8_t TransparentCrystalData_get_record_exits(TransparentCrystalData el){
|
|
17
|
+
return (TransparentCrystalData_get__record_interactions(el) >> 1) % 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/*gpufun*/
|
|
21
|
+
int8_t TransparentCrystalData_get_record_scatterings(TransparentCrystalData el){
|
|
22
|
+
return (TransparentCrystalData_get__record_interactions(el) >> 2) % 2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/*gpufun*/
|
|
27
|
+
CrystalGeometry TransparentCrystal_init_geometry(TransparentCrystalData el, LocalParticle* part0){
|
|
28
|
+
CrystalGeometry cg = (CrystalGeometry) malloc(sizeof(CrystalGeometry_));
|
|
29
|
+
cg->length = TransparentCrystalData_get_length(el);
|
|
30
|
+
cg->side = TransparentCrystalData_get__side(el);
|
|
31
|
+
cg->bending_radius = TransparentCrystalData_get__bending_radius(el);
|
|
32
|
+
cg->bending_angle = TransparentCrystalData_get__bending_angle(el);
|
|
33
|
+
cg->width = TransparentCrystalData_get__width(el);
|
|
34
|
+
cg->height = TransparentCrystalData_get__height(el);
|
|
35
|
+
cg->jaw_U = TransparentCrystalData_get__jaw_U(el);
|
|
36
|
+
cg->sin_z = TransparentCrystalData_get__sin_z(el);
|
|
37
|
+
cg->cos_z = TransparentCrystalData_get__cos_z(el);
|
|
38
|
+
cg->sin_y = TransparentCrystalData_get__sin_y(el);
|
|
39
|
+
cg->cos_y = TransparentCrystalData_get__cos_y(el);
|
|
40
|
+
double jaw;
|
|
41
|
+
if (cg->side == 1){
|
|
42
|
+
jaw = cg->jaw_U;
|
|
43
|
+
} else if (cg->side == -1){
|
|
44
|
+
jaw = cg->jaw_U - cg->width; // To ensure that jaw_U is the inner corner
|
|
45
|
+
} else {
|
|
46
|
+
kill_all_particles(part0, XC_ERR_INVALID_XOFIELD);
|
|
47
|
+
return cg;
|
|
48
|
+
}
|
|
49
|
+
cg->segments = create_crystal(cg->bending_radius, cg->width, cg->length, jaw, cg->sin_y, cg->cos_y);
|
|
50
|
+
// Impact table
|
|
51
|
+
cg->record = TransparentCrystalData_getp_internal_record(el, part0);
|
|
52
|
+
cg->record_index = NULL;
|
|
53
|
+
cg->record_impacts = 0;
|
|
54
|
+
cg->record_exits = 0;
|
|
55
|
+
if (cg->record){
|
|
56
|
+
cg->record_index = InteractionRecordData_getp__index(cg->record);
|
|
57
|
+
cg->record_impacts = TransparentCrystalData_get_record_impacts(el);
|
|
58
|
+
cg->record_exits = TransparentCrystalData_get_record_exits(el);
|
|
59
|
+
}
|
|
60
|
+
// Not needed, set to zero
|
|
61
|
+
cg->miscut_angle = 0;
|
|
62
|
+
cg->s_P = 0;
|
|
63
|
+
cg->x_P = 0;
|
|
64
|
+
cg->t_VImax = 0;
|
|
65
|
+
return cg;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*gpufun*/
|
|
69
|
+
void TransparentCrystal_free(CrystalGeometry restrict cg){
|
|
70
|
+
destroy_crystal(cg->segments);
|
|
71
|
+
free(cg);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/*gpufun*/
|
|
76
|
+
void TransparentCrystal_track_local_particle(TransparentCrystalData el, LocalParticle* part0){
|
|
77
|
+
int8_t active = TransparentCrystalData_get_active(el);
|
|
78
|
+
active *= TransparentCrystalData_get__tracking(el);
|
|
79
|
+
double const length = TransparentCrystalData_get_length(el);
|
|
80
|
+
|
|
81
|
+
// Get geometry
|
|
82
|
+
CrystalGeometry cg;
|
|
83
|
+
if (active){
|
|
84
|
+
cg = TransparentCrystal_init_geometry(el, part0);
|
|
85
|
+
if (cg->width==0 || cg->height==0 || cg->bending_radius==0){
|
|
86
|
+
kill_all_particles(part0, XC_ERR_INVALID_XOFIELD);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//start_per_particle_block (part0->part)
|
|
91
|
+
if (!active){
|
|
92
|
+
// Drift full length
|
|
93
|
+
Drift_single_particle(part, length);
|
|
94
|
+
|
|
95
|
+
} else {
|
|
96
|
+
// Check collimator initialisation
|
|
97
|
+
int8_t is_tracking = assert_tracking(part, XC_ERR_INVALID_TRACK);
|
|
98
|
+
|
|
99
|
+
if (is_tracking) {
|
|
100
|
+
// Store s-location of start of collimator
|
|
101
|
+
double s_coll = LocalParticle_get_s(part);
|
|
102
|
+
LocalParticle_set_s(part, 0);
|
|
103
|
+
|
|
104
|
+
// Check if hit on jaws
|
|
105
|
+
int8_t is_hit = hit_crystal_check_and_transform(part, cg);
|
|
106
|
+
|
|
107
|
+
// Transform back to the lab frame
|
|
108
|
+
hit_crystal_transform_back(is_hit, part, cg);
|
|
109
|
+
LocalParticle_add_to_s(part, s_coll);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//end_per_particle_block
|
|
113
|
+
if (active){
|
|
114
|
+
TransparentCrystal_free(cg);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
#endif /* XCOLL_TRANSPAREN_CRY_H */
|
xcoll/beam_elements/everest.py
CHANGED
|
@@ -31,11 +31,15 @@ class EverestBlock(BaseBlock):
|
|
|
31
31
|
isthick = True
|
|
32
32
|
needs_rng = True
|
|
33
33
|
allow_track = True
|
|
34
|
+
allow_double_sided = False
|
|
34
35
|
behaves_like_drift = True
|
|
36
|
+
allow_rot_and_shift = False
|
|
37
|
+
allow_loss_refinement = True
|
|
35
38
|
skip_in_loss_location_refinement = True
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
_noexpr_fields = {'material'}
|
|
41
|
+
_skip_in_to_dict = [*BaseBlock._skip_in_to_dict, '_material']
|
|
42
|
+
_store_in_to_dict = [*BaseBlock._store_in_to_dict, 'material']
|
|
39
43
|
_internal_record_class = BaseBlock._internal_record_class
|
|
40
44
|
|
|
41
45
|
_depends_on = [BaseBlock, EverestEngine]
|
|
@@ -95,11 +99,15 @@ class EverestCollimator(BaseCollimator):
|
|
|
95
99
|
isthick = True
|
|
96
100
|
needs_rng = True
|
|
97
101
|
allow_track = True
|
|
102
|
+
allow_double_sided = True
|
|
98
103
|
behaves_like_drift = True
|
|
104
|
+
allow_rot_and_shift = False
|
|
105
|
+
allow_loss_refinement = True
|
|
99
106
|
skip_in_loss_location_refinement = True
|
|
100
107
|
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
_noexpr_fields = {*BaseCollimator._noexpr_fields, 'material'}
|
|
109
|
+
_skip_in_to_dict = [*BaseCollimator._skip_in_to_dict, '_material']
|
|
110
|
+
_store_in_to_dict = [*BaseCollimator._store_in_to_dict, 'material']
|
|
103
111
|
_internal_record_class = BaseCollimator._internal_record_class
|
|
104
112
|
|
|
105
113
|
_depends_on = [BaseCollimator, EverestEngine]
|
|
@@ -148,7 +156,6 @@ class EverestCollimator(BaseCollimator):
|
|
|
148
156
|
_buffer=_buffer, _offset=_offset)
|
|
149
157
|
|
|
150
158
|
|
|
151
|
-
|
|
152
159
|
class EverestCrystal(BaseCrystal):
|
|
153
160
|
_xofields = {**BaseCrystal._xofields,
|
|
154
161
|
'miscut': xo.Float64,
|
|
@@ -163,9 +170,13 @@ class EverestCrystal(BaseCrystal):
|
|
|
163
170
|
isthick = True
|
|
164
171
|
needs_rng = True
|
|
165
172
|
allow_track = True
|
|
173
|
+
allow_double_sided = False
|
|
166
174
|
behaves_like_drift = True
|
|
175
|
+
allow_rot_and_shift = False
|
|
176
|
+
allow_loss_refinement = True
|
|
167
177
|
skip_in_loss_location_refinement = True
|
|
168
178
|
|
|
179
|
+
_noexpr_fields = {*BaseCrystal._noexpr_fields, 'material', 'lattice'}
|
|
169
180
|
_skip_in_to_dict = [*BaseCrystal._skip_in_to_dict, '_orient', '_material']
|
|
170
181
|
_store_in_to_dict = [*BaseCrystal._store_in_to_dict, 'lattice', 'material']
|
|
171
182
|
_internal_record_class = BaseCrystal._internal_record_class
|