This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / ggeom / gnotr1.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:53  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.29  by  S.Giani
11 *-- Author :
12       SUBROUTINE GNOTR1(P)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *    Routine to extend  the  user supplied parameters P  to      *
17 C.    *    internal parameters   for the  trapezoidal shape TRAP       *
18 C.    *                                                                *
19 C.    *         Called by : GSPOSP, GSVOLU , GGDPAR                    *
20 C.    *         Author  R.Nierhaus  *********                          *
21 C.    *                                                                *
22 C.    ******************************************************************
23 C.
24 *     GNOTR1  computes the coordinates for the 8 vertices
25 *     X(8), Y(8) and Z(8).
26 *     Then GNOTR2 is called for each of the six boundary surfaces.
27 *
28       DIMENSION P(35),X(8),Y(8),Z(8)
29 *
30       HZ  =P(1)
31       SX  =P(2)
32       SY  =P(3)
33       HY1 =P(4)
34       HX11=P(5)
35       HX12=P(6)
36       SX1 =P(7)
37       HY2 =P(8)
38       HX21=P(9)
39       HX22=P(10)
40       SX2 =P(11)
41       IF (HY1.LT.1.E-6) HY1=1.E-6
42       IF (HX11.LT.1.E-6) HX11=1.E-6
43       IF (HX12.LT.1.E-6) HX12=1.E-6
44       IF (HY2.LT.1.E-6) HY2=1.E-6
45       IF (HX21.LT.1.E-6) HX21=1.E-6
46       IF (HX22.LT.1.E-6) HX22=1.E-6
47       X(1)=-HZ*SX-HY1*SX1-HX11
48       X(2)=-HZ*SX-HY1*SX1+HX11
49       X(3)=-HZ*SX+HY1*SX1-HX12
50       X(4)=-HZ*SX+HY1*SX1+HX12
51       X(5)=+HZ*SX-HY2*SX2-HX21
52       X(6)=+HZ*SX-HY2*SX2+HX21
53       X(7)=+HZ*SX+HY2*SX2-HX22
54       X(8)=+HZ*SX+HY2*SX2+HX22
55       Y(1)=-HZ*SY-HY1
56       Y(2)=-HZ*SY-HY1
57       Y(3)=-HZ*SY+HY1
58       Y(4)=-HZ*SY+HY1
59       Y(5)=+HZ*SY-HY2
60       Y(6)=+HZ*SY-HY2
61       Y(7)=+HZ*SY+HY2
62       Y(8)=+HZ*SY+HY2
63       Z(1)=-HZ
64       Z(2)=-HZ
65       Z(3)=-HZ
66       Z(4)=-HZ
67       Z(5)=+HZ
68       Z(6)=+HZ
69       Z(7)=+HZ
70       Z(8)=+HZ
71       CALL GNOTR2(X,Y,Z,1,2,4,3,P(12))
72       CALL GNOTR2(X,Y,Z,5,7,8,6,P(16))
73       CALL GNOTR2(X,Y,Z,1,5,6,2,P(20))
74       CALL GNOTR2(X,Y,Z,3,4,8,7,P(24))
75       CALL GNOTR2(X,Y,Z,1,3,7,5,P(28))
76       CALL GNOTR2(X,Y,Z,2,6,8,4,P(32))
77 *
78       END