Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cards to reproduce CMS's very-large invariant-mass plots #138

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
88 changes: 88 additions & 0 deletions nnpdf31_proc/NNPDF_DY_14TEV_BSM_AFB_COS_060_120/analysis.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine analysis_begin(nwgt,weights_info)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

implicit none
integer nwgt
character*(*) weights_info(*)

call HwU_inithist(nwgt,weights_info)
call HwU_book(1,'lmlp yrap',50, -1d0, 1d0)

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)
logical is_nextph_iso(nexternal),is_nextph_iso_reco(nexternal)
double precision xcos, getcostheta
external getcostheta

double precision p_reco(0:4,nexternal)
integer iPDG_reco(nexternal)



is_nextph_iso(:) = .false.
call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
$ p, iPDG, is_nextph_iso, p_reco, iPDG_reco,
$ is_nextph_iso_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) pplb(0:3)=p_reco(0:3,j)
enddo
do i=0,3
ppv(i)=ppl(i)+pplb(i)
enddo

xcos=getcostheta(ppl(0),ppl(1),ppl(2),ppl(3),pplb(0),pplb(1),
& pplb(2),pplb(3))

call HwU_fill(1,xcos,wgts)
end

function getcostheta(enl,ptxl,ptyl,pzl,enal,ptxal,ptyal,pzal)
implicit none
real*8 getcostheta,enl,ptxl,ptyl,pzl,enal,ptxal,ptyal,pzal
real*8 pzll,mll,p1p,p1m,p2p,p2m,pt2ll
c implementation of first formula on page 6 of https://arxiv.org/abs/1710.05167
p1p = enl + pzl
p1m = enl - pzl
p2p = enal + pzal
p2m = enal - pzal
pzll = pzl + pzal
pt2ll = (ptxl + ptxal) * (ptxl + ptxal) +
& (ptyl + ptyal) * (ptyl + ptyal)
mll = sqrt((enl + enal) * (enl + enal) - (pt2ll + pzll * pzll))
getcostheta = (p1p*p2m-p1m*p2p)/sqrt(mll*mll+pt2ll)/mll*
& sign(1d0,pzll)

if (abs(getcostheta) > 1d0) then
print *, 'Calculating cos with cos > 1'
stop
endif
end
26 changes: 26 additions & 0 deletions nnpdf31_proc/NNPDF_DY_14TEV_BSM_AFB_COS_060_120/launch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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 7000
set ebeam2 7000
set pdlabel lhapdf
set lhaid @LHAPDF_ID@
set dynamical_scale_choice 10
set reweight_scale True
set ptl = 10.0
set etal = 2.4
set mll_sf = 60.0
#user_defined_cut set mmllmax = 120.0
set req_acc_FO 0.00001
set pineappl True
done
quit
9 changes: 9 additions & 0 deletions nnpdf31_proc/NNPDF_DY_14TEV_BSM_AFB_COS_060_120/metadata.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
arxiv=
description=
hepdata=
x1_label=costh
x1_label_tex=$\cos \theta^*$
x1_unit=
y_label=dsig/dcosth
y_label_tex=$\frac{\mathrm{d}\sigma}{\mathrm{d}\cos \theta^*}$
y_unit=pb
7 changes: 7 additions & 0 deletions nnpdf31_proc/NNPDF_DY_14TEV_BSM_AFB_COS_060_120/output.txt
Original file line number Diff line number Diff line change
@@ -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+ mu- [QCD]
output @OUTPUT@
quit
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
--- NLO/SubProcesses/setscales.f 2020-05-21 17:23:55.126143088 +0200
+++ NLO/SubProcesses/setscales.f.new 2020-05-21 17:27:26.262700419 +0200
@@ -527,6 +527,18 @@
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)
+ logical is_nextph_iso(nexternal),is_nextph_iso_reco(nexternal)
+ 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
c
tmp=0
if(ickkw.eq.-1)then
@@ -568,10 +579,26 @@
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='FOOBAR' ! use a meaningful string
+ tmp = -1d0
+ do i=1,nexternal
+ p_in(0:3,i) = pp(0:3,i)
+ p_in(4,i) = pmass(i)
+ enddo
+ is_nextph_iso(:) = .false.
+ call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
+ $ p_in, idup(1,1), is_nextph_iso, p_reco,
+ $ iPDG_reco, is_nextph_iso_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) pplb(0:3)=p_reco(0:3,j)
+ enddo
+ do i=0,3
+ ppv(i)=ppl(i)+pplb(i)
+ enddo
+
+ tmp=sqrt(ppv(0)**2-ppv(1)**2-ppv(2)**2-ppv(3)**2)
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc USER-DEFINED SCALE: END OF USER CODE cc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
88 changes: 88 additions & 0 deletions nnpdf31_proc/NNPDF_DY_14TEV_BSM_AFB_COS_3000/analysis.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine analysis_begin(nwgt,weights_info)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

implicit none
integer nwgt
character*(*) weights_info(*)

call HwU_inithist(nwgt,weights_info)
call HwU_book(1,'lmlp yrap',50, -1d0, 1d0)

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)
logical is_nextph_iso(nexternal),is_nextph_iso_reco(nexternal)
double precision xcos, getcostheta
external getcostheta

double precision p_reco(0:4,nexternal)
integer iPDG_reco(nexternal)



is_nextph_iso(:) = .false.
call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
$ p, iPDG, is_nextph_iso, p_reco, iPDG_reco,
$ is_nextph_iso_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) pplb(0:3)=p_reco(0:3,j)
enddo
do i=0,3
ppv(i)=ppl(i)+pplb(i)
enddo

xcos=getcostheta(ppl(0),ppl(1),ppl(2),ppl(3),pplb(0),pplb(1),
& pplb(2),pplb(3))

call HwU_fill(1,xcos,wgts)
end

function getcostheta(enl,ptxl,ptyl,pzl,enal,ptxal,ptyal,pzal)
implicit none
real*8 getcostheta,enl,ptxl,ptyl,pzl,enal,ptxal,ptyal,pzal
real*8 pzll,mll,p1p,p1m,p2p,p2m,pt2ll
c implementation of first formula on page 6 of https://arxiv.org/abs/1710.05167
p1p = enl + pzl
p1m = enl - pzl
p2p = enal + pzal
p2m = enal - pzal
pzll = pzl + pzal
pt2ll = (ptxl + ptxal) * (ptxl + ptxal) +
& (ptyl + ptyal) * (ptyl + ptyal)
mll = sqrt((enl + enal) * (enl + enal) - (pt2ll + pzll * pzll))
getcostheta = (p1p*p2m-p1m*p2p)/sqrt(mll*mll+pt2ll)/mll*
& sign(1d0,pzll)

if (abs(getcostheta) > 1d0) then
print *, 'Calculating cos with cos > 1'
stop
endif
end
25 changes: 25 additions & 0 deletions nnpdf31_proc/NNPDF_DY_14TEV_BSM_AFB_COS_3000/launch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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 7000
set ebeam2 7000
set pdlabel lhapdf
set lhaid @LHAPDF_ID@
set dynamical_scale_choice 10
set reweight_scale True
set ptl = 10.0
set etal = 2.4
set mll_sf = 3000.0
set req_acc_FO 0.0001
set pineappl True
done
quit
9 changes: 9 additions & 0 deletions nnpdf31_proc/NNPDF_DY_14TEV_BSM_AFB_COS_3000/metadata.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
arxiv=
description=
hepdata=
x1_label=costh
x1_label_tex=$\cos \theta^*$
x1_unit=
y_label=dsig/dcosth
y_label_tex=$\frac{\mathrm{d}\sigma}{\mathrm{d}\cos \theta^*}$
y_unit=pb
7 changes: 7 additions & 0 deletions nnpdf31_proc/NNPDF_DY_14TEV_BSM_AFB_COS_3000/output.txt
Original file line number Diff line number Diff line change
@@ -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+ mu- [QCD]
output @OUTPUT@
quit
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
--- NLO/SubProcesses/setscales.f 2020-05-21 17:23:55.126143088 +0200
+++ NLO/SubProcesses/setscales.f.new 2020-05-21 17:27:26.262700419 +0200
@@ -527,6 +527,18 @@
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)
+ logical is_nextph_iso(nexternal),is_nextph_iso_reco(nexternal)
+ 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
c
tmp=0
if(ickkw.eq.-1)then
@@ -568,10 +579,26 @@
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='FOOBAR' ! use a meaningful string
+ tmp = -1d0
+ do i=1,nexternal
+ p_in(0:3,i) = pp(0:3,i)
+ p_in(4,i) = pmass(i)
+ enddo
+ is_nextph_iso(:) = .false.
+ call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
+ $ p_in, idup(1,1), is_nextph_iso, p_reco,
+ $ iPDG_reco, is_nextph_iso_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) pplb(0:3)=p_reco(0:3,j)
+ enddo
+ do i=0,3
+ ppv(i)=ppl(i)+pplb(i)
+ enddo
+
+ tmp=sqrt(ppv(0)**2-ppv(1)**2-ppv(2)**2-ppv(3)**2)
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc USER-DEFINED SCALE: END OF USER CODE cc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
Loading