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 PDF4LHC21 cards #121

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions nnpdf31_proc/PDF4LHC_DY_13_TEV_21_PHENO/analysis.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
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,'mll', 6, 0d0, 6d0)
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
double precision p(0:4,nexternal)
double precision wgts(*)
double precision ppl(0:3), pplb(0:3), ppv(0:3), xmll
double precision obs
integer i

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

call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
$ p, iPDG, p_reco, iPDG_reco)

do i = nincoming+1, nexternal
if (iPDG_reco(i).eq.13) ppl(0:3)=p_reco(0:3,i)
if (iPDG_reco(i).eq.-13) pplb(0:3)=p_reco(0:3,i)
enddo
do i=0,3
ppv(i)=ppl(i)+pplb(i)
enddo

xmll=sqrt(ppv(0)**2-ppv(1)**2-ppv(2)**2-ppv(3)**2)
obs=-1d0

if (xmll.lt.1000d0) then
obs = -2d0
else if (xmll.lt.1500d0) then
obs=0.5d0
else if (xmll.lt.2000d0) then
obs=1.5d0
else if (xmll.lt.3000d0) then
obs=2.5d0
else if (xmll.lt.4000d0) then
obs=3.5d0
else if (xmll.lt.5000d0) then
obs=4.5d0
else if (xmll.lt.7000d0) then
obs=5.5d0
else
obs=-3d0
endif

if (obs.gt.0d0) then
call HwU_fill(1,obs,wgts)
else
write (*,*) "error: event outside bins", obs
stop 1
endif

999 return
end
67 changes: 67 additions & 0 deletions nnpdf31_proc/PDF4LHC_DY_13_TEV_21_PHENO/change_scale_to_mll.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
--- CMSDY2D11/SubProcesses/setscales.f 2020-05-21 17:23:55.126143088 +0200
+++ CMSDY2D11/SubProcesses/setscales.f.new 2020-05-21 17:27:26.262700419 +0200
@@ -527,6 +527,17 @@
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), xmll
+ 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,42 @@
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='Mll' ! 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
+ call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
+ $ p_in, idup(1,1), 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) pplb(0:3)=p_reco(0:3,j)
+ enddo
+ do i=0,3
+ ppv(i)=ppl(i)+pplb(i)
+ enddo
+
+ xmll=sqrt(ppv(0)**2-ppv(1)**2-ppv(2)**2-ppv(3)**2)
+
+ if (xmll.lt.1000d0) then
+ write (*,*) "error: event outside bins", xmll
+ else if (xmll.lt.1500d0) then
+ tmp=0.5*(1000d0+1500d0)
+ else if (xmll.lt.2000d0) then
+ tmp=0.5*(1500d0+2000d0)
+ else if (xmll.lt.3000d0) then
+ tmp=0.5*(2000d0+3000d0)
+ else if (xmll.lt.4000d0) then
+ tmp=0.5*(3000d0+4000d0)
+ else if (xmll.lt.5000d0) then
+ tmp=0.5*(4000d0+5000d0)
+ else if (xmll.lt.7000d0) then
+ tmp=0.5*(5000d0+7000d0)
+ else
+ write (*,*) "error: event outside bins", xmll
+ endif
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc USER-DEFINED SCALE: END OF USER CODE cc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
28 changes: 28 additions & 0 deletions nnpdf31_proc/PDF4LHC_DY_13_TEV_21_PHENO/launch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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 6500
set ebeam2 6500
set pdlabel lhapdf
set lhaid @LHAPDF_ID@
set dynamical_scale_choice 10
set reweight_scale True
set ptl = 10.0
#user_defined_cut set ptl1min = 22.0
set etal = 2.4
set mll_sf = 1000.0
#user_defined_cut set mmllmax = 7000.0
set rphreco = 0.1
set req_acc_FO 0.0001
set pineappl True
done
quit
6 changes: 6 additions & 0 deletions nnpdf31_proc/PDF4LHC_DY_13_TEV_21_PHENO/metadata.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
x1_label=Mll
x1_label_tex=$M_{\ell\bar{\ell}}$
x1_unit=GeV
y_label=dsig/dMll
y_label_tex=$\frac{\mathrm{d}\sigma}{\mathrm{d}M_{\ell\bar{\ell}}}$
y_unit=pb/GeV
7 changes: 7 additions & 0 deletions nnpdf31_proc/PDF4LHC_DY_13_TEV_21_PHENO/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 QED]
output @OUTPUT@
quit
4 changes: 4 additions & 0 deletions nnpdf31_proc/PDF4LHC_DY_13_TEV_21_PHENO/postrun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

pineappl remap "${GRID}" "${GRID}".tmp '1000,1500,2000,3000,4000,5000,7000'
mv "${GRID}".tmp "${GRID}"
83 changes: 83 additions & 0 deletions nnpdf31_proc/PDF4LHC_WP_13_TEV_21_PHENO/analysis.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
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,'mll', 7, 0d0, 7d0)
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
double precision p(0:4,nexternal)
double precision wgts(*)
double precision ppl(0:3), pplb(0:3), ppv(0:3), xmll
double precision obs
integer i

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

call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
$ p, iPDG, p_reco, iPDG_reco)

do i = nincoming+1, nexternal
if (iPDG_reco(i).eq.14) ppl(0:3)=p_reco(0:3,i)
if (iPDG_reco(i).eq.-13) pplb(0:3)=p_reco(0:3,i)
enddo
do i=0,3
ppv(i)=ppl(i)+pplb(i)
enddo

xmll=sqrt(ppv(0)**2-ppv(1)**2-ppv(2)**2-ppv(3)**2)
obs=-1d0

if (xmll.lt.1000d0) then
obs=0.5d0
else if (xmll.lt.1500d0) then
obs=1.5d0
else if (xmll.lt.2000d0) then
obs=2.5d0
else if (xmll.lt.3000d0) then
obs=3.5d0
else if (xmll.lt.4000d0) then
obs=4.5d0
else if (xmll.lt.5000d0) then
obs=5.5d0
else if (xmll.lt.7000d0) then
obs=6.5d0
else
obs=-3d0
endif

if (obs.gt.0d0) then
call HwU_fill(1,obs,wgts)
else
!write (*,*) "error: event outside bins", obs
!stop 1
endif

999 return
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
--- PDF4LHC_WP_13_TEV_21_PHENO/SubProcesses/cuts.f.old 2022-01-18 14:44:46.095088533 +0100
+++ PDF4LHC_WP_13_TEV_21_PHENO/SubProcesses/cuts.f 2022-01-18 14:49:52.421021878 +0100
@@ -975,25 +975,33 @@
c 'bias' = event_norm
c
implicit none
+ include 'cuts.inc'
include 'nexternal.inc'
double precision bias_wgt,p(0:3,nexternal),H_T
integer ipdg(nexternal),i
+ double precision ppl(0:3), pplb(0:3), ppv(0:3)
+ double precision p_reco(0:4,nexternal)
+ integer iPDG_reco(nexternal),grid,xmlnu
+

bias_wgt=1d0

-c How to enhance the tails is very process dependent. For example for
-c top quark production one could use:
-c do i=1,nexternal
-c if (ipdg(i).eq.6) then
-c bias_wgt=sqrt(p(1,i)**2+p(2,i)**2)**3
-c endif
-c enddo
-c Or to use H_T^2 one does
-c H_T=0d0
-c do i=3,nexternal
-c H_T=H_T+sqrt(max(0d0,(p(0,i)+p(3,i))*(p(0,i)-p(3,i))))
-c enddo
-c bias_wgt=H_T**2
+ call recombine_momenta(rphreco, etaphreco, lepphreco, quarkphreco,
+ $ p, iPDG, p_reco, iPDG_reco)
+
+ do i = nincoming+1, nexternal
+ if (iPDG_reco(i).eq.14) ppl(0:3)=p_reco(0:3,i)
+ if (iPDG_reco(i).eq.-13) pplb(0:3)=p_reco(0:3,i)
+ enddo
+ do i=0,3
+ ppv(i)=ppl(i)+pplb(i)
+ enddo
+
+ xmlnu=sqrt(ppv(0)**2-ppv(1)**2-ppv(2)**2-ppv(3)**2)
+ if (xmlnu < 1000.0d0) then
+ bias_wgt=1d-10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
this is strange. How about using a smooth function, rather than a step function?
What if you set bias_wgt = xmlnu**2 for example?

+ endif
+ bias_wgt=xmlnu**3
return
end

Loading