Skip to content

Commit 19ec977

Browse files
afedynitchjncotspre-commit-ci[bot]
authored
Add EPOS LHC-R (#221)
This PR adds EPOS LHC-R event generator to the list of supported models. There are two flavors, the full (and slow) `class EposLHCR` and the faster `EposLHCRNoHadrRescattering`. It's up to debate if any whether the version without hadronic rescattering should become the baseline or the one with rescattering. --------- Co-authored-by: Anton Prosekin <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 04a2712 commit 19ec977

File tree

283 files changed

+203959
-1956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+203959
-1956
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,51 @@ jobs:
178178
name: wheel-${{ matrix.py }}-${{ matrix.os }}-${{ matrix.arch }}
179179

180180

181+
sdist:
182+
name: source package
183+
runs-on: ubuntu-latest
184+
steps:
185+
- uses: actions/checkout@v4
186+
with:
187+
submodules: true
188+
189+
- name: Dump GitHub context
190+
run: echo '${{ toJSON(github) }}'
191+
192+
- uses: actions/setup-python@v4
193+
name: Install Python
194+
with:
195+
python-version: '3.12'
196+
197+
- uses: tlylt/install-graphviz@v1
198+
name: Install Graphviz
199+
200+
- run: python -m pip install --upgrade pip wheel setuptools
201+
- run: pipx run build --sdist
202+
- run: python -m pip install --prefer-binary -v `echo dist/chromo-*`[test]
203+
- run: python -m pytest -v
204+
205+
- uses: actions/upload-artifact@v4
206+
with:
207+
path: dist/*.tar.gz
208+
209+
upload_to_PyPI:
210+
name: Upload to PyPI
211+
needs: [wheels, sdist]
212+
runs-on: ubuntu-latest
213+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
214+
steps:
215+
- name: Download files in artifact to "dist/" directory
216+
uses: actions/[email protected]
217+
with:
218+
merge-multiple: true
219+
path: dist
220+
221+
- name: Publish package to PyPI
222+
uses: pypa/gh-action-pypi-publish@release/v1.8
223+
with:
224+
user: __token__
225+
password: ${{ secrets.PYPI_API_TOKEN }}
226+
227+
228+

AGENTS.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ Please note that `chromo` only provides a user interface for the following model
6363
| [DPMJET-III 3.0.7](https://inspirehep.net/literature/538940) & [PHOJET 1.12-36](https://inspirehep.net/literature/373339) | *hN, γγ, γN, hA, γA, AA* | |
6464
| [DPMJET-III & PHOJET 19.1 and 19.3](https://inspirehep.net/literature/1503512) [(repo on GitHub)](https://github.com/DPMJET/DPMJET) | *hN, γγ, γN, hA, γA, AA* | |
6565
| [EPOS-LHC](https://inspirehep.net/literature/1236629) | *hN, hA, AA* | |
66+
| [EPOS-LHC-R](https://inspirehep.net/literature/2680791) | *hN, hA, AA* | |
67+
| [EPOS-LHC-R (w/ hadr. rescattering)](https://inspirehep.net/literature/2680791) | *hN, hA, AA* | | Version with explicit hadronic rescattering in UrQMD (slow!)
6668
| [PYTHIA 6.4](https://inspirehep.net/literature/712925) | *hN, ee, γγ, γN* | |
6769
| [PYTHIA 8.3](https://inspirehep.net/literature/2056998) (https://pythia.org/) | *hN, ee, γγ, γN* & *hA, AA* (Argantyr) | unavailable on Windows |
6870
| [QGSJet-01](https://inspirehep.net/literature/460408) | *hN, hA, AA* | |
6971
| [QGSJet-II-03](https://inspirehep.net/literature/667881) | *hN, hA, AA* | |
7072
| [QGSJet-II-04](https://inspirehep.net/literature/872658) | *hN, hA, AA* | |
7173
| [QGSJet-III](https://inspirehep.net/literature/2771416) | *hN, hA, AA* | |
7274
| [SIBYLL-2.1](https://inspirehep.net/literature/823839) | *hN, hA (A<=20)* | |
73-
| [SIBYLL-2.3d](https://inspirehep.net/literature/1768983) | *hN, hA (A<=20)* | incl. legacy versions -2.3/-2.3c |
74-
| [SIBYLL-2.3e](https://inspirehep.net/literature/1768983) | *hN, hA (A<=20)* | |
75-
| [SIBYLL* (based on 2.3d)](https://inspirehep.net/literature/2774307) | *hN, hA (A<=20)* | |
76-
| [SIBYLL* (based on 2.3e)](https://inspirehep.net/literature/2774307) | *hN, hA (A<=20)* | |
75+
| [SIBYLL-2.3c/d/e](https://inspirehep.net/literature/1768983) | *hN, hA (A<=20)* | incl. legacy versions 2.3 can be build from source |
76+
| [SIBYLL* (based on 2.3d and 2.3e)](https://inspirehep.net/literature/2774307) | *hN, hA (A<=20)* | |
7777
| [SOPHIA 2.0](https://inspirehep.net/literature/497602) | *γN* | |
7878
| [UrQMD 3.4](https://inspirehep.net/literature/468266) [+ second citation](https://inspirehep.net/literature/507334) | hN, hA, AA* | unavailable on Windows |
7979

@@ -84,7 +84,7 @@ Please note that `chromo` only provides a user interface for the following model
8484

8585
### Supported platforms
8686

87-
- Python 3.8+
87+
- Python 3.9+
8888
- Linux, Mac OS X (x86 and M1/M2), Windows
8989

9090
The recommended way to install `chromo` is by using the pre-compiled binary wheel, which is available for most common architectures and Python versions

meson.build

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ thread_dep = dependency('threads')
4242

4343
# Optional mold linker
4444
if find_program('mold', required:false).found() and cc.get_id() == 'gcc'
45-
add_project_link_arguments('-fuse-ld=mold', language:['c','cpp','fortran'])
45+
add_project_link_arguments('-fuse-ld=mold', language:['c','cpp','fortran'])
46+
endif
47+
48+
if get_option('buildtype') == 'debug'
49+
add_global_arguments('-fbacktrace', '-fcheck=all', language : ['fortran']) #'-shared-libasan','-fsanitize=address',
4650
endif
4751

4852
add_project_arguments('-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION', language:['c','cpp'])
@@ -161,12 +165,22 @@ models = {
161165

162166
# EPOS -----------------------------------------------------------------
163167
'_eposlhc':{
164-
'src' : run_command(py, scripts_dir + 'list_epos_sources.py', '--directory',
165-
f/'epos', check:true).stdout().strip().split('\n'),
166-
'inc' : [f/'epos/sources'],
167-
'iface' : run_command(py,'scripts/list_epos_sources.py','--directory', f/'epos',
168+
'src' : run_command(py, scripts_dir + 'list_eposlhc_sources.py', '--directory',
169+
f/'epos-lhc', check:true).stdout().strip().split('\n'),
170+
'inc' : [f/'epos-lhc/sources'],
171+
'iface' : run_command(py,'scripts/list_eposlhc_sources.py','--directory', f/'epos-lhc',
168172
'--interface-only', check:true).stdout().strip().split('\n'),
169173
'funcs' : epos_syms + common_syms,
174+
'flags' : ['-O0'],
175+
},
176+
'_eposlhcr':{
177+
'src' : run_command(py, scripts_dir + 'list_eposlhcr_sources.py', '--directory',
178+
f/'epos-lhc-r', check:true).stdout().strip().split('\n'),
179+
'inc' : [f/'epos-lhc-r/sources'],
180+
'iface' : run_command(py,'scripts/list_eposlhcr_sources.py','--directory', f/'epos-lhc-r',
181+
'--interface-only', check:true).stdout().strip().split('\n'),
182+
'funcs' : epos_syms + common_syms,
183+
'flags' : ['-O0'],
170184
},
171185
}
172186

@@ -242,12 +256,19 @@ foreach name, cfg : models
242256
'@OUTDIR@','@INPUT@'],
243257
build_by_default : true)
244258

259+
# Override optimization for EPOS models
260+
override_opts = []
261+
if name in ['_eposlhc', '_eposlhcr']
262+
override_opts = ['optimization=0']
263+
endif
264+
245265
py.extension_module(name,
246266
sources : srcs + [wrap, f2py_obj],
247267
include_directories: include_directories(inc_dirs),
248268
dependencies : [py_dep, numpy_dep],
249269
c_args : common_cargs + flags,
250270
fortran_args : flags,
271+
override_options : override_opts,
251272
subdir : 'chromo/models',
252273
install : true,
253274
install_rpath : rpath_tok,

0 commit comments

Comments
 (0)