2 C*********************************************************************
6 C...Administers the generation of a high-pT event via calls to
7 C...a number of subroutines.
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 COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
12 COMMON/PYINT1/MINT(400),VINT(400)
13 COMMON/PYINT2/ISET(200),KFPR(200,2),COEF(200,20),ICOL(40,4,2)
14 COMMON/PYINT5/NGEN(0:200,3),XSEC(0:200,3)
15 COMMON/PYUPPR/NUP,KUP(20,7),PUP(20,5),NFUP,IFUP(10,2),Q2UP(0:10)
16 SAVE /LUJETS/,/LUDAT1/,/LUDAT2/
17 SAVE /PYPARS/,/PYINT1/,/PYINT2/,/PYINT5/,/PYUPPR/
20 C...Initial values for some counters.
31 C...If variable energies: redo incoming kinematics and cross-section.
33 IF(MSTP(171).EQ.1) THEN
35 IF(MSTI(61).EQ.1) THEN
39 IF(MINT(121).GT.1) CALL PYSAVE(3,1)
43 C...Loop over number of pileup events; check space left.
44 IF(MSTP(131).LE.0) THEN
51 IF(MINT(84)+100.GE.MSTU(4)) THEN
53 & '(PYEVNT:) no more space in LUJETS for pileup events')
54 IF(MSTU(21).GE.1) GOTO 260
58 C...Generate variables of hard scattering.
62 IF(MINT(51).NE.0.OR.MSTU(24).NE.0) MSTI(52)=MSTI(52)+1
67 IF(MSTI(61).EQ.1) THEN
71 IF(MINT(51).EQ.2) RETURN
73 IF(MSTP(111).EQ.-1) GOTO 240
75 IF(ISUB.LE.90.OR.ISUB.GE.95) THEN
76 C...Hard scattering (including low-pT):
77 C...reconstruct kinematics and colour flow of hard scattering.
80 IF(MINT(51).EQ.1) GOTO 100
83 IF(ISUB.EQ.95) GOTO 130
85 C...Showering of initial state partons (optional).
88 IF(MSTP(61).GE.1.AND.MINT(47).GE.2) CALL PYSSPA(IPU1,IPU2)
90 IF(MINT(51).EQ.1) GOTO 100
92 C...Showering of final state partons (optional).
95 IF(MSTP(71).GE.1.AND.ISET(ISUB).GE.2.AND.ISET(ISUB).LE.10) THEN
98 IF(ISET(ISUB).EQ.5.OR.ISET(ISUB).EQ.6) IPU4=-3
100 IF(ISET(ISUB).EQ.2) QMAX=SQRT(PARP(71))*VINT(55)
101 CALL LUSHOW(IPU3,IPU4,QMAX)
102 ELSEIF(MSTP(71).GE.1.AND.ISET(ISUB).EQ.11.AND.NFUP.GE.1) THEN
104 IPU3=IFUP(IUP,1)+MINT(84)
105 IPU4=IFUP(IUP,2)+MINT(84)
106 QMAX=SQRT(MAX(0.,Q2UP(IUP)))
107 CALL LUSHOW(IPU3,IPU4,QMAX)
112 C...Decay of final state resonances.
113 IF(MSTP(41).GE.1.AND.ISET(ISUB).LE.10) CALL PYRESD
114 IF(MINT(51).EQ.1) GOTO 100
117 C...Multiple interactions.
118 IF(MSTP(81).GE.1.AND.MINT(50).EQ.1) CALL PYMULT(6)
121 C...Hadron remnants and primordial kT.
122 130 CALL PYREMN(IPU1,IPU2)
123 IF(MINT(51).EQ.1.AND.MINT(57).GE.1.AND.MINT(57).LE.5) GOTO 110
124 IF(MINT(51).EQ.1) GOTO 100
127 C...Diffractive and elastic scattering.
131 C...Recalculate energies from momenta and masses (if desired).
132 IF(MSTP(113).GE.1) THEN
133 DO 140 I=MINT(83)+1,N
134 IF(K(I,1).GT.0.AND.K(I,1).LE.10) P(I,4)=SQRT(P(I,1)**2+
135 & P(I,2)**2+P(I,3)**2+P(I,5)**2)
140 C...Rearrange partons along strings, check invariant mass cuts.
142 IF(MSTP(111).LE.0) MSTJ(14)=-1
143 CALL LUPREP(MINT(84)+1)
145 IF(MSTP(112).EQ.1.AND.MSTU(28).EQ.3) GOTO 100
146 IF(MSTP(125).EQ.0.OR.MSTP(125).EQ.1) THEN
147 DO 170 I=MINT(84)+1,N
148 IF(K(I,2).EQ.94) THEN
149 DO 160 I1=I+1,MIN(N,I+3)
150 IF(K(I1,3).EQ.I) THEN
151 K(I1,3)=MOD(K(I1,4)/MSTU(5),MSTU(5))
152 IF(K(I1,3).EQ.0) THEN
153 DO 150 II=MINT(84)+1,I-1
154 IF(K(II,2).EQ.K(I1,2)) THEN
155 IF(MOD(K(II,4),MSTU(5)).EQ.I1.OR.
156 & MOD(K(II,5),MSTU(5)).EQ.I1) K(I1,3)=II
159 IF(K(I+1,3).EQ.0) K(I+1,3)=K(I,3)
167 IF(MSTP(125).EQ.0) CALL LUEDIT(15)
168 IF(MSTP(125).EQ.0) MINT(4)=0
169 DO 190 I=MINT(83)+1,N
170 IF(K(I,1).EQ.11.AND.K(I,4).EQ.0.AND.K(I,5).EQ.0) THEN
172 IF(K(I1,3).EQ.I.AND.K(I,4).EQ.0) K(I,4)=I1
173 IF(K(I1,3).EQ.I) K(I,5)=I1
179 C...Introduce separators between sections in LULIST event listing.
180 IF(IPILE.EQ.1.AND.MSTP(125).LE.0) THEN
183 ELSEIF(IPILE.EQ.1) THEN
190 C...Go back to lab frame (needed for vertices, also in fragmentation).
193 C...Set nonvanishing production vertex (optional).
194 IF(MSTP(151).EQ.1) THEN
196 VTX(J)=PARP(150+J)*SQRT(-2.*LOG(MAX(1E-10,RLU(0))))*
197 & SIN(PARU(2)*RLU(0))
199 DO 220 I=MINT(83)+1,N
206 C...Perform hadronization (if desired).
207 IF(MSTP(111).GE.1) THEN
209 IF(MSTU(24).NE.0) GOTO 100
211 IF(MSTP(113).GE.1) THEN
213 IF(P(I,5).GT.0.) P(I,4)=SQRT(P(I,1)**2+
214 & P(I,2)**2+P(I,3)**2+P(I,5)**2)
217 IF(MSTP(125).EQ.0.OR.MSTP(125).EQ.1) CALL LUEDIT(14)
219 C...Store event information and calculate Monte Carlo estimates of
220 C...subprocess cross-sections.
221 240 IF(IPILE.EQ.1) CALL PYDOCU
223 C...Set counters for current pileup event and loop to next one.
225 IF(IPILE.GE.2.AND.IPILE.LE.10) MSTI(40+IPILE)=ISUB
226 IF(MSTU70.LT.10) THEN
232 IF(IPILE.LT.NPILE) CALL PYFRAM(2)
235 C...Generic information on pileup events. Reconstruct missing history.
236 IF(MSTP(131).EQ.1.AND.MSTP(133).GE.1) THEN
240 IF(MSTP(133).GE.2) PARI(93)=PARI(93)*XSEC(0,3)/VINT(131)
244 C...Transform to the desired coordinate frame.
245 260 CALL PYFRAM(MSTP(124))