]> git.uio.no Git - u/mrichter/AliRoot.git/blame - GEANT321/geocad/gtrase.F
Hole() method needed by TRD to find out wheter frame has holes.
[u/mrichter/AliRoot.git] / GEANT321 / geocad / gtrase.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
d43b40e2 5* Revision 1.1.1.1 1999/05/18 15:55:17 fca
6* AliRoot sources
7*
fe4da5cc 8* Revision 1.1.1.1 1995/10/24 10:20:47 cernlib
9* Geant
10*
11*
12#include "geant321/pilot.h"
13*CMZ : 3.21/02 29/03/94 15.41.32 by S.Giani
14*-- Author :
15 SUBROUTINE GTRASE(PAR)
16C-
17C- Created 12-JUN-1991 Nils Joar Hoimyr
18C- Modified 21.02.1992 Jouko Vuoskoski
19C-
20C- Calculates the coordinates of the corner points of a GEANT TRAP shape
21C- from the shape parameters. The end faces are generated by drawing
22C- connected polylines between the corner points at each Z-end of the shape.
23C- A ruled solid is then defined between the 2 faces, and written out in SET.
24C---------------------------------------------------------
25C
26#include "geant321/gcsetf.inc"
27
28C
d43b40e2 29 DIMENSION PAR(100)
fe4da5cc 30C
31 REAL P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z,P4X,P4Y,P4Z
32 REAL P5X,P5Y,P5Z,P6X,P6Y,P6Z,P7X,P7Y,P7Z,P8X,P8Y,P8Z
33C
34C----------------------------------------------------------------------
35C
36C TRAP
37C
38
39 DZ=PAR(1)
40 TX=PAR(2)
41 TY=PAR(3)
42 H1=PAR(4)
43 BL1=PAR(5)
44 TL1=PAR(6)
45 H2=PAR(8)
46 BL2=PAR(9)
47 TL2=PAR(10)
48C Parameter conv for faces..
49C FACE parameters:
50C FACE 1:
51 P1X= -BL1-DZ*SIN(TX)
52 P1Y= -H1-DZ*SIN(TY)
53 P1Z= -DZ
54C
55 P2X= BL1-DZ*SIN(TX)
56 P2Y= -H1-DZ*SIN(TY)
57 P2Z= -DZ
58C
59 P3X= TL1-DZ*SIN(TX)
60 P3Y= H1-DZ*SIN(TY)
61 P3Z= -DZ
62C
63 P4X= -TL1-DZ*SIN(TX)
64 P4Y= H1-DZ*SIN(TY)
65 P4Z= -DZ
66C Next FACE:
67 P5X= -BL2+DZ*SIN(TX)
68 P5Y= -H2+DZ*SIN(TY)
69 P5Z= DZ
70C
71 P6X= BL2+DZ*SIN(TX)
72 P6Y= -H2+DZ*SIN(TY)
73 P6Z= DZ
74C
75 P7X= TL2+DZ*SIN(TX)
76 P7Y= H2+DZ*SIN(TY)
77 P7Z= DZ
78C
79 P8X= -TL2+DZ*SIN(TX)
80 P8Y= H2+DZ*SIN(TY)
81 P8Z= DZ
82C DESCRIBED BY 2 FACES represented by polylines
83C connected by the 4 corners of the shape.
84C *WRITE SET@103,F1#3,3,2,P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z,P4X,P4Y,P4Z
85C *WRITE SET@103,F2#3,3,2,P5X,P5Y,P5Z,P6X,P6Y,P6Z,P7X,P7Y,P7Z,P8X,P8Y,P8Z
86C
87C *WRITE SET @100,N#145,!F1,!F2,
88C-------------------------------------------------------------------
89C
90 WRITE(BLKSTR,10000)N1,P1X,P1Y,P1Z,P2X,P2Y,P2Z, P3X,P3Y,P3Z,P4X,
91 +P4Y,P4Z
92 CALL GJWRIT
93 N1=N1+1
94 WRITE(BLKSTR,10000)N1,P5X,P5Y,P5Z,P6X,P6Y,P6Z, P7X,P7Y,P7Z,P8X,
95 +P8Y,P8Z
96 CALL GJWRIT
97 N1=N1+1
98 WRITE(BLKSTR,10100)N1,N1-2,N1-1
99 CALL GJWRIT
100C
10110000 FORMAT('@103,',I10,',:5,2#3,3,2,',G14.7,',',G14.7,','
102 + ,G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7,','
103 + ,G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7)
10410100 FORMAT('@100,',I10,',:5,2#145,!',I10,',!',I10)
105C
106 END