Skip to content
Open
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
227 changes: 222 additions & 5 deletions Template/NLO/SubProcesses/fks_singular.f
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,9 @@ subroutine compute_soft_collinear_counter_term(replace_MC_subt)
! PDF scheme prefactors
double precision f_pdfsch_d,f_pdfsch_p,f_pdfsch_l
common/factor_pdfsch/f_pdfsch_d,f_pdfsch_p,f_pdfsch_l
! ISR with resonances (see compute_prefactors_n1body)
double precision f_isrbw_kt,f_isrbw_ktl
common/factor_isrbw/f_isrbw_kt,f_isrbw_ktl
double precision pmass(nexternal)
integer get_orders_tag
include 'pmass.inc'
Expand Down Expand Up @@ -944,6 +947,14 @@ subroutine compute_soft_collinear_counter_term(replace_MC_subt)
$ amp_split_wgtpsch_p(iamp)*f_pdfsch_p+
$ amp_split_wgtpsch_l(iamp)*f_pdfsch_l)/g22
wgt3=-amp_split_wgtdegrem_muF(iamp)*f_dsc(4)/g22
c ISR with resonances: add back the integral over xi of the
c difference between the BW-reweighted and the original terms (f_dsc(1)
c and f_dsc(4) contain the factor r_c). f_isrbw_* are zero otherwise
wgt1=wgt1+((amp_split_wgtdegrem_xi(iamp)
$ +amp_split_wgtpsch_p(iamp))*f_isrbw_kt
$ +(amp_split_wgtdegrem_lxi(iamp)
$ +amp_split_wgtpsch_l(iamp))*f_isrbw_ktl)/g22
wgt3=wgt3+amp_split_wgtdegrem_muF(iamp)*f_isrbw_kt/g22
else
wgt3=0d0
endif
Expand Down Expand Up @@ -1707,6 +1718,8 @@ subroutine include_multichannel_enhance(imode)
$ ,f_sc_MC_S,f_sc_MC_H,f_MC_S,f_MC_H
double precision f_pdfsch_d,f_pdfsch_p,f_pdfsch_l
common/factor_pdfsch/f_pdfsch_d,f_pdfsch_p,f_pdfsch_l
double precision f_isrbw_kt,f_isrbw_ktl
common/factor_isrbw/f_isrbw_kt,f_isrbw_ktl
integer igranny,iaunt
logical granny_chain(-nexternal:nexternal),granny_is_res
& ,granny_chain_real_final(-nexternal:nexternal)
Expand Down Expand Up @@ -1836,6 +1849,8 @@ subroutine include_multichannel_enhance(imode)
f_pdfsch_d= f_pdfsch_d *enhance
f_pdfsch_p= f_pdfsch_p *enhance
f_pdfsch_l= f_pdfsch_l *enhance
f_isrbw_kt= f_isrbw_kt *enhance
f_isrbw_ktl= f_isrbw_ktl *enhance
endif

return
Expand Down Expand Up @@ -1886,8 +1901,22 @@ subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)
common/factor_pdfsch/f_pdfsch_d,f_pdfsch_p,f_pdfsch_l
logical use_evpr
common /to_use_evpr/use_evpr
! treatment of s-channel resonances with ISR (see isr_bw_factors)
double precision f_isrbw_kt,f_isrbw_ktl
common/factor_isrbw/f_isrbw_kt,f_isrbw_ktl
double precision sqrtshat_cnt(-2:2),shat_cnt(-2:2)
common/parton_cms_cnt/sqrtshat_cnt,shat_cnt
logical isrbw,isr_bw_active
external isr_bw_active
double precision xm_s,r_s,kt_s,ktl_s,xm_c,r_c,kt_c,ktl_c
double precision pmass(nexternal)
include 'pmass.inc'
f_isrbw_kt=0d0
f_isrbw_ktl=0d0
r_c=1d0
kt_c=0d0
ktl_c=0d0
xm_c=1d0

c f_* multiplication factors for real-emission, soft counter, ... etc.
prefact=xinorm_ev/xi_i_fks_ev/(1-y_ij_fks_ev)
Expand Down Expand Up @@ -1927,7 +1956,21 @@ subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)
prefact_cnt_ssc=xinorm_ev/min(xiimax_ev,xiScut_used)*
$ log(soft_cut/min(xiimax_ev,xiScut_used))/(1
$ -y_ij_fks_ev)
f_s=(prefact+prefact_cnt_ssc)*jac_cnt(0)
c With ISR and a resonance (mapping without event projection), the
c local soft counterterm is multiplied by r_s=K((1-xi)s)/K(s) [I1 of
c the note], and its integral in xi over [0,xm_s] of (r_s-1)/xi is
c added back, distributed uniformly in xi like the log term [I2]
isrbw=isr_bw_active()
if (isrbw) then
xm_s=min(xiimax_ev,xiScut_used)
call isr_bw_factors(shat_cnt(0),xi_i_fks_ev,xm_s,r_s,kt_s
$ ,ktl_s)
prefact_cnt_ssc=prefact_cnt_ssc-xinorm_ev/xm_s*kt_s/(1
$ -y_ij_fks_ev)
else
r_s=1d0
endif
f_s=(prefact*r_s+prefact_cnt_ssc)*jac_cnt(0)
$ *fkssymmetryfactor*vegas_wgt
f_s_MC_S=prefact*jac_cnt(0)
$ *fkssymmetryfactor*vegas_wgt
Expand Down Expand Up @@ -1955,7 +1998,21 @@ subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)
$ *log(angle_cut/deltaS)/deltaS
f_dc=jac_cnt(1)*prefact_deg/(shat/(32*pi**2))
$ *fkssymmetryfactorDeg*vegas_wgt
f_sc=(prefact_c+prefact_coll+prefact_cnt_ssc_c
c Same as for the soft counterterm: all the terms evaluated at xi=0
c (soft-collinear and the soft parts of the degenerate collinear
c remnants, f_sc and f_dsc) are multiplied by r_c, and the integral of
c the difference is added back. The collinear counterterms at finite
c xi (f_c, f_dc) already have the resonance at (1-xi)*s.
if (isrbw) then
xm_c=min(xiimax_cnt(1),xiScut_used)
call isr_bw_factors(shat_cnt(2),xi_i_fks_cnt(1),xm_c,r_c
$ ,kt_c,ktl_c)
prefact_cnt_ssc_c=prefact_cnt_ssc_c-xinorm_cnt(1)/xm_c
$ *kt_c/(1-y_ij_fks_ev)
prefact_coll_c=prefact_coll_c-xinorm_cnt(1)/xm_c*kt_c
$ *log(delta_used/deltaS)/deltaS
endif
f_sc=((prefact_c+prefact_coll)*r_c+prefact_cnt_ssc_c
& +prefact_coll_c)*jac_cnt(2)
& *fkssymmetryfactorDeg*vegas_wgt
f_sc_MC_S=prefact_c*jac_cnt(2)
Expand All @@ -1970,15 +2027,24 @@ subroutine compute_prefactors_n1body(vegas_wgt,jac_ev)
& ,xiScut_used)*( log(xicut_used)**2
& -log(min(xiimax_cnt(1),xiScut_used))**2 )*1/(2.d0
& *deltaS)
f_dsc(1)=prefact_deg*jac_cnt(2)/(shat/(32*pi**2))
f_dsc(1)=prefact_deg*r_c*jac_cnt(2)/(shat/(32*pi**2))
& *fkssymmetryfactorDeg*vegas_wgt
f_dsc(2)=prefact_deg_sxi*jac_cnt(2)/(shat/(32*pi**2))
& *fkssymmetryfactorDeg*vegas_wgt
f_dsc(3)=prefact_deg_slxi*jac_cnt(2)/(shat/(32*pi**2))
& *fkssymmetryfactorDeg*vegas_wgt
f_dsc(4)=( prefact_deg+prefact_deg_sxi )*jac_cnt(2)/(shat
& /(32*pi**2))*fkssymmetryfactorDeg
f_dsc(4)=( prefact_deg*r_c+prefact_deg_sxi )*jac_cnt(2)
& /(shat/(32*pi**2))*fkssymmetryfactorDeg
& *vegas_wgt
c Integrals of (r_c-1)/xi and of (r_c-1)*log(xi)/xi, to be added back
c for the [1/xi] and [log(xi)/xi] distributions of the degenerate
c terms (see compute_soft_collinear_counter_term)
if (isrbw) then
f_isrbw_kt=xinorm_cnt(1)/xm_c*kt_c/deltaS*jac_cnt(2)
& /(shat/(32*pi**2))*fkssymmetryfactorDeg*vegas_wgt
f_isrbw_ktl=xinorm_cnt(1)/xm_c*ktl_c/deltaS*jac_cnt(2)
& /(shat/(32*pi**2))*fkssymmetryfactorDeg*vegas_wgt
endif
! prefactor for the PDF scheme: delta(xi) spread over the
! range of the soft-collinear counterterm, and the log of
! its end, which turn [1/xi] and [log(xi)/xi] into the plus
Expand Down Expand Up @@ -8412,3 +8478,154 @@ block data real_channel_job_defaults
common /c_real_channel_type/ real_channel_type
data real_channel_type /0/
end


c=======================================================================
c Treatment of s-channel resonances with initial-state radiation in
c lepton collisions, for the mapping without event projection
c (use_evpr=.false.: Bjorken x's are the same for the real emission and
c for all counterterms, and the reduced Born has s_red=(1-xi)*shat).
c
c Notation: s=shat, xi=xi_i_fks, K(z)=1/((z-M^2)^2+M^2*Gamma^2) is the
c Breit-Wigner of the resonance, whose virtuality is z=(1-xi)*s in the
c real emission and in the collinear counterterm, but z=s in all the
c counterterms evaluated at xi=0 (soft, soft-collinear, and the soft
c parts of the degenerate collinear remnants). This mismatch spoils the
c local cancellation when s or (1-xi)*s are close to M^2.
c
c Each xi=0 counterterm, which reads locally -C(xi)/xi*theta(xi<xiScut)
c (C=Born-like times possibly log(xi)), is rewritten exactly as
c -C(xi)/xi * r(xi) *theta(xi<xiScut) [I1]
c +int_0^m dxi' C(xi')/xi' * (r(xi')-1) (Born kinematics) [I2]
c with r(xi)=K((1-xi)*s)/K(s), r(0)=1, and m=min(xiimax,xiScut). The
c terms with log(xicut/m) that are already present (prefact_cnt_ssc,
c etc.) are left unchanged (they are the J2 term of the note). I2 is
c integrated analytically in xi (C(xi')=C(0) or C(0)*log(xi')), and is
c distributed uniformly in xi over [0,m], with density 1/m, on the same
c counterevent, in exactly the same way as the log(xicut/m) terms.
c The rewriting is exact for any r with r(0)=1: no factorisation of the
c Born into resonant times non-resonant parts is assumed. With r given
c by the ratio of Breit-Wigners, the term I1 and the real emission have
c the resonance at the same virtuality.
c=======================================================================

logical function isr_bw_active()
c True if the BW reweighting of the xi=0 counterterms must be applied
c for the current FKS configuration and phase-space point
implicit none
include 'nexternal.inc'
double precision isr_bwres_m,isr_bwres_w
logical isr_bwres_on
common /c_isr_bwres/isr_bwres_m,isr_bwres_w,isr_bwres_on
logical use_evpr
common /to_use_evpr/use_evpr
integer i_fks,j_fks
common/fks_indices/i_fks,j_fks
c Set to .false. to switch off the BW reweighting of the counterterms
c (the result does not depend on it, only the variance does)
logical isr_bw_rewgt
parameter (isr_bw_rewgt=.true.)
isr_bw_active = isr_bw_rewgt .and. isr_bwres_on .and.
& (.not.use_evpr) .and. j_fks.le.nincoming
return
end


subroutine isr_bw_factors(s,xi,xm,r,kt,ktl)
c Given s=shat, xi and the upper limit xm of the counterterm range,
c returns
c r = K((1-xi)*s)/K(s)
c kt = int_0^xm dx/x (K((1-x)*s)-K(s)) / K(s)
c ktl = int_0^xm dx log(x)/x (K((1-x)*s)-K(s)) / K(s)
c with K(z)=1/((z-M^2)^2+(M*Gamma)^2). Use
c K(z) = Im[1/(z-c)]/a, c=M^2+i*a, a=M*Gamma
c and
c int_0^m dx/x [1/(s(1-x)-c)-1/(s-c)] = -log(1-m/b)/(s-c)
c int_0^m dx log(x)/x [...] = -(log(m)*log(1-m/b)+Li2(m/b))/(s-c)
c with b=(s-c)/s, 1-m/b=(s(1-m)-c)/(s-c).
implicit none
double precision s,xi,xm,r,kt,ktl
double precision isr_bwres_m,isr_bwres_w
logical isr_bwres_on
common /c_isr_bwres/isr_bwres_m,isr_bwres_w,isr_bwres_on
double precision m2,a,ks_inv,z
double complex c,smc,lg,zz
double complex isr_cdilog
external isr_cdilog
m2=isr_bwres_m**2
a=isr_bwres_m*isr_bwres_w
ks_inv=(s-m2)**2+a**2
z=(1d0-xi)*s
r=ks_inv/((z-m2)**2+a**2)
kt=0d0
ktl=0d0
if (xm.le.0d0) return
c=dcmplx(m2,a)
smc=s-c
c log(1-m/b), computed as a difference of logs: both arguments have
c imaginary part -a<0, hence the principal branches are consistent
lg=log(s*(1d0-xm)-c)-log(smc)
kt=dimag(-lg/smc)/a*ks_inv
zz=xm*s/smc
ktl=dimag(-(log(xm)*lg+isr_cdilog(zz))/smc)/a*ks_inv
return
end


double complex function isr_cdilog(z)
c Complex dilogarithm Li2(z), principal branch (cut on [1,inf)).
c Maps z into |w|<=1, Re(w)<=1/2 and uses the Bernoulli series in
c u=-log(1-w).
implicit none
double complex z,w,u,u2,sum,term,res,lz
double precision pi2o6,b(0:18)
integer k,isgn
logical inv
parameter (pi2o6=1.6449340668482264365d0)
c Bernoulli numbers B_{2k}/(2k+1)! (k=1..), with B_1 handled apart
data b/1d0,
& 2.7777777777777777778d-2, -2.7777777777777777778d-4,
& 4.7241118669690098262d-6, -9.1857730746619635510d-8,
& 1.8978869988971000733d-9, -4.0647616451442255268d-11,
& 8.9216910204564525552d-13,-1.9939295860721075687d-14,
& 4.5189800296199181917d-16,-1.0356517612181247014d-17,
& 2.3952186210261867457d-19,-5.5817858743250093363d-21,
& 1.3091507554183212858d-22,-3.0874198024267402932d-24,
& 7.3159756527022034203d-26,-1.7408456572340007410d-27,
& 4.1576356446138997196d-29,-9.9621484882846221031d-31/
if (z.eq.(0d0,0d0)) then
isr_cdilog=(0d0,0d0)
return
endif
if (z.eq.(1d0,0d0)) then
isr_cdilog=dcmplx(pi2o6,0d0)
return
endif
res=(0d0,0d0)
isgn=1
w=z
c |z|>1: Li2(z) = -Li2(1/z) - pi^2/6 - 1/2 log^2(-z)
inv=abs(w).gt.1d0
if (inv) then
res=-pi2o6-0.5d0*log(-w)**2
isgn=-1
w=1d0/w
endif
c Re(w)>1/2: Li2(w) = -Li2(1-w) + pi^2/6 - log(w)*log(1-w)
if (dble(w).gt.0.5d0) then
lz=log(w)*log(1d0-w)
res=res+isgn*(pi2o6-lz)
isgn=-isgn
w=1d0-w
endif
u=-log(1d0-w)
u2=u*u
sum=u-0.25d0*u2
term=u
do k=1,18
term=term*u2
sum=sum+b(k)*term
enddo
isr_cdilog=res+isgn*sum
return
end
64 changes: 62 additions & 2 deletions Template/NLO/SubProcesses/genps_fks_radiation.f
Original file line number Diff line number Diff line change
Expand Up @@ -1886,6 +1886,17 @@ subroutine generate_momenta_initial_noevpr(icountevts,i_fks,j_fks,xbjrk_born,tau
integer j,idir
double precision yijdir,costh_i_fks,cosphi_i_fks,sinphi_i_fks,encmso2,E_i_fks,sinth_i_fks,xpifksred(0:3),xi_i_fks
double complex resAoR0
c resonance (see generate_ee_tau_y) and importance sampling of xi
c towards (1-xi)*shat=M^2
double precision isr_bwres_m,isr_bwres_w
logical isr_bwres_on
common /c_isr_bwres/isr_bwres_m,isr_bwres_w,isr_bwres_on
logical bwxi
double precision m2r,awr,qlo,qhi,thlo,thhi,q2,gbw,uu
c fraction of the points for which xi is sampled according to the BW
c (set to 0 to recover the original sampling of xi)
double precision frac_bw_xi
parameter (frac_bw_xi=0.5d0)
c external
c
c parameters
Expand Down Expand Up @@ -1962,16 +1973,53 @@ subroutine generate_momenta_initial_noevpr(icountevts,i_fks,j_fks,xbjrk_born,tau
xiimax=1-tau_born_lower_bound/xbjrk_born(1)/xbjrk_born(2)
xinorm=xiimax
c
c If the Born system is an s-channel resonance, the real emission has
c the resonance at (1-xi)*shat=M^2, i.e. at xi=1-M^2/shat, with a
c width of order M*Gamma/shat. With probability frac_bw_xi, xi is
c generated according to the BW in q2=(1-xi)*shat, otherwise as
c usual (xi_i_hat=x^2). The jacobian is that of the one-sample
c multi-channel, so it is a function of xi_i_hat only (and of the
c Born variables), and it is the same for the event and all
c counterevents. When the resonance cannot be reached, the original
c sampling is used. Not used with the native (MC) mapping, which
c relies on the standard xi sampling.
bwxi=.false.
if (isr_bwres_on .and. (.not.softtest) .and. (.not.colltest)
& .and. (.not.native_mapping)) then
m2r=isr_bwres_m**2
awr=isr_bwres_m*isr_bwres_w
qlo=shat_born*(1d0-xiimax)
qhi=shat_born*(1d0-sstiny*xiimax)
bwxi= qlo.lt.m2r .and. m2r.lt.qhi
if (bwxi) then
thlo=atan((qlo-m2r)/awr)
thhi=atan((qhi-m2r)/awr)
endif
endif
c
c Define xi_i_fks
c
if( (icountevts.eq.-100.or.abs(icountevts).eq.1) .and.
& ((.not.colltest) .or.
& (colltest.and.xi_i_fks_fix.eq.-2.d0)) .and.
& (.not.softtest) )then
if(icountevts.eq.-100)then
if (bwxi) then
if (x(1).lt.frac_bw_xi) then
c importance sampling towards the resonance
q2=m2r+awr*tan(thlo+(thhi-thlo)*x(1)/frac_bw_xi)
xi_i_hat=(1d0-q2/shat_born)/xiimax
xi_i_hat=min(max(xi_i_hat,sstiny),1d0)
else
c importance sampling towards soft singularity
uu=(x(1)-frac_bw_xi)/(1d0-frac_bw_xi)
xi_i_hat=sstiny+(1-sstiny)*uu**2
endif
else
c importance sampling towards soft singularity
c insert here further importance sampling towards xi_i_hat->0
xi_i_hat=sstiny+(1-sstiny)*x(1)**2
xi_i_hat=sstiny+(1-sstiny)*x(1)**2
endif
endif
c in the case of counter events, xi_i_hat is an input to this function
xi_i_fks=xi_i_hat*xiimax
Expand Down Expand Up @@ -2002,7 +2050,19 @@ subroutine generate_momenta_initial_noevpr(icountevts,i_fks,j_fks,xbjrk_born,tau
endif
c remove the following if no importance sampling towards soft
c singularity is performed when integrating over xi_i_hat
xjac=xjac*2d0*x(1)
if (bwxi) then
c 1/density of the multi-channel, normalised such that it reduces to
c 2*x(1) for frac_bw_xi=0. gbw is the density of the BW channel in
c xi_i_hat (normalised to one in [sstiny,1]), 1/(2*uu*(1-sstiny)) the
c one of the soft channel
uu=sqrt(max(0d0,(xi_i_hat-sstiny)/(1d0-sstiny)))
q2=shat_born*(1d0-xi_i_hat*xiimax)
gbw=shat_born*xiimax*awr/((q2-m2r)**2+awr**2)/(thhi-thlo)
xjac=xjac*2d0*uu/(2d0*uu*(1d0-sstiny)*frac_bw_xi*gbw
& +(1d0-frac_bw_xi))
else
xjac=xjac*2d0*x(1)
endif

c
c Update the variables here.
Expand Down
Loading
Loading