1 #include "isajet/pilot.h"
2 SUBROUTINE ISAEVT(I,OK,DONE)
3 C----------------------------------------------------------------------
5 C- Purpose and Methods :
8 C- Generate one ISAJET event and return.
10 C- "ISALEP" generation:
11 C- Generate a TWOJET or DRELLYAN hard scattering. Then make NEVOLVE
12 C- evolutions and NHADRON fragmentations, rejecting events which
13 C- fail the desired cuts using logical functions
14 C- REJJET() tests the QCD evolution stage, e.g. by requiring
16 C- REJFRG() tests the fragmentation stage, e.g. by requiring
18 C- These functions default to .FALSE.; i.e. they do not reject any
19 C- events. Note that one hard scattering can give more than one
20 C- event. You must choose NEVOLVE and NHADRON carefully.
21 C- IEVT = event number. This is incremented NEVOLVE * NHADRON
22 C- times for each hard scattering; i.e. it counts the
23 C- number of potential events.
24 C- IEVGEN = counter for generated events.
25 C- NEVENT = maximum value of hard scatterings. Hence the limit
26 C- for IEVT is NEVENT * NEVOLVE * NHADRON.
27 C- The cross section SIGF contains an extra factor of
28 C- 1 / (NEVOLVE * NHADRON)
29 C- to produce the correct final cross section using the weight
33 C- I = number used to control printout
35 C- OK = logical flag for good event.
36 C- DONE = logical flag for job completion.
38 C- Created 3-FEB-1988 Serban D. Protopopescu
39 C- Updated 17-APR-1990 Serban D. Protopopescu (add ISALEP option)
40 C- 22-JUL-1992: Move PRTEVT and GETTOT statements to end so they
41 C- work for TWOJET and DRELLYAN with NOVOLVE. (FEP)
43 C----------------------------------------------------------------------
44 #if defined(CERNLIB_IMPNONE)
47 #include "isajet/itapes.inc"
48 #include "isajet/idrun.inc"
49 #include "isajet/keys.inc"
50 #include "isajet/nodcay.inc"
51 #include "isajet/primar.inc"
52 #include "isajet/jetpar.inc"
53 #include "isajet/partcl.inc"
54 #include "isajet/jetset.inc"
55 #include "isajet/isloop.inc"
57 LOGICAL REJJET,REJFRG,OK,DONE
58 INTEGER NPASS,I,NLIMIT
63 NLIMIT=NEVENT*NEVOLV*NFRGMN
65 C Twojet or Drell-Yan events. The evolution and fragmentation
66 C loops are done with GO TO statements so that we can exit
67 C the loops with a good event and reenter them.
69 IF(KEYS(1).OR.KEYS(3)) THEN
71 IF(IEVOL.EQ.1.AND.IFRG.EQ.1) THEN
73 IF(NPASS.GT.NTRIES) THEN
74 WRITE(ITLIS,1001) NTRIES
75 1001 FORMAT(//' IT IS TAKING MORE THAN',I6,' TRIES TO MAKE',
76 $ ' AN EVENT IN ISAEVT.'/
77 $ ' CHECK YOUR LIMITS OR OR INCREASE NTRIES.'/
78 $ ' CHECK NEVOLVE, NHADRON, AND YOUR REJJET AND REJFRG',
79 $ ' FUNCTIONS IF ANY.'/
84 C Generate appropriate hard scattering
93 IEVT=IEVT+NEVOLV*NFRGMN
96 C Continue if in fragmentation loop
97 IF(IFRG.NE.1) GO TO 120
98 C Begin multiple evolution loop
116 C Begin multiple fragmentation loop
121 IF(REJFRG()) GO TO 121
125 IF(IFRG.GT.NFRGMN) IFRG=1
128 IF(IEVOL.GT.NEVOLV) IEVOL=1
131 C Fragmentation failed - increment counter and loop
133 IF(IFRG.GT.NFRGMN) THEN
138 C End of multiple fragmentation loop
139 C Evolution failed - increment counter and loop
141 IF(IEVOL.GT.NEVOLV) THEN
151 ELSE IF(KEYS(2)) THEN
157 IF(.NOT.NOHADR) CALL FRGMNT
162 ELSE IF(KEYS(4)) THEN
166 IF(.NOT.(NOEVOL.OR.NOHADR)) CALL MBIAS
170 ELSE IF(KEYS(5)) THEN
176 IF(NJSET.LT.0) GO TO 9999
185 ELSE IF(KEYS(6)) THEN
193 IF(NJSET.LT.0) GO TO 9999
202 ELSE IF(KEYS(7)) THEN
209 IF(NJSET.LT.0) GOTO 9999
224 IF(NJSET.LT.0) GOTO 9999
231 C TCOLOR events, e.g. techni-rho
240 IF(NJSET.LT.0) GOTO 9999
249 ELSE IF(KEYS(10)) THEN
257 IF(NJSET.LT.0) GO TO 9999
266 ELSE IF(KEYS(11)) THEN
273 IF(NJSET.LT.0) GO TO 9999
282 ELSEIF(KEYS(12)) THEN
289 IF(NJSET.LT.0) GO TO 9999
300 IF(NJSET.LT.0) OK=.FALSE.
301 IF(IEVT.GT.NLIMIT) THEN
304 ELSEIF(IEVT.EQ.NLIMIT) THEN