From e0edfd890c9f3b72a30a7dbafbb7705beeff8197 Mon Sep 17 00:00:00 2001 From: jacoterh <54140851+jacoterh@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:13:27 +0100 Subject: [PATCH 1/3] Re-implementing Tevatron inc DY in new commondata format --- .../commondata/CDF_Z0_1P96TEV/data_ZRAP.yaml | 29 + .../commondata/CDF_Z0_1P96TEV/filter.py | 251 ++++++ .../CDF_Z0_1P96TEV/kinematics_ZRAP.yaml | 348 ++++---- .../commondata/CDF_Z0_1P96TEV/metadata.yaml | 55 +- .../rawdata/HEPData-ins856131-v1-Table_2.yaml | 152 ++++ .../rawdata/error_propagator_g++_032610.C | 830 ++++++++++++++++++ .../CDF_Z0_1P96TEV/rawdata/systematics.dat | 32 + .../CDF_Z0_1P96TEV/uncertainties_ZRAP.yaml | 386 ++++++++ .../D0_WPWM_1P96TEV/compatibility.py | 17 + .../commondata/D0_WPWM_1P96TEV/data_ASY.yaml | 11 + .../commondata/D0_WPWM_1P96TEV/filter.py | 223 +++++ .../D0_WPWM_1P96TEV/kinematics_ASY.yaml | 136 +-- .../commondata/D0_WPWM_1P96TEV/metadata.yaml | 49 +- .../HEPData-ins1253555-v1-Table_1.yaml | 98 +++ .../HEPData-ins1253555-v1-Table_3.yaml | 140 +++ .../D0_WPWM_1P96TEV/uncertainties_ASY.yaml | 114 +++ .../commondata/D0_Z0_1P96TEV/compatibility.py | 19 + .../commondata/D0_Z0_1P96TEV/data_ZRAP.yaml | 29 + .../commondata/D0_Z0_1P96TEV/filter.py | 195 ++++ .../D0_Z0_1P96TEV/kinematics_ZRAP.yaml | 348 ++++---- .../commondata/D0_Z0_1P96TEV/metadata.yaml | 99 +-- .../rawdata/HEPData-ins744624-v1-Table_1.yaml | 166 ++++ .../D0_Z0_1P96TEV/uncertainties_ZRAP.yaml | 66 ++ validphys2/src/validphys/commondataparser.py | 2 + validphys2/src/validphys/tests/conftest.py | 2 +- 25 files changed, 3280 insertions(+), 517 deletions(-) create mode 100644 nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/data_ZRAP.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/HEPData-ins856131-v1-Table_2.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/error_propagator_g++_032610.C create mode 100644 nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/systematics.dat create mode 100644 nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/uncertainties_ZRAP.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/compatibility.py create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/data_ASY.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/rawdata/HEPData-ins1253555-v1-Table_1.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/rawdata/HEPData-ins1253555-v1-Table_3.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/uncertainties_ASY.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/compatibility.py create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/data_ZRAP.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/rawdata/HEPData-ins744624-v1-Table_1.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/uncertainties_ZRAP.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/data_ZRAP.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/data_ZRAP.yaml new file mode 100644 index 0000000000..5c83e7c2ea --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/data_ZRAP.yaml @@ -0,0 +1,29 @@ +data_central: +- 69.46 +- 71.03 +- 71.1 +- 70.01 +- 67.97 +- 68.22 +- 66.58 +- 66.81 +- 65.05 +- 64.7 +- 62.74 +- 62.02 +- 58.8 +- 56.02 +- 53.37 +- 50.07 +- 46.59 +- 40.97 +- 37.04 +- 33.02 +- 27.65 +- 21.84 +- 18.35 +- 14.13 +- 8.8 +- 5.68 +- 2.93 +- 0.87 diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/filter.py b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/filter.py new file mode 100644 index 0000000000..edb6fb0434 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/filter.py @@ -0,0 +1,251 @@ +import pathlib + +import pandas +import pandas as pd +import yaml + +from nnpdf_data.filter_utils.utils import prettify_float + +yaml.add_representer(float, prettify_float) + +NB_POINTS = 28 +MZ_VALUE = 91.1876 # GeV +SQRT_S = 1_960.0 + + +def load_yaml(table_id: int, version: int = 1) -> dict: + """Load the HEP data table in yaml format. + + Parameters + ---------- + table_id: int + table ID number + + Returns + ------- + dict: + ditionary containing the table contents + + """ + filename = f"HEPData-ins856131-v{version}-Table_{table_id}" + table = pathlib.Path(f"./rawdata/{filename}.yaml") + + return yaml.safe_load(table.read_text()) + + +def get_kinematics(hepdata: dict) -> list: + """Read the version and list of tables from metadata. + + Parameters + ---------- + hepdata: dict + dictionary containing all data info + + Returns + ------- + tuple(int, list): + data version and list of hepdata tables + + """ + rapbins = hepdata["independent_variables"][0]["values"] + + kinematics = [] + for bins in range(NB_POINTS): + ymin = float(rapbins[bins]["low"]) + ymax = float(rapbins[bins]["high"]) + kin_value = { + "y": {"min": ymin, "mid": (ymin + ymax) / 2, "max": ymax}, + "m_Z2": {"min": None, "mid": MZ_VALUE**2, "max": None}, + "sqrts": {"min": None, "mid": SQRT_S, "max": None}, + } + kinematics.append(kin_value) + + return kinematics + + +def get_data_values(hepdata: dict, indx: int = 0) -> list: + """Extract the central values from the HepData yaml file. + + Parameters + ---------- + hepdata: dict + dictionary containing all data info + idx: int + index from which to read the central value, default=0 + + Returns + ------- + list: + list of dictionaries whose contents are the central values + + """ + central = hepdata["dependent_variables"][indx]["values"] + return [central[i]["value"] for i in range(NB_POINTS)] + + +def get_errors() -> dict: + """Extract the error values from the systematics.dat file. + + Returns + ------- + pandas.DataFrame: + dataframe whose contents are the various + source of uncertainties + + """ + + # read the systematics obtained using the c++ script from + # https://www-cdf.fnal.gov/physics/ewk/2009/dszdy/dszdy_sys.htm + columns = [ + 'y bin', + 'sigma', + 'stat.', + 'lum', + 'B(CC)', + 'B(CP)', + 'B(PP)', + 'CID', + 'PID', + 'CMat', + 'PMat', + 'ZVtx', + 'Trkeff', + 'NoTrk', + 'Tot errors', + ] + + errors = pd.read_csv("./rawdata/systematics.dat", sep='|', skiprows=3, names=columns) + + return errors + + +def read_metadata() -> tuple[int, int, list]: + """Read the version and list of tables from metadata. + + Returns + ------- + tuple(int, list): + data version and list of hepdata tables + + """ + metadata = pathlib.Path("./metadata.yaml") + content = yaml.safe_load(metadata.read_text()) + + version = content["hepdata"]["version"] + nb_datapoints = sum(content["implemented_observables"][0]["npoints"]) + tables = content["implemented_observables"][0]["tables"] + + return version, nb_datapoints, tables + + +def format_uncertainties(uncs: pandas.DataFrame) -> list: + """Format the uncertainties to be dumped into the yaml file. + + Parameters + ---------- + uncs: pandas.DataFrame + DataFrame containing the various source of uncertainties + + Returns + ------- + list: + list of dictionaries whose elements are the various errors + + """ + + combined_errors = [] + for _, row in uncs.iterrows(): + error_value = {} + error_value["stat"] = float(row["stat."]) + for i, sys_i in enumerate(row.iloc[3:-1]): + error_value[f"sys_corr_{i + 1}"] = sys_i + combined_errors.append(error_value) + + return combined_errors[:-1] + + +def dump_commondata(kinematics: list, data: list, errors: pandas.DataFrame) -> None: + """Function that generates and writes the commondata files. + + Parameters + ---------- + kinematics: list + list containing the kinematic values + data: list + list containing the central values + errors: pandas.DataFrame + DataFrame containing the different errors + + """ + + error_definition = { + "stat": { + "description": "Uncorrelated statistical uncertainties", + "treatment": "ADD", + "type": "UNCORR", + } + } + + for i, sys in enumerate(errors.columns[3:-1]): + error_definition[f"sys_corr_{i + 1}"] = { + "description": f"Systematic uncertainty {sys}", + "treatment": "MULT", + "type": "CORR", + } + + # update lumi entry + error_definition['sys_corr_1']['type'] = "CDFLUMI" + + error_definition["stat"] = { + "description": "Uncorrelated statistical uncertainties", + "treatment": "ADD", + "type": "UNCORR", + } + + errors_formatted = format_uncertainties(errors) + + with open("data_ZRAP.yaml", "w") as file: + yaml.dump({"data_central": data}, file, sort_keys=False) + + with open("kinematics_ZRAP.yaml", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + with open("uncertainties_ZRAP.yaml", "w") as file: + yaml.dump( + {"definitions": error_definition, "bins": errors_formatted}, file, sort_keys=False + ) + + +def main_filter() -> None: + """Main driver of the filter that produces commmondata. + + There are four main different sources of uncertainties. + + 1. Statistical uncertainties: ADD, UNCORR + + 2. Correlated Systematic uncertainties: MULT, CORR: + Obtained from a c++ script provided with the experimental paper 0908.3914 + + 4. Luminosity Systematic uncertainties: MULT, CDFLUMI + + """ + + yaml_content = load_yaml(table_id=2, version=1) + + kinematics = get_kinematics(yaml_content) + data_central = get_data_values(yaml_content) + uncertainties = get_errors() + + # correlations from https://inspirehep.net/literature/806697 + # compile using + # g++ -c error_propagator_g++_032610.C + # g++ error_propagator_g++_032610.o -o systematics + + # Generate all the necessary files + dump_commondata(kinematics, data_central, uncertainties) + + return + + +if __name__ == "__main__": + main_filter() diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/kinematics_ZRAP.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/kinematics_ZRAP.yaml index be0dc206ea..0a42cf271f 100644 --- a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/kinematics_ZRAP.yaml +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/kinematics_ZRAP.yaml @@ -1,337 +1,337 @@ bins: -- k1: - min: null +- y: + min: 0.0 mid: 0.05 - max: null - k2: + max: 0.1 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 0.15 - max: null - k2: +- y: + min: 0.1 + mid: 1.50000000e-01 + max: 0.2 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.2 mid: 0.25 - max: null - k2: + max: 0.3 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.3 mid: 0.35 - max: null - k2: + max: 0.4 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.4 mid: 0.45 - max: null - k2: + max: 0.5 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.5 mid: 0.55 - max: null - k2: + max: 0.6 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 0.65 - max: null - k2: +- y: + min: 0.6 + mid: 6.50000000e-01 + max: 0.7 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.7 mid: 0.75 - max: null - k2: + max: 0.8 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 0.85 - max: null - k2: +- y: + min: 0.8 + mid: 8.50000000e-01 + max: 0.9 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.9 mid: 0.95 - max: null - k2: + max: 1.0 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.0 mid: 1.05 - max: null - k2: + max: 1.1 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.1 mid: 1.15 - max: null - k2: + max: 1.2 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.2 mid: 1.25 - max: null - k2: + max: 1.3 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.3 mid: 1.35 - max: null - k2: + max: 1.4 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.4 mid: 1.45 - max: null - k2: + max: 1.5 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.5 mid: 1.55 - max: null - k2: + max: 1.6 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.6 mid: 1.65 - max: null - k2: + max: 1.7 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.7 mid: 1.75 - max: null - k2: + max: 1.8 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.8 mid: 1.85 - max: null - k2: + max: 1.9 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.9 mid: 1.95 - max: null - k2: + max: 2.0 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.0 mid: 2.05 - max: null - k2: + max: 2.1 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- y: + min: 2.1 + mid: 2.15000000e+00 + max: 2.2 + m_Z2: min: null - mid: 2.15 + mid: 8.31517839e+03 max: null - k2: - min: null - mid: 8315.17839376 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.2 mid: 2.25 - max: null - k2: + max: 2.3 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- y: + min: 2.3 + mid: 2.35000000e+00 + max: 2.4 + m_Z2: min: null - mid: 2.35 + mid: 8.31517839e+03 max: null - k2: - min: null - mid: 8315.17839376 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.4 mid: 2.45 - max: null - k2: + max: 2.5 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.5 mid: 2.55 - max: null - k2: + max: 2.6 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- y: + min: 2.6 + mid: 2.65000000e+00 + max: 2.7 + m_Z2: min: null - mid: 2.65 + mid: 8.31517839e+03 max: null - k2: - min: null - mid: 8315.17839376 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.7 mid: 2.8 - max: null - k2: + max: 2.9 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml index c50685ce79..356fdec42a 100644 --- a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml @@ -1,60 +1,61 @@ setname: CDF_Z0_1P96TEV -version: 1 -version_comment: Port of old commondata +version: 2 +version_comment: Implementation in the new format nnpdf_metadata: nnpdf31_process: DY NC experiment: CDF arXiv: - url: https://arxiv.org/abs/908.3914 + url: https://arxiv.org/abs/0908.3914 journal: Phys. Lett. B692 (2010) 232 iNSPIRE: - url: '' + url: https://inspirehep.net/literature/856131 hepdata: - url: '' - version: -1 + url: https://www.hepdata.net/record/ins856131 + version: 1 implemented_observables: - observable_name: ZRAP observable: description: Drell-Yan Rapidity Distribution label: CDF $Z$ rapidity (new) units: '' - process_type: EWK_RAP - tables: [] + process_type: DY_Z_Y + tables: [2] npoints: [] ndata: 28 plotting: - kinematics_override: ewk_rap_sqrt_scale + kinematics_override: identity dataset_label: CDF $Z$ rapidity (new) y_label: $d\sigma_{Z/\gamma^{*}}/dy$ (fb) - plot_x: k1 + plot_x: y kinematic_coverage: - - k1 - - k2 - - k3 + - y + - m_Z2 + - sqrts kinematics: variables: - k1: - description: Variable k1 - label: k1 - units: '' - k2: - description: Variable k2 - label: k2 - units: '' - k3: - description: Variable k3 - label: k3 - units: '' + y: + description: "e^+ e^- rapidity" + label: $|y|$ + units: "" + m_Z2: + description: "Z mass squared" + label: $M_Z^2$ + units: $GeV^2$ + sqrts: + description: "Center of mass energy" + label: $\sqrt{s}$ + units: $GeV$ file: kinematics_ZRAP.yaml theory: conversion_factor: 1.0 operation: 'null' FK_tables: - - CDFZRAP_NEW-CDF_ZRAP_MCgrid_500M_last_two_bins_combined - data_uncertainties: [] + data_uncertainties: + - uncertainties_ZRAP.yaml variants: legacy: data_uncertainties: - uncertainties_legacy_ZRAP.yaml - data_central: data_legacy_ZRAP.yaml + data_central: data_ZRAP.yaml ported_from: CDFZRAP_NEW diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/HEPData-ins856131-v1-Table_2.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/HEPData-ins856131-v1-Table_2.yaml new file mode 100644 index 0000000000..a5f9bc4699 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/HEPData-ins856131-v1-Table_2.yaml @@ -0,0 +1,152 @@ +dependent_variables: +- header: {name: D(SIG)/YRAP, units: PB} + qualifiers: + - {name: ' M(P=3_4) in GEV', value: 66.0-116.0} + - {name: RE, value: PBAR P --> E+ E- X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + values: + - errors: + - {label: stat, symerror: 0.73} + - {label: sys, symerror: 0.49} + value: 69.46 + - errors: + - {label: stat, symerror: 0.74} + - {label: sys, symerror: 0.49} + value: 71.03 + - errors: + - {label: stat, symerror: 0.74} + - {label: sys, symerror: 0.49} + value: 71.1 + - errors: + - {label: stat, symerror: 0.72} + - {label: sys, symerror: 0.48} + value: 70.01 + - errors: + - {label: stat, symerror: 0.7} + - {label: sys, symerror: 0.47} + value: 67.97 + - errors: + - {label: stat, symerror: 0.7} + - {label: sys, symerror: 0.47} + value: 68.22 + - errors: + - {label: stat, symerror: 0.69} + - {label: sys, symerror: 0.47} + value: 66.58 + - errors: + - {label: stat, symerror: 0.7} + - {label: sys, symerror: 0.48} + value: 66.81 + - errors: + - {label: stat, symerror: 0.69} + - {label: sys, symerror: 0.49} + value: 65.05 + - errors: + - {label: stat, symerror: 0.69} + - {label: sys, symerror: 0.5} + value: 64.7 + - errors: + - {label: stat, symerror: 0.67} + - {label: sys, symerror: 0.5} + value: 62.74 + - errors: + - {label: stat, symerror: 0.66} + - {label: sys, symerror: 0.49} + value: 62.02 + - errors: + - {label: stat, symerror: 0.65} + - {label: sys, symerror: 0.48} + value: 58.8 + - errors: + - {label: stat, symerror: 0.65} + - {label: sys, symerror: 0.43} + value: 56.02 + - errors: + - {label: stat, symerror: 0.63} + - {label: sys, symerror: 0.4} + value: 53.37 + - errors: + - {label: stat, symerror: 0.62} + - {label: sys, symerror: 0.37} + value: 50.07 + - errors: + - {label: stat, symerror: 0.61} + - {label: sys, symerror: 0.35} + value: 46.59 + - errors: + - {label: stat, symerror: 0.58} + - {label: sys, symerror: 0.34} + value: 40.97 + - errors: + - {label: stat, symerror: 0.56} + - {label: sys, symerror: 0.33} + value: 37.04 + - errors: + - {label: stat, symerror: 0.55} + - {label: sys, symerror: 0.31} + value: 33.02 + - errors: + - {label: stat, symerror: 0.52} + - {label: sys, symerror: 0.25} + value: 27.65 + - errors: + - {label: stat, symerror: 0.49} + - {label: sys, symerror: 0.23} + value: 21.84 + - errors: + - {label: stat, symerror: 0.5} + - {label: sys, symerror: 0.2} + value: 18.35 + - errors: + - {label: stat, symerror: 0.49} + - {label: sys, symerror: 0.17} + value: 14.13 + - errors: + - {label: stat, symerror: 0.45} + - {label: sys, symerror: 0.1} + value: 8.8 + - errors: + - {label: stat, symerror: 0.44} + - {label: sys, symerror: 0.09} + value: 5.68 + - errors: + - {label: stat, symerror: 0.41} + - {label: sys, symerror: 0.15} + value: 2.93 + - errors: + - {label: stat, symerror: 0.22} + - {label: sys, symerror: 0.11} + value: 0.87 + - {value: '-'} +independent_variables: +- header: {name: YRAP} + values: + - {high: 0.1, low: 0.0} + - {high: 0.2, low: 0.1} + - {high: 0.3, low: 0.2} + - {high: 0.4, low: 0.3} + - {high: 0.5, low: 0.4} + - {high: 0.6, low: 0.5} + - {high: 0.7, low: 0.6} + - {high: 0.8, low: 0.7} + - {high: 0.9, low: 0.8} + - {high: 1.0, low: 0.9} + - {high: 1.1, low: 1.0} + - {high: 1.2, low: 1.1} + - {high: 1.3, low: 1.2} + - {high: 1.4, low: 1.3} + - {high: 1.5, low: 1.4} + - {high: 1.6, low: 1.5} + - {high: 1.7, low: 1.6} + - {high: 1.8, low: 1.7} + - {high: 1.9, low: 1.8} + - {high: 2.0, low: 1.9} + - {high: 2.1, low: 2.0} + - {high: 2.2, low: 2.1} + - {high: 2.3, low: 2.2} + - {high: 2.4, low: 2.3} + - {high: 2.5, low: 2.4} + - {high: 2.6, low: 2.5} + - {high: 2.7, low: 2.6} + - {high: 2.9, low: 2.7} + - {high: 3.0, low: 2.9} diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/error_propagator_g++_032610.C b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/error_propagator_g++_032610.C new file mode 100644 index 0000000000..1070a7a9cb --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/error_propagator_g++_032610.C @@ -0,0 +1,830 @@ +#include +#include +#include +#include +#include + +void function_sys( std::vector, std::vector ); +double material_estimator( double, double ); + +int main() +{ + int size = 11; + std::vector onpar(11); + std::vector sdev(11); + + //turning on the parameters + onpar[0]=1; // luminosity + onpar[1]=1; // Background of Z(CC) + onpar[2]=1; // Background of Z(CP) + onpar[3]=1; // Background of Z(PP) + onpar[4]=1; // Central Electron ID Efficiency + onpar[5]=1; // Plug Electron ID Efficiency + onpar[6]=1; // Central Material Effect + onpar[7]=1; // Plug Material Effect + onpar[8]=1; // ZVertex Finding Efficiency in Z(PP) + onpar[9]=1; // Electron Tracking Efficiency + onpar[10]=1; // No Track Events Fraction + + //setting what sigma(uncertainty) will be deviated from the central value + sdev[0]=1; // luminosity + sdev[1]=1; // Background of Z(CC) + sdev[2]=1; // Background of Z(CP) + sdev[3]=1; // Background of Z(PP) + sdev[4]=1; // Central Electron ID Efficiency + sdev[5]=1; // Plug Electron ID Efficiency + sdev[6]=1; // Central Material Effect + sdev[7]=1; // Plug Material Effect + sdev[8]=1; // ZVertex Finding Efficiency in Z(PP) + sdev[9]=1; // Electron Tracking Efficiency + sdev[10]=1; // No Track Events Fraction + + function_sys(onpar,sdev); + + return 0; +} + + +void function_sys(std::vector onpar, std::vector sdev) +{ + std::cout.setf(std::ios::right); + std::cout.setf(std::ios::fixed); + std::cout.precision(4); + + //double a[10]; + //for(int i=0; i<10; i++) a[i] = onpar[i]; + + //dsigma/dy = (N(CC)-B(CC) + N(CP)-B(CP) + N(PP)-B(PP))/(L1*(A(CC)*E(CC) + A(CP)+E(CP)) + L2*(A(PP)*E(PP))); + + //independent systematic parameters : + //B(CC), B(CP), B(PP), Luminosity, zvertex finding efficiency in Z(PP) - global factor - related in data + //Electron ID efficiency - Z(PP) efficiency has a correlation with tracking + //However, systematic uncertainty from Z(PP) ID efficiency is pretty small compared to BKG and tracking + //Ignore the correlation + //Material effect + + const int nbin=60; + const int anbin=29; + + //parameter : 1(luminosity), 2(bkg,CC), 3(bkg,CP), 4(bkg,PP), 5(ID,cen),6(ID,plg), 7(tracking), 8(material,cen), 9(material,plg), 10(zvtx,pp) + //parameter : 8 and 9 is relatively small compared to other sources + + double par[11][anbin]; + double fpar[11][anbin]; + + double ybin[anbin]={0.05,0.15,0.25,0.35,0.45,0.55,0.65,0.75,0.85,0.95, + 1.05,1.15,1.25,1.35,1.45,1.55,1.65,1.75,1.85,1.95, + 2.05,2.15,2.25,2.35,2.45,2.55,2.65,2.80,2.95}; + + //update dsb, statber, dsc, statcer variables - done + double dsb[anbin] = {69.4600,71.0200,71.1000,70.0000,67.9600,68.2200,66.5700,66.8000,65.0400,64.6900, + 62.7300,62.0100,58.7900,56.0100,53.3500,50.0600,46.5800,40.9500,37.0200,33.0100, + 27.6500,21.8400,18.3700,14.1500,8.8300,5.7100,2.9600,0.9800,0.0000}; + + double statber[anbin] = {0.7300,0.7400,0.7400,0.7200,0.7000,0.7000,0.6900,0.7000,0.6900,0.6900, + 0.6700,0.6600,0.6500,0.6400,0.6300,0.6200,0.6100,0.5800,0.5600,0.5400, + 0.5200,0.4900,0.5000,0.4900,0.4500,0.4400,0.4200,0.2400,0.0000}; + + double dsc[anbin] = {69.4600,71.0300,71.1000,70.0100,67.9700,68.2200,66.5800,66.8100,65.0500,64.7000, + 62.7400,62.0200,58.8000,56.0200,53.3700,50.0700,46.5900,40.9700,37.0400,33.0200, + 27.6500,21.8400,18.3500,14.1300,8.8000,5.6800,2.9300,0.8700,0.0000}; + + double statcer[anbin] = {0.7300,0.7400,0.7400,0.7200,0.7000,0.7000,0.6900,0.7000,0.6900,0.6900, + 0.6700,0.6600,0.6500,0.6500,0.6300,0.6200,0.6100,0.5800,0.5600,0.5500, + 0.5200,0.4900,0.5000,0.4900,0.4500,0.4400,0.4100,0.2200,0.0000}; + + //updated ccae, cpae, ppae variables - done + double ccae[anbin] = {61.0051,57.4238,52.2712,46.6792,41.4192,35.9921,29.6032,21.6251,13.0452,5.7929, + 1.3385,0.1065,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000, + 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000}; + + double cpae[anbin] = {3.8667,7.1292,13.1334,20.2847,27.2365,33.4682,39.6970,46.7947,55.2346,63.1290, + 68.3174,68.7588,62.4287,53.5676,44.0268,33.8775,24.1684,14.9936,7.6672,3.0117, + 0.7882,0.1601,0.0229,0.0024,0.0000,0.0000,0.0000,0.0000,0.0000}; + + double ppae[anbin] = {0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000, + 0.1782,1.7397,6.3871,13.7704,22.6130,31.2902,39.2474,45.8678,50.7515,52.5825, + 50.7816,44.9740,37.3944,29.1556,21.8660,14.5217,8.5037,4.11623,0.0000}; + + + double ncc[anbin]={8510.0,8140.0,7420.0,6603.0,5679.0,4906.0,3936.0,2943.0,1684.0,764.0, + 155.0,12.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; + + double ncp[anbin]={564.0,1093.0,1956.0,2868.0,3754.0,4693.0,5425.0,6335.0,7346.0,8301.0, + 8736.0,8696.0,7513.0,6120.0,4812.0,3505.0,2313.0,1276.0,610.0,223.0, + 51.0,13.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; + + double npp[anbin]={0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 24.0,219.0,750.0,1611.0,2495.0,3223.0,3805.0,3930.0,3900.0,3601.0,2894.0, + 2046.0,1428.0,851.0,396.0,171.0,54.0,17.0,0.0}; + + double dev[anbin]; + double mdev[anbin]; + double pdev[anbin]; + + double devf[anbin]; + double mdevf[anbin]; + double pdevf[anbin]; + + //luminosity effect : 6% uncertainty in luminosity factor - global effect in total lum (L1 and L2) + double lum_dev[anbin]; + + for(int i=0; i global shift in total rate + + if(ncc[i]<(accb[i]+atcc[i])) atcc[i]=0.0; + if(ncp[i]<(acpb[i]+atcp[i])) atcp[i]=0.0; + if(npp[i]<(appb[i]+atpp[i])) atpp[i]=0.0; + + if((ccae[i]+cpae[i]+ppae[i])!=0.0) bkgcc_dev[i] = -1.0*atcc[i]*sdev[1]/(ccae[i]+cpae[i]+ppae[i]); + else bkgcc_dev[i] = 0.0; + + if((ccae[i]+cpae[i]+ppae[i])!=0.0) bkgcp_dev[i] = -1.0*atcp[i]*sdev[2]/(ccae[i]+cpae[i]+ppae[i]); + else bkgcp_dev[i] = 0.0; + + if((ccae[i]+cpae[i]+ppae[i])!=0.0) bkgpp_dev[i] = -1.0*atpp[i]*sdev[3]/(ccae[i]+cpae[i]+ppae[i]); + else bkgpp_dev[i] = 0.0; + + par[1][i]=bkgcc_dev[i]; + par[2][i]=bkgcp_dev[i]; + par[3][i]=bkgpp_dev[i]; + + sumdev[i] = sqrt(bkgcc_dev[i]*bkgcc_dev[i] + bkgcp_dev[i]*bkgcp_dev[i] + bkgpp_dev[i]*bkgpp_dev[i]); + + } + + //central electron efficiencies in Z(CC) and Z(CP) are 100 % correlated + //plug electron efficiencies in Z(CP) and Z(PP) are 100 % correlated + //all bin by bin has 100 % correlation - global scale factor applied + + double cceff[anbin] = {0.9064,0.9068,0.9029,0.9015,0.9016,0.9032,0.9066,0.9083,0.9149,0.9121, + 0.9089,0.8993,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000, + 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000}; + + double cceffer[anbin] = {0.0037,0.0037,0.0037,0.0037,0.0037,0.0037,0.0037,0.0037,0.0038,0.0038, + 0.0037,0.0037,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000, + 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000}; + + double cpeff[anbin] = {0.7061,0.7080,0.7188,0.7235,0.7208,0.7201,0.7170,0.7128,0.7120,0.7045, + 0.6982,0.6910,0.6812,0.6696,0.6522,0.6338,0.6174,0.6026,0.5962,0.5823, + 0.5730,0.5827,0.5396,0.9395,0.0000,0.0000,0.0000,0.0000,0.0000}; + + double cpeffcer[anbin] = {0.0029,0.0029,0.0029,0.0029,0.0029,0.0029,0.0029,0.0029,0.0029,0.0029, + 0.0028,0.0028,0.0028,0.0027,0.0026,0.0026,0.0025,0.0024,0.0024,0.0023, + 0.0023,0.0023,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000}; + + double cpeffper[anbin] = {0.0034,0.0034,0.0035,0.0035,0.0035,0.0035,0.0034,0.0034,0.0034,0.0034, + 0.0034,0.0033,0.0033,0.0032,0.0031,0.0030,0.0030,0.0029,0.0029,0.0028, + 0.0028,0.0028,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000}; + + double ppeff[anbin] = {0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000, + 0.8026,0.7848,0.7834,0.7793,0.7810,0.7802,0.7778,0.7706,0.7545,0.7436, + 0.7351,0.7294,0.7257,0.7221,0.7191,0.7210,0.6856,0.6272,0.0000}; + + double ppeffer[anbin] = {0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000, + 0.0059,0.0045,0.0036,0.0028,0.0021,0.0018,0.0016,0.0014,0.0013,0.0013, + 0.0013,0.0013,0.0014,0.0015,0.0017,0.0019,0.0019,0.0029,0.0000}; + + double ccfer[anbin]; + double cpcfer[anbin]; + double cppfer[anbin]; + double ppfer[anbin]; + + double cpfer[anbin]; + + double id_dev[anbin]; + double cid_dev[anbin]; + double pid_dev[anbin]; + + for(int i=0; i=10) std::cout<<" " <=0) std::cout <<" "<=0) std::cout <<" "<SetFillColor(10); + + TLatex lat_comp; + lat_comp.SetTextSize(0.06); + lat_comp.SetTextColor(1); + + TLine *l1 = new TLine(0.0,0.0,3.0,0.0); + l1->SetLineWidth(2); + + TCanvas * Zee_comp1 = new TCanvas("Zee_comp1","Systematic Deviation",1200,900); + Zee_comp1->Divide(4,3); + Zee_comp1->SetFillColor(10); + Zee_comp1->SetFillStyle(4000); + + TGraph *syscomp[11]; + + for(int t=0; t<11; t++){ + + syscomp[t] = new TGraph(anbin,ybin,par[t]); + + Zee_comp1->cd(t+1); + + TPad * padmr = new TPad("padm","y",0.0,0.0,1.0,1.0,10); + padmr->Draw(); + padmr->cd(); + if(t==0){ + padmr->Range(0.0,-5.0,3.0,5.0); + padmr->DrawFrame(0.0,-5.0,3.0,5.0); + }else{ + padmr->Range(0.0,-1.0,3.0,1.0); + padmr->DrawFrame(0.0,-1.0,3.0,1.0); + } + padmr->GetFrame()->SetFillColor(10); + padmr->SetLeftMargin(0.18); + padmr->SetTopMargin(0.1); + padmr->SetBottomMargin(0.15); + padmr->SetGrid(); + + TH1 *hframe = new TH1F("hframe","",1000,0.0,3.0); + if(t==0){ + hframe->SetMinimum(-5.0); + hframe->SetMaximum(5.0); + }else{ + hframe->SetMinimum(-1.0); + hframe->SetMaximum(1.0); + } + + hframe->SetDirectory(0); + hframe->SetStats(0); + hframe->GetXaxis()->CenterTitle(1); + hframe->GetYaxis()->CenterTitle(1); + hframe->GetXaxis()->SetTitle("Boson Rapidity"); + hframe->GetYaxis()->SetTitle("#Delta #sigma_{i}"); + hframe->GetXaxis()->SetTitleSize(0.05); + hframe->GetYaxis()->SetTitleSize(0.07); + hframe->GetYaxis()->SetTitleOffset(1.0); + hframe->Draw("a"); + + if(t==0) lat_comp.DrawLatex(1.0,3.5,"Luminosity"); + else if(t==1) lat_comp.DrawLatex(1.0,0.7,"CC Bkg"); + else if(t==2) lat_comp.DrawLatex(1.0,0.7,"CP Bkg"); + else if(t==3) lat_comp.DrawLatex(1.0,0.7,"PP Bkg"); + else if(t==4) lat_comp.DrawLatex(1.0,0.7,"Cen ID"); + else if(t==5) lat_comp.DrawLatex(1.0,0.7,"Plg ID"); + else if(t==6) lat_comp.DrawLatex(1.0,0.7,"Cen Mat"); + else if(t==7) lat_comp.DrawLatex(1.0,0.7,"Plg Mat"); + else if(t==8) lat_comp.DrawLatex(1.0,0.7,"ZVtx"); + else if(t==9) lat_comp.DrawLatex(1.0,0.7,"Trk Efficiency"); + else if(t==10) lat_comp.DrawLatex(1.0,0.7,"No Trk Fraction"); + + if(onpar[t]==1){ + syscomp[t]->SetLineColor(4); + syscomp[t]->SetLineWidth(2); + syscomp[t]->SetMarkerColor(4); + syscomp[t]->Draw("CP"); + l1->Draw(); + }else lat_comp.DrawLatex(0.7,0.0,"No Contribution"); + + } + + Zee_comp1->cd(12); + TPad * padmr = new TPad("padm","y",0.0,0.0,1.0,1.0,10); + padmr->Draw(); + padmr->cd(); + + + TCanvas * Zee_comp2 = new TCanvas("Zee_comp2","Systematic Fraction",1200,900); + Zee_comp2->Divide(4,3); + Zee_comp2->SetFillColor(10); + Zee_comp2->SetFillStyle(4000); + + TGraph *syscompf[11]; + + for(int t=0; t<11; t++){ + + syscompf[t] = new TGraph(anbin,ybin,fpar[t]); + + Zee_comp2->cd(t+1); + + TPad * padmr = new TPad("padm","y",0.0,0.0,1.0,1.0,10); + padmr->Draw(); + padmr->cd(); + if(t==0 || t==3){ + padmr->Range(0.0,-0.1,3.0,0.1); + padmr->DrawFrame(0.0,-0.1,3.0,0.1); + }else{ + padmr->Range(0.0,-0.015,3.0,0.015); + padmr->DrawFrame(0.0,-0.015,3.0,0.015); + } + padmr->GetFrame()->SetFillColor(10); + padmr->SetLeftMargin(0.18); + padmr->SetTopMargin(0.1); + padmr->SetBottomMargin(0.15); + padmr->SetGrid(); + + TH1 *hframe = new TH1F("hframe","",1000,0.0,3.0); + if(t==0 || t==3){ + hframe->SetMinimum(-0.1); + hframe->SetMaximum(0.1); + }else{ + hframe->SetMinimum(-0.02); + hframe->SetMaximum(0.02); + } + + hframe->SetDirectory(0); + hframe->SetStats(0); + hframe->GetXaxis()->CenterTitle(1); + hframe->GetYaxis()->CenterTitle(1); + hframe->GetXaxis()->SetTitle("Boson Rapidity"); + hframe->GetYaxis()->SetTitle("#Delta #sigma_{i}/#sigma_{i}"); + hframe->GetXaxis()->SetTitleSize(0.05); + hframe->GetYaxis()->SetTitleSize(0.07); + hframe->GetYaxis()->SetTitleOffset(1.1); + hframe->Draw("a"); + + if(t==0) lat_comp.DrawLatex(1.0,0.07,"Luminosity"); + else if(t==1) lat_comp.DrawLatex(1.0,0.014,"CC Bkg"); + else if(t==2) lat_comp.DrawLatex(1.0,0.014,"CP Bkg"); + else if(t==3) lat_comp.DrawLatex(1.0,0.070,"PP Bkg"); + else if(t==4) lat_comp.DrawLatex(1.0,0.014,"Cen ID"); + else if(t==5) lat_comp.DrawLatex(1.0,0.014,"Plg ID"); + else if(t==6) lat_comp.DrawLatex(1.0,0.014,"Cen Mat"); + else if(t==7) lat_comp.DrawLatex(1.0,0.014,"Plg Mat"); + else if(t==8) lat_comp.DrawLatex(1.0,0.014,"ZVtx"); + else if(t==9) lat_comp.DrawLatex(1.0,0.014,"Trk Efficiency"); + else if(t==10) lat_comp.DrawLatex(1.0,0.014,"No Trk Fraction"); + + if(onpar[t]==1){ + syscompf[t]->SetLineColor(4); + syscompf[t]->SetLineWidth(2); + syscompf[t]->SetMarkerColor(4); + syscompf[t]->Draw("CP"); + l1->Draw(); + }else lat_comp.DrawLatex(0.7,0.0,"No Contribution"); + + } + + Zee_comp2->cd(12); + TPad * padmr = new TPad("padm","y",0.0,0.0,1.0,1.0,10); + padmr->Draw(); + padmr->cd(); + + + TCanvas * Zee = new TCanvas("Zee","Zee anal",550,800); + Zee->Divide(1,2); + Zee->SetFillColor(10); + Zee->SetFillStyle(4000); + + TGraph * psysgrp = new TGraph(anbin,ybin,pdev); + TGraph * msysgrp = new TGraph(anbin,ybin,mdev); + TGraph * pstsgrp = new TGraph(anbin,ybin,pstat); + TGraph * mstsgrp = new TGraph(anbin,ybin,mstat); + + TGraph * psysgrpf = new TGraph(anbin,ybin,pdevf); + TGraph * msysgrpf = new TGraph(anbin,ybin,mdevf); + TGraph * pstsgrpf = new TGraph(anbin,ybin,fpstat); + TGraph * mstsgrpf = new TGraph(anbin,ybin,fmstat); + + Zee->cd(1); + TPad * padmr = new TPad("padm","y",0.0,0.0,1.0,1.0,10); + padmr->Draw(); + padmr->cd(); + if(onpar[0]==1){ + padmr->Range(0.0,-5.0,3.0,5.0); + padmr->DrawFrame(0.0,-5.0,3.0,5.0); + }else{ + padmr->Range(0.0,-1.0,3.0,1.0); + padmr->DrawFrame(0.0,-1.0,3.0,1.0); + } + padmr->GetFrame()->SetFillColor(10); + padmr->SetLeftMargin(0.18); + padmr->SetRightMargin(0.15); + padmr->SetTopMargin(0.1); + padmr->SetBottomMargin(0.15); + padmr->SetGrid(); + + TH1 *hframe = new TH1F("hframe","",1000,0.0,3.0); + if(onpar[0]==1){ + hframe->SetMinimum(-5.0); + hframe->SetMaximum(5.0); + }else{ + hframe->SetMinimum(-1.0); + hframe->SetMaximum(1.0); + } + hframe->SetDirectory(0); + hframe->SetStats(0); + hframe->GetXaxis()->CenterTitle(1); + hframe->GetYaxis()->CenterTitle(1); + hframe->GetXaxis()->SetTitle("Boson Rapidity"); + hframe->GetYaxis()->SetTitle("#Delta #sigma_{i}"); + hframe->GetXaxis()->SetTitleSize(0.05); + hframe->GetYaxis()->SetTitleSize(0.07); + hframe->GetYaxis()->SetTitleOffset(0.8); + hframe->Draw("a"); + + psysgrp->SetLineColor(4); + psysgrp->SetLineWidth(2); + psysgrp->SetMarkerColor(4); + psysgrp->Draw("CP"); + + msysgrp->SetLineColor(4); + msysgrp->SetLineWidth(2); + msysgrp->SetMarkerColor(4); + msysgrp->Draw("CP"); + + pstsgrp->SetLineColor(2); + pstsgrp->SetLineStyle(2); + pstsgrp->SetLineWidth(2); + pstsgrp->SetMarkerColor(2); + pstsgrp->Draw("CP"); + + mstsgrp->SetLineColor(2); + mstsgrp->SetLineStyle(2); + mstsgrp->SetLineWidth(2); + mstsgrp->SetMarkerColor(2); + mstsgrp->Draw("CP"); + + TLine *l1 = new TLine(0.0,0.0,3.0,0.0); + l1->SetLineWidth(2); + l1->Draw(); + + TLatex lat; + lat.SetTextSize(0.03); + lat.SetTextColor(1); + if(onpar[0]==1){ + if(onpar[0]==1) lat.DrawLatex(3.05,4.5,"Luminosity"); + if(onpar[1]==1) lat.DrawLatex(3.05,4.0,"CC Bkg"); + if(onpar[2]==1) lat.DrawLatex(3.05,3.5,"CP Bkg"); + if(onpar[3]==1) lat.DrawLatex(3.05,3.0,"PP Bkg"); + if(onpar[4]==1) lat.DrawLatex(3.05,2.5,"Cen ID"); + if(onpar[5]==1) lat.DrawLatex(3.05,2.0,"Plg ID"); + if(onpar[6]==1) lat.DrawLatex(3.05,1.0,"Cen Mat"); + if(onpar[7]==1) lat.DrawLatex(3.05,0.5,"Plg Mat"); + if(onpar[8]==1) lat.DrawLatex(3.05,0.0,"ZVtx"); + if(onpar[9]==1) lat.DrawLatex(3.05,1.5,"Tracking"); + if(onpar[10]==1) lat.DrawLatex(3.05,1.5,"Tracking"); + }else{ + if(onpar[1]==1) lat.DrawLatex(3.05,0.8,"CC Bkg"); + if(onpar[2]==1) lat.DrawLatex(3.05,0.7,"CP Bkg"); + if(onpar[3]==1) lat.DrawLatex(3.05,0.6,"PP Bkg"); + if(onpar[4]==1) lat.DrawLatex(3.05,0.5,"Cen ID"); + if(onpar[5]==1) lat.DrawLatex(3.05,0.4,"Plg ID"); + if(onpar[6]==1) lat.DrawLatex(3.05,0.2,"Cen Mat"); + if(onpar[7]==1) lat.DrawLatex(3.05,0.1,"Plg Mat"); + if(onpar[8]==1) lat.DrawLatex(3.05,0.0,"ZVtx"); + if(onpar[9]==1) lat.DrawLatex(3.05,0.3,"Tracking"); + if(onpar[10]==1) lat.DrawLatex(3.05,0.3,"Tracking"); + } + + TLegend * tld = new TLegend(0.5,0.8,0.84,0.95); + tld->SetBorderSize(0); + tld->SetFillColor(10); + tld->AddEntry(psysgrp,"Systematic Error","l"); + tld->AddEntry(pstsgrp,"Statistic Error","l"); + tld->Draw(); + + Zee->cd(2); + TPad * padmr = new TPad("padm","y",0.0,0.0,1.0,1.0,10); + padmr->Draw(); + padmr->cd(); + if(onpar[0]==1){ + padmr->Range(0.0,-0.20,3.0,0.20); + padmr->DrawFrame(0.0,-0.20,3.0,0.20); + }else{ + padmr->Range(0.0,-0.01,3.0,0.01); + padmr->DrawFrame(0.0,-0.01,3.0,0.01); + } + padmr->GetFrame()->SetFillColor(10); + padmr->SetLeftMargin(0.18); + padmr->SetRightMargin(0.15); + padmr->SetTopMargin(0.1); + padmr->SetBottomMargin(0.15); + padmr->SetGrid(); + + TH1 *hframe = new TH1F("hframe","",1000,0.0,3.0); + if(onpar[0]==1 || onpar[3]==1 || onpar[6]==1){ + hframe->SetMinimum(-0.20); + hframe->SetMaximum(0.20); + }else{ + hframe->SetMinimum(-0.01); + hframe->SetMaximum(0.01); + } + hframe->SetDirectory(0); + hframe->SetStats(0); + hframe->GetXaxis()->CenterTitle(1); + hframe->GetYaxis()->CenterTitle(1); + hframe->GetXaxis()->SetTitle("Boson Rapidity"); + hframe->GetYaxis()->SetTitle("#Delta #sigma_{i}/#sigma_{i}"); + hframe->GetXaxis()->SetTitleSize(0.05); + hframe->GetYaxis()->SetTitleSize(0.07); + hframe->GetYaxis()->SetTitleOffset(0.8); + hframe->Draw("a"); + + psysgrpf->SetLineColor(4); + psysgrpf->SetLineWidth(2); + psysgrpf->SetMarkerColor(4); + psysgrpf->Draw("CP"); + + msysgrpf->SetLineColor(4); + msysgrpf->SetLineWidth(2); + msysgrpf->SetMarkerColor(4); + msysgrpf->Draw("CP"); + + pstsgrpf->SetLineColor(2); + pstsgrpf->SetLineStyle(2); + pstsgrpf->SetLineWidth(2); + pstsgrpf->SetMarkerColor(2); + pstsgrpf->Draw("CP"); + + mstsgrpf->SetLineColor(2); + mstsgrpf->SetLineStyle(2); + mstsgrpf->SetLineWidth(2); + mstsgrpf->SetMarkerColor(2); + mstsgrpf->Draw("CP"); + + l1->Draw(); + + if(onpar[0]==1 || onpar[3]==1 || onpar[6]==1){ + if(onpar[0]==1) lat.DrawLatex(3.05,0.20-0.20*0.1,"Luminosity"); + if(onpar[1]==1) lat.DrawLatex(3.05,0.20-0.20*0.2,"CC Bkg"); + if(onpar[2]==1) lat.DrawLatex(3.05,0.20-0.20*0.3,"CP Bkg"); + if(onpar[3]==1) lat.DrawLatex(3.05,0.20-0.20*0.4,"PP Bkg"); + if(onpar[4]==1) lat.DrawLatex(3.05,0.20-0.20*0.5,"Cen ID"); + if(onpar[5]==1) lat.DrawLatex(3.05,0.20-0.20*0.6,"Plg ID"); + if(onpar[6]==1) lat.DrawLatex(3.05,0.20-0.20*0.8,"Cen Mat"); + if(onpar[7]==1) lat.DrawLatex(3.05,0.20-0.20*0.9,"Plg Mat"); + if(onpar[8]==1) lat.DrawLatex(3.05,0.20-0.20*1.0,"ZVtx"); + if(onpar[9]==1) lat.DrawLatex(3.05,0.20-0.20*0.7,"Tracking"); + if(onpar[10]==1) lat.DrawLatex(3.05,0.20-0.20*0.7,"Tracking"); + }else{ + if(onpar[1]==1) lat.DrawLatex(3.05,0.01-0.01*0.2,"CC Bkg"); + if(onpar[2]==1) lat.DrawLatex(3.05,0.01-0.01*0.3,"CP Bkg"); + if(onpar[3]==1) lat.DrawLatex(3.05,0.01-0.01*0.4,"PP Bkg"); + if(onpar[4]==1) lat.DrawLatex(3.05,0.01-0.01*0.5,"Cen ID"); + if(onpar[5]==1) lat.DrawLatex(3.05,0.01-0.01*0.6,"Plg ID"); + if(onpar[6]==1) lat.DrawLatex(3.05,0.01-0.01*0.8,"Cen Mat"); + if(onpar[7]==1) lat.DrawLatex(3.05,0.01-0.01*0.9,"Plg Mat"); + if(onpar[8]==1) lat.DrawLatex(3.05,0.01-0.01*1.0,"ZVtx"); + if(onpar[9]==1) lat.DrawLatex(3.05,0.01-0.01*0.7,"Tracking"); + if(onpar[10]==1) lat.DrawLatex(3.05,0.01-0.01*0.7,"Tracking"); + } + +} +#endif + diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/systematics.dat b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/systematics.dat new file mode 100644 index 0000000000..80afe7042f --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/rawdata/systematics.dat @@ -0,0 +1,32 @@ +--------------------------------------------------------------------------------------------------------------------------------------------------------- + y bin | sigma | stat. | lum | B(CC) | B(CP) | B(PP) | CID | PID | CMat | PMat | ZVtx | Trkeff | NoTrk | Tot errors +--------------------------------------------------------------------------------------------------------------------------------------------------------- + 0.0500 | 69.4600 | 0.7300 | -4.1676 | -0.0220 | -0.0302 | 0.0000 | -0.2836 | -0.0199 | 0.3220 | 0.2334 | 0.0000 | 0.0000 | 0.0000 | 4.1963 + 0.1500 | 71.0300 | 0.7400 | -4.2618 | -0.0210 | -0.0391 | 0.0000 | -0.2899 | -0.0377 | 0.3169 | 0.2313 | 0.0000 | 0.0000 | 0.0000 | 4.2900 + 0.2500 | 71.1000 | 0.7400 | -4.2660 | -0.0187 | -0.0655 | 0.0000 | -0.2905 | -0.0695 | 0.3048 | 0.2241 | 0.0000 | 0.0000 | 0.0000 | 4.2937 + 0.3500 | 70.0100 | 0.7200 | -4.2006 | -0.0172 | -0.0905 | 0.0000 | -0.2853 | -0.1026 | 0.2880 | 0.2134 | 0.0000 | 0.0000 | 0.0000 | 4.2278 + 0.4500 | 67.9700 | 0.7000 | -4.0782 | -0.0138 | -0.1078 | 0.0000 | -0.2768 | -0.1309 | 0.2677 | 0.2002 | 0.0000 | 0.0000 | 0.0000 | 4.1048 + 0.5500 | 68.2200 | 0.7000 | -4.0932 | -0.0131 | -0.1381 | 0.0000 | -0.2772 | -0.1598 | 0.2569 | 0.1939 | 0.0000 | 0.0000 | 0.0000 | 4.1206 + 0.6500 | 66.5800 | 0.6900 | -3.9948 | -0.0111 | -0.1498 | 0.0000 | -0.2703 | -0.1809 | 0.2391 | 0.1823 | 0.0000 | 0.0000 | 0.0000 | 4.0221 + 0.7500 | 66.8100 | 0.7000 | -4.0086 | -0.0084 | -0.1697 | 0.0000 | -0.2719 | -0.2180 | 0.2283 | 0.1760 | 0.0000 | 0.0000 | 0.0000 | 4.0376 + 0.8500 | 65.0500 | 0.6900 | -3.9030 | -0.0056 | -0.1876 | 0.0000 | -0.2660 | -0.2513 | 0.2110 | 0.1646 | 0.0000 | 0.0000 | 0.0000 | 3.9337 + 0.9500 | 64.7000 | 0.6900 | -3.8820 | -0.0036 | -0.1819 | 0.0000 | -0.2666 | -0.2860 | 0.1987 | 0.1571 | 0.0000 | 0.0000 | 0.0000 | 3.9141 + 1.0500 | 62.7400 | 0.6700 | -3.7644 | -0.0015 | -0.2115 | -0.0035 | -0.2510 | -0.3001 | 0.1818 | 0.1458 | 0.0008 | -0.0027 | 0.0005 | 3.7977 + 1.1500 | 62.0200 | 0.6600 | -3.7212 | -0.0006 | -0.2131 | -0.0297 | -0.2451 | -0.2972 | 0.1689 | 0.1377 | 0.0073 | -0.0163 | 0.0044 | 3.7536 + 1.2500 | 58.8000 | 0.6500 | -3.5280 | 0.0000 | -0.2413 | -0.0438 | -0.2193 | -0.2835 | 0.1500 | 0.1245 | 0.0261 | -0.0559 | 0.0155 | 3.5605 + 1.3500 | 56.0200 | 0.6500 | -3.3612 | 0.0000 | -0.1995 | -0.1032 | -0.1797 | -0.2541 | 0.1332 | 0.1128 | 0.0548 | -0.0504 | 0.0323 | 3.3885 + 1.4500 | 53.3700 | 0.6300 | -3.2022 | 0.0000 | -0.1949 | -0.1411 | -0.1406 | -0.2163 | 0.1176 | 0.1019 | 0.0867 | -0.0490 | 0.0510 | 3.2273 + 1.5500 | 50.0700 | 0.6200 | -3.0042 | 0.0000 | -0.1817 | -0.1489 | -0.1068 | -0.1787 | 0.1017 | 0.0905 | 0.1150 | -0.0409 | 0.0682 | 3.0268 + 1.6500 | 46.5900 | 0.6100 | -2.7954 | 0.0000 | -0.1597 | -0.1685 | -0.0719 | -0.1456 | 0.0865 | 0.0794 | 0.1380 | -0.0462 | 0.0825 | 2.8171 + 1.7500 | 40.9700 | 0.5800 | -2.4582 | 0.0000 | -0.1122 | -0.2115 | -0.0402 | -0.1047 | 0.0690 | 0.0656 | 0.1477 | -0.0608 | 0.0895 | 2.4810 + 1.8500 | 37.0400 | 0.5600 | -2.2224 | 0.0000 | -0.0827 | -0.2142 | -0.0196 | -0.0791 | 0.0560 | 0.0554 | 0.1540 | -0.0980 | 0.0905 | 2.2464 + 1.9500 | 33.0200 | 0.5500 | -1.9812 | 0.0000 | -0.0529 | -0.2074 | -0.0071 | -0.0632 | 0.0442 | 0.0460 | 0.1494 | -0.1151 | 0.0891 | 2.0056 + 2.0500 | 27.6500 | 0.5200 | -1.6590 | 0.0000 | -0.0331 | -0.1529 | -0.0017 | -0.0502 | 0.0322 | 0.0357 | 0.1303 | -0.0955 | 0.0791 | 1.6775 + 2.1500 | 21.8400 | 0.4900 | -1.3104 | 0.0000 | -0.0184 | -0.1638 | -0.0003 | -0.0392 | 0.0217 | 0.0259 | 0.1041 | -0.0918 | 0.0621 | 1.3305 + 2.2500 | 18.3500 | 0.5000 | -1.1010 | 0.0000 | 0.0000 | -0.1360 | 0.0000 | -0.0354 | 0.0150 | 0.0199 | 0.0877 | -0.0937 | 0.0515 | 1.1188 + 2.3500 | 14.1300 | 0.4900 | -0.8478 | 0.0000 | 0.0000 | -0.1093 | 0.0000 | -0.0293 | 0.0091 | 0.0139 | 0.0676 | -0.0894 | 0.0410 | 0.8638 + 2.4500 | 8.8000 | 0.4500 | -0.5280 | 0.0000 | 0.0000 | -0.0569 | 0.0000 | -0.0208 | 0.0042 | 0.0077 | 0.0421 | -0.0634 | 0.0256 | 0.5376 + 2.5500 | 5.6800 | 0.4400 | -0.3408 | 0.0000 | 0.0000 | -0.0637 | 0.0000 | -0.0150 | 0.0017 | 0.0044 | 0.0272 | -0.0526 | 0.0167 | 0.3525 + 2.6500 | 2.9300 | 0.4100 | -0.1758 | 0.0000 | 0.0000 | -0.1449 | 0.0000 | -0.0081 | 0.0004 | 0.0020 | 0.0140 | -0.0333 | 0.0083 | 0.2310 + 2.8000 | 0.8700 | 0.2200 | -0.0522 | 0.0000 | 0.0000 | -0.1061 | 0.0000 | -0.0040 | -0.0001 | 0.0004 | 0.0042 | -0.0133 | 0.0026 | 0.1192 + 2.9500 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 \ No newline at end of file diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/uncertainties_ZRAP.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/uncertainties_ZRAP.yaml new file mode 100644 index 0000000000..15668234d0 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/uncertainties_ZRAP.yaml @@ -0,0 +1,386 @@ +definitions: + stat: + description: Uncorrelated statistical uncertainties + treatment: ADD + type: UNCORR + sys_corr_1: + description: Systematic uncertainty lum + treatment: MULT + type: CDFLUMI + sys_corr_2: + description: Systematic uncertainty B(CC) + treatment: MULT + type: CORR + sys_corr_3: + description: Systematic uncertainty B(CP) + treatment: MULT + type: CORR + sys_corr_4: + description: Systematic uncertainty B(PP) + treatment: MULT + type: CORR + sys_corr_5: + description: Systematic uncertainty CID + treatment: MULT + type: CORR + sys_corr_6: + description: Systematic uncertainty PID + treatment: MULT + type: CORR + sys_corr_7: + description: Systematic uncertainty CMat + treatment: MULT + type: CORR + sys_corr_8: + description: Systematic uncertainty PMat + treatment: MULT + type: CORR + sys_corr_9: + description: Systematic uncertainty ZVtx + treatment: MULT + type: CORR + sys_corr_10: + description: Systematic uncertainty Trkeff + treatment: MULT + type: CORR + sys_corr_11: + description: Systematic uncertainty NoTrk + treatment: MULT + type: CORR +bins: +- stat: 0.73 + sys_corr_1: -4.1676 + sys_corr_2: -0.022 + sys_corr_3: -0.0302 + sys_corr_4: 0.0 + sys_corr_5: -0.2836 + sys_corr_6: -0.0199 + sys_corr_7: 0.322 + sys_corr_8: 0.2334 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.74 + sys_corr_1: -4.2618 + sys_corr_2: -0.021 + sys_corr_3: -0.0391 + sys_corr_4: 0.0 + sys_corr_5: -0.2899 + sys_corr_6: -0.0377 + sys_corr_7: 0.3169 + sys_corr_8: 0.2313 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.74 + sys_corr_1: -4.266 + sys_corr_2: -0.0187 + sys_corr_3: -0.0655 + sys_corr_4: 0.0 + sys_corr_5: -0.2905 + sys_corr_6: -0.0695 + sys_corr_7: 0.3048 + sys_corr_8: 0.2241 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.72 + sys_corr_1: -4.2006 + sys_corr_2: -0.0172 + sys_corr_3: -0.0905 + sys_corr_4: 0.0 + sys_corr_5: -0.2853 + sys_corr_6: -0.1026 + sys_corr_7: 0.288 + sys_corr_8: 0.2134 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.7 + sys_corr_1: -4.0782 + sys_corr_2: -0.0138 + sys_corr_3: -0.1078 + sys_corr_4: 0.0 + sys_corr_5: -0.2768 + sys_corr_6: -0.1309 + sys_corr_7: 0.2677 + sys_corr_8: 0.2002 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.7 + sys_corr_1: -4.0932 + sys_corr_2: -0.0131 + sys_corr_3: -0.1381 + sys_corr_4: 0.0 + sys_corr_5: -0.2772 + sys_corr_6: -0.1598 + sys_corr_7: 0.2569 + sys_corr_8: 0.1939 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.69 + sys_corr_1: -3.9948 + sys_corr_2: -0.0111 + sys_corr_3: -0.1498 + sys_corr_4: 0.0 + sys_corr_5: -0.2703 + sys_corr_6: -0.1809 + sys_corr_7: 0.2391 + sys_corr_8: 0.1823 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.7 + sys_corr_1: -4.0086 + sys_corr_2: -0.0084 + sys_corr_3: -0.1697 + sys_corr_4: 0.0 + sys_corr_5: -0.2719 + sys_corr_6: -0.218 + sys_corr_7: 0.2283 + sys_corr_8: 0.176 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.69 + sys_corr_1: -3.903 + sys_corr_2: -0.0056 + sys_corr_3: -0.1876 + sys_corr_4: 0.0 + sys_corr_5: -0.266 + sys_corr_6: -0.2513 + sys_corr_7: 0.211 + sys_corr_8: 0.1646 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.69 + sys_corr_1: -3.882 + sys_corr_2: -0.0036 + sys_corr_3: -0.1819 + sys_corr_4: 0.0 + sys_corr_5: -0.2666 + sys_corr_6: -0.286 + sys_corr_7: 0.1987 + sys_corr_8: 0.1571 + sys_corr_9: 0.0 + sys_corr_10: 0.0 + sys_corr_11: 0.0 +- stat: 0.67 + sys_corr_1: -3.7644 + sys_corr_2: -0.0015 + sys_corr_3: -0.2115 + sys_corr_4: -0.0035 + sys_corr_5: -0.251 + sys_corr_6: -0.3001 + sys_corr_7: 0.1818 + sys_corr_8: 0.1458 + sys_corr_9: 0.0008 + sys_corr_10: -0.0027 + sys_corr_11: 0.0005 +- stat: 0.66 + sys_corr_1: -3.7212 + sys_corr_2: -0.0006 + sys_corr_3: -0.2131 + sys_corr_4: -0.0297 + sys_corr_5: -0.2451 + sys_corr_6: -0.2972 + sys_corr_7: 0.1689 + sys_corr_8: 0.1377 + sys_corr_9: 0.0073 + sys_corr_10: -0.0163 + sys_corr_11: 0.0044 +- stat: 0.65 + sys_corr_1: -3.528 + sys_corr_2: 0.0 + sys_corr_3: -0.2413 + sys_corr_4: -0.0438 + sys_corr_5: -0.2193 + sys_corr_6: -0.2835 + sys_corr_7: 0.15 + sys_corr_8: 0.1245 + sys_corr_9: 0.0261 + sys_corr_10: -0.0559 + sys_corr_11: 0.0155 +- stat: 0.65 + sys_corr_1: -3.3612 + sys_corr_2: 0.0 + sys_corr_3: -0.1995 + sys_corr_4: -0.1032 + sys_corr_5: -0.1797 + sys_corr_6: -0.2541 + sys_corr_7: 0.1332 + sys_corr_8: 0.1128 + sys_corr_9: 0.0548 + sys_corr_10: -0.0504 + sys_corr_11: 0.0323 +- stat: 0.63 + sys_corr_1: -3.2022 + sys_corr_2: 0.0 + sys_corr_3: -0.1949 + sys_corr_4: -0.1411 + sys_corr_5: -0.1406 + sys_corr_6: -0.2163 + sys_corr_7: 0.1176 + sys_corr_8: 0.1019 + sys_corr_9: 0.0867 + sys_corr_10: -0.049 + sys_corr_11: 0.051 +- stat: 0.62 + sys_corr_1: -3.0042 + sys_corr_2: 0.0 + sys_corr_3: -0.1817 + sys_corr_4: -0.1489 + sys_corr_5: -0.1068 + sys_corr_6: -0.1787 + sys_corr_7: 0.1017 + sys_corr_8: 0.0905 + sys_corr_9: 0.115 + sys_corr_10: -0.0409 + sys_corr_11: 0.0682 +- stat: 0.61 + sys_corr_1: -2.7954 + sys_corr_2: 0.0 + sys_corr_3: -0.1597 + sys_corr_4: -0.1685 + sys_corr_5: -0.0719 + sys_corr_6: -0.1456 + sys_corr_7: 0.0865 + sys_corr_8: 0.0794 + sys_corr_9: 0.138 + sys_corr_10: -0.0462 + sys_corr_11: 0.0825 +- stat: 0.58 + sys_corr_1: -2.4582 + sys_corr_2: 0.0 + sys_corr_3: -0.1122 + sys_corr_4: -0.2115 + sys_corr_5: -0.0402 + sys_corr_6: -0.1047 + sys_corr_7: 0.069 + sys_corr_8: 0.0656 + sys_corr_9: 0.1477 + sys_corr_10: -0.0608 + sys_corr_11: 0.0895 +- stat: 0.56 + sys_corr_1: -2.2224 + sys_corr_2: 0.0 + sys_corr_3: -0.0827 + sys_corr_4: -0.2142 + sys_corr_5: -0.0196 + sys_corr_6: -0.0791 + sys_corr_7: 0.056 + sys_corr_8: 0.0554 + sys_corr_9: 0.154 + sys_corr_10: -0.098 + sys_corr_11: 0.0905 +- stat: 0.55 + sys_corr_1: -1.9812 + sys_corr_2: 0.0 + sys_corr_3: -0.0529 + sys_corr_4: -0.2074 + sys_corr_5: -0.0071 + sys_corr_6: -0.0632 + sys_corr_7: 0.0442 + sys_corr_8: 0.046 + sys_corr_9: 0.1494 + sys_corr_10: -0.1151 + sys_corr_11: 0.0891 +- stat: 0.52 + sys_corr_1: -1.659 + sys_corr_2: 0.0 + sys_corr_3: -0.0331 + sys_corr_4: -0.1529 + sys_corr_5: -0.0017 + sys_corr_6: -0.0502 + sys_corr_7: 0.0322 + sys_corr_8: 0.0357 + sys_corr_9: 0.1303 + sys_corr_10: -0.0955 + sys_corr_11: 0.0791 +- stat: 0.49 + sys_corr_1: -1.3104 + sys_corr_2: 0.0 + sys_corr_3: -0.0184 + sys_corr_4: -0.1638 + sys_corr_5: -0.0003 + sys_corr_6: -0.0392 + sys_corr_7: 0.0217 + sys_corr_8: 0.0259 + sys_corr_9: 0.1041 + sys_corr_10: -0.0918 + sys_corr_11: 0.0621 +- stat: 0.5 + sys_corr_1: -1.101 + sys_corr_2: 0.0 + sys_corr_3: 0.0 + sys_corr_4: -0.136 + sys_corr_5: 0.0 + sys_corr_6: -0.0354 + sys_corr_7: 0.015 + sys_corr_8: 0.0199 + sys_corr_9: 0.0877 + sys_corr_10: -0.0937 + sys_corr_11: 0.0515 +- stat: 0.49 + sys_corr_1: -0.8478 + sys_corr_2: 0.0 + sys_corr_3: 0.0 + sys_corr_4: -0.1093 + sys_corr_5: 0.0 + sys_corr_6: -0.0293 + sys_corr_7: 0.0091 + sys_corr_8: 0.0139 + sys_corr_9: 0.0676 + sys_corr_10: -0.0894 + sys_corr_11: 0.041 +- stat: 0.45 + sys_corr_1: -0.528 + sys_corr_2: 0.0 + sys_corr_3: 0.0 + sys_corr_4: -0.0569 + sys_corr_5: 0.0 + sys_corr_6: -0.0208 + sys_corr_7: 0.0042 + sys_corr_8: 0.0077 + sys_corr_9: 0.0421 + sys_corr_10: -0.0634 + sys_corr_11: 0.0256 +- stat: 0.44 + sys_corr_1: -0.3408 + sys_corr_2: 0.0 + sys_corr_3: 0.0 + sys_corr_4: -0.0637 + sys_corr_5: 0.0 + sys_corr_6: -0.015 + sys_corr_7: 0.0017 + sys_corr_8: 0.0044 + sys_corr_9: 0.0272 + sys_corr_10: -0.0526 + sys_corr_11: 0.0167 +- stat: 0.41 + sys_corr_1: -0.1758 + sys_corr_2: 0.0 + sys_corr_3: 0.0 + sys_corr_4: -0.1449 + sys_corr_5: 0.0 + sys_corr_6: -0.0081 + sys_corr_7: 0.0004 + sys_corr_8: 0.002 + sys_corr_9: 0.014 + sys_corr_10: -0.0333 + sys_corr_11: 0.0083 +- stat: 0.22 + sys_corr_1: -0.0522 + sys_corr_2: 0.0 + sys_corr_3: 0.0 + sys_corr_4: -0.1061 + sys_corr_5: 0.0 + sys_corr_6: -0.004 + sys_corr_7: -0.0001 + sys_corr_8: 0.0004 + sys_corr_9: 0.0042 + sys_corr_10: -0.0133 + sys_corr_11: 0.0026 diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/compatibility.py b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/compatibility.py new file mode 100644 index 0000000000..966a5e0e95 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/compatibility.py @@ -0,0 +1,17 @@ +from validphys.api import API +import numpy as np + +new_implementation = "D0_WPWM_1P96TEV_ASY" +old_implementation = "D0_WPWM_1P96TEV_ASY" + +inp1 = {"dataset_input": {"dataset": f"{new_implementation}"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True} +inp2 = {"dataset_input": {"dataset": f"{old_implementation}", "variant": "legacy"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True} + +covmat1 = API.covmat_from_systematics(**inp1) +covmat2 = API.covmat_from_systematics(**inp2) + +t0_covmat1 = API.t0_covmat_from_systematics(**inp1) +t0_covmat2 = API.t0_covmat_from_systematics(**inp2) + +print(np.argwhere(~np.isclose(covmat1, covmat2))) +print(np.argwhere(~np.isclose(t0_covmat1, t0_covmat2))) \ No newline at end of file diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/data_ASY.yaml b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/data_ASY.yaml new file mode 100644 index 0000000000..2bbf39be1f --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/data_ASY.yaml @@ -0,0 +1,11 @@ +data_central: +- 0.0213 +- 0.0546 +- 0.0911 +- 0.1241 +- 1.41500000e-01 +- 0.1613 +- 1.66200000e-01 +- 0.1547 +- 0.1106 +- 0.0764 diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/filter.py b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/filter.py new file mode 100644 index 0000000000..7fa499c4a0 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/filter.py @@ -0,0 +1,223 @@ +import pathlib + +import numpy as np +import pandas +import pandas as pd +import yaml + +from nnpdf_data.filter_utils.utils import prettify_float + +yaml.add_representer(float, prettify_float) + +NB_POINTS = 10 +MZ_VALUE = 91.1876 # GeV +MW_VALUE = 80.398 # GeV +SQRT_S = 1_960.0 + + +def load_yaml(table_id: int, version: int = 1) -> dict: + """Load the HEP data table in yaml format. + + Parameters + ---------- + table_id: int + table ID number + + Returns + ------- + dict: + ditionary containing the table contents + + """ + filename = f"HEPData-ins1253555-v{version}-Table_{table_id}" + table = pathlib.Path(f"./rawdata/{filename}.yaml") + + return yaml.safe_load(table.read_text()) + + +def get_kinematics(hepdata: dict) -> list: + """Read the version and list of tables from metadata. + + Parameters + ---------- + hepdata: dict + dictionary containing all data info + + Returns + ------- + tuple(int, list): + data version and list of hepdata tables + + """ + rapbins = hepdata["independent_variables"][0]["values"] + + kinematics = [] + for bins in range(NB_POINTS): + ymin = float(rapbins[bins]["low"]) + ymax = float(rapbins[bins]["high"]) + kin_value = { + "abs_eta": {"min": ymin, "mid": (ymin + ymax) / 2, "max": ymax}, + "m_W2": {"min": None, "mid": MW_VALUE**2, "max": None}, + "sqrts": {"min": None, "mid": SQRT_S, "max": None}, + } + kinematics.append(kin_value) + + return kinematics + + +def get_data_values(hepdata: dict, indx: int = 0) -> list: + """Extract the central values from the HepData yaml file. + + Parameters + ---------- + hepdata: dict + dictionary containing all data info + idx: int + index from which to read the central value, default=0 + + Returns + ------- + list: + list of dictionaries whose contents are the central values + + """ + central = hepdata["dependent_variables"][indx]["values"] + return [central[i]["value"] * 1e-2 for i in range(NB_POINTS)] + + +def get_errors(hepdata: list) -> dict: + """Extract the error values from the HepData yaml file. + + Parameters + ---------- + hepdata: dict + dictionary containing all data info + + Returns + ------- + list: + list of dictionaries whose contents are the various + source of uncertainties + + """ + # extract the systematics + systematics = [] + for row in hepdata[1]["dependent_variables"]: + systematics.append([value["value"] * 1e-2 for value in row["values"]]) + systematics = np.array(systematics).T + + # append the statistical uncertainties per datapoint + stat = [] + for row in hepdata[0]["dependent_variables"][0]["values"]: + stat.append(row["errors"][0]["symerror"] * 1e-2) + + return {"stat": stat, "sys_corr": systematics} + + +def format_uncertainties(uncs: dict) -> list: + """Format the uncertainties to be dumped into the yaml file. + + Parameters + ---------- + uncs: dict + Dictionary containing the various source of uncertainties + + Returns + ------- + list: + list of dictionaries whose elements are the various errors + + """ + + combined_errors = [] + for i in range(NB_POINTS): + error_value = {} + error_value["stat"] = uncs["stat"][i] + for j, sys in enumerate(uncs["sys_corr"][i]): + error_value[f"sys_corr_{j+1}"] = float(sys) + combined_errors.append(error_value) + + return combined_errors + + +def dump_commondata(kinematics: list, data: list, errors: dict) -> None: + """Function that generates and writes the commondata files. + + Parameters + ---------- + kinematics: list + list containing the kinematic values + data: list + list containing the central values + errors: dict + Dictionary containing the different errors + + """ + + error_definition = { + "stat": { + "description": "Uncorrelated statistical uncertainties", + "treatment": "ADD", + "type": "UNCORR", + } + } + + n_sys = errors["sys_corr"].shape[1] + + for i in range(n_sys): + error_definition[f"sys_corr_{i + 1}"] = { + "description": f"Systematic uncertainty {i + 1}", + "treatment": "ADD", + "type": "CORR", + } + + # update lumi entry + error_definition[f'sys_corr_{n_sys}']['type'] = "UNCORR" + + error_definition["stat"] = { + "description": "Uncorrelated statistical uncertainties", + "treatment": "ADD", + "type": "UNCORR", + } + + errors_formatted = format_uncertainties(errors) + + with open("data_ASY.yaml", "w") as file: + yaml.dump({"data_central": data}, file, sort_keys=False) + + with open("kinematics_ASY.yaml", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + with open("uncertainties_ASY.yaml", "w") as file: + yaml.dump( + {"definitions": error_definition, "bins": errors_formatted}, file, sort_keys=False + ) + + +def main_filter() -> None: + """Main driver of the filter that produces commmondata. + + There are four main different sources of uncertainties. + + 1. Statistical uncertainties: ADD, UNCORR + + 2. Correlated Systematic uncertainties: ADD, CORR + + 3. Uncorrelated Systematic uncertainties: ADD, UNCORR + + """ + + yaml_content_data = load_yaml(table_id=1, version=1) + yaml_content_uncertainties = load_yaml(table_id=3, version=1) + kinematics = get_kinematics(yaml_content_data) + data_central = get_data_values(yaml_content_data) + uncertainties = get_errors([yaml_content_data, yaml_content_uncertainties]) + + # Generate all the necessary files + dump_commondata(kinematics, data_central, uncertainties) + + return + + +if __name__ == "__main__": + main_filter() diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/kinematics_ASY.yaml b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/kinematics_ASY.yaml index 629545b69e..02f2da0291 100644 --- a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/kinematics_ASY.yaml +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/kinematics_ASY.yaml @@ -1,121 +1,121 @@ bins: -- k1: - min: null +- abs_eta: + min: 0.0 mid: 0.1 - max: null - k2: + max: 0.2 + m_W2: min: null - mid: 6463.838403999999 + mid: 6.46383840e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- abs_eta: + min: 0.2 + mid: 3.00000000e-01 + max: 0.4 + m_W2: min: null - mid: 0.3 + mid: 6.46383840e+03 max: null - k2: - min: null - mid: 6463.838403999999 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- abs_eta: + min: 0.4 mid: 0.5 - max: null - k2: + max: 0.6 + m_W2: min: null - mid: 6463.838403999999 + mid: 6.46383840e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 0.71 - max: null - k2: +- abs_eta: + min: 0.6 + mid: 0.7 + max: 0.8 + m_W2: min: null - mid: 6463.838403999999 + mid: 6.46383840e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 0.89 - max: null - k2: +- abs_eta: + min: 0.8 + mid: 0.9 + max: 1.0 + m_W2: min: null - mid: 6463.838403999999 + mid: 6.46383840e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- abs_eta: + min: 1.0 + mid: 1.1 + max: 1.2 + m_W2: min: null - mid: 1.11 + mid: 6.46383840e+03 max: null - k2: - min: null - mid: 6463.838403999999 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- abs_eta: + min: 1.2 + mid: 1.30000000e+00 + max: 1.4 + m_W2: min: null - mid: 1.3 + mid: 6.46383840e+03 max: null - k2: - min: null - mid: 6463.838403999999 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 1.49 - max: null - k2: +- abs_eta: + min: 1.4 + mid: 1.5 + max: 1.6 + m_W2: min: null - mid: 6463.838403999999 + mid: 6.46383840e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 1.66 - max: null - k2: +- abs_eta: + min: 1.6 + mid: 1.70000000e+00 + max: 1.8 + m_W2: min: null - mid: 6463.838403999999 + mid: 6.46383840e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 1.88 - max: null - k2: +- abs_eta: + min: 1.8 + mid: 1.9 + max: 2.0 + m_W2: min: null - mid: 6463.838403999999 + mid: 6.46383840e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml index 85de69d401..8206fc593b 100644 --- a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml @@ -8,43 +8,43 @@ arXiv: url: https://arxiv.org/abs/1309.2591 journal: Phys. Rev. D91 (2015) 032007 iNSPIRE: - url: '' + url: https://inspirehep.net/literature/1253555 hepdata: - url: '' - version: -1 + url: https://www.hepdata.net/record/ins1253555 + version: 1 implemented_observables: - observable_name: ASY observable: description: Drell-Yan Rapidity Distribution label: D0 $W\to \mu\nu$ asymmetry units: '' - process_type: EWK_RAP_ASY - tables: [] + process_type: DY_W_ETA + tables: [1, 3] npoints: [] ndata: 10 plotting: - kinematics_override: ewk_rap_sqrt_scale + kinematics_override: identity dataset_label: D0 $W\to \mu\nu$ asymmetry y_label: $dA_{\mu}/dy$ - plot_x: k1 + plot_x: abs_eta kinematic_coverage: - - k1 - - k2 - - k3 + - abs_eta + - m_W2 + - sqrts kinematics: variables: - k1: - description: Variable k1 - label: k1 - units: '' - k2: - description: Variable k2 - label: k2 - units: '' - k3: - description: Variable k3 - label: k3 - units: '' + abs_eta: + description: "Muon pseudorapidity" + label: $\eta$ + units: "" + m_W2: + description: "W mass squared" + label: $M_W^2$ + units: $GeV^2$ + sqrts: + description: "Center of mass energy" + label: $\sqrt{s}$ + units: $GeV$ file: kinematics_ASY.yaml theory: conversion_factor: 1.0 @@ -52,10 +52,11 @@ implemented_observables: FK_tables: - - D0WMASY-grid-40-6-15-3-Wplus_wly_pt25 - - D0WMASY-grid-40-6-15-3-Wminus_wly_pt25 - data_uncertainties: [] + data_uncertainties: + - uncertainties_ASY.yaml variants: legacy: data_uncertainties: - uncertainties_legacy_ASY.yaml - data_central: data_legacy_ASY.yaml + data_central: data_ASY.yaml ported_from: D0WMASY diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/rawdata/HEPData-ins1253555-v1-Table_1.yaml b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/rawdata/HEPData-ins1253555-v1-Table_1.yaml new file mode 100644 index 0000000000..e1ad503aea --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/rawdata/HEPData-ins1253555-v1-Table_1.yaml @@ -0,0 +1,98 @@ +dependent_variables: +- header: {name: ASYMMETRY, units: PCT} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + values: + - errors: + - {label: stat, symerror: 0.17} + - {label: sys, symerror: 0.11} + value: 2.13 + - errors: + - {label: stat, symerror: 0.18} + - {label: sys, symerror: 0.13} + value: 5.46 + - errors: + - {label: stat, symerror: 0.18} + - {label: sys, symerror: 0.16} + value: 9.11 + - errors: + - {label: stat, symerror: 0.18} + - {label: sys, symerror: 0.19} + value: 12.41 + - errors: + - {label: stat, symerror: 0.19} + - {label: sys, symerror: 0.17} + value: 14.15 + - errors: + - {label: stat, symerror: 0.16} + - {label: sys, symerror: 0.27} + value: 16.13 + - errors: + - {label: stat, symerror: 0.14} + - {label: sys, symerror: 0.21} + value: 16.62 + - errors: + - {label: stat, symerror: 0.16} + - {label: sys, symerror: 0.21} + value: 15.47 + - errors: + - {label: stat, symerror: 0.7} + - {label: sys, symerror: 0.33} + value: 11.06 + - errors: + - {label: stat, symerror: 1.07} + - {label: sys, symerror: 0.42} + value: 7.64 +- header: {name: ASYMMETRY, units: PCT} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + values: + - errors: + - asymerror: {minus: -0.48, plus: 0.28} + value: 1.97 + - errors: + - asymerror: {minus: -0.67, plus: 0.71} + value: 5.68 + - errors: + - asymerror: {minus: -1.02, plus: 0.86} + value: 9.24 + - errors: + - asymerror: {minus: -1.26, plus: 1.33} + value: 12.23 + - errors: + - asymerror: {minus: -1.43, plus: 1.42} + value: 14.76 + - errors: + - asymerror: {minus: -1.61, plus: 1.81} + value: 16.29 + - errors: + - asymerror: {minus: -1.66, plus: 1.71} + value: 16.76 + - errors: + - asymerror: {minus: -1.84, plus: 1.9} + value: 15.78 + - errors: + - asymerror: {minus: -2.2, plus: 2.26} + value: 12.75 + - errors: + - asymerror: {minus: -2.56, plus: 2.75} + value: 7.83 +independent_variables: +- header: {name: $\eta^\mu$} + values: + - {high: 0.2, low: 0.0} + - {high: 0.4, low: 0.2} + - {high: 0.6, low: 0.4} + - {high: 0.8, low: 0.6, value: 0.71} + - {high: 1.0, low: 0.8, value: 0.89} + - {high: 1.2, low: 1.0, value: 1.11} + - {high: 1.4, low: 1.2} + - {high: 1.6, low: 1.4, value: 1.49} + - {high: 1.8, low: 1.6, value: 1.66} + - {high: 2.0, low: 1.8, value: 1.88} diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/rawdata/HEPData-ins1253555-v1-Table_3.yaml b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/rawdata/HEPData-ins1253555-v1-Table_3.yaml new file mode 100644 index 0000000000..b81fce450f --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/rawdata/HEPData-ins1253555-v1-Table_3.yaml @@ -0,0 +1,140 @@ +dependent_variables: +- header: {name: 100*systematic uncertainty from source} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + - {name: source, value: '1.0'} + values: + - {value: 0.007} + - {value: 0.005} + - {value: 0.029} + - {value: 0.049} + - {value: 0.047} + - {value: 0.051} + - {value: 0.057} + - {value: 0.055} + - {value: 0.03} + - {value: 0.037} +- header: {name: 100*systematic uncertainty from source} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + - {name: source, value: '2.0'} + values: + - {value: 0.018} + - {value: 0.036} + - {value: 0.046} + - {value: 0.065} + - {value: 0.089} + - {value: 0.078} + - {value: 0.058} + - {value: 0.048} + - {value: 0.005} + - {value: 0.009} +- header: {name: 100*systematic uncertainty from source} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + - {name: source, value: '3.0'} + values: + - {value: 0.001} + - {value: 0.006} + - {value: 0.007} + - {value: 0.012} + - {value: 0.012} + - {value: 0.014} + - {value: 0.006} + - {value: 0.013} + - {value: 0.047} + - {value: 0.048} +- header: {name: 100*systematic uncertainty from source} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + - {name: source, value: '4.0'} + values: + - {value: 0.012} + - {value: 0.008} + - {value: 0.013} + - {value: 0.039} + - {value: 0.046} + - {value: 0.053} + - {value: 0.042} + - {value: 0.073} + - {value: 0.082} + - {value: 0.149} +- header: {name: 100*systematic uncertainty from source} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + - {name: source, value: '5.0'} + values: + - {value: 0.006} + - {value: 0.005} + - {value: 0.004} + - {value: 0.003} + - {value: 0.004} + - {value: 0.002} + - {value: 0.002} + - {value: 0.005} + - {value: 0.031} + - {value: 0.049} +- header: {name: 100*systematic uncertainty from source} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + - {name: source, value: '6.0'} + values: + - {value: 0.107} + - {value: 0.129} + - {value: 0.151} + - {value: 0.165} + - {value: 0.134} + - {value: 0.251} + - {value: 0.187} + - {value: 0.183} + - {value: 0.312} + - {value: 0.385} +- header: {name: 100*systematic uncertainty from source} + qualifiers: + - {name: '$E_T^{missing}$', units: GEV, value: '> 25'} + - {name: '$p_T^{\mu}$', units: GEV, value: '> 25'} + - {name: RE, value: P P --> W+- < MU+- NU > X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + - {name: source, value: '7.0'} + values: + - {value: 0.05} + - {value: 0.13} + - {value: 0.06} + - {value: 0.11} + - {value: 0.09} + - {value: 0.22} + - {value: 0.17} + - {value: 0.17} + - {value: 0.2} + - {value: 0.04} +independent_variables: +- header: {name: $\eta^\mu$} + values: + - {high: 0.2, low: 0.0} + - {high: 0.4, low: 0.2} + - {high: 0.6, low: 0.4} + - {high: 0.8, low: 0.6} + - {high: 1.0, low: 0.8} + - {high: 1.2, low: 1.0} + - {high: 1.4, low: 1.2} + - {high: 1.6, low: 1.4} + - {high: 1.8, low: 1.6} + - {high: 2.0, low: 1.8} diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/uncertainties_ASY.yaml b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/uncertainties_ASY.yaml new file mode 100644 index 0000000000..0071b92818 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/uncertainties_ASY.yaml @@ -0,0 +1,114 @@ +definitions: + stat: + description: Uncorrelated statistical uncertainties + treatment: ADD + type: UNCORR + sys_corr_1: + description: Systematic uncertainty 1 + treatment: ADD + type: CORR + sys_corr_2: + description: Systematic uncertainty 2 + treatment: ADD + type: CORR + sys_corr_3: + description: Systematic uncertainty 3 + treatment: ADD + type: CORR + sys_corr_4: + description: Systematic uncertainty 4 + treatment: ADD + type: CORR + sys_corr_5: + description: Systematic uncertainty 5 + treatment: ADD + type: CORR + sys_corr_6: + description: Systematic uncertainty 6 + treatment: ADD + type: CORR + sys_corr_7: + description: Systematic uncertainty 7 + treatment: ADD + type: UNCORR +bins: +- stat: 1.70000000e-03 + sys_corr_1: 7.00000000e-05 + sys_corr_2: 1.80000000e-04 + sys_corr_3: 1.0e-05 + sys_corr_4: 0.00012 + sys_corr_5: 6.0e-05 + sys_corr_6: 0.00107 + sys_corr_7: 0.0005 +- stat: 0.0018 + sys_corr_1: 5.0e-05 + sys_corr_2: 3.60000000e-04 + sys_corr_3: 6.0e-05 + sys_corr_4: 8.0e-05 + sys_corr_5: 5.0e-05 + sys_corr_6: 1.29000000e-03 + sys_corr_7: 1.30000000e-03 +- stat: 0.0018 + sys_corr_1: 0.00029 + sys_corr_2: 0.00046 + sys_corr_3: 7.00000000e-05 + sys_corr_4: 0.00013 + sys_corr_5: 4.0e-05 + sys_corr_6: 0.00151 + sys_corr_7: 0.0006 +- stat: 0.0018 + sys_corr_1: 0.00049 + sys_corr_2: 6.50000000e-04 + sys_corr_3: 0.00012 + sys_corr_4: 0.00039 + sys_corr_5: 3.0e-05 + sys_corr_6: 1.65000000e-03 + sys_corr_7: 0.0011 +- stat: 0.0019 + sys_corr_1: 0.00047 + sys_corr_2: 0.00089 + sys_corr_3: 0.00012 + sys_corr_4: 0.00046 + sys_corr_5: 4.0e-05 + sys_corr_6: 0.00134 + sys_corr_7: 0.0009 +- stat: 0.0016 + sys_corr_1: 5.10000000e-04 + sys_corr_2: 0.00078 + sys_corr_3: 1.40000000e-04 + sys_corr_4: 0.00053 + sys_corr_5: 2.0e-05 + sys_corr_6: 0.00251 + sys_corr_7: 0.0022 +- stat: 1.40000000e-03 + sys_corr_1: 5.70000000e-04 + sys_corr_2: 0.00058 + sys_corr_3: 6.0e-05 + sys_corr_4: 0.00042 + sys_corr_5: 2.0e-05 + sys_corr_6: 1.87000000e-03 + sys_corr_7: 1.70000000e-03 +- stat: 0.0016 + sys_corr_1: 0.00055 + sys_corr_2: 0.00048 + sys_corr_3: 0.00013 + sys_corr_4: 0.00073 + sys_corr_5: 5.0e-05 + sys_corr_6: 0.00183 + sys_corr_7: 1.70000000e-03 +- stat: 7.00000000e-03 + sys_corr_1: 0.0003 + sys_corr_2: 5.0e-05 + sys_corr_3: 0.00047 + sys_corr_4: 8.20000000e-04 + sys_corr_5: 0.00031 + sys_corr_6: 0.00312 + sys_corr_7: 0.002 +- stat: 1.07000000e-02 + sys_corr_1: 0.00037 + sys_corr_2: 9.00000000e-05 + sys_corr_3: 0.00048 + sys_corr_4: 0.00149 + sys_corr_5: 0.00049 + sys_corr_6: 0.00385 + sys_corr_7: 0.0004 diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/compatibility.py b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/compatibility.py new file mode 100644 index 0000000000..4e4d3af9b0 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/compatibility.py @@ -0,0 +1,19 @@ +from validphys.api import API +import numpy as np + +new_implementation = "D0_Z0_1P96TEV_ZRAP" +old_implementation = "D0_Z0_1P96TEV_ZRAP" + +inp1 = {"dataset_input": {"dataset": f"{new_implementation}"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True} +inp2 = {"dataset_input": {"dataset": f"{old_implementation}", "variant": "legacy"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True} + +covmat1 = API.covmat_from_systematics(**inp1) +covmat2 = API.covmat_from_systematics(**inp2) + +t0_covmat1 = API.t0_covmat_from_systematics(**inp1) +t0_covmat2 = API.t0_covmat_from_systematics(**inp2) + +# print(np.all(np.isclose(covmat1, covmat2))) +# print(np.all(np.isclose(t0_covmat1, t0_covmat2))) +print(np.argwhere(~np.isclose(covmat1, covmat2))) +print(np.argwhere(~np.isclose(t0_covmat1, t0_covmat2))) \ No newline at end of file diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/data_ZRAP.yaml b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/data_ZRAP.yaml new file mode 100644 index 0000000000..1cfa56f8f9 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/data_ZRAP.yaml @@ -0,0 +1,29 @@ +data_central: +- 0.2715 +- 0.2765 +- 0.274 +- 0.2665 +- 0.2785 +- 0.2685 +- 0.26 +- 0.277 +- 0.2345 +- 0.2435 +- 0.251 +- 0.2355 +- 0.2295 +- 0.2225 +- 0.2105 +- 0.1905 +- 0.17 +- 0.168 +- 0.1425 +- 0.119 +- 1.17500000e-01 +- 0.091 +- 0.0685 +- 0.049 +- 0.039 +- 0.018 +- 0.014 +- 0.005 diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/filter.py b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/filter.py new file mode 100644 index 0000000000..67a868929a --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/filter.py @@ -0,0 +1,195 @@ +import pathlib + +import yaml + +from nnpdf_data.filter_utils.utils import prettify_float + +yaml.add_representer(float, prettify_float) + +NB_POINTS = 28 +MZ_VALUE = 91.1876 # GeV +MW_VALUE = 80.398 # GeV +SQRT_S = 1_960.0 + +from nnpdf_data.filter_utils.utils import symmetrize_errors as se + + +def load_yaml(table_id: int, version: int = 1) -> dict: + """Load the HEP data table in yaml format. + + Parameters + ---------- + table_id: int + table ID number + + Returns + ------- + dict: + ditionary containing the table contents + + """ + filename = f"HEPData-ins744624-v{version}-Table_{table_id}" + table = pathlib.Path(f"./rawdata/{filename}.yaml") + + return yaml.safe_load(table.read_text()) + + +def get_kinematics(hepdata: dict) -> list: + """Read the version and list of tables from metadata. + + Parameters + ---------- + hepdata: dict + dictionary containing all data info + + Returns + ------- + tuple(int, list): + data version and list of hepdata tables + + """ + rapbins = hepdata["independent_variables"][0]["values"] + + kinematics = [] + for bins in range(NB_POINTS): + ymin = float(rapbins[bins]["low"]) + ymax = float(rapbins[bins]["high"]) + kin_value = { + "y": {"min": ymin, "mid": (ymin + ymax) / 2, "max": ymax}, + "m_Z2": {"min": None, "mid": MZ_VALUE**2, "max": None}, + "sqrts": {"min": None, "mid": SQRT_S, "max": None}, + } + kinematics.append(kin_value) + + return kinematics + + +def get_errors(hepdata: dict) -> dict: + """Extract the error values from the HepData yaml file. + + Parameters + ---------- + hepdata: Dict + Dictionary containing all data info + + Returns + ------- + list: + list of dictionaries whose contents are the various + source of uncertainties + + """ + + stat = [] + systematics = [] + central_values = [] + for data_i in hepdata["dependent_variables"][0]["values"]: + + stat_i = data_i["errors"][0]["symerror"] + stat.append(stat_i) + + if "asymerror" in data_i["errors"][1]: + delta_min = data_i["errors"][1]["asymerror"]["minus"] + delta_plus = data_i["errors"][1]["asymerror"]["plus"] + se_delta, se_sigma = se(delta_plus, delta_min) + else: + se_delta = 0 + se_sigma = data_i["errors"][1]["symerror"] + + cv_i = data_i["value"] + se_delta + systematics.append(se_sigma) + central_values.append(cv_i) + + return central_values, {"stat": stat, "sys_corr": systematics} + + +def format_uncertainties(uncs: dict) -> list: + """Format the uncertainties to be dumped into the yaml file. + + Parameters + ---------- + uncs: dict + Dictionary containing the various source of uncertainties + + Returns + ------- + list: + list of dictionaries whose elements are the various errors + + """ + + combined_errors = [] + for i in range(NB_POINTS): + error_value = {} + error_value["stat"] = uncs["stat"][i] + error_value[f"sys_corr_1"] = uncs["sys_corr"][i] + combined_errors.append(error_value) + + return combined_errors + + +def dump_commondata(kinematics: list, data: list, errors: dict) -> None: + """Function that generates and writes the commondata files. + + Parameters + ---------- + kinematics: list + list containing the kinematic values + data: list + list containing the central values + errors: dict + Dictionary containing the different errors + + """ + + error_definition = { + "stat": { + "description": "Uncorrelated statistical uncertainties", + "treatment": "ADD", + "type": "UNCORR", + }, + "sys_corr_1": { + "description": f"Systematic uncertainty 1", + "treatment": "MULT", + "type": "UNCORR", + }, + } + + errors_formatted = format_uncertainties(errors) + + with open("data_ZRAP.yaml", "w") as file: + yaml.dump({"data_central": data}, file, sort_keys=False) + + with open("kinematics_ZRAP.yaml", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + with open("uncertainties_ZRAP.yaml", "w") as file: + yaml.dump( + {"definitions": error_definition, "bins": errors_formatted}, file, sort_keys=False + ) + + +def main_filter() -> None: + """Main driver of the filter that produces commmondata. + + There are four main different sources of uncertainties. + + 1. Statistical uncertainties: ADD, UNCORR + + 2. Uncorrelated Systematic uncertainties: MULT, UNCORR + + + """ + + yaml_content = load_yaml(table_id=1, version=1) + kinematics = get_kinematics(yaml_content) + data_central, uncertainties = get_errors(yaml_content) + + # Generate all the necessary files + dump_commondata(kinematics, data_central, uncertainties) + + return + + +if __name__ == "__main__": + main_filter() diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/kinematics_ZRAP.yaml b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/kinematics_ZRAP.yaml index 0c0ed671bd..d3658541ef 100644 --- a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/kinematics_ZRAP.yaml +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/kinematics_ZRAP.yaml @@ -1,337 +1,337 @@ bins: -- k1: - min: null +- y: + min: 0.0 mid: 0.05 - max: null - k2: + max: 0.1 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 0.15 - max: null - k2: +- y: + min: 0.1 + mid: 1.50000000e-01 + max: 0.2 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.2 mid: 0.25 - max: null - k2: + max: 0.3 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.3 mid: 0.35 - max: null - k2: + max: 0.4 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.4 mid: 0.45 - max: null - k2: + max: 0.5 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.5 mid: 0.55 - max: null - k2: + max: 0.6 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 0.65 - max: null - k2: +- y: + min: 0.6 + mid: 6.50000000e-01 + max: 0.7 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.7 mid: 0.75 - max: null - k2: + max: 0.8 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null - mid: 0.85 - max: null - k2: +- y: + min: 0.8 + mid: 8.50000000e-01 + max: 0.9 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 0.9 mid: 0.95 - max: null - k2: + max: 1.0 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.0 mid: 1.05 - max: null - k2: + max: 1.1 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.1 mid: 1.15 - max: null - k2: + max: 1.2 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.2 mid: 1.25 - max: null - k2: + max: 1.3 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.3 mid: 1.35 - max: null - k2: + max: 1.4 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.4 mid: 1.45 - max: null - k2: + max: 1.5 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.5 mid: 1.55 - max: null - k2: + max: 1.6 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.6 mid: 1.65 - max: null - k2: + max: 1.7 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.7 mid: 1.75 - max: null - k2: + max: 1.8 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.8 mid: 1.85 - max: null - k2: + max: 1.9 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 1.9 mid: 1.95 - max: null - k2: + max: 2.0 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.0 mid: 2.05 - max: null - k2: + max: 2.1 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- y: + min: 2.1 + mid: 2.15000000e+00 + max: 2.2 + m_Z2: min: null - mid: 2.15 + mid: 8.31517839e+03 max: null - k2: - min: null - mid: 8315.17839376 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.2 mid: 2.25 - max: null - k2: + max: 2.3 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- y: + min: 2.3 + mid: 2.35000000e+00 + max: 2.4 + m_Z2: min: null - mid: 2.35 + mid: 8.31517839e+03 max: null - k2: - min: null - mid: 8315.17839376 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.4 mid: 2.45 - max: null - k2: + max: 2.5 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.5 mid: 2.55 - max: null - k2: + max: 2.6 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: +- y: + min: 2.6 + mid: 2.65000000e+00 + max: 2.7 + m_Z2: min: null - mid: 2.65 + mid: 8.31517839e+03 max: null - k2: - min: null - mid: 8315.17839376 - max: null - k3: + sqrts: min: null mid: 1960.0 max: null -- k1: - min: null +- y: + min: 2.7 mid: 2.75 - max: null - k2: + max: 2.8 + m_Z2: min: null - mid: 8315.17839376 + mid: 8.31517839e+03 max: null - k3: + sqrts: min: null mid: 1960.0 max: null diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml index a5724e5b33..4e80b606fd 100644 --- a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml @@ -8,54 +8,55 @@ arXiv: url: https://arxiv.org/abs/hep-ex/0702025 journal: Phys. Rev. D76 (2007) 012003 iNSPIRE: - url: '' + url: https://inspirehep.net/literature/744624 hepdata: - url: '' - version: -1 + url: https://www.hepdata.net/record/ins744624 + version: 1 implemented_observables: -- observable_name: ZRAP - observable: - description: Drell-Yan Rapidity Distribution - label: D0 $Z$ rapidity - units: '' - process_type: EWK_RAP - tables: [] - npoints: [] - ndata: 28 - plotting: - kinematics_override: ewk_rap_sqrt_scale - dataset_label: D0 $Z$ rapidity - y_label: $1/\sigma\;d\sigma_{Z/\gamma^{*}}/dy$ - plot_x: k1 - kinematic_coverage: - - k1 - - k2 - - k3 - kinematics: - variables: - k1: - description: Variable k1 - label: k1 - units: '' - k2: - description: Variable k2 - label: k2 - units: '' - k3: - description: Variable k3 - label: k3 - units: '' - file: kinematics_ZRAP.yaml - theory: - conversion_factor: 1.0 - operation: RATIO - FK_tables: - - - D0ZRAP-D0_ZRAP_MCgrid_500M - - - D0ZRAP-D0_ZNORM_MCgrid_500M - data_uncertainties: [] - variants: - legacy: - data_uncertainties: - - uncertainties_legacy_ZRAP.yaml - data_central: data_legacy_ZRAP.yaml - ported_from: D0ZRAP_40 + - observable_name: ZRAP + observable: + description: Drell-Yan Rapidity Distribution + label: D0 $Z$ rapidity + units: '' + process_type: DY_Z_Y + tables: [1] + npoints: [] + ndata: 28 + plotting: + kinematics_override: identity + dataset_label: D0 $Z$ rapidity + y_label: $1/\sigma\;d\sigma_{Z/\gamma^{*}}/dy$ + plot_x: y + kinematic_coverage: + - y + - m_Z2 + - sqrts + kinematics: + variables: + y: + description: "Boson absolute rapidity" + label: $|y|$ + units: "" + m_Z2: + description: "Z mass squared" + label: $M_Z^2$ + units: $GeV^2$ + sqrts: + description: "Center of mass energy" + label: $\sqrt{s}$ + units: $GeV$ + file: kinematics_ZRAP.yaml + theory: + conversion_factor: 1.0 + operation: RATIO + FK_tables: + - - D0ZRAP-D0_ZRAP_MCgrid_500M + - - D0ZRAP-D0_ZNORM_MCgrid_500M + data_uncertainties: + - uncertainties_ZRAP.yaml + variants: + legacy: + data_uncertainties: + - uncertainties_legacy_ZRAP.yaml + data_central: data_ZRAP.yaml + ported_from: D0ZRAP_40 diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/rawdata/HEPData-ins744624-v1-Table_1.yaml b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/rawdata/HEPData-ins744624-v1-Table_1.yaml new file mode 100644 index 0000000000..b71956a0ba --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/rawdata/HEPData-ins744624-v1-Table_1.yaml @@ -0,0 +1,166 @@ +dependent_variables: +- header: {name: (1/SIG)D(SIG)/DYRAP} + qualifiers: + - {name: M(P=3_4), units: GEV, value: 71 TO 111} + - {name: RE, value: PBAR P --> E+ E- X} + - {name: SQRT(S), units: GeV, value: '1960.0'} + values: + - errors: + - {label: stat, symerror: 0.009} + - asymerror: {minus: -0.005, plus: 0.006} + label: sys + value: 0.271 + - errors: + - {label: stat, symerror: 0.009} + - asymerror: {minus: -0.006, plus: 0.007} + label: sys + value: 0.276 + - errors: + - {label: stat, symerror: 0.009} + - {label: sys, symerror: 0.005} + value: 0.274 + - errors: + - {label: stat, symerror: 0.01} + - asymerror: {minus: -0.005, plus: 0.006} + label: sys + value: 0.266 + - errors: + - {label: stat, symerror: 0.01} + - asymerror: {minus: -0.006, plus: 0.007} + label: sys + value: 0.278 + - errors: + - {label: stat, symerror: 0.01} + - asymerror: {minus: -0.007, plus: 0.006} + label: sys + value: 0.269 + - errors: + - {label: stat, symerror: 0.01} + - {label: sys, symerror: 0.006} + value: 0.26 + - errors: + - {label: stat, symerror: 0.01} + - asymerror: {minus: -0.005, plus: 0.007} + label: sys + value: 0.276 + - errors: + - {label: stat, symerror: 0.009} + - asymerror: {minus: -0.007, plus: 0.006} + label: sys + value: 0.235 + - errors: + - {label: stat, symerror: 0.009} + - asymerror: {minus: -0.006, plus: 0.005} + label: sys + value: 0.244 + - errors: + - {label: stat, symerror: 0.008} + - {label: sys, symerror: 0.006} + value: 0.251 + - errors: + - {label: stat, symerror: 0.008} + - asymerror: {minus: -0.006, plus: 0.007} + label: sys + value: 0.235 + - errors: + - {label: stat, symerror: 0.008} + - asymerror: {minus: -0.006, plus: 0.005} + label: sys + value: 0.23 + - errors: + - {label: stat, symerror: 0.008} + - asymerror: {minus: -0.006, plus: 0.005} + label: sys + value: 0.223 + - errors: + - {label: stat, symerror: 0.008} + - asymerror: {minus: -0.005, plus: 0.004} + label: sys + value: 0.211 + - errors: + - {label: stat, symerror: 0.008} + - asymerror: {minus: -0.006, plus: 0.005} + label: sys + value: 0.191 + - errors: + - {label: stat, symerror: 0.008} + - {label: sys, symerror: 0.005} + value: 0.17 + - errors: + - {label: stat, symerror: 0.008} + - {label: sys, symerror: 0.006} + value: 0.168 + - errors: + - {label: stat, symerror: 0.007} + - asymerror: {minus: -0.004, plus: 0.005} + label: sys + value: 0.142 + - errors: + - {label: stat, symerror: 0.006} + - {label: sys, symerror: 0.004} + value: 0.119 + - errors: + - {label: stat, symerror: 0.006} + - asymerror: {minus: -0.004, plus: 0.005} + label: sys + value: 0.117 + - errors: + - {label: stat, symerror: 0.005} + - {label: sys, symerror: 0.004} + value: 0.091 + - errors: + - {label: stat, symerror: 0.004} + - asymerror: {minus: -0.004, plus: 0.003} + label: sys + value: 0.069 + - errors: + - {label: stat, symerror: 0.004} + - {label: sys, symerror: 0.002} + value: 0.049 + - errors: + - {label: stat, symerror: 0.003} + - {label: sys, symerror: 0.002} + value: 0.039 + - errors: + - {label: stat, symerror: 0.003} + - {label: sys, symerror: 0.001} + value: 0.018 + - errors: + - {label: stat, symerror: 0.003} + - {label: sys, symerror: 0.001} + value: 0.014 + - errors: + - {label: stat, symerror: 0.002} + - {label: sys, symerror: 0.0004} + value: 0.005 +independent_variables: +- header: {name: ABS(YRAP(P=3_4))} + values: + - {high: 0.1, low: 0.0} + - {high: 0.2, low: 0.1} + - {high: 0.3, low: 0.2} + - {high: 0.4, low: 0.3} + - {high: 0.5, low: 0.4} + - {high: 0.6, low: 0.5} + - {high: 0.7, low: 0.6} + - {high: 0.8, low: 0.7} + - {high: 0.9, low: 0.8} + - {high: 1.0, low: 0.9} + - {high: 1.1, low: 1.0} + - {high: 1.2, low: 1.1} + - {high: 1.3, low: 1.2} + - {high: 1.4, low: 1.3} + - {high: 1.5, low: 1.4} + - {high: 1.6, low: 1.5} + - {high: 1.7, low: 1.6} + - {high: 1.8, low: 1.7} + - {high: 1.9, low: 1.8} + - {high: 2.0, low: 1.9} + - {high: 2.1, low: 2.0} + - {high: 2.2, low: 2.1} + - {high: 2.3, low: 2.2} + - {high: 2.4, low: 2.3} + - {high: 2.5, low: 2.4} + - {high: 2.6, low: 2.5} + - {high: 2.7, low: 2.6} + - {high: 2.8, low: 2.7} diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/uncertainties_ZRAP.yaml b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/uncertainties_ZRAP.yaml new file mode 100644 index 0000000000..fe6e9320e5 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/uncertainties_ZRAP.yaml @@ -0,0 +1,66 @@ +definitions: + stat: + description: Uncorrelated statistical uncertainties + treatment: ADD + type: UNCORR + sys_corr_1: + description: Systematic uncertainty 1 + treatment: MULT + type: UNCORR +bins: +- stat: 0.009 + sys_corr_1: 5.54526825e-03 +- stat: 0.009 + sys_corr_1: 6.53834842e-03 +- stat: 0.009 + sys_corr_1: 0.005 +- stat: 0.01 + sys_corr_1: 5.54526825e-03 +- stat: 0.01 + sys_corr_1: 6.53834842e-03 +- stat: 0.01 + sys_corr_1: 6.53834842e-03 +- stat: 0.01 + sys_corr_1: 0.006 +- stat: 0.01 + sys_corr_1: 6.16441400e-03 +- stat: 0.009 + sys_corr_1: 6.53834842e-03 +- stat: 0.009 + sys_corr_1: 5.54526825e-03 +- stat: 0.008 + sys_corr_1: 0.006 +- stat: 0.008 + sys_corr_1: 6.53834842e-03 +- stat: 0.008 + sys_corr_1: 5.54526825e-03 +- stat: 0.008 + sys_corr_1: 5.54526825e-03 +- stat: 0.008 + sys_corr_1: 4.55521679e-03 +- stat: 0.008 + sys_corr_1: 5.54526825e-03 +- stat: 0.008 + sys_corr_1: 0.005 +- stat: 0.008 + sys_corr_1: 0.006 +- stat: 0.007 + sys_corr_1: 4.55521679e-03 +- stat: 0.006 + sys_corr_1: 0.004 +- stat: 0.006 + sys_corr_1: 4.55521679e-03 +- stat: 0.005 + sys_corr_1: 0.004 +- stat: 0.004 + sys_corr_1: 3.57071421e-03 +- stat: 0.004 + sys_corr_1: 0.002 +- stat: 0.003 + sys_corr_1: 0.002 +- stat: 0.003 + sys_corr_1: 0.001 +- stat: 0.003 + sys_corr_1: 0.001 +- stat: 0.002 + sys_corr_1: 0.0004 diff --git a/validphys2/src/validphys/commondataparser.py b/validphys2/src/validphys/commondataparser.py index 6ed4779250..b199009c1d 100644 --- a/validphys2/src/validphys/commondataparser.py +++ b/validphys2/src/validphys/commondataparser.py @@ -112,6 +112,8 @@ def _quick_yaml_load(filepath): "SHP_ASY": ("$\\eta$", "$p_T (GeV)$", "$\\sqrt{s} (GeV)$"), "JET_POL": ("$\\eta$", "$p_T^2 (GeV^2)$", "$\\sqrt{s} (GeV)$"), "DIJET_POL": ("$\\m_{1,2} (GeV)", "$\\eta_1$", "$\\eta_2$"), + "DY_Z_Y": ("$y_Z$", "$\\M^2 (GeV^2)$", "$\\sqrt{s} (GeV)$"), + "DY_W_ETA": ("$\\eta$", "$\\M^2 (GeV^2)$", "$\\sqrt{s} (GeV)$"), } PROCESS_DESCRIPTION_LABEL = { diff --git a/validphys2/src/validphys/tests/conftest.py b/validphys2/src/validphys/tests/conftest.py index 100c5bc8c4..3940e0d678 100644 --- a/validphys2/src/validphys/tests/conftest.py +++ b/validphys2/src/validphys/tests/conftest.py @@ -76,7 +76,7 @@ def tmp(tmpdir): FIT_3REPLICAS = "FIT_3REPLICAS_241108" FIT_3REPLICAS_DCUTS = "FIT_3REPLICAS_diffcuts_241108" FIT_ITERATED = "NNPDF40_nnlo_low_precision_240916_iterated" -PSEUDODATA_FIT = "pseudodata_test_fit_n3fit_240916" +PSEUDODATA_FIT = "pseudodata_test_fit_n3fit_241121" base_config = dict(pdf=PDF, use_cuts='nocuts', dataset_inputs=DATA, theoryid=THEORYID_NEW, Q=10) From bd140a9fb55d1789369db5800ead734f98fae29f Mon Sep 17 00:00:00 2001 From: jacoterh <54140851+jacoterh@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:50:15 +0000 Subject: [PATCH 2/3] implementing last comments --- .../CDF_Z0_1P96TEV/data_legacy_ZRAP.yaml | 29 -- .../commondata/CDF_Z0_1P96TEV/metadata.yaml | 4 - .../uncertainties_legacy_ZRAP.yaml | 386 ------------------ .../commondata/D0_WPWM_1P96TEV/metadata.yaml | 1 + .../commondata/D0_Z0_1P96TEV/metadata.yaml | 1 + validphys2/src/validphys/process_options.py | 12 +- 6 files changed, 12 insertions(+), 421 deletions(-) delete mode 100644 nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/data_legacy_ZRAP.yaml delete mode 100644 nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/uncertainties_legacy_ZRAP.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/data_legacy_ZRAP.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/data_legacy_ZRAP.yaml deleted file mode 100644 index 5c83e7c2ea..0000000000 --- a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/data_legacy_ZRAP.yaml +++ /dev/null @@ -1,29 +0,0 @@ -data_central: -- 69.46 -- 71.03 -- 71.1 -- 70.01 -- 67.97 -- 68.22 -- 66.58 -- 66.81 -- 65.05 -- 64.7 -- 62.74 -- 62.02 -- 58.8 -- 56.02 -- 53.37 -- 50.07 -- 46.59 -- 40.97 -- 37.04 -- 33.02 -- 27.65 -- 21.84 -- 18.35 -- 14.13 -- 8.8 -- 5.68 -- 2.93 -- 0.87 diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml index 356fdec42a..2a0937ef41 100644 --- a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml @@ -53,9 +53,5 @@ implemented_observables: - - CDFZRAP_NEW-CDF_ZRAP_MCgrid_500M_last_two_bins_combined data_uncertainties: - uncertainties_ZRAP.yaml - variants: - legacy: - data_uncertainties: - - uncertainties_legacy_ZRAP.yaml data_central: data_ZRAP.yaml ported_from: CDFZRAP_NEW diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/uncertainties_legacy_ZRAP.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/uncertainties_legacy_ZRAP.yaml deleted file mode 100644 index 2f6a03ca7b..0000000000 --- a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/uncertainties_legacy_ZRAP.yaml +++ /dev/null @@ -1,386 +0,0 @@ -definitions: - stat: - description: Uncorrelated statistical uncertainties - treatment: ADD - type: UNCORR - sys_corr_1: - description: 'Sys uncertainty idx: 1' - treatment: MULT - type: CDFLUMI - sys_corr_2: - description: 'Sys uncertainty idx: 2' - treatment: MULT - type: CORR - sys_corr_3: - description: 'Sys uncertainty idx: 3' - treatment: MULT - type: CORR - sys_corr_4: - description: 'Sys uncertainty idx: 4' - treatment: MULT - type: CORR - sys_corr_5: - description: 'Sys uncertainty idx: 5' - treatment: MULT - type: CORR - sys_corr_6: - description: 'Sys uncertainty idx: 6' - treatment: MULT - type: CORR - sys_corr_7: - description: 'Sys uncertainty idx: 7' - treatment: MULT - type: CORR - sys_corr_8: - description: 'Sys uncertainty idx: 8' - treatment: MULT - type: CORR - sys_corr_9: - description: 'Sys uncertainty idx: 9' - treatment: MULT - type: CORR - sys_corr_10: - description: 'Sys uncertainty idx: 10' - treatment: MULT - type: CORR - sys_corr_11: - description: 'Sys uncertainty idx: 11' - treatment: MULT - type: CORR -bins: -- stat: 0.73 - sys_corr_1: -4.1676 - sys_corr_2: -0.022 - sys_corr_3: -0.0302 - sys_corr_4: 0.0 - sys_corr_5: -0.2836 - sys_corr_6: -0.0199 - sys_corr_7: 0.322 - sys_corr_8: 0.2334 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.74 - sys_corr_1: -4.2618 - sys_corr_2: -0.021 - sys_corr_3: -0.0391 - sys_corr_4: 0.0 - sys_corr_5: -0.2899 - sys_corr_6: -0.0377 - sys_corr_7: 0.3169 - sys_corr_8: 0.2313 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.74 - sys_corr_1: -4.266 - sys_corr_2: -0.0187 - sys_corr_3: -0.0655 - sys_corr_4: 0.0 - sys_corr_5: -0.2905 - sys_corr_6: -0.0695 - sys_corr_7: 0.3048 - sys_corr_8: 0.2241 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.72 - sys_corr_1: -4.2006 - sys_corr_2: -0.0172 - sys_corr_3: -0.0905 - sys_corr_4: 0.0 - sys_corr_5: -0.2853 - sys_corr_6: -0.1026 - sys_corr_7: 0.288 - sys_corr_8: 0.2134 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.7 - sys_corr_1: -4.0782 - sys_corr_2: -0.0138 - sys_corr_3: -0.1078 - sys_corr_4: 0.0 - sys_corr_5: -0.2768 - sys_corr_6: -0.1309 - sys_corr_7: 0.2677 - sys_corr_8: 0.2002 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.7 - sys_corr_1: -4.0932 - sys_corr_2: -0.0131 - sys_corr_3: -0.1381 - sys_corr_4: 0.0 - sys_corr_5: -0.2772 - sys_corr_6: -0.1598 - sys_corr_7: 0.2569 - sys_corr_8: 0.1939 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.69 - sys_corr_1: -3.9948 - sys_corr_2: -0.0111 - sys_corr_3: -0.1498 - sys_corr_4: 0.0 - sys_corr_5: -0.2703 - sys_corr_6: -0.1809 - sys_corr_7: 0.2391 - sys_corr_8: 0.1823 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.7 - sys_corr_1: -4.0086 - sys_corr_2: -0.0084 - sys_corr_3: -0.1697 - sys_corr_4: 0.0 - sys_corr_5: -0.2719 - sys_corr_6: -0.218 - sys_corr_7: 0.2283 - sys_corr_8: 0.176 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.69 - sys_corr_1: -3.903 - sys_corr_2: -0.0056 - sys_corr_3: -0.1876 - sys_corr_4: 0.0 - sys_corr_5: -0.266 - sys_corr_6: -0.2513 - sys_corr_7: 0.211 - sys_corr_8: 0.1646 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.69 - sys_corr_1: -3.882 - sys_corr_2: -0.0036 - sys_corr_3: -0.1819 - sys_corr_4: 0.0 - sys_corr_5: -0.2666 - sys_corr_6: -0.286 - sys_corr_7: 0.1987 - sys_corr_8: 0.1571 - sys_corr_9: 0.0 - sys_corr_10: 0.0 - sys_corr_11: 0.0 -- stat: 0.67 - sys_corr_1: -3.7644 - sys_corr_2: -0.0015 - sys_corr_3: -0.2115 - sys_corr_4: -0.0035 - sys_corr_5: -0.251 - sys_corr_6: -0.3001 - sys_corr_7: 0.1818 - sys_corr_8: 0.1458 - sys_corr_9: 0.0008 - sys_corr_10: -0.0027 - sys_corr_11: 0.0005 -- stat: 0.66 - sys_corr_1: -3.7212 - sys_corr_2: -0.0006 - sys_corr_3: -0.2131 - sys_corr_4: -0.0297 - sys_corr_5: -0.2451 - sys_corr_6: -0.2972 - sys_corr_7: 0.1689 - sys_corr_8: 0.1377 - sys_corr_9: 0.0073 - sys_corr_10: -0.0163 - sys_corr_11: 0.0044 -- stat: 0.65 - sys_corr_1: -3.528 - sys_corr_2: 0.0 - sys_corr_3: -0.2413 - sys_corr_4: -0.0438 - sys_corr_5: -0.2193 - sys_corr_6: -0.2835 - sys_corr_7: 0.15 - sys_corr_8: 0.1245 - sys_corr_9: 0.0261 - sys_corr_10: -0.0559 - sys_corr_11: 0.0155 -- stat: 0.65 - sys_corr_1: -3.3612 - sys_corr_2: 0.0 - sys_corr_3: -0.1995 - sys_corr_4: -0.1032 - sys_corr_5: -0.1797 - sys_corr_6: -0.2541 - sys_corr_7: 0.1332 - sys_corr_8: 0.1128 - sys_corr_9: 0.0548 - sys_corr_10: -0.0504 - sys_corr_11: 0.0323 -- stat: 0.63 - sys_corr_1: -3.2022 - sys_corr_2: 0.0 - sys_corr_3: -0.1949 - sys_corr_4: -0.1411 - sys_corr_5: -0.1406 - sys_corr_6: -0.2163 - sys_corr_7: 0.1176 - sys_corr_8: 0.1019 - sys_corr_9: 0.0867 - sys_corr_10: -0.049 - sys_corr_11: 0.051 -- stat: 0.62 - sys_corr_1: -3.0042 - sys_corr_2: 0.0 - sys_corr_3: -0.1817 - sys_corr_4: -0.1489 - sys_corr_5: -0.1068 - sys_corr_6: -0.1787 - sys_corr_7: 0.1017 - sys_corr_8: 0.0905 - sys_corr_9: 0.115 - sys_corr_10: -0.0409 - sys_corr_11: 0.0682 -- stat: 0.61 - sys_corr_1: -2.7954 - sys_corr_2: 0.0 - sys_corr_3: -0.1597 - sys_corr_4: -0.1685 - sys_corr_5: -0.0719 - sys_corr_6: -0.1456 - sys_corr_7: 0.0865 - sys_corr_8: 0.0794 - sys_corr_9: 0.138 - sys_corr_10: -0.0462 - sys_corr_11: 0.0825 -- stat: 0.58 - sys_corr_1: -2.4582 - sys_corr_2: 0.0 - sys_corr_3: -0.1122 - sys_corr_4: -0.2115 - sys_corr_5: -0.0402 - sys_corr_6: -0.1047 - sys_corr_7: 0.069 - sys_corr_8: 0.0656 - sys_corr_9: 0.1477 - sys_corr_10: -0.0608 - sys_corr_11: 0.0895 -- stat: 0.56 - sys_corr_1: -2.2224 - sys_corr_2: 0.0 - sys_corr_3: -0.0827 - sys_corr_4: -0.2142 - sys_corr_5: -0.0196 - sys_corr_6: -0.0791 - sys_corr_7: 0.056 - sys_corr_8: 0.0554 - sys_corr_9: 0.154 - sys_corr_10: -0.098 - sys_corr_11: 0.0905 -- stat: 0.55 - sys_corr_1: -1.9812 - sys_corr_2: 0.0 - sys_corr_3: -0.0529 - sys_corr_4: -0.2074 - sys_corr_5: -0.0071 - sys_corr_6: -0.0632 - sys_corr_7: 0.0442 - sys_corr_8: 0.046 - sys_corr_9: 0.1494 - sys_corr_10: -0.1151 - sys_corr_11: 0.0891 -- stat: 0.52 - sys_corr_1: -1.659 - sys_corr_2: 0.0 - sys_corr_3: -0.0331 - sys_corr_4: -0.1529 - sys_corr_5: -0.0017 - sys_corr_6: -0.0502 - sys_corr_7: 0.0322 - sys_corr_8: 0.0357 - sys_corr_9: 0.1303 - sys_corr_10: -0.0955 - sys_corr_11: 0.0791 -- stat: 0.49 - sys_corr_1: -1.3104 - sys_corr_2: 0.0 - sys_corr_3: -0.0184 - sys_corr_4: -0.1638 - sys_corr_5: -0.0003 - sys_corr_6: -0.0392 - sys_corr_7: 0.0217 - sys_corr_8: 0.0259 - sys_corr_9: 0.1041 - sys_corr_10: -0.0918 - sys_corr_11: 0.0621 -- stat: 0.5 - sys_corr_1: -1.101 - sys_corr_2: 0.0 - sys_corr_3: 0.0 - sys_corr_4: -0.136 - sys_corr_5: 0.0 - sys_corr_6: -0.0354 - sys_corr_7: 0.015 - sys_corr_8: 0.0199 - sys_corr_9: 0.0877 - sys_corr_10: -0.0937 - sys_corr_11: 0.0515 -- stat: 0.49 - sys_corr_1: -0.8478 - sys_corr_2: 0.0 - sys_corr_3: 0.0 - sys_corr_4: -0.1093 - sys_corr_5: 0.0 - sys_corr_6: -0.0293 - sys_corr_7: 0.0091 - sys_corr_8: 0.0139 - sys_corr_9: 0.0676 - sys_corr_10: -0.0894 - sys_corr_11: 0.041 -- stat: 0.45 - sys_corr_1: -0.528 - sys_corr_2: 0.0 - sys_corr_3: 0.0 - sys_corr_4: -0.0569 - sys_corr_5: 0.0 - sys_corr_6: -0.0208 - sys_corr_7: 0.0042 - sys_corr_8: 0.0077 - sys_corr_9: 0.0421 - sys_corr_10: -0.0634 - sys_corr_11: 0.0256 -- stat: 0.44 - sys_corr_1: -0.3408 - sys_corr_2: 0.0 - sys_corr_3: 0.0 - sys_corr_4: -0.0637 - sys_corr_5: 0.0 - sys_corr_6: -0.015 - sys_corr_7: 0.0017 - sys_corr_8: 0.0044 - sys_corr_9: 0.0272 - sys_corr_10: -0.0526 - sys_corr_11: 0.0167 -- stat: 0.41 - sys_corr_1: -0.1758 - sys_corr_2: 0.0 - sys_corr_3: 0.0 - sys_corr_4: -0.1449 - sys_corr_5: 0.0 - sys_corr_6: -0.0081 - sys_corr_7: 0.0004 - sys_corr_8: 0.002 - sys_corr_9: 0.014 - sys_corr_10: -0.0333 - sys_corr_11: 0.0083 -- stat: 0.22 - sys_corr_1: -0.0522 - sys_corr_2: 0.0 - sys_corr_3: 0.0 - sys_corr_4: -0.1061 - sys_corr_5: 0.0 - sys_corr_6: -0.004 - sys_corr_7: -0.0001 - sys_corr_8: 0.0004 - sys_corr_9: 0.0042 - sys_corr_10: -0.0133 - sys_corr_11: 0.0026 diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml index 8206fc593b..79a62981b5 100644 --- a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml @@ -9,6 +9,7 @@ arXiv: journal: Phys. Rev. D91 (2015) 032007 iNSPIRE: url: https://inspirehep.net/literature/1253555 + version: 1 hepdata: url: https://www.hepdata.net/record/ins1253555 version: 1 diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml index 4e80b606fd..2718d43575 100644 --- a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml @@ -9,6 +9,7 @@ arXiv: journal: Phys. Rev. D76 (2007) 012003 iNSPIRE: url: https://inspirehep.net/literature/744624 + version: 1 hepdata: url: https://www.hepdata.net/record/ins744624 version: 1 diff --git a/validphys2/src/validphys/process_options.py b/validphys2/src/validphys/process_options.py index 53016409b5..18e2206183 100644 --- a/validphys2/src/validphys/process_options.py +++ b/validphys2/src/validphys/process_options.py @@ -236,7 +236,7 @@ def _dyboson_xq2map(kin_info): originating from a W boson DY process. """ mass2 = kin_info.get_one_of(_Vars.m_W2, _Vars.m_Z2, _Vars.m_V2) - eta = kin_info.get_one_of(_Vars.eta, _Vars.y) + eta = kin_info.get_one_of(_Vars.eta, _Vars.y, _Vars.abs_eta) sqrts = kin_info[_Vars.sqrts] # eta = y for massless particles @@ -370,7 +370,15 @@ def _dybosonptrap_xq2map(kin_info): DY_2L = _Process( "DY_2L", "DY W or Z -> 2 leptons ", - accepted_variables=(_Vars.y, _Vars.eta, _Vars.m_W2, _Vars.m_Z2, _Vars.m_V2, _Vars.sqrts), + accepted_variables=( + _Vars.y, + _Vars.eta, + _Vars.m_W2, + _Vars.m_Z2, + _Vars.m_V2, + _Vars.sqrts, + _Vars.abs_eta, + ), xq2map_function=_dyboson_xq2map, ) From c9808b9ffe6211ccd404fb3842f43265bdf87a9b Mon Sep 17 00:00:00 2001 From: jacoterh <54140851+jacoterh@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:08:11 +0000 Subject: [PATCH 3/3] updating version --- .../nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml | 5 ++++- .../nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml | 5 ++--- nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml | 5 ++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml index 2a0937ef41..9960e3dcd2 100644 --- a/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/CDF_Z0_1P96TEV/metadata.yaml @@ -11,7 +11,6 @@ iNSPIRE: url: https://inspirehep.net/literature/856131 hepdata: url: https://www.hepdata.net/record/ins856131 - version: 1 implemented_observables: - observable_name: ZRAP observable: @@ -53,5 +52,9 @@ implemented_observables: - - CDFZRAP_NEW-CDF_ZRAP_MCgrid_500M_last_two_bins_combined data_uncertainties: - uncertainties_ZRAP.yaml + variants: + legacy: + data_uncertainties: + - uncertainties_ZRAP.yaml data_central: data_ZRAP.yaml ported_from: CDFZRAP_NEW diff --git a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml index 79a62981b5..5968ecd17d 100644 --- a/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/D0_WPWM_1P96TEV/metadata.yaml @@ -1,6 +1,6 @@ setname: D0_WPWM_1P96TEV -version: 1 -version_comment: Port of old commondata +version: 2 +version_comment: Implementation in the new format nnpdf_metadata: nnpdf31_process: DY CC experiment: D0 @@ -9,7 +9,6 @@ arXiv: journal: Phys. Rev. D91 (2015) 032007 iNSPIRE: url: https://inspirehep.net/literature/1253555 - version: 1 hepdata: url: https://www.hepdata.net/record/ins1253555 version: 1 diff --git a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml index 2718d43575..420f67b8e2 100644 --- a/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/D0_Z0_1P96TEV/metadata.yaml @@ -1,6 +1,6 @@ setname: D0_Z0_1P96TEV -version: 1 -version_comment: Port of old commondata +version: 2 +version_comment: Implementation in the new format nnpdf_metadata: nnpdf31_process: DY NC experiment: D0 @@ -9,7 +9,6 @@ arXiv: journal: Phys. Rev. D76 (2007) 012003 iNSPIRE: url: https://inspirehep.net/literature/744624 - version: 1 hepdata: url: https://www.hepdata.net/record/ins744624 version: 1