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
|
@@ -24,65 +24,60 @@ int8_t BlackAbsorberData_get_record_scatterings(BlackAbsorberData el){
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
/*gpufun*/
|
|
27
|
-
CollimatorGeometry BlackAbsorber_init_geometry(BlackAbsorberData el, LocalParticle* part0
|
|
27
|
+
CollimatorGeometry BlackAbsorber_init_geometry(BlackAbsorberData el, LocalParticle* part0){
|
|
28
28
|
CollimatorGeometry cg = (CollimatorGeometry) malloc(sizeof(CollimatorGeometry_));
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
cg->record_exits = BlackAbsorberData_get_record_exits(el);
|
|
71
|
-
}
|
|
29
|
+
// Jaw corners (with tilts)
|
|
30
|
+
cg->jaw_LU = BlackAbsorberData_get__jaw_LU(el);
|
|
31
|
+
cg->jaw_RU = BlackAbsorberData_get__jaw_RU(el);
|
|
32
|
+
// Get angles of jaws
|
|
33
|
+
cg->sin_zL = BlackAbsorberData_get__sin_zL(el);
|
|
34
|
+
cg->cos_zL = BlackAbsorberData_get__cos_zL(el);
|
|
35
|
+
cg->sin_zR = BlackAbsorberData_get__sin_zR(el);
|
|
36
|
+
cg->cos_zR = BlackAbsorberData_get__cos_zR(el);
|
|
37
|
+
cg->sin_zDiff = BlackAbsorberData_get__sin_zDiff(el);
|
|
38
|
+
cg->cos_zDiff = BlackAbsorberData_get__cos_zDiff(el);
|
|
39
|
+
cg->jaws_parallel = BlackAbsorberData_get__jaws_parallel(el);
|
|
40
|
+
// Tilts
|
|
41
|
+
cg->sin_yL = BlackAbsorberData_get__sin_yL(el);
|
|
42
|
+
cg->cos_yL = BlackAbsorberData_get__cos_yL(el);
|
|
43
|
+
cg->sin_yR = BlackAbsorberData_get__sin_yR(el);
|
|
44
|
+
cg->cos_yR = BlackAbsorberData_get__cos_yR(el);
|
|
45
|
+
// Length and segments
|
|
46
|
+
cg->length = BlackAbsorberData_get_length(el);
|
|
47
|
+
cg->side = BlackAbsorberData_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 = BlackAbsorberData_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 = BlackAbsorberData_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 = BlackAbsorberData_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 = BlackAbsorberData_get_record_impacts(el);
|
|
69
|
+
cg->record_exits = BlackAbsorberData_get_record_exits(el);
|
|
72
70
|
}
|
|
73
|
-
|
|
74
71
|
return cg;
|
|
75
72
|
}
|
|
76
73
|
|
|
77
74
|
/*gpufun*/
|
|
78
|
-
void BlackAbsorber_free(CollimatorGeometry restrict cg
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
destroy_jaw(cg->segments_R);
|
|
85
|
-
}
|
|
75
|
+
void BlackAbsorber_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);
|
|
86
81
|
}
|
|
87
82
|
free(cg);
|
|
88
83
|
}
|
|
@@ -90,15 +85,17 @@ void BlackAbsorber_free(CollimatorGeometry restrict cg, int8_t active){
|
|
|
90
85
|
|
|
91
86
|
/*gpufun*/
|
|
92
87
|
void BlackAbsorber_track_local_particle(BlackAbsorberData el, LocalParticle* part0){
|
|
93
|
-
|
|
94
|
-
// Collimator active and length
|
|
95
88
|
int8_t active = BlackAbsorberData_get_active(el);
|
|
96
89
|
active *= BlackAbsorberData_get__tracking(el);
|
|
97
90
|
double const length = BlackAbsorberData_get_length(el);
|
|
98
91
|
|
|
99
92
|
// Get geometry
|
|
100
|
-
CollimatorGeometry cg
|
|
101
|
-
int8_t record_scatterings
|
|
93
|
+
CollimatorGeometry cg;
|
|
94
|
+
int8_t record_scatterings;
|
|
95
|
+
if (active){
|
|
96
|
+
cg = BlackAbsorber_init_geometry(el, part0);
|
|
97
|
+
record_scatterings = BlackAbsorberData_get_record_scatterings(el);
|
|
98
|
+
}
|
|
102
99
|
|
|
103
100
|
//start_per_particle_block (part0->part)
|
|
104
101
|
if (!active){
|
|
@@ -130,7 +127,9 @@ void BlackAbsorber_track_local_particle(BlackAbsorberData el, LocalParticle* par
|
|
|
130
127
|
}
|
|
131
128
|
}
|
|
132
129
|
//end_per_particle_block
|
|
133
|
-
|
|
130
|
+
if (active){
|
|
131
|
+
BlackAbsorber_free(cg);
|
|
132
|
+
}
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
#endif /* XCOLL_ABSORBER_H */
|
|
@@ -24,73 +24,70 @@ int8_t BlackCrystalData_get_record_scatterings(BlackCrystalData el){
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
/*gpufun*/
|
|
27
|
-
CrystalGeometry BlackCrystal_init_geometry(BlackCrystalData el, LocalParticle* part0
|
|
27
|
+
CrystalGeometry BlackCrystal_init_geometry(BlackCrystalData el, LocalParticle* part0){
|
|
28
28
|
CrystalGeometry cg = (CrystalGeometry) malloc(sizeof(CrystalGeometry_));
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return cg;
|
|
49
|
-
}
|
|
50
|
-
cg->segments = create_crystal(cg->bending_radius, cg->width, cg->length, jaw, cg->sin_y, cg->cos_y);
|
|
51
|
-
// Impact table
|
|
52
|
-
cg->record = BlackCrystalData_getp_internal_record(el, part0);
|
|
53
|
-
cg->record_index = NULL;
|
|
54
|
-
cg->record_impacts = 0;
|
|
55
|
-
cg->record_exits = 0;
|
|
56
|
-
if (cg->record){
|
|
57
|
-
cg->record_index = InteractionRecordData_getp__index(cg->record);
|
|
58
|
-
cg->record_impacts = BlackCrystalData_get_record_impacts(el);
|
|
59
|
-
cg->record_exits = BlackCrystalData_get_record_exits(el);
|
|
60
|
-
}
|
|
61
|
-
// Not needed, set to zero
|
|
62
|
-
cg->miscut_angle = 0;
|
|
63
|
-
cg->s_P = 0;
|
|
64
|
-
cg->x_P = 0;
|
|
65
|
-
cg->t_VImax = 0;
|
|
29
|
+
cg->length = BlackCrystalData_get_length(el);
|
|
30
|
+
cg->side = BlackCrystalData_get__side(el);
|
|
31
|
+
cg->bending_radius = BlackCrystalData_get__bending_radius(el);
|
|
32
|
+
cg->bending_angle = BlackCrystalData_get__bending_angle(el);
|
|
33
|
+
cg->width = BlackCrystalData_get__width(el);
|
|
34
|
+
cg->height = BlackCrystalData_get__height(el);
|
|
35
|
+
cg->jaw_U = BlackCrystalData_get__jaw_U(el);
|
|
36
|
+
cg->sin_z = BlackCrystalData_get__sin_z(el);
|
|
37
|
+
cg->cos_z = BlackCrystalData_get__cos_z(el);
|
|
38
|
+
cg->sin_y = BlackCrystalData_get__sin_y(el);
|
|
39
|
+
cg->cos_y = BlackCrystalData_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;
|
|
66
48
|
}
|
|
67
|
-
|
|
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 = BlackCrystalData_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 = BlackCrystalData_get_record_impacts(el);
|
|
58
|
+
cg->record_exits = BlackCrystalData_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;
|
|
68
65
|
return cg;
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
/*gpufun*/
|
|
72
|
-
void BlackCrystal_free(CrystalGeometry restrict cg
|
|
73
|
-
|
|
74
|
-
destroy_crystal(cg->segments);
|
|
75
|
-
}
|
|
69
|
+
void BlackCrystal_free(CrystalGeometry restrict cg){
|
|
70
|
+
destroy_crystal(cg->segments);
|
|
76
71
|
free(cg);
|
|
77
72
|
}
|
|
78
73
|
|
|
79
74
|
|
|
80
75
|
/*gpufun*/
|
|
81
76
|
void BlackCrystal_track_local_particle(BlackCrystalData el, LocalParticle* part0){
|
|
82
|
-
|
|
83
|
-
// Collimator active and length
|
|
84
77
|
int8_t active = BlackCrystalData_get_active(el);
|
|
85
78
|
active *= BlackCrystalData_get__tracking(el);
|
|
86
79
|
double const length = BlackCrystalData_get_length(el);
|
|
87
80
|
|
|
88
81
|
// Get geometry
|
|
89
|
-
CrystalGeometry cg
|
|
90
|
-
int8_t record_scatterings
|
|
82
|
+
CrystalGeometry cg;
|
|
83
|
+
int8_t record_scatterings;
|
|
84
|
+
if (active){
|
|
85
|
+
cg = BlackCrystal_init_geometry(el, part0);
|
|
86
|
+
record_scatterings = BlackCrystalData_get_record_scatterings(el);
|
|
91
87
|
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
if (cg->width==0 || cg->height==0 || cg->bending_radius==0){
|
|
89
|
+
kill_all_particles(part0, XC_ERR_INVALID_XOFIELD);
|
|
90
|
+
}
|
|
94
91
|
}
|
|
95
92
|
|
|
96
93
|
//start_per_particle_block (part0->part)
|
|
@@ -123,7 +120,9 @@ void BlackCrystal_track_local_particle(BlackCrystalData el, LocalParticle* part0
|
|
|
123
120
|
}
|
|
124
121
|
}
|
|
125
122
|
//end_per_particle_block
|
|
126
|
-
|
|
123
|
+
if (active){
|
|
124
|
+
BlackCrystal_free(cg);
|
|
125
|
+
}
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
#endif /* XCOLL_ABSORBER_CRY_H */
|
|
@@ -101,28 +101,38 @@ void EverestBlock_track_local_particle(EverestBlockData el, LocalParticle* part0
|
|
|
101
101
|
LocalParticle_set_s(part, 0);
|
|
102
102
|
|
|
103
103
|
// Store initial coordinates for updating later
|
|
104
|
-
double const rvv_in
|
|
104
|
+
double const rvv_in = LocalParticle_get_rvv(part);
|
|
105
105
|
#ifdef XCOLL_USE_EXACT
|
|
106
|
-
double const xp_in
|
|
107
|
-
double const yp_in
|
|
106
|
+
double const xp_in = LocalParticle_get_exact_xp(part);
|
|
107
|
+
double const yp_in = LocalParticle_get_exact_yp(part);
|
|
108
108
|
#else
|
|
109
|
-
double const xp_in
|
|
110
|
-
double const yp_in
|
|
109
|
+
double const xp_in = LocalParticle_get_xp(part);
|
|
110
|
+
double const yp_in = LocalParticle_get_yp(part);
|
|
111
111
|
#endif
|
|
112
|
-
double const zeta_in
|
|
113
|
-
double const
|
|
114
|
-
double
|
|
112
|
+
double const zeta_in = LocalParticle_get_zeta(part);
|
|
113
|
+
double const p0c = LocalParticle_get_p0c(part);
|
|
114
|
+
double const delta = LocalParticle_get_delta(part);
|
|
115
|
+
double const qq0 = LocalParticle_get_charge_ratio(part);
|
|
116
|
+
double const chi = LocalParticle_get_chi(part);
|
|
117
|
+
double const pc_in = (1 + delta)*p0c*qq0/chi;
|
|
118
|
+
double pc_out;
|
|
115
119
|
|
|
116
120
|
EverestData everest = EverestBlock_init_data(part, coll);
|
|
117
|
-
|
|
121
|
+
pc_out = jaw(everest, part, pc_in, length, 0);
|
|
118
122
|
free(everest);
|
|
119
123
|
LocalParticle_add_to_s(part, s_block);
|
|
120
124
|
|
|
121
125
|
LocalParticle_set_zeta(part, zeta_in);
|
|
126
|
+
|
|
122
127
|
// Survived particles need correcting:
|
|
123
128
|
if (LocalParticle_get_state(part)>0){
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
double const rpp_old = LocalParticle_get_rpp(part);
|
|
130
|
+
LocalParticle_update_delta(part, pc_out*chi/p0c/qq0 - 1);
|
|
131
|
+
// Keep angles constant (this is also correct for exact angles): px_new = px_old*(1 + δ_new)/(1 + δ_old)
|
|
132
|
+
double const scale = rpp_old / LocalParticle_get_rpp(part);
|
|
133
|
+
LocalParticle_scale_px(part, scale);
|
|
134
|
+
LocalParticle_scale_py(part, scale);
|
|
135
|
+
|
|
126
136
|
// Update zeta
|
|
127
137
|
#ifdef XCOLL_USE_EXACT
|
|
128
138
|
double xp = LocalParticle_get_exact_xp(part);
|
|
@@ -32,65 +32,60 @@ void EverestCollimator_set_material(EverestCollimatorData el){
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
/*gpufun*/
|
|
35
|
-
CollimatorGeometry EverestCollimator_init_geometry(EverestCollimatorData el, LocalParticle* part0
|
|
35
|
+
CollimatorGeometry EverestCollimator_init_geometry(EverestCollimatorData el, LocalParticle* part0){
|
|
36
36
|
CollimatorGeometry cg = (CollimatorGeometry) malloc(sizeof(CollimatorGeometry_));
|
|
37
|
-
|
|
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
|
-
cg->record_exits = EverestCollimatorData_get_record_exits(el);
|
|
79
|
-
}
|
|
37
|
+
// Jaw corners (with tilts)
|
|
38
|
+
cg->jaw_LU = EverestCollimatorData_get__jaw_LU(el);
|
|
39
|
+
cg->jaw_RU = EverestCollimatorData_get__jaw_RU(el);
|
|
40
|
+
// Get angles of jaws
|
|
41
|
+
cg->sin_zL = EverestCollimatorData_get__sin_zL(el);
|
|
42
|
+
cg->cos_zL = EverestCollimatorData_get__cos_zL(el);
|
|
43
|
+
cg->sin_zR = EverestCollimatorData_get__sin_zR(el);
|
|
44
|
+
cg->cos_zR = EverestCollimatorData_get__cos_zR(el);
|
|
45
|
+
cg->sin_zDiff = EverestCollimatorData_get__sin_zDiff(el);
|
|
46
|
+
cg->cos_zDiff = EverestCollimatorData_get__cos_zDiff(el);
|
|
47
|
+
cg->jaws_parallel = EverestCollimatorData_get__jaws_parallel(el);
|
|
48
|
+
// Tilts
|
|
49
|
+
cg->sin_yL = EverestCollimatorData_get__sin_yL(el);
|
|
50
|
+
cg->cos_yL = EverestCollimatorData_get__cos_yL(el);
|
|
51
|
+
cg->sin_yR = EverestCollimatorData_get__sin_yR(el);
|
|
52
|
+
cg->cos_yR = EverestCollimatorData_get__cos_yR(el);
|
|
53
|
+
// Length and segments
|
|
54
|
+
cg->length = EverestCollimatorData_get_length(el);
|
|
55
|
+
cg->side = EverestCollimatorData_get__side(el);
|
|
56
|
+
double s_U, s_D, x_D;
|
|
57
|
+
if (cg->side != -1){
|
|
58
|
+
s_U = cg->length/2 * (1-cg->cos_yL);
|
|
59
|
+
s_D = cg->length/2 * (1+cg->cos_yL);
|
|
60
|
+
x_D = EverestCollimatorData_get__jaw_LD(el);
|
|
61
|
+
cg->segments_L = create_jaw(s_U, cg->jaw_LU, s_D, x_D, cg->sin_yL/cg->cos_yL, 1);
|
|
62
|
+
}
|
|
63
|
+
if (cg->side != 1){
|
|
64
|
+
s_U = cg->length/2 * (1-cg->cos_yR);
|
|
65
|
+
s_D = cg->length/2 * (1+cg->cos_yR);
|
|
66
|
+
x_D = EverestCollimatorData_get__jaw_RD(el);
|
|
67
|
+
cg->segments_R = create_jaw(s_U, cg->jaw_RU, s_D, x_D, cg->sin_yR/cg->cos_yR, -1);
|
|
68
|
+
}
|
|
69
|
+
// Impact table
|
|
70
|
+
cg->record = EverestCollimatorData_getp_internal_record(el, part0);
|
|
71
|
+
cg->record_index = NULL;
|
|
72
|
+
cg->record_impacts = 0;
|
|
73
|
+
cg->record_exits = 0;
|
|
74
|
+
if (cg->record){
|
|
75
|
+
cg->record_index = InteractionRecordData_getp__index(cg->record);
|
|
76
|
+
cg->record_impacts = EverestCollimatorData_get_record_impacts(el);
|
|
77
|
+
cg->record_exits = EverestCollimatorData_get_record_exits(el);
|
|
80
78
|
}
|
|
81
|
-
|
|
82
79
|
return cg;
|
|
83
80
|
}
|
|
84
81
|
|
|
85
82
|
/*gpufun*/
|
|
86
|
-
void EverestCollimator_free(CollimatorGeometry restrict cg
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
destroy_jaw(cg->segments_R);
|
|
93
|
-
}
|
|
83
|
+
void EverestCollimator_free(CollimatorGeometry restrict cg){
|
|
84
|
+
if (cg->side != -1){
|
|
85
|
+
destroy_jaw(cg->segments_L);
|
|
86
|
+
}
|
|
87
|
+
if (cg->side != 1){
|
|
88
|
+
destroy_jaw(cg->segments_R);
|
|
94
89
|
}
|
|
95
90
|
free(cg);
|
|
96
91
|
}
|
|
@@ -100,30 +95,28 @@ void EverestCollimator_free(CollimatorGeometry restrict cg, int8_t active){
|
|
|
100
95
|
// run this function at creation of the collimator instead of every turn
|
|
101
96
|
// Hmmmm this should be called whenever we change an xofield
|
|
102
97
|
/*gpufun*/
|
|
103
|
-
EverestCollData EverestCollimator_init(EverestCollimatorData el, LocalParticle* part0
|
|
98
|
+
EverestCollData EverestCollimator_init(EverestCollimatorData el, LocalParticle* part0){
|
|
104
99
|
EverestCollData coll = (EverestCollData) malloc(sizeof(EverestCollData_));
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
coll->record_scatterings = EverestCollimatorData_get_record_scatterings(el);
|
|
126
|
-
}
|
|
100
|
+
// Random generator and material
|
|
101
|
+
coll->rng = EverestCollimatorData_getp_rutherford_rng(el);
|
|
102
|
+
MaterialData material = EverestCollimatorData_getp__material(el);
|
|
103
|
+
coll->exenergy = MaterialData_get_excitation_energy(material)*1.0e3; // MeV
|
|
104
|
+
coll->rho = MaterialData_get_density(material);
|
|
105
|
+
coll->anuc = MaterialData_get_A(material);
|
|
106
|
+
coll->zatom = MaterialData_get_Z(material);
|
|
107
|
+
coll->bnref = MaterialData_get_nuclear_elastic_slope(material);
|
|
108
|
+
coll->radl = MaterialData_get_radiation_length(material);
|
|
109
|
+
coll->csref[0] = MaterialData_get_cross_section(material, 0);
|
|
110
|
+
coll->csref[1] = MaterialData_get_cross_section(material, 1);
|
|
111
|
+
coll->csref[5] = MaterialData_get_cross_section(material, 5);
|
|
112
|
+
coll->only_mcs = MaterialData_get__only_mcs(material);
|
|
113
|
+
// Impact table: need it here to record interactions
|
|
114
|
+
coll->record = EverestCollimatorData_getp_internal_record(el, part0);
|
|
115
|
+
coll->record_index = NULL;
|
|
116
|
+
coll->record_scatterings = 0;
|
|
117
|
+
if (coll->record){
|
|
118
|
+
coll->record_index = InteractionRecordData_getp__index(coll->record);
|
|
119
|
+
coll->record_scatterings = EverestCollimatorData_get_record_scatterings(el);
|
|
127
120
|
}
|
|
128
121
|
return coll;
|
|
129
122
|
}
|
|
@@ -150,8 +143,12 @@ void EverestCollimator_track_local_particle(EverestCollimatorData el, LocalParti
|
|
|
150
143
|
|
|
151
144
|
// Initialise collimator data
|
|
152
145
|
// TODO: we want this to happen before tracking (instead of every turn), as a separate kernel
|
|
153
|
-
EverestCollData coll
|
|
154
|
-
CollimatorGeometry cg
|
|
146
|
+
EverestCollData coll;
|
|
147
|
+
CollimatorGeometry cg;
|
|
148
|
+
if (active){
|
|
149
|
+
coll = EverestCollimator_init(el, part0);
|
|
150
|
+
cg = EverestCollimator_init_geometry(el, part0);
|
|
151
|
+
}
|
|
155
152
|
|
|
156
153
|
//start_per_particle_block (part0->part)
|
|
157
154
|
if (!active){
|
|
@@ -168,17 +165,21 @@ void EverestCollimator_track_local_particle(EverestCollimatorData el, LocalParti
|
|
|
168
165
|
LocalParticle_set_s(part, 0);
|
|
169
166
|
|
|
170
167
|
// Store initial coordinates for updating later
|
|
171
|
-
double const rvv_in
|
|
168
|
+
double const rvv_in = LocalParticle_get_rvv(part);
|
|
172
169
|
#ifdef XCOLL_USE_EXACT
|
|
173
|
-
double const xp_in
|
|
174
|
-
double const yp_in
|
|
170
|
+
double const xp_in = LocalParticle_get_exact_xp(part);
|
|
171
|
+
double const yp_in = LocalParticle_get_exact_yp(part);
|
|
175
172
|
#else
|
|
176
|
-
double const xp_in
|
|
177
|
-
double const yp_in
|
|
173
|
+
double const xp_in = LocalParticle_get_xp(part);
|
|
174
|
+
double const yp_in = LocalParticle_get_yp(part);
|
|
178
175
|
#endif
|
|
179
|
-
double const zeta_in
|
|
180
|
-
double const
|
|
181
|
-
double
|
|
176
|
+
double const zeta_in = LocalParticle_get_zeta(part);
|
|
177
|
+
double const p0c = LocalParticle_get_p0c(part);
|
|
178
|
+
double const delta = LocalParticle_get_delta(part);
|
|
179
|
+
double const qq0 = LocalParticle_get_charge_ratio(part);
|
|
180
|
+
double const chi = LocalParticle_get_chi(part);
|
|
181
|
+
double const pc_in = (1 + delta)*p0c*qq0/chi;
|
|
182
|
+
double pc_out;
|
|
182
183
|
|
|
183
184
|
// Check if hit on jaws
|
|
184
185
|
int8_t is_hit = hit_jaws_check_and_transform(part, cg);
|
|
@@ -188,7 +189,7 @@ void EverestCollimator_track_local_particle(EverestCollimatorData el, LocalParti
|
|
|
188
189
|
double remaining_length = length - LocalParticle_get_s(part);
|
|
189
190
|
// Scatter
|
|
190
191
|
EverestData everest = EverestCollimator_init_data(part, coll);
|
|
191
|
-
|
|
192
|
+
pc_out = jaw(everest, part, pc_in, remaining_length, 1);
|
|
192
193
|
free(everest);
|
|
193
194
|
}
|
|
194
195
|
|
|
@@ -197,10 +198,16 @@ void EverestCollimator_track_local_particle(EverestCollimatorData el, LocalParti
|
|
|
197
198
|
LocalParticle_add_to_s(part, s_coll);
|
|
198
199
|
|
|
199
200
|
LocalParticle_set_zeta(part, zeta_in);
|
|
201
|
+
|
|
200
202
|
// Hit and survived particles need correcting:
|
|
201
203
|
if (is_hit!=0 && LocalParticle_get_state(part)>0){
|
|
202
|
-
|
|
203
|
-
|
|
204
|
+
double const rpp_old = LocalParticle_get_rpp(part);
|
|
205
|
+
LocalParticle_update_delta(part, pc_out*chi/p0c/qq0 - 1);
|
|
206
|
+
// Keep angles constant (this is also correct for exact angles): px_new = px_old*(1 + δ_new)/(1 + δ_old)
|
|
207
|
+
double const scale = rpp_old / LocalParticle_get_rpp(part);
|
|
208
|
+
LocalParticle_scale_px(part, scale);
|
|
209
|
+
LocalParticle_scale_py(part, scale);
|
|
210
|
+
|
|
204
211
|
// Update zeta
|
|
205
212
|
#ifdef XCOLL_USE_EXACT
|
|
206
213
|
double xp = LocalParticle_get_exact_xp(part);
|
|
@@ -218,8 +225,10 @@ void EverestCollimator_track_local_particle(EverestCollimatorData el, LocalParti
|
|
|
218
225
|
}
|
|
219
226
|
}
|
|
220
227
|
//end_per_particle_block
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
if (active){
|
|
229
|
+
EverestCollimator_free(cg);
|
|
230
|
+
free(coll);
|
|
231
|
+
}
|
|
223
232
|
}
|
|
224
233
|
|
|
225
234
|
|