Skip to content

Commit 9ec9b05

Browse files
committed
small changes to the nnlojet part
1 parent cae7fdf commit 9ec9b05

File tree

7 files changed

+31
-22
lines changed

7 files changed

+31
-22
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ repos:
4040
- id: pydocstyle
4141
files: ^src/
4242
additional_dependencies:
43-
- toml
43+
- tomli
4444
- repo: https://github.com/pre-commit/pre-commit
4545
rev: v4.2.0
4646
hooks:

extras/theories/theory_nnlo.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
ID: NNLO
22
Comments: Example of NNLO theory
3-
CKM: 0.97428 0.22530 0.003470 0.22520 0.97345 0.041000 0.00862 0.04030 0.999152
3+
CKM: 0.97367 0.22431 3.82e-3 0.221 0.975 41.1e-3 8.6e-3 41.5e-3 1.010
44
DAMP: 0
55
EScaleVar: 1
66
FNS: FONLL-C
7-
GF: 1.1663787e-05
7+
GF: 1.1663788e-5
88
HQ: POLE
99
IC: 1
1010
IB: 0
1111
MP: 0.938
12-
MW: 80.398
13-
MZ: 91.1876
12+
MZ: 91.1880
13+
MW: 80.3692
1414
MaxNfAs: 5
1515
MaxNfPdf: 5
16-
ModEv: TRN
16+
ModEv: EXA
17+
IterEv: 60
1718
ModSV: expanded
1819
NfFF: 4
1920
PTO: 2
2021
Q0: 1.65
2122
QED: 0
22-
Qedref: 1.777
23-
Qmb: 4.92
24-
Qmc: 1.51
25-
Qmt: 172.5
26-
Qref: 91.2
27-
SIN2TW: 0.23126
23+
Qedref: 91.1880
24+
Qref: 91.1880
25+
alphas: 0.118
26+
alphaqed: 0.0075700
27+
SIN2TW: 0.22348
2828
SxOrd: LL
2929
SxRes: 0
3030
TMC: 1
3131
XIF: 1.0
3232
XIR: 1.0
33-
alphaqed: 0.007496252
34-
alphas: 0.118
3533
global_nx: 0
36-
kbThr: 1.0
34+
mc: 1.502
35+
Qmc: 1.502
3736
kcThr: 1.0
38-
ktThr: 1.0
39-
mb: 4.92
40-
mc: 1.51
37+
mb: 4.936
38+
Qmb: 4.936
39+
kbThr: 1.0
4140
mt: 172.5
41+
Qmt: 172.5
4242
nfref: null
4343
nf0: null
4444
fact_to_ren_scale_ratio: 1.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pineappl = "^0.8.2"
3636
more-itertools = "^8.10.0"
3737
appdirs = "^1.4.4"
3838
tomli = "^2.0.1"
39-
nnpdf-data = { version = "0.0.3" }
39+
nnpdf-data = { version = ">=0.0.3" }
4040
yadism = { extras = ["box"], version = "^0.13.5", optional=true, markers = "python_version < '3.13'" }
4141
eko = { extras = ["box"], version = "^0.14.2", optional=true, markers = "python_version < '3.13'" }
4242

src/pinefarm/cli/autogen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ def runcards(dataset, target, select_obs=None, name=None):
3131

3232
output = configs.configs["paths"]["runcards"] / f"{target}_{name}"
3333

34-
if target == "NNLOJET":
34+
if target.upper() == "NNLOJET":
3535
output_runcards = generate_pinecard_from_nnpdf(
3636
dataset, output_path=output, observables=select_obs
3737
)
38+
else:
39+
raise ValueError(f"Target {target} not recognized")
3840

3941
rich.print("Pinecards written to: ")
4042
rich.print(" " + "\n".join(str(i) for i in output_runcards))

src/pinefarm/external/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def decide_external_tool(dsname: str):
2828
# The decisions are usually based on the existence of a `.yaml` file with a specific name
2929
# or a prefix in the pinecard
3030

31-
if dsname.startswith("NNLOJET"):
31+
if dsname.startswith(("NNLOJET", "nnlojet")):
3232
from .nnlojet import NNLOJET
3333

3434
return NNLOJET, "blue"

src/pinefarm/external/nnlojet/runcardgen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,12 @@ def _fill_process(process):
225225
"""Fill process options."""
226226
process_name = process["proc"]
227227
sqrts = process["sqrts"]
228+
jet = process.get("jet", "none[0]") # Can be None
228229
"""Fill process block given the metadata for the process"""
229230
return f"""
230231
PROCESS {process_name}
231232
collider = pp sqrts = {sqrts}
232-
jet = none[0]
233+
jet = {jet}
233234
decay_type = 1
234235
END_PROCESS
235236
"""
@@ -239,6 +240,7 @@ def _fill_run(runname, pdf, mode_line, techcut=1e-7, multi_channel=3):
239240
"""Fil run options."""
240241
if multi_channel == 0:
241242
multi_channel = ".false."
243+
# Note, scale coefficients need to be set to true to fill the grid
242244
return f"""
243245
RUN {runname.upper()}
244246
PDF = {pdf}[0]

src/pinefarm/external/nnlojet/runner.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ def __init__(self, pinecard, theorycard, *args, **kwargs):
2424
# Save the yaml dictionary from the NNLOJET pinecard
2525
self._yaml_dict = safe_load(yaml_card.open("r"))
2626

27+
@staticmethod
28+
def install():
29+
"""NNLOJET should be installed manually."""
30+
pass
31+
2732
def preparation(self):
2833
"""Run the preparation step for NNLOJET."""
2934
# Update the yaml card according to the theory

0 commit comments

Comments
 (0)