Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
- id: pydocstyle
files: ^src/
additional_dependencies:
- toml
- tomli
- repo: https://github.com/pre-commit/pre-commit
rev: v4.3.0
hooks:
Expand Down
34 changes: 17 additions & 17 deletions extras/theories/theory_nnlo.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
ID: NNLO
Comments: Example of NNLO theory
CKM: 0.97428 0.22530 0.003470 0.22520 0.97345 0.041000 0.00862 0.04030 0.999152
CKM: 0.97367 0.22431 3.82e-3 0.221 0.975 41.1e-3 8.6e-3 41.5e-3 1.010
DAMP: 0
EScaleVar: 1
FNS: FONLL-C
GF: 1.1663787e-05
GF: 1.1663788e-5
HQ: POLE
IC: 1
IB: 0
MP: 0.938
MW: 80.398
MZ: 91.1876
MZ: 91.1880
MW: 80.3692
MaxNfAs: 5
MaxNfPdf: 5
ModEv: TRN
ModEv: EXA
IterEv: 60
ModSV: expanded
NfFF: 4
PTO: 2
Q0: 1.65
QED: 0
Qedref: 1.777
Qmb: 4.92
Qmc: 1.51
Qmt: 172.5
Qref: 91.2
SIN2TW: 0.23126
Qedref: 91.1880
Qref: 91.1880
alphas: 0.118
alphaqed: 0.0075700
SIN2TW: 0.22348
SxOrd: LL
SxRes: 0
TMC: 1
XIF: 1.0
XIR: 1.0
alphaqed: 0.007496252
alphas: 0.118
global_nx: 0
kbThr: 1.0
mc: 1.502
Qmc: 1.502
kcThr: 1.0
ktThr: 1.0
mb: 4.92
mc: 1.51
mb: 4.936
Qmb: 4.936
kbThr: 1.0
mt: 172.5
Qmt: 172.5
nfref: null
nf0: null
fact_to_ren_scale_ratio: 1.0
Expand Down
4 changes: 3 additions & 1 deletion src/pinefarm/cli/autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ def runcards(dataset, target, select_obs=None, name=None):

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

if target == "NNLOJET":
if target.upper() == "NNLOJET":
output_runcards = generate_pinecard_from_nnpdf(
dataset, output_path=output, observables=select_obs
)
else:
raise ValueError(f"Target {target} not recognized")

rich.print("Pinecards written to: ")
rich.print(" " + "\n".join(str(i) for i in output_runcards))
Expand Down
2 changes: 1 addition & 1 deletion src/pinefarm/external/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def decide_external_tool(dsname: str):
"""
# The decisions are usually based on the existence of a `.yaml` file with a specific name
# or a prefix in the pinecard
if dsname.startswith("NNLOJET"):
if dsname.upper().startswith("NNLOJET"):
from .nnlojet import NNLOJET

return NNLOJET, "blue"
Expand Down
4 changes: 3 additions & 1 deletion src/pinefarm/external/nnlojet/runcardgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,12 @@ def _fill_process(process):
"""Fill process options."""
process_name = process["proc"]
sqrts = process["sqrts"]
jet = process.get("jet", "none[0]") # Can be None
"""Fill process block given the metadata for the process"""
return f"""
PROCESS {process_name}
collider = pp sqrts = {sqrts}
jet = none[0]
jet = {jet}
decay_type = 1
END_PROCESS
"""
Expand All @@ -239,6 +240,7 @@ def _fill_run(runname, pdf, mode_line, techcut=1e-7, multi_channel=3):
"""Fil run options."""
if multi_channel == 0:
multi_channel = ".false."
# Note, scale coefficients need to be set to true to fill the grid
return f"""
RUN {runname.upper()}
PDF = {pdf}[0]
Expand Down
5 changes: 5 additions & 0 deletions src/pinefarm/external/nnlojet/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ def __init__(self, pinecard, theorycard, *args, **kwargs):
# Save the yaml dictionary from the NNLOJET pinecard
self._yaml_dict = safe_load(yaml_card.open("r"))

@staticmethod
def install():
"""NNLOJET should be installed manually."""
pass

def preparation(self):
"""Run the preparation step for NNLOJET."""
# Update the yaml card according to the theory
Expand Down