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