This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gkine / gfkine.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.2  1998/02/10 16:04:18  japost
6 *   Comments are correctly redistributed.
7 *
8 * Revision 1.1.1.1  1995/10/24 10:21:18  cernlib
9 * Geant
10 *
11 *
12 #include "geant321/pilot.h"
13 *CMZ :  3.21/02 29/03/94  15.41.21  by  S.Giani
14 *-- Author :
15       SUBROUTINE GFKINE(ITRA,VERT,PVERT,IPART,NVERT,UBUF,NWBUF)
16 *
17 ************************************************************************
18 *                                                                      *
19 *           Retrieves Vertex and Track parameters                      *
20 *           -------------------------------------                      *
21 *                                                                      *
22 *  Retrieves parameters for a track with a long lifetime.              *
23 *                                                                      *
24 *  Input:                                                              *
25 *    ITRA      track number for which parameters are requested         *
26 *                                                                      *
27 *  Output:                                                             *
28 *    VERT      vector origin of the track                              *
29 *    PVERT     4 momentum components at the track origin               *
30 *    IPART     particle type (=0 if track ITRA does not exist)         *
31 *    NVERT     vertex number origin of the track                       *
32 *    UBUF      user words stored in GSKINE.                            *
33 *                                                                      *
34 *    ==>Called by : <USER>, GTREVE                                     *
35 *       Author    R.Brun  *********                                    *
36 *                                                                      *
37 ************************************************************************
38 *
39 #include "geant321/gcbank.inc"
40 #include "geant321/gcnum.inc"
41 #include "geant321/gctrak.inc"
42       DIMENSION VERT(3),PVERT(4),UBUF(*)
43 C.
44 C.    ------------------------------------------------------------------
45 C.
46       IPART  = 0
47       IF (JKINE.LE.0)GO TO 99
48       IF (ITRA.LE.0)GO TO 99
49       IF (ITRA.GT.NTRACK)GO TO 99
50 C
51       JK = LQ(JKINE- ITRA)
52       IF (JK.LE.0)GO TO 99
53       NV = Q(JK + 6)
54       IF (JVERTX.LE.0)GO TO 99
55       JV = LQ(JVERTX- NV)
56       IF (JV.LE.0)GO TO 99
57       DO 10 I=1,3
58   10  VERT(I) = Q(JV + I)
59 *     TOFG=Q(JV+4)
60 C
61       DO 20 I=1,4
62   20  PVERT(I) = Q(JK + I)
63       IPART = Q(JK + 5)
64       NVERT = Q(JK + 6)
65       NLINK = IQ(JK-2)
66       NWBUF  = 0
67       IF (NLINK.LE.0)GO TO 99
68       JKU = LQ(JK- 1)
69       IF (JKU.LE.0)GO TO 99
70       NWBUF = IQ(JKU-1)
71       DO 30 I=1,NWBUF
72   30  UBUF(I)=Q(JKU+I)
73 C
74   99  RETURN
75       END