Skip to content

Commit

Permalink
fix new pineappl convention, add empty IC for polarized and new th ca…
Browse files Browse the repository at this point in the history
…rd syntax
  • Loading branch information
giacomomagni committed Jul 5, 2024
1 parent 181b28b commit 03346d2
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/yadbox/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def dump_pineappl_to_file(output, filename, obsname):
# Define the convolution type of the initial state hadron
conv_type = "PolPDF" if obsname.startswith("g") else "UnpolPDF"
grid.set_key_value("convolution_type_1", conv_type)
grid.set_key_value("convolution_type_2", str(None))

# dump file
grid.optimize()
grid.write(filename)
grid.write_lz4(filename)
7 changes: 4 additions & 3 deletions src/yadism/coefficient_functions/coupling_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,13 @@ def from_dict(cls, theory, observables):
CouplingConstants
created object
"""
ckm_matrix = theory["CKM"]
if isinstance(ckm_matrix, str):
ckm_matrix = CKM2Matrix.from_str(ckm_matrix)
theory_config = {
"MZ2": theory.get("MZ", 91.1876)
** 2, # TODO remove defaults to the PDG2020 value
"CKM": CKM2Matrix.from_str(
theory["CKM"]
), # TODO remove default in PDG2020 Eq. 12.33
"CKM": ckm_matrix,
"sin2theta_weak": theory.get(
"SIN2TW", 0.23121
), # TODO remove defaults to the PDG2020 value
Expand Down
8 changes: 8 additions & 0 deletions src/yadism/coefficient_functions/intrinsic/g1_nc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from ..partonic_channel import EmptyPartonicChannel


class Splus(EmptyPartonicChannel):
pass

class Sminus(EmptyPartonicChannel):
pass
9 changes: 9 additions & 0 deletions src/yadism/coefficient_functions/intrinsic/g4_nc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from ..partonic_channel import EmptyPartonicChannel


class Splus(EmptyPartonicChannel):
pass

class Sminus(EmptyPartonicChannel):
pass

9 changes: 9 additions & 0 deletions src/yadism/coefficient_functions/intrinsic/gl_nc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from ..partonic_channel import EmptyPartonicChannel


class Splus(EmptyPartonicChannel):
pass

class Sminus(EmptyPartonicChannel):
pass

6 changes: 3 additions & 3 deletions src/yadism/input/compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def update_scale_variations(theory):
theory runcard
"""
if "RenScaleVar" not in theory:
theory["RenScaleVar"] = not np.isclose(theory["XIR"], 1.0)
theory["RenScaleVar"] = True
if "FactScaleVar" not in theory:
theory["FactScaleVar"] = not np.isclose(theory["XIF"], 1.0)
theory["FactScaleVar"] = True


def update_target(obs):
Expand Down Expand Up @@ -140,7 +140,7 @@ def update_fns(theory):
else:
raise ValueError(f"Scheme '{fns}' not recognized.")

if "PTODIS" not in theory:
if "PTODIS" not in theory or theory["PTODIS"] is None:
theory["PTODIS"] = theory["PTO"]

if "FONLLParts" not in theory:
Expand Down

0 comments on commit 03346d2

Please sign in to comment.