diff --git a/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/filter.py b/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/filter.py index e3948ba58c..e82f1a9ab6 100644 --- a/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/filter.py @@ -4,7 +4,7 @@ """ import yaml -from filter_utils import get_data_values +from filter_utils import get_data_values, get_kinematics from nnpdf_data.filter_utils.utils import prettify_float @@ -18,12 +18,19 @@ def filter_ATLAS_Z0_7TEV_36FB_data_kinematic(): central_values = get_data_values() + kin = get_kinematics() + data_central_yaml = {"data_central": central_values} + kinematics_yaml = {"bins": kin} + # write central values and kinematics to yaml file with open("data.yaml", "w") as file: yaml.dump(data_central_yaml, file, sort_keys=False) + with open("kinematics.yaml", "w") as file: + yaml.dump(kinematics_yaml, file, sort_keys=False) + if __name__ == "__main__": filter_ATLAS_Z0_7TEV_36FB_data_kinematic() diff --git a/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/filter_utils.py b/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/filter_utils.py index 7b8fe01bcd..43a62f16bd 100644 --- a/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/filter_utils.py +++ b/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/filter_utils.py @@ -29,5 +29,28 @@ def get_data_values(): return data_central +def get_kinematics(): + """ + returns the kinematics in the form of a list of dictionaries. + """ + kin = [] + + hepdata_table = f"rawdata/HEPData-ins928289-v1-Table_1.yaml" + + with open(hepdata_table, 'r') as file: + input = yaml.safe_load(file) + + for i, M in enumerate(input["independent_variables"][0]['values']): + kin_value = { + 'abs_eta': {'min': None, 'mid': (0.5 * (M['low'] + M['high'])), 'max': None}, + 'm_Z2': {'min': None, 'mid': 8315.17839376, 'max': None}, + 'sqrts': {'min': None, 'mid': 7000.0, 'max': None}, + } + kin.append(kin_value) + + return kin + + if __name__ == "__main__": get_data_values() + get_kinematics() diff --git a/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/kinematics.yaml new file mode 100644 index 0000000000..82f04ee804 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/ATLAS_Z0_7TEV_36PB/kinematics.yaml @@ -0,0 +1,97 @@ +bins: +- abs_eta: + min: null + mid: 0.2 + max: null + m_Z2: + min: null + mid: 8.31517839e+03 + max: null + sqrts: + min: null + mid: 7000.0 + max: null +- abs_eta: + min: null + mid: 6.00000000e-01 + max: null + m_Z2: + min: null + mid: 8.31517839e+03 + max: null + sqrts: + min: null + mid: 7000.0 + max: null +- abs_eta: + min: null + mid: 1.0 + max: null + m_Z2: + min: null + mid: 8.31517839e+03 + max: null + sqrts: + min: null + mid: 7000.0 + max: null +- abs_eta: + min: null + mid: 1.4 + max: null + m_Z2: + min: null + mid: 8.31517839e+03 + max: null + sqrts: + min: null + mid: 7000.0 + max: null +- abs_eta: + min: null + mid: 1.8 + max: null + m_Z2: + min: null + mid: 8.31517839e+03 + max: null + sqrts: + min: null + mid: 7000.0 + max: null +- abs_eta: + min: null + mid: 2.2 + max: null + m_Z2: + min: null + mid: 8.31517839e+03 + max: null + sqrts: + min: null + mid: 7000.0 + max: null +- abs_eta: + min: null + mid: 2.60000000e+00 + max: null + m_Z2: + min: null + mid: 8.31517839e+03 + max: null + sqrts: + min: null + mid: 7000.0 + max: null +- abs_eta: + min: null + mid: 3.2 + max: null + m_Z2: + min: null + mid: 8.31517839e+03 + max: null + sqrts: + min: null + mid: 7000.0 + max: null