This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gscan / gscani.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:36  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.31  by  S.Giani
11 *-- Author :
12       SUBROUTINE GSCANI
13 *
14 ************************************************************************
15 *             Generates Kinematics for the SCAN utility                *
16 *                                                                      *
17 *          ==>Called by : <USER>,GUKINE                                *
18 *             Author    R.Brun  *********                              *
19 ************************************************************************
20 *
21 #include "geant321/gcbank.inc"
22 #include "geant321/gcscal.inc"
23 #include "geant321/gcscan.inc"
24 *
25 *     -----------------------------------------------------------------
26 *
27       IF(NPHI.LE.0)NPHI=1
28       IF(IPHI1.LE.0)IPHI1=1
29       IF(IPHI1.GT.NPHI)IPHI1=NPHI
30       IF(IPHIL.LT.IPHI1)IPHIL=IPHI1
31       IF(IPHIL.GT.NPHI)IPHIL=NPHI
32       TETMIN = MAX(TETMID(MODTET), TETMIN)
33       TETMAX = MIN(TETMAD(MODTET), TETMAX)
34       IF(TETMIN.GT.TETMAX)THEN
35          TETMIN = TETMID(MODTET)
36          TETMAX = TETMAD(MODTET)
37       ENDIF
38 *             Create top LSCAN bank
39 *
40       IF(LSCAN.NE.0)THEN
41          CALL MZDROP(IXCONS,LSCAN,' ')
42       ENDIF
43       CALL MZFORM('SCAN','10I 10F -H'      ,IOSCAN)
44       NL=NPHI
45       CALL MZBOOK(IXCONS,LSCAN,LSCAN,1,'SCAN',NL,NL,52,IOSCAN,0)
46       IQ(LSCAN+1)=NPHI
47       IQ(LSCAN+2)=NTETA
48       IQ(LSCAN+3)=MODTET
49       IQ(LSCAN+4)=NSLIST
50       IQ(LSCAN+5)=NSLMAX
51       Q (LSCAN+11)=PHIMIN
52       Q (LSCAN+12)=PHIMAX
53       Q (LSCAN+13)=TETMIN
54       Q (LSCAN+14)=TETMAX
55       Q (LSCAN+15)=VSCAN(1)
56       Q (LSCAN+16)=VSCAN(2)
57       Q (LSCAN+17)=VSCAN(3)
58       Q (LSCAN+18)=FACTX0
59       Q (LSCAN+19)=FACTL
60       Q (LSCAN+20)=FACTR
61       DO 10 I=1,NSLIST
62          IQ(LSCAN+20+I)=ISLIST(I)
63    10 CONTINUE
64       END