From 5d83abfe2daa14e87925881e70a17c961216c50e Mon Sep 17 00:00:00 2001 From: Giacomo Magni Date: Fri, 23 Aug 2024 14:58:51 +0200 Subject: [PATCH 1/2] try support timelike --- src/pineko/evolve.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pineko/evolve.py b/src/pineko/evolve.py index d2e4d14b..72eaca76 100644 --- a/src/pineko/evolve.py +++ b/src/pineko/evolve.py @@ -77,6 +77,8 @@ def get_grid_convolution_type(kv): if check.islepton(int(part_2)): conv_type_2 = None else: + # new hadronic polarized and timelike grids contain convolution_type_2 + # but old unpolarized do not conv_type_2 = kv.get("convolution_type_2", "UnpolPDF") return conv_type_1, conv_type_2 @@ -84,7 +86,12 @@ def get_grid_convolution_type(kv): def check_convolution_types(grid, operators1, operators2): """Check that grid and eko convolution types are sorted correctly.""" grid_conv_1, grid_conv_2 = get_grid_convolution_type(grid.key_values()) - conv_to_eko = {"UnpolPDF": (False, False), "PolPDF": (True, False)} + conv_to_eko = { + "UnpolPDF": (False, False), + "PolPDF": (True, False), + "UnpolFF": (False, True), + "PolFF": (True, True), + } for op, pine_conv in [(operators1, grid_conv_1), (operators2, grid_conv_2)]: is_pol, is_tl = conv_to_eko[pine_conv] @@ -146,6 +153,7 @@ def dump_card(card_path, operators_card, conv_type, suffix=False): """ op_to_dump = copy.deepcopy(operators_card) op_to_dump["configs"]["polarized"] = conv_type == "PolPDF" + op_to_dump["configs"]["time_like"] = "FF" in conv_type if suffix: card_path = card_path.parent / f"{card_path.stem}_{conv_type}.yaml" From 734d49593923d6edefd00c94f7c7f17969afea72 Mon Sep 17 00:00:00 2001 From: Giacomo Magni Date: Fri, 23 Aug 2024 15:05:47 +0200 Subject: [PATCH 2/2] remove leftover of previous implementation --- src/pineko/evolve.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pineko/evolve.py b/src/pineko/evolve.py index 72eaca76..accbe8f7 100644 --- a/src/pineko/evolve.py +++ b/src/pineko/evolve.py @@ -245,10 +245,6 @@ def write_operator_card(pineappl_grid, default_card, card_path, tcard): kv = pineappl_grid.key_values() conv_type_1, conv_type_2 = get_grid_convolution_type(kv) - # fragmentation function grid? - if "timelike" in kv: - operators_card["configs"]["timelike"] = kv["timelike"] == "True" - # Choose the evolution method according to the theory if the key is included if "ModEv" in tcard: opconf = operators_card["configs"]