]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ISAJET/code/isajet.F
Bug in V0A fixed (Guillermo)
[u/mrichter/AliRoot.git] / ISAJET / code / isajet.F
CommitLineData
0795afa3 1#include "isajet/pilot.h"
2 SUBROUTINE ISAJET(JTDKY,JTEVT,JTCOM,JTLIS)
3C
4C Main subroutine for ISAJET, a Monte Carlo event generator
5C for P P , AP P , and E+ E- interactions at high energy.
6C
7C Frank E. Paige and Serban D. Protopopescu
8C Brookhaven National Laboratory
9C Upton, New York, USA
10C
11C JTDKY = +/- unit number for decay table file.
12C If it is negative, decay table is not printed.
13C JTEVT = +/- unit number for output event file.
14C If it is negative, only stable particles are
15C written on it.
16C JTCOM = unit number for command file.
17C JTLIS = unit number for listing.
18C
19C Instead of calling this subroutine the user may wish to
20C control the program himself using:
21C ISAINI overall initialization
22C ISABEG run initialization
23C ISAEVT generation of one event
24C ISAEND run termination
25C ISAWBG initial record writing
26C ISAWEV event record writing
27C ISAWND end record writing
28C
29#if defined(CERNLIB_IMPNONE)
30 IMPLICIT NONE
31#endif
32#include "isajet/itapes.inc"
33#include "isajet/idrun.inc"
34#include "isajet/primar.inc"
35#include "isajet/isloop.inc"
36C
37 INTEGER JTDKY,JTEVT,JTCOM,JTLIS,IFL,ILOOP
38 LOGICAL OK,DONE
39 SAVE ILOOP
40C
41C Initialize ISAJET
42C
43 CALL ISAINI(JTDKY,JTEVT,JTCOM,JTLIS)
44C
45C Read instructions; terminate for STOP command or error.
46C
47 1 IFL=0
48 CALL ISABEG(IFL)
49 IF(IFL.NE.0) RETURN
50C Write begin-run record
51 CALL ISAWBG
52C
53C Event loop
54C
55 ILOOP=0
56 101 CONTINUE
57 ILOOP=ILOOP+1
58C Generate one event - discard if .NOT.OK
59 CALL ISAEVT(ILOOP,OK,DONE)
60C Write event record
61 IF(OK) CALL ISAWEV
62 IF(.NOT.DONE) GO TO 101
63C
64C Calculate cross section and luminosity
65C
66 CALL ISAEND
67C Write end-of-run record
68 CALL ISAWND
69 GO TO 1
70C
71C Entry point for error recovery.
72C CALL RSTART will continue generation on next event.
73C
74 ENTRY RSTART
75 IF(IEVT.EQ.0) RETURN
76 IF(IEVT.GE.NEVENT*NEVOLV*NFRGMN) GO TO 1
77 GO TO 101
78 END