22
33set -euo pipefail
44
5- THEORY_ID=40008005
5+ THEORY_ID=40008005 # NNLO QCD with EXA
66PDF_NAME=" NNPDF40_nnlo_as_01180"
77
8+ POLARIZED_THEORY_ID=41100010 # NLO QCD⊗EWK with TRN
9+ POLARIZED_POLPDF_NAME=" NNPDFpol20_nlo_as_01180"
10+ POLARIZED_UNPOLPDF_NAME=" NNPDF40_nlo_pch_as_01180"
11+
812LIST_DIS_DATASETS=(
913 " HERA_CC_318GEV_EP-SIGMARED"
1014)
15+
1116LIST_HADRONIC_DATASETS=(
1217 " ATLAS_Z0_7TEV_36PB_ETA"
1318 " LHCB_WPWM_8TEV_MUON_Y"
1419 " ATLAS_SINGLETOP_8TEV_T-RAP-NORM"
1520)
1621
17- dis_predictions () {
18- THEORYID= $1
19- NFONLL_ID= $(( $THEORYID * 100 ) )
22+ LIST_POLARIZED_HADRONIC_DATASETS=(
23+ " STAR_WMWP_510GEV_WP-AL "
24+ )
2025
21- for dataset in " ${LIST_DIS_DATASETS[@]} " ; do
22- pineko fonll -c pineko.ci.toml tcards $THEORYID
23- pineko fonll -c pineko.ci.toml ekos --overwrite $THEORYID $dataset
24- pineko fonll -c pineko.ci.toml fks --overwrite $THEORYID $dataset
25- pineko fonll -c pineko.ci.toml combine --overwrite $THEORYID $dataset \
26- --FFNS3 $NFONLL_ID \
27- --FFN03 $(( $NFONLL_ID + 1 )) \
28- --FFNS4zeromass $(( $NFONLL_ID + 2 )) \
29- --FFNS4massive $(( $NFONLL_ID + 3 )) \
30- --FFN04 $(( $NFONLL_ID + 4 )) \
31- --FFNS5zeromass $(( $NFONLL_ID + 5 )) \
32- --FFNS5massive $(( $NFONLL_ID + 6 ))
33- done
26+ get_pdf_combinations () {
27+ OBJECTNAME=$1
28+
29+ # Define the combination of PDF sets depending on the types
30+ if [[ " $OBJECTNAME " == * " -POL" * ]]; then
31+ PDFSETNAMES=" $POLARIZED_POLPDF_NAME $POLARIZED_UNPOLPDF_NAME "
32+ elif [[ " $OBJECTNAME " == * " -UNPOL" * ]]; then
33+ PDFSETNAMES=" $POLARIZED_UNPOLPDF_NAME "
34+ else
35+ PDFSETNAMES=" $PDF_NAME " # Fall to the NNPDF4.0 unpolarized set
36+ fi
37+ echo " $PDFSETNAMES "
3438}
3539
36- hadronic_predictions () {
40+ compare_fks_with_grids () {
3741 THEORYID=$1
3842
39- for dataset in " ${LIST_HADRONIC_DATASETS[@]} " ; do
40- pineko theory -c pineko.ci.toml opcards --overwrite $THEORYID $dataset
41- pineko theory -c pineko.ci.toml ekos --overwrite $THEORYID $dataset
42- pineko theory -c pineko.ci.toml fks --overwrite $THEORYID $dataset
43- done
44-
4543 # Compare the Hadronic FK tables with the Grids
4644 grids=(theory_productions/data/grids/" $THEORYID " /* .pineappl.lz4)
4745 for gridpath in " ${grids[@]} " ; do
4846 gridname=$( basename " $gridpath " )
47+ PDFSETNAMES=$( get_pdf_combinations " $gridname " )
4948 pineko compare ./theory_productions/data/fktables/" $THEORYID " /" $gridname " \
5049 ./theory_productions/data/grids/" $THEORYID " /" $gridname " 3 0 \
51- $PDF_NAME --threshold 2 # set threshold to 2 permille
50+ $PDFSETNAMES --threshold 2 # set threshold to 2 permille
5251 done
5352}
5453
55- compare_predictions () {
54+ compare_fktables () {
5655 REFERED_FK=$1
5756 CURRENT_FK=$2
57+ PDFSETNAMES=$3
5858
5959 # Extract the predictions - the last column
60- diffs=($( pineappl diff $REFERED_FK $CURRENT_FK $PDF_NAME | awk ' NR>2 {print $NF}' ) )
60+ diffs=($( pineappl diff $REFERED_FK $CURRENT_FK " $PDFSETNAMES " | awk ' NR>2 {print $NF}' ) )
6161
6262 preds_length=${# diffs[@]} # Get the length of the predictions
6363 for (( bin= 0 ; bin< preds_length; bin++ )) ; do
@@ -76,15 +76,60 @@ compare_predictions() {
7676
7777compare_fks_with_reference () {
7878 THEORYID=$1
79+
7980 fktables=(./theory_productions/data/fktables/" $THEORYID " /* .pineappl.lz4)
8081 for fktable_path in " ${fktables[@]} " ; do
8182 fkname=$( basename " $fktable_path " )
83+ PDFSETNAMES=$( get_pdf_combinations " $fkname " )
84+ PDFSETNAMES=$( echo " $PDFSETNAMES " | sed ' s/ /+p,/g' )
8285 fkref=" ./theory_productions/data/fktables/$THEORYID /$fkname "
8386 fkcur=" ./theory_productions/reference_fks/$THEORYID /$fkname "
84- compare_predictions " $fkref " " $fkcur "
87+ compare_fktables " $fkref " " $fkcur " " $PDFSETNAMES "
88+ done
89+ }
90+
91+ dis_predictions () {
92+ THEORYID=$1
93+ NFONLL_ID=$(( $THEORYID * 100 ))
94+
95+ for dataset in " ${LIST_DIS_DATASETS[@]} " ; do
96+ pineko fonll -c pineko.ci.toml tcards $THEORYID
97+ pineko fonll -c pineko.ci.toml ekos --overwrite $THEORYID $dataset
98+ pineko fonll -c pineko.ci.toml fks --overwrite $THEORYID $dataset
99+ pineko fonll -c pineko.ci.toml combine --overwrite $THEORYID $dataset \
100+ --FFNS3 $NFONLL_ID \
101+ --FFN03 $(( $NFONLL_ID + 1 )) \
102+ --FFNS4zeromass $(( $NFONLL_ID + 2 )) \
103+ --FFNS4massive $(( $NFONLL_ID + 3 )) \
104+ --FFN04 $(( $NFONLL_ID + 4 )) \
105+ --FFNS5zeromass $(( $NFONLL_ID + 5 )) \
106+ --FFNS5massive $(( $NFONLL_ID + 6 ))
107+ done
108+ }
109+
110+ hadronic_predictions () {
111+ THEORYID=$1
112+ LIST_DATASETS=$2
113+
114+ IFS=' |' read -r -a ARRAY_DATASETS <<< " $LIST_DATASETS"
115+ for dataset in " ${ARRAY_DATASETS[@]} " ; do
116+ pineko theory -c pineko.ci.toml opcards --overwrite $THEORYID $dataset
117+ pineko theory -c pineko.ci.toml ekos --overwrite $THEORYID $dataset
118+ pineko theory -c pineko.ci.toml fks --overwrite $THEORYID $dataset
85119 done
120+
121+ compare_fks_with_grids $THEORYID
86122}
87123
124+ # Expand the hadronic datasets
125+ LIST_HADRONIC_DATA=$( IFS=' |' ; echo " ${LIST_HADRONIC_DATASETS[*]} " )
126+ LIST_POLARIZED_DATA=$( IFS=' |' ; echo " ${LIST_POLARIZED_HADRONIC_DATASETS[*]} " )
127+
128+ # Unpolarized runs
88129dis_predictions $THEORY_ID
89- hadronic_predictions $THEORY_ID
130+ hadronic_predictions $THEORY_ID " $LIST_HADRONIC_DATA "
90131compare_fks_with_reference $THEORY_ID
132+
133+ # Polarized runs with multiple convolutions
134+ hadronic_predictions $POLARIZED_THEORY_ID " $LIST_POLARIZED_DATA "
135+ compare_fks_with_reference $POLARIZED_THEORY_ID
0 commit comments