diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/data_WPWM-TOT-UNNORM.yaml b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/data_WPWM-TOT-UNNORM.yaml new file mode 100644 index 0000000000..2170cc1648 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/data_WPWM-TOT-UNNORM.yaml @@ -0,0 +1,6 @@ +data_central: +- 5.82064450e+05 +- 4.64341995e+05 +- 4.78111725e+05 +- 371450.4 +- 2.81840095e+05 diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/filter.py b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/filter.py new file mode 100644 index 0000000000..4e7e98cfbd --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/filter.py @@ -0,0 +1,16 @@ +''' +Filter script for CMS_WCHARM_13TEV +''' + +import logging + +from filter_utils import Extractor +import numpy as np +import yaml + +logging.basicConfig(level=logging.INFO, format='[%(levelname)s] %(message)s') + + +if __name__ == "__main__": + CMS_WCHARM = Extractor("./metadata.yaml", "WPWM-TOT-UNNORM", mult_factor=1000) + _, _, _ = CMS_WCHARM.generate_data(variant='default', save_to_yaml=True) diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/filter_utils.py b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/filter_utils.py new file mode 100644 index 0000000000..2bf20feda4 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/filter_utils.py @@ -0,0 +1,304 @@ +import logging +import os + +import numpy as np +import pandas as pd +from sys_uncertainties import SYS_DEFINITIONS, SYS_UNC_BY_BIN +import yaml + +from nnpdf_data.filter_utils.utils import prettify_float, symmetrize_errors + +yaml.add_representer(float, prettify_float) + +SQRTS = 8000 +MW2 = 80.385**2 +CMSLUMI13 = 2.5 # % + +# List of systematic uncertainties that shuold +# be considered uncorrelated +UNCORR_SYS_UNC = ['UnfoldMCstat', 'UnfoldOtherGen', 'UnfoldReweight'] +ART_LABEL = 'art_corr_unc' +STAT_LABEL = 'stat_uncorr_unc' +TABLE = '' + +# From Table 1 of the paper +SYS_UNC_by_bin = [{}] + + +class Extractor: + """ + Extracts kinematics, central data, and uncertainties for a given dataset + + Parameters + ---------- + metadata_file: str + Path to the metadata file + observable: str + The name of the observable for which the data is extracted. The name must + be listed in the metadata file. + """ + + def __init__(self, metadata_file, observable, mult_factor=1): + + # Open metadata and select process + with open(metadata_file, 'r') as file: + metadata = yaml.safe_load(file) + self.metadata = next( + ( + md + for md in metadata["implemented_observables"] + if md['observable_name'] == observable + ), + None, + ) + if self.metadata is None: + raise Exception(f"{observable} is not listed in the metadata file.") + + # Initialise dict of tables + self.tables = {} + self.observable = observable + self.mult_factor = mult_factor + self.kin_labels = self.metadata['kinematic_coverage'] + self.ndata = self.metadata['ndata'] + + # Collect diagonal absoulute uncertainties + # self.diag_unc = self.__collect_diag_unc() + # self.unc_labels = list(self.diag_unc[0].keys()) + # self.unc_labels.pop(0) + + def __retrieve_table(self, table_id): + """ + Implementation of the lazy loading for the tables. If the table + is loaded for the first time, it is stored into an internal + container of the class, so that it will not be loaded each time. + + When called, this functions checks if the table has already been stored + and, if that is the case, returns the stored table. + + Parameters + ---------- + table_id: int + Index that specifies the table + + Return + ------ + The table specified by `table_id`. If not previously loaded, it is also + stored into the internal container for future use. + """ + try: + table = self.tables[str(table_id)] + except KeyError: + logging.debug( + f'Table {table_id} has not already been used or stored.' f' Storing the table...' + ) + with open(f'./rawdata/{TABLE}{table_id}.yaml', 'r') as tab: + tab_dict = yaml.safe_load(tab) + self.tables[str(table_id)] = tab_dict + table = tab_dict + return table + + def __extract_kinematics(self, table: dict): + """ + Extracts the kinematic variables of the single differential + distribution given a table. + + For each bin, it computes the max, min, and mid value of the transverse + momentum of the boson. + + Parameters + ---------- + table: dict + Dictionary containing the bins in the transverse momentum + tab_number: int + Index to select the range of the second kinematic variable + + Return + ------ + List of bins containing min, max, and mid values for each of the kinematic + observables listed in the `kinematic_coverage` of the metadata file. + + """ + data = table['independent_variables'][0] + label = self.kin_labels + kinematics = [] + for bin in data['values']: + abs_eta_min = bin['low'] + abs_eta_max = bin['high'] + kin_bin = { + label[0]: { + 'min': abs_eta_min, + 'mid': (abs_eta_max + abs_eta_min) / 2, + 'max': abs_eta_max, + }, + label[1]: {'min': None, 'mid': MW2, 'max': None}, + } + kinematics.append(kin_bin) + return kinematics + + def generate_kinematics(self): + """ + Function that generates the kinematics by looping over all the + tables specified in the metadata file. The resulting kinematics + is then saved to a yaml file. It relies on the method + `__extract_kinematics`. + """ + + logging.info(f"Generating kinematics for ATLAS_{self.observable}...") + + # Initialise kinematics list + kinematics = [] + ndata = 0 + table = self.metadata["tables"][0] + tab_dict = self.__retrieve_table(table) + kin = self.__extract_kinematics(tab_dict) + kinematics = np.concatenate([kinematics, kin]) + ndata += len(kin) + + # Check number of data agrees with metadata + try: + assert self.metadata['ndata'] is not None + assert self.metadata['ndata'] == ndata + except AssertionError as e: + logging.warning( + f"The number of data in the metafile is either wrong or unspecified." + f" The correct number is {ndata}. Please, update the metafile." + ) + return + return kinematics.tolist() + + def generate_data_and_unc(self, mult_factor=1.0): + """ + Same as `generate_kinematics`, but for central data points. + """ + logging.info(f"Generating central data for CMS_{self.observable}...") + dat_central = [] + stat_unc = [] + asy_sys_unc = [] + table = self.metadata['tables'][0] + tab_dict = self.__retrieve_table(table) + tab_dict = tab_dict['dependent_variables'][0]['values'] + + # Loop over bins + for rap_bin in tab_dict: + dat_central.append(rap_bin['value'] * mult_factor) + stat_unc.append(rap_bin['errors'][0]['symerror'] * mult_factor) + asy_sys_unc.append( + { + key: value * mult_factor + for key, value in rap_bin['errors'][1]['asymerror'].items() + } + ) + return dat_central, stat_unc, asy_sys_unc + + def symmetrized_sys_unc(self): + """Symmetrise systematic uncertainties. Returns the symmetrized uncertainty + and the shift to the central data + """ + symmetrized_uncs = [] + for bin in SYS_UNC_BY_BIN: + unc_dict = {} + for source in bin: + if 'asyserror' in source.keys(): + error = source['asyserror'] + plus = error['high'] + minus = error['low'] + data_delta, sym_error = symmetrize_errors(plus, minus) + unc_dict[source['label']] = {'shift': data_delta, 'sym_error': sym_error} + elif 'syserror' in source.keys(): + unc_dict[source['label']] = {'shift': 0.0, 'sym_error': source['syserror']} + symmetrized_uncs.append(unc_dict) + return symmetrized_uncs + + def __build_unc_definitions(self, variant='default'): + unc_definitions = {} + + # Statistical uncertainty + unc_definitions[STAT_LABEL] = { + 'description': f'Statistical uncertainty', + 'treatment': 'ADD', + 'type': 'UNCORR', + } + + # Add lumi uncertainty + unc_definitions['corr_lumi_unc'] = { + 'description': f'Luminosity uncertainty 2.5%', + 'treatment': 'MULT', + 'type': 'CMSLUMI13', + } + + # Add systematic uncertainty + unc_definitions = unc_definitions | SYS_DEFINITIONS + + if variant != 'default': + raise ValueError(f'The variant {variant} is not implemented yet.') + + return unc_definitions + + def generate_data(self, variant='default', save_to_yaml=False, path='./'): + # Get central data and kinematics + central_data, stat_unc, _ = self.generate_data_and_unc(self.mult_factor) + kinematics = self.generate_kinematics() + + # Uncertainty definitions + unc_definitions = self.__build_unc_definitions(variant=variant) + + sys_artificial = [] # Initialize vector of artificial uncertainties + + symmetrized_sys_uncs = self.symmetrized_sys_unc() + for data_idx, data in enumerate(central_data): + shift = 0 + sys_unc_bin = symmetrized_sys_uncs[data_idx] + + # Statistical uncertainty + unc_dict = {STAT_LABEL: stat_unc[data_idx]} + + # Add shift from symmetrization + tmp = {} + for key, value in sys_unc_bin.items(): + shift += value['shift'] + tmp[key] = value['sym_error'] * central_data[data_idx] * 0.01 + + # Lumi uncertainty + unc_dict['corr_lumi_unc'] = central_data[data_idx] * CMSLUMI13 * 0.01 + + # Shift central + central_data[data_idx] = central_data[data_idx] * (1.0 + shift * 0.01) + + # Add systematic uncertainties + unc_dict = unc_dict | tmp + + sys_artificial.append(unc_dict) + + if save_to_yaml: + # Save kinematics into file + logging.info("Dumping kinematics to file...") + kinematics_yaml = {'bins': kinematics} + with open(path + self.metadata['kinematics']['file'], 'w') as kin_out_file: + yaml.dump(kinematics_yaml, kin_out_file, sort_keys=False) + logging.info("Done!") + + # Save central data into file + logging.info("Dumping kinematics to file...") + dat_central_yaml = {'data_central': central_data} + file_name = self.metadata['data_central'] + with open(path + file_name, 'w') as dat_out_file: + yaml.dump(dat_central_yaml, dat_out_file, sort_keys=False) + logging.info("Done!") + + # Save unertainties + logging.info("Dumping kinematics to file...") + uncertainties_yaml = {'definitions': unc_definitions, 'bins': sys_artificial} + file_name = ( + self.metadata['data_uncertainties'][0] + if variant == 'default' + else self.metadata['variants'][variant]['data_uncertainties'][0] + ) + with open(path + file_name, 'w') as dat_out_file: + yaml.dump(uncertainties_yaml, dat_out_file, sort_keys=False) + logging.info("Done!") + return kinematics, central_data, sys_artificial + else: + return kinematics, central_data, sys_artificial + + def get_table(self, table_id): + return self.__retrieve_table(table_id) diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/kinematics_WPWM-TOT-UNNORM.yaml b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/kinematics_WPWM-TOT-UNNORM.yaml index 793e9a279e..40784420b6 100644 --- a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/kinematics_WPWM-TOT-UNNORM.yaml +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/kinematics_WPWM-TOT-UNNORM.yaml @@ -1,61 +1,41 @@ bins: -- k1: - min: null +- abs_eta: + min: 0.0 mid: 0.2 - max: null - k2: - min: null - mid: 6463.838404 - max: null - k3: - min: null - mid: 13000.0 - max: null -- k1: - min: null - mid: 0.6 - max: null - k2: + max: 0.4 + m_W2: min: null - mid: 6463.838404 + mid: 6.46174823e+03 max: null - k3: +- abs_eta: + min: 0.4 + mid: 6.00000000e-01 + max: 0.8 + m_W2: min: null - mid: 13000.0 + mid: 6.46174823e+03 max: null -- k1: - min: null +- abs_eta: + min: 0.8 mid: 1.05 - max: null - k2: + max: 1.3 + m_W2: min: null - mid: 6463.838404 + mid: 6.46174823e+03 max: null - k3: - min: null - mid: 13000.0 - max: null -- k1: - min: null +- abs_eta: + min: 1.3 mid: 1.55 - max: null - k2: - min: null - mid: 6463.838404 - max: null - k3: + max: 1.8 + m_W2: min: null - mid: 13000.0 + mid: 6.46174823e+03 max: null -- k1: - min: null +- abs_eta: + min: 1.8 mid: 2.1 - max: null - k2: - min: null - mid: 6463.838404 - max: null - k3: + max: 2.4 + m_W2: min: null - mid: 13000.0 + mid: 6.46174823e+03 max: null diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/kinematics_legacy_WPWM-TOT-UNNORM.yaml b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/kinematics_legacy_WPWM-TOT-UNNORM.yaml new file mode 100644 index 0000000000..793e9a279e --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/kinematics_legacy_WPWM-TOT-UNNORM.yaml @@ -0,0 +1,61 @@ +bins: +- k1: + min: null + mid: 0.2 + max: null + k2: + min: null + mid: 6463.838404 + max: null + k3: + min: null + mid: 13000.0 + max: null +- k1: + min: null + mid: 0.6 + max: null + k2: + min: null + mid: 6463.838404 + max: null + k3: + min: null + mid: 13000.0 + max: null +- k1: + min: null + mid: 1.05 + max: null + k2: + min: null + mid: 6463.838404 + max: null + k3: + min: null + mid: 13000.0 + max: null +- k1: + min: null + mid: 1.55 + max: null + k2: + min: null + mid: 6463.838404 + max: null + k3: + min: null + mid: 13000.0 + max: null +- k1: + min: null + mid: 2.1 + max: null + k2: + min: null + mid: 6463.838404 + max: null + k3: + min: null + mid: 13000.0 + max: null diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/metadata.yaml index 0999feed3c..e28be8bbc5 100644 --- a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/metadata.yaml @@ -1,65 +1,61 @@ setname: CMS_WCHARM_13TEV -version: 1 -version_comment: Port of old commondata + nnpdf_metadata: nnpdf31_process: DY CC experiment: CMS + arXiv: url: https://arxiv.org/abs/1811.10021 journal: Eur. Phys. J. C 79 (2019) 269 iNSPIRE: - url: '' + url: https://inspirehep.net/literature/1705068 hepdata: - url: '' - version: -1 + url: https://www.hepdata.net/record/ins1705068 + version: 1 + +version: 2 +version_comment: Implementation in the new format + implemented_observables: - observable_name: WPWM-TOT-UNNORM observable: description: Jet Rapidity Distribution label: CMS $W+c$ total 13 TeV - units: '' - process_type: EWJ_RAP - tables: [] - npoints: [] + units: '[fb]' + process_type: DY_W_ETA + tables: ['WplusCharm_AbsEtaMu_Table'] ndata: 5 plotting: - kinematics_override: ewj_rap_sqrt_scale + kinematics_override: identity dataset_label: CMS $W+c$ total 13 TeV y_label: $d\sigma(W+c)/d|\eta^\mu|$ (fb) x_label: $|\eta^\mu|$ - plot_x: k1 - kinematic_coverage: - - k1 - - k2 - - k3 + plot_x: abs_eta + kinematic_coverage: [abs_eta, m_W2] kinematics: variables: - k1: - description: Variable k1 - label: k1 - units: '' - k2: - description: Variable k2 - label: k2 - units: '' - k3: - description: Variable k3 - label: k3 + abs_eta: + description: Absolute pseudo-rapidity of the Z boson + label: $|\eta|$ units: '' + m_W2: + description: Mass of the W boson squared + label: $m_W^2$ + units: GeV$^{2}$ file: kinematics_WPWM-TOT-UNNORM.yaml + data_central: data_WPWM-TOT-UNNORM.yaml + data_uncertainties: [uncertainties_WPWM-TOT-UNNORM.yaml] theory: conversion_factor: 1.0 operation: add FK_tables: - - CMS_WCHARM_DIFF_UNNORM_13TEV-CMS_WCHARM_13TEV_WPCB_leptrap - - CMS_WCHARM_DIFF_UNNORM_13TEV-CMS_WCHARM_13TEV_WMC_leptrap - data_uncertainties: [] variants: legacy: data_uncertainties: - uncertainties_legacy_WPWM-TOT-UNNORM.yaml legacy_10: data_uncertainties: - - uncertainties_WPWM-TOT-UNNORM_sys_10.yaml - data_central: data_legacy_WPWM-TOT-UNNORM.yaml + - uncertainties_legacy_WPWM-TOT-UNNORM_sys_10.yaml ported_from: CMS_WCHARM_DIFF_UNNORM_13TEV diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/rawdata/WplusCharm_AbsEtaMu_Table.yaml b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/rawdata/WplusCharm_AbsEtaMu_Table.yaml new file mode 100644 index 0000000000..5e02825090 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/rawdata/WplusCharm_AbsEtaMu_Table.yaml @@ -0,0 +1,42 @@ +dependent_variables: +- header: {name: D(SIG(W + CQ))/DETA(MU), units: PB} + qualifiers: + - {name: MU ETA, value: -2.4-2.4} + - {name: MU PT, value: 26 GEV} + - {name: CQ PT, value: 5 GEV} + - {name: SQRT(S), units: GeV, value: '13000.0'} + values: + - errors: + - {label: stat, symerror: 37.17} + - asymerror: {minus: -52.74, plus: 61.16} + label: sys + value: 568.70 + - errors: + - {label: stat, symerror: 28.41} + - asymerror: {minus: -66.08, plus: 61.39} + label: sys + value: 466.91 + - errors: + - {label: stat, symerror: 30.21} + - asymerror: {minus: -53.87, plus: 57.25} + label: sys + value: 479.31 + - errors: + - {label: stat, symerror: 27.45} + - asymerror: {minus: -63.02, plus: 49.44} + label: sys + value: 395.16 + - errors: + - {label: stat, symerror: 24.68} + - asymerror: {minus: -33.91, plus: 38.73} + label: sys + value: 282.83 + +independent_variables: +- header: {name: ABS(ETA(MU))} + values: + - {high: 0.4, low: 0.0} + - {high: 0.8, low: 0.4} + - {high: 1.3, low: 0.8} + - {high: 1.8, low: 1.3} + - {high: 2.4, low: 1.8} diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/sys_uncertainties.py b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/sys_uncertainties.py new file mode 100644 index 0000000000..a759011699 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/sys_uncertainties.py @@ -0,0 +1,143 @@ +import numpy as np + +# Common dict independent of the kinematics +IND_KIN_DICT = [ + {'label': 'track_sys_unc', 'syserror': 2.3}, + {'label': 'brch_sys_unc', 'syserror': 2.4}, + {'label': 'muons_sys_unc', 'syserror': 1.2}, + {'label': 'nsel_sys_unc', 'syserror': 1.5}, + {'label': 'dstar_sys_unc', 'syserror': 0.5}, +] + +SYS_UNC_BY_BIN = [ + # First bin [0, 2.4] + # [ + # *IND_KIN_DICT, + # {'label': 'bkgnorm_sys_unc', 'syserror': 0.5}, + # {'label': 'ptmiss_sys_unc', 'asyserror': {'low': +0.7, 'high': -0.9}}, + # {'label': 'pileup_sys_unc', 'asyserror': {'low': +2.0, 'high': -1.9}}, + # {'label': 'secvrx_sys_unc', 'asyserror': {'low': -1.1, 'high': -1.1}}, + # {'label': 'pdf_sys_unc', 'syserror': 1.2}, + # {'label': 'frag_sys_unc', 'asyserror': {'low': +3.9, 'high': -3.2}}, + # {'label': 'mc_sys_unc', 'asyserror': {'low': +3.6, 'high': -3.3}}, + # ], + # Second bin [0, 0.4] + [ + *IND_KIN_DICT, + {'label': 'bkgnorm_sys_unc', 'asyserror': {'low': +0.9, 'high': -0.8}}, + {'label': 'ptmiss_sys_unc', 'asyserror': {'low': +0.4, 'high': -1.2}}, + {'label': 'pileup_sys_unc', 'asyserror': {'low': +0.4, 'high': -0.5}}, + {'label': 'secvrx_sys_unc', 'asyserror': {'low': +1.3, 'high': +1.3}}, + {'label': 'pdf_sys_unc', 'syserror': 1.3}, + {'label': 'frag_sys_unc', 'asyserror': {'low': +3.4, 'high': -1.8}}, + {'label': 'mc_sys_unc', 'asyserror': {'low': +8.8, 'high': -7.5}}, + ], + # Third bin [0.4, 0.8] + [ + *IND_KIN_DICT, + {'label': 'bkgnorm_sys_unc', 'asyserror': {'low': +1.9, 'high': -0.8}}, + {'label': 'ptmiss_sys_unc', 'asyserror': {'low': +1.3, 'high': -0.3}}, + {'label': 'pileup_sys_unc', 'asyserror': {'low': +2.9, 'high': -3.0}}, + {'label': 'secvrx_sys_unc', 'asyserror': {'low': -1.2, 'high': -1.2}}, + {'label': 'pdf_sys_unc', 'syserror': 0.9}, + {'label': 'frag_sys_unc', 'asyserror': {'low': +7.4, 'high': -5.2}}, + {'label': 'mc_sys_unc', 'asyserror': {'low': +9.0, 'high': -11.9}}, + ], + # Fourth bin [0.8, 1.3] + [ + *IND_KIN_DICT, + {'label': 'bkgnorm_sys_unc', 'asyserror': {'low': +1.4, 'high': -0.5}}, + {'label': 'ptmiss_sys_unc', 'asyserror': {'low': +1.1, 'high': -1.0}}, + {'label': 'pileup_sys_unc', 'asyserror': {'low': +2.0, 'high': -1.9}}, + {'label': 'secvrx_sys_unc', 'asyserror': {'low': -1.5, 'high': -1.5}}, + {'label': 'pdf_sys_unc', 'syserror': 1.4}, + {'label': 'frag_sys_unc', 'asyserror': {'low': +3.3, 'high': -3.0}}, + {'label': 'mc_sys_unc', 'asyserror': {'low': +7.9, 'high': -6.8}}, + ], + # Fifth bin [1.3, 1.8] + [ + *IND_KIN_DICT, + {'label': 'bkgnorm_sys_unc', 'asyserror': {'low': +0.8, 'high': -1.0}}, + {'label': 'ptmiss_sys_unc', 'asyserror': {'low': 0.0, 'high': -2.6}}, + {'label': 'pileup_sys_unc', 'asyserror': {'low': +4.6, 'high': -5.1}}, + {'label': 'secvrx_sys_unc', 'asyserror': {'low': -2.7, 'high': -2.7}}, + {'label': 'pdf_sys_unc', 'syserror': 1.5}, + {'label': 'frag_sys_unc', 'asyserror': {'low': +2.2, 'high': -1.2}}, + {'label': 'mc_sys_unc', 'asyserror': {'low': +9.8, 'high': -14.1}}, + ], + # Sixth bin [1.8, 2.4] + [ + *IND_KIN_DICT, + {'label': 'bkgnorm_sys_unc', 'asyserror': {'low': +0.0, 'high': -0.6}}, + {'label': 'ptmiss_sys_unc', 'asyserror': {'low': 0.0, 'high': +1.5}}, + {'label': 'pileup_sys_unc', 'asyserror': {'low': +2.7, 'high': -2.6}}, + {'label': 'secvrx_sys_unc', 'asyserror': {'low': -2.5, 'high': -2.5}}, + {'label': 'pdf_sys_unc', 'syserror': 1.7}, + {'label': 'frag_sys_unc', 'asyserror': {'low': +7.4, 'high': -5.7}}, + {'label': 'mc_sys_unc', 'asyserror': {'low': +10.1, 'high': -8.5}}, + ], +] + + +SYS_DEFINITIONS = { + 'track_sys_unc': { + 'description': f'Tracking efficiency systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'brch_sys_unc': { + 'description': f'Branching fraction systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'muons_sys_unc': { + 'description': f'Muon identification systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'nsel_sys_unc': { + 'description': f'N_sel determination systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'dstar_sys_unc': { + 'description': f'D*(2010)+- systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'bkgnorm_sys_unc': { + 'description': f'Background normalization systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'ptmiss_sys_unc': { + 'description': f'pT miss systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'pileup_sys_unc': { + 'description': f'Pileup systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'secvrx_sys_unc': { + 'description': f'PDF systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'pdf_sys_unc': { + 'description': f'Fragmentation systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'frag_sys_unc': { + 'description': f'MC statistics systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, + 'mc_sys_unc': { + 'description': f'Symmetrized systematic uncertainty', + 'treatment': 'MULT', + 'type': 'CORR', + }, +} diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/uncertainties_WPWM-TOT-UNNORM.yaml b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/uncertainties_WPWM-TOT-UNNORM.yaml new file mode 100644 index 0000000000..1f65c9407b --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/uncertainties_WPWM-TOT-UNNORM.yaml @@ -0,0 +1,128 @@ +definitions: + stat_uncorr_unc: + description: Statistical uncertainty + treatment: ADD + type: UNCORR + corr_lumi_unc: + description: Luminosity uncertainty 2.5% + treatment: MULT + type: CMSLUMI13 + track_sys_unc: + description: Tracking efficiency systematic uncertainty + treatment: MULT + type: CORR + brch_sys_unc: + description: Branching fraction systematic uncertainty + treatment: MULT + type: CORR + muons_sys_unc: + description: Muon identification systematic uncertainty + treatment: MULT + type: CORR + nsel_sys_unc: + description: N_sel determination systematic uncertainty + treatment: MULT + type: CORR + dstar_sys_unc: + description: D*(2010)+- systematic uncertainty + treatment: MULT + type: CORR + bkgnorm_sys_unc: + description: Background normalization systematic uncertainty + treatment: MULT + type: CORR + ptmiss_sys_unc: + description: pT miss systematic uncertainty + treatment: MULT + type: CORR + pileup_sys_unc: + description: Pileup systematic uncertainty + treatment: MULT + type: CORR + secvrx_sys_unc: + description: PDF systematic uncertainty + treatment: MULT + type: CORR + pdf_sys_unc: + description: Fragmentation systematic uncertainty + treatment: MULT + type: CORR + frag_sys_unc: + description: MC statistics systematic uncertainty + treatment: MULT + type: CORR + mc_sys_unc: + description: Symmetrized systematic uncertainty + treatment: MULT + type: CORR +bins: +- stat_uncorr_unc: 37170.0 + corr_lumi_unc: 14217.5 + track_sys_unc: 13080.1 + brch_sys_unc: 1.36488000e+04 + muons_sys_unc: 6.82440000e+03 + nsel_sys_unc: 8530.5 + dstar_sys_unc: 2843.5 + bkgnorm_sys_unc: 4.85064763e+03 + ptmiss_sys_unc: 5.57209927e+03 + pileup_sys_unc: 2.59055179e+03 + secvrx_sys_unc: 1.04554223e+04 + pdf_sys_unc: 7393.1 + frag_sys_unc: 1.61254281e+04 + mc_sys_unc: 4.66429352e+04 +- stat_uncorr_unc: 28410.0 + corr_lumi_unc: 11672.75 + track_sys_unc: 10738.93 + brch_sys_unc: 11205.84 + muons_sys_unc: 5602.92 + nsel_sys_unc: 7.00365000e+03 + dstar_sys_unc: 2334.55 + bkgnorm_sys_unc: 7.27466158e+03 + ptmiss_sys_unc: 4.98523461e+03 + pileup_sys_unc: 1.37778013e+04 + secvrx_sys_unc: 7.92372545e+03 + pdf_sys_unc: 4.20219000e+03 + frag_sys_unc: 3.02988257e+04 + mc_sys_unc: 4.97226268e+04 +- stat_uncorr_unc: 30210.0 + corr_lumi_unc: 11982.75 + track_sys_unc: 1.10241300e+04 + brch_sys_unc: 11503.44 + muons_sys_unc: 5751.72 + nsel_sys_unc: 7.18965000e+03 + dstar_sys_unc: 2396.55 + bkgnorm_sys_unc: 5.48071651e+03 + ptmiss_sys_unc: 5.04415423e+03 + pileup_sys_unc: 9.35268798e+03 + secvrx_sys_unc: 1.01677005e+04 + pdf_sys_unc: 6710.34 + frag_sys_unc: 1.51324627e+04 + mc_sys_unc: 3.54260028e+04 +- stat_uncorr_unc: 27450.0 + corr_lumi_unc: 9879.0 + track_sys_unc: 9.08868000e+03 + brch_sys_unc: 9483.84 + muons_sys_unc: 4741.92 + nsel_sys_unc: 5.92740000e+03 + dstar_sys_unc: 1975.8 + bkgnorm_sys_unc: 3.60007893e+03 + ptmiss_sys_unc: 8.89768356e+03 + pileup_sys_unc: 1.92161152e+04 + secvrx_sys_unc: 1.50886970e+04 + pdf_sys_unc: 5.92740000e+03 + frag_sys_unc: 7.27566721e+03 + mc_sys_unc: 4.87262084e+04 +- stat_uncorr_unc: 24680.0 + corr_lumi_unc: 7070.75 + track_sys_unc: 6505.09 + brch_sys_unc: 6787.92 + muons_sys_unc: 3393.96 + nsel_sys_unc: 4242.45 + dstar_sys_unc: 1414.15 + bkgnorm_sys_unc: 1.46962779e+03 + ptmiss_sys_unc: 3.67406947e+03 + pileup_sys_unc: 7.49766273e+03 + secvrx_sys_unc: 9.99955055e+03 + pdf_sys_unc: 4808.11 + frag_sys_unc: 1.88347580e+04 + mc_sys_unc: 2.64971109e+04 diff --git a/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/uncertainties_WPWM-TOT-UNNORM_sys_10.yaml b/nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/uncertainties_legacy_WPWM-TOT-UNNORM_sys_10.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/uncertainties_WPWM-TOT-UNNORM_sys_10.yaml rename to nnpdf_data/nnpdf_data/commondata/CMS_WCHARM_13TEV/uncertainties_legacy_WPWM-TOT-UNNORM_sys_10.yaml