This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gtrak / gpjxyz.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:42  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.23  by  S.Giani
11 *-- Author :
12       SUBROUTINE GPJXYZ(IT)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *       Prints JXYZ bank for track number IT                     *
17 C.    *       If IT=0 Prints all track banks                           *
18 C.    *                                                                *
19 C.    *    ==>Called by : <USER>, GPRINT                               *
20 C.    *       Author    R.Brun  *********                              *
21 C.    *                                                                *
22 C.    ******************************************************************
23 C.
24 #include "geant321/gcbank.inc"
25 #include "geant321/gcnum.inc"
26 #include "geant321/gcunit.inc"
27 C.
28 C.    ------------------------------------------------------------------
29 C.
30       I1=1
31       I2=NTRACK
32       IF(IT.NE.0)I1=IT
33       IF(IT.NE.0)I2=IT
34       IF(I2.GT.NTRACK)GO TO 99
35       IF(I1.LT.1)GO TO 99
36       IF(JKINE.LE.0)GO TO 99
37       IF(JXYZ.LE.0)GO TO 99
38 C
39       DO 90 I=I1,I2
40          JK=LQ(JKINE-I)
41          IF(JK.NE.0)THEN
42             IPART=Q(JK+5)
43             JPA=LQ(JPART-IPART)
44             WRITE(CHMAIL,1000)I,(IQ(JPA+L),L=1,4)
45             CALL GMAIL(0,0)
46             WRITE(CHMAIL,1100)
47             CALL GMAIL(0,0)
48 C
49             JX=LQ(JXYZ-I)
50             IPOINT=JX+3
51             IP=0
52   10        NPOINT=Q(IPOINT)
53             IF(NPOINT.GT.0)THEN
54                IPT=Q(IPOINT+1)
55                DO 20 K=1,NPOINT
56                   KP=IPOINT+3*K-2
57                   IP=IP+1
58                   WRITE(CHMAIL,2000)IP,IPT,(Q(KP+L),L=1,3)
59                   CALL GMAIL(0,0)
60   20           CONTINUE
61 C
62                IPOINT=IPOINT+3.*Q(IPOINT)+2.
63                GO TO 10
64             ENDIF
65          ENDIF
66   90  CONTINUE
67 C
68  1000 FORMAT(3X,'JXYZ',3X,'TRACK NUMBER',I5,2X,4A4)
69  1100 FORMAT(6X,'POINT',6X,'PART',6X,'X',10X,'Y',10X,'Z')
70  2000 FORMAT(4X,I6,6X,I4,2X,F10.4,1X,F10.4,1X,F10.4)
71 C
72   99  RETURN
73       END