Skip to content

Commit

Permalink
Update import test script
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Oct 18, 2024
1 parent 9861f6c commit 99de965
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
6 changes: 4 additions & 2 deletions maintainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
- `generate-coverage.sh`: generates code coverage locally
- `make-release.sh`: this script is supposed to be run by the maintainer to
create a new release. The only argument is the version number
- `test-ploughshare-conversion.sh`: downloads APPLgrids and fastNLO tables from
[Ploughshare] and tests PineAPPL's CLI `import` subcommand with them
- `test-cli-import.sh`: downloads APPLgrids and fastNLO tables from
[Ploughshare] and [Mitov's ttbar page] and tests PineAPPL's CLI `import`
subcommand with them

[Ploughshare]: https://ploughshare.web.cern.ch/ploughshare/
[Mitov's ttbar page]: https://www.precision.hep.phy.cam.ac.uk/results/ttbar-fastnlo/
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -euo pipefail

grids=(
## Ploughshare

# Group: applfast
"https://ploughshare.web.cern.ch/ploughshare/db/applfast/applfast-atlas-dijets-appl-arxiv-1312.3524/applfast-atlas-dijets-appl-arxiv-1312.3524.tgz"
"https://ploughshare.web.cern.ch/ploughshare/db/applfast/applfast-atlas-dijets-appl-arxiv-1711.02692/applfast-atlas-dijets-appl-arxiv-1711.02692.tgz"
Expand Down Expand Up @@ -82,6 +84,15 @@ grids=(
"https://ploughshare.web.cern.ch/ploughshare/db/xfitter/xfitter-na10-dimuon-286-inspire-212896/xfitter-na10-dimuon-286-inspire-212896.tgz"
"https://ploughshare.web.cern.ch/ploughshare/db/xfitter/xfitter-wa70-pi+prompt-photon-inspire-250394/xfitter-wa70-pi+prompt-photon-inspire-250394.tgz"
"https://ploughshare.web.cern.ch/ploughshare/db/xfitter/xfitter-wa70-pi-prompt-photon-inspire-250394/xfitter-wa70-pi-prompt-photon-inspire-250394.tgz"

## Mitov's ttbar tables

"http://www.precision.hep.phy.cam.ac.uk/wp-content/results/fastNLOtables/LHC8-ttbar-2dim-CMS.tar.gz"
"http://www.precision.hep.phy.cam.ac.uk/wp-content/results/fastNLOtables/2d-ttbar-LHC-13TeV-3_masses.tar.gz"
"http://www.precision.hep.phy.cam.ac.uk/wp-content/results/fastNLOtables/LHC13-ttbar-CMS_bin-fastNLO.tar.gz"
"http://www.precision.hep.phy.cam.ac.uk/wp-content/results/fastNLOtables/LHC13-ttbar-CMS_bin-fastNLO-172_5.tar.gz"
"http://www.precision.hep.phy.cam.ac.uk/wp-content/results/fastNLOtables/fastNLO-ttbar-NNLO-LHC8-173_3-bin1.tar.gz"
"http://www.precision.hep.phy.cam.ac.uk/wp-content/results/fastNLOtables/fastNLO-ttbar-NNLO-LHC13-173_3-bin1.tar.gz"
)

tmp=$(mktemp -d)
Expand All @@ -92,16 +103,18 @@ trap "cd && rm -rf ${tmp}" EXIT SIGKILL
for grid in ${grids[@]}; do
archive=${grid##*/}
wget --no-verbose --no-clobber "${grid}" -O /tmp/"${archive}" || true
tar xzf /tmp/"${archive}"
mkdir subdir
tar xzf /tmp/"${archive}" -C subdir

for grid in $(find . \( -name '*.appl' -o -name '*.tab.gz' -o -name '*.root' \)); do
for grid in $(find subdir \( -name '*.appl' -o -name '*.tab' -o -name '*.tab.gz' -o -name '*.root' \)); do
if [[ $(basename $grid) =~ ^\..* ]]; then
continue
fi

converted_grid="${grid}".pineappl.lz4
pineappl --silence-lhapdf import --accuracy 1e-12 "${grid}" "${converted_grid}" NNPDF31_nnlo_as_0118_luxqed
pineappl import --accuracy 1e-12 "${grid}" "${converted_grid}" NNPDF31_nnlo_as_0118_luxqed
du -h "${grid}" "${converted_grid}"
done
rm -r ${archive%.tgz}

rm -r subdir
done

0 comments on commit 99de965

Please sign in to comment.