From 063593322ae349c6631c269dd3b2a9e3a48c53ce Mon Sep 17 00:00:00 2001 From: enocera Date: Thu, 17 Sep 2020 12:20:45 +0200 Subject: [PATCH 01/23] Add LHCB_WENU_8TEV data set --- nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f | 80 +++++++++++++++++++++++ nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt | 20 ++++++ nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt | 7 ++ nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh | 8 +++ nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f | 80 +++++++++++++++++++++++ nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt | 20 ++++++ nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt | 7 ++ nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh | 8 +++ 8 files changed, 230 insertions(+) create mode 100644 nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f create mode 100644 nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt create mode 100644 nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt create mode 100755 nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh create mode 100644 nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f create mode 100644 nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt create mode 100644 nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt create mode 100755 nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f b/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f new file mode 100644 index 00000000..a938ee65 --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f @@ -0,0 +1,80 @@ +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,'rap', 7, 2.0d0, 3.75d0) + call HwU_book(2,'rap', 1, 3.75d0, 4.25d0) + + 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), xyll, getabsy + external getabsy + + 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.13) ppl(0:3)=p_reco(0:3,j) + enddo + + xyll=getabsy(ppl(0),ppl(3)) + + call HwU_fill(1,xyll,wgts) + call HwU_fill(2,xyll,wgts) + + 999 return + end + +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + + function getabsy(en,pl) + implicit none + real*8 getabsy,en,pl,tmp +c + tmp=pl/en + if(abs(tmp).lt.1d0)then + tmp=abs(atanh(tmp)) + else + write(*,*)'Attempt to compute atanh(x) with x > 1' + stop + endif + getabsy=tmp + return + end + diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt new file mode 100644 index 00000000..7eb828f1 --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt @@ -0,0 +1,20 @@ +launch @OUTPUT@ +fixed_order = ON +set mw @MW@ +set ymt @YMT@ +set ebeam1 4000 +set ebeam2 4000 +set pdlabel lhapdf +set lhaid 324900 +set fixed_ren_scale True +set fixed_fac_scale True +set mur_ref_fixed @MW@ +set muf_ref_fixed @MW@ +set reweight_scale True +set ptl = 20.0 +set etal = 4.25 +#user_defined_cut set minetal = 2.0 +set req_acc_FO 0.01 +set iappl 1 +done +quit diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt new file mode 100644 index 00000000..c694e7ef --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/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 > e- vm~ [QCD QED] +output @OUTPUT@ +quit diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh b/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh new file mode 100755 index 00000000..8e634ed9 --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh @@ -0,0 +1,8 @@ +#!/bin/bash -x + +NEW_GRID="${GRID%.lz4}" + +# divide the grid values by two +pineappl merge "${NEW_GRID}" "${GRID}" --scale 0.5 +# compress the new grid +lz4 -9 -f "${NEW_GRID}" diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f b/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f new file mode 100644 index 00000000..a938ee65 --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f @@ -0,0 +1,80 @@ +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,'rap', 7, 2.0d0, 3.75d0) + call HwU_book(2,'rap', 1, 3.75d0, 4.25d0) + + 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), xyll, getabsy + external getabsy + + 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.13) ppl(0:3)=p_reco(0:3,j) + enddo + + xyll=getabsy(ppl(0),ppl(3)) + + call HwU_fill(1,xyll,wgts) + call HwU_fill(2,xyll,wgts) + + 999 return + end + +cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + + function getabsy(en,pl) + implicit none + real*8 getabsy,en,pl,tmp +c + tmp=pl/en + if(abs(tmp).lt.1d0)then + tmp=abs(atanh(tmp)) + else + write(*,*)'Attempt to compute atanh(x) with x > 1' + stop + endif + getabsy=tmp + return + end + diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt new file mode 100644 index 00000000..7eb828f1 --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt @@ -0,0 +1,20 @@ +launch @OUTPUT@ +fixed_order = ON +set mw @MW@ +set ymt @YMT@ +set ebeam1 4000 +set ebeam2 4000 +set pdlabel lhapdf +set lhaid 324900 +set fixed_ren_scale True +set fixed_fac_scale True +set mur_ref_fixed @MW@ +set muf_ref_fixed @MW@ +set reweight_scale True +set ptl = 20.0 +set etal = 4.25 +#user_defined_cut set minetal = 2.0 +set req_acc_FO 0.01 +set iappl 1 +done +quit diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt new file mode 100644 index 00000000..75b374cd --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/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 > e+ vm [QCD QED] +output @OUTPUT@ +quit diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh b/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh new file mode 100755 index 00000000..8e634ed9 --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh @@ -0,0 +1,8 @@ +#!/bin/bash -x + +NEW_GRID="${GRID%.lz4}" + +# divide the grid values by two +pineappl merge "${NEW_GRID}" "${GRID}" --scale 0.5 +# compress the new grid +lz4 -9 -f "${NEW_GRID}" From a8d1c4be6b5e6ced2fca53ab33a77f2a739cba0a Mon Sep 17 00:00:00 2001 From: enocera Date: Thu, 17 Sep 2020 13:27:44 +0200 Subject: [PATCH 02/23] Corrected neutrino --- nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt | 2 +- nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt index c694e7ef..1f9da452 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/output.txt @@ -2,6 +2,6 @@ set complex_mass_scheme True import model loop_qcd_qed_sm_Gmu define p = p b b~ define j = p -generate p p > e- vm~ [QCD QED] +generate p p > e- ve~ [QCD QED] output @OUTPUT@ quit diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt index 75b374cd..a4ad269a 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/output.txt @@ -2,6 +2,6 @@ set complex_mass_scheme True import model loop_qcd_qed_sm_Gmu define p = p b b~ define j = p -generate p p > e+ vm [QCD QED] +generate p p > e+ ve [QCD QED] output @OUTPUT@ quit From 15413bf7136d62db71c3ec50b46f6ca58a23be0d Mon Sep 17 00:00:00 2001 From: enocera Date: Thu, 24 Sep 2020 13:58:50 +0200 Subject: [PATCH 03/23] Various fixes --- nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt | 2 ++ nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh | 2 +- nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt | 2 ++ nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt index 7eb828f1..97bd5d62 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt @@ -1,6 +1,7 @@ launch @OUTPUT@ fixed_order = ON set mw @MW@ +set mz @MZ@ set ymt @YMT@ set ebeam1 4000 set ebeam2 4000 @@ -14,6 +15,7 @@ set reweight_scale True set ptl = 20.0 set etal = 4.25 #user_defined_cut set minetal = 2.0 +set rphreco = 0.1 set req_acc_FO 0.01 set iappl 1 done diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh b/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh index 8e634ed9..5ab8039a 100755 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash NEW_GRID="${GRID%.lz4}" diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt index 7eb828f1..97bd5d62 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt @@ -1,6 +1,7 @@ launch @OUTPUT@ fixed_order = ON set mw @MW@ +set mz @MZ@ set ymt @YMT@ set ebeam1 4000 set ebeam2 4000 @@ -14,6 +15,7 @@ set reweight_scale True set ptl = 20.0 set etal = 4.25 #user_defined_cut set minetal = 2.0 +set rphreco = 0.1 set req_acc_FO 0.01 set iappl 1 done diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh b/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh index 8e634ed9..5ab8039a 100755 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash NEW_GRID="${GRID%.lz4}" From cab75082cddd786f1fbebd157ebe1f2883ba2a79 Mon Sep 17 00:00:00 2001 From: enocera Date: Thu, 24 Sep 2020 17:17:51 +0200 Subject: [PATCH 04/23] Fixed particle ID --- nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f b/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f index a938ee65..a27ab959 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f @@ -50,7 +50,7 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) $ p, iPDG, p_reco, iPDG_reco) do j = nincoming+1, nexternal - if (iPDG_reco(j).eq.13) ppl(0:3)=p_reco(0:3,j) + if (iPDG_reco(j).eq.-13) ppl(0:3)=p_reco(0:3,j) enddo xyll=getabsy(ppl(0),ppl(3)) From e478f3ea3ca406d60cc01ea87756497ce329c143 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 17 Sep 2020 17:48:54 +0200 Subject: [PATCH 05/23] Support latest mg5_aMC@NLO commit --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 343d6da4..a0bea1fd 100755 --- a/run.sh +++ b/run.sh @@ -130,7 +130,7 @@ EOF grid="${dataset}".pineappl # merge the final bins - "${pineappl}" merge "${grid}" $(ls -v "${dataset}"/Events/run_01*/amcblast_obs_*.root) + "${pineappl}" merge "${grid}" $(ls -v "${dataset}"/Events/run_01*/amcblast_obs_*.pineappl) lz4=$(which lz4 2> /dev/null || true) From b280db39aeb6ce5ad47a687f504842d45933f127 Mon Sep 17 00:00:00 2001 From: enocera Date: Thu, 24 Sep 2020 18:21:31 +0200 Subject: [PATCH 06/23] set pineappl True --- nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt | 2 +- nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt index 97bd5d62..06ec645e 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt @@ -17,6 +17,6 @@ set etal = 4.25 #user_defined_cut set minetal = 2.0 set rphreco = 0.1 set req_acc_FO 0.01 -set iappl 1 +set pineappl True done quit diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt index 97bd5d62..06ec645e 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt @@ -17,6 +17,6 @@ set etal = 4.25 #user_defined_cut set minetal = 2.0 set rphreco = 0.1 set req_acc_FO 0.01 -set iappl 1 +set pineappl True done quit From d08d29684e13c793f90f827b943ecb112fb8d39e Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Mon, 14 Sep 2020 11:51:47 +0200 Subject: [PATCH 07/23] Add custom cuts for LHCb --- run_implement_user_defined_cuts.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/run_implement_user_defined_cuts.py b/run_implement_user_defined_cuts.py index 84be19f4..87c04e21 100755 --- a/run_implement_user_defined_cuts.py +++ b/run_implement_user_defined_cuts.py @@ -111,6 +111,34 @@ endif enddo +''', + 'minetal': '''c cut on the minimum pseudorapidity of leptons + do i=1,nexternal-1 + if (is_a_lm(i) .or. is_a_lp(i)) then + if (abs(atanh(p_reco(3,i)/sqrt(p_reco(1,i)**2+p_reco(2,i)**2+ + & p_reco(3,i)**2))) .lt. {}) then + passcuts_user=.false. + return + endif + endif + enddo + +''', + 'yzmin': '''c cut on the rapidity of SFOS lepton pairs + do i=1,nexternal-1 + if (is_a_lm(i) .or. is_a_lp(i)) then + do j=i+1,nexternal + if (ipdg_reco(i) .eq. -ipdg_reco(j)) then + if (abs(atanh((p_reco(3,i)+p_reco(3,j)) + & /(p_reco(0,i)+p_reco(0,j)))) .lt. {}) then + passcuts_user=.false. + return + endif + endif + enddo + endif + enddo + ''', } From 342260dd16d2b0d5945ea747a2dab260c88dcdb4 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Mon, 26 Oct 2020 19:29:33 +0100 Subject: [PATCH 08/23] Fix wrong particle IDs --- nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f | 2 +- nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f b/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f index a938ee65..ef2e129a 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f @@ -50,7 +50,7 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) $ p, iPDG, p_reco, iPDG_reco) do j = nincoming+1, nexternal - if (iPDG_reco(j).eq.13) ppl(0:3)=p_reco(0:3,j) + if (iPDG_reco(j).eq.11) ppl(0:3)=p_reco(0:3,j) enddo xyll=getabsy(ppl(0),ppl(3)) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f b/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f index a27ab959..847ab1d4 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f @@ -50,7 +50,7 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) $ p, iPDG, p_reco, iPDG_reco) do j = nincoming+1, nexternal - if (iPDG_reco(j).eq.-13) ppl(0:3)=p_reco(0:3,j) + if (iPDG_reco(j).eq.-11) ppl(0:3)=p_reco(0:3,j) enddo xyll=getabsy(ppl(0),ppl(3)) From cb4946bb9650491cbe6c4a46f19c4c0c7d7ee4da Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 7 Nov 2020 18:14:40 +0100 Subject: [PATCH 09/23] Disable threads for PDF uncertainties - just for the time being to avoid LHAPDF bug --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index a0bea1fd..a0e674e9 100755 --- a/run.sh +++ b/run.sh @@ -147,7 +147,7 @@ EOF # (re-)produce predictions "${pineappl}" convolute "${grid}" "${pdfstring}" --scales 9 > pineappl.convolute "${pineappl}" orders "${grid}" "${pdfstring}" --absolute > pineappl.orders - "${pineappl}" pdf_uncertainty "${grid}" "${pdfstring}" > pineappl.pdf_uncertainty + "${pineappl}" pdf_uncertainty --threads=1 "${grid}" "${pdfstring}" > pineappl.pdf_uncertainty # extract the numerical results from mg5_aMC sed '/^ [+-]/!d' "${dataset}"/Events/run_01*/MADatNLO.HwU > results.mg5_aMC From ff33016f6d9eba04f32f72aa0fa11e852ff8e35e Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Wed, 3 Feb 2021 16:15:50 +0100 Subject: [PATCH 10/23] Add support for metadata --- run.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/run.sh b/run.sh index a0e674e9..0f9b1759 100755 --- a/run.sh +++ b/run.sh @@ -167,6 +167,15 @@ EOF rm results.mg5_aMC results.grid + # add metadata + if [[ -f ../nnpdf31_proc/"${dataset}"/metadata.txt ]]; then + eval $(awk -F= "BEGIN { printf \"pineappl set $grid $grid.new \" } + { printf \"--entry %s '%s' \", \$1, \$2 } + END { printf \"\\n\" }" \ + ../nnpdf31_proc/"${dataset}"/metadata.txt) + mv $grid.new $grid + fi + # if there is anything to do after the run, do it! if [[ -x ../nnpdf31_proc/"${dataset}"/postrun.sh ]]; then cp ../nnpdf31_proc/"${dataset}"/postrun.sh . From 22e92cd7d8213de00e3a4388bb837fc221b58d57 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Wed, 3 Feb 2021 18:12:34 +0100 Subject: [PATCH 11/23] Fix compression when adding metadata --- run.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/run.sh b/run.sh index 0f9b1759..50c3ee28 100755 --- a/run.sh +++ b/run.sh @@ -132,6 +132,15 @@ EOF # merge the final bins "${pineappl}" merge "${grid}" $(ls -v "${dataset}"/Events/run_01*/amcblast_obs_*.pineappl) + # add metadata + if [[ -f ../nnpdf31_proc/"${dataset}"/metadata.txt ]]; then + eval $(awk -F= "BEGIN { printf \"pineappl set $grid $grid.new \" } + { printf \"--entry %s '%s' \", \$1, \$2 } + END { printf \"\\n\" }" \ + ../nnpdf31_proc/"${dataset}"/metadata.txt) + mv $grid.new ${grid} + fi + lz4=$(which lz4 2> /dev/null || true) # compress the grid with `lz4` if it's available @@ -167,15 +176,6 @@ EOF rm results.mg5_aMC results.grid - # add metadata - if [[ -f ../nnpdf31_proc/"${dataset}"/metadata.txt ]]; then - eval $(awk -F= "BEGIN { printf \"pineappl set $grid $grid.new \" } - { printf \"--entry %s '%s' \", \$1, \$2 } - END { printf \"\\n\" }" \ - ../nnpdf31_proc/"${dataset}"/metadata.txt) - mv $grid.new $grid - fi - # if there is anything to do after the run, do it! if [[ -x ../nnpdf31_proc/"${dataset}"/postrun.sh ]]; then cp ../nnpdf31_proc/"${dataset}"/postrun.sh . From a4e5d9f17485d47455f2b8efd2ddd532d290a1ca Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sun, 7 Feb 2021 11:46:10 +0100 Subject: [PATCH 12/23] Optimize grids after creation --- run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run.sh b/run.sh index 50c3ee28..f9004fa1 100755 --- a/run.sh +++ b/run.sh @@ -132,6 +132,10 @@ EOF # merge the final bins "${pineappl}" merge "${grid}" $(ls -v "${dataset}"/Events/run_01*/amcblast_obs_*.pineappl) + # optimize the grids + "${pineappl}" optimize "${grid}" "${grid}".tmp + mv "${grid}".tmp "${grid}" + # add metadata if [[ -f ../nnpdf31_proc/"${dataset}"/metadata.txt ]]; then eval $(awk -F= "BEGIN { printf \"pineappl set $grid $grid.new \" } From 5030f303ee364cd8acacbe93df39d680994da8dd Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Mon, 8 Feb 2021 10:17:50 +0100 Subject: [PATCH 13/23] Insert runcard into grids --- run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index f9004fa1..cb914bed 100755 --- a/run.sh +++ b/run.sh @@ -138,9 +138,10 @@ EOF # add metadata if [[ -f ../nnpdf31_proc/"${dataset}"/metadata.txt ]]; then + runcard="${dataset}"/Events/run_01*/run_01_tag_1_banner.txt eval $(awk -F= "BEGIN { printf \"pineappl set $grid $grid.new \" } { printf \"--entry %s '%s' \", \$1, \$2 } - END { printf \"\\n\" }" \ + END { printf \"--entry_from_file runcard ${runcard}\\n\" }" \ ../nnpdf31_proc/"${dataset}"/metadata.txt) mv $grid.new ${grid} fi From 202fb088aaa6e5dd18e8d7a63d5d035f9cb7c8ed Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 9 Feb 2021 14:44:20 +0100 Subject: [PATCH 14/23] Add metadata --- nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt | 6 ++++++ nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt create mode 100644 nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt new file mode 100644 index 00000000..01ccd531 --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt @@ -0,0 +1,6 @@ +arxiv=1511.08039 +description=LHCb differential Drell–Yan cross section at 8 TeV +hepdata=10.17182/hepdata.71419.v1/t1 +x1_label=eta_l +x1_label_tex=$\eta_\ell$ +y_unit=pb diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt new file mode 100644 index 00000000..0eeac1c7 --- /dev/null +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt @@ -0,0 +1,6 @@ +arxiv=1511.08039 +description=LHCb differential Drell–Yan cross section at 8 TeV +hepdata=10.17182/hepdata.71419.v1/t1 +x1_label=eta_l +x1_label_tex=$\eta_{\bar{\ell}}$ +y_unit=pb From dc50289ad63cabcdfa75684eeeec92c112e2f94c Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 9 Feb 2021 14:55:01 +0100 Subject: [PATCH 15/23] Fix metadata --- nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt | 3 +-- nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt index 01ccd531..e99f448a 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/metadata.txt @@ -1,6 +1,5 @@ -arxiv=1511.08039 +arxiv=1608.01484 description=LHCb differential Drell–Yan cross section at 8 TeV -hepdata=10.17182/hepdata.71419.v1/t1 x1_label=eta_l x1_label_tex=$\eta_\ell$ y_unit=pb diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt index 0eeac1c7..d2c38805 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/metadata.txt @@ -1,6 +1,5 @@ -arxiv=1511.08039 +arxiv=1608.01484 description=LHCb differential Drell–Yan cross section at 8 TeV -hepdata=10.17182/hepdata.71419.v1/t1 x1_label=eta_l x1_label_tex=$\eta_{\bar{\ell}}$ y_unit=pb From c6463eba6ee05c363e64a9a529c1e4e166f3bb19 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Wed, 10 Feb 2021 14:14:37 +0100 Subject: [PATCH 16/23] Increase statistics --- nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt | 2 +- nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt index 06ec645e..14bf1adf 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/launch.txt @@ -16,7 +16,7 @@ set ptl = 20.0 set etal = 4.25 #user_defined_cut set minetal = 2.0 set rphreco = 0.1 -set req_acc_FO 0.01 +set req_acc_FO 0.0002 set pineappl True done quit diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt b/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt index 06ec645e..14bf1adf 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/launch.txt @@ -16,7 +16,7 @@ set ptl = 20.0 set etal = 4.25 #user_defined_cut set minetal = 2.0 set rphreco = 0.1 -set req_acc_FO 0.01 +set req_acc_FO 0.0002 set pineappl True done quit From 04b881ac57e8a24fff3cfeb5a313893cfdf9de28 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 11 Feb 2021 13:04:50 +0100 Subject: [PATCH 17/23] Simplify writing of postrun scripts - grid compression is done at the very end of `run.sh` --- run.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/run.sh b/run.sh index cb914bed..db823494 100755 --- a/run.sh +++ b/run.sh @@ -146,15 +146,6 @@ EOF mv $grid.new ${grid} fi - lz4=$(which lz4 2> /dev/null || true) - - # compress the grid with `lz4` if it's available - if [[ -x ${lz4} ]]; then - lz4 -9 "${grid}" - rm "${grid}" - grid="${grid}.lz4" - fi - # find out which PDF set was used to generate the predictions pdfstring=$(grep "set lhaid" "${launch_file}" | sed 's/set lhaid \([0-9]\+\)/\1/') @@ -186,6 +177,14 @@ EOF cp ../nnpdf31_proc/"${dataset}"/postrun.sh . GRID=$grid ./postrun.sh fi + + lz4=$(which lz4 2> /dev/null || true) + + # compress the grid with `lz4` if it's available + if [[ -x ${lz4} ]]; then + lz4 -9 "${grid}" + rm "${grid}" + fi } check_args_and_cd_output "$@" From 342ca405fafd0eed8e1a1624b3e81c06c35a66d5 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 11 Feb 2021 13:12:18 +0100 Subject: [PATCH 18/23] Simplify `postrun.sh` files --- nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh | 7 ++----- nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh b/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh index 5ab8039a..9512ca5e 100755 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/postrun.sh @@ -1,8 +1,5 @@ #!/bin/bash -NEW_GRID="${GRID%.lz4}" - # divide the grid values by two -pineappl merge "${NEW_GRID}" "${GRID}" --scale 0.5 -# compress the new grid -lz4 -9 -f "${NEW_GRID}" +pineappl merge "${GRID}".tmp "${GRID}" --scale 0.5 +mv "${GRID}".tmp "${GRID}" diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh b/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh index 5ab8039a..9512ca5e 100755 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/postrun.sh @@ -1,8 +1,5 @@ #!/bin/bash -NEW_GRID="${GRID%.lz4}" - # divide the grid values by two -pineappl merge "${NEW_GRID}" "${GRID}" --scale 0.5 -# compress the new grid -lz4 -9 -f "${NEW_GRID}" +pineappl merge "${GRID}".tmp "${GRID}" --scale 0.5 +mv "${GRID}".tmp "${GRID}" From 736852c93f9c0c1e5c638c4315de835497a1889d Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 11 Feb 2021 13:28:12 +0100 Subject: [PATCH 19/23] Add runcard even if there is no `metadata.txt` --- run.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index db823494..34715182 100755 --- a/run.sh +++ b/run.sh @@ -137,14 +137,16 @@ EOF mv "${grid}".tmp "${grid}" # add metadata + runcard="${dataset}"/Events/run_01*/run_01_tag_1_banner.txt if [[ -f ../nnpdf31_proc/"${dataset}"/metadata.txt ]]; then - runcard="${dataset}"/Events/run_01*/run_01_tag_1_banner.txt - eval $(awk -F= "BEGIN { printf \"pineappl set $grid $grid.new \" } + eval $(awk -F= "BEGIN { printf \"pineappl set ${grid} ${grid}.tmp \" } { printf \"--entry %s '%s' \", \$1, \$2 } END { printf \"--entry_from_file runcard ${runcard}\\n\" }" \ ../nnpdf31_proc/"${dataset}"/metadata.txt) - mv $grid.new ${grid} + else + "${pineappl}" set "${grid}" "${grid}".tmp --entry_from_file runcard ${runcard} fi + mv "${grid}".tmp "${grid}" # find out which PDF set was used to generate the predictions pdfstring=$(grep "set lhaid" "${launch_file}" | sed 's/set lhaid \([0-9]\+\)/\1/') From fc08ee513b514da470815a25ff5d6d149bf26f6c Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 11 Feb 2021 13:32:29 +0100 Subject: [PATCH 20/23] Add results to metadata --- run.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run.sh b/run.sh index 34715182..6b698f88 100755 --- a/run.sh +++ b/run.sh @@ -174,6 +174,9 @@ EOF rm results.mg5_aMC results.grid + "${pineappl}" set "${grid}" "${grid}".tmp --entry_from_file results results.log + mv "${grid}".tmp "${grid}" + # if there is anything to do after the run, do it! if [[ -x ../nnpdf31_proc/"${dataset}"/postrun.sh ]]; then cp ../nnpdf31_proc/"${dataset}"/postrun.sh . From 07076aef1029f9a1657d88b43f88335f9bddc825 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 11 Feb 2021 10:53:25 +0100 Subject: [PATCH 21/23] Improve output of the final check --- run.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/run.sh b/run.sh index 6b698f88..75cee7dc 100755 --- a/run.sh +++ b/run.sh @@ -165,12 +165,17 @@ EOF # compare the results from the grid and from mg5_aMC paste -d ' ' results.grid results.mg5_aMC | awk \ 'function abs(x) { return x < 0.0 ? -x : x; } - BEGIN { print "----------------------------------------------------------------------------------------" - print " PineAPPL mg5_aMC mg5_aMC unc. sigmas per mille 9-point scale var. (MC)" - print "----------------------------------------------------------------------------------------" } - { printf "% e % e %e %8.3f %10.4f % e % e\n", - $1, $4, $5, $5 != 0.0 ? abs($1-$4)/$5 : 0.0, $4 != 0.0 ? abs($1-$4)/$4*1000 : 0.0, $7, $8 }' | \ - tee results.log + BEGIN { print "---------------------------------------------------------------------------------" + print " PineAPPL MC MC unc. sigmas 1/1000 9-point scale var. (MC)" + print "---------------------------------------------------------------------------------" } + { printf "% e % e %7.3f%% %7.3f %8.4f % e % e\n", + $1, + $4, + $4 != 0.0 ? $5/$4*100 : 0.0, + $5 != 0.0 ? abs($1-$4)/$5 : 0.0, + $4 != 0.0 ? abs($1-$4)/$4*1000 : 0.0, + $7, + $8 }' | tee results.log rm results.mg5_aMC results.grid From 893471b21c3ef93d5f17bdabd9abfb87306e2bbf Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 11 Feb 2021 12:04:25 +0100 Subject: [PATCH 22/23] Print scale-varied differences --- README.md | 8 +++++++- run.sh | 50 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 1c5242cf..afa6d873 100644 --- a/README.md +++ b/README.md @@ -111,5 +111,11 @@ The contents of this directory are: * `pineappl.orders`: Output of `pineappl orders` * `pineappl.pdf_uncertainty`: Output of `pineappl pdf_uncertainty` * `results.log`: The numerical results of the run, comparing the results of the - grid against the results from `mg5_aMC` + grid against the results from `mg5_aMC`. The first column (PineAPPL) are the + interpolated results, which should be similar to the Monte Carlo (MC) results + in the second column. The third column gives the relative MC uncertainty + (sigma). The next column gives the differences in terms of sigma. The final + three columns give the per mille differences of the central, minimum, and + maximum scale varied results. Ideally the first two columns are the same and + the remaining columns are zero. * `time.log`: Total `time` needed for the run diff --git a/run.sh b/run.sh index 75cee7dc..69748878 100755 --- a/run.sh +++ b/run.sh @@ -152,7 +152,7 @@ EOF pdfstring=$(grep "set lhaid" "${launch_file}" | sed 's/set lhaid \([0-9]\+\)/\1/') # (re-)produce predictions - "${pineappl}" convolute "${grid}" "${pdfstring}" --scales 9 > pineappl.convolute + "${pineappl}" convolute "${grid}" "${pdfstring}" --scales 9 --absolute > pineappl.convolute "${pineappl}" orders "${grid}" "${pdfstring}" --absolute > pineappl.orders "${pineappl}" pdf_uncertainty --threads=1 "${grid}" "${pdfstring}" > pineappl.pdf_uncertainty @@ -160,22 +160,48 @@ EOF sed '/^ [+-]/!d' "${dataset}"/Events/run_01*/MADatNLO.HwU > results.mg5_aMC # extract the integrated results from the PineAPPL grid - cat pineappl.convolute | head -n -2 | tail -n +5 | awk '{ print $5 }' > results.grid + cat pineappl.convolute | head -n -2 | tail -n +5 | \ + awk '{ print $5, $6, $7, $8, $9, $10, $11, $12, $13, $14 }' > results.grid # compare the results from the grid and from mg5_aMC paste -d ' ' results.grid results.mg5_aMC | awk \ 'function abs(x) { return x < 0.0 ? -x : x; } - BEGIN { print "---------------------------------------------------------------------------------" - print " PineAPPL MC MC unc. sigmas 1/1000 9-point scale var. (MC)" - print "---------------------------------------------------------------------------------" } - { printf "% e % e %7.3f%% %7.3f %8.4f % e % e\n", + function max(x1,x2,x3,x4,x5,x6,x7,x8,x9) { + result=x1; + if (x2 > result) { result = x2; } + if (x3 > result) { result = x3; } + if (x4 > result) { result = x4; } + if (x5 > result) { result = x5; } + if (x6 > result) { result = x6; } + if (x7 > result) { result = x7; } + if (x8 > result) { result = x8; } + if (x9 > result) { result = x9; } + return result; + } + function min(x1,x2,x3,x4,x5,x6,x7,x8,x9) { + result=x1; + if (x2 < result) { result = x2; } + if (x3 < result) { result = x3; } + if (x4 < result) { result = x4; } + if (x5 < result) { result = x5; } + if (x6 < result) { result = x6; } + if (x7 < result) { result = x7; } + if (x8 < result) { result = x8; } + if (x9 < result) { result = x9; } + return result; + } + BEGIN { print "-----------------------------------------------------------------------" + print " PineAPPL MC sigma diff. central min max " + print " sigma 1/1000 1/1000 1/1000" + print "-----------------------------------------------------------------------" } + { printf "% e % e %7.3f%% %7.3f %8.4f %8.4f %8.4f\n", $1, - $4, - $4 != 0.0 ? $5/$4*100 : 0.0, - $5 != 0.0 ? abs($1-$4)/$5 : 0.0, - $4 != 0.0 ? abs($1-$4)/$4*1000 : 0.0, - $7, - $8 }' | tee results.log + $13, + $13 != 0.0 ? $14/$13*100 : 0.0, + $14 != 0.0 ? abs($1-$13)/$14 : 0.0, + $13 != 0.0 ? abs($1-$13)/$13*1000 : 0.0, + $16 != 0.0 ? abs(min($2, $3, $4, $5, $6, $7, $8, $9, $10)-$16)/$16*1000 : 0.0, + $17 != 0.0 ? abs(max($2, $3, $4, $5, $6, $7, $8, $9, $10)-$17)/$17*1000 : 0.0 }' | tee results.log rm results.mg5_aMC results.grid From 9d02db3636bd5337887c6498e724f9f206116add Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 13 Feb 2021 08:43:22 +0100 Subject: [PATCH 23/23] Fix use of rapidity with pseudorapidity --- nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f | 39 ++++++----------------- nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f | 39 ++++++----------------- 2 files changed, 20 insertions(+), 58 deletions(-) diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f b/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f index ef2e129a..c3f0e16b 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WM/analysis.f @@ -8,8 +8,8 @@ subroutine analysis_begin(nwgt,weights_info) call set_error_estimation(1) call HwU_inithist(nwgt,weights_info) - call HwU_book(1,'rap', 7, 2.0d0, 3.75d0) - call HwU_book(2,'rap', 1, 3.75d0, 4.25d0) + call HwU_book(1,'eta', 7, 2.0d0, 3.75d0) + call HwU_book(2,'eta', 1, 3.75d0, 4.25d0) return end @@ -35,11 +35,10 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) 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), xyll, getabsy - external getabsy + double precision xeta, eta_04 + external eta_04 double precision p_reco(0:4,nexternal) integer iPDG_reco(nexternal) @@ -49,32 +48,14 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco, $ p, iPDG, p_reco, iPDG_reco) - do j = nincoming+1, nexternal - if (iPDG_reco(j).eq.11) ppl(0:3)=p_reco(0:3,j) + do i = nincoming+1, nexternal + if (iPDG_reco(i).eq.11) then + xeta = eta_04(p_reco(0,i)) + endif enddo - xyll=getabsy(ppl(0),ppl(3)) - - call HwU_fill(1,xyll,wgts) - call HwU_fill(2,xyll,wgts) + call HwU_fill(1,xeta,wgts) + call HwU_fill(2,xeta,wgts) 999 return end - -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - - function getabsy(en,pl) - implicit none - real*8 getabsy,en,pl,tmp -c - tmp=pl/en - if(abs(tmp).lt.1d0)then - tmp=abs(atanh(tmp)) - else - write(*,*)'Attempt to compute atanh(x) with x > 1' - stop - endif - getabsy=tmp - return - end - diff --git a/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f b/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f index 847ab1d4..4859d88c 100644 --- a/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f +++ b/nnpdf31_proc/LHCB_WENU_8TEV_WP/analysis.f @@ -8,8 +8,8 @@ subroutine analysis_begin(nwgt,weights_info) call set_error_estimation(1) call HwU_inithist(nwgt,weights_info) - call HwU_book(1,'rap', 7, 2.0d0, 3.75d0) - call HwU_book(2,'rap', 1, 3.75d0, 4.25d0) + call HwU_book(1,'eta', 7, 2.0d0, 3.75d0) + call HwU_book(2,'eta', 1, 3.75d0, 4.25d0) return end @@ -35,11 +35,10 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) 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), xyll, getabsy - external getabsy + double precision xeta, eta_04 + external eta_04 double precision p_reco(0:4,nexternal) integer iPDG_reco(nexternal) @@ -49,32 +48,14 @@ subroutine analysis_fill(p,istatus,ipdg,wgts,ibody) call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco, $ p, iPDG, p_reco, iPDG_reco) - do j = nincoming+1, nexternal - if (iPDG_reco(j).eq.-11) ppl(0:3)=p_reco(0:3,j) + do i = nincoming+1, nexternal + if (iPDG_reco(i).eq.-11) then + xeta = eta_04(p_reco(0,i)) + endif enddo - xyll=getabsy(ppl(0),ppl(3)) - - call HwU_fill(1,xyll,wgts) - call HwU_fill(2,xyll,wgts) + call HwU_fill(1,xeta,wgts) + call HwU_fill(2,xeta,wgts) 999 return end - -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - - function getabsy(en,pl) - implicit none - real*8 getabsy,en,pl,tmp -c - tmp=pl/en - if(abs(tmp).lt.1d0)then - tmp=abs(atanh(tmp)) - else - write(*,*)'Attempt to compute atanh(x) with x > 1' - stop - endif - getabsy=tmp - return - end -