2 DOUBLE PRECISION FUNCTION JMKERN( NDIM, V )
3 C -------------------------------------------------------------
4 C Purpose: The kernel for the integral over PT,X1,X2
5 C The integral goes from pt2tmp -> ptmax2.
6 C When using this function in the initialsation,
7 C pt2tmp == ptmin**2 and ptmax2 = the kinematic limit.
8 C Otherwise they are the pt2 of the current
9 C hard scatter and of the last, respectively.
10 C -------------------------------------------------------------
12 #include "herwig65.inc"
17 DOUBLE PRECISION PT2, PT2TMP, PTMAX2, V(NDIM)
18 DOUBLE PRECISION JMXS1, FAC1, FAC2
19 DOUBLE PRECISION FAC3, LX1, LX2, LPT2
20 DOUBLE PRECISION X1,X2,JMS
22 c Beam-beam centre-of-mass energy.
23 JMS = 2.D0*(EBEAM1*EBEAM2+PBEAM1*PBEAM2)
25 IF (FN_TYPE.NE.101) THEN
26 WRITE(JMOUT,8902) 'JMKERN:THIS SHOULD NEVER HAPPEN!'
31 C (This value is never used
32 C - it is always greater than the kinematic limit)
33 PTMAX2 = JMS/4.D0 - RMASS(1)**2
35 C Define region of integration
36 FAC1 = -DLOG( 4.D0*PT2TMP/(YGAMMA*JMS) )
37 IF ( FAC1 .LE. 0.D0 ) THEN
43 write(JMOUT,8902) 'v(1),ygamma,jms,pt2tmp,fac1'
44 write(JMOUT,*) v(1),ygamma,jms,pt2tmp
48 LX1 = DLOG( 4.D0*PT2TMP/(YGAMMA*JMS)) +V(1)*FAC1
50 IF ( X1 .GE. ONE ) THEN
55 FAC2 = -DLOG( 4.D0*PT2TMP/(YGAMMA*X1*JMS) )
56 IF ( FAC2 .LE. 0.D0 ) THEN
61 LX2 = DLOG( 4.D0*PT2TMP/(YGAMMA*JMS*X1) ) + V(2)*FAC2
63 IF ( X2 .GE. 1.D0 ) THEN
69 PTMAX2 = MIN(JMS*YGAMMA*X1*X2/4.D0,PTMAX2)
70 FAC3 = DLOG( PTMAX2 ) - DLOG( PT2TMP )
71 IF ( FAC3 .LE. SMALL ) THEN
76 LPT2 = DLOG( PT2TMP ) + V(3)*FAC3
79 write(JMOUT,8902) 'lx1,x1,lx2,x2,pt2'
80 write(JMOUT,*) lx1,x1,lx2,x2,pt2
82 JMKERN = X1*X2*PT2*FAC1*FAC2*FAC3*
83 & PHAD * JMXS1(X1,X2,PT2,0,0)
86 write(JMOUT,8902) 'JMKERN,X1,X2,PT2,FAC1,FAC2,FAC3,PHAD'
87 write(JMOUT,*) JMKERN,X1,X2,PT2,FAC1,FAC2,FAC3,PHAD
90 IF ( JMKERN .LE. 0.D-30 ) JMKERN = 0.D0
94 WRITE(JMOUT,8902) 'JMKERN ERROR'
101 WRITE(JMOUT,8901) JMKERN,X1,X2,PT2
104 & (1X,'XS=',F12.6,' X1=',F10.8,' X2=',F10.8,' PT2=',F10.3)