pinefarm.external.nnlojet package
NNLOJET interface.
Submodules
pinefarm.external.nnlojet.nnpdf_interface module
Read up all important information form an NNPDF dataset.
The selector generation is very flaky and is (mostly) up to the user for now.
Some examples:
- ```yaml
histogram with selectors
- histograms:
name: test observable: ptz bins: [10, 20, 40] extra_selectors:
“reject abs_ylp min = 1.37 max = 1.52”
“reject abs_ylm min = 1.37 max = 1.52”
- pinefarm.external.nnlojet.nnpdf_interface.generate_pinecard_from_nnpdf(nnpdf_dataset, scale='etz', output_path='.', observables=None)[source]
Generate a NNLOJET pinecard from an NNPDF dataset.
Takes as input an NNPDF dataset, which will be loaded with the nnpdf_data package.
If a list of observables is provided, only those in the list will be loaded from the dataframe.
pinefarm.external.nnlojet.runcardgen module
Autogeneration of NNLOJET runcards.
Module for the autogeneration of NNLOJET runcards using as input yaml files containing the NNPDF dataset information.
- class pinefarm.external.nnlojet.runcardgen.Histogram(name: str, observable: str, bins: list, extra_selectors: dict | None = None, pineappl: bool = True, fac: int | None = None, compositions: list[dict] = <factory>)[source]
Bases:
objectHolds histogram information.
- class pinefarm.external.nnlojet.runcardgen.Selector(observable: str, min: float | None = None, max: float | None = None)[source]
Bases:
objectHolds selector information.
- class pinefarm.external.nnlojet.runcardgen.YamlLOJET(runname: str, process: dict, channels: dict, scales: dict = <factory>, parameters: dict = <factory>, selectors: list | None = None, histograms: list | None = None, multi_channel: int = 3, techcut: float = 1e-07, pdf: str = 'NNPDF40_nnlo_as_01180', manual: bool = False)[source]
Bases:
objectDefinition of the yaml runcard for sending NNLOJET jobs.
- active_channels(active_channels=None)[source]
Digest active channels.
Loop over all channels in the yamlcard and check whether it correspond to one of the channels in the list active_channels e.g., if active_channels = [RR, RV], all RRa_n, RRb_n, and RV_n will be accepted If active_channels is None, return the whole thing for [LO, R, V, RR, RV, VV]
Returns a dict {channel_name: list_of_channels}
- property channel_names_list
List of channels.
- histogram_definitions()[source]
Return a string with the definition of all the histograms.
- In general the histogram is defined in the yaml file as a dict with:
name observable bins extra_selectors: dict
- property process_name
Get process name.
- pinefarm.external.nnlojet.runcardgen.generate_combine_ini(metadata, channels, output=PosixPath('.'))[source]
Generate a NNLOJET combine config file.
- pinefarm.external.nnlojet.runcardgen.generate_runcard(metadata: YamlLOJET, channel: str, runcard_name: str = 'runcard', is_warmup: bool = False, events: int = 10000, iterations: int = 1, output=PosixPath('.'), runcard_path=None)[source]
Generate a NNLOJET runcard given the metadata of the run in the folder defined by che channel name.
The output path of the runcard will be ./channel/runcard_name_{warmup/production}.run.
pinefarm.external.nnlojet.runner module
Provides a runner for NNLOJET.