Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gkine / gfvert.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.2 1998/02/10 16:04:20 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 GFVERT(NVTX,V,NTBEAM,NTTARG,TOFG,UBUF,NWBUF)
16C.
17C. ******************************************************************
18C. * *
19C * Retrieves the parameter of a vertex bank *
20C * Vertex is generated from tracks NTBEAM NTTARG *
21C * NVTX is the new vertex number *
22C. * *
23C. * Input: *
24C. * NVTX new vertex number (=0 in case of error). *
25C. * *
26C. * Output: *
27C. * VERT array of (x,y,z) position of the vertex *
28C. * NTBEAM beam track number origin of the vertex *
29C. * =0 if none exists *
30C. * NTTARG target track number origin of the vertex *
31C. * TOFG time of flight when the vertex was created
32C. * UBUF user array of NUBUF floating point numbers *
33C. * NUBUF *
34C. * *
35C. * ==>Called by : <USER> *
36C. * Authors F.Carminati ********* *
37C. * *
38C. ******************************************************************
39C.
40#include "geant321/gcbank.inc"
41#include "geant321/gcunit.inc"
42#include "geant321/gcnum.inc"
43 DIMENSION V(3),UBUF(1)
44C.
45C. ------------------------------------------------------------------
46C.
47 IF (JVERTX.EQ.0.OR.NVERTX.LE.0)THEN
48 WRITE(CHMAIL,10000)
49 CALL GMAIL(0,0)
50 GOTO 999
51 ENDIF
52 IF(NVTX.GT.NVERTX) THEN
53 WRITE(CHMAIL,10100)NVERTX
54 CALL GMAIL(0,0)
55 GOTO 999
56 ENDIF
57 JV=LQ(JVERTX-NVTX)
58 IF(JV.LE.0) THEN
59 WRITE(CHMAIL,10100)NVERTX
60 CALL GMAIL(0,0)
61 GOTO 999
62 ENDIF
63 DO 10 I=1,3
64 V(I) = Q(JV + I)
65 10 CONTINUE
66 TOFG = Q(JV + 4)
67 NTBEAM = Q(JV + 5)
68 NTTARG = Q(JV + 6)
69*
70 NWBUF=0
71 IF(IQ(JV-2).GE.1) THEN
72 JUV=LQ(JV-1)
73 IF(JUV.GT.0) THEN
74 NWBUF=IQ(JUV-1)
75 DO 20 IBUF=1,NWBUF
76 UBUF(IBUF)=Q(JUV+IBUF)
77 20 CONTINUE
78 ENDIF
79 ENDIF
80*
8110000 FORMAT(' **** GFVERT: No vertex stored in memory')
8210100 FORMAT(' **** GFVERT: Vertex ',I10,' does not exist')
83 999 END