This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / ggeom / gvdlim.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:57  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.31  by  S.Giani
11 *-- Author :
12       SUBROUTINE GVDLIM(JVO,IN,IAXIS,CLOW,CHIGH,IERR)
13 C.
14 C.    **********************************************************
15 C.    *                                                        *
16 C.    *    ROUTINE TO FIND THE COORDINATE LIMITS ALONG AXIS    *
17 C.    *    IAXIS FOR THE INTH CONTENT OF THE VOLUME POINTED    *
18 C.    *    TO BY JVO. THE LIMITS ARE RETURNED AS CLOW AND      *
19 C.    *    CHIGH.IF THEY CANNOT BE FOUND THEN IERR IS SET TO 1.*
20 C.    *                                                        *
21 C.    *    ==>Called by : GGCLOS                               *
22 C.    *         Author  S.Giani  *********                     *
23 C.    *                                                        *
24 C.    **********************************************************
25 C.
26 #include "geant321/gcbank.inc"
27       DIMENSION PAR(50),ATT(20)
28 C.
29 C.         -----------------------------------------
30 C.
31       JIN=LQ(JVO-IN)
32       IROT=Q(JIN+4)
33       IVOT=Q(JIN+2)
34       JVOT=LQ(JVOLUM-IVOT)
35       ISH=Q(JVOT+2)
36 C
37       CALL GFIPAR(JVOT,JIN,IN,NPAR,NATT,PAR,ATT)
38 C
39 C              X,Y OR Z COORDINATES.
40 C
41       IF(IAXIS.GT.3) GO TO 20
42 C
43       CALL GVDCAR(IAXIS,ISH,IROT,PAR,CL,CH,IERR)
44       IF(IERR.NE.0) GO TO 999
45 C
46       CLOW=CL+Q(JIN+IAXIS+4)
47       CHIGH=CH+Q(JIN+IAXIS+4)
48 C
49       GO TO 999
50 C
51    20 CONTINUE
52       IF(IAXIS.GT.5) GO TO 30
53 C
54 C          R COORDINATES.
55 C
56       CALL GVDRAD(IAXIS,ISH,IROT,Q(JIN+5),PAR,CLOW, CHIGH,IERR)
57  
58 C
59       GO TO 999
60 C
61    30 CONTINUE
62 C
63 C          PHI OR THETA COORDINATES.
64 C
65       IF(IAXIS.EQ.6) CALL GVDPHI(ISH,IROT,Q(JIN+5), PAR,CLOW,CHIGH,
66      +IERR)
67 C
68       IF(IAXIS.EQ.7) CALL GVDTHE(ISH,IROT,Q(JIN+5), PAR,CLOW,CHIGH,
69      +IERR)
70 C
71   999 CONTINUE
72       END