diff -Naur POWHEG-hvq/b-lhc/powheg.input POWHEG-hvq-new/b-lhc/powheg.input --- POWHEG-hvq/b-lhc/powheg.input 2007-06-15 12:34:40.000000000 +0200 +++ POWHEG-hvq-new/b-lhc/powheg.input 2009-05-14 15:04:16.000000000 +0200 @@ -1,3 +1,9 @@ +!randomseed 352345 ! uncomment to set the random seed to a value of your choice. + ! It generates the call RM48IN(352345,0,0) (see the RM48 manual). + ! THIS MAY ONLY AFFECTS THE GENERATION OF POWHEG EVENTS! + ! If POWHEG is interfaced to a shower MC, refer to the shower MC + ! documentation to set its seed. + !Heavy flavour production parameters maxev 100000 ! number of events to be generated diff -Naur POWHEG-hvq/b-tev/powheg.input POWHEG-hvq-new/b-tev/powheg.input --- POWHEG-hvq/b-tev/powheg.input 2007-06-15 12:34:40.000000000 +0200 +++ POWHEG-hvq-new/b-tev/powheg.input 2009-05-14 15:04:16.000000000 +0200 @@ -1,3 +1,9 @@ +!randomseed 352345 ! uncomment to set the random seed to a value of your choice. + ! It generates the call RM48IN(352345,0,0) (see the RM48 manual). + ! THIS MAY ONLY AFFECTS THE GENERATION OF POWHEG EVENTS! + ! If POWHEG is interfaced to a shower MC, refer to the shower MC + ! documentation to set its seed. + !Heavy flavour production parameters maxev 100000 ! number of events to be generated diff -Naur POWHEG-hvq/c-lhc/powheg.input POWHEG-hvq-new/c-lhc/powheg.input --- POWHEG-hvq/c-lhc/powheg.input 2007-06-15 12:34:40.000000000 +0200 +++ POWHEG-hvq-new/c-lhc/powheg.input 2009-05-14 15:04:16.000000000 +0200 @@ -1,3 +1,9 @@ +!randomseed 352345 ! uncomment to set the random seed to a value of your choice. + ! It generates the call RM48IN(352345,0,0) (see the RM48 manual). + ! THIS MAY ONLY AFFECTS THE GENERATION OF POWHEG EVENTS! + ! If POWHEG is interfaced to a shower MC, refer to the shower MC + ! documentation to set its seed. + !Heavy flavour production parameters maxev 100000 ! number of events to be generated diff -Naur POWHEG-hvq/c-tev/powheg.input POWHEG-hvq-new/c-tev/powheg.input --- POWHEG-hvq/c-tev/powheg.input 2007-06-15 12:34:40.000000000 +0200 +++ POWHEG-hvq-new/c-tev/powheg.input 2009-05-14 15:04:16.000000000 +0200 @@ -1,3 +1,9 @@ +!randomseed 352345 ! uncomment to set the random seed to a value of your choice. + ! It generates the call RM48IN(352345,0,0) (see the RM48 manual). + ! THIS MAY ONLY AFFECTS THE GENERATION OF POWHEG EVENTS! + ! If POWHEG is interfaced to a shower MC, refer to the shower MC + ! documentation to set its seed. + !Heavy flavour production parameters maxev 100000 ! number of events to be generated diff -Naur POWHEG-hvq/POWHEG-hvq.f POWHEG-hvq-new/POWHEG-hvq.f --- POWHEG-hvq/POWHEG-hvq.f 2009-05-15 10:16:19.000000000 +0200 +++ POWHEG-hvq-new/POWHEG-hvq.f 2009-05-15 10:10:58.000000000 +0200 @@ -600,7 +600,7 @@ s=m2qq/x cth2=cos(th2) call - # invar(xm2,s,x,y,cth1,cth2,'bi',t,u,q1q,q2q,q1c,q2c,w1,w2,w1h,w2h) + # invar(xm2,s,x,y,cth1,th2,'bi',t,u,q1q,q2q,q1c,q2c,w1,w2,w1h,w2h) x1=x1b*sqrt((s+t)/(s+u)/x) x2=x2b*sqrt((s+u)/(s+t)/x) if(x1.gt.1.or.x2.gt.1) then @@ -961,6 +961,7 @@ c ID of beam particles 1 and 2 (pdg convention) c proton: c + call resetrandom c ih1=powheginput('ih1') ih2=powheginput('ih2') @@ -2051,11 +2052,18 @@ # - log(kt2max/pt2)) + xlr elseif(iupper.eq.1) then if(pt2.lt.m2qq) then - pt2solve=cunorm*pi/b0/2*( - # (log(q2/xlam2c)*log(log(m2qq/xlam2c)/log(pt2/xlam2c)) + if(m2qq.lt.kt2max) then + pt2solve=cunorm*pi/b0/2*( + # (log(2*m2qq/xlam2c)*log(log(m2qq/xlam2c)/log(pt2/xlam2c)) # - log(m2qq/pt2)) + # log(2d0)*log(log(kt2max/xlam2c)/log(m2qq/xlam2c))) # + xlr + else + pt2solve=cunorm*pi/b0/2*( + # (log(2*m2qq/xlam2c)*log(log(kt2max/xlam2c)/log(pt2/xlam2c)) + # - log(kt2max/pt2)) ) + # + xlr + endif else pt2solve=cunorm*pi/b0/2*(log(2d0) # *log(log(kt2max/xlam2c)/log(pt2/xlam2c))) @@ -2130,8 +2138,8 @@ call dzero(-1d0,1d0,y,err,1d-8,1000000,dfxmin) c this call sets xmin tmp=dfxmin(y,0) -c see D.6 in ZZ - kt2max=m2qq/(4*xmin)*(1-xmin)**2*(1-y**2) +c see Notes/kt2max.pdf + kt2max = m2qq*(1-x2b**2)*(1-x1b**2)/(x1b+x2b)**2 if(kt2max.lt.ptminsq) then t=0 goto 3 @@ -2419,12 +2427,12 @@ include 'fixvar-hvq.h' real * 8 m2qq,yqq,ro,cth1 common/vvars/m2qq,yqq,ro,cth1 - real * 8 s,t,u,cth2,q1q,q2q,q1c,q2c,w1,w2,w1h,w2h + real * 8 s,t,u,xth2,q1q,q2q,q1c,q2c,w1,w2,w1h,w2h x=1 y=0 - cth2=0 + xth2=0 s=m2qq - call invar(xm2,s,x,y,cth1,cth2,'bi',t,u, + call invar(xm2,s,x,y,cth1,xth2,'bi',t,u, # q1q,q2q,q1c,q2c,w1,w2,w1h,w2h) end @@ -2438,10 +2446,9 @@ include 'fixvar-hvq.h' real * 8 m2qq,yqq,ro,cth1 common/vvars/m2qq,yqq,ro,cth1 - real * 8 s,t,u,cth2,q1q,q2q,q1c,q2c,w1,w2,w1h,w2h + real * 8 s,t,u,q1q,q2q,q1c,q2c,w1,w2,w1h,w2h s=m2qq/x - cth2=cos(th2) - call invar(xm2,s,x,y,cth1,cth2,'bi',t,u, + call invar(xm2,s,x,y,cth1,th2,'bi',t,u, # q1q,q2q,q1c,q2c,w1,w2,w1h,w2h) end @@ -2610,7 +2617,7 @@ else c protect against zero error! c ans=(ans/err+vtot/etot)/(1/err+1/etot) - ans=(ans*etot+vtot*err)/(err+etot) + ans=(ans*etot**2+vtot*err**2)/(err**2+etot**2) if(err.ne.0.and.etot.ne.0) then err=1/sqrt(1/err**2+1/etot**2) else @@ -6454,7 +6461,7 @@ C End total cross section package C subroutine invar - #(xm2,s,x,y,cth1,cth2,str,tk,uk,q1q,q2q,q1c,q2c,w1,w2,w1h,w2h) + #(xm2,s,x,y,cth1,th2,str,tk,uk,q1q,q2q,q1c,q2c,w1,w2,w1h,w2h) c-------------------------------------------------------------------- c Dati s, le variabili x e y e i coseni degli angoli th1 e th2 c (cth1,cht2) INVAR calcola tk,uk,q1q,q2q,q1c,q2c,w1,w2. @@ -6487,13 +6494,15 @@ c Gli impulsi traversi vengono messi nel COMMON/PERPEN/, c e le rapidita' nel centro di massa in COMMON/YCMVAR/. implicit none - real * 8 xm2,s,x,y,cth1,cth2,tk,uk,q1q,q2q,q1c,q2c, + real * 8 xm2,s,x,y,cth1,th2,tk,uk,q1q,q2q,q1c,q2c, # w1,w2,w1h,w2h character * 2 str include 'invar-hvq.h' - real * 8 s2,drs2,p10,p20,k0,k10,k20,bx,sth1,aaa,aap,aam,cpsi, - # spsi,cpsi2,spsi2,cpsi1,spsi1,xktsq,xkt1sq,xkt2sq,xx,aa,bb,cc + real * 8 s2,drs2,p10,p20,k0,k10,k20,bx,sth1,aaa,aap,aam,cpsi,cth2, + 1 sth2,spsi,cpsi2,spsi2,cpsi1,spsi1,xktsq,xkt1sq,xkt2sq,xx,aa,bb,cc c + cth2=cos(th2) + sth2=sin(th2) tk = -s/2*(1-x)*(1-y) uk = -s/2*(1-x)*(1+y) s2 = tk+uk+s @@ -6594,6 +6603,11 @@ pq2(2) = bb pp(1) = -2*cc pp(2) = -aa-bb + if(sth2.lt.0) then + pq1(1)=-pq1(1) + pq2(1)=-pq2(1) + pp(1)=-pp(1) + endif endif end subroutine increasecnt(string) @@ -8064,17 +8078,19 @@ # sin2cabibbo,ebr,hbr,r,totbr equivalence (probs(1,1),prbs(1)) integer ini,ii(5),j,k,imode + logical semileptonic real * 8 random,powheginput external random,powheginput data ini/0/ c pdg id's of 1st and 2nd W+ decay products for e,mu,tau,up and charm decays (ignoring CKM) data ((iwp(j,k),k=1,2),j=1,5)/-11,12, -13,14, -15,16, -1,2, -3,4/ - save ini,probs,iwp,mass,sin2cabibbo + save ini,probs,iwp,mass,sin2cabibbo,semileptonic if(ini.eq.2) return if(ini.eq.0) then ini=1 c on first run look for decay mode in powheginput imode=powheginput('topdecaymode') + semileptonic=powheginput('#semileptonic').eq.1 if(imode.eq.0) then ini=2 return @@ -8106,7 +8122,12 @@ if(j.eq.k.and.ii(k).lt.2) then probs(j,k)=0 else - probs(j,k)=pr(j)*pr(k) + if(semileptonic.and.( (j.gt.3.and.k.gt.3) + 1 .or.(j.le.3.and.k.le.3) ) ) then + probs(j,k)=0 + else + probs(j,k)=pr(j)*pr(k) + endif endif enddo enddo @@ -8114,6 +8135,16 @@ prbs(j)=prbs(j)+prbs(j-1) enddo totbr=prbs(25) + if(totbr.eq.0) then + write(*,*) 'pickwdecays: the input parameters are such' + write(*,*) 'that no decays are possible:' + write(*,*) 'topdecaymode=',nint(powheginput('topdecaymode')) + if(semileptonic) then + write(*,*) 'semileptonic=1' + endif + write(*,*) ' Halting execution' + stop + endif mass(11)=powheginput('tdec/emass') mass(13)=powheginput('tdec/mumass') mass(15)=powheginput('tdec/taumass') @@ -16367,6 +16398,17 @@ call rm48(random,1) end + subroutine resetrandom + real * 8 powheginput + integer seed + seed=powheginput("#randomseed") + if(seed.lt.0) then + call RM48IN(54217137,0,0) + else + call RM48IN(seed,0,0) + endif + end + subroutine rn3vec(vec,r) c Generates a 3d vector in unit sphere implicit none diff -Naur POWHEG-hvq/tdec-lhc/powheg.input POWHEG-hvq-new/tdec-lhc/powheg.input --- POWHEG-hvq/tdec-lhc/powheg.input 2007-06-15 12:34:40.000000000 +0200 +++ POWHEG-hvq-new/tdec-lhc/powheg.input 2009-05-14 15:04:16.000000000 +0200 @@ -1,3 +1,9 @@ +!randomseed 352345 ! uncomment to set the random seed to a value of your choice. + ! It generates the call RM48IN(352345,0,0) (see the RM48 manual). + ! THIS MAY ONLY AFFECTS THE GENERATION OF POWHEG EVENTS! + ! If POWHEG is interfaced to a shower MC, refer to the shower MC + ! documentation to set its seed. + !Heavy flavour production parameters maxev 100000 ! number of events to be generated @@ -18,12 +24,17 @@ ! For example ! 22222 All decays (up to 2 units of everything) ! 20000 both top go into b l nu (with the appropriate signs) - ! 10011 one top goes into electron (or positron), the other into (any) hadrons + ! 10011 one top goes into electron (or positron), the other into (any) hadrons, + ! or one top goes into charm, the other into up ! 00022 Fully hadronic ! 00002 Fully hadronic with two charms ! 00011 Fully hadronic with a single charm ! 00012 Fully hadronic with at least one charm +!semileptonic 1 ! uncomment if you want to filter out only semileptonic events. For example, + ! with topdecaymode 10011 and semileptonic 1 you get only events with one top going + ! to an electron or positron, and the other into any hadron. + ! Parameters for the generation of spin correlations in t tbar decays tdec/wmass 80.4 ! W mass for top decay tdec/wwidth 2.141 diff -Naur POWHEG-hvq/tdec-tev/powheg.input POWHEG-hvq-new/tdec-tev/powheg.input --- POWHEG-hvq/tdec-tev/powheg.input 2007-06-15 12:34:40.000000000 +0200 +++ POWHEG-hvq-new/tdec-tev/powheg.input 2009-05-14 15:04:16.000000000 +0200 @@ -1,3 +1,9 @@ +!randomseed 352345 ! uncomment to set the random seed to a value of your choice. + ! It generates the call RM48IN(352345,0,0) (see the RM48 manual). + ! THIS MAY ONLY AFFECTS THE GENERATION OF POWHEG EVENTS! + ! If POWHEG is interfaced to a shower MC, refer to the shower MC + ! documentation to set its seed. + !Heavy flavour production parameters maxev 100000 ! number of events to be generated @@ -18,12 +24,17 @@ ! For example ! 22222 All decays (up to 2 units of everything) ! 20000 both top go into b l nu (with the appropriate signs) - ! 10011 one top goes into electron (or positron), the other into (any) hadrons + ! 10011 one top goes into electron (or positron), the other into (any) hadrons, + ! or one top goes into charm, the other into up ! 00022 Fully hadronic ! 00002 Fully hadronic with two charms ! 00011 Fully hadronic with a single charm ! 00012 Fully hadronic with at least one charm +!semileptonic 1 ! uncomment if you want to filter out only semileptonic events. For example, + ! with topdecaymode 10011 and semileptonic 1 you get only events with one top going + ! to an electron or positron, and the other into any hadron. + ! Parameters for the generation of spin correlations in t tbar decays tdec/wmass 80.4 ! W mass for top decay tdec/wwidth 2.141 diff -Naur POWHEG-hvq/t-lhc/powheg.input POWHEG-hvq-new/t-lhc/powheg.input --- POWHEG-hvq/t-lhc/powheg.input 2007-06-15 12:34:40.000000000 +0200 +++ POWHEG-hvq-new/t-lhc/powheg.input 2009-05-14 15:04:16.000000000 +0200 @@ -1,3 +1,9 @@ +!randomseed 352345 ! uncomment to set the random seed to a value of your choice. + ! It generates the call RM48IN(352345,0,0) (see the RM48 manual). + ! THIS MAY ONLY AFFECTS THE GENERATION OF POWHEG EVENTS! + ! If POWHEG is interfaced to a shower MC, refer to the shower MC + ! documentation to set its seed. + !Heavy flavour production parameters maxev 100000 ! number of events to be generated diff -Naur POWHEG-hvq/t-tev/powheg.input POWHEG-hvq-new/t-tev/powheg.input --- POWHEG-hvq/t-tev/powheg.input 2007-06-15 12:34:40.000000000 +0200 +++ POWHEG-hvq-new/t-tev/powheg.input 2009-05-14 15:04:16.000000000 +0200 @@ -1,3 +1,9 @@ +!randomseed 352345 ! uncomment to set the random seed to a value of your choice. + ! It generates the call RM48IN(352345,0,0) (see the RM48 manual). + ! THIS MAY ONLY AFFECTS THE GENERATION OF POWHEG EVENTS! + ! If POWHEG is interfaced to a shower MC, refer to the shower MC + ! documentation to set its seed. + !Heavy flavour production parameters maxev 100000 ! number of events to be generated