This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gdlumi.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:30  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.28  by  S.Giani
11 *-- Author :
12       SUBROUTINE GDLUMI(LINCOL,APROSC)
13 *
14 ******************************************************************
15 *                                                                *
16 * RAY-TRACING                                                    *
17 * Function: Recieve light intensity and angle with surface       *
18 *           Compute colour shading for the surface               *
19 *                                                                *
20 * I/O parameters:                                                *
21 * LINCOL = colour code                                           *
22 * APROSC = inclination between light rays and surface            *
23 *                                                                *
24 * Author: S. Giani 1992                                          *
25 *                                                                *
26 ******************************************************************
27 *
28 #include "geant321/gcbank.inc"
29 #include "geant321/gcunit.inc"
30 #include "geant321/gcdraw.inc"
31 #include "geant321/gcflag.inc"
32 *
33 #include "geant321/gctrak.inc"
34 #include "geant321/gcpixe.inc"
35 #include "geant321/gcrayt.inc"
36  
37       DATA IAAA /456789/
38       SAVE IAAA
39 *
40       IF(LINCOL.EQ.2)THEN
41          LINCOL=16
42       ELSEIF(LINCOL.EQ.3)THEN
43          LINCOL=66
44       ELSEIF(LINCOL.EQ.4)THEN
45          LINCOL=116
46       ELSEIF(LINCOL.EQ.5)THEN
47          LINCOL=41
48       ELSEIF(LINCOL.EQ.6)THEN
49          LINCOL=141
50       ELSEIF(LINCOL.EQ.7)THEN
51          LINCOL=91
52       ELSE
53          print *,'Warning, color not supported'
54          GOTO 998
55       ENDIF
56 *
57       LINSAV=LINCOL
58       IAAA=MOD(IAAA*1237,1000000)+1
59       if(iaaa.lt.1.or.iaaa.gt.1000000)print *,'iaaa<0'
60       QIAAA=IAAA
61 *
62       SMIN=-0.001
63       SMAX=0.04
64       DO 1 I=1,25
65        IF(APROSC.GT.SMIN.AND.APROSC.LE.SMAX)THEN
66         QD=QIAAA/1000000.
67         QCD=QD*(SMAX-SMIN)
68         IF((APROSC-SMIN).GT.QCD)THEN
69            LINCOL=LINCOL+I
70         ELSE
71            IF(I.GT.1)THEN
72             LINCOL=LINCOL+I-1
73            ELSE
74             LINCOL=LINCOL+I
75            ENDIF
76         ENDIF
77          GOTO 998
78        ELSE
79          SMIN=SMAX
80          SMAX=SMAX+0.04
81        ENDIF
82  1    CONTINUE
83 *
84       print *,aprosc,'=aprosc'
85 *
86  998  CONTINUE
87 *      CALL ISFACI(LINCOL)
88 *      CALL ISPLCI(LINCOL)
89 **      IF(ISWIT(9).NE.54321)CALL ISPMCI(LINCOL)
90        CALL ISPMCI(LINCOL)
91        ICOLOR=LINCOL
92 *
93  999  END
94