2 C*********************************************************************
4 SUBROUTINE LU2ENT(IP,KF1,KF2,PECM)
6 C...Purpose: to store two partons/particles in their CM frame,
7 C...with the first along the +z axis.
8 COMMON/LUJETS/N,K(4000,5),P(4000,5),V(4000,5)
9 COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
10 COMMON/LUDAT2/KCHG(500,3),PMAS(500,4),PARF(2000),VCKM(4,4)
11 SAVE /LUJETS/,/LUDAT1/,/LUDAT2/
15 IF(MSTU(12).GE.1) CALL LULIST(0)
17 IF(IPA.GT.MSTU(4)-1) CALL LUERRM(21,
18 &'(LU2ENT:) writing outside LUJETS memory')
21 IF(KC1.EQ.0.OR.KC2.EQ.0) CALL LUERRM(12,
22 &'(LU2ENT:) unknown flavour code')
24 C...Find masses. Reset K, P and V vectors.
26 IF(MSTU(10).EQ.1) PM1=P(IPA,5)
27 IF(MSTU(10).GE.2) PM1=ULMASS(KF1)
29 IF(MSTU(10).EQ.1) PM2=P(IPA+1,5)
30 IF(MSTU(10).GE.2) PM2=ULMASS(KF2)
40 KQ1=KCHG(KC1,2)*ISIGN(1,KF1)
41 KQ2=KCHG(KC2,2)*ISIGN(1,KF2)
42 IF(MSTU(19).EQ.1) THEN
45 IF(KQ1+KQ2.NE.0.AND.KQ1+KQ2.NE.4) CALL LUERRM(2,
46 & '(LU2ENT:) unphysical flavour combination')
51 C...Store partons/particles in K vectors for normal case.
54 IF(KQ1.NE.0.AND.KQ2.NE.0) K(IPA,1)=2
57 C...Store partons in K vectors for parton shower evolution.
61 K(IPA,4)=MSTU(5)*(IPA+1)
63 K(IPA+1,4)=MSTU(5)*IPA
67 C...Check kinematics and store partons/particles in P vectors.
68 IF(PECM.LE.PM1+PM2) CALL LUERRM(13,
69 &'(LU2ENT:) energy smaller than sum of masses')
70 PA=SQRT(MAX(0.,(PECM**2-PM1**2-PM2**2)**2-(2.*PM1*PM2)**2))/
73 P(IPA,4)=SQRT(PM1**2+PA**2)
76 P(IPA+1,4)=SQRT(PM2**2+PA**2)
79 C...Set N. Optionally fragment/decay.
81 IF(IP.EQ.0) CALL LUEXEC