]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/gdraw/gdarc.F
Moving to static AliL3Transform.
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gdarc.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:19  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.25  by  S.Giani
11 *-- Author :
12       SUBROUTINE GDARC(R,Z0,PHI1,PHI2)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *       Draw an arc, from PHI1 to PHI2,                          *
17 C.    *       of the circle of radius R centered on Z-axis,            *
18 C.    *       at a distance of Z0 from the origin,                     *
19 C.    *       on a plane parallel to X-Y plane                         *
20 C.    *                                                                *
21 C.    *    ==>Called by : GDRAWS                                       *
22 C.    *       Authors : A.McPherson, P.Zanarini   *********            *
23 C.    *                                                                *
24 C.    ******************************************************************
25 C.
26 #include "geant321/gconsp.inc"
27 #include "geant321/gcdraw.inc"
28       DIMENSION X(3,45),U(45),V(45)
29 C.
30 C.    ------------------------------------------------------------------
31 C.
32       PHIMIN=PHI1
33       PHIMAX=PHI2
34 C
35       NP=1
36       PH=PHIMIN*DEGRAD
37       X(1,1)=R*COS(PH)
38       X(2,1)=R*SIN(PH)
39       X(3,1)=Z0
40 C
41       IF(ABS(PHIMAX-PHIMIN).LE.9.) GO TO 20
42 C
43       I1=PHIMIN/9.0+2
44       I2=PHIMAX/9.0+1
45       NAS=I2-I1+1
46       IF(NAS.LE.0) NAS=NAS+40
47       IC=I1
48 C
49       DO 10 IAS=1,NAS
50          IF(IC.GT.40) IC=IC-40
51          NP=NP+1
52          ICC=IC
53          IF (ICC.LE.0) ICC=40+ICC
54          X(1,NP)=R*GCOS(ICC)
55          X(2,NP)=R*GSIN(ICC)
56          X(3,NP)=Z0
57          IC=IC+1
58    10 CONTINUE
59 C
60    20 CONTINUE
61 C
62       PH=PHIMAX*DEGRAD
63       NP=NP+1
64       X(1,NP)=R*COS(PH)
65       X(2,NP)=R*SIN(PH)
66       X(3,NP)=Z0
67 C
68       CALL GDFR3D(X,NP,U,V)
69 C
70 CM             Short circuit in case of GMR
71 C
72       IF ( IGMR .EQ. 0 ) CALL GDRAWV(U,V,NP)
73 CM
74       END