]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | * |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.1.1.1 1995/10/24 10:21:45 cernlib | |
6 | * Geant | |
7 | * | |
8 | * | |
9 | #include "geant321/pilot.h" | |
10 | *CMZ : 3.21/03 07/10/94 18.07.13 by S.Giani | |
11 | *-- Author : | |
12 | SUBROUTINE GTREVE | |
13 | C. | |
14 | C. ****************************************************************** | |
15 | C. * * | |
16 | C. * SUBR. GTREVE * | |
17 | C. * * | |
18 | C. * Controls tracking of all particles belonging to the current * | |
19 | C. * event. * | |
20 | C. * * | |
21 | C. * Called by : GUTREV, called by GTRIG * | |
22 | C. * Authors : R.Brun, F.Bruyant * | |
23 | C. * * | |
24 | C. ****************************************************************** | |
25 | C. | |
26 | #include "geant321/gcbank.inc" | |
27 | #include "geant321/gcflag.inc" | |
28 | #include "geant321/gckine.inc" | |
29 | #include "geant321/gcnum.inc" | |
30 | #include "geant321/gcstak.inc" | |
31 | #include "geant321/gctmed.inc" | |
32 | #include "geant321/gctrak.inc" | |
33 | #include "geant321/gcunit.inc" | |
34 | #if defined(CERNLIB_USRJMP) | |
35 | #include "geant321/gcjump.inc" | |
36 | #endif | |
37 | #include "geant321/gcvdma.inc" | |
38 | REAL UBUF(2) | |
39 | EQUIVALENCE (UBUF(1),WS(1)) | |
40 | LOGICAL BTEST | |
41 | C. | |
42 | C. ------------------------------------------------------------------ | |
43 | NTMSTO = 0 | |
44 | NSTMAX = 0 | |
45 | NALIVE = 0 | |
46 | * | |
47 | NV = NVERTX | |
48 | DO 290 IV = 1,NV | |
49 | * | |
50 | * *** For each vertex in turn .. | |
51 | * | |
52 | JV = LQ(JVERTX-IV) | |
53 | NT = Q(JV+7) | |
54 | IF (NT.LE.0) GO TO 290 | |
55 | TOFG = Q(JV+4) | |
56 | SAFETY = 0. | |
57 | IF (NJTMAX.GT.0) THEN | |
58 | CALL GMEDIA (Q(JV+1), NUMED) | |
59 | IF (NUMED.EQ.0) THEN | |
60 | WRITE (CHMAIL, 1001) (Q(JV+I), I=1,3) | |
61 | CALL GMAIL (0, 0) | |
62 | GO TO 290 | |
63 | ENDIF | |
64 | CALL GLSKLT | |
65 | ENDIF | |
66 | * | |
67 | * ** Loop over tracks attached to current vertex | |
68 | * | |
69 | DO 190 IT = 1,NT | |
70 | JV = LQ(JVERTX-IV) | |
71 | ITRA = Q(JV+7+IT) | |
72 | IF (BTEST(IQ(LQ(JKINE-ITRA)),0)) GO TO 190 | |
73 | CALL GFKINE (ITRA, VERT, PVERT, IPART, IVERT, UBUF, NWBUF) | |
74 | IF (IVERT.NE.IV) THEN | |
75 | WRITE (CHMAIL, 1002) IV, IVERT | |
76 | CALL GMAIL (0, 0) | |
77 | GO TO 999 | |
78 | ENDIF | |
79 | * | |
80 | * * Store current track parameters in stack JSTAK | |
81 | * | |
82 | CALL GSSTAK (2) | |
83 | 190 CONTINUE | |
84 | * | |
85 | * ** Start tracking phase | |
86 | * | |
87 | 210 IF (NALIVE.NE.0) THEN | |
88 | NALIVE = NALIVE -1 | |
89 | * | |
90 | * * Pick-up next track in stack JSTAK, if any | |
91 | * | |
92 | IF (IQ(JSTAK+1).GT.0) THEN | |
93 | * | |
94 | * * Initialize tracking parameters | |
95 | * | |
96 | CALL GLTRAC | |
97 | IF (NUMED.EQ.0) GO TO 210 | |
98 | ELSE | |
99 | * | |
100 | * * otherwise, select next track segment from stack JTRACK | |
101 | * | |
102 | CALL GFTRAC | |
103 | * | |
104 | ENDIF | |
105 | * | |
106 | * * Resume tracking | |
107 | * | |
108 | IF(RAYTRA.EQ.1.)THEN | |
109 | #if defined(CERNLIB_HIGZ) | |
110 | CALL GDRACK | |
111 | #endif | |
112 | ELSE | |
113 | #if !defined(CERNLIB_USRJMP) | |
114 | CALL GUTRAK | |
115 | #endif | |
116 | #if defined(CERNLIB_USRJMP) | |
117 | CALL JUMPT0(JUTRAK) | |
118 | #endif | |
119 | ENDIF | |
120 | IF (IEOTRI.NE.0) GO TO 999 | |
121 | GO TO 210 | |
122 | ENDIF | |
123 | * | |
124 | 290 CONTINUE | |
125 | * | |
126 | 1001 FORMAT (' GTREVE : Vertex outside setup, XYZ=',3G12.4) | |
127 | 1002 FORMAT (' GTREVE : Abnormal track/vertex connection',2I8) | |
128 | * END GTREVE | |
129 | 999 END | |
130 |