From e5e9faa35698aab8c8f6b62d464b2d29f1175e7c Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 25 Nov 2022 16:33:58 +0100 Subject: [PATCH 01/11] Add preliminary script to run matrix computations --- .../ATLAS_WP_7TEV_MATRIX/distribution.dat | 139 ++++++++++++++++++ pinecards/ATLAS_WP_7TEV_MATRIX/model.dat | 84 +++++++++++ pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat | 126 ++++++++++++++++ pinecards/ATLAS_WP_7TEV_MATRIX/process | 1 + run_matrix.sh | 64 ++++++++ 5 files changed, 414 insertions(+) create mode 100644 pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat create mode 100644 pinecards/ATLAS_WP_7TEV_MATRIX/model.dat create mode 100644 pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat create mode 100644 pinecards/ATLAS_WP_7TEV_MATRIX/process create mode 100755 run_matrix.sh diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat new file mode 100644 index 00000000..b472b619 --- /dev/null +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat @@ -0,0 +1,139 @@ +################################## +# MATRIX distribution definition # +################################## +# +# In this file you can customize the distributions created during the run (examples below) +# please read the INSTRUCTIONS at the END OF THIS FILE... +# +#------\ +# Info | +#------/ +# Total rates and jet multiplicities (possibly within cuts) will automatically be included +# Add/remove arbitrary distribution-blocks, but always add/remove a full block. +# +#----------------------\ +# define distributions | +#----------------------/ + +distributionname = etal +distributiontype = abseta +particle 1 = lep 1 +edges = 0.0:0.21:0.42:0.63:0.84:1.05:1.37:1.52:1.74:1.95:2.18:2.5 + +#--------\ +# Syntax | +#--------/ +# "distributionname" +# starts new distribution-block; user-defined, unique label for identification at end of run +# +# +# "distributiontype" +# specifies observable to be binned (some require more than one particle) +# +# pre-defined types: (custom definitions not yet supported) +# pT -- transverse momentum of "particle 1" +# (scalar sum of pTs if more than one "particle" given) +# m -- invariant mass of "particle 1" +# dm -- invariant-mass difference between "particle 1" and "particle 2" +# absdm -- absolute invariant-mass difference between "particle 1" and "particle 2" +# mmin -- minimal invariant mass of "particle 1" and "particle 2" +# mmax -- maximal invariant mass of "particle 1" and "particle 2" +# y -- rapidy of "particle 1" +# absy -- absolute rapidy of "particle 1" +# dy -- rapidy difference between "particle 1" and "particle 2" +# absdy -- absolute rapidy difference between "particle 1" and "particle 2" +# dabsy -- difference between absolute rapidities of"particle 1" and "particle 2" +# absdabsy -- absolute difference between absolute rapidities of "particle 1" +# and "particle 2" +# eta -- pseudo-rapidy of "particle 1" +# abseta -- absolute pseudo-rapidy of "particle 1" +# deta -- pseudo-rapidy difference between "particle 1" and "particle 2" +# absdeta -- absolute pseud-rapidy difference between "particle 1" and "particle 2" +# dabseta -- difference between absolute pseudo-rapidities of"particle 1" +# and "particle 2" +# absdabseta -- absolute difference between absolute pseudo-rapidities of "particle 1" +# and "particle 2" +# phi -- transverse-angle (phi) of "particle 1", or phi difference between +# "particle 1" and "particle 2" if two particles are given +# dR -- distance (in y-phi-plane) between "particle 1" and "particle 2" +# dReta -- distance (in eta-phi-plane) between "particle 1" and "particle 2" +# ET -- transverse mass sqrt(m^2+pT^2) of "particle 1" +# (scalar sum of ETs if more than one "particle" given) +# mT -- transverse mass: ET of "particle 1", if only one particle given +# experimental definition with missing energy, if more than one particle +# given; all neutrinos (missing energie) go into "particle 1" all other +# particles in "particle 2,3,4,..." +# +# special distribution types: +# muR -- Distribution of scale muR set in computation (no "particle" definition) +# muF -- Distribution of scale muF set in computation (no "particle" definition) +# pTveto -- Cumulative cross section sigma(pT0) + +#------------------\ +# Yukawa couplings | +#------------------/ +#Block YUKAWA +# 5 4.750000e+00 # M_YB +# 6 1.730000e+02 # M_YT +# 15 1.777000e+00 # M_YTAU + +#---------------\ +# decays widths | +#---------------/ +DECAY 6 1.442620e+00 # WT +DECAY 23 2.495200e+00 # WZ +DECAY 24 2.085400e+00 # WW +DECAY 25 4.070000e-03 # WH + +#-----------\ +# EW inputs | +#-----------/ +Block EWINPUTS + 1 1 # ew_scheme - determines scheme used for EW inputs + # 0: alpha_e_0 scheme (alpha_e(mu->0) above used to determine inputs) + # 1: G_mu scheme (G_F above used to determine inputs) + # 2: alpha_e_MZ scheme (alpha_e(MZ) above used to determine inputs) + 3 1 # use_cms - switch for the complex mass scheme + # 0: off + # 1: on + # 2: on, but alpha_e is determined through real parameters + + +# NOTE: You can use EITHER Block CKM (full CKM) OR Block VCKMIN (1./2. generation mixing with Cabibbo angle). +# The other one must be removed/commented. If you remove/comment both blocks a trivial CKM (no mixing) is used. + +#------------\ +# CKM matrix | +#------------/ +Block CKM + 11 0.974170e+00 # V_ud + 12 0.224800e+00 # V_us + 13 0.004090e+00 # V_ub + 21 0.220000e+00 # V_cd + 22 0.995000e+00 # V_cs + 23 0.040500e+00 # V_cb + 31 0.008200e+00 # V_td + 32 0.040000e+00 # V_ts + 33 1.009000e+00 # V_tb + +#---------------\ +# Cabibbo angle | +#---------------/ +#Block VCKMIN +# 1 0.227000e+00 # Cabibbo angle diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat new file mode 100644 index 00000000..c2c85ced --- /dev/null +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat @@ -0,0 +1,126 @@ +########################## +# MATRIX input parameter # +########################## + +#----------------------\ +# General run settings | +#----------------------/ +process_class = pp-emve~+X # process id +E = 3500.0 # energy per beam +coll_choice = 1 # (1) PP collider; (2) PPbar collider +switch_PineAPPL = 1 # +use_TSV = 1 # switch to use new TSV scale variation instead of CV (1) or in addition to CV (2) +extrapolate_binwise = 1 # switch for bin-wise r_cut extrapolation of distributions +photon_induced = 1 # switch to turn on (1) and off (0) photon-induced contributions +enhance_tails = 0 # switch to improve statistics in tail of distributions (a factor of two slower) +approx_ckm_EW = 1 # trivial CKM for (1) 1-loop EW correction or (2) whole NLO EW correction + + +#----------------\ +# Scale settings | +#----------------/ +scale_ren = 80.385 # renormalization (muR) scale +scale_fact = 80.385 # factorization (muF) scale +dynamic_scale = 0 # dynamic ren./fac. scale + # 0: fixed scale above + # 1: invariant mass (Q) of system (of the colourless final states) + # 2: transverse mass (mT^2=Q^2+pT^2) of system (of the colourless final states) +factor_central_scale = 1 # relative factor for central scale (important for dynamic scales) +scale_variation = 0 # switch for muR/muF uncertainties (0) off; (1) 7-point (default); (2) 9-point variation +variation_factor = 2 # symmetric variation factor; usually a factor of 2 up and down (default) + + +#------------------------------\ +# Order-dependent run settings | +#------------------------------/ +# LO-run +run_LO = 1 # switch for LO cross section (1) on; (0) off +LHAPDF_LO = NNPDF31_nnlo_as_0118_luxqed # LO LHAPDF set +PDFsubset_LO = 0 # member of LO PDF set +precision_LO = 1.e-2 # precision of LO cross section + +# NLO-run +run_NLO_QCD = 0 # switch for NLO QCD cross section (1) on; (0) off +run_NLO_EW = 0 # switch for NLO EW cross section (1) on; (0) off +LHAPDF_NLO = NNPDF31_nnlo_as_0118_luxqed # NLO LHAPDF set +PDFsubset_NLO = 0 # member of NLO PDF set +precision_NLO_QCD = 1.e-2 # precision of NLO QCD cross section +precision_NLO_EW = 1.e-2 # precision of NLO EW correction +NLO_subtraction_method = 1 # switch to use (2) qT subtraction (1) Catani-Seymour at NLO + +# NNLO-run +run_NNLO_QCD = 0 # switch for NNLO QCD cross section (1) on; (0) off +add_NLO_EW = 0 # switch to add NLO EW cross section to NNLO run (1) on; (0) off + # note: can be added only if also running NNLO +LHAPDF_NNLO = NNPDF31_nnlo_as_0118_luxqed # NNLO LHAPDF set +PDFsubset_NNLO = 0 # member of NNLO PDF set +precision_NNLO_QCD = 1.e-2 # precision of NNLO QCD cross section +precision_added_EW = 1.e-2 # precision of NLO EW correction in NNLO run +power_corrections = 0 # switch to include leading power corrections in qT-subtraction through recoil + # (incomplete for processes involving photons and heavy quarks) + # (note: increases written output for distributions by factor of 8) + # (TSV variation that has more flexibility and features, and will become the new + # standard in future releases; the final result output differs slightly from CV, + # but contains at the moment the identical information, unless obove switch + # power_corrections or extrapolate_binwise is turned on, then TSV variation will + # be used regardless of setting use_TSV and those features included in the results) + + +#----------------------------\ +# Settings for fiducial cuts | +#----------------------------/ +# Jet algorithm +jet_algorithm = 3 # (1) Cambridge-Aachen (2) kT (3) anti-kT +jet_R_definition = 0 # (0) pseudo-rapidity (1) rapidity +jet_R = 0.4 # DeltaR + +# Photon recombination (lepton dressing) +photon_recombination = 1 # switch for photon recombination (1) on; (0) off; must be on for EW runs +photon_R_definition = 0 # (0) pseudorap; (1) rapidity +photon_R = 0.1 # DeltaR: photon combined with charged particle when inside this radius + +# Jet cuts +define_pT jet = 25. # requirement on jet transverse momentum (lower cut) +define_eta jet = 4.5 # requirement on jet pseudo-rapidity (upper cut) +define_y jet = 1.e99 # requirement on jet rapidity (upper cut) +n_observed_min jet = 0 # minimal number of observed jets (with cuts above) +n_observed_max jet = 99 # maximal number of observed jets (with cuts above) + +# Lepton cuts +define_pT lep = 25.0 # requirement on lepton transverse momentum (lower cut) +define_eta lep = 2.5 # requirement on lepton pseudo-rapidity (upper cut) +define_y lep = 1.e99 # requirement on lepton rapidity (upper cut) +n_observed_min lep = 1 # minimal number of observed leptons (with cuts above) +n_observed_max lep = 99 # maximal number of observed leptons (with cuts above) + +# Neutrino cuts +define_pT missing = 25.0 # requirement on transverse momentum of sum of all neutrinos (lower cut) + +#################### +# User-defined cuts +# (only used if defined in 'MATRIX/prc/$process/user/specify.cuts.cxx') +# +user_switch MT_W = 1 # switch for transverse mass cut on W-boson defined as sqrt(2*pT_l*pT_nu*deltaPhi(l,nu)) +user_cut min_MT_W = 40. # (lower cut) + +#################### +# Fiducial cuts +# (defined via general interface) +# + +#-----------------\ +# MATRIX behavior | +#-----------------/ +max_time_per_job = 12 # very rough time(hours) one main run job shall take (default: 24h) + # unreliable when < 1h, use as tuning parameter for degree of parallelization + # note: becomes ineffective when job number > max_nr_parallel_jobs + # which is set in MATRIX_configuration file +switch_distribution = 1 # switch to turn on (1) and off (0) distributions +save_previous_result = 1 # switch to save previous result of this run (in result/"run"/saved_result_$i) +save_previous_log = 0 # switch to save previous log of this run (in log/"run"/saved_result_$i) +#include_pre_in_results = 0 # switch to (0) only include main run in results; (1) also all extrapolation (pre) runs; + # crucial to set to 0 if re-running main with different inputs (apart from precision) + # note: if missing (default) pre runs used if important for precision + # (separately for each contribution) +reduce_workload = 0 # switch to keep full job output (0), reduce (1) or minimize (2) workload on slow clusters +random_seed = 0 # specify integer value (grid-/pre-run reproducible) diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/process b/pinecards/ATLAS_WP_7TEV_MATRIX/process new file mode 100644 index 00000000..bc073e83 --- /dev/null +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/process @@ -0,0 +1 @@ +ppenex02 diff --git a/run_matrix.sh b/run_matrix.sh new file mode 100755 index 00000000..5b8f0646 --- /dev/null +++ b/run_matrix.sh @@ -0,0 +1,64 @@ +#!/bin/bash -x + +set -euo pipefail + +if [[ $# -lt 2 ]]; then + echo >&2 "usage: ./run_matrix MATRIXDIR DATASET" + exit 1 +fi + +matrix_dir=$1 +card_dir=pinecards/$2 +cwd=$2-$(date +%Y%m%d%H%M%S) + +if [[ ! -d ${card_dir} ]]; then + echo >&2 "card directory doesn't exist" + exit 1 +fi + +if [[ ! -x ${matrix_dir}/matrix ]]; then + echo >&2 "matrix binary not found" + exit 1 +fi + +if [[ ! -f ${matrix_dir}/config/MATRIX_configuration ]]; then + # copy the default configuration file if there isn't any yet + cp ${matrix_dir}/config/MATRIX_configuration_default ${matrix_dir}/config/MATRIX_configuration +fi + +# we need to add the path to PineAPPL +sed -i "s:#path_to_pineappl .*:path_to_pineappl = $(pkg-config --variable=prefix pineappl_capi):" \ + ${matrix_dir}/config/MATRIX_configuration + +process=$(cat "${card_dir}"/process) + +# if the process hasn't been compiled, we have to do that before we can run the process +if [[ ! -x ${matrix_dir}/bin/${process} ]]; then + cd ${matrix_dir} + ./matrix --agree_to_all ${process} + cd - +fi + +mkdir -p "${cwd}"/{input,log,result} +cp "${card_dir}"/{distribution,model,parameter}.dat "${cwd}"/input/ +cp "${matrix_dir}"/run/${process}_MATRIX/input/default.input.MATRIX/runtime.dat "${cwd}"/input/ + +cd "${cwd}" +# we need an absoute path here +cwd=$(pwd) + +cd ${matrix_dir}/run/${process}_MATRIX + +run_dir=$(mktemp -du run_XXXXXXXXXX) + +# run MATRIX +bin/run_process --run_mode run --input_dir ${cwd}/input ${run_dir} + +# copy results +mv "${run_dir}" "${cwd}"/ +mv result/${run_dir} "${cwd}"/result/ +mv log/${run_dir} "${cwd}"/log/ +mv log/${run_dir}.log "${cwd}"/log/ + +# we already have the input files +rm -r input/${run_dir} From 404af48e9c05f84cd52d17491c820c15e3159fe4 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 26 Nov 2022 11:44:16 +0100 Subject: [PATCH 02/11] Add missing line in MATRIX's distribution.dat --- pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat | 1 + 1 file changed, 1 insertion(+) diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat index b472b619..d63da007 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat @@ -18,6 +18,7 @@ distributionname = etal distributiontype = abseta particle 1 = lep 1 +binningtype = irregular edges = 0.0:0.21:0.42:0.63:0.84:1.05:1.37:1.52:1.74:1.95:2.18:2.5 #--------\ From ffd7809579f33689db92bb498bcf72e0d76690a8 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 26 Nov 2022 12:02:10 +0100 Subject: [PATCH 03/11] Remove comments from distribution.dat --- .../ATLAS_WP_7TEV_MATRIX/distribution.dat | 135 ------------------ 1 file changed, 135 deletions(-) diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat index d63da007..1645e7ce 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/distribution.dat @@ -1,140 +1,5 @@ -################################## -# MATRIX distribution definition # -################################## -# -# In this file you can customize the distributions created during the run (examples below) -# please read the INSTRUCTIONS at the END OF THIS FILE... -# -#------\ -# Info | -#------/ -# Total rates and jet multiplicities (possibly within cuts) will automatically be included -# Add/remove arbitrary distribution-blocks, but always add/remove a full block. -# -#----------------------\ -# define distributions | -#----------------------/ - distributionname = etal distributiontype = abseta particle 1 = lep 1 binningtype = irregular edges = 0.0:0.21:0.42:0.63:0.84:1.05:1.37:1.52:1.74:1.95:2.18:2.5 - -#--------\ -# Syntax | -#--------/ -# "distributionname" -# starts new distribution-block; user-defined, unique label for identification at end of run -# -# -# "distributiontype" -# specifies observable to be binned (some require more than one particle) -# -# pre-defined types: (custom definitions not yet supported) -# pT -- transverse momentum of "particle 1" -# (scalar sum of pTs if more than one "particle" given) -# m -- invariant mass of "particle 1" -# dm -- invariant-mass difference between "particle 1" and "particle 2" -# absdm -- absolute invariant-mass difference between "particle 1" and "particle 2" -# mmin -- minimal invariant mass of "particle 1" and "particle 2" -# mmax -- maximal invariant mass of "particle 1" and "particle 2" -# y -- rapidy of "particle 1" -# absy -- absolute rapidy of "particle 1" -# dy -- rapidy difference between "particle 1" and "particle 2" -# absdy -- absolute rapidy difference between "particle 1" and "particle 2" -# dabsy -- difference between absolute rapidities of"particle 1" and "particle 2" -# absdabsy -- absolute difference between absolute rapidities of "particle 1" -# and "particle 2" -# eta -- pseudo-rapidy of "particle 1" -# abseta -- absolute pseudo-rapidy of "particle 1" -# deta -- pseudo-rapidy difference between "particle 1" and "particle 2" -# absdeta -- absolute pseud-rapidy difference between "particle 1" and "particle 2" -# dabseta -- difference between absolute pseudo-rapidities of"particle 1" -# and "particle 2" -# absdabseta -- absolute difference between absolute pseudo-rapidities of "particle 1" -# and "particle 2" -# phi -- transverse-angle (phi) of "particle 1", or phi difference between -# "particle 1" and "particle 2" if two particles are given -# dR -- distance (in y-phi-plane) between "particle 1" and "particle 2" -# dReta -- distance (in eta-phi-plane) between "particle 1" and "particle 2" -# ET -- transverse mass sqrt(m^2+pT^2) of "particle 1" -# (scalar sum of ETs if more than one "particle" given) -# mT -- transverse mass: ET of "particle 1", if only one particle given -# experimental definition with missing energy, if more than one particle -# given; all neutrinos (missing energie) go into "particle 1" all other -# particles in "particle 2,3,4,..." -# -# special distribution types: -# muR -- Distribution of scale muR set in computation (no "particle" definition) -# muF -- Distribution of scale muF set in computation (no "particle" definition) -# pTveto -- Cumulative cross section sigma(pT Date: Sat, 26 Nov 2022 12:03:42 +0100 Subject: [PATCH 04/11] Update `run_matrix.sh` script - MATRIX seems to be sensitive to the string after `run_` for the name of the run directory. To be safe, choose the next integer - do not copy runtime.dat - this doesn't seem to be needed - do not manually copy the files but instead rely on MATRIX's `tar_run` and `delete_run` features --- run_matrix.sh | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/run_matrix.sh b/run_matrix.sh index 5b8f0646..931eee93 100755 --- a/run_matrix.sh +++ b/run_matrix.sh @@ -16,6 +16,8 @@ if [[ ! -d ${card_dir} ]]; then exit 1 fi +card_dir=$(cd "${card_dir}" && pwd) + if [[ ! -x ${matrix_dir}/matrix ]]; then echo >&2 "matrix binary not found" exit 1 @@ -39,26 +41,39 @@ if [[ ! -x ${matrix_dir}/bin/${process} ]]; then cd - fi -mkdir -p "${cwd}"/{input,log,result} -cp "${card_dir}"/{distribution,model,parameter}.dat "${cwd}"/input/ -cp "${matrix_dir}"/run/${process}_MATRIX/input/default.input.MATRIX/runtime.dat "${cwd}"/input/ - +mkdir "${cwd}" cd "${cwd}" # we need an absoute path here cwd=$(pwd) cd ${matrix_dir}/run/${process}_MATRIX -run_dir=$(mktemp -du run_XXXXXXXXXX) +# log files aren't cleaned, so we should avoid overwriting those. Pick the last +# log file with an integer in its name +last_run=$(cd log && for i in run_*.log; do + i=${i#run_} + i=${i%.log} + if [[ $i =~ ^[0-9]+$ ]]; then + echo $i + fi +done | sort -n | tail -n1) + +# increase the integer found by one and pad with zeros +run_dir=run_$(printf "%03d" $(( $((last_run)) + 1))) + +mkdir -p input/${run_dir} + +# copy input files +cp "${card_dir}"/{distribution,model,parameter}.dat input/${run_dir}/ # run MATRIX -bin/run_process --run_mode run --input_dir ${cwd}/input ${run_dir} +bin/run_process --run_mode run ${run_dir} # copy results -mv "${run_dir}" "${cwd}"/ -mv result/${run_dir} "${cwd}"/result/ -mv log/${run_dir} "${cwd}"/log/ -mv log/${run_dir}.log "${cwd}"/log/ +bin/run_process --run_mode tar_run ${run_dir} + +# clean up +bin/run_process --run_mode delete_run ${run_dir} -# we already have the input files -rm -r input/${run_dir} +# copy the tar'ed results +mv ${run_dir}.tar "${cwd}"/ From f195347e16143a94bc29126ed199d4d8a9606fed Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 26 Nov 2022 14:41:56 +0100 Subject: [PATCH 05/11] Use same parameters in MATRIX as in mg5_aMC@NLO --- pinecards/ATLAS_WP_7TEV_MATRIX/model.dat | 16 ++++++++-------- pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/model.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/model.dat index e828ecd1..f436da74 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/model.dat +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/model.dat @@ -11,15 +11,15 @@ Block MASS 3 0.000000 # M_s 4 0.000000 # M_c 5 0.000000 # M_b - 6 1.732000e+02 # M_t + 6 1.725000e+02 # M_t 11 0.000000 # M_e 12 0.000000 # M_ve 13 0.000000 # M_mu 14 0.000000 # M_vm 15 1.777000e+00 # M_tau 16 0.000000 # M_vt - 23 9.118760e+01 # M_Z - 24 8.038500e+01 # M_W + 23 91.1535 # M_Z + 24 80.352 # M_W 25 1.250000e+02 # M_H #-------------------\ @@ -27,7 +27,7 @@ Block MASS #-------------------/ Block SMINPUTS 1 1.280000e+02 # 1/alpha_e(MZ) - 2 1.166390e-05 # G_F + 2 1.1663787e-5 # G_F 111 1.370360e+02 # 1/alpha_e(mu->0) #------------------\ @@ -41,10 +41,10 @@ Block SMINPUTS #---------------\ # decays widths | #---------------/ -DECAY 6 1.442620e+00 # WT -DECAY 23 2.495200e+00 # WZ -DECAY 24 2.085400e+00 # WW -DECAY 25 4.070000e-03 # WH +DECAY 6 1.37758 # WT +DECAY 23 2.4943 # WZ +DECAY 24 2.084 # WW +DECAY 25 4.07468e-3 # WH #-----------\ # EW inputs | diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat index c2c85ced..69cf638e 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat @@ -19,8 +19,8 @@ approx_ckm_EW = 1 # trivial CKM for (1) 1-loop EW correction or (2 #----------------\ # Scale settings | #----------------/ -scale_ren = 80.385 # renormalization (muR) scale -scale_fact = 80.385 # factorization (muF) scale +scale_ren = 80.352 # renormalization (muR) scale +scale_fact = 80.352 # factorization (muF) scale dynamic_scale = 0 # dynamic ren./fac. scale # 0: fixed scale above # 1: invariant mass (Q) of system (of the colourless final states) From 84e79052d2428e121151ea1e2e073d0b7a1ab649 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 26 Nov 2022 14:43:18 +0100 Subject: [PATCH 06/11] Fix process string --- pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat | 2 +- pinecards/ATLAS_WP_7TEV_MATRIX/process | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat index 69cf638e..210c6224 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat @@ -5,7 +5,7 @@ #----------------------\ # General run settings | #----------------------/ -process_class = pp-emve~+X # process id +process_class = pp-epve+X # process id E = 3500.0 # energy per beam coll_choice = 1 # (1) PP collider; (2) PPbar collider switch_PineAPPL = 1 # diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/process b/pinecards/ATLAS_WP_7TEV_MATRIX/process index bc073e83..7f929ad0 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/process +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/process @@ -1 +1 @@ -ppenex02 +ppexne02 From 9e12cd999949b8bb7d1031f440e8223c4524a743 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 26 Nov 2022 14:44:20 +0100 Subject: [PATCH 07/11] Avoid problems in MATRIX without scale variations --- pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat index 210c6224..db6da6ad 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat @@ -26,7 +26,7 @@ dynamic_scale = 0 # dynamic ren./fac. scale # 1: invariant mass (Q) of system (of the colourless final states) # 2: transverse mass (mT^2=Q^2+pT^2) of system (of the colourless final states) factor_central_scale = 1 # relative factor for central scale (important for dynamic scales) -scale_variation = 0 # switch for muR/muF uncertainties (0) off; (1) 7-point (default); (2) 9-point variation +scale_variation = 1 # switch for muR/muF uncertainties (0) off; (1) 7-point (default); (2) 9-point variation variation_factor = 2 # symmetric variation factor; usually a factor of 2 up and down (default) From 8ca05745e39e8949e509d8e67e123104b94e878e Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 26 Nov 2022 14:45:13 +0100 Subject: [PATCH 08/11] Make `run_matrix.sh` more robust The `log` doesn't exist after a process has been generated for the first time --- run_matrix.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/run_matrix.sh b/run_matrix.sh index 931eee93..481a9280 100755 --- a/run_matrix.sh +++ b/run_matrix.sh @@ -48,15 +48,21 @@ cwd=$(pwd) cd ${matrix_dir}/run/${process}_MATRIX -# log files aren't cleaned, so we should avoid overwriting those. Pick the last -# log file with an integer in its name -last_run=$(cd log && for i in run_*.log; do - i=${i#run_} - i=${i%.log} - if [[ $i =~ ^[0-9]+$ ]]; then - echo $i - fi -done | sort -n | tail -n1) +last_run=0 + +if [[ -d log ]]; then + cd log + # log files aren't cleaned, so we should avoid overwriting those. Pick the last + # log file with an integer in its name + last_run=$(for i in run_*.log; do + i=${i#run_} + i=${i%.log} + if [[ $i =~ ^[0-9]+$ ]]; then + echo $i + fi + done | sort -n | tail -n1) + cd - +fi # increase the integer found by one and pad with zeros run_dir=run_$(printf "%03d" $(( $((last_run)) + 1))) From e00b270de42376d95a5197d6b9871f2b654c8a37 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 26 Nov 2022 14:47:54 +0100 Subject: [PATCH 09/11] Remove trailing space in MATRIX files --- pinecards/ATLAS_WP_7TEV_MATRIX/model.dat | 26 ++++++++++---------- pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat | 8 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/model.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/model.dat index f436da74..86f9cd5c 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/model.dat +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/model.dat @@ -6,44 +6,44 @@ # masses | #--------/ Block MASS - 1 0.000000 # M_d + 1 0.000000 # M_d 2 0.000000 # M_u 3 0.000000 # M_s 4 0.000000 # M_c - 5 0.000000 # M_b + 5 0.000000 # M_b 6 1.725000e+02 # M_t - 11 0.000000 # M_e + 11 0.000000 # M_e 12 0.000000 # M_ve 13 0.000000 # M_mu 14 0.000000 # M_vm 15 1.777000e+00 # M_tau 16 0.000000 # M_vt - 23 91.1535 # M_Z + 23 91.1535 # M_Z 24 80.352 # M_W - 25 1.250000e+02 # M_H + 25 1.250000e+02 # M_H #-------------------\ # inputs for the SM | #-------------------/ Block SMINPUTS 1 1.280000e+02 # 1/alpha_e(MZ) - 2 1.1663787e-5 # G_F + 2 1.1663787e-5 # G_F 111 1.370360e+02 # 1/alpha_e(mu->0) #------------------\ # Yukawa couplings | #------------------/ -#Block YUKAWA -# 5 4.750000e+00 # M_YB -# 6 1.730000e+02 # M_YT -# 15 1.777000e+00 # M_YTAU +#Block YUKAWA +# 5 4.750000e+00 # M_YB +# 6 1.730000e+02 # M_YT +# 15 1.777000e+00 # M_YTAU #---------------\ # decays widths | #---------------/ -DECAY 6 1.37758 # WT -DECAY 23 2.4943 # WZ -DECAY 24 2.084 # WW +DECAY 6 1.37758 # WT +DECAY 23 2.4943 # WZ +DECAY 24 2.084 # WW DECAY 25 4.07468e-3 # WH #-----------\ diff --git a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat index db6da6ad..d6e24012 100644 --- a/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat +++ b/pinecards/ATLAS_WP_7TEV_MATRIX/parameter.dat @@ -8,12 +8,12 @@ process_class = pp-epve+X # process id E = 3500.0 # energy per beam coll_choice = 1 # (1) PP collider; (2) PPbar collider -switch_PineAPPL = 1 # +switch_PineAPPL = 1 # use_TSV = 1 # switch to use new TSV scale variation instead of CV (1) or in addition to CV (2) extrapolate_binwise = 1 # switch for bin-wise r_cut extrapolation of distributions photon_induced = 1 # switch to turn on (1) and off (0) photon-induced contributions enhance_tails = 0 # switch to improve statistics in tail of distributions (a factor of two slower) -approx_ckm_EW = 1 # trivial CKM for (1) 1-loop EW correction or (2) whole NLO EW correction +approx_ckm_EW = 1 # trivial CKM for (1) 1-loop EW correction or (2) whole NLO EW correction #----------------\ @@ -41,7 +41,7 @@ precision_LO = 1.e-2 # precision of LO cross section # NLO-run run_NLO_QCD = 0 # switch for NLO QCD cross section (1) on; (0) off -run_NLO_EW = 0 # switch for NLO EW cross section (1) on; (0) off +run_NLO_EW = 0 # switch for NLO EW cross section (1) on; (0) off LHAPDF_NLO = NNPDF31_nnlo_as_0118_luxqed # NLO LHAPDF set PDFsubset_NLO = 0 # member of NLO PDF set precision_NLO_QCD = 1.e-2 # precision of NLO QCD cross section @@ -49,7 +49,7 @@ precision_NLO_EW = 1.e-2 # precision of NLO EW correction NLO_subtraction_method = 1 # switch to use (2) qT subtraction (1) Catani-Seymour at NLO # NNLO-run -run_NNLO_QCD = 0 # switch for NNLO QCD cross section (1) on; (0) off +run_NNLO_QCD = 0 # switch for NNLO QCD cross section (1) on; (0) off add_NLO_EW = 0 # switch to add NLO EW cross section to NNLO run (1) on; (0) off # note: can be added only if also running NNLO LHAPDF_NNLO = NNPDF31_nnlo_as_0118_luxqed # NNLO LHAPDF set From 9b95dc2464b8d5c5e8731e1923344a2510e8acd8 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sun, 27 Nov 2022 14:38:55 +0100 Subject: [PATCH 10/11] Strip leading zeros to force decimal conversion --- run_matrix.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run_matrix.sh b/run_matrix.sh index 481a9280..edd2bac4 100755 --- a/run_matrix.sh +++ b/run_matrix.sh @@ -56,6 +56,8 @@ if [[ -d log ]]; then # log file with an integer in its name last_run=$(for i in run_*.log; do i=${i#run_} + i=${i#0} + i=${i#0} i=${i%.log} if [[ $i =~ ^[0-9]+$ ]]; then echo $i From b03fbd7eaecad482ab34069b21b4b4e34a803fac Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sun, 27 Nov 2022 14:40:08 +0100 Subject: [PATCH 11/11] Extract best-prediction grid from tarball --- run_matrix.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/run_matrix.sh b/run_matrix.sh index edd2bac4..9cd7412c 100755 --- a/run_matrix.sh +++ b/run_matrix.sh @@ -85,3 +85,20 @@ bin/run_process --run_mode delete_run ${run_dir} # copy the tar'ed results mv ${run_dir}.tar "${cwd}"/ + +cd "${cwd}" + +# TODO: we assume that only one distribution is generated by MATRIX +distribution_name=$(sed -nE 's/distributionname[[:space:]]*=[[:space:]]*//p' "${card_dir}"/distribution.dat) + +# extract the grid with the highest order +for order in NNLO NLO LO; do + # TODO: this won't work with EW corrections + file="result/${run_dir}/${order}-run/PineAPPL_grids/${distribution_name}_${order}.QCD.lz4" + + if tar tf ${run_dir}.tar | grep ${file} >/dev/null; then + tar xf ${run_dir}.tar ${file} --strip-components 4 + mv ${distribution_name}_${order}.QCD.lz4 $2.pineappl.lz4 + break + fi +done