Skip to content

Commit 54c7f5d

Browse files
authored
Merge pull request #67 from JETSCAPE/support_LHAPDF
Add Support for LHAPDF and Documentation
2 parents 92e5789 + 7df7b8f commit 54c7f5d

13 files changed

+190
-8
lines changed

.github/workflows/smash_test_completes.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
- XSCAPE-1.2-RC
88
- cpp17_cmake_syntax
99
- ipglasma
10+
- support_LHAPDF
1011

1112
push:
1213
branches:
1314
- main
1415
- XSCAPE-1.2-RC
1516
- cpp17_cmake_syntax
1617
- ipglasma
18+
- support_LHAPDF
1719

1820
env:
1921
REPO_NAME: ${{ github.event.repository.name }}
@@ -24,7 +26,7 @@ jobs:
2426
runs-on: ubuntu-latest
2527

2628
container:
27-
image: jetscape/base:v1.10
29+
image: jetscape/base:v1.11
2830
options: --user root
2931

3032
steps:

.github/workflows/test-build-external.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
- XSCAPE-1.2-RC
88
- cpp17_cmake_syntax
99
- ipglasma
10+
- support_LHAPDF
1011

1112
push:
1213
branches:
1314
- main
1415
- XSCAPE-1.2-RC
1516
- cpp17_cmake_syntax
1617
- ipglasma
18+
- support_LHAPDF
1719

1820
env:
1921
REPO_NAME: ${{ github.event.repository.name }}
@@ -24,7 +26,7 @@ jobs:
2426
runs-on: ubuntu-latest
2527

2628
container:
27-
image: jetscape/base:v1.10
29+
image: jetscape/base:v1.11
2830
options: --user root
2931

3032
steps:

.github/workflows/test-build-macos-native.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
- XSCAPE-1.2-RC
88
- cpp17_cmake_syntax
99
- ipglasma
10+
- support_LHAPDF
1011

1112
push:
1213
branches:
1314
- main
1415
- XSCAPE-1.2-RC
1516
- cpp17_cmake_syntax
1617
- ipglasma
18+
- support_LHAPDF
1719

1820
env:
1921
REPO_NAME: ${{ github.event.repository.name }}
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: test nPDF build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- XSCAPE-1.2-RC
8+
- cpp17_cmake_syntax
9+
- ipglasma
10+
- support_LHAPDF
11+
push:
12+
branches:
13+
- main
14+
- XSCAPE-1.2-RC
15+
- cpp17_cmake_syntax
16+
- ipglasma
17+
- support_LHAPDF
18+
19+
env:
20+
REPO_NAME: ${{ github.event.repository.name }}
21+
22+
jobs:
23+
build:
24+
name: build nPDF
25+
runs-on: ubuntu-latest
26+
27+
container:
28+
image: jetscape/base:v1.11
29+
options: --user root
30+
31+
steps:
32+
33+
- name: Checkout Repository
34+
uses: actions/checkout@v4
35+
with:
36+
path: ${{ github.event.repository.name }}
37+
38+
- name: Build Application
39+
run: |
40+
cd ${GITHUB_WORKSPACE}/${REPO_NAME}
41+
mkdir build
42+
cd build
43+
cmake ..
44+
make -j2
45+
46+
- name: Download nPDF set
47+
run: |
48+
cd ${GITHUB_WORKSPACE}/${REPO_NAME}/external_packages
49+
./get_lhapdf.sh JAM20-SIDIS_PDF_proton_nlo
50+
51+
- name: Run JETSCAPE with nPDF
52+
run: |
53+
cd ${GITHUB_WORKSPACE}/${REPO_NAME}/build
54+
./runJetscape ../config/jetscape_user_nPDF_test.xml

.github/workflows/test-events-PbPb.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
- XSCAPE-1.2-RC
88
- cpp17_cmake_syntax
99
- ipglasma
10+
- support_LHAPDF
1011

1112
push:
1213
branches:
1314
- main
1415
- XSCAPE-1.2-RC
1516
- cpp17_cmake_syntax
1617
- ipglasma
18+
- support_LHAPDF
1719

1820
env:
1921
REPO_NAME: ${{ github.event.repository.name }}
@@ -24,7 +26,7 @@ jobs:
2426
runs-on: ubuntu-latest
2527

2628
container:
27-
image: jetscape/base:v1.10
29+
image: jetscape/base:v1.11
2830
options: --user root
2931

3032
steps:

.github/workflows/test-events-Pythia-Isr-Dat.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ on:
99
- XSCAPE-1.2-RC
1010
- cpp17_cmake_syntax
1111
- ipglasma
12+
- support_LHAPDF
1213

1314
push:
1415
branches:
1516
- main
1617
- XSCAPE-1.2-RC
1718
- cpp17_cmake_syntax
1819
- ipglasma
20+
- support_LHAPDF
1921

2022
env:
2123
REPO_NAME: ${{ github.event.repository.name }}
@@ -26,7 +28,7 @@ jobs:
2628
runs-on: ubuntu-latest
2729

2830
container:
29-
image: jetscape/base:v1.10
31+
image: jetscape/base:v1.11
3032
options: --user root
3133

3234
steps:

.github/workflows/test-events-Pythia-Isr-Hadron.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
- XSCAPE-1.2-RC
88
- cpp17_cmake_syntax
99
- ipglasma
10+
- support_LHAPDF
1011

1112
push:
1213
branches:
1314
- main
1415
- XSCAPE-1.2-RC
1516
- cpp17_cmake_syntax
1617
- ipglasma
18+
- support_LHAPDF
1719

1820
env:
1921
REPO_NAME: ${{ github.event.repository.name }}
@@ -24,7 +26,7 @@ jobs:
2426
runs-on: ubuntu-latest
2527

2628
container:
27-
image: jetscape/base:v1.10
29+
image: jetscape/base:v1.11
2830
options: --user root
2931

3032
steps:

.github/workflows/test-events-Pythia-Isr-Parton.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
- XSCAPE-1.2-RC
88
- cpp17_cmake_syntax
99
- ipglasma
10+
- support_LHAPDF
1011

1112
push:
1213
branches:
1314
- main
1415
- XSCAPE-1.2-RC
1516
- cpp17_cmake_syntax
1617
- ipglasma
18+
- support_LHAPDF
1719

1820
env:
1921
REPO_NAME: ${{ github.event.repository.name }}
@@ -24,7 +26,7 @@ jobs:
2426
runs-on: ubuntu-latest
2527

2628
container:
27-
image: jetscape/base:v1.10
29+
image: jetscape/base:v1.11
2830
options: --user root
2931

3032
steps:

.github/workflows/test-events-brick.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- cpp17_cmake_syntax
99
- brick_matter_lbt
1010
- ipglasma
11+
- support_LHAPDF
1112

1213
push:
1314
branches:
@@ -16,6 +17,7 @@ on:
1617
- cpp17_cmake_syntax
1718
- brick_matter_lbt
1819
- ipglasma
20+
- support_LHAPDF
1921

2022
env:
2123
REPO_NAME: ${{ github.event.repository.name }}
@@ -26,7 +28,7 @@ jobs:
2628
runs-on: ubuntu-latest
2729

2830
container:
29-
image: jetscape/base:v1.10
31+
image: jetscape/base:v1.11
3032
options: --user root
3133

3234
steps:

.github/workflows/test-events-pp.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
- XSCAPE-1.2-RC
88
- cpp17_cmake_syntax
99
- ipglasma
10+
- support_LHAPDF
1011

1112
push:
1213
branches:
1314
- main
1415
- XSCAPE-1.2-RC
1516
- cpp17_cmake_syntax
1617
- ipglasma
18+
- support_LHAPDF
1719

1820
env:
1921
REPO_NAME: ${{ github.event.repository.name }}
@@ -24,7 +26,7 @@ jobs:
2426
runs-on: ubuntu-latest
2527

2628
container:
27-
image: jetscape/base:v1.10
29+
image: jetscape/base:v1.11
2830
options: --user root
2931

3032
steps:

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,32 @@ Please see [JETSCAPE Tunes](config/publications_config/README.md) for more infor
8585

8686
Several example hydro profiles can be downloaded using `examples/get_hydroSample*`.
8787

88+
## Running JETSCAPE/X-SCAPE with LHAPDF
89+
90+
[LHAPDF](https://www.lhapdf.org/) is now included in the JETSCAPE/X-SCAPE Docker image. Instructions to run JETSCAPE/X-SCAPE in Docker are [here](https://github.com/JETSCAPE/X-SCAPE/wiki/Doc.Installation.Docker.Linux). While inside the container, use [external_packages/get_lhapdf.sh](external_packages/get_lhapdf.sh) to download the desired set. For example, to download the JAM20-SIDIS_PDF_proton_nlo set, run:
91+
92+
```bash
93+
cd ${JETSCAPE_DIR}/external_packages
94+
./get_lhapdf.sh JAM20-SIDIS_PDF_proton_nlo
95+
```
96+
97+
The above script sets an environment variable `LHAPATH='/home/jetscape-user/.local/share/LHAPDF'`. Adjust as needed.
98+
99+
Add the set to PythiaGun in your user XML file:
100+
101+
```xml
102+
<LinesToRead>
103+
PDF:useHard = on
104+
PDF:pHardSet LHAPDF6:JAM20-SIDIS_PDF_proton_nlo
105+
</LinesToRead>
106+
```
107+
Or run the example [config/jetscape_user_nPDF_test.xml](config/jetscape_user_nPDF_test.xml) user XML file.
108+
109+
```bash
110+
cd ${JETSCAPE_DIR}/build
111+
./runJetscape ../config/jetscape_user_nPDF_test.xml
112+
```
113+
88114
## X-SCAPE modules (New)
89115
### 3DGlauber support
90116

config/jetscape_user_nPDF_test.xml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0"?>
2+
3+
<jetscape>
4+
5+
<nEvents> 2 </nEvents>
6+
7+
<JetScapeWriterAscii> on </JetScapeWriterAscii>
8+
9+
<!-- Inital State Module -->
10+
<!--IS>
11+
<Trento> </Trento>
12+
</IS-->
13+
14+
<!-- Hard Process -->
15+
<Hard>
16+
<PythiaGun>
17+
<pTHatMin>50</pTHatMin>
18+
<pTHatMax>70</pTHatMax>
19+
<eCM>5020</eCM>
20+
<LinesToRead>
21+
PDF:useHard = on
22+
PDF:pHardSet = LHAPDF6:JAM20-SIDIS_PDF_proton_nlo
23+
</LinesToRead>
24+
</PythiaGun>
25+
</Hard>
26+
27+
<!--Preequilibrium Dynamics Module -->
28+
<!--Preequilibrium>
29+
<NullPreDynamics> </NullPreDynamics>
30+
</Preequilibrium-->
31+
32+
<!-- Hydro Module -->
33+
<!--Hydro>
34+
<Brick bjorken_expansion_on="false" start_time="0.6"> </Brick>
35+
</Hydro-->
36+
37+
<!--Eloss Modules -->
38+
<Eloss>
39+
<Matter>
40+
<in_vac> 1 </in_vac>
41+
</Matter>
42+
</Eloss>
43+
44+
<!--PartonPrinter>
45+
<FileName>./FinalPartonsInfo.dat</FileName>
46+
</PartonPrinter-->
47+
48+
<!-- Jet Hadronization Module -->
49+
<JetHadronization>
50+
<name>colorless</name>
51+
</JetHadronization>
52+
53+
</jetscape>

external_packages/get_lhapdf.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
###############################################################################
4+
# Copyright (c) The JETSCAPE Collaboration, 2018
5+
#
6+
# For the list of contributors see AUTHORS.
7+
#
8+
# Report issues at https://github.com/JETSCAPE/JETSCAPE/issues
9+
#
10+
# or via email to [email protected]
11+
#
12+
# Distributed under the GNU General Public License 3.0 (GPLv3 or later).
13+
# See COPYING for details.
14+
##############################################################################
15+
16+
# default LHAPATH environment variable
17+
export LHAPATH='/home/jetscape-user/.local/share/LHAPDF'
18+
19+
# create the LHAPATH if it doesn't exist
20+
if [ ! -d "$LHAPATH" ]; then
21+
mkdir -p $LHAPATH
22+
fi
23+
24+
# replace lhapdf_set with the desired set or pass as an argument
25+
lhapdf_set = "JAM20-SIDIS_PDF_proton_nlo"
26+
27+
if [ $# -eq 1 ]; then
28+
lhapdf_set=$1
29+
fi
30+
31+
wget http://lhapdfsets.web.cern.ch/lhapdfsets/current/$lhapdf_set.tar.gz -O- | tar xz -C $LHAPATH

0 commit comments

Comments
 (0)