From e5683cfc34b4ef5ae59c1b32fcdb246beb5fbe2f Mon Sep 17 00:00:00 2001 From: Tanjona Rabemananjara Date: Tue, 10 Sep 2024 09:57:59 +0200 Subject: [PATCH 01/13] start implementation of single hadron production data --- .../PHENIX-2009_SHIP_200GEV/data.yaml | 13 +++ .../PHENIX-2009_SHIP_200GEV/filter.py | 93 ++++++++++++++++++ .../PHENIX-2009_SHIP_200GEV/kinematics.yaml | 97 +++++++++++++++++++ .../PHENIX-2009_SHIP_200GEV/metadata.yaml | 50 ++++++++++ .../HEPData-ins1282448-v1-Table_7.yaml | 81 ++++++++++++++++ .../uncertainties.yaml | 50 ++++++++++ .../STAR-2006_SHIP_200GEV/data.yaml | 7 ++ .../STAR-2006_SHIP_200GEV/filter.py | 77 +++++++++++++++ .../STAR-2006_SHIP_200GEV/kinematics.yaml | 73 ++++++++++++++ .../STAR-2006_SHIP_200GEV/metadata.yaml | 51 ++++++++++ .../HEPData-ins1253360-v1-Figure_7_Data.yaml | 38 ++++++++ .../STAR-2006_SHIP_200GEV/uncertainties.yaml | 22 +++++ 12 files changed, 652 insertions(+) create mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/data.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/kinematics.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/metadata.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/uncertainties.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/data.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/kinematics.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/metadata.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml create mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/data.yaml new file mode 100644 index 0000000000..e8daaf85ab --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/data.yaml @@ -0,0 +1,13 @@ +data_central: +- 0.00051 +- 0.00096 +- 0.00039 +- -0.00023 +- 0.0006 +- 0.0002 +- 0.0013 +- 0.0026 +- -0.0039 +- 0.0096 +- 0.008 +- 0.061 diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/filter.py b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/filter.py new file mode 100644 index 0000000000..1dc7428f85 --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/filter.py @@ -0,0 +1,93 @@ +from pathlib import Path + +import pandas as pd +import yaml + + +def read_data(path_rawdata: str) -> pd.DataFrame: + data = yaml.safe_load(Path(path_rawdata).read_text()) + + ptvals = data["independent_variables"][0]["values"] + asym_obs = data["dependent_variables"][0]["values"] + + concatenated_table = [] + for i in range(len(ptvals)): + # Compute pT mid-value if not given + pt_mid = (float(ptvals[i]["high"]) + float(ptvals[i]["low"])) / 2 + pt_midval = ptvals[i].get("value", pt_mid) + + concatenated_table.append( + pd.DataFrame( + { + "pT_low": [ptvals[i]["low"]], + "pT": [pt_midval], + "pT_high": [ptvals[i]["high"]], + "asym": [asym_obs[i]["value"]], + "stat_err": [asym_obs[i]["errors"][0]["symerror"]], + "lumi_err": [asym_obs[i]["errors"][1]["symerror"]], + "spol_err": [asym_obs[i]["errors"][2]["symerror"].removesuffix("%")], + } + ) + ) + + return pd.concat(concatenated_table, ignore_index=True) + + +def dump_data(df_table: pd.DataFrame) -> None: + # Dump central data into Yaml file + data_central = [] + for i in range(len(df_table["asym"])): + data_central.append(float(df_table.loc[i, "asym"])) + + with open("data.yaml", "w") as file: + yaml.dump({"data_central": data_central}, file, sort_keys=False) + + # Dump the kinematics into Yaml file + kinematics = [] + for i in range(len(df_table["asym"])): + kin_value = { + "pT": { + "min": float(df_table.loc[i, "pT_low"]), + "mid": float(df_table.loc[i, "pT"]), + "max": float(df_table.loc[i, "pT_high"]), + }, + "sqrts": {"min": None, "mid": 200.0, "max": None}, + } + kinematics.append(kin_value) + + with open("kinematics.yaml", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + # Dump the uncertainties into Yaml file + errors = [] + for i in range(len(df_table)): + error_per_bin = { + "stat": float(df_table.loc[i, "stat_err"]), + "sys_lumi": float(df_table.loc[i, "lumi_err"]), + "sys_pol": data_central[i] * float(df_table.loc[i, "spol_err"]) / 100.0, + } + errors.append(error_per_bin) + + error_definition = { + "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, + "sys_lumi": { + "description": "Systematic uncertainties due to luminosity", + "treatment": "MULT", + "type": "CORR", + }, + "sys_pol": { + "description": "Systematic uncertainties due to polarization", + "treatment": "MULT", + "type": "CORR", + }, + } + + with open("uncertainties.yaml", "w") as file: + yaml.dump({"definitions": error_definition, "bins": errors}, file, sort_keys=False) + + return + + +if __name__ == "__main__": + df_table = read_data("./rawdata/HEPData-ins1282448-v1-Table_7.yaml") + dump_data(df_table=df_table) diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/kinematics.yaml new file mode 100644 index 0000000000..0173f3f63b --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/kinematics.yaml @@ -0,0 +1,97 @@ +bins: +- pT: + min: 1.0 + mid: 1.3 + max: 1.5 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 1.5 + mid: 1.75 + max: 2.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 2.0 + mid: 2.23 + max: 2.5 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 2.5 + mid: 2.72 + max: 3.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 3.0 + mid: 3.22 + max: 3.5 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 3.5 + mid: 3.72 + max: 4.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 4.0 + mid: 4.39 + max: 5.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 5.0 + mid: 5.4 + max: 6.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 6.0 + mid: 6.41 + max: 7.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 7.0 + mid: 7.74 + max: 9.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 9.0 + mid: 10.0 + max: 12.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 12.0 + mid: 13.1 + max: 15.0 + sqrts: + min: null + mid: 200.0 + max: null diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/metadata.yaml new file mode 100644 index 0000000000..1a3aa703fd --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/metadata.yaml @@ -0,0 +1,50 @@ +# Generalia +setname: "PHENIX-2009_SHIP_200GEV_ALL" + +version: 1 +version_comment: "Initial implementation" + +# References +iNSPIRE: + url: "https://inspirehep.net/literature/1282448" +hepdata: + url: "https://www.hepdata.net/record/ins1282448" + version: 1 + +nnpdf_metadata: + nnpdf31_process: "SHP" # Single Hadron Production + experiment: "PHENIX" + +implemented_observables: + - observable_name: "ALL" + observable: + description: "Double helicity asymmetry in inclusive pi^0 production in polarized p+p collisions at sqrt(s)=200 GeV" + label: "$A_{LL$" + units: "" + process_type: "SHP_ASY" + ndata: 12 + tables: [7] + npoints: [12] # List of datapoints per table + + # Plotting information + plotting: + kinematics_override: identity # TODO + dataset_label: "PHENIX ALL" + y_label: "$A_{LL}(p_T)$" + plot_x: pT + kinematic_coverage: [pT, sqrts] + + kinematics: + variables: + pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } + sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } + file: kinematics.yaml + + data_central: data.yaml + data_uncertainties: + - uncertainties.yaml + + theory: + FK_tables: + - - "null" + operation: "null" diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml new file mode 100644 index 0000000000..f8ab996936 --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml @@ -0,0 +1,81 @@ +dependent_variables: +- header: {name: ASYM(LL)} + qualifiers: + - {name: RE, value: P P --> PI0 < GAMMA GAMMA > X} + - {name: SQRT(S), units: GeV, value: '200.0'} + values: + - errors: + - {label: stat, symerror: 0.00085} + - {label: 'sys,rel.lumi.', symerror: 0.00035} + - {label: 'sys,pol.', symerror: 3.4%} + value: 0.00051 + - errors: + - {label: stat, symerror: 0.00055} + - {label: 'sys,rel.lumi.', symerror: 0.00033} + - {label: 'sys,pol.', symerror: 3.5%} + value: 0.00096 + - errors: + - {label: stat, symerror: 0.00058} + - {label: 'sys,rel.lumi.', symerror: 0.00034} + - {label: 'sys,pol.', symerror: 3.5%} + value: 0.00039 + - errors: + - {label: stat, symerror: 0.00074} + - {label: 'sys,rel.lumi.', symerror: 0.00036} + - {label: 'sys,pol.', symerror: 3.4%} + value: -0.00023 + - errors: + - {label: stat, symerror: 0.0011} + - {label: 'sys,rel.lumi.', symerror: 0.0004} + - {label: 'sys,pol.', symerror: 3.2%} + value: 0.0006 + - errors: + - {label: stat, symerror: 0.0015} + - {label: 'sys,rel.lumi.', symerror: 0.00041} + - {label: 'sys,pol.', symerror: 3.1%} + value: 0.0002 + - errors: + - {label: stat, symerror: 0.0018} + - {label: 'sys,rel.lumi.', symerror: 0.00043} + - {label: 'sys,pol.', symerror: 3.1%} + value: 0.0013 + - errors: + - {label: stat, symerror: 0.0035} + - {label: 'sys,rel.lumi.', symerror: 0.00045} + - {label: 'sys,pol.', symerror: 3.0%} + value: 0.0026 + - errors: + - {label: stat, symerror: 0.0061} + - {label: 'sys,rel.lumi.', symerror: 0.00045} + - {label: 'sys,pol.', symerror: 2.9%} + value: -0.0039 + - errors: + - {label: stat, symerror: 0.0085} + - {label: 'sys,rel.lumi.', symerror: 0.00045} + - {label: 'sys,pol.', symerror: 2.9%} + value: 0.0096 + - errors: + - {label: stat, symerror: 0.018} + - {label: 'sys,rel.lumi.', symerror: 0.00058} + - {label: 'sys,pol.', symerror: 3.3%} + value: 0.008 + - errors: + - {label: stat, symerror: 0.069} + - {label: 'sys,rel.lumi.', symerror: 0.001} + - {label: 'sys,pol.', symerror: 3.0%} + value: 0.061 +independent_variables: +- header: {name: PT(PI0), units: GEV} + values: + - {high: 1.5, low: 1.0, value: 1.3} + - {high: 2.0, low: 1.5} + - {high: 2.5, low: 2.0, value: 2.23} + - {high: 3.0, low: 2.5, value: 2.72} + - {high: 3.5, low: 3.0, value: 3.22} + - {high: 4.0, low: 3.5, value: 3.72} + - {high: 5.0, low: 4.0, value: 4.39} + - {high: 6.0, low: 5.0, value: 5.4} + - {high: 7.0, low: 6.0, value: 6.41} + - {high: 9.0, low: 7.0, value: 7.74} + - {high: 12.0, low: 9.0, value: 10.0} + - {high: 15.0, low: 12.0, value: 13.1} diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/uncertainties.yaml new file mode 100644 index 0000000000..ea3c0aa1ad --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/uncertainties.yaml @@ -0,0 +1,50 @@ +definitions: + stat: + description: Statistical uncertainty + treatment: ADD + type: UNCORR + sys_lumi: + description: Systematic uncertainties due to luminosity + treatment: MULT + type: CORR + sys_pol: + description: Systematic uncertainties due to polarization + treatment: MULT + type: CORR +bins: +- stat: 0.00085 + sys_lumi: 0.00035 + sys_pol: 1.734e-05 +- stat: 0.00055 + sys_lumi: 0.00033 + sys_pol: 3.3600000000000004e-05 +- stat: 0.00058 + sys_lumi: 0.00034 + sys_pol: 1.365e-05 +- stat: 0.00074 + sys_lumi: 0.00036 + sys_pol: -7.82e-06 +- stat: 0.0011 + sys_lumi: 0.0004 + sys_pol: 1.92e-05 +- stat: 0.0015 + sys_lumi: 0.00041 + sys_pol: 6.2e-06 +- stat: 0.0018 + sys_lumi: 0.00043 + sys_pol: 4.03e-05 +- stat: 0.0035 + sys_lumi: 0.00045 + sys_pol: 7.8e-05 +- stat: 0.0061 + sys_lumi: 0.00045 + sys_pol: -0.00011309999999999998 +- stat: 0.0085 + sys_lumi: 0.00045 + sys_pol: 0.0002784 +- stat: 0.018 + sys_lumi: 0.00058 + sys_pol: 0.000264 +- stat: 0.069 + sys_lumi: 0.001 + sys_pol: 0.00183 diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/data.yaml new file mode 100644 index 0000000000..1d04db9fd2 --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/data.yaml @@ -0,0 +1,7 @@ +data_central: +- -0.023 +- 0.004 +- 0.048 +- -0.001 +- 0.038 +- -0.045 diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/filter.py b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/filter.py new file mode 100644 index 0000000000..0f964da06a --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/filter.py @@ -0,0 +1,77 @@ +from pathlib import Path + +import pandas as pd +import yaml + + +def read_data(path_rawdata: str) -> pd.DataFrame: + data = yaml.safe_load(Path(path_rawdata).read_text()) + + ptvals = data["independent_variables"][0]["values"] + asym_obs = data["dependent_variables"][0]["values"] + + concatenated_table = [] + for i in range(len(ptvals)): + concatenated_table.append( + pd.DataFrame( + { + "pT": [ptvals[i]["value"]], + "asym": [asym_obs[i]["value"]], + "stat_err": [asym_obs[i]["errors"][0]["symerror"]], + "syst_err": [asym_obs[i]["errors"][1]["symerror"]], + } + ) + ) + + return pd.concat(concatenated_table, ignore_index=True) + + +def dump_data(df_table: pd.DataFrame) -> None: + # Dump central data into Yaml file + data_central = [] + for i in range(len(df_table["asym"])): + data_central.append(float(df_table.loc[i, "asym"])) + + with open("data.yaml", "w") as file: + yaml.dump({"data_central": data_central}, file, sort_keys=False) + + # Dump the kinematics into Yaml file + kinematics = [] + for i in range(len(df_table["asym"])): + kin_value = { + "pT": {"min": None, "mid": float(df_table.loc[i, "pT"]), "max": None}, + "sqrts": {"min": None, "mid": 200.0, "max": None}, + "eta": {"min": 0.8, "mid": 1.4, "max": 2.0}, + } + kinematics.append(kin_value) + + with open("kinematics.yaml", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + # Dump the uncertainties into Yaml file + errors = [] + for i in range(len(df_table)): + error_per_bin = { + "stat": float(df_table.loc[i, "stat_err"]), + "syst": float(df_table.loc[i, "syst_err"]), + } + errors.append(error_per_bin) + + error_definition = { + "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, + "syst": { + "description": "Systematic uncertainties due to beam polarization", + "treatment": "MULT", + "type": "CORR", + }, + } + + with open("uncertainties.yaml", "w") as file: + yaml.dump({"definitions": error_definition, "bins": errors}, file, sort_keys=False) + + return + + +if __name__ == "__main__": + df_table = read_data("./rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml") + dump_data(df_table=df_table) diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/kinematics.yaml new file mode 100644 index 0000000000..8aedac3e15 --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/kinematics.yaml @@ -0,0 +1,73 @@ +bins: +- pT: + min: null + mid: 5.57692 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 6.51397 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 7.48737 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 8.4765 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 9.44489 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 10.7949 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/metadata.yaml new file mode 100644 index 0000000000..c4c1c1c6b0 --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/metadata.yaml @@ -0,0 +1,51 @@ +# Generalia +setname: "STAR-2006_SHIP_200GEV_ALL" + +version: 1 +version_comment: "Initial implementation" + +# References +iNSPIRE: + url: "https://inspirehep.net/literature/1253360" +hepdata: + url: "https://www.hepdata.net/record/ins1253360" + version: 1 + +nnpdf_metadata: + nnpdf31_process: "SHP" # Single Hadron Production + experiment: "STAR" + +implemented_observables: + - observable_name: "ALL" + observable: + description: "Neutral pion spin asymmetries at intermediate pseudorapidity in polarized proton collisions sqrt(s)=200 GeV" + label: "$A_{LL$" + units: "" + process_type: "SHP_ASY" + ndata: 6 + tables: [7] + npoints: [6] # List of datapoints per table + + # Plotting information + plotting: + kinematics_override: identity # TODO + dataset_label: "STAR ALL" + y_label: "$A_{LL}(p_T)$" + plot_x: pT + kinematic_coverage: [pT, sqrts, eta] + + kinematics: + variables: + pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } + sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } + eta: { description: "Pseudorapidity", label: r"$\eta$", units: "" } + file: kinematics.yaml + + data_central: data.yaml + data_uncertainties: + - uncertainties.yaml + + theory: + FK_tables: + - - "null" + operation: "null" diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml new file mode 100644 index 0000000000..73fccd7b0a --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml @@ -0,0 +1,38 @@ +independent_variables: +- header: {name: '$p_{T} [GeV/c]$'} + values: + - {value: 5.57692} + - {value: 6.51397} + - {value: 7.48737} + - {value: 8.4765} + - {value: 9.44489} + - {value: 10.7949} +dependent_variables: +- header: {name: '$A_{LL}$'} + qualifiers: + - {name: '-', value: 'STAR Data'} + values: + - value: -0.023 + errors: + - {symerror: 0.019, label: 'stat error'} + - {symerror: 0.002, label: 'sys error'} + - value: 0.004 + errors: + - {symerror: 0.021, label: 'stat error'} + - {symerror: 0.004, label: 'sys error'} + - value: 0.048 + errors: + - {symerror: 0.028, label: 'stat error'} + - {symerror: 0.006, label: 'sys error'} + - value: -0.001 + errors: + - {symerror: 0.045, label: 'stat error'} + - {symerror: 0.007, label: 'sys error'} + - value: 0.038 + errors: + - {symerror: 0.060, label: 'stat error'} + - {symerror: 0.009, label: 'sys error'} + - value: -0.045 + errors: + - {symerror: 0.072, label: 'stat error'} + - {symerror: 0.009, label: 'sys error'} diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/uncertainties.yaml new file mode 100644 index 0000000000..09524131cf --- /dev/null +++ b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/uncertainties.yaml @@ -0,0 +1,22 @@ +definitions: + stat: + description: Statistical uncertainty + treatment: ADD + type: UNCORR + syst: + description: Systematic uncertainties due to beam polarization + treatment: MULT + type: CORR +bins: +- stat: 0.019 + syst: 0.002 +- stat: 0.021 + syst: 0.004 +- stat: 0.028 + syst: 0.006 +- stat: 0.045 + syst: 0.007 +- stat: 0.06 + syst: 0.009 +- stat: 0.072 + syst: 0.009 From 7e6c1ff588f2c989ec3c10d963dbf922298ba40a Mon Sep 17 00:00:00 2001 From: Tanjona Rabemananjara Date: Tue, 10 Sep 2024 17:48:25 +0200 Subject: [PATCH 02/13] fix documentation --- doc/sphinx/source/data/dataset-naming-convention.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/sphinx/source/data/dataset-naming-convention.rst b/doc/sphinx/source/data/dataset-naming-convention.rst index 51f4036b82..f0bee2dab7 100644 --- a/doc/sphinx/source/data/dataset-naming-convention.rst +++ b/doc/sphinx/source/data/dataset-naming-convention.rst @@ -13,11 +13,11 @@ constructed following this [Backus–Naur form]:: ::= "_" - ::= "ATLAS" | "BCDMS" | "CDF" | "CHORUS" | "CMS" | "D0" | "DYE605" | "DYE866" + ::= "ATLAS" | "BCDMS" | "CDF" | "CHORUS" | "CMS" | "D0" | "DYE605" | "DYE866" | "DYE906" | "EMC" | "H1" | "HERA" | "LHCB" | "NMC" | "NNPDF" | "NUTEV" | "SLAC" | "ZEUS" - ::= "1JET" | "2JET" | "CC" | "DY" | "INTEG" | "NC" | "PH" | "POS" | "SINGLETOP" + ::= "1JET" | "2JET" | "CC" | "DY" | "INTEG" | "NC" | "PH" | "POS" | "SHP" | "SINGLETOP" | "TTBAR" | "WCHARM" | "WJ" | "WPWM" | "Z0" | "Z0J" ::= | "P" | "NOTFIXED" @@ -91,6 +91,7 @@ Processes - `NC`: DIS neutral-current - `POS`: auxiliary dataset for positivity constraints; only valid for `NNPDF` experiment +- `SHP`: single hadron production - `TTBAR`: top–anti-top production - `WM`: production of a single negatively-charged lepton (charged current off-shell Drell–Yan) From 9c281b0e2b324234af3f238edd108231f4a1b69b Mon Sep 17 00:00:00 2001 From: Tanjona Rabemananjara Date: Tue, 10 Sep 2024 23:05:45 +0200 Subject: [PATCH 03/13] fix various namings --- .../data.yaml | 0 .../filter.py | 0 .../kinematics.yaml | 0 .../metadata.yaml | 2 +- .../rawdata/HEPData-ins1282448-v1-Table_7.yaml | 0 .../uncertainties.yaml | 0 .../{STAR-2006_SHIP_200GEV => STAR-2006_SHP_200GEV}/data.yaml | 0 .../{STAR-2006_SHIP_200GEV => STAR-2006_SHP_200GEV}/filter.py | 0 .../kinematics.yaml | 0 .../metadata.yaml | 2 +- .../rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml | 0 .../uncertainties.yaml | 0 validphys2/src/validphys/commondataparser.py | 2 ++ 13 files changed, 4 insertions(+), 2 deletions(-) rename nnpdf_data/nnpdf_data/new_commondata/{PHENIX-2009_SHIP_200GEV => PHENIX-2009_SHP_200GEV}/data.yaml (100%) rename nnpdf_data/nnpdf_data/new_commondata/{PHENIX-2009_SHIP_200GEV => PHENIX-2009_SHP_200GEV}/filter.py (100%) rename nnpdf_data/nnpdf_data/new_commondata/{PHENIX-2009_SHIP_200GEV => PHENIX-2009_SHP_200GEV}/kinematics.yaml (100%) rename nnpdf_data/nnpdf_data/new_commondata/{PHENIX-2009_SHIP_200GEV => PHENIX-2009_SHP_200GEV}/metadata.yaml (96%) rename nnpdf_data/nnpdf_data/new_commondata/{PHENIX-2009_SHIP_200GEV => PHENIX-2009_SHP_200GEV}/rawdata/HEPData-ins1282448-v1-Table_7.yaml (100%) rename nnpdf_data/nnpdf_data/new_commondata/{PHENIX-2009_SHIP_200GEV => PHENIX-2009_SHP_200GEV}/uncertainties.yaml (100%) rename nnpdf_data/nnpdf_data/new_commondata/{STAR-2006_SHIP_200GEV => STAR-2006_SHP_200GEV}/data.yaml (100%) rename nnpdf_data/nnpdf_data/new_commondata/{STAR-2006_SHIP_200GEV => STAR-2006_SHP_200GEV}/filter.py (100%) rename nnpdf_data/nnpdf_data/new_commondata/{STAR-2006_SHIP_200GEV => STAR-2006_SHP_200GEV}/kinematics.yaml (100%) rename nnpdf_data/nnpdf_data/new_commondata/{STAR-2006_SHIP_200GEV => STAR-2006_SHP_200GEV}/metadata.yaml (97%) rename nnpdf_data/nnpdf_data/new_commondata/{STAR-2006_SHIP_200GEV => STAR-2006_SHP_200GEV}/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml (100%) rename nnpdf_data/nnpdf_data/new_commondata/{STAR-2006_SHIP_200GEV => STAR-2006_SHP_200GEV}/uncertainties.yaml (100%) diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/data.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/data.yaml rename to nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/data.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/filter.py b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/filter.py similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/filter.py rename to nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/filter.py diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/kinematics.yaml rename to nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml similarity index 96% rename from nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/metadata.yaml rename to nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml index 1a3aa703fd..ba3c8e7c64 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml @@ -1,5 +1,5 @@ # Generalia -setname: "PHENIX-2009_SHIP_200GEV_ALL" +setname: "PHENIX-2009_SHP_200GEV" version: 1 version_comment: "Initial implementation" diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml rename to nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHIP_200GEV/uncertainties.yaml rename to nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/data.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/data.yaml rename to nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/data.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/filter.py b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/filter.py similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/filter.py rename to nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/filter.py diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/kinematics.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/kinematics.yaml rename to nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/kinematics.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml similarity index 97% rename from nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/metadata.yaml rename to nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml index c4c1c1c6b0..39874ee126 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml @@ -1,5 +1,5 @@ # Generalia -setname: "STAR-2006_SHIP_200GEV_ALL" +setname: "STAR-2006_SHP_200GEV" version: 1 version_comment: "Initial implementation" diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml rename to nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/uncertainties.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHIP_200GEV/uncertainties.yaml rename to nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/uncertainties.yaml diff --git a/validphys2/src/validphys/commondataparser.py b/validphys2/src/validphys/commondataparser.py index 60440869e7..d64d3c0d65 100644 --- a/validphys2/src/validphys/commondataparser.py +++ b/validphys2/src/validphys/commondataparser.py @@ -109,6 +109,7 @@ def _quick_yaml_load(filepath): "JET": ("$\\eta$", "$p_T^2 (GeV^2)$", "$\\sqrt{s} (GeV)$"), "PHT": ("$\\eta_\\gamma$", "$E_{T,\\gamma}^2 (GeV^2)$", "$\\sqrt{s} (GeV)$"), "SIA": ("$z$", "$Q^2 (GeV^2)$", "$y$"), + "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$"), } @@ -137,6 +138,7 @@ def _quick_yaml_load(filepath): "DYP": "Fixed-Target Drell-Yan", "JET_POL": "Inclusive Jet longitudinal double-spin asymmetry", "DIJET_POL": "Dijets longitudinal double-spin asymmetry", + "SHP_ASY": "double spin asymmetry in single hadron production", } From f3879bcee1179661362f9f005c576371467db954 Mon Sep 17 00:00:00 2001 From: Tanjona Rabemananjara Date: Tue, 17 Sep 2024 13:02:34 +0200 Subject: [PATCH 04/13] remove theory inputs from metadata --- .../new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml | 7 +------ .../new_commondata/STAR-2006_SHP_200GEV/metadata.yaml | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml index ba3c8e7c64..a20990a65b 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml @@ -19,7 +19,7 @@ implemented_observables: - observable_name: "ALL" observable: description: "Double helicity asymmetry in inclusive pi^0 production in polarized p+p collisions at sqrt(s)=200 GeV" - label: "$A_{LL$" + label: "$A_{LL}$" units: "" process_type: "SHP_ASY" ndata: 12 @@ -43,8 +43,3 @@ implemented_observables: data_central: data.yaml data_uncertainties: - uncertainties.yaml - - theory: - FK_tables: - - - "null" - operation: "null" diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml index 39874ee126..08d79b5517 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml @@ -19,7 +19,7 @@ implemented_observables: - observable_name: "ALL" observable: description: "Neutral pion spin asymmetries at intermediate pseudorapidity in polarized proton collisions sqrt(s)=200 GeV" - label: "$A_{LL$" + label: "$A_{LL}$" units: "" process_type: "SHP_ASY" ndata: 6 @@ -44,8 +44,3 @@ implemented_observables: data_central: data.yaml data_uncertainties: - uncertainties.yaml - - theory: - FK_tables: - - - "null" - operation: "null" From e3f1e3ab12ef537e1a4830a6006289eb00e1d7b6 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 09:36:37 +0200 Subject: [PATCH 05/13] move new commondata -> commondata --- .../PHENIX-2009_SHP_200GEV/data.yaml | 13 --- .../PHENIX-2009_SHP_200GEV/filter.py | 93 ------------------ .../PHENIX-2009_SHP_200GEV/kinematics.yaml | 97 ------------------- .../PHENIX-2009_SHP_200GEV/metadata.yaml | 45 --------- .../HEPData-ins1282448-v1-Table_7.yaml | 81 ---------------- .../PHENIX-2009_SHP_200GEV/uncertainties.yaml | 50 ---------- .../STAR-2006_SHP_200GEV/data.yaml | 7 -- .../STAR-2006_SHP_200GEV/filter.py | 77 --------------- .../STAR-2006_SHP_200GEV/kinematics.yaml | 73 -------------- .../STAR-2006_SHP_200GEV/metadata.yaml | 46 --------- .../HEPData-ins1253360-v1-Figure_7_Data.yaml | 38 -------- .../STAR-2006_SHP_200GEV/uncertainties.yaml | 22 ----- 12 files changed, 642 deletions(-) delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/data.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/filter.py delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/data.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/filter.py delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/kinematics.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml delete mode 100644 nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/data.yaml deleted file mode 100644 index e8daaf85ab..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/data.yaml +++ /dev/null @@ -1,13 +0,0 @@ -data_central: -- 0.00051 -- 0.00096 -- 0.00039 -- -0.00023 -- 0.0006 -- 0.0002 -- 0.0013 -- 0.0026 -- -0.0039 -- 0.0096 -- 0.008 -- 0.061 diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/filter.py deleted file mode 100644 index 1dc7428f85..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/filter.py +++ /dev/null @@ -1,93 +0,0 @@ -from pathlib import Path - -import pandas as pd -import yaml - - -def read_data(path_rawdata: str) -> pd.DataFrame: - data = yaml.safe_load(Path(path_rawdata).read_text()) - - ptvals = data["independent_variables"][0]["values"] - asym_obs = data["dependent_variables"][0]["values"] - - concatenated_table = [] - for i in range(len(ptvals)): - # Compute pT mid-value if not given - pt_mid = (float(ptvals[i]["high"]) + float(ptvals[i]["low"])) / 2 - pt_midval = ptvals[i].get("value", pt_mid) - - concatenated_table.append( - pd.DataFrame( - { - "pT_low": [ptvals[i]["low"]], - "pT": [pt_midval], - "pT_high": [ptvals[i]["high"]], - "asym": [asym_obs[i]["value"]], - "stat_err": [asym_obs[i]["errors"][0]["symerror"]], - "lumi_err": [asym_obs[i]["errors"][1]["symerror"]], - "spol_err": [asym_obs[i]["errors"][2]["symerror"].removesuffix("%")], - } - ) - ) - - return pd.concat(concatenated_table, ignore_index=True) - - -def dump_data(df_table: pd.DataFrame) -> None: - # Dump central data into Yaml file - data_central = [] - for i in range(len(df_table["asym"])): - data_central.append(float(df_table.loc[i, "asym"])) - - with open("data.yaml", "w") as file: - yaml.dump({"data_central": data_central}, file, sort_keys=False) - - # Dump the kinematics into Yaml file - kinematics = [] - for i in range(len(df_table["asym"])): - kin_value = { - "pT": { - "min": float(df_table.loc[i, "pT_low"]), - "mid": float(df_table.loc[i, "pT"]), - "max": float(df_table.loc[i, "pT_high"]), - }, - "sqrts": {"min": None, "mid": 200.0, "max": None}, - } - kinematics.append(kin_value) - - with open("kinematics.yaml", "w") as file: - yaml.dump({"bins": kinematics}, file, sort_keys=False) - - # Dump the uncertainties into Yaml file - errors = [] - for i in range(len(df_table)): - error_per_bin = { - "stat": float(df_table.loc[i, "stat_err"]), - "sys_lumi": float(df_table.loc[i, "lumi_err"]), - "sys_pol": data_central[i] * float(df_table.loc[i, "spol_err"]) / 100.0, - } - errors.append(error_per_bin) - - error_definition = { - "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, - "sys_lumi": { - "description": "Systematic uncertainties due to luminosity", - "treatment": "MULT", - "type": "CORR", - }, - "sys_pol": { - "description": "Systematic uncertainties due to polarization", - "treatment": "MULT", - "type": "CORR", - }, - } - - with open("uncertainties.yaml", "w") as file: - yaml.dump({"definitions": error_definition, "bins": errors}, file, sort_keys=False) - - return - - -if __name__ == "__main__": - df_table = read_data("./rawdata/HEPData-ins1282448-v1-Table_7.yaml") - dump_data(df_table=df_table) diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml deleted file mode 100644 index 0173f3f63b..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml +++ /dev/null @@ -1,97 +0,0 @@ -bins: -- pT: - min: 1.0 - mid: 1.3 - max: 1.5 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 1.5 - mid: 1.75 - max: 2.0 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 2.0 - mid: 2.23 - max: 2.5 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 2.5 - mid: 2.72 - max: 3.0 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 3.0 - mid: 3.22 - max: 3.5 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 3.5 - mid: 3.72 - max: 4.0 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 4.0 - mid: 4.39 - max: 5.0 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 5.0 - mid: 5.4 - max: 6.0 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 6.0 - mid: 6.41 - max: 7.0 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 7.0 - mid: 7.74 - max: 9.0 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 9.0 - mid: 10.0 - max: 12.0 - sqrts: - min: null - mid: 200.0 - max: null -- pT: - min: 12.0 - mid: 13.1 - max: 15.0 - sqrts: - min: null - mid: 200.0 - max: null diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml deleted file mode 100644 index a20990a65b..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/metadata.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Generalia -setname: "PHENIX-2009_SHP_200GEV" - -version: 1 -version_comment: "Initial implementation" - -# References -iNSPIRE: - url: "https://inspirehep.net/literature/1282448" -hepdata: - url: "https://www.hepdata.net/record/ins1282448" - version: 1 - -nnpdf_metadata: - nnpdf31_process: "SHP" # Single Hadron Production - experiment: "PHENIX" - -implemented_observables: - - observable_name: "ALL" - observable: - description: "Double helicity asymmetry in inclusive pi^0 production in polarized p+p collisions at sqrt(s)=200 GeV" - label: "$A_{LL}$" - units: "" - process_type: "SHP_ASY" - ndata: 12 - tables: [7] - npoints: [12] # List of datapoints per table - - # Plotting information - plotting: - kinematics_override: identity # TODO - dataset_label: "PHENIX ALL" - y_label: "$A_{LL}(p_T)$" - plot_x: pT - kinematic_coverage: [pT, sqrts] - - kinematics: - variables: - pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } - sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } - file: kinematics.yaml - - data_central: data.yaml - data_uncertainties: - - uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml deleted file mode 100644 index f8ab996936..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml +++ /dev/null @@ -1,81 +0,0 @@ -dependent_variables: -- header: {name: ASYM(LL)} - qualifiers: - - {name: RE, value: P P --> PI0 < GAMMA GAMMA > X} - - {name: SQRT(S), units: GeV, value: '200.0'} - values: - - errors: - - {label: stat, symerror: 0.00085} - - {label: 'sys,rel.lumi.', symerror: 0.00035} - - {label: 'sys,pol.', symerror: 3.4%} - value: 0.00051 - - errors: - - {label: stat, symerror: 0.00055} - - {label: 'sys,rel.lumi.', symerror: 0.00033} - - {label: 'sys,pol.', symerror: 3.5%} - value: 0.00096 - - errors: - - {label: stat, symerror: 0.00058} - - {label: 'sys,rel.lumi.', symerror: 0.00034} - - {label: 'sys,pol.', symerror: 3.5%} - value: 0.00039 - - errors: - - {label: stat, symerror: 0.00074} - - {label: 'sys,rel.lumi.', symerror: 0.00036} - - {label: 'sys,pol.', symerror: 3.4%} - value: -0.00023 - - errors: - - {label: stat, symerror: 0.0011} - - {label: 'sys,rel.lumi.', symerror: 0.0004} - - {label: 'sys,pol.', symerror: 3.2%} - value: 0.0006 - - errors: - - {label: stat, symerror: 0.0015} - - {label: 'sys,rel.lumi.', symerror: 0.00041} - - {label: 'sys,pol.', symerror: 3.1%} - value: 0.0002 - - errors: - - {label: stat, symerror: 0.0018} - - {label: 'sys,rel.lumi.', symerror: 0.00043} - - {label: 'sys,pol.', symerror: 3.1%} - value: 0.0013 - - errors: - - {label: stat, symerror: 0.0035} - - {label: 'sys,rel.lumi.', symerror: 0.00045} - - {label: 'sys,pol.', symerror: 3.0%} - value: 0.0026 - - errors: - - {label: stat, symerror: 0.0061} - - {label: 'sys,rel.lumi.', symerror: 0.00045} - - {label: 'sys,pol.', symerror: 2.9%} - value: -0.0039 - - errors: - - {label: stat, symerror: 0.0085} - - {label: 'sys,rel.lumi.', symerror: 0.00045} - - {label: 'sys,pol.', symerror: 2.9%} - value: 0.0096 - - errors: - - {label: stat, symerror: 0.018} - - {label: 'sys,rel.lumi.', symerror: 0.00058} - - {label: 'sys,pol.', symerror: 3.3%} - value: 0.008 - - errors: - - {label: stat, symerror: 0.069} - - {label: 'sys,rel.lumi.', symerror: 0.001} - - {label: 'sys,pol.', symerror: 3.0%} - value: 0.061 -independent_variables: -- header: {name: PT(PI0), units: GEV} - values: - - {high: 1.5, low: 1.0, value: 1.3} - - {high: 2.0, low: 1.5} - - {high: 2.5, low: 2.0, value: 2.23} - - {high: 3.0, low: 2.5, value: 2.72} - - {high: 3.5, low: 3.0, value: 3.22} - - {high: 4.0, low: 3.5, value: 3.72} - - {high: 5.0, low: 4.0, value: 4.39} - - {high: 6.0, low: 5.0, value: 5.4} - - {high: 7.0, low: 6.0, value: 6.41} - - {high: 9.0, low: 7.0, value: 7.74} - - {high: 12.0, low: 9.0, value: 10.0} - - {high: 15.0, low: 12.0, value: 13.1} diff --git a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml deleted file mode 100644 index ea3c0aa1ad..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml +++ /dev/null @@ -1,50 +0,0 @@ -definitions: - stat: - description: Statistical uncertainty - treatment: ADD - type: UNCORR - sys_lumi: - description: Systematic uncertainties due to luminosity - treatment: MULT - type: CORR - sys_pol: - description: Systematic uncertainties due to polarization - treatment: MULT - type: CORR -bins: -- stat: 0.00085 - sys_lumi: 0.00035 - sys_pol: 1.734e-05 -- stat: 0.00055 - sys_lumi: 0.00033 - sys_pol: 3.3600000000000004e-05 -- stat: 0.00058 - sys_lumi: 0.00034 - sys_pol: 1.365e-05 -- stat: 0.00074 - sys_lumi: 0.00036 - sys_pol: -7.82e-06 -- stat: 0.0011 - sys_lumi: 0.0004 - sys_pol: 1.92e-05 -- stat: 0.0015 - sys_lumi: 0.00041 - sys_pol: 6.2e-06 -- stat: 0.0018 - sys_lumi: 0.00043 - sys_pol: 4.03e-05 -- stat: 0.0035 - sys_lumi: 0.00045 - sys_pol: 7.8e-05 -- stat: 0.0061 - sys_lumi: 0.00045 - sys_pol: -0.00011309999999999998 -- stat: 0.0085 - sys_lumi: 0.00045 - sys_pol: 0.0002784 -- stat: 0.018 - sys_lumi: 0.00058 - sys_pol: 0.000264 -- stat: 0.069 - sys_lumi: 0.001 - sys_pol: 0.00183 diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/data.yaml deleted file mode 100644 index 1d04db9fd2..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/data.yaml +++ /dev/null @@ -1,7 +0,0 @@ -data_central: -- -0.023 -- 0.004 -- 0.048 -- -0.001 -- 0.038 -- -0.045 diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/filter.py deleted file mode 100644 index 0f964da06a..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/filter.py +++ /dev/null @@ -1,77 +0,0 @@ -from pathlib import Path - -import pandas as pd -import yaml - - -def read_data(path_rawdata: str) -> pd.DataFrame: - data = yaml.safe_load(Path(path_rawdata).read_text()) - - ptvals = data["independent_variables"][0]["values"] - asym_obs = data["dependent_variables"][0]["values"] - - concatenated_table = [] - for i in range(len(ptvals)): - concatenated_table.append( - pd.DataFrame( - { - "pT": [ptvals[i]["value"]], - "asym": [asym_obs[i]["value"]], - "stat_err": [asym_obs[i]["errors"][0]["symerror"]], - "syst_err": [asym_obs[i]["errors"][1]["symerror"]], - } - ) - ) - - return pd.concat(concatenated_table, ignore_index=True) - - -def dump_data(df_table: pd.DataFrame) -> None: - # Dump central data into Yaml file - data_central = [] - for i in range(len(df_table["asym"])): - data_central.append(float(df_table.loc[i, "asym"])) - - with open("data.yaml", "w") as file: - yaml.dump({"data_central": data_central}, file, sort_keys=False) - - # Dump the kinematics into Yaml file - kinematics = [] - for i in range(len(df_table["asym"])): - kin_value = { - "pT": {"min": None, "mid": float(df_table.loc[i, "pT"]), "max": None}, - "sqrts": {"min": None, "mid": 200.0, "max": None}, - "eta": {"min": 0.8, "mid": 1.4, "max": 2.0}, - } - kinematics.append(kin_value) - - with open("kinematics.yaml", "w") as file: - yaml.dump({"bins": kinematics}, file, sort_keys=False) - - # Dump the uncertainties into Yaml file - errors = [] - for i in range(len(df_table)): - error_per_bin = { - "stat": float(df_table.loc[i, "stat_err"]), - "syst": float(df_table.loc[i, "syst_err"]), - } - errors.append(error_per_bin) - - error_definition = { - "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, - "syst": { - "description": "Systematic uncertainties due to beam polarization", - "treatment": "MULT", - "type": "CORR", - }, - } - - with open("uncertainties.yaml", "w") as file: - yaml.dump({"definitions": error_definition, "bins": errors}, file, sort_keys=False) - - return - - -if __name__ == "__main__": - df_table = read_data("./rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml") - dump_data(df_table=df_table) diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/kinematics.yaml deleted file mode 100644 index 8aedac3e15..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/kinematics.yaml +++ /dev/null @@ -1,73 +0,0 @@ -bins: -- pT: - min: null - mid: 5.57692 - max: null - sqrts: - min: null - mid: 200.0 - max: null - eta: - min: 0.8 - mid: 1.4 - max: 2.0 -- pT: - min: null - mid: 6.51397 - max: null - sqrts: - min: null - mid: 200.0 - max: null - eta: - min: 0.8 - mid: 1.4 - max: 2.0 -- pT: - min: null - mid: 7.48737 - max: null - sqrts: - min: null - mid: 200.0 - max: null - eta: - min: 0.8 - mid: 1.4 - max: 2.0 -- pT: - min: null - mid: 8.4765 - max: null - sqrts: - min: null - mid: 200.0 - max: null - eta: - min: 0.8 - mid: 1.4 - max: 2.0 -- pT: - min: null - mid: 9.44489 - max: null - sqrts: - min: null - mid: 200.0 - max: null - eta: - min: 0.8 - mid: 1.4 - max: 2.0 -- pT: - min: null - mid: 10.7949 - max: null - sqrts: - min: null - mid: 200.0 - max: null - eta: - min: 0.8 - mid: 1.4 - max: 2.0 diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml deleted file mode 100644 index 08d79b5517..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/metadata.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# Generalia -setname: "STAR-2006_SHP_200GEV" - -version: 1 -version_comment: "Initial implementation" - -# References -iNSPIRE: - url: "https://inspirehep.net/literature/1253360" -hepdata: - url: "https://www.hepdata.net/record/ins1253360" - version: 1 - -nnpdf_metadata: - nnpdf31_process: "SHP" # Single Hadron Production - experiment: "STAR" - -implemented_observables: - - observable_name: "ALL" - observable: - description: "Neutral pion spin asymmetries at intermediate pseudorapidity in polarized proton collisions sqrt(s)=200 GeV" - label: "$A_{LL}$" - units: "" - process_type: "SHP_ASY" - ndata: 6 - tables: [7] - npoints: [6] # List of datapoints per table - - # Plotting information - plotting: - kinematics_override: identity # TODO - dataset_label: "STAR ALL" - y_label: "$A_{LL}(p_T)$" - plot_x: pT - kinematic_coverage: [pT, sqrts, eta] - - kinematics: - variables: - pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } - sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } - eta: { description: "Pseudorapidity", label: r"$\eta$", units: "" } - file: kinematics.yaml - - data_central: data.yaml - data_uncertainties: - - uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml deleted file mode 100644 index 73fccd7b0a..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml +++ /dev/null @@ -1,38 +0,0 @@ -independent_variables: -- header: {name: '$p_{T} [GeV/c]$'} - values: - - {value: 5.57692} - - {value: 6.51397} - - {value: 7.48737} - - {value: 8.4765} - - {value: 9.44489} - - {value: 10.7949} -dependent_variables: -- header: {name: '$A_{LL}$'} - qualifiers: - - {name: '-', value: 'STAR Data'} - values: - - value: -0.023 - errors: - - {symerror: 0.019, label: 'stat error'} - - {symerror: 0.002, label: 'sys error'} - - value: 0.004 - errors: - - {symerror: 0.021, label: 'stat error'} - - {symerror: 0.004, label: 'sys error'} - - value: 0.048 - errors: - - {symerror: 0.028, label: 'stat error'} - - {symerror: 0.006, label: 'sys error'} - - value: -0.001 - errors: - - {symerror: 0.045, label: 'stat error'} - - {symerror: 0.007, label: 'sys error'} - - value: 0.038 - errors: - - {symerror: 0.060, label: 'stat error'} - - {symerror: 0.009, label: 'sys error'} - - value: -0.045 - errors: - - {symerror: 0.072, label: 'stat error'} - - {symerror: 0.009, label: 'sys error'} diff --git a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/uncertainties.yaml deleted file mode 100644 index 09524131cf..0000000000 --- a/nnpdf_data/nnpdf_data/new_commondata/STAR-2006_SHP_200GEV/uncertainties.yaml +++ /dev/null @@ -1,22 +0,0 @@ -definitions: - stat: - description: Statistical uncertainty - treatment: ADD - type: UNCORR - syst: - description: Systematic uncertainties due to beam polarization - treatment: MULT - type: CORR -bins: -- stat: 0.019 - syst: 0.002 -- stat: 0.021 - syst: 0.004 -- stat: 0.028 - syst: 0.006 -- stat: 0.045 - syst: 0.007 -- stat: 0.06 - syst: 0.009 -- stat: 0.072 - syst: 0.009 From 29889636bed99addfc85dff24b5361850b0da9a6 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 09:37:40 +0200 Subject: [PATCH 06/13] add moved experiments --- .../PHENIX-2009_SHP_200GEV/data.yaml | 13 +++ .../PHENIX-2009_SHP_200GEV/filter.py | 93 ++++++++++++++++++ .../PHENIX-2009_SHP_200GEV/kinematics.yaml | 97 +++++++++++++++++++ .../PHENIX-2009_SHP_200GEV/metadata.yaml | 45 +++++++++ .../HEPData-ins1282448-v1-Table_7.yaml | 81 ++++++++++++++++ .../PHENIX-2009_SHP_200GEV/uncertainties.yaml | 50 ++++++++++ .../commondata/STAR-2006_SHP_200GEV/data.yaml | 7 ++ .../commondata/STAR-2006_SHP_200GEV/filter.py | 77 +++++++++++++++ .../STAR-2006_SHP_200GEV/kinematics.yaml | 73 ++++++++++++++ .../STAR-2006_SHP_200GEV/metadata.yaml | 46 +++++++++ .../HEPData-ins1253360-v1-Figure_7_Data.yaml | 38 ++++++++ .../STAR-2006_SHP_200GEV/uncertainties.yaml | 22 +++++ 12 files changed, 642 insertions(+) create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/data.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/data.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/data.yaml new file mode 100644 index 0000000000..e8daaf85ab --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/data.yaml @@ -0,0 +1,13 @@ +data_central: +- 0.00051 +- 0.00096 +- 0.00039 +- -0.00023 +- 0.0006 +- 0.0002 +- 0.0013 +- 0.0026 +- -0.0039 +- 0.0096 +- 0.008 +- 0.061 diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py new file mode 100644 index 0000000000..1dc7428f85 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py @@ -0,0 +1,93 @@ +from pathlib import Path + +import pandas as pd +import yaml + + +def read_data(path_rawdata: str) -> pd.DataFrame: + data = yaml.safe_load(Path(path_rawdata).read_text()) + + ptvals = data["independent_variables"][0]["values"] + asym_obs = data["dependent_variables"][0]["values"] + + concatenated_table = [] + for i in range(len(ptvals)): + # Compute pT mid-value if not given + pt_mid = (float(ptvals[i]["high"]) + float(ptvals[i]["low"])) / 2 + pt_midval = ptvals[i].get("value", pt_mid) + + concatenated_table.append( + pd.DataFrame( + { + "pT_low": [ptvals[i]["low"]], + "pT": [pt_midval], + "pT_high": [ptvals[i]["high"]], + "asym": [asym_obs[i]["value"]], + "stat_err": [asym_obs[i]["errors"][0]["symerror"]], + "lumi_err": [asym_obs[i]["errors"][1]["symerror"]], + "spol_err": [asym_obs[i]["errors"][2]["symerror"].removesuffix("%")], + } + ) + ) + + return pd.concat(concatenated_table, ignore_index=True) + + +def dump_data(df_table: pd.DataFrame) -> None: + # Dump central data into Yaml file + data_central = [] + for i in range(len(df_table["asym"])): + data_central.append(float(df_table.loc[i, "asym"])) + + with open("data.yaml", "w") as file: + yaml.dump({"data_central": data_central}, file, sort_keys=False) + + # Dump the kinematics into Yaml file + kinematics = [] + for i in range(len(df_table["asym"])): + kin_value = { + "pT": { + "min": float(df_table.loc[i, "pT_low"]), + "mid": float(df_table.loc[i, "pT"]), + "max": float(df_table.loc[i, "pT_high"]), + }, + "sqrts": {"min": None, "mid": 200.0, "max": None}, + } + kinematics.append(kin_value) + + with open("kinematics.yaml", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + # Dump the uncertainties into Yaml file + errors = [] + for i in range(len(df_table)): + error_per_bin = { + "stat": float(df_table.loc[i, "stat_err"]), + "sys_lumi": float(df_table.loc[i, "lumi_err"]), + "sys_pol": data_central[i] * float(df_table.loc[i, "spol_err"]) / 100.0, + } + errors.append(error_per_bin) + + error_definition = { + "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, + "sys_lumi": { + "description": "Systematic uncertainties due to luminosity", + "treatment": "MULT", + "type": "CORR", + }, + "sys_pol": { + "description": "Systematic uncertainties due to polarization", + "treatment": "MULT", + "type": "CORR", + }, + } + + with open("uncertainties.yaml", "w") as file: + yaml.dump({"definitions": error_definition, "bins": errors}, file, sort_keys=False) + + return + + +if __name__ == "__main__": + df_table = read_data("./rawdata/HEPData-ins1282448-v1-Table_7.yaml") + dump_data(df_table=df_table) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml new file mode 100644 index 0000000000..0173f3f63b --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml @@ -0,0 +1,97 @@ +bins: +- pT: + min: 1.0 + mid: 1.3 + max: 1.5 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 1.5 + mid: 1.75 + max: 2.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 2.0 + mid: 2.23 + max: 2.5 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 2.5 + mid: 2.72 + max: 3.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 3.0 + mid: 3.22 + max: 3.5 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 3.5 + mid: 3.72 + max: 4.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 4.0 + mid: 4.39 + max: 5.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 5.0 + mid: 5.4 + max: 6.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 6.0 + mid: 6.41 + max: 7.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 7.0 + mid: 7.74 + max: 9.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 9.0 + mid: 10.0 + max: 12.0 + sqrts: + min: null + mid: 200.0 + max: null +- pT: + min: 12.0 + mid: 13.1 + max: 15.0 + sqrts: + min: null + mid: 200.0 + max: null diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml new file mode 100644 index 0000000000..a20990a65b --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml @@ -0,0 +1,45 @@ +# Generalia +setname: "PHENIX-2009_SHP_200GEV" + +version: 1 +version_comment: "Initial implementation" + +# References +iNSPIRE: + url: "https://inspirehep.net/literature/1282448" +hepdata: + url: "https://www.hepdata.net/record/ins1282448" + version: 1 + +nnpdf_metadata: + nnpdf31_process: "SHP" # Single Hadron Production + experiment: "PHENIX" + +implemented_observables: + - observable_name: "ALL" + observable: + description: "Double helicity asymmetry in inclusive pi^0 production in polarized p+p collisions at sqrt(s)=200 GeV" + label: "$A_{LL}$" + units: "" + process_type: "SHP_ASY" + ndata: 12 + tables: [7] + npoints: [12] # List of datapoints per table + + # Plotting information + plotting: + kinematics_override: identity # TODO + dataset_label: "PHENIX ALL" + y_label: "$A_{LL}(p_T)$" + plot_x: pT + kinematic_coverage: [pT, sqrts] + + kinematics: + variables: + pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } + sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } + file: kinematics.yaml + + data_central: data.yaml + data_uncertainties: + - uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml new file mode 100644 index 0000000000..f8ab996936 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml @@ -0,0 +1,81 @@ +dependent_variables: +- header: {name: ASYM(LL)} + qualifiers: + - {name: RE, value: P P --> PI0 < GAMMA GAMMA > X} + - {name: SQRT(S), units: GeV, value: '200.0'} + values: + - errors: + - {label: stat, symerror: 0.00085} + - {label: 'sys,rel.lumi.', symerror: 0.00035} + - {label: 'sys,pol.', symerror: 3.4%} + value: 0.00051 + - errors: + - {label: stat, symerror: 0.00055} + - {label: 'sys,rel.lumi.', symerror: 0.00033} + - {label: 'sys,pol.', symerror: 3.5%} + value: 0.00096 + - errors: + - {label: stat, symerror: 0.00058} + - {label: 'sys,rel.lumi.', symerror: 0.00034} + - {label: 'sys,pol.', symerror: 3.5%} + value: 0.00039 + - errors: + - {label: stat, symerror: 0.00074} + - {label: 'sys,rel.lumi.', symerror: 0.00036} + - {label: 'sys,pol.', symerror: 3.4%} + value: -0.00023 + - errors: + - {label: stat, symerror: 0.0011} + - {label: 'sys,rel.lumi.', symerror: 0.0004} + - {label: 'sys,pol.', symerror: 3.2%} + value: 0.0006 + - errors: + - {label: stat, symerror: 0.0015} + - {label: 'sys,rel.lumi.', symerror: 0.00041} + - {label: 'sys,pol.', symerror: 3.1%} + value: 0.0002 + - errors: + - {label: stat, symerror: 0.0018} + - {label: 'sys,rel.lumi.', symerror: 0.00043} + - {label: 'sys,pol.', symerror: 3.1%} + value: 0.0013 + - errors: + - {label: stat, symerror: 0.0035} + - {label: 'sys,rel.lumi.', symerror: 0.00045} + - {label: 'sys,pol.', symerror: 3.0%} + value: 0.0026 + - errors: + - {label: stat, symerror: 0.0061} + - {label: 'sys,rel.lumi.', symerror: 0.00045} + - {label: 'sys,pol.', symerror: 2.9%} + value: -0.0039 + - errors: + - {label: stat, symerror: 0.0085} + - {label: 'sys,rel.lumi.', symerror: 0.00045} + - {label: 'sys,pol.', symerror: 2.9%} + value: 0.0096 + - errors: + - {label: stat, symerror: 0.018} + - {label: 'sys,rel.lumi.', symerror: 0.00058} + - {label: 'sys,pol.', symerror: 3.3%} + value: 0.008 + - errors: + - {label: stat, symerror: 0.069} + - {label: 'sys,rel.lumi.', symerror: 0.001} + - {label: 'sys,pol.', symerror: 3.0%} + value: 0.061 +independent_variables: +- header: {name: PT(PI0), units: GEV} + values: + - {high: 1.5, low: 1.0, value: 1.3} + - {high: 2.0, low: 1.5} + - {high: 2.5, low: 2.0, value: 2.23} + - {high: 3.0, low: 2.5, value: 2.72} + - {high: 3.5, low: 3.0, value: 3.22} + - {high: 4.0, low: 3.5, value: 3.72} + - {high: 5.0, low: 4.0, value: 4.39} + - {high: 6.0, low: 5.0, value: 5.4} + - {high: 7.0, low: 6.0, value: 6.41} + - {high: 9.0, low: 7.0, value: 7.74} + - {high: 12.0, low: 9.0, value: 10.0} + - {high: 15.0, low: 12.0, value: 13.1} diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml new file mode 100644 index 0000000000..ea3c0aa1ad --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml @@ -0,0 +1,50 @@ +definitions: + stat: + description: Statistical uncertainty + treatment: ADD + type: UNCORR + sys_lumi: + description: Systematic uncertainties due to luminosity + treatment: MULT + type: CORR + sys_pol: + description: Systematic uncertainties due to polarization + treatment: MULT + type: CORR +bins: +- stat: 0.00085 + sys_lumi: 0.00035 + sys_pol: 1.734e-05 +- stat: 0.00055 + sys_lumi: 0.00033 + sys_pol: 3.3600000000000004e-05 +- stat: 0.00058 + sys_lumi: 0.00034 + sys_pol: 1.365e-05 +- stat: 0.00074 + sys_lumi: 0.00036 + sys_pol: -7.82e-06 +- stat: 0.0011 + sys_lumi: 0.0004 + sys_pol: 1.92e-05 +- stat: 0.0015 + sys_lumi: 0.00041 + sys_pol: 6.2e-06 +- stat: 0.0018 + sys_lumi: 0.00043 + sys_pol: 4.03e-05 +- stat: 0.0035 + sys_lumi: 0.00045 + sys_pol: 7.8e-05 +- stat: 0.0061 + sys_lumi: 0.00045 + sys_pol: -0.00011309999999999998 +- stat: 0.0085 + sys_lumi: 0.00045 + sys_pol: 0.0002784 +- stat: 0.018 + sys_lumi: 0.00058 + sys_pol: 0.000264 +- stat: 0.069 + sys_lumi: 0.001 + sys_pol: 0.00183 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/data.yaml new file mode 100644 index 0000000000..1d04db9fd2 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/data.yaml @@ -0,0 +1,7 @@ +data_central: +- -0.023 +- 0.004 +- 0.048 +- -0.001 +- 0.038 +- -0.045 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py new file mode 100644 index 0000000000..0f964da06a --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py @@ -0,0 +1,77 @@ +from pathlib import Path + +import pandas as pd +import yaml + + +def read_data(path_rawdata: str) -> pd.DataFrame: + data = yaml.safe_load(Path(path_rawdata).read_text()) + + ptvals = data["independent_variables"][0]["values"] + asym_obs = data["dependent_variables"][0]["values"] + + concatenated_table = [] + for i in range(len(ptvals)): + concatenated_table.append( + pd.DataFrame( + { + "pT": [ptvals[i]["value"]], + "asym": [asym_obs[i]["value"]], + "stat_err": [asym_obs[i]["errors"][0]["symerror"]], + "syst_err": [asym_obs[i]["errors"][1]["symerror"]], + } + ) + ) + + return pd.concat(concatenated_table, ignore_index=True) + + +def dump_data(df_table: pd.DataFrame) -> None: + # Dump central data into Yaml file + data_central = [] + for i in range(len(df_table["asym"])): + data_central.append(float(df_table.loc[i, "asym"])) + + with open("data.yaml", "w") as file: + yaml.dump({"data_central": data_central}, file, sort_keys=False) + + # Dump the kinematics into Yaml file + kinematics = [] + for i in range(len(df_table["asym"])): + kin_value = { + "pT": {"min": None, "mid": float(df_table.loc[i, "pT"]), "max": None}, + "sqrts": {"min": None, "mid": 200.0, "max": None}, + "eta": {"min": 0.8, "mid": 1.4, "max": 2.0}, + } + kinematics.append(kin_value) + + with open("kinematics.yaml", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + # Dump the uncertainties into Yaml file + errors = [] + for i in range(len(df_table)): + error_per_bin = { + "stat": float(df_table.loc[i, "stat_err"]), + "syst": float(df_table.loc[i, "syst_err"]), + } + errors.append(error_per_bin) + + error_definition = { + "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, + "syst": { + "description": "Systematic uncertainties due to beam polarization", + "treatment": "MULT", + "type": "CORR", + }, + } + + with open("uncertainties.yaml", "w") as file: + yaml.dump({"definitions": error_definition, "bins": errors}, file, sort_keys=False) + + return + + +if __name__ == "__main__": + df_table = read_data("./rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml") + dump_data(df_table=df_table) diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml new file mode 100644 index 0000000000..8aedac3e15 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml @@ -0,0 +1,73 @@ +bins: +- pT: + min: null + mid: 5.57692 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 6.51397 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 7.48737 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 8.4765 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 9.44489 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 +- pT: + min: null + mid: 10.7949 + max: null + sqrts: + min: null + mid: 200.0 + max: null + eta: + min: 0.8 + mid: 1.4 + max: 2.0 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml new file mode 100644 index 0000000000..08d79b5517 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml @@ -0,0 +1,46 @@ +# Generalia +setname: "STAR-2006_SHP_200GEV" + +version: 1 +version_comment: "Initial implementation" + +# References +iNSPIRE: + url: "https://inspirehep.net/literature/1253360" +hepdata: + url: "https://www.hepdata.net/record/ins1253360" + version: 1 + +nnpdf_metadata: + nnpdf31_process: "SHP" # Single Hadron Production + experiment: "STAR" + +implemented_observables: + - observable_name: "ALL" + observable: + description: "Neutral pion spin asymmetries at intermediate pseudorapidity in polarized proton collisions sqrt(s)=200 GeV" + label: "$A_{LL}$" + units: "" + process_type: "SHP_ASY" + ndata: 6 + tables: [7] + npoints: [6] # List of datapoints per table + + # Plotting information + plotting: + kinematics_override: identity # TODO + dataset_label: "STAR ALL" + y_label: "$A_{LL}(p_T)$" + plot_x: pT + kinematic_coverage: [pT, sqrts, eta] + + kinematics: + variables: + pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } + sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } + eta: { description: "Pseudorapidity", label: r"$\eta$", units: "" } + file: kinematics.yaml + + data_central: data.yaml + data_uncertainties: + - uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml new file mode 100644 index 0000000000..73fccd7b0a --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml @@ -0,0 +1,38 @@ +independent_variables: +- header: {name: '$p_{T} [GeV/c]$'} + values: + - {value: 5.57692} + - {value: 6.51397} + - {value: 7.48737} + - {value: 8.4765} + - {value: 9.44489} + - {value: 10.7949} +dependent_variables: +- header: {name: '$A_{LL}$'} + qualifiers: + - {name: '-', value: 'STAR Data'} + values: + - value: -0.023 + errors: + - {symerror: 0.019, label: 'stat error'} + - {symerror: 0.002, label: 'sys error'} + - value: 0.004 + errors: + - {symerror: 0.021, label: 'stat error'} + - {symerror: 0.004, label: 'sys error'} + - value: 0.048 + errors: + - {symerror: 0.028, label: 'stat error'} + - {symerror: 0.006, label: 'sys error'} + - value: -0.001 + errors: + - {symerror: 0.045, label: 'stat error'} + - {symerror: 0.007, label: 'sys error'} + - value: 0.038 + errors: + - {symerror: 0.060, label: 'stat error'} + - {symerror: 0.009, label: 'sys error'} + - value: -0.045 + errors: + - {symerror: 0.072, label: 'stat error'} + - {symerror: 0.009, label: 'sys error'} diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml new file mode 100644 index 0000000000..09524131cf --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml @@ -0,0 +1,22 @@ +definitions: + stat: + description: Statistical uncertainty + treatment: ADD + type: UNCORR + syst: + description: Systematic uncertainties due to beam polarization + treatment: MULT + type: CORR +bins: +- stat: 0.019 + syst: 0.002 +- stat: 0.021 + syst: 0.004 +- stat: 0.028 + syst: 0.006 +- stat: 0.045 + syst: 0.007 +- stat: 0.06 + syst: 0.009 +- stat: 0.072 + syst: 0.009 From 4e8c3f0629e4cc631aac1cfceed7d9c45b807a3d Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 09:46:35 +0200 Subject: [PATCH 07/13] account for 6% beam polarization in STAR --- .../commondata/STAR-2006_SHP_200GEV/filter.py | 8 +++++++- .../STAR-2006_SHP_200GEV/uncertainties.yaml | 12 +++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py index 0f964da06a..d4e87a1569 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py @@ -54,16 +54,22 @@ def dump_data(df_table: pd.DataFrame) -> None: error_per_bin = { "stat": float(df_table.loc[i, "stat_err"]), "syst": float(df_table.loc[i, "syst_err"]), + "sys_pol": data_central[i] * 6 / 100.0, } errors.append(error_per_bin) error_definition = { "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, "syst": { - "description": "Systematic uncertainties due to beam polarization", + "description": "Total systematic uncertainties", "treatment": "MULT", "type": "CORR", }, + "sys_pol": { + "description": "Systematic uncertainties due to beam polarization", + "treatment": "MULT", + "type": "STAR2006POL", + }, } with open("uncertainties.yaml", "w") as file: diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml index 09524131cf..ac5e1df03f 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml @@ -4,19 +4,29 @@ definitions: treatment: ADD type: UNCORR syst: - description: Systematic uncertainties due to beam polarization + description: Total systematic uncertainties treatment: MULT type: CORR + sys_pol: + description: Systematic uncertainties due to beam polarization + treatment: MULT + type: STAR2006POL bins: - stat: 0.019 syst: 0.002 + sys_pol: -0.0013800000000000002 - stat: 0.021 syst: 0.004 + sys_pol: 0.00024 - stat: 0.028 syst: 0.006 + sys_pol: 0.00288 - stat: 0.045 syst: 0.007 + sys_pol: -6.0e-05 - stat: 0.06 syst: 0.009 + sys_pol: 0.00228 - stat: 0.072 syst: 0.009 + sys_pol: -0.0027 From b2f8fc5afb47cd0548d2b174946d3916baa9b150 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 10:50:12 +0200 Subject: [PATCH 08/13] add 510 GeV SHP data --- .../PHENIX-2013_SHP_510GEV/data.yaml | 15 ++ .../PHENIX-2013_SHP_510GEV/filter.py | 89 +++++++++ .../PHENIX-2013_SHP_510GEV/kinematics.yaml | 169 ++++++++++++++++++ .../PHENIX-2013_SHP_510GEV/metadata.yaml | 43 +++++ .../HEPData-ins1396712-v1-Figure_3.yaml | 82 +++++++++ .../PHENIX-2013_SHP_510GEV/uncertainties.yaml | 56 ++++++ .../STAR-2013_SHP_510GEV/data_highrap.yaml | 5 + .../STAR-2013_SHP_510GEV/data_lowrap.yaml | 5 + .../commondata/STAR-2013_SHP_510GEV/filter.py | 90 ++++++++++ .../kinematics_highrap.yaml | 49 +++++ .../kinematics_lowrap.yaml | 49 +++++ .../STAR-2013_SHP_510GEV/metadata.yaml | 68 +++++++ .../HEPData-ins1674826-v1-Table_1.yaml | 28 +++ .../HEPData-ins1674826-v1-Table_2.yaml | 28 +++ .../uncertainties_highrap.yaml | 26 +++ .../uncertainties_lowrap.yaml | 26 +++ 16 files changed, 828 insertions(+) create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/data.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/rawdata/HEPData-ins1396712-v1-Figure_3.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_highrap.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_lowrap.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_1.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_2.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml create mode 100644 nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/data.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/data.yaml new file mode 100644 index 0000000000..78c85297e6 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/data.yaml @@ -0,0 +1,15 @@ +data_central: +- -6.0e-05 +- -0.0009 +- 0.00035 +- -0.00047 +- 0.0011 +- 0.0008 +- 0.00039 +- 0.00158 +- 0.0013 +- 0.00303 +- 0.0064 +- 0.0078 +- 0.0001 +- 0.0086 diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py new file mode 100644 index 0000000000..8f3a615dee --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py @@ -0,0 +1,89 @@ +from pathlib import Path + +import pandas as pd +import yaml + + +def read_data(path_rawdata: str) -> pd.DataFrame: + data = yaml.safe_load(Path(path_rawdata).read_text()) + + ptvals = data["independent_variables"][0]["values"] + pt_midval = data["dependent_variables"][0]["values"] + asym_obs = data["dependent_variables"][1]["values"] + + concatenated_table = [] + for i in range(len(ptvals)): + concatenated_table.append( + pd.DataFrame( + { + "pT_low": [ptvals[i]["low"]], + "pT": [pt_midval[i]["value"]], + "pT_high": [ptvals[i]["high"]], + "asym": [asym_obs[i]["value"]], + "stat_err": [asym_obs[i]["errors"][0]["symerror"]], + } + ) + ) + + return pd.concat(concatenated_table, ignore_index=True) + + +def dump_data(df_table: pd.DataFrame) -> None: + # Dump central data into Yaml file + data_central = [] + for i in range(len(df_table["asym"])): + data_central.append(float(df_table.loc[i, "asym"])) + + with open("data.yaml", "w") as file: + yaml.dump({"data_central": data_central}, file, sort_keys=False) + + # Dump the kinematics into Yaml file + kinematics = [] + for i in range(len(df_table["asym"])): + kin_value = { + "pT": { + "min": float(df_table.loc[i, "pT_low"]), + "mid": float(df_table.loc[i, "pT"]), + "max": float(df_table.loc[i, "pT_high"]), + }, + "sqrts": {"min": None, "mid": 510.0, "max": None}, + "eta": {"min": -0.35, "mid": 0.0, "max": 0.35}, + } + kinematics.append(kin_value) + + with open("kinematics.yaml", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + # Dump the uncertainties into Yaml file + errors = [] + for i in range(len(df_table)): + error_per_bin = { + "stat": float(df_table.loc[i, "stat_err"]), + "sys_lumi": 3.6e-4, + "sys_pol": (data_central[i] * 6.5) / 100.0, + } + errors.append(error_per_bin) + + error_definition = { + "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, + "sys_lumi": { + "description": "Systematic uncertainties due to luminosity", + "treatment": "MULT", + "type": "CORR", + }, + "sys_pol": { + "description": "Systematic uncertainties due to beam polarization", + "treatment": "MULT", + "type": "PHENIX2013POL", + }, + } + + with open("uncertainties.yaml", "w") as file: + yaml.dump({"definitions": error_definition, "bins": errors}, file, sort_keys=False) + + return + + +if __name__ == "__main__": + df_table = read_data("./rawdata/HEPData-ins1396712-v1-Figure_3.yaml") + dump_data(df_table=df_table) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml new file mode 100644 index 0000000000..8a4f77a3b7 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml @@ -0,0 +1,169 @@ +bins: +- pT: + min: 2.0 + mid: 2.28 + max: 2.5 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 2.5 + mid: 2.76 + max: 3.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 3.0 + mid: 3.25 + max: 3.5 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 3.5 + mid: 3.74 + max: 4.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 4.0 + mid: 4.24 + max: 4.5 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 4.5 + mid: 4.74 + max: 5.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 5.0 + mid: 5.45 + max: 6.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 6.0 + mid: 6.45 + max: 7.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 7.0 + mid: 7.45 + max: 8.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 8.0 + mid: 8.45 + max: 9.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 9.0 + mid: 9.45 + max: 10.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 10.0 + mid: 10.82 + max: 12.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 12.0 + mid: 13.14 + max: 14.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 +- pT: + min: 14.0 + mid: 16.62 + max: 18.0 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml new file mode 100644 index 0000000000..fb5b551134 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml @@ -0,0 +1,43 @@ +# Generalia +setname: "PHENIX-2013_SHP_510GEV" + +version: 1 +version_comment: "Initial implementation" + +# References +iNSPIRE: + url: "https://inspirehep.net/literature/1396712" +hepdata: + url: "https://www.hepdata.net/record/ins1396712" + version: 1 + +nnpdf_metadata: + nnpdf31_process: "SHP" # Single Hadron Production + experiment: "PHENIX" + +implemented_observables: + - observable_name: "ALL" + observable: + description: "Inclusive cross section and double-helicity asymmetry for π0 production at midrapidity in collisions at 200 GeV" + label: "$A_{LL}$" + units: "" + process_type: "SHP_ASY" + ndata: 14 + tables: [2] + npoints: [14] # List of datapoints per table + plotting: + kinematics_override: identity + dataset_label: "PHENIX ALL" + y_label: "$A_{LL}(p_T)$" + plot_x: pT + kinematic_coverage: [pT, sqrts, eta] + kinematics: + variables: + pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } + sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } + eta: { description: "π0 pseudorapidity", label: r"$\eta$", units: ""} + file: kinematics.yaml + + data_central: data.yaml + data_uncertainties: + - uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/rawdata/HEPData-ins1396712-v1-Figure_3.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/rawdata/HEPData-ins1396712-v1-Figure_3.yaml new file mode 100644 index 0000000000..d482e846b2 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/rawdata/HEPData-ins1396712-v1-Figure_3.yaml @@ -0,0 +1,82 @@ +independent_variables: +- header: {name: '$p_T$ (GeV/$c$)'} + values: + - {low: 2.00, high: 2.50} + - {low: 2.50, high: 3.00} + - {low: 3.00, high: 3.50} + - {low: 3.50, high: 4.00} + - {low: 4.00, high: 4.50} + - {low: 4.50, high: 5.00} + - {low: 5.00, high: 6.00} + - {low: 6.00, high: 7.00} + - {low: 7.00, high: 8.00} + - {low: 8.00, high: 9.00} + - {low: 9.00, high: 10.00} + - {low: 10.00, high: 12.00} + - {low: 12.00, high: 14.00} + - {low: 14.00, high: 18.00} +dependent_variables: +- header: {name: '$\langle p_T \rangle$ (GeV/$c$)'} + qualifiers: + - {name: 'particle', value: '$\pi^0$'} + values: + - value: 2.280 + - value: 2.760 + - value: 3.250 + - value: 3.740 + - value: 4.240 + - value: 4.740 + - value: 5.450 + - value: 6.450 + - value: 7.450 + - value: 8.450 + - value: 9.450 + - value: 10.820 + - value: 13.140 + - value: 16.620 +- header: {name: '$A_{LL}$'} + qualifiers: + - {name: 'particle', value: '$\pi^0$'} + values: + - value: -6.00e-5 + errors: + - {symerror: 0.0012000, label: 'tot'} + - value: -9.00e-4 + errors: + - {symerror: 8.60e-4, label: 'tot'} + - value: 3.50e-4 + errors: + - {symerror: 7.60e-4, label: 'tot'} + - value: -4.70e-4 + errors: + - {symerror: 7.60e-4, label: 'tot'} + - value: 0.00110 + errors: + - {symerror: 8.2e-4, label: 'tot'} + - value: 8.0e-4 + errors: + - {symerror: 9.3e-4, label: 'tot'} + - value: 3.90e-4 + errors: + - {symerror: 8.30e-4, label: 'tot'} + - value: 0.00158 + errors: + - {symerror: 0.00117, label: 'tot'} + - value: 0.00130 + errors: + - {symerror: 0.00165, label: 'tot'} + - value: 0.00303 + errors: + - {symerror: 0.00231, label: 'tot'} + - value: 0.0064 + errors: + - {symerror: 0.0032, label: 'tot'} + - value: 0.0078 + errors: + - {symerror: 0.0035, label: 'tot'} + - value: 1.00e-4 + errors: + - {symerror: 0.005500, label: 'tot'} + - value: 0.0086 + errors: + - {symerror: 0.0110, label: 'tot'} diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml new file mode 100644 index 0000000000..be45a25092 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml @@ -0,0 +1,56 @@ +definitions: + stat: + description: Statistical uncertainty + treatment: ADD + type: UNCORR + sys_lumi: + description: Systematic uncertainties due to luminosity + treatment: MULT + type: CORR + sys_pol: + description: Systematic uncertainties due to beam polarization + treatment: MULT + type: PHENIX2013POL +bins: +- stat: 0.0012 + sys_lumi: 0.00036 + sys_pol: -3.9e-06 +- stat: 0.00086 + sys_lumi: 0.00036 + sys_pol: -5.85e-05 +- stat: 0.00076 + sys_lumi: 0.00036 + sys_pol: 2.275e-05 +- stat: 0.00076 + sys_lumi: 0.00036 + sys_pol: -3.055e-05 +- stat: 0.00082 + sys_lumi: 0.00036 + sys_pol: 7.15e-05 +- stat: 0.00093 + sys_lumi: 0.00036 + sys_pol: 5.2000000000000004e-05 +- stat: 0.00083 + sys_lumi: 0.00036 + sys_pol: 2.535e-05 +- stat: 0.00117 + sys_lumi: 0.00036 + sys_pol: 0.0001027 +- stat: 0.00165 + sys_lumi: 0.00036 + sys_pol: 8.45e-05 +- stat: 0.00231 + sys_lumi: 0.00036 + sys_pol: 0.00019695000000000002 +- stat: 0.0032 + sys_lumi: 0.00036 + sys_pol: 0.00041600000000000003 +- stat: 0.0035 + sys_lumi: 0.00036 + sys_pol: 0.000507 +- stat: 0.0055 + sys_lumi: 0.00036 + sys_pol: 6.5000000000000004e-06 +- stat: 0.011 + sys_lumi: 0.00036 + sys_pol: 0.000559 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_highrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_highrap.yaml new file mode 100644 index 0000000000..e3541a51a4 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_highrap.yaml @@ -0,0 +1,5 @@ +data_central: +- -0.00191 +- -0.00085 +- -0.00177 +- 0.00015 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_lowrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_lowrap.yaml new file mode 100644 index 0000000000..c6388bec27 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_lowrap.yaml @@ -0,0 +1,5 @@ +data_central: +- -0.00154 +- 0.0021 +- -0.0014 +- 0.00076 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py new file mode 100644 index 0000000000..fd69dba256 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py @@ -0,0 +1,90 @@ +from pathlib import Path + +import pandas as pd +import yaml + + +def read_data(path_rawdata: str) -> pd.DataFrame: + data = yaml.safe_load(Path(path_rawdata).read_text()) + + ptvals = data["independent_variables"][0]["values"] + asym_obs = data["dependent_variables"][0]["values"] + + concatenated_table = [] + for i in range(len(ptvals)): + concatenated_table.append( + pd.DataFrame( + { + "pT_low": [ptvals[i]["low"]], + "pT_high": [ptvals[i]["high"]], + "asym": [asym_obs[i]["value"]], + "stat_err": [asym_obs[i]["errors"][0]["symerror"]], + "syst_err": [asym_obs[i]["errors"][1]["symerror"]], + } + ) + ) + + return pd.concat(concatenated_table, ignore_index=True) + + +def dump_data(df_table: pd.DataFrame, tableid: int) -> None: + suffix = "lowrap.yaml" if tableid == 1 else "highrap.yaml" + # Dump central data into Yaml file + data_central = [] + for i in range(len(df_table["asym"])): + data_central.append(float(df_table.loc[i, "asym"])) + + with open(f"data_{suffix}", "w") as file: + yaml.dump({"data_central": data_central}, file, sort_keys=False) + + # Dump the kinematics into Yaml file + kinematics = [] + for i in range(len(df_table["asym"])): + kin_value = { + "pT": { + "min": float(df_table.loc[i, "pT_low"]), + "mid": (float(df_table.loc[i, "pT_high"]) + float(df_table.loc[i, "pT_low"])) / 2, + "max": float(df_table.loc[i, "pT_high"]), + }, + "sqrts": {"min": None, "mid": 510.0, "max": None}, + "eta": {"min": 3.15, "mid": 3.525, "max": 3.90}, + } + kinematics.append(kin_value) + + with open(f"kinematics_{suffix}", "w") as file: + yaml.dump({"bins": kinematics}, file, sort_keys=False) + + # Dump the uncertainties into Yaml file + errors = [] + for i in range(len(df_table)): + error_per_bin = { + "stat": float(df_table.loc[i, "stat_err"]), + "syst": float(df_table.loc[i, "syst_err"]), + "sys_pol": data_central[i] * 6.7 / 100.0, + } + errors.append(error_per_bin) + + error_definition = { + "stat": {"description": "Statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}, + "syst": { + "description": "Total systematic uncertainties", + "treatment": "MULT", + "type": "CORR", + }, + "sys_pol": { + "description": "Systematic uncertainties due to beam polarization", + "treatment": "MULT", + "type": "STAR2013POL", + }, + } + + with open(f"uncertainties_{suffix}", "w") as file: + yaml.dump({"definitions": error_definition, "bins": errors}, file, sort_keys=False) + + return + + +if __name__ == "__main__": + for tabid in [1, 2]: + df_table = read_data(f"./rawdata/HEPData-ins1674826-v1-Table_{tabid}.yaml") + dump_data(df_table=df_table, tableid=tabid) diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml new file mode 100644 index 0000000000..9504c897dc --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml @@ -0,0 +1,49 @@ +bins: +- pT: + min: 3.7 + mid: 3.91 + max: 4.12 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: 3.15 + mid: 3.525 + max: 3.9 +- pT: + min: 4.48 + mid: 4.73 + max: 4.98 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: 3.15 + mid: 3.525 + max: 3.9 +- pT: + min: 5.33 + mid: 5.62 + max: 5.91 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: 3.15 + mid: 3.525 + max: 3.9 +- pT: + min: 6.71 + mid: 7.08 + max: 7.45 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: 3.15 + mid: 3.525 + max: 3.9 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml new file mode 100644 index 0000000000..c45551187a --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml @@ -0,0 +1,49 @@ +bins: +- pT: + min: 2.37 + mid: 2.5 + max: 2.63 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: 3.15 + mid: 3.525 + max: 3.9 +- pT: + min: 3.15 + mid: 3.33 + max: 3.51 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: 3.15 + mid: 3.525 + max: 3.9 +- pT: + min: 3.89 + mid: 4.11 + max: 4.33 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: 3.15 + mid: 3.525 + max: 3.9 +- pT: + min: 5.08 + mid: 5.37 + max: 5.66 + sqrts: + min: null + mid: 510.0 + max: null + eta: + min: 3.15 + mid: 3.525 + max: 3.9 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml new file mode 100644 index 0000000000..728421f4d0 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml @@ -0,0 +1,68 @@ +# Generalia +setname: "STAR-2013_SHP_510GEV" + +version: 1 +version_comment: "Initial implementation" + +# References +iNSPIRE: + url: "https://inspirehep.net/literature/1674826" +hepdata: + url: "https://www.hepdata.net/record/ins1674826" + version: 1 + +nnpdf_metadata: + nnpdf31_process: "SHP" # Single Hadron Production + experiment: "STAR" + +implemented_observables: + - observable_name: "ALL-LOWRAP" + observable: + description: "Neutral pion spin asymmetries at low pseudorapidity in polarized proton collisions sqrt(s)=510 GeV" + label: "$A_{LL}$" + units: "" + process_type: "SHP_ASY" + ndata: 4 + tables: [2] + npoints: [4] # List of datapoints per table + # Plotting information + plotting: + kinematics_override: identity + dataset_label: "STAR ALL" + y_label: "$A_{LL}(p_T)$" + plot_x: pT + kinematic_coverage: [pT, sqrts, eta] + kinematics: + variables: + pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } + sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } + eta: { description: "Pseudorapidity", label: r"$\eta$", units: "" } + file: kinematics_lowrap.yaml + data_central: data_lowrap.yaml + data_uncertainties: + - uncertainties_lowrap.yaml + - observable_name: "ALL-HIGHRAP" + observable: + description: "Neutral pion spin asymmetries at high pseudorapidity in polarized proton collisions sqrt(s)=510 GeV" + label: "$A_{LL}$" + units: "" + process_type: "SHP_ASY" + ndata: 4 + tables: [1] + npoints: [4] # List of datapoints per table + # Plotting information + plotting: + kinematics_override: identity + dataset_label: "STAR ALL" + y_label: "$A_{LL}(p_T)$" + plot_x: pT + kinematic_coverage: [pT, sqrts, eta] + kinematics: + variables: + pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } + sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } + eta: { description: "Pseudorapidity", label: r"$\eta$", units: "" } + file: kinematics_highrap.yaml + data_central: data_highrap.yaml + data_uncertainties: + - uncertainties_highrap.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_1.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_1.yaml new file mode 100644 index 0000000000..14d5dfd6d1 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_1.yaml @@ -0,0 +1,28 @@ +independent_variables: +- header: {name: '$p_T$ range (GeV/$c$)'} + values: + - {low: 2.37, high: 2.63} + - {low: 3.15, high: 3.51} + - {low: 3.89, high: 4.33} + - {low: 5.08, high: 5.66} +dependent_variables: +- header: {name: '$A_{LL}(\pi^0)$'} + qualifiers: + - {name: '$p_T$ range (GeV/$c$)', value: 'Pseudorapidity range $3.15 < \eta < 3.90$'} + values: + - value: -0.00154 + errors: + - {symerror: 0.0022, label: 'Stat. error (mb GeV$^{-2}c^3$)'} + - {symerror: 0.00021, label: 'Syst. error (mb GeV$^{-2}c^3$)'} + - value: 0.00210 + errors: + - {symerror: 0.0021, label: 'Stat. error (mb GeV$^{-2}c^3$)'} + - {symerror: 0.00021, label: 'Syst. error (mb GeV$^{-2}c^3$)'} + - value: -0.00140 + errors: + - {symerror: 0.0022, label: 'Stat. error (mb GeV$^{-2}c^3$)'} + - {symerror: 0.00021, label: 'Syst. error (mb GeV$^{-2}c^3$)'} + - value: 0.00076 + errors: + - {symerror: 0.0023, label: 'Stat. error (mb GeV$^{-2}c^3$)'} + - {symerror: 0.00021, label: 'Syst. error (mb GeV$^{-2}c^3$)'} diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_2.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_2.yaml new file mode 100644 index 0000000000..13ed77e1fb --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_2.yaml @@ -0,0 +1,28 @@ +independent_variables: +- header: {name: '$p_T$ range (GeV/$c$)'} + values: + - {low: 3.70, high: 4.12} + - {low: 4.48, high: 4.98} + - {low: 5.33, high: 5.91} + - {low: 6.71, high: 7.45} +dependent_variables: +- header: {name: '$A_{LL}(\pi^0)$'} + qualifiers: + - {name: '$p_T$ range (GeV/$c$)', value: 'Pseudorapidity range $2.65 < \eta < 3.15$'} + values: + - value: -0.00191 + errors: + - {symerror: 0.0022, label: 'Stat. error (mb GeV$^{-2}c^3$)'} + - {symerror: 0.00034, label: 'Syst. error (mb GeV$^{-2}c^3$)'} + - value: -0.00085 + errors: + - {symerror: 0.0024, label: 'Stat. error (mb GeV$^{-2}c^3$)'} + - {symerror: 0.00032, label: 'Syst. error (mb GeV$^{-2}c^3$)'} + - value: -0.00177 + errors: + - {symerror: 0.0025, label: 'Stat. error (mb GeV$^{-2}c^3$)'} + - {symerror: 0.00031, label: 'Syst. error (mb GeV$^{-2}c^3$)'} + - value: 0.00015 + errors: + - {symerror: 0.0024, label: 'Stat. error (mb GeV$^{-2}c^3$)'} + - {symerror: 0.00029, label: 'Syst. error (mb GeV$^{-2}c^3$)'} diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml new file mode 100644 index 0000000000..1dfa333cbf --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml @@ -0,0 +1,26 @@ +definitions: + stat: + description: Statistical uncertainty + treatment: ADD + type: UNCORR + syst: + description: Total systematic uncertainties + treatment: MULT + type: CORR + sys_pol: + description: Systematic uncertainties due to beam polarization + treatment: MULT + type: STAR2013POL +bins: +- stat: 0.0022 + syst: 0.00034 + sys_pol: -0.00012797 +- stat: 0.0024 + syst: 0.00032 + sys_pol: -5.6949999999999995e-05 +- stat: 0.0025 + syst: 0.00031 + sys_pol: -0.00011859000000000001 +- stat: 0.0024 + syst: 0.00029 + sys_pol: 1.005e-05 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml new file mode 100644 index 0000000000..87bd1dba89 --- /dev/null +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml @@ -0,0 +1,26 @@ +definitions: + stat: + description: Statistical uncertainty + treatment: ADD + type: UNCORR + syst: + description: Total systematic uncertainties + treatment: MULT + type: CORR + sys_pol: + description: Systematic uncertainties due to beam polarization + treatment: MULT + type: STAR2013POL +bins: +- stat: 0.0022 + syst: 0.00021 + sys_pol: -0.00010317999999999998 +- stat: 0.0021 + syst: 0.00021 + sys_pol: 0.0001407 +- stat: 0.0022 + syst: 0.00021 + sys_pol: -9.379999999999999e-05 +- stat: 0.0023 + syst: 0.00021 + sys_pol: 5.092e-05 From 73013184519754de5e3b92c7f975b5e8f85171f0 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 11:56:29 +0200 Subject: [PATCH 09/13] add SHP to process options --- validphys2/src/validphys/filters.py | 1 + validphys2/src/validphys/process_options.py | 22 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/validphys2/src/validphys/filters.py b/validphys2/src/validphys/filters.py index 780f00eb09..0f47bd08db 100644 --- a/validphys2/src/validphys/filters.py +++ b/validphys2/src/validphys/filters.py @@ -27,6 +27,7 @@ "DIJET": ("eta", "m_12", "sqrts"), "PHT": ("eta_gamma", "E_{T,gamma)2", "sqrts"), "INC": ("0", "mu2", "sqrts"), + "SHP_ASY": ("eta", "pT", "sqrts"), "EWK_RAP": ("etay", "M2", "sqrts"), "EWK_RAP_ASY": ("etay", "M2", "sqrts"), "EWK_PT": ("p_T", "M2", "sqrts"), diff --git a/validphys2/src/validphys/process_options.py b/validphys2/src/validphys/process_options.py index 151d359103..60b4117fbd 100644 --- a/validphys2/src/validphys/process_options.py +++ b/validphys2/src/validphys/process_options.py @@ -132,7 +132,7 @@ def _dis_xq2map(kin_info): """ x = kin_info.get_one_of("k1", _Vars.x) if "k2" in kin_info._kins: - q2 = kin_info.get_one_of("k2")**2 + q2 = kin_info.get_one_of("k2") ** 2 else: q2 = kin_info.get_one_of(_Vars.Q2) return x, q2 @@ -150,6 +150,18 @@ def _jets_xq2map(kin_info): return np.clip(x, a_min=None, a_max=1, out=x), np.concatenate((q2, q2)) +def _shp_xq2map(kin_info): + # Then compute x, Q2 + pT = kin_info[_Vars.pT] + ratio = pT / kin_info[_Vars.sqrts] + rap = kin_info.get_one_of(_Vars.y, _Vars.eta, _Vars.abs_eta) + x1 = 2 * ratio * np.exp(rap) + x2 = 2 * ratio * np.exp(-rap) + q2 = pT * pT + x = np.concatenate((x1, x2)) + return np.clip(x, a_min=None, a_max=1, out=x), np.concatenate((q2, q2)) + + def _dijets_xq2map(kin_info): # Here we can have either ystar or ydiff, but in either case we need to do the same ylab_1 = kin_info.get_one_of(_Vars.ystar, _Vars.ydiff, _Vars.eta_1, _Vars.abs_eta_1) @@ -258,6 +270,13 @@ def _dybosonpt_xq2map(kin_dict): xq2map_function=_jets_xq2map, ) +SHP = _Process( + "SHP", + "Single Hadron Production", + accepted_variables=(_Vars.eta, _Vars.pT, _Vars.sqrts), + xq2map_function=_shp_xq2map, +) + DIJET = _Process( "DIJET", "DiJets production", @@ -359,6 +378,7 @@ def _dybosonpt_xq2map(kin_dict): "DIS_POL": dataclasses.replace(DIS, name="DIS_POL"), "JET": JET, "DIJET": DIJET, + "SHP_ASY": SHP, "HQP_YQ": HQP_YQ, "HQP_YQQ": dataclasses.replace(HQP_YQ, name="HQP_YQQ"), "HQP_PTQ": HQP_PTQ, From fd7b3851ec5a1d039be63d8fd12c408e2ef0b091 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 11:56:48 +0200 Subject: [PATCH 10/13] fix eta variable for PHENIX-2009 --- .../PHENIX-2009_SHP_200GEV/filter.py | 1 + .../PHENIX-2009_SHP_200GEV/kinematics.yaml | 48 +++++++++++++++++++ .../PHENIX-2009_SHP_200GEV/metadata.yaml | 3 +- 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py index 1dc7428f85..b7c2bfaaf2 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py @@ -52,6 +52,7 @@ def dump_data(df_table: pd.DataFrame) -> None: "max": float(df_table.loc[i, "pT_high"]), }, "sqrts": {"min": None, "mid": 200.0, "max": None}, + "eta": {"min": -0.35, "mid": 0.0, "max": 0.35}, } kinematics.append(kin_value) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml index 0173f3f63b..f38fdfbbee 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml @@ -7,6 +7,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 1.5 mid: 1.75 @@ -15,6 +19,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 2.0 mid: 2.23 @@ -23,6 +31,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 2.5 mid: 2.72 @@ -31,6 +43,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 3.0 mid: 3.22 @@ -39,6 +55,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 3.5 mid: 3.72 @@ -47,6 +67,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 4.0 mid: 4.39 @@ -55,6 +79,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 5.0 mid: 5.4 @@ -63,6 +91,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 6.0 mid: 6.41 @@ -71,6 +103,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 7.0 mid: 7.74 @@ -79,6 +115,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 9.0 mid: 10.0 @@ -87,6 +127,10 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 - pT: min: 12.0 mid: 13.1 @@ -95,3 +139,7 @@ bins: min: null mid: 200.0 max: null + eta: + min: -0.35 + mid: 0.0 + max: 0.35 diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml index a20990a65b..a34b61cf98 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml @@ -32,12 +32,13 @@ implemented_observables: dataset_label: "PHENIX ALL" y_label: "$A_{LL}(p_T)$" plot_x: pT - kinematic_coverage: [pT, sqrts] + kinematic_coverage: [pT, sqrts, eta] kinematics: variables: pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } + eta: { description: "pi^0 pseudorapidity", label: r"$\eta$", units: "" } file: kinematics.yaml data_central: data.yaml From c91b6516c0927ccd65ccb581ba1ee230f651d1b5 Mon Sep 17 00:00:00 2001 From: giacomomagni Date: Thu, 19 Sep 2024 13:59:50 +0200 Subject: [PATCH 11/13] cosmetics sign --- .../nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py | 2 +- .../commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml | 4 ++-- .../nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py | 2 +- .../commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml | 6 +++--- .../nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py | 2 +- .../commondata/STAR-2006_SHP_200GEV/uncertainties.yaml | 6 +++--- .../nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py | 2 +- .../STAR-2013_SHP_510GEV/uncertainties_highrap.yaml | 6 +++--- .../STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py index b7c2bfaaf2..252b136331 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py @@ -65,7 +65,7 @@ def dump_data(df_table: pd.DataFrame) -> None: error_per_bin = { "stat": float(df_table.loc[i, "stat_err"]), "sys_lumi": float(df_table.loc[i, "lumi_err"]), - "sys_pol": data_central[i] * float(df_table.loc[i, "spol_err"]) / 100.0, + "sys_pol": abs(data_central[i]) * float(df_table.loc[i, "spol_err"]) / 100.0, } errors.append(error_per_bin) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml index ea3c0aa1ad..c5cc374156 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml @@ -23,7 +23,7 @@ bins: sys_pol: 1.365e-05 - stat: 0.00074 sys_lumi: 0.00036 - sys_pol: -7.82e-06 + sys_pol: 7.82e-06 - stat: 0.0011 sys_lumi: 0.0004 sys_pol: 1.92e-05 @@ -38,7 +38,7 @@ bins: sys_pol: 7.8e-05 - stat: 0.0061 sys_lumi: 0.00045 - sys_pol: -0.00011309999999999998 + sys_pol: 0.00011309999999999998 - stat: 0.0085 sys_lumi: 0.00045 sys_pol: 0.0002784 diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py index 8f3a615dee..565f774695 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py @@ -60,7 +60,7 @@ def dump_data(df_table: pd.DataFrame) -> None: error_per_bin = { "stat": float(df_table.loc[i, "stat_err"]), "sys_lumi": 3.6e-4, - "sys_pol": (data_central[i] * 6.5) / 100.0, + "sys_pol": (abs(data_central[i]) * 6.5) / 100.0, } errors.append(error_per_bin) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml index be45a25092..8f849fa568 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml @@ -14,16 +14,16 @@ definitions: bins: - stat: 0.0012 sys_lumi: 0.00036 - sys_pol: -3.9e-06 + sys_pol: 3.9e-06 - stat: 0.00086 sys_lumi: 0.00036 - sys_pol: -5.85e-05 + sys_pol: 5.85e-05 - stat: 0.00076 sys_lumi: 0.00036 sys_pol: 2.275e-05 - stat: 0.00076 sys_lumi: 0.00036 - sys_pol: -3.055e-05 + sys_pol: 3.055e-05 - stat: 0.00082 sys_lumi: 0.00036 sys_pol: 7.15e-05 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py index d4e87a1569..7f872d34f7 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py @@ -54,7 +54,7 @@ def dump_data(df_table: pd.DataFrame) -> None: error_per_bin = { "stat": float(df_table.loc[i, "stat_err"]), "syst": float(df_table.loc[i, "syst_err"]), - "sys_pol": data_central[i] * 6 / 100.0, + "sys_pol": abs(data_central[i]) * 6 / 100.0, } errors.append(error_per_bin) diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml index ac5e1df03f..051f353edd 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml @@ -14,7 +14,7 @@ definitions: bins: - stat: 0.019 syst: 0.002 - sys_pol: -0.0013800000000000002 + sys_pol: 0.0013800000000000002 - stat: 0.021 syst: 0.004 sys_pol: 0.00024 @@ -23,10 +23,10 @@ bins: sys_pol: 0.00288 - stat: 0.045 syst: 0.007 - sys_pol: -6.0e-05 + sys_pol: 6.0e-05 - stat: 0.06 syst: 0.009 sys_pol: 0.00228 - stat: 0.072 syst: 0.009 - sys_pol: -0.0027 + sys_pol: 0.0027 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py index fd69dba256..e057a4ef72 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py @@ -60,7 +60,7 @@ def dump_data(df_table: pd.DataFrame, tableid: int) -> None: error_per_bin = { "stat": float(df_table.loc[i, "stat_err"]), "syst": float(df_table.loc[i, "syst_err"]), - "sys_pol": data_central[i] * 6.7 / 100.0, + "sys_pol": abs(data_central[i]) * 6.7 / 100.0, } errors.append(error_per_bin) diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml index 1dfa333cbf..432e675bc9 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml @@ -14,13 +14,13 @@ definitions: bins: - stat: 0.0022 syst: 0.00034 - sys_pol: -0.00012797 + sys_pol: 0.00012797 - stat: 0.0024 syst: 0.00032 - sys_pol: -5.6949999999999995e-05 + sys_pol: 5.6949999999999995e-05 - stat: 0.0025 syst: 0.00031 - sys_pol: -0.00011859000000000001 + sys_pol: 0.00011859000000000001 - stat: 0.0024 syst: 0.00029 sys_pol: 1.005e-05 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml index 87bd1dba89..96adb7298c 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml @@ -14,13 +14,13 @@ definitions: bins: - stat: 0.0022 syst: 0.00021 - sys_pol: -0.00010317999999999998 + sys_pol: 0.00010317999999999998 - stat: 0.0021 syst: 0.00021 sys_pol: 0.0001407 - stat: 0.0022 syst: 0.00021 - sys_pol: -9.379999999999999e-05 + sys_pol: 9.379999999999999e-05 - stat: 0.0023 syst: 0.00021 sys_pol: 5.092e-05 From 56468ac93031ddd24ca22bb83cf501097fd6a612 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 15:43:51 +0200 Subject: [PATCH 12/13] remove sqrts from files and force eta as variable --- .../PHENIX-2009_SHP_200GEV/filter.py | 1 - .../PHENIX-2009_SHP_200GEV/kinematics.yaml | 48 ---------------- .../PHENIX-2009_SHP_200GEV/metadata.yaml | 3 +- .../PHENIX-2013_SHP_510GEV/filter.py | 1 - .../PHENIX-2013_SHP_510GEV/kinematics.yaml | 56 ------------------- .../PHENIX-2013_SHP_510GEV/metadata.yaml | 3 +- .../commondata/STAR-2006_SHP_200GEV/filter.py | 1 - .../STAR-2006_SHP_200GEV/kinematics.yaml | 24 -------- .../STAR-2006_SHP_200GEV/metadata.yaml | 3 +- .../commondata/STAR-2013_SHP_510GEV/filter.py | 1 - .../kinematics_highrap.yaml | 16 ------ .../kinematics_lowrap.yaml | 16 ------ .../STAR-2013_SHP_510GEV/metadata.yaml | 6 +- validphys2/src/validphys/process_options.py | 2 +- 14 files changed, 6 insertions(+), 175 deletions(-) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py index 252b136331..642445b7bc 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py @@ -51,7 +51,6 @@ def dump_data(df_table: pd.DataFrame) -> None: "mid": float(df_table.loc[i, "pT"]), "max": float(df_table.loc[i, "pT_high"]), }, - "sqrts": {"min": None, "mid": 200.0, "max": None}, "eta": {"min": -0.35, "mid": 0.0, "max": 0.35}, } kinematics.append(kin_value) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml index f38fdfbbee..c3a6860af0 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml @@ -3,10 +3,6 @@ bins: min: 1.0 mid: 1.3 max: 1.5 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -15,10 +11,6 @@ bins: min: 1.5 mid: 1.75 max: 2.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -27,10 +19,6 @@ bins: min: 2.0 mid: 2.23 max: 2.5 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -39,10 +27,6 @@ bins: min: 2.5 mid: 2.72 max: 3.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -51,10 +35,6 @@ bins: min: 3.0 mid: 3.22 max: 3.5 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -63,10 +43,6 @@ bins: min: 3.5 mid: 3.72 max: 4.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -75,10 +51,6 @@ bins: min: 4.0 mid: 4.39 max: 5.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -87,10 +59,6 @@ bins: min: 5.0 mid: 5.4 max: 6.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -99,10 +67,6 @@ bins: min: 6.0 mid: 6.41 max: 7.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -111,10 +75,6 @@ bins: min: 7.0 mid: 7.74 max: 9.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -123,10 +83,6 @@ bins: min: 9.0 mid: 10.0 max: 12.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 @@ -135,10 +91,6 @@ bins: min: 12.0 mid: 13.1 max: 15.0 - sqrts: - min: null - mid: 200.0 - max: null eta: min: -0.35 mid: 0.0 diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml index a34b61cf98..fe3c4ba1a0 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml @@ -32,12 +32,11 @@ implemented_observables: dataset_label: "PHENIX ALL" y_label: "$A_{LL}(p_T)$" plot_x: pT - kinematic_coverage: [pT, sqrts, eta] + kinematic_coverage: [pT, eta] kinematics: variables: pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } - sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } eta: { description: "pi^0 pseudorapidity", label: r"$\eta$", units: "" } file: kinematics.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py index 565f774695..a92cb51d5d 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py @@ -46,7 +46,6 @@ def dump_data(df_table: pd.DataFrame) -> None: "mid": float(df_table.loc[i, "pT"]), "max": float(df_table.loc[i, "pT_high"]), }, - "sqrts": {"min": None, "mid": 510.0, "max": None}, "eta": {"min": -0.35, "mid": 0.0, "max": 0.35}, } kinematics.append(kin_value) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml index 8a4f77a3b7..ac6893b670 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml @@ -3,10 +3,6 @@ bins: min: 2.0 mid: 2.28 max: 2.5 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -15,10 +11,6 @@ bins: min: 2.5 mid: 2.76 max: 3.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -27,10 +19,6 @@ bins: min: 3.0 mid: 3.25 max: 3.5 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -39,10 +27,6 @@ bins: min: 3.5 mid: 3.74 max: 4.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -51,10 +35,6 @@ bins: min: 4.0 mid: 4.24 max: 4.5 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -63,10 +43,6 @@ bins: min: 4.5 mid: 4.74 max: 5.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -75,10 +51,6 @@ bins: min: 5.0 mid: 5.45 max: 6.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -87,10 +59,6 @@ bins: min: 6.0 mid: 6.45 max: 7.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -99,10 +67,6 @@ bins: min: 7.0 mid: 7.45 max: 8.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -111,10 +75,6 @@ bins: min: 8.0 mid: 8.45 max: 9.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -123,10 +83,6 @@ bins: min: 9.0 mid: 9.45 max: 10.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -135,10 +91,6 @@ bins: min: 10.0 mid: 10.82 max: 12.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -147,10 +99,6 @@ bins: min: 12.0 mid: 13.14 max: 14.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 @@ -159,10 +107,6 @@ bins: min: 14.0 mid: 16.62 max: 18.0 - sqrts: - min: null - mid: 510.0 - max: null eta: min: -0.35 mid: 0.0 diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml index fb5b551134..e3d27dd4d5 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml @@ -30,11 +30,10 @@ implemented_observables: dataset_label: "PHENIX ALL" y_label: "$A_{LL}(p_T)$" plot_x: pT - kinematic_coverage: [pT, sqrts, eta] + kinematic_coverage: [pT, eta] kinematics: variables: pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } - sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } eta: { description: "π0 pseudorapidity", label: r"$\eta$", units: ""} file: kinematics.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py index 7f872d34f7..fdd8c754fd 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py @@ -40,7 +40,6 @@ def dump_data(df_table: pd.DataFrame) -> None: for i in range(len(df_table["asym"])): kin_value = { "pT": {"min": None, "mid": float(df_table.loc[i, "pT"]), "max": None}, - "sqrts": {"min": None, "mid": 200.0, "max": None}, "eta": {"min": 0.8, "mid": 1.4, "max": 2.0}, } kinematics.append(kin_value) diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml index 8aedac3e15..87f13208a4 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml @@ -3,10 +3,6 @@ bins: min: null mid: 5.57692 max: null - sqrts: - min: null - mid: 200.0 - max: null eta: min: 0.8 mid: 1.4 @@ -15,10 +11,6 @@ bins: min: null mid: 6.51397 max: null - sqrts: - min: null - mid: 200.0 - max: null eta: min: 0.8 mid: 1.4 @@ -27,10 +19,6 @@ bins: min: null mid: 7.48737 max: null - sqrts: - min: null - mid: 200.0 - max: null eta: min: 0.8 mid: 1.4 @@ -39,10 +27,6 @@ bins: min: null mid: 8.4765 max: null - sqrts: - min: null - mid: 200.0 - max: null eta: min: 0.8 mid: 1.4 @@ -51,10 +35,6 @@ bins: min: null mid: 9.44489 max: null - sqrts: - min: null - mid: 200.0 - max: null eta: min: 0.8 mid: 1.4 @@ -63,10 +43,6 @@ bins: min: null mid: 10.7949 max: null - sqrts: - min: null - mid: 200.0 - max: null eta: min: 0.8 mid: 1.4 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml index 08d79b5517..725ffffdb0 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml @@ -32,12 +32,11 @@ implemented_observables: dataset_label: "STAR ALL" y_label: "$A_{LL}(p_T)$" plot_x: pT - kinematic_coverage: [pT, sqrts, eta] + kinematic_coverage: [pT, eta] kinematics: variables: pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } - sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } eta: { description: "Pseudorapidity", label: r"$\eta$", units: "" } file: kinematics.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py index e057a4ef72..1d1f8e6017 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py @@ -46,7 +46,6 @@ def dump_data(df_table: pd.DataFrame, tableid: int) -> None: "mid": (float(df_table.loc[i, "pT_high"]) + float(df_table.loc[i, "pT_low"])) / 2, "max": float(df_table.loc[i, "pT_high"]), }, - "sqrts": {"min": None, "mid": 510.0, "max": None}, "eta": {"min": 3.15, "mid": 3.525, "max": 3.90}, } kinematics.append(kin_value) diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml index 9504c897dc..0da835fd68 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml @@ -3,10 +3,6 @@ bins: min: 3.7 mid: 3.91 max: 4.12 - sqrts: - min: null - mid: 510.0 - max: null eta: min: 3.15 mid: 3.525 @@ -15,10 +11,6 @@ bins: min: 4.48 mid: 4.73 max: 4.98 - sqrts: - min: null - mid: 510.0 - max: null eta: min: 3.15 mid: 3.525 @@ -27,10 +19,6 @@ bins: min: 5.33 mid: 5.62 max: 5.91 - sqrts: - min: null - mid: 510.0 - max: null eta: min: 3.15 mid: 3.525 @@ -39,10 +27,6 @@ bins: min: 6.71 mid: 7.08 max: 7.45 - sqrts: - min: null - mid: 510.0 - max: null eta: min: 3.15 mid: 3.525 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml index c45551187a..6bc318481f 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml @@ -3,10 +3,6 @@ bins: min: 2.37 mid: 2.5 max: 2.63 - sqrts: - min: null - mid: 510.0 - max: null eta: min: 3.15 mid: 3.525 @@ -15,10 +11,6 @@ bins: min: 3.15 mid: 3.33 max: 3.51 - sqrts: - min: null - mid: 510.0 - max: null eta: min: 3.15 mid: 3.525 @@ -27,10 +19,6 @@ bins: min: 3.89 mid: 4.11 max: 4.33 - sqrts: - min: null - mid: 510.0 - max: null eta: min: 3.15 mid: 3.525 @@ -39,10 +27,6 @@ bins: min: 5.08 mid: 5.37 max: 5.66 - sqrts: - min: null - mid: 510.0 - max: null eta: min: 3.15 mid: 3.525 diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml index 728421f4d0..cad695df1a 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml @@ -31,11 +31,10 @@ implemented_observables: dataset_label: "STAR ALL" y_label: "$A_{LL}(p_T)$" plot_x: pT - kinematic_coverage: [pT, sqrts, eta] + kinematic_coverage: [pT, eta] kinematics: variables: pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } - sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } eta: { description: "Pseudorapidity", label: r"$\eta$", units: "" } file: kinematics_lowrap.yaml data_central: data_lowrap.yaml @@ -56,11 +55,10 @@ implemented_observables: dataset_label: "STAR ALL" y_label: "$A_{LL}(p_T)$" plot_x: pT - kinematic_coverage: [pT, sqrts, eta] + kinematic_coverage: [pT, eta] kinematics: variables: pT: { description: "Transverse momentum", label: "$p_T$", units: "GeV" } - sqrts: { description: "Center-of-mass energy", label: r"$\sqrt(s)$", units: "GeV" } eta: { description: "Pseudorapidity", label: r"$\eta$", units: "" } file: kinematics_highrap.yaml data_central: data_highrap.yaml diff --git a/validphys2/src/validphys/process_options.py b/validphys2/src/validphys/process_options.py index 60b4117fbd..ec3cd7da5c 100644 --- a/validphys2/src/validphys/process_options.py +++ b/validphys2/src/validphys/process_options.py @@ -154,7 +154,7 @@ def _shp_xq2map(kin_info): # Then compute x, Q2 pT = kin_info[_Vars.pT] ratio = pT / kin_info[_Vars.sqrts] - rap = kin_info.get_one_of(_Vars.y, _Vars.eta, _Vars.abs_eta) + rap = kin_info[_Vars.eta] x1 = 2 * ratio * np.exp(rap) x2 = 2 * ratio * np.exp(-rap) q2 = pT * pT From 23298b7b839763efb9f5452b60dc8d9e99e4a6e7 Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Thu, 19 Sep 2024 21:46:19 +0200 Subject: [PATCH 13/13] add hadron type and charge to dataset name --- .../data.yaml | 0 .../filter.py | 0 .../kinematics.yaml | 0 .../metadata.yaml | 2 +- .../rawdata/HEPData-ins1282448-v1-Table_7.yaml | 0 .../uncertainties.yaml | 0 .../data.yaml | 0 .../filter.py | 0 .../kinematics.yaml | 0 .../metadata.yaml | 2 +- .../rawdata/HEPData-ins1396712-v1-Figure_3.yaml | 0 .../uncertainties.yaml | 0 .../data.yaml | 0 .../filter.py | 0 .../kinematics.yaml | 0 .../metadata.yaml | 2 +- .../rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml | 0 .../uncertainties.yaml | 0 .../data_highrap.yaml | 0 .../data_lowrap.yaml | 0 .../filter.py | 0 .../kinematics_highrap.yaml | 0 .../kinematics_lowrap.yaml | 0 .../metadata.yaml | 2 +- .../rawdata/HEPData-ins1674826-v1-Table_1.yaml | 0 .../rawdata/HEPData-ins1674826-v1-Table_2.yaml | 0 .../uncertainties_highrap.yaml | 0 .../uncertainties_lowrap.yaml | 0 28 files changed, 4 insertions(+), 4 deletions(-) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2009_SHP_200GEV => PHENIX-2009_SHP_200GEV_PI0}/data.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2009_SHP_200GEV => PHENIX-2009_SHP_200GEV_PI0}/filter.py (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2009_SHP_200GEV => PHENIX-2009_SHP_200GEV_PI0}/kinematics.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2009_SHP_200GEV => PHENIX-2009_SHP_200GEV_PI0}/metadata.yaml (96%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2009_SHP_200GEV => PHENIX-2009_SHP_200GEV_PI0}/rawdata/HEPData-ins1282448-v1-Table_7.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2009_SHP_200GEV => PHENIX-2009_SHP_200GEV_PI0}/uncertainties.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2013_SHP_510GEV => PHENIX-2013_SHP_510GEV_PI0}/data.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2013_SHP_510GEV => PHENIX-2013_SHP_510GEV_PI0}/filter.py (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2013_SHP_510GEV => PHENIX-2013_SHP_510GEV_PI0}/kinematics.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2013_SHP_510GEV => PHENIX-2013_SHP_510GEV_PI0}/metadata.yaml (96%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2013_SHP_510GEV => PHENIX-2013_SHP_510GEV_PI0}/rawdata/HEPData-ins1396712-v1-Figure_3.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{PHENIX-2013_SHP_510GEV => PHENIX-2013_SHP_510GEV_PI0}/uncertainties.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2006_SHP_200GEV => STAR-2006_SHP_200GEV_PI0}/data.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2006_SHP_200GEV => STAR-2006_SHP_200GEV_PI0}/filter.py (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2006_SHP_200GEV => STAR-2006_SHP_200GEV_PI0}/kinematics.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2006_SHP_200GEV => STAR-2006_SHP_200GEV_PI0}/metadata.yaml (96%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2006_SHP_200GEV => STAR-2006_SHP_200GEV_PI0}/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2006_SHP_200GEV => STAR-2006_SHP_200GEV_PI0}/uncertainties.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/data_highrap.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/data_lowrap.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/filter.py (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/kinematics_highrap.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/kinematics_lowrap.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/metadata.yaml (98%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/rawdata/HEPData-ins1674826-v1-Table_1.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/rawdata/HEPData-ins1674826-v1-Table_2.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/uncertainties_highrap.yaml (100%) rename nnpdf_data/nnpdf_data/commondata/{STAR-2013_SHP_510GEV => STAR-2013_SHP_510GEV_PI0}/uncertainties_lowrap.yaml (100%) diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/data.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/data.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/data.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/filter.py similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/filter.py rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/filter.py diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/kinematics.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/kinematics.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/kinematics.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/metadata.yaml similarity index 96% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/metadata.yaml index fe3c4ba1a0..d5e0e4f1e3 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/metadata.yaml @@ -1,5 +1,5 @@ # Generalia -setname: "PHENIX-2009_SHP_200GEV" +setname: "PHENIX-2009_SHP_200GEV_PI0" version: 1 version_comment: "Initial implementation" diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/rawdata/HEPData-ins1282448-v1-Table_7.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/rawdata/HEPData-ins1282448-v1-Table_7.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/rawdata/HEPData-ins1282448-v1-Table_7.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/uncertainties.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV/uncertainties.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2009_SHP_200GEV_PI0/uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/data.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/data.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/data.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/data.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/filter.py similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/filter.py rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/filter.py diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/kinematics.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/kinematics.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/kinematics.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/metadata.yaml similarity index 96% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/metadata.yaml index e3d27dd4d5..79d290b485 100644 --- a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/metadata.yaml @@ -1,5 +1,5 @@ # Generalia -setname: "PHENIX-2013_SHP_510GEV" +setname: "PHENIX-2013_SHP_510GEV_PI0" version: 1 version_comment: "Initial implementation" diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/rawdata/HEPData-ins1396712-v1-Figure_3.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/rawdata/HEPData-ins1396712-v1-Figure_3.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/rawdata/HEPData-ins1396712-v1-Figure_3.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/rawdata/HEPData-ins1396712-v1-Figure_3.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/uncertainties.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV/uncertainties.yaml rename to nnpdf_data/nnpdf_data/commondata/PHENIX-2013_SHP_510GEV_PI0/uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/data.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/data.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/data.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/data.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/filter.py similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/filter.py rename to nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/filter.py diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/kinematics.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/kinematics.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/kinematics.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/metadata.yaml similarity index 96% rename from nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/metadata.yaml index 725ffffdb0..46abcc9659 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/metadata.yaml @@ -1,5 +1,5 @@ # Generalia -setname: "STAR-2006_SHP_200GEV" +setname: "STAR-2006_SHP_200GEV_PI0" version: 1 version_comment: "Initial implementation" diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/rawdata/HEPData-ins1253360-v1-Figure_7_Data.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/uncertainties.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV/uncertainties.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2006_SHP_200GEV_PI0/uncertainties.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_highrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/data_highrap.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_highrap.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/data_highrap.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_lowrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/data_lowrap.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/data_lowrap.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/data_lowrap.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/filter.py similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/filter.py rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/filter.py diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/kinematics_highrap.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_highrap.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/kinematics_highrap.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/kinematics_lowrap.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/kinematics_lowrap.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/kinematics_lowrap.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/metadata.yaml similarity index 98% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/metadata.yaml index cad695df1a..001a969d1f 100644 --- a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/metadata.yaml +++ b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/metadata.yaml @@ -1,5 +1,5 @@ # Generalia -setname: "STAR-2013_SHP_510GEV" +setname: "STAR-2013_SHP_510GEV_PI0" version: 1 version_comment: "Initial implementation" diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_1.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/rawdata/HEPData-ins1674826-v1-Table_1.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_1.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/rawdata/HEPData-ins1674826-v1-Table_1.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_2.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/rawdata/HEPData-ins1674826-v1-Table_2.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/rawdata/HEPData-ins1674826-v1-Table_2.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/rawdata/HEPData-ins1674826-v1-Table_2.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/uncertainties_highrap.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_highrap.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/uncertainties_highrap.yaml diff --git a/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml b/nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/uncertainties_lowrap.yaml similarity index 100% rename from nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV/uncertainties_lowrap.yaml rename to nnpdf_data/nnpdf_data/commondata/STAR-2013_SHP_510GEV_PI0/uncertainties_lowrap.yaml