]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/geocad/gtrdse.F
Makefile added to PDF8
[u/mrichter/AliRoot.git] / GEANT321 / geocad / gtrdse.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:47  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.32  by  S.Giani
11 *-- Author :
12       SUBROUTINE GTRDSE(PAR,ISHAPE)
13 C-
14 C----------------------------------------------------------
15 C-  Calculates the coordinates of the corner points of a GEANT  shape
16 C-  from the shape parameters.   The end faces are generated by drawing
17 C-  connected polylines between the corner points at each Z-end of the shape.
18 C-  A ruled solid is then defined between the 2 faces, and written out in SET.
19 C----------------------------------------------------------
20 C
21 #include "geant321/gcsetf.inc"
22  
23 C
24       DIMENSION PAR(50)
25       REAL P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z,P4X,P4Y,P4Z
26       REAL P5X,P5Y,P5Z,P6X,P6Y,P6Z,P7X,P7Y,P7Z,P8X,P8Y,P8Z
27 C
28 C
29 C----------------------------------------------------------------------
30 C             TRD1&2
31 C
32  
33       DX1=PAR(1)
34       DX2=PAR(2)
35       DY1=PAR(3)
36       IF (ISHAPE .EQ. 2) THEN
37          DY2=DY1
38          DZ= PAR(4)
39       ELSE
40          DY2=PAR(4)
41          DZ=PAR(5)
42       ENDIF
43 C       FACE parameters:
44 C       FACE 1:
45       P1X= -DX1
46       P1Y= -DY1
47       P1Z= -DZ
48 C
49       P2X= DX1
50       P2Y= -DY1
51       P2Z= -DZ
52 C
53       P3X= DX1
54       P3Y= DY1
55       P3Z= -DZ
56 C
57       P4X= -DX1
58       P4Y= DY1
59       P4Z= -DZ
60 C       Next FACE:
61       P5X= -DX2
62       P5Y= -DY2
63       P5Z= DZ
64 C
65       P6X= DX2
66       P6Y= -DY2
67       P6Z= DZ
68 C
69       P7X= DX2
70       P7Y= DY2
71       P7Z= DZ
72 C
73       P8X= -DX2
74       P8Y= DY2
75       P8Z= DZ
76 C       DESCRIBED BY 2 FACES represented by polylines
77 C       connected by the 4 corners of the shape.
78 C *WRITE SET@103,F1,:5,2#3,3,2,P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z,P4X,P4Y,P4Z
79 C *WRITE SET@103,F2,:5,2#3,3,2,P5X,P5Y,P5Z,P6X,P6Y,P6Z,P7X,P7Y,P7Z,P8X,P8Y,P8Z
80 C *WRITE SET @100,N,:5,2,:9,'MATNAM'#145,!F1,!F2,
81 C-------------------------------------------------------------------
82 C
83       WRITE(BLKSTR,10000)N1,P1X,P1Y,P1Z,P2X,P2Y,P2Z, P3X,P3Y,P3Z,P4X,
84      +P4Y,P4Z
85       CALL GJWRIT
86       N1=N1+1
87       WRITE(BLKSTR,10000)N1,P5X,P5Y,P5Z,P6X,P6Y,P6Z, P7X,P7Y,P7Z,P8X,
88      +P8Y,P8Z
89       CALL GJWRIT
90       N1=N1+1
91       WRITE(BLKSTR,10100)N1,N1-2,N1-1
92       CALL GJWRIT
93 C
94 10000   FORMAT('@103,',I10,',:5,2#3,3,2,',G14.7,',',G14.7,','
95      +  ,G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7,','
96      +  ,G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7)
97 10100   FORMAT('@100,',I10,',:5,2#145,!',I10,',!',I10)
98 C
99       END