diff --git a/ATLAS_2JET_13TEV_DIF_MJJ-Y/download_ploughshare.sh b/ATLAS_2JET_13TEV_DIF_MJJ-Y/download_ploughshare.sh new file mode 100755 index 00000000..299b7b01 --- /dev/null +++ b/ATLAS_2JET_13TEV_DIF_MJJ-Y/download_ploughshare.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +# The purpose of this script is to download the dijet grids in question from ploughshare +# and convert them to the pineappl format under the correct names (as specified in commondata) +# Script takes one positional argument: the name of the conda environment to be used +# You need to make sure that your conda environment contains the right ingredients for the grid conversion +# For macOS, you need the following: +# fastNLO: 'brew tap davidchall/hep' 'brew install --without-fastjet fastnlo' +# PineAPPL complied with fastnlo: 'cargo install --features=fastnlo --path pineappl_cli' +# This should enable the command 'pineappl import' to run correctly + +ENV_NAME=$1 + +# conda activate is a shell function and requires conda.sh to be sourced first. +# Find the conda base directory, trying multiple common install locations. +if command -v conda &>/dev/null; then + CONDA_BASE=$(conda info --base 2>/dev/null) +fi +if [ -z "$CONDA_BASE" ]; then + for candidate in \ + "$HOME/miniforge3" \ + "$HOME/mambaforge" \ + "$HOME/miniconda3" \ + "$HOME/anaconda3" \ + "/opt/conda" \ + "/opt/miniforge3" \ + "/opt/miniconda3" \ + "/opt/anaconda3" \ + "/usr/local/miniconda3" \ + "/usr/local/anaconda3" + do + if [ -f "$candidate/etc/profile.d/conda.sh" ]; then + CONDA_BASE="$candidate" + break + fi + done +fi +if [ -z "$CONDA_BASE" ]; then + echo "Error: Could not find conda installation" >&2 + exit 1 +fi + +# shellcheck source=/dev/null +source "$CONDA_BASE/etc/profile.d/conda.sh" +conda activate "$ENV_NAME" + +# Create dir for adjusted grids (and a tmp directory) +GRIDS_PATH="ATLAS_2JET_13TEV_DIF" +mkdir -p "$GRIDS_PATH" +mkdir -p "$GRIDS_PATH/tmp" + +# Download and extract the grids +FILENAME="applfast-atlas-dijets-v2-fc-fnlo-arxiv-1711.02692" +wget "https://ploughshare.web.cern.ch/ploughshare/db/applfast/$FILENAME/${FILENAME}.tgz" +tar -xzvf "${FILENAME}.tgz" +PS_FOLDER="$FILENAME/grids" + +# Bin mapping +bin1="y*=0.25" +bin2="y*=0.75" +bin3="y*=1.25" +bin4="y*=1.75" +bin5="y*=2.25" +bin6="y*=2.75" + +# Convert the grids to pineappl format under the right names +# also, add bin info +for i in {0..5}; do + j=$((i+1)) + src="$PS_FOLDER/${FILENAME}-xsec00${i}.tab.gz" + temp_dst="$GRIDS_PATH/tmp/ATLAS_2JET_13TEV_DIF_MJJ-Y_BIN${j}.pineappl.lz4" + dst="$GRIDS_PATH/ATLAS_2JET_13TEV_DIF_MJJ-Y_BIN${j}.pineappl.lz4" + pineappl import "$src" "$temp_dst" NNPDF40_nnlo_as_01180 + eval "current_bin=\$bin${j}" + pineappl write --set-key-value kin_bin ${current_bin} ${temp_dst} ${dst} + rm ${temp_dst} +done + +rmdir "$GRIDS_PATH/tmp" +rm -r "$FILENAME" +rm ${FILENAME}.tgz \ No newline at end of file diff --git a/ATLAS_2JET_13TEV_DIF_MJJ-Y/metadata.txt b/ATLAS_2JET_13TEV_DIF_MJJ-Y/metadata.txt new file mode 100644 index 00000000..7a7c97aa --- /dev/null +++ b/ATLAS_2JET_13TEV_DIF_MJJ-Y/metadata.txt @@ -0,0 +1,9 @@ +arxiv=1711.02692 +description=ATLAS double differential cross section w.r.t. m_jj and y* at 13 TeV. Full colour grid downloaded from ploughshare. +comments=this is the full color card. To get the grids, run download_ploughshare.sh +hepdata=10.17182/hepdata.79952.v1/t1, 10.17182/hepdata.79952.v1/t2, 10.17182/hepdata.79952.v1/t3, 10.17182/hepdata.79952.v1/t4, 10.17182/hepdata.79952.v1/t5, 10.17182/hepdata.79952.v1/t6 +ploughshare=https://ploughshare.web.cern.ch/ploughshare/record.php?dataset=applfast-atlas-dijets-v2-fc-fnlo-arxiv-1711.02692 +nnpdf_id= ATLAS_2JET_13TEV_DIF +y_label=d2sig/dmjjdy* +y_label_tex='$\frac{d^2\sigma}{dm_{jj} d|y^*|}$ ($\frac{pb}{GeV}$)' +y_unit=pb/GeV \ No newline at end of file diff --git a/ATLAS_2JET_7TEV_R06_0005/metadata.txt b/ATLAS_2JET_7TEV_R06_0005/metadata.txt index 8ae35172..ff8037c4 100644 --- a/ATLAS_2JET_7TEV_R06_0005/metadata.txt +++ b/ATLAS_2JET_7TEV_R06_0005/metadata.txt @@ -1,5 +1,6 @@ arxiv=1312.3524 description=ATLAS double-differential jet cross section at 7 TeV +comments=this is a leading color runcard. For full color, see ATLAS_2JET_7TEV_R06_M12Y hepdata=10.17182/hepdata.62289.v1/t7, 10.17182/hepdata.62289.v1/t8, 10.17182/hepdata.62289.v1/t9, 10.17182/hepdata.62289.v1/t10, 10.17182/hepdata.62289.v1/t11, 10.17182/hepdata.62289.v1/t12 nnpdf_id=ATLAS_2JET_7TEV_R06 x1_label=ystar diff --git a/ATLAS_2JET_7TEV_R06_0510/metadata.txt b/ATLAS_2JET_7TEV_R06_0510/metadata.txt index 8ae35172..ff8037c4 100644 --- a/ATLAS_2JET_7TEV_R06_0510/metadata.txt +++ b/ATLAS_2JET_7TEV_R06_0510/metadata.txt @@ -1,5 +1,6 @@ arxiv=1312.3524 description=ATLAS double-differential jet cross section at 7 TeV +comments=this is a leading color runcard. For full color, see ATLAS_2JET_7TEV_R06_M12Y hepdata=10.17182/hepdata.62289.v1/t7, 10.17182/hepdata.62289.v1/t8, 10.17182/hepdata.62289.v1/t9, 10.17182/hepdata.62289.v1/t10, 10.17182/hepdata.62289.v1/t11, 10.17182/hepdata.62289.v1/t12 nnpdf_id=ATLAS_2JET_7TEV_R06 x1_label=ystar diff --git a/ATLAS_2JET_7TEV_R06_1015/metadata.txt b/ATLAS_2JET_7TEV_R06_1015/metadata.txt index 8ae35172..ff8037c4 100644 --- a/ATLAS_2JET_7TEV_R06_1015/metadata.txt +++ b/ATLAS_2JET_7TEV_R06_1015/metadata.txt @@ -1,5 +1,6 @@ arxiv=1312.3524 description=ATLAS double-differential jet cross section at 7 TeV +comments=this is a leading color runcard. For full color, see ATLAS_2JET_7TEV_R06_M12Y hepdata=10.17182/hepdata.62289.v1/t7, 10.17182/hepdata.62289.v1/t8, 10.17182/hepdata.62289.v1/t9, 10.17182/hepdata.62289.v1/t10, 10.17182/hepdata.62289.v1/t11, 10.17182/hepdata.62289.v1/t12 nnpdf_id=ATLAS_2JET_7TEV_R06 x1_label=ystar diff --git a/ATLAS_2JET_7TEV_R06_1520/metadata.txt b/ATLAS_2JET_7TEV_R06_1520/metadata.txt index 8ae35172..ff8037c4 100644 --- a/ATLAS_2JET_7TEV_R06_1520/metadata.txt +++ b/ATLAS_2JET_7TEV_R06_1520/metadata.txt @@ -1,5 +1,6 @@ arxiv=1312.3524 description=ATLAS double-differential jet cross section at 7 TeV +comments=this is a leading color runcard. For full color, see ATLAS_2JET_7TEV_R06_M12Y hepdata=10.17182/hepdata.62289.v1/t7, 10.17182/hepdata.62289.v1/t8, 10.17182/hepdata.62289.v1/t9, 10.17182/hepdata.62289.v1/t10, 10.17182/hepdata.62289.v1/t11, 10.17182/hepdata.62289.v1/t12 nnpdf_id=ATLAS_2JET_7TEV_R06 x1_label=ystar diff --git a/ATLAS_2JET_7TEV_R06_2025/metadata.txt b/ATLAS_2JET_7TEV_R06_2025/metadata.txt index 8ae35172..ff8037c4 100644 --- a/ATLAS_2JET_7TEV_R06_2025/metadata.txt +++ b/ATLAS_2JET_7TEV_R06_2025/metadata.txt @@ -1,5 +1,6 @@ arxiv=1312.3524 description=ATLAS double-differential jet cross section at 7 TeV +comments=this is a leading color runcard. For full color, see ATLAS_2JET_7TEV_R06_M12Y hepdata=10.17182/hepdata.62289.v1/t7, 10.17182/hepdata.62289.v1/t8, 10.17182/hepdata.62289.v1/t9, 10.17182/hepdata.62289.v1/t10, 10.17182/hepdata.62289.v1/t11, 10.17182/hepdata.62289.v1/t12 nnpdf_id=ATLAS_2JET_7TEV_R06 x1_label=ystar diff --git a/ATLAS_2JET_7TEV_R06_2530/metadata.txt b/ATLAS_2JET_7TEV_R06_2530/metadata.txt index 8ae35172..ff8037c4 100644 --- a/ATLAS_2JET_7TEV_R06_2530/metadata.txt +++ b/ATLAS_2JET_7TEV_R06_2530/metadata.txt @@ -1,5 +1,6 @@ arxiv=1312.3524 description=ATLAS double-differential jet cross section at 7 TeV +comments=this is a leading color runcard. For full color, see ATLAS_2JET_7TEV_R06_M12Y hepdata=10.17182/hepdata.62289.v1/t7, 10.17182/hepdata.62289.v1/t8, 10.17182/hepdata.62289.v1/t9, 10.17182/hepdata.62289.v1/t10, 10.17182/hepdata.62289.v1/t11, 10.17182/hepdata.62289.v1/t12 nnpdf_id=ATLAS_2JET_7TEV_R06 x1_label=ystar diff --git a/ATLAS_2JET_7TEV_R06_M12Y/download_ploughshare.sh b/ATLAS_2JET_7TEV_R06_M12Y/download_ploughshare.sh new file mode 100755 index 00000000..56abcf66 --- /dev/null +++ b/ATLAS_2JET_7TEV_R06_M12Y/download_ploughshare.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +# The purpose of this script is to download the dijet grids in question from ploughshare +# and convert them to the pineappl format under the correct names (as specified in commondata) +# Script takes one positional argument: the name of the conda environment to be used +# You need to make sure that your conda environment contains the right ingredients for the grid conversion +# For macOS, you need the following: +# fastNLO: 'brew tap davidchall/hep' 'brew install --without-fastjet fastnlo' +# PineAPPL complied with fastnlo: 'cargo install --features=fastnlo --path pineappl_cli' +# This should enable the command 'pineappl import' to run correctly + +ENV_NAME=$1 + +# conda activate is a shell function and requires conda.sh to be sourced first. +# Find the conda base directory, trying multiple common install locations. +if command -v conda &>/dev/null; then + CONDA_BASE=$(conda info --base 2>/dev/null) +fi +if [ -z "$CONDA_BASE" ]; then + for candidate in \ + "$HOME/miniforge3" \ + "$HOME/mambaforge" \ + "$HOME/miniconda3" \ + "$HOME/anaconda3" \ + "/opt/conda" \ + "/opt/miniforge3" \ + "/opt/miniconda3" \ + "/opt/anaconda3" \ + "/usr/local/miniconda3" \ + "/usr/local/anaconda3" + do + if [ -f "$candidate/etc/profile.d/conda.sh" ]; then + CONDA_BASE="$candidate" + break + fi + done +fi +if [ -z "$CONDA_BASE" ]; then + echo "Error: Could not find conda installation" >&2 + exit 1 +fi + +# shellcheck source=/dev/null +source "$CONDA_BASE/etc/profile.d/conda.sh" +conda activate "$ENV_NAME" + +# Create dir for adjusted grids (and a tmp directory) +GRIDS_PATH="ATLAS_2JET_7TEV_R06" +mkdir -p "$GRIDS_PATH" +mkdir -p "$GRIDS_PATH/tmp" + +# Download and extract the grids +FILENAME="applfast-atlas-dijets-v2-fc-fnlo-arxiv-1312.3524" +wget "https://ploughshare.web.cern.ch/ploughshare/db/applfast/$FILENAME/${FILENAME}.tgz" +tar -xzvf "${FILENAME}.tgz" +PS_FOLDER="$FILENAME/grids" + +# Bin mapping +bin1="y*=0.25" +bin2="y*=0.75" +bin3="y*=1.25" +bin4="y*=1.75" +bin5="y*=2.25" +bin6="y*=2.75" + +# Convert the grids to pineappl format under the right names +# also, add bin info +for i in {0..5}; do + j=$((i+1)) + src="$PS_FOLDER/${FILENAME}-xsec00${i}.tab.gz" + temp_dst="$GRIDS_PATH/tmp/ATLAS_2JET_7TEV_R06_M12Y_BIN${j}.pineappl.lz4" + dst="$GRIDS_PATH/ATLAS_2JET_7TEV_R06_M12Y_BIN${j}.pineappl.lz4" + pineappl import "$src" "$temp_dst" NNPDF40_nnlo_as_01180 + eval "current_bin=\$bin${j}" + pineappl write --set-key-value kin_bin ${current_bin} ${temp_dst} ${dst} + rm ${temp_dst} +done + +rmdir "$GRIDS_PATH/tmp" +rm -r "$FILENAME" +rm ${FILENAME}.tgz \ No newline at end of file diff --git a/ATLAS_2JET_7TEV_R06_M12Y/metadata.txt b/ATLAS_2JET_7TEV_R06_M12Y/metadata.txt new file mode 100644 index 00000000..4c9cfb57 --- /dev/null +++ b/ATLAS_2JET_7TEV_R06_M12Y/metadata.txt @@ -0,0 +1,15 @@ +arxiv=1312.3524 +description=ATLAS double-differential jet cross section at 7 TeV +comments=this is the full color card. To get the grids, run download_ploughshare.sh +hepdata=10.17182/hepdata.62289.v1/t7, 10.17182/hepdata.62289.v1/t8, 10.17182/hepdata.62289.v1/t9, 10.17182/hepdata.62289.v1/t10, 10.17182/hepdata.62289.v1/t11, 10.17182/hepdata.62289.v1/t12 +ploughshare=https://ploughshare.web.cern.ch/ploughshare/record.php?dataset=applfast-atlas-dijets-v2-fc-fnlo-arxiv-1312.3524 +nnpdf_id=ATLAS_2JET_7TEV_R06 +x1_label=ystar +x1_label_tex=$y^*$ +x1_unit= +x2_label=Mjj +x2_label_tex=$M_{\mathrm{j}_1\mathrm{j}_2}$ +x2_unit=GeV +y_label=d2sig/dMjj/dystar +y_label_tex=$\frac{\mathrm{d}^2\sigma}{\mathrm{d}M_{\mathrm{j}_1\mathrm{j}_2}\mathrm{d}y^*} +y_unit=pb/GeV diff --git a/CMS_2JET_13TEV/download_ploughshare.sh b/CMS_2JET_13TEV/download_ploughshare.sh new file mode 100755 index 00000000..4721a57b --- /dev/null +++ b/CMS_2JET_13TEV/download_ploughshare.sh @@ -0,0 +1,145 @@ +#!/bin/bash + +# The purpose of this script is to download the dijet grids in question from ploughshare +# and convert them to the pineappl format under the correct names (as specified in commondata) +# Script takes one positional argument: the name of the conda environment to be used +# You need to make sure that your conda environment contains the right ingredients for the grid conversion +# For macOS, you need the following: +# fastNLO: 'brew tap davidchall/hep' 'brew install --without-fastjet fastnlo' +# PineAPPL complied with fastnlo: 'cargo install --features=fastnlo --path pineappl_cli' +# This should enable the command 'pineappl import' to run correctly + +ENV_NAME=$1 + +# conda activate is a shell function and requires conda.sh to be sourced first. +# Find the conda base directory, trying multiple common install locations. +if command -v conda &>/dev/null; then + CONDA_BASE=$(conda info --base 2>/dev/null) +fi +if [ -z "$CONDA_BASE" ]; then + for candidate in \ + "$HOME/miniforge3" \ + "$HOME/mambaforge" \ + "$HOME/miniconda3" \ + "$HOME/anaconda3" \ + "/opt/conda" \ + "/opt/miniforge3" \ + "/opt/miniconda3" \ + "/opt/anaconda3" \ + "/usr/local/miniconda3" \ + "/usr/local/anaconda3" + do + if [ -f "$candidate/etc/profile.d/conda.sh" ]; then + CONDA_BASE="$candidate" + break + fi + done +fi +if [ -z "$CONDA_BASE" ]; then + echo "Error: Could not find conda installation" >&2 + exit 1 +fi + +# shellcheck source=/dev/null +source "$CONDA_BASE/etc/profile.d/conda.sh" +conda activate "$ENV_NAME" + +# Create dir for adjusted grids +GRIDS_2D_PATH="CMS_2JET_13TEV_2D" +GRIDS_3D_PATH="CMS_2JET_13TEV_3D" +mkdir -p "$GRIDS_2D_PATH" +mkdir -p "$GRIDS_3D_PATH" + +# Download and extract the grids +FILENAME="applfast-cms-dijets-v2-fc-fnlo-arxiv-2312.16669" +wget "https://ploughshare.web.cern.ch/ploughshare/db/applfast/$FILENAME/${FILENAME}.tgz" +tar -xzvf "${FILENAME}.tgz" +PS_FOLDER="$FILENAME/grids" + +# Utility functions +delete_bins() { + local bin_range="$1" + local input="$2" + local output="$3" + pineappl write --delete-bins "$bin_range" "$input" "$output" +} + +add_bin_info() { + local bin_info="$1" + local input="$2" + pineappl write --set-key-value kin_bin "$bin_info" "$input" "${GRIDS_3D_PATH}/${input}" +} + +# Convert the grids to pineappl format +for i in {0..19}; do + if ((i<10)); then + src="$PS_FOLDER/${FILENAME}-xsec00${i}.tab.gz" + dst="$PS_FOLDER/${FILENAME}-xsec00${i}.pineappl.lz4" + pineappl import "$src" "$dst" NNPDF40_nnlo_as_01180 + else + src="$PS_FOLDER/${FILENAME}-xsec0${i}.tab.gz" + dst="$PS_FOLDER/${FILENAME}-xsec0${i}.pineappl.lz4" + pineappl import "$src" "$dst" NNPDF40_nnlo_as_01180 + fi +done + +# Rename 2D grids +for i in {0..4}; do + bin=$((i + 1)) + src="$PS_FOLDER/${FILENAME}-xsec00${i}.pineappl.lz4" + dst="CMS_2JET_13TEV_2D_BIN${bin}.pineappl.lz4" + mv "$src" "$dst" +done + +# Delete bins from 2D grids +mv "CMS_2JET_13TEV_2D_BIN3.pineappl.lz4" "$GRIDS_2D_PATH/." +mv "CMS_2JET_13TEV_2D_BIN4.pineappl.lz4" "$GRIDS_2D_PATH/." +mv "CMS_2JET_13TEV_2D_BIN5.pineappl.lz4" "$GRIDS_2D_PATH/." +delete_bins 22-23 CMS_2JET_13TEV_2D_BIN1.pineappl.lz4 ${GRIDS_2D_PATH}/CMS_2JET_13TEV_2D_BIN1.pineappl.lz4 +delete_bins 22 CMS_2JET_13TEV_2D_BIN2.pineappl.lz4 ${GRIDS_2D_PATH}/CMS_2JET_13TEV_2D_BIN2.pineappl.lz4 + +# Rename the 3D grids (note that the mapping of the bins is non-trivial) +mv "$PS_FOLDER/${FILENAME}-xsec005.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN1.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec010.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN2.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec014.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN3.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec017.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN4.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec019.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN5.pineappl.lz4" + +mv "$PS_FOLDER/${FILENAME}-xsec006.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN2_ys_BIN1.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec011.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN2_ys_BIN2.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec015.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN2_ys_BIN3.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec018.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN2_ys_BIN4.pineappl.lz4" + +mv "$PS_FOLDER/${FILENAME}-xsec007.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN3_ys_BIN1.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec012.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN3_ys_BIN2.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec016.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN3_ys_BIN3.pineappl.lz4" + +mv "$PS_FOLDER/${FILENAME}-xsec008.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN4_ys_BIN1.pineappl.lz4" +mv "$PS_FOLDER/${FILENAME}-xsec013.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN4_ys_BIN2.pineappl.lz4" + +mv "$PS_FOLDER/${FILENAME}-xsec009.pineappl.lz4" "CMS_2JET_13TEV_3D_yb_BIN5_ys_BIN1.pineappl.lz4" + +# Add bin information to 3D grids +add_bin_info "yb<0.5 ys<0.5" CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN1.pineappl.lz4 +add_bin_info "yb<0.5 0.5<=ys<1.0" CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN2.pineappl.lz4 +add_bin_info "yb<0.5 1.0<=ys<1.5" CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN3.pineappl.lz4 +add_bin_info "yb<0.5 1.5<=ys<2.0" CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN4.pineappl.lz4 +add_bin_info "yb<0.5 2.0<=ys<2.5" CMS_2JET_13TEV_3D_yb_BIN1_ys_BIN5.pineappl.lz4 + +add_bin_info "0.5<=yb<1.0 ys<0.5" CMS_2JET_13TEV_3D_yb_BIN2_ys_BIN1.pineappl.lz4 +add_bin_info "0.5<=yb<1.0 0.5<=ys<1.0" CMS_2JET_13TEV_3D_yb_BIN2_ys_BIN2.pineappl.lz4 +add_bin_info "0.5<=yb<1.0 1.0<=ys<1.5" CMS_2JET_13TEV_3D_yb_BIN2_ys_BIN3.pineappl.lz4 +add_bin_info "0.5<=yb<1.0 1.5<=ys<2.0" CMS_2JET_13TEV_3D_yb_BIN2_ys_BIN4.pineappl.lz4 + +add_bin_info "1.0<=yb<1.5 ys<0.5" CMS_2JET_13TEV_3D_yb_BIN3_ys_BIN1.pineappl.lz4 +add_bin_info "1.0<=yb<1.5 0.5<=ys<1.0" CMS_2JET_13TEV_3D_yb_BIN3_ys_BIN2.pineappl.lz4 +add_bin_info "1.0<=yb<1.5 1.0<=ys<1.5" CMS_2JET_13TEV_3D_yb_BIN3_ys_BIN3.pineappl.lz4 + +add_bin_info "1.5<=yb<2.0 ys<0.5" CMS_2JET_13TEV_3D_yb_BIN4_ys_BIN1.pineappl.lz4 +add_bin_info "1.5<=yb<2.0 0.5<=ys<1.0" CMS_2JET_13TEV_3D_yb_BIN4_ys_BIN2.pineappl.lz4 + +add_bin_info "2.0<=yb<2.5 ys<0.5" CMS_2JET_13TEV_3D_yb_BIN5_ys_BIN1.pineappl.lz4 + +rm *.pineappl.lz4 +rm -r "$FILENAME" +rm ${FILENAME}.tgz \ No newline at end of file diff --git a/CMS_2JET_13TEV/metadata.txt b/CMS_2JET_13TEV/metadata.txt new file mode 100644 index 00000000..552d1f07 --- /dev/null +++ b/CMS_2JET_13TEV/metadata.txt @@ -0,0 +1,6 @@ +arxiv=2312.16669 +description=CMS double and triple differential dijet cross sections +comments=this is the full color card. To get the grids, run download_ploughshare.sh +hepdata=10.17182/hepdata.146075.v1/t5, 10.17182/hepdata.146075.v1/t13 +ploughshare=https://ploughshare.web.cern.ch/ploughshare/record.php?dataset=applfast-cms-dijets-v2-fc-fnlo-arxiv-2312.16669 +nnpdf_id=CMS_2JET_13TEV \ No newline at end of file diff --git a/CMS_2JET_7TEV_0005/metadata.txt b/CMS_2JET_7TEV_0005/metadata.txt index 90b270d2..d778a883 100644 --- a/CMS_2JET_7TEV_0005/metadata.txt +++ b/CMS_2JET_7TEV_0005/metadata.txt @@ -1,4 +1,5 @@ arxiv=1212.6660 +comments=this is a leading color (legacy) card. For full color, see CMS_2JET_7TEV_M12-Y description=CMS double-differential jet cross section at 7 TeV hepdata=10.17182/hepdata.66887.v1/t6, 10.17182/hepdata.66887.v1/t7, 10.17182/hepdata.66887.v1/t8, 10.17182/hepdata.66887.v1/t9, 10.17182/hepdata.66887.v1/t10 nnpdf_id=CMS_2JET_7TEV diff --git a/CMS_2JET_7TEV_0510/metadata.txt b/CMS_2JET_7TEV_0510/metadata.txt index 90b270d2..d778a883 100644 --- a/CMS_2JET_7TEV_0510/metadata.txt +++ b/CMS_2JET_7TEV_0510/metadata.txt @@ -1,4 +1,5 @@ arxiv=1212.6660 +comments=this is a leading color (legacy) card. For full color, see CMS_2JET_7TEV_M12-Y description=CMS double-differential jet cross section at 7 TeV hepdata=10.17182/hepdata.66887.v1/t6, 10.17182/hepdata.66887.v1/t7, 10.17182/hepdata.66887.v1/t8, 10.17182/hepdata.66887.v1/t9, 10.17182/hepdata.66887.v1/t10 nnpdf_id=CMS_2JET_7TEV diff --git a/CMS_2JET_7TEV_1015/metadata.txt b/CMS_2JET_7TEV_1015/metadata.txt index 90b270d2..d778a883 100644 --- a/CMS_2JET_7TEV_1015/metadata.txt +++ b/CMS_2JET_7TEV_1015/metadata.txt @@ -1,4 +1,5 @@ arxiv=1212.6660 +comments=this is a leading color (legacy) card. For full color, see CMS_2JET_7TEV_M12-Y description=CMS double-differential jet cross section at 7 TeV hepdata=10.17182/hepdata.66887.v1/t6, 10.17182/hepdata.66887.v1/t7, 10.17182/hepdata.66887.v1/t8, 10.17182/hepdata.66887.v1/t9, 10.17182/hepdata.66887.v1/t10 nnpdf_id=CMS_2JET_7TEV diff --git a/CMS_2JET_7TEV_1520/metadata.txt b/CMS_2JET_7TEV_1520/metadata.txt index 90b270d2..d778a883 100644 --- a/CMS_2JET_7TEV_1520/metadata.txt +++ b/CMS_2JET_7TEV_1520/metadata.txt @@ -1,4 +1,5 @@ arxiv=1212.6660 +comments=this is a leading color (legacy) card. For full color, see CMS_2JET_7TEV_M12-Y description=CMS double-differential jet cross section at 7 TeV hepdata=10.17182/hepdata.66887.v1/t6, 10.17182/hepdata.66887.v1/t7, 10.17182/hepdata.66887.v1/t8, 10.17182/hepdata.66887.v1/t9, 10.17182/hepdata.66887.v1/t10 nnpdf_id=CMS_2JET_7TEV diff --git a/CMS_2JET_7TEV_2025/metadata.txt b/CMS_2JET_7TEV_2025/metadata.txt index 90b270d2..d778a883 100644 --- a/CMS_2JET_7TEV_2025/metadata.txt +++ b/CMS_2JET_7TEV_2025/metadata.txt @@ -1,4 +1,5 @@ arxiv=1212.6660 +comments=this is a leading color (legacy) card. For full color, see CMS_2JET_7TEV_M12-Y description=CMS double-differential jet cross section at 7 TeV hepdata=10.17182/hepdata.66887.v1/t6, 10.17182/hepdata.66887.v1/t7, 10.17182/hepdata.66887.v1/t8, 10.17182/hepdata.66887.v1/t9, 10.17182/hepdata.66887.v1/t10 nnpdf_id=CMS_2JET_7TEV diff --git a/CMS_2JET_7TEV_M12-Y/download_ploughshare.sh b/CMS_2JET_7TEV_M12-Y/download_ploughshare.sh new file mode 100755 index 00000000..5cda1ff3 --- /dev/null +++ b/CMS_2JET_7TEV_M12-Y/download_ploughshare.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +# The purpose of this script is to download the dijet grids in question from ploughshare +# and convert them to the pineappl format under the correct names (as specified in commondata) +# Script takes one positional argument: the name of the conda environment to be used +# You need to make sure that your conda environment contains the right ingredients for the grid conversion +# For macOS, you need the following: +# fastNLO: 'brew tap davidchall/hep' 'brew install --without-fastjet fastnlo' +# PineAPPL complied with fastnlo: 'cargo install --features=fastnlo --path pineappl_cli' +# This should enable the command 'pineappl import' to run correctly + +ENV_NAME=$1 + +# conda activate is a shell function and requires conda.sh to be sourced first. +# Find the conda base directory, trying multiple common install locations. +if command -v conda &>/dev/null; then + CONDA_BASE=$(conda info --base 2>/dev/null) +fi +if [ -z "$CONDA_BASE" ]; then + for candidate in \ + "$HOME/miniforge3" \ + "$HOME/mambaforge" \ + "$HOME/miniconda3" \ + "$HOME/anaconda3" \ + "/opt/conda" \ + "/opt/miniforge3" \ + "/opt/miniconda3" \ + "/opt/anaconda3" \ + "/usr/local/miniconda3" \ + "/usr/local/anaconda3" + do + if [ -f "$candidate/etc/profile.d/conda.sh" ]; then + CONDA_BASE="$candidate" + break + fi + done +fi +if [ -z "$CONDA_BASE" ]; then + echo "Error: Could not find conda installation" >&2 + exit 1 +fi + +# shellcheck source=/dev/null +source "$CONDA_BASE/etc/profile.d/conda.sh" +conda activate "$ENV_NAME" + +# Create dir for adjusted grids (and a tmp directory) +GRIDS_PATH="CMS_2JET_7TEV" +mkdir -p "$GRIDS_PATH" +mkdir -p "$GRIDS_PATH/tmp" + +# Download and extract the grids +FILENAME="applfast-cms-dijets-v2-fc-fnlo-arxiv-1212.6660" +wget "https://ploughshare.web.cern.ch/ploughshare/db/applfast/$FILENAME/${FILENAME}.tgz" +tar -xzvf "${FILENAME}.tgz" +PS_FOLDER="$FILENAME/grids" + +# Bin mapping +bin1="y_max=0.25" +bin2="y_max=0.75" +bin3="y_max=1.25" +bin4="y_max=1.75" +bin5="y_max=2.25" + +# Convert the grids to pineappl format under the right names +# Add bin information +for i in {0..4}; do + j=$((i+1)) + src="$PS_FOLDER/${FILENAME}-xsec00${i}.tab.gz" + temp_dst="$GRIDS_PATH/tmp/CMS_2JET_7TEV_M12Y_BIN${j}.pineappl.lz4" + dst="$GRIDS_PATH/CMS_2JET_7TEV_M12Y_BIN${j}.pineappl.lz4" + pineappl import "$src" "$temp_dst" NNPDF40_nnlo_as_01180 + eval "current_bin=\$bin${j}" + pineappl write --set-key-value kin_bin ${current_bin} ${temp_dst} ${dst} + rm ${temp_dst} +done + +rmdir "$GRIDS_PATH/tmp" +rm -r "$FILENAME" +rm ${FILENAME}.tgz \ No newline at end of file diff --git a/CMS_2JET_7TEV_M12-Y/metadata.txt b/CMS_2JET_7TEV_M12-Y/metadata.txt new file mode 100644 index 00000000..be3ace88 --- /dev/null +++ b/CMS_2JET_7TEV_M12-Y/metadata.txt @@ -0,0 +1,15 @@ +ploughshare=https://ploughshare.web.cern.ch/ploughshare/record.php?dataset=applfast-cms-dijets-v2-fc-fnlo-arxiv-1212.6660 +arxiv=1212.6660 +description=CMS double-differential jet cross section at 7 TeV +comments=this is the full color card. To get the grids, run download_ploughshare.sh +hepdata=10.17182/hepdata.66887.v1/t6, 10.17182/hepdata.66887.v1/t7, 10.17182/hepdata.66887.v1/t8, 10.17182/hepdata.66887.v1/t9, 10.17182/hepdata.66887.v1/t10 +nnpdf_id=CMS_2JET_7TEV +x1_label=ymax +x1_label_tex=$y_{\mathrm{max}}$ +x1_unit= +x2_label=Mjj +x2_label_tex=$M_{\mathrm{j}\mathrm{j}}$ +x2_unit=GeV +y_label=dsig/dMjj +y_label_tex=$\frac{\mathrm{d}\sigma}{\mathrm{d}M_{\mathrm{j}\mathrm{j}}}$ +y_unit=pb/GeV diff --git a/CMS_2JET_8TEV_3D/download_ploughshare.sh b/CMS_2JET_8TEV_3D/download_ploughshare.sh new file mode 100755 index 00000000..b4c57871 --- /dev/null +++ b/CMS_2JET_8TEV_3D/download_ploughshare.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +# The purpose of this script is to download the dijet grids in question from ploughshare +# and convert them to the pineappl format under the correct names (as specified in commondata) +# Script takes one positional argument: the name of the conda environment to be used +# You need to make sure that your conda environment contains the right ingredients for the grid conversion +# For macOS, you need the following: +# fastNLO: 'brew tap davidchall/hep' 'brew install --without-fastjet fastnlo' +# PineAPPL complied with fastnlo: 'cargo install --features=fastnlo --path pineappl_cli' +# This should enable the command 'pineappl import' to run correctly + +ENV_NAME=$1 + +# conda activate is a shell function and requires conda.sh to be sourced first. +# Find the conda base directory, trying multiple common install locations. +if command -v conda &>/dev/null; then + CONDA_BASE=$(conda info --base 2>/dev/null) +fi +if [ -z "$CONDA_BASE" ]; then + for candidate in \ + "$HOME/miniforge3" \ + "$HOME/mambaforge" \ + "$HOME/miniconda3" \ + "$HOME/anaconda3" \ + "/opt/conda" \ + "/opt/miniforge3" \ + "/opt/miniconda3" \ + "/opt/anaconda3" \ + "/usr/local/miniconda3" \ + "/usr/local/anaconda3" + do + if [ -f "$candidate/etc/profile.d/conda.sh" ]; then + CONDA_BASE="$candidate" + break + fi + done +fi +if [ -z "$CONDA_BASE" ]; then + echo "Error: Could not find conda installation" >&2 + exit 1 +fi + +# shellcheck source=/dev/null +source "$CONDA_BASE/etc/profile.d/conda.sh" +conda activate "$ENV_NAME" + +# Create dir for adjusted grids (and a tmp directory) +GRIDS_PATH="CMS_2JET_8TEV" +mkdir -p "$GRIDS_PATH" +mkdir -p "$GRIDS_PATH/tmp" + +# Download and extract the grids +FILENAME="applfast-cms-dijets-v2-fc-fnlo-arxiv-1705.02628" +wget "https://ploughshare.web.cern.ch/ploughshare/db/applfast/$FILENAME/${FILENAME}.tgz" +tar -xzvf "${FILENAME}.tgz" +PS_FOLDER="$FILENAME/grids" + +# Bin mapping +bin1="y_b=0.5, y*=0.5" +bin2="y_b=0.5, y*=1.5" +bin3="y_b=0.5, y*=2.5" +bin4="y_b=1.5, y*=0.5" +bin5="y_b=1.5, y*=1.5" +bin6="y_b=2.5, y*=0.5" + +# Convert the grids to pineappl format under the right names +# also, add bin info +for i in {0..5}; do + j=$((i+1)) + src="$PS_FOLDER/${FILENAME}-xsec00${i}.tab.gz" + temp_dst="$GRIDS_PATH/tmp/CMS_2JET_8TEV_3D_BIN${j}.pineappl.lz4" + dst="$GRIDS_PATH/CMS_2JET_8TEV_3D_BIN${j}.pineappl.lz4" + pineappl import "$src" "$temp_dst" NNPDF40_nnlo_as_01180 + eval "current_bin=\$bin${j}" + pineappl write --set-key-value kin_bin "${current_bin}" ${temp_dst} ${dst} + rm ${temp_dst} +done + +rmdir "$GRIDS_PATH/tmp" +rm -r "$FILENAME" +rm ${FILENAME}.tgz \ No newline at end of file diff --git a/CMS_2JET_8TEV_3D/metadata.txt b/CMS_2JET_8TEV_3D/metadata.txt index f126ae8f..8a24d184 100644 --- a/CMS_2JET_8TEV_3D/metadata.txt +++ b/CMS_2JET_8TEV_3D/metadata.txt @@ -1,5 +1,7 @@ arxiv=1705.02628 description=CMS triple-differential jet cross section at 8 TeV +ploughshare=https://ploughshare.web.cern.ch/ploughshare/record.php?dataset=applfast-cms-dijets-v2-fc-fnlo-arxiv-1705.02628 +comments=for full color grids, run download_ploughshare.sh hepdata=10.17182/hepdata.79410.v1/t1, 10.17182/hepdata.79410.v1/t3, 10.17182/hepdata.79410.v1/t5, 10.17182/hepdata.79410.v1/t7, 10.17182/hepdata.79410.v1/t9, 10.17182/hepdata.79410.v1/t11 nnpdf_id=CMS_2JET_3D_8TEV x1_label=ystar