Skip to content

Commit

Permalink
Test more scale variations
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Oct 17, 2024
1 parent aeab8d2 commit d050130
Showing 1 changed file with 135 additions and 2 deletions.
137 changes: 135 additions & 2 deletions pineappl_cli/tests/uncert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,21 @@ const ORDERS_A2_AS1A2_STR: &str = "b etal dsig/detal NNPDF31_nlo_as_0118
7 4 4.5 2.7737493e1 2.7724826e1 -2.77 2.77
";

const SCALE_ABS_STR: &str =
const SCALE_ABS_3_STR: &str = "b etal dsig/detal 1,1,1 2,2,2 0.5,0.5,0.5
[] [pb] (r,f,a) (r,f,a) (r,f,a)
[pb] [pb] [pb]
-+----+----+-----------+-----------+-----------+-----------
0 2 2.25 7.5459110e2 7.5459110e2 7.6745431e2 7.4296019e2
1 2.25 2.5 6.9028342e2 6.9028342e2 7.0221920e2 6.7923774e2
2 2.5 2.75 6.0025198e2 6.0025198e2 6.1056383e2 5.9046454e2
3 2.75 3 4.8552235e2 4.8552235e2 4.9366919e2 4.7761552e2
4 3 3.25 3.6195456e2 3.6195456e2 3.6783089e2 3.5611822e2
5 3.25 3.5 2.4586691e2 2.4586691e2 2.4967698e2 2.4198770e2
6 3.5 4 1.1586851e2 1.1586851e2 1.1746280e2 1.1418227e2
7 4 4.5 2.7517266e1 2.7517266e1 2.7787333e1 2.7211003e1
";

const SCALE_ABS_7_STR: &str =
"b etal dsig/detal 1,1,1 2,2,1 0.5,0.5,1 2,1,1 1,2,1 0.5,1,1 1,0.5,1
[] [pb] (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a)
[pb] [pb] [pb] [pb] [pb] [pb] [pb]
Expand All @@ -94,6 +108,50 @@ const SCALE_ABS_STR: &str =
7 4 4.5 2.7517266e1 2.7517266e1 2.7787333e1 2.7211003e1 2.7002241e1 2.8306905e1 2.8157972e1 2.6562471e1
";

const SCALE_ABS_9_STR: &str =
"b etal dsig/detal 1,1,1 2,2,1 0.5,0.5,1 2,1,1 1,2,1 0.5,1,1 1,0.5,1 2,0.5,1 0.5,2,1
[] [pb] (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a)
[pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb]
-+----+----+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------
0 2 2.25 7.5459110e2 7.5459110e2 7.6745431e2 7.4296019e2 7.4384068e2 7.7529764e2 7.6796494e2 7.2595107e2 7.1227848e2 7.8505497e2
1 2.25 2.5 6.9028342e2 6.9028342e2 7.0221920e2 6.7923774e2 6.8058382e2 7.0957480e2 7.0235002e2 6.6417441e2 6.5206593e2 7.1872540e2
2 2.5 2.75 6.0025198e2 6.0025198e2 6.1056383e2 5.9046454e2 5.9160658e2 6.1750966e2 6.1100712e2 5.7747295e2 5.6702981e2 6.2615050e2
3 2.75 3 4.8552235e2 4.8552235e2 4.9366919e2 4.7761552e2 4.7841022e2 4.9966237e2 4.9437007e2 4.6723687e2 4.5889411e2 5.0711808e2
4 3 3.25 3.6195456e2 3.6195456e2 3.6783089e2 3.5611822e2 3.5652780e2 3.7261436e2 3.6870561e2 3.4843600e2 3.4226073e2 3.7856515e2
5 3.25 3.5 2.4586691e2 2.4586691e2 2.4967698e2 2.4198770e2 2.4207028e2 2.5316566e2 2.5059003e2 2.3677625e2 2.3258708e2 2.5750568e2
6 3.5 4 1.1586851e2 1.1586851e2 1.1746280e2 1.1418227e2 1.1396174e2 1.1930157e2 1.1824058e2 1.1166942e2 1.0964950e2 1.2158905e2
7 4 4.5 2.7517266e1 2.7517266e1 2.7787333e1 2.7211003e1 2.7002241e1 2.8306905e1 2.8157972e1 2.6562471e1 2.6041156e1 2.8953268e1
";

const SCALE_ABS_17_STR: &str = "b etal dsig/detal 1,1,1 2,2,2 0.5,0.5,0.5 0.5,0.5,1 0.5,1,0.5 0.5,1,1 0.5,1,2 1,0.5,0.5 1,0.5,1 1,1,0.5 1,1,2 1,2,1 1,2,2 2,1,0.5 2,1,1 2,1,2 2,2,1
[] [pb] (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a)
[pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb]
-+----+----+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------
0 2 2.25 7.5459110e2 7.5459110e2 7.6745431e2 7.4296019e2 7.4296019e2 7.6796494e2 7.6796494e2 7.6796494e2 7.2595107e2 7.2595107e2 7.5459110e2 7.5459110e2 7.7529764e2 7.7529764e2 7.4384068e2 7.4384068e2 7.4384068e2 7.6745431e2
1 2.25 2.5 6.9028342e2 6.9028342e2 7.0221920e2 6.7923774e2 6.7923774e2 7.0235002e2 7.0235002e2 7.0235002e2 6.6417441e2 6.6417441e2 6.9028342e2 6.9028342e2 7.0957480e2 7.0957480e2 6.8058382e2 6.8058382e2 6.8058382e2 7.0221920e2
2 2.5 2.75 6.0025198e2 6.0025198e2 6.1056383e2 5.9046454e2 5.9046454e2 6.1100712e2 6.1100712e2 6.1100712e2 5.7747295e2 5.7747295e2 6.0025198e2 6.0025198e2 6.1750966e2 6.1750966e2 5.9160658e2 5.9160658e2 5.9160658e2 6.1056383e2
3 2.75 3 4.8552235e2 4.8552235e2 4.9366919e2 4.7761552e2 4.7761552e2 4.9437007e2 4.9437007e2 4.9437007e2 4.6723687e2 4.6723687e2 4.8552235e2 4.8552235e2 4.9966237e2 4.9966237e2 4.7841022e2 4.7841022e2 4.7841022e2 4.9366919e2
4 3 3.25 3.6195456e2 3.6195456e2 3.6783089e2 3.5611822e2 3.5611822e2 3.6870561e2 3.6870561e2 3.6870561e2 3.4843600e2 3.4843600e2 3.6195456e2 3.6195456e2 3.7261436e2 3.7261436e2 3.5652780e2 3.5652780e2 3.5652780e2 3.6783089e2
5 3.25 3.5 2.4586691e2 2.4586691e2 2.4967698e2 2.4198770e2 2.4198770e2 2.5059003e2 2.5059003e2 2.5059003e2 2.3677625e2 2.3677625e2 2.4586691e2 2.4586691e2 2.5316566e2 2.5316566e2 2.4207028e2 2.4207028e2 2.4207028e2 2.4967698e2
6 3.5 4 1.1586851e2 1.1586851e2 1.1746280e2 1.1418227e2 1.1418227e2 1.1824058e2 1.1824058e2 1.1824058e2 1.1166942e2 1.1166942e2 1.1586851e2 1.1586851e2 1.1930157e2 1.1930157e2 1.1396174e2 1.1396174e2 1.1396174e2 1.1746280e2
7 4 4.5 2.7517266e1 2.7517266e1 2.7787333e1 2.7211003e1 2.7211003e1 2.8157972e1 2.8157972e1 2.8157972e1 2.6562471e1 2.6562471e1 2.7517266e1 2.7517266e1 2.8306905e1 2.8306905e1 2.7002241e1 2.7002241e1 2.7002241e1 2.7787333e1
";

const SCALE_ABS_27_STR: &str =
"b etal dsig/detal 1,1,1 2,2,2 0.5,0.5,0.5 0.5,0.5,1 0.5,1,0.5 0.5,1,1 0.5,1,2 1,0.5,0.5 1,0.5,1 1,1,0.5 1,1,2 1,2,1 1,2,2 2,1,0.5 2,1,1 2,1,2 2,2,1 2,0.5,0.5 0.5,2,0.5 1,2,0.5 2,2,0.5 2,0.5,1 0.5,2,1 0.5,0.5,2 1,0.5,2 2,0.5,2 0.5,2,2
[] [pb] (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a) (r,f,a)
[pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb] [pb]
-+----+----+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------
0 2 2.25 7.5459110e2 7.5459110e2 7.6745431e2 7.4296019e2 7.4296019e2 7.6796494e2 7.6796494e2 7.6796494e2 7.2595107e2 7.2595107e2 7.5459110e2 7.5459110e2 7.7529764e2 7.7529764e2 7.4384068e2 7.4384068e2 7.4384068e2 7.6745431e2 7.1227848e2 7.8505497e2 7.7529764e2 7.6745431e2 7.1227848e2 7.8505497e2 7.4296019e2 7.2595107e2 7.1227848e2 7.8505497e2
1 2.25 2.5 6.9028342e2 6.9028342e2 7.0221920e2 6.7923774e2 6.7923774e2 7.0235002e2 7.0235002e2 7.0235002e2 6.6417441e2 6.6417441e2 6.9028342e2 6.9028342e2 7.0957480e2 7.0957480e2 6.8058382e2 6.8058382e2 6.8058382e2 7.0221920e2 6.5206593e2 7.1872540e2 7.0957480e2 7.0221920e2 6.5206593e2 7.1872540e2 6.7923774e2 6.6417441e2 6.5206593e2 7.1872540e2
2 2.5 2.75 6.0025198e2 6.0025198e2 6.1056383e2 5.9046454e2 5.9046454e2 6.1100712e2 6.1100712e2 6.1100712e2 5.7747295e2 5.7747295e2 6.0025198e2 6.0025198e2 6.1750966e2 6.1750966e2 5.9160658e2 5.9160658e2 5.9160658e2 6.1056383e2 5.6702981e2 6.2615050e2 6.1750966e2 6.1056383e2 5.6702981e2 6.2615050e2 5.9046454e2 5.7747295e2 5.6702981e2 6.2615050e2
3 2.75 3 4.8552235e2 4.8552235e2 4.9366919e2 4.7761552e2 4.7761552e2 4.9437007e2 4.9437007e2 4.9437007e2 4.6723687e2 4.6723687e2 4.8552235e2 4.8552235e2 4.9966237e2 4.9966237e2 4.7841022e2 4.7841022e2 4.7841022e2 4.9366919e2 4.5889411e2 5.0711808e2 4.9966237e2 4.9366919e2 4.5889411e2 5.0711808e2 4.7761552e2 4.6723687e2 4.5889411e2 5.0711808e2
4 3 3.25 3.6195456e2 3.6195456e2 3.6783089e2 3.5611822e2 3.5611822e2 3.6870561e2 3.6870561e2 3.6870561e2 3.4843600e2 3.4843600e2 3.6195456e2 3.6195456e2 3.7261436e2 3.7261436e2 3.5652780e2 3.5652780e2 3.5652780e2 3.6783089e2 3.4226073e2 3.7856515e2 3.7261436e2 3.6783089e2 3.4226073e2 3.7856515e2 3.5611822e2 3.4843600e2 3.4226073e2 3.7856515e2
5 3.25 3.5 2.4586691e2 2.4586691e2 2.4967698e2 2.4198770e2 2.4198770e2 2.5059003e2 2.5059003e2 2.5059003e2 2.3677625e2 2.3677625e2 2.4586691e2 2.4586691e2 2.5316566e2 2.5316566e2 2.4207028e2 2.4207028e2 2.4207028e2 2.4967698e2 2.3258708e2 2.5750568e2 2.5316566e2 2.4967698e2 2.3258708e2 2.5750568e2 2.4198770e2 2.3677625e2 2.3258708e2 2.5750568e2
6 3.5 4 1.1586851e2 1.1586851e2 1.1746280e2 1.1418227e2 1.1418227e2 1.1824058e2 1.1824058e2 1.1824058e2 1.1166942e2 1.1166942e2 1.1586851e2 1.1586851e2 1.1930157e2 1.1930157e2 1.1396174e2 1.1396174e2 1.1396174e2 1.1746280e2 1.0964950e2 1.2158905e2 1.1930157e2 1.1746280e2 1.0964950e2 1.2158905e2 1.1418227e2 1.1166942e2 1.0964950e2 1.2158905e2
7 4 4.5 2.7517266e1 2.7517266e1 2.7787333e1 2.7211003e1 2.7211003e1 2.8157972e1 2.8157972e1 2.8157972e1 2.6562471e1 2.6562471e1 2.7517266e1 2.7517266e1 2.8306905e1 2.8306905e1 2.7002241e1 2.7002241e1 2.7002241e1 2.7787333e1 2.6041156e1 2.8953268e1 2.8306905e1 2.7787333e1 2.6041156e1 2.8953268e1 2.7211003e1 2.6562471e1 2.6041156e1 2.8953268e1
";

const SCALE_COV_STR: &str = "b etal dsig/detal 7pt scale (cov)
[] [pb] [%]
-+----+----+-----------+-------+-------
Expand Down Expand Up @@ -242,7 +300,82 @@ fn scale_abs() {
])
.assert()
.success()
.stdout(SCALE_ABS_STR);
.stdout(SCALE_ABS_7_STR);
}

#[test]
fn scale_abs_3() {
Command::cargo_bin("pineappl")
.unwrap()
.args([
"uncert",
"--scale-abs=3",
"../test-data/LHCB_WP_7TEV_opt.pineappl.lz4",
"NNPDF31_nlo_as_0118_luxqed",
])
.assert()
.success()
.stdout(SCALE_ABS_3_STR);
}

#[test]
fn scale_abs_7() {
Command::cargo_bin("pineappl")
.unwrap()
.args([
"uncert",
"--scale-abs=7",
"../test-data/LHCB_WP_7TEV_opt.pineappl.lz4",
"NNPDF31_nlo_as_0118_luxqed",
])
.assert()
.success()
.stdout(SCALE_ABS_7_STR);
}

#[test]
fn scale_abs_9() {
Command::cargo_bin("pineappl")
.unwrap()
.args([
"uncert",
"--scale-abs=9",
"../test-data/LHCB_WP_7TEV_opt.pineappl.lz4",
"NNPDF31_nlo_as_0118_luxqed",
])
.assert()
.success()
.stdout(SCALE_ABS_9_STR);
}

#[test]
fn scale_abs_17() {
Command::cargo_bin("pineappl")
.unwrap()
.args([
"uncert",
"--scale-abs=17",
"../test-data/LHCB_WP_7TEV_opt.pineappl.lz4",
"NNPDF31_nlo_as_0118_luxqed",
])
.assert()
.success()
.stdout(SCALE_ABS_17_STR);
}

#[test]
fn scale_abs_27() {
Command::cargo_bin("pineappl")
.unwrap()
.args([
"uncert",
"--scale-abs=27",
"../test-data/LHCB_WP_7TEV_opt.pineappl.lz4",
"NNPDF31_nlo_as_0118_luxqed",
])
.assert()
.success()
.stdout(SCALE_ABS_27_STR);
}

#[test]
Expand Down

0 comments on commit d050130

Please sign in to comment.