From 9e897bc2303d30f6aa2232e103a39cd58d3c641b Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 9 Apr 2021 18:41:58 +0200 Subject: [PATCH 01/10] Add preliminary ATLAS_WPJET_8TEV_PTW dataset --- nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f | 88 +++++++++++++++++ .../change_etaj_to_rapj.patch | 48 +++++++++ .../change_scale_to_mw_plus_ptjets.patch | 99 +++++++++++++++++++ nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt | 33 +++++++ .../ATLAS_WPJET_8TEV_PTW/metadata.txt | 10 ++ nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/output.txt | 7 ++ 6 files changed, 285 insertions(+) create mode 100644 nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f create mode 100644 nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_etaj_to_rapj.patch create mode 100644 nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_mw_plus_ptjets.patch create mode 100644 nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt create mode 100644 nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/metadata.txt create mode 100644 nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/output.txt diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f new file mode 100644 index 00000000..de4be9fd --- /dev/null +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f @@ -0,0 +1,88 @@ +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + subroutine analysis_begin(nwgt,weights_info) +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + + implicit none + integer nwgt + character*(*) weights_info(*) + + call set_error_estimation(1) + call HwU_inithist(nwgt,weights_info) + call HwU_book(1, 'W pT', 8, 0.0d0, 200.0d0) + call HwU_book(2, 'W pT', 6, 200.0d0, 500.0d0) + call HwU_book(3, 'W pT', 1, 500.0d0, 600.0d0) + call HwU_book(4, 'W pT', 1, 600.0d0, 800.0d0) + + return + end + +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + subroutine analysis_end(dummy) +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + + implicit none + double precision dummy + call HwU_write_file + return + end + +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + + implicit none + include 'nexternal.inc' + include 'cuts.inc' + integer istatus(nexternal) + integer iPDG(nexternal) + integer ibody + integer i + integer j + double precision p(0:4,nexternal) + double precision wgts(*) + double precision ppl(0:3), pplb(0:3), ppv(0:3), ptv, getinvm + external getinvm + + double precision p_reco(0:4,nexternal) + integer iPDG_reco(nexternal) + + call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco, + $ p, iPDG, p_reco, iPDG_reco) + + do j = nincoming+1, nexternal + if (iPDG_reco(j).eq.14) ppl(0:3)=p_reco(0:3,j) + if (iPDG_reco(j).eq.-13) pplb(0:3)=p_reco(0:3,j) + enddo + do i=0,3 + ppv(i)=ppl(i)+pplb(i) + enddo + + ptv=sqrt(ppv(1)**2+ppv(2)**2) + + call HwU_fill(1,ptv,wgts) + call HwU_fill(2,ptv,wgts) + call HwU_fill(3,ptv,wgts) + call HwU_fill(4,ptv,wgts) + + 999 return + end + +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + + function getinvm(en,ptx,pty,pl) + implicit none + real*8 getinvm,en,ptx,pty,pl,tiny,tmp + parameter (tiny=1.d-5) +c + tmp=en**2-ptx**2-pty**2-pl**2 + if(tmp.gt.0.d0)then + tmp=sqrt(tmp) + elseif(tmp.gt.-tiny)then + tmp=0.d0 + else + write(*,*)'Attempt to compute a negative mass' + stop + endif + getinvm=tmp + return + end diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_etaj_to_rapj.patch b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_etaj_to_rapj.patch new file mode 100644 index 00000000..f7bdc5d4 --- /dev/null +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_etaj_to_rapj.patch @@ -0,0 +1,48 @@ +--- NLO/SubProcesses/fastjetfortran_madfks_core.cc.orig 2020-11-27 18:11:04.027146365 +0100 ++++ NLO/SubProcesses/fastjetfortran_madfks_core.cc 2020-11-27 18:13:47.285826142 +0100 +@@ -76,7 +76,7 @@ + /// and the extraction of the jets + void amcatnlo_transfer_cluster_transfer(const double * p, const int & npart, + const JetDefinition & jet_def, +- const double & ptmin, const double & etamax, ++ const double & ptmin, const double & rapmax, + double * f77jets, int & njets, int * whichjet) { + + // transfer p[4*ipart+0..3] -> input_particles[i] +@@ -90,9 +90,9 @@ + jets = sorted_by_pt(cs->inclusive_jets(ptmin)); + + //apply the eta selector if etamax >0 +- Selector select_eta = SelectorAbsEtaMax(etamax); +- if (etamax > 0.) { +- jets = select_eta(jets); ++ Selector select_rap = SelectorAbsRapMax(rapmax); ++ if (rapmax > 0.) { ++ jets = select_rap(jets); + } + + // transfer jets -> f77jets[4*ijet+0..3] +--- NLO/SubProcesses/fastjetfortran_madfks_full.cc.orig 2020-11-27 18:11:12.687075955 +0100 ++++ NLO/SubProcesses/fastjetfortran_madfks_full.cc 2020-11-27 18:13:47.289826110 +0100 +@@ -79,7 +79,7 @@ + /// and the extraction of the jets + void amcatnlo_transfer_cluster_transfer(const double * p, const int & npart, + const JetDefinition & jet_def, +- const double & ptmin, const double & etamax, ++ const double & ptmin, const double & rapmax, + double * f77jets, int & njets, int * whichjet, + const double & ghost_maxrap = 0.0, + const int & nrepeat = 0, const double & ghost_area = 0.0) { +@@ -101,9 +101,9 @@ + jets = sorted_by_pt(cs->inclusive_jets(ptmin)); + + //apply the eta selector if etamax >0 +- Selector select_eta = SelectorAbsEtaMax(etamax); +- if (etamax > 0.) { +- jets = select_eta(jets); ++ Selector select_rap = SelectorAbsRapMax(rapmax); ++ if (rapmax > 0.) { ++ jets = select_rap(jets); + } + + // transfer jets -> f77jets[4*ijet+0..3] diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_mw_plus_ptjets.patch b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_mw_plus_ptjets.patch new file mode 100644 index 00000000..26802e73 --- /dev/null +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_mw_plus_ptjets.patch @@ -0,0 +1,99 @@ +--- CMS_2JET_7TEV/SubProcesses/setscales.f.orig 2020-11-30 09:45:53.669448000 +0100 ++++ CMS_2JET_7TEV/SubProcesses/setscales.f 2020-12-09 15:04:10.610477654 +0100 +@@ -527,6 +527,31 @@ + integer i,j + character*80 temp_scale_id + common/ctemp_scale_id/temp_scale_id ++ ++ integer iPDG_reco(nexternal) ++ double precision ppl(0:3), pplb(0:3), ppv(0:3) ++ double precision p_reco(0:4,nexternal), p_in(0:4,nexternal) ++c les houches accord stuff to identify particles ++c ++ integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), ++ & icolup(2,nexternal,maxflow),niprocs ++ common /c_leshouche_inc/idup,mothup,icolup,niprocs ++c Masses of external particles ++ double precision pmass(nexternal) ++ common/to_mass/pmass ++ double precision pQCD(0:3,nexternal), ++ $ pjet(0:3,nexternal),etajet(nexternal) ++ integer nQCD,jet(nexternal),njet ++ double precision ptjet(nexternal),yjet(nexternal) ++c For boosts ++ double precision ybst_til_tolab,ybst_til_tocm,sqrtshat,shat ++ common/parton_cms_stuff/ybst_til_tolab,ybst_til_tocm, ++ # sqrtshat,shat ++ double precision chybst,shybst,chybstmo ++ double precision xd(1:3) ++ data (xd(i),i=1,3)/0,0,1/ ++c For the W-boson mass ++ include 'coupl.inc' + c + tmp=0 + if(ickkw.eq.-1)then +@@ -562,16 +587,54 @@ + tmp=muR_ref_fixed + temp_scale_id='fixed scale' + elseif(dynamical_scale_choice.eq.10) then +-ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +-cc USER-DEFINED SCALE: ENTER YOUR CODE HERE cc +-cc to use this code you must set cc +-cc dynamical_scale_choice = 10 cc +-cc in the run_card (run_card.dat) cc +-ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +- write(*,*) "User-defined scale not set" +- stop 1 +- temp_scale_id='User-defined dynamical scale' ! use a meaningful string +- tmp = 0d0 ++ temp_scale_id='' ++ ++ do i=1,nexternal ++ p_in(0:3,i) = pp(0:3,i) ++ p_in(4,i) = pmass(i) ++ enddo ++ call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco, ++ $ p_in, idup(1,1), p_reco, iPDG_reco) ++ ++ nQCD=0 ++ chybst=cosh(ybst_til_tolab) ++ shybst=sinh(ybst_til_tolab) ++ chybstmo=chybst-1.d0 ++ do j=nincoming+1,nexternal ++ if (abs(ipdg_reco(j)).le.5 .or. ipdg_reco(j).eq.21 .or. ++ $ ipdg_reco(j).eq.22) then ++ nQCD=nQCD+1 ++ call boostwdir2(chybst,shybst,chybstmo,xd, ++ $ p_reco(0,j),pQCD(0,nQCD)) ++ endif ++ enddo ++ ++ do i=1,nexternal ++ do j=0,3 ++ pjet(j,i)=0d0 ++ enddo ++ jet(i)=0 ++ enddo ++ ++c recombine momenta ++ call amcatnlo_fastjetppgenkt_etamax(pQCD,nQCD,jetradius,ptj, ++ $ etaj,jetalgo,pjet,njet,jet) ++ ++ do i=1,njet ++ ptjet(i)=sqrt(pjet(1,i)**2+pjet(2,i)**2) ++ enddo ++ ++ if (njet .lt. 1) then ++c something is wrong with the cuts - they should check for at least one jet ++ tmp=4d0 ++ write (*,*) "Error 4: scale couldn't find two jets" ++ else ++ tmp=mdl_MW**2 ++ do i=1,njet ++ tmp=tmp+ptjet(i)**2 ++ end do ++ tmp=sqrt(tmp) ++ endif + ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + cc USER-DEFINED SCALE: END OF USER CODE cc + ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt new file mode 100644 index 00000000..795a1a25 --- /dev/null +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt @@ -0,0 +1,33 @@ +launch @OUTPUT@ +fixed_order = ON +set maxjetflavor 5 +set gf @GF@ +set mh @MH@ +set mt @MT@ +set mw @MW@ +set mz @MZ@ +set wh @WH@ +set wt @WT@ +set ww @WW@ +set wz @WZ@ +set ebeam1 4000 +set ebeam2 4000 +set pdlabel lhapdf +set lhaid 324900 +# TODO: check if scale choice is right +set dynamical_scale_choice 10 +set reweight_scale True +set ptl = 25.0 +set etal = 2.5 +#user_defined_cut set ptmiss = 25.0 +#user_defined_cut set mtw = 40.0 +set jetalgo = -1.0 +set jetradius = 0.4 +set ptj = 30.0 +# `change_etaj_to_rapj.patch` changes the following to rapidity instead of pseudo-rapidity +set etaj = 4.4 +# TODO: add Delta R(jet,lepton) cut +set req_acc_FO 0.001 +set pineappl True +done +quit diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/metadata.txt b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/metadata.txt new file mode 100644 index 00000000..575b71f5 --- /dev/null +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/metadata.txt @@ -0,0 +1,10 @@ +arxiv=1711.03296 +description=ATLAS transverse momentum of the W+ boson at 8 TeV +hepdata=10.17182/hepdata.80076.v2/t13 +nnpdf_id=ATLAS_WP_JET_8TEV_PT +x1_label=ptlv +x1_label_tex=$p_{\mathrm{T},\bar{\ell}\nu_\ell}$ +x1_unit=GeV +y_label=dsig/dptlv +y_label_tex=$\frac{\mathrm{d}\sigma}{\mathrm{d}p_{\mathrm{T},\bar{\ell}\nu_\ell}}$ +y_unit=pb/GeV diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/output.txt b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/output.txt new file mode 100644 index 00000000..c14c6df0 --- /dev/null +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/output.txt @@ -0,0 +1,7 @@ +set complex_mass_scheme True +import model loop_qcd_qed_sm_Gmu +define p = p b b~ +define j = p +generate p p > mu+ vm j QCD^2<=2 QED^2<=6 [QCD] +output @OUTPUT@ +quit From 0c1e581976a9d8eb1e55efd4fc54fa2c12510e06 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 4 May 2021 15:01:18 +0200 Subject: [PATCH 02/10] Fix bug in `run.sh` --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index eeb8bc25..7e184d4a 100755 --- a/run.sh +++ b/run.sh @@ -267,7 +267,7 @@ EOF mapfile -d ' ' -t cuts < <( echo "${user_defined_cuts[@]}" | \ grep -Eo '\w+[[:blank:]]+=[[:blank:]]+([+-]?[0-9]+([.][0-9]+)?|True|False)' | \ - tr -d '\n' + tr '\n' ' ' ) ../run_implement_user_defined_cuts.py "${dataset}"/SubProcesses/cuts.f "${cuts[@]}" fi From c1395ad1fbe3e9fe759646a0b1e71fb64c41a11a Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 4 May 2021 15:02:24 +0200 Subject: [PATCH 03/10] Remove unneeded function --- nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f | 23 +------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f index de4be9fd..b66e800f 100644 --- a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/analysis.f @@ -40,8 +40,7 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) integer j double precision p(0:4,nexternal) double precision wgts(*) - double precision ppl(0:3), pplb(0:3), ppv(0:3), ptv, getinvm - external getinvm + double precision ppl(0:3), pplb(0:3), ppv(0:3), ptv double precision p_reco(0:4,nexternal) integer iPDG_reco(nexternal) @@ -66,23 +65,3 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) 999 return end - -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - - function getinvm(en,ptx,pty,pl) - implicit none - real*8 getinvm,en,ptx,pty,pl,tiny,tmp - parameter (tiny=1.d-5) -c - tmp=en**2-ptx**2-pty**2-pl**2 - if(tmp.gt.0.d0)then - tmp=sqrt(tmp) - elseif(tmp.gt.-tiny)then - tmp=0.d0 - else - write(*,*)'Attempt to compute a negative mass' - stop - endif - getinvm=tmp - return - end From aa2747b99151c8cb7ac247c3cdde6b3e61126801 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 4 May 2021 15:02:47 +0200 Subject: [PATCH 04/10] Implement delta R lepton-jet cut --- nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt | 2 +- run_implement_user_defined_cuts.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt index 795a1a25..234c90a4 100644 --- a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt @@ -26,7 +26,7 @@ set jetradius = 0.4 set ptj = 30.0 # `change_etaj_to_rapj.patch` changes the following to rapidity instead of pseudo-rapidity set etaj = 4.4 -# TODO: add Delta R(jet,lepton) cut +#user_defined_cut set deltarjl = 0.4 set req_acc_FO 0.001 set pineappl True done diff --git a/run_implement_user_defined_cuts.py b/run_implement_user_defined_cuts.py index 9fea7e73..d2402db4 100755 --- a/run_implement_user_defined_cuts.py +++ b/run_implement_user_defined_cuts.py @@ -719,6 +719,19 @@ enddo enddo +''', + 'deltarjl': '''c cut on the delta R distance of all lepton-jet pairs + do i=3,nexternal + if (is_a_lm(i) .or. is_a_lp(i)) then + do j=1,njet + if (r2_04(p_reco(0,i),pjet(0,j)).lt.{}**2) then + passcuts_user=.false. + return + endif + enddo + endif + enddo + ''', } From 70bf0fafbb166ea39bf9ad16455415aa9f924780 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sun, 9 May 2021 12:35:28 +0200 Subject: [PATCH 05/10] Increase statistics --- nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt index 234c90a4..b167384d 100644 --- a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt @@ -27,7 +27,7 @@ set ptj = 30.0 # `change_etaj_to_rapj.patch` changes the following to rapidity instead of pseudo-rapidity set etaj = 4.4 #user_defined_cut set deltarjl = 0.4 -set req_acc_FO 0.001 +set req_acc_FO 0.0001 set pineappl True done quit From be47c1fb6c269b523c53da9d218193c335dad06d Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 20 May 2021 22:38:46 +0200 Subject: [PATCH 06/10] Increase statistics --- nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt index b167384d..923cafee 100644 --- a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt @@ -27,7 +27,7 @@ set ptj = 30.0 # `change_etaj_to_rapj.patch` changes the following to rapidity instead of pseudo-rapidity set etaj = 4.4 #user_defined_cut set deltarjl = 0.4 -set req_acc_FO 0.0001 +set req_acc_FO 0.000075 set pineappl True done quit From f1b70f9fae369e18f8f6e4e474d10b1c4f6618fd Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 1 Jun 2021 11:28:11 +0200 Subject: [PATCH 07/10] Fix bug in `run.sh` --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 7e184d4a..6ef3bce7 100755 --- a/run.sh +++ b/run.sh @@ -203,7 +203,7 @@ output_and_launch() { # copy patches if there are any; '+' errors out if patch fails cd "${dataset}" find ../../nnpdf31_proc/"${dataset}" -name '*.patch' -exec \ - bash -c 'patch -p1 < "$1"' find-sh {} + + bash -c 'patch -p1 < "$1"' find-sh '{}' \; cd - # enforce proper analysis From dc268cf217a4a641508959e0d7120cbc3ee8df5e Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Wed, 16 Jun 2021 16:53:39 +0200 Subject: [PATCH 08/10] Override custom locales that might break awk --- run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run.sh b/run.sh index 6ef3bce7..b0b5a0e3 100755 --- a/run.sh +++ b/run.sh @@ -2,6 +2,8 @@ prefix=$(pwd)/.prefix +export LC_ALL=C + yesno() { echo -n "$@" "[Y/n]" read -r reply From 52c0bc314a8c316aa341031103106791e3cd0353 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Wed, 16 Jun 2021 16:54:01 +0200 Subject: [PATCH 09/10] Recognize patch failures --- run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index b0b5a0e3..8b630708 100755 --- a/run.sh +++ b/run.sh @@ -202,10 +202,10 @@ output_and_launch() { # create output folder "${mg5amc}" "${output_file}" |& tee output.log - # copy patches if there are any; '+' errors out if patch fails + # copy patches if there are any; use xargs to properly signal failures cd "${dataset}" - find ../../nnpdf31_proc/"${dataset}" -name '*.patch' -exec \ - bash -c 'patch -p1 < "$1"' find-sh '{}' \; + find ../../nnpdf31_proc/"${dataset}" -name '*.patch' -print0 | \ + xargs -0 -I file sh -c 'patch -p1 < file' cd - # enforce proper analysis From a13e97ff8a94543305e6a8c8cf8777c5793d2b15 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Wed, 16 Jun 2021 17:13:40 +0200 Subject: [PATCH 10/10] Fix scale choice --- ...plus_ptjets.patch => change_scale_to_ht_2.patch} | 13 ++++++------- nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) rename nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/{change_scale_to_mw_plus_ptjets.patch => change_scale_to_ht_2.patch} (94%) diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_mw_plus_ptjets.patch b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_ht_2.patch similarity index 94% rename from nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_mw_plus_ptjets.patch rename to nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_ht_2.patch index 26802e73..d06439ab 100644 --- a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_mw_plus_ptjets.patch +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/change_scale_to_ht_2.patch @@ -1,6 +1,6 @@ --- CMS_2JET_7TEV/SubProcesses/setscales.f.orig 2020-11-30 09:45:53.669448000 +0100 +++ CMS_2JET_7TEV/SubProcesses/setscales.f 2020-12-09 15:04:10.610477654 +0100 -@@ -527,6 +527,31 @@ +@@ -527,6 +527,29 @@ integer i,j character*80 temp_scale_id common/ctemp_scale_id/temp_scale_id @@ -27,12 +27,10 @@ + double precision chybst,shybst,chybstmo + double precision xd(1:3) + data (xd(i),i=1,3)/0,0,1/ -+c For the W-boson mass -+ include 'coupl.inc' c tmp=0 if(ickkw.eq.-1)then -@@ -562,16 +587,54 @@ +@@ -562,16 +587,55 @@ tmp=muR_ref_fixed temp_scale_id='fixed scale' elseif(dynamical_scale_choice.eq.10) then @@ -88,11 +86,12 @@ + tmp=4d0 + write (*,*) "Error 4: scale couldn't find two jets" + else -+ tmp=mdl_MW**2 ++ tmp=sqrt(p_reco(1,3)**2+p_reco(2,3)**2) ++ tmp=tmp+sqrt(p_reco(1,4)**2+p_reco(2,4)**2) + do i=1,njet -+ tmp=tmp+ptjet(i)**2 ++ tmp=tmp+ptjet(i) + end do -+ tmp=sqrt(tmp) ++ tmp=0.5*tmp + endif ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cc USER-DEFINED SCALE: END OF USER CODE cc diff --git a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt index 923cafee..5d6bdd6c 100644 --- a/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt +++ b/nnpdf31_proc/ATLAS_WPJET_8TEV_PTW/launch.txt @@ -14,7 +14,6 @@ set ebeam1 4000 set ebeam2 4000 set pdlabel lhapdf set lhaid 324900 -# TODO: check if scale choice is right set dynamical_scale_choice 10 set reweight_scale True set ptl = 25.0