From 9e650379989029516298474339a0b95df2050495 Mon Sep 17 00:00:00 2001 From: giacomomagni Date: Tue, 7 Nov 2023 13:38:15 +0200 Subject: [PATCH 1/5] address issue #322 --- src/eko/runner/legacy.py | 4 +--- src/eko/runner/parts.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/eko/runner/legacy.py b/src/eko/runner/legacy.py index ff1bb1e7b..991ec2bd0 100644 --- a/src/eko/runner/legacy.py +++ b/src/eko/runner/legacy.py @@ -77,9 +77,7 @@ def __init__( couplings=cs, interpol_dispatcher=bfd, n3lo_ad_variation=new_theory.n3lo_ad_variation, - matching_order=new_theory.matching_order - if new_theory.matching_order is not None - else new_theory.order, + matching_order=new_theory.matching_order, ) with EKO.create(path) as builder: diff --git a/src/eko/runner/parts.py b/src/eko/runner/parts.py index 4752aa357..87d2ab7a8 100644 --- a/src/eko/runner/parts.py +++ b/src/eko/runner/parts.py @@ -90,7 +90,7 @@ def evolve_configs(eko: EKO) -> dict: n3lo_ad_variation=tcard.n3lo_ad_variation, matching_order=tcard.matching_order if tcard.matching_order is not None - else tcard.order, + else (tcard.order[0] - 1, tcard.order[1]), ) From 674c36c927a42d59965baa8a5feb553eb7ee490f Mon Sep 17 00:00:00 2001 From: Giacomo Magni <39065935+giacomomagni@users.noreply.github.com> Date: Tue, 7 Nov 2023 13:18:57 +0100 Subject: [PATCH 2/5] Update src/eko/runner/parts.py Co-authored-by: Felix Hekhorn --- src/eko/runner/parts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eko/runner/parts.py b/src/eko/runner/parts.py index 87d2ab7a8..128a2553b 100644 --- a/src/eko/runner/parts.py +++ b/src/eko/runner/parts.py @@ -90,7 +90,7 @@ def evolve_configs(eko: EKO) -> dict: n3lo_ad_variation=tcard.n3lo_ad_variation, matching_order=tcard.matching_order if tcard.matching_order is not None - else (tcard.order[0] - 1, tcard.order[1]), + else (tcard.order[0] - 1, tcard.order[1] - 1), ) From 2cf291d6eba78dbc362235083c83ff6314d1346b Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Tue, 7 Nov 2023 14:47:01 +0200 Subject: [PATCH 3/5] Add unit test for #322 --- tests/eko/runner/test_parts.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/eko/runner/test_parts.py diff --git a/tests/eko/runner/test_parts.py b/tests/eko/runner/test_parts.py new file mode 100644 index 000000000..39c3bc843 --- /dev/null +++ b/tests/eko/runner/test_parts.py @@ -0,0 +1,22 @@ +from eko.runner import parts + + +def test_evolve_configs(eko_factory): + # QCD@LO + e10 = eko_factory.get() + assert e10.theory_card.order == (1, 0) + p10 = parts.evolve_configs(e10) + assert p10["matching_order"] == (0, 0) + # QCD@N3LO + QED@N2LO w/o matching_order + eko_factory.theory.order = (4, 3) + eko_factory.theory.matching_order = None + e43 = eko_factory.get({}) + assert e43.theory_card.order == (4, 3) + p43 = parts.evolve_configs(e43) + assert p43["matching_order"] == (3, 2) + # QCD@N3LO + QED@N2LO w/ matching_order + eko_factory.theory.matching_order = (3, 0) + e43b = eko_factory.get({}) + assert e43b.theory_card.order == (4, 3) + p43b = parts.evolve_configs(e43b) + assert p43b["matching_order"] == (3, 0) From 547911a3182af1c998055ecfde36744bbcee7396 Mon Sep 17 00:00:00 2001 From: giacomomagni Date: Wed, 8 Nov 2023 09:05:37 +0100 Subject: [PATCH 4/5] hard code QED matching to 0 --- src/eko/io/runcards.py | 4 ++-- src/eko/runner/parts.py | 6 +++--- tests/eko/runner/test_parts.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/eko/io/runcards.py b/src/eko/io/runcards.py index e9260a6eb..7dbbe2b34 100644 --- a/src/eko/io/runcards.py +++ b/src/eko/io/runcards.py @@ -212,8 +212,8 @@ def new_theory(self): new["xif"] = old["XIF"] new["n3lo_ad_variation"] = old.get("n3lo_ad_variation", (0, 0, 0, 0)) - # here PTO: 0 means truly LO - new["matching_order"] = old.get("PTO_matching", [old["PTO"], old["QED"]]) + # here PTO: 0 means truly LO, no QED matching is available so far. + new["matching_order"] = old.get("PTO_matching", [old["PTO"], 0]) return TheoryCard.from_dict(new) diff --git a/src/eko/runner/parts.py b/src/eko/runner/parts.py index 128a2553b..bbbf36408 100644 --- a/src/eko/runner/parts.py +++ b/src/eko/runner/parts.py @@ -88,9 +88,9 @@ def evolve_configs(eko: EKO) -> dict: n_integration_cores=ocard.configs.n_integration_cores, ModSV=ocard.configs.scvar_method, n3lo_ad_variation=tcard.n3lo_ad_variation, - matching_order=tcard.matching_order - if tcard.matching_order is not None - else (tcard.order[0] - 1, tcard.order[1] - 1), + matching_order=tcard.matching_order if tcard.matching_order is not None + # Here order is shifted by one, no QED matching is available so far. + else (tcard.order[0] - 1, 0), ) diff --git a/tests/eko/runner/test_parts.py b/tests/eko/runner/test_parts.py index 39c3bc843..2ec217dd7 100644 --- a/tests/eko/runner/test_parts.py +++ b/tests/eko/runner/test_parts.py @@ -13,7 +13,7 @@ def test_evolve_configs(eko_factory): e43 = eko_factory.get({}) assert e43.theory_card.order == (4, 3) p43 = parts.evolve_configs(e43) - assert p43["matching_order"] == (3, 2) + assert p43["matching_order"] == (3, 0) # QCD@N3LO + QED@N2LO w/ matching_order eko_factory.theory.matching_order = (3, 0) e43b = eko_factory.get({}) From 8f87134ff4e9868de481f06a7483fb780b6771da Mon Sep 17 00:00:00 2001 From: giacomomagni Date: Wed, 8 Nov 2023 09:08:17 +0100 Subject: [PATCH 5/5] hard code QED matching to 0 --- src/eko/runner/parts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/eko/runner/parts.py b/src/eko/runner/parts.py index bbbf36408..67d2cda18 100644 --- a/src/eko/runner/parts.py +++ b/src/eko/runner/parts.py @@ -88,8 +88,9 @@ def evolve_configs(eko: EKO) -> dict: n_integration_cores=ocard.configs.n_integration_cores, ModSV=ocard.configs.scvar_method, n3lo_ad_variation=tcard.n3lo_ad_variation, - matching_order=tcard.matching_order if tcard.matching_order is not None # Here order is shifted by one, no QED matching is available so far. + matching_order=tcard.matching_order + if tcard.matching_order is not None else (tcard.order[0] - 1, 0), )