subroutine scaleset_HTttbar4(p,mu0) c--- subroutine to calculate dynamic scale equal to c--- partonic HT (i.e. scalar sum of top qaurk and anti-top quark, whether or not they pass cuts) implicit none include 'constants.f' include 'npart.f' integer j double precision p(mxpart,4),mu0,pt double precision ptop(4),ptbr(4),MTtop,MTtbr do j=1,4 ptop(j)=p(3,j)+p(4,j)+p(5,j) ptbr(j)=p(5,j)+p(6,j)+p(7,j) enddo MTtop=dsqrt(max(ptop(4)**2-ptop(3)**2,0.01)) MTtbr=dsqrt(max(ptbr(4)**2-ptbr(3)**2,0.01)) mu0=(MTtop+MTtbr)/4.0d0 return end