From 79029866ce774ba4779dc1dfc449d6889608c57d Mon Sep 17 00:00:00 2001 From: Marco Zaro Date: Sun, 22 Nov 2026 16:15:29 +0100 Subject: [PATCH] NLO QED with ISR and s-channel resonances in lepton collisions - generate_ee_tau_y: use the mapping without event projection also in the BW channel for tau. Mixing the two real-emission mappings in a multi-channel whose weights depend on the Born tau biases the NLO result; with event projection the real-emission x's also differ from the Born ones while the lepton densities use the Born omx_ee. - xi=0 counterterms (soft, soft-collinear, soft parts of the degenerate collinear remnants, incl. the PDF-scheme [1/xi] and [log(xi)/xi] terms) reweighted by r=K((1-xi)s)/K(s), with the integral of (r-1)/xi [and (r-1)log(xi)/xi] added back analytically on the same counterevents (isr_bw_factors, isr_cdilog in fks_singular.f), also through include_multichannel_enhance. Switch: isr_bw_rewgt. - generate_momenta_initial_noevpr: importance sampling of xi towards (1-xi)*shat=M^2 (one-sample multichannel with the soft sampling). Switch: frac_bw_xi. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01R1EehUEVegap4zvqVefR6j Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01R1EehUEVegap4zvqVefR6j --- Template/NLO/SubProcesses/fks_singular.f | 227 +++++++++++++++++- .../NLO/SubProcesses/genps_fks_radiation.f | 64 ++++- .../NLO/SubProcesses/genps_fks_sampling.f | 31 ++- 3 files changed, 312 insertions(+), 10 deletions(-) diff --git a/Template/NLO/SubProcesses/fks_singular.f b/Template/NLO/SubProcesses/fks_singular.f index a161077b02..e113916177 100644 --- a/Template/NLO/SubProcesses/fks_singular.f +++ b/Template/NLO/SubProcesses/fks_singular.f @@ -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' @@ -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 @@ -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) @@ -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 @@ -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) @@ -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 @@ -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) @@ -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 @@ -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(xi1: 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 diff --git a/Template/NLO/SubProcesses/genps_fks_radiation.f b/Template/NLO/SubProcesses/genps_fks_radiation.f index aef3513867..f3e4c98137 100644 --- a/Template/NLO/SubProcesses/genps_fks_radiation.f +++ b/Template/NLO/SubProcesses/genps_fks_radiation.f @@ -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 @@ -1962,6 +1973,30 @@ 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. @@ -1969,9 +2004,22 @@ subroutine generate_momenta_initial_noevpr(icountevts,i_fks,j_fks,xbjrk_born,tau & (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 @@ -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. diff --git a/Template/NLO/SubProcesses/genps_fks_sampling.f b/Template/NLO/SubProcesses/genps_fks_sampling.f index 9c630925ab..7d2c9d351f 100644 --- a/Template/NLO/SubProcesses/genps_fks_sampling.f +++ b/Template/NLO/SubProcesses/genps_fks_sampling.f @@ -931,8 +931,13 @@ subroutine generate_tau_y_wrapper(qmass,qwidth,totmass,stot,rndx,tau_born,ycm_bo logical softtest,colltest common/sctests/softtest,colltest + 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 ndim_dummy=-1 ! this is actually not used anymore + ! will be set to true in generate_ee_tau_y if needed + isr_bwres_on=.false. if (abs(lpp(1)).ne.abs(lpp(2))) then write(*,*) 'Different beams not implemented', lpp @@ -1235,6 +1240,12 @@ subroutine generate_ee_tau_y(rnd1_in,rnd2_in,one_body,totmass,stot,nt_channel,qm common /to_random_numbers/r1,r2, x1bk, x2bk logical use_evpr common /to_use_evpr/use_evpr + ! information on the s-channel resonance which coincides with the + ! whole Born system, used for the treatment of the xi=0 + ! counterterms in fks_singular.f (see isr_bw_factors) + 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 ! copy the random numbers, as they may be rescaled ! (avoids side effects) @@ -1274,9 +1285,23 @@ subroutine generate_ee_tau_y(rnd1_in,rnd2_in,one_body,totmass,stot,nt_channel,qm stop 1 endif - ! if tau is generated accodring to a BW, then force the momentum - ! mapping with event projection - use_evpr = generate_with_bw + ! The mapping without event projection is used in both channels + ! (tau generated flat or according to the BW). Note that the two + ! channels must use the same real-emission mapping: the + ! multi-channel weights depend on the Born tau, and the real + ! emission points are associated with different Born tau's in + ! the two mappings (x1*x2 vs. x1*x2*(1-xi)), so that mixing them + ! would not sum to one over the real-emission phase space, and + ! would bias the NLO result. + ! use_evpr may be reset to .true. in generate_momenta_conf for + ! final-state j_fks + use_evpr = .false. + ! store the resonance information for the treatment of the + ! xi=0 counterterms (fks_singular.f) and for the importance + ! sampling of xi (generate_momenta_initial_noevpr) + isr_bwres_on = bw_exists + isr_bwres_m = qmass + isr_bwres_w = qwidth if(generate_with_bw) then ! here we treat the case of resonances