This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gscan / gscanu.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:36  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.31  by  S.Giani
11 *-- Author :
12       SUBROUTINE GSCANU
13 *
14 ************************************************************************
15 *             SCAN utility called at the end of each tracking step     *
16 *             INWVOL is different from 0 when the track has reached    *
17 *                    a volume boundary                                 *
18 *                                                                      *
19 *          ==>Called by : <USER>,GUSTEP                                *
20 *             Author    R.Brun  *********                              *
21 ************************************************************************
22 *
23 #include "geant321/gcbank.inc"
24 #include "geant321/gcscal.inc"
25 #include "geant321/gcmate.inc"
26 #include "geant321/gctrak.inc"
27 #include "geant321/gckine.inc"
28 #include "geant321/gcvolu.inc"
29 #include "geant321/gcscan.inc"
30       SAVE ISLOLD,IDOLD,IDNUM
31 *
32 *     -----------------------------------------------------------------
33 *
34       IF(SLENG.LE.0.)THEN
35          SX0=0.
36          SABS=0.
37          ITETA=ITRA
38          ISLOLD=0
39          IDOLD=0
40       ENDIF
41       SX0=SX0+STEP/RADL
42       SABS=SABS+STEP/ABSL
43       IF(INWVOL.NE.2)THEN
44 *
45 *            Compute new ISL,IDET
46          ISL=0
47          INEW=0
48          DO 20 IL=NLEVEL,1,-1
49             DO 10 I=1,NSLIST
50                IF(NAMES(IL).EQ.ISLIST(I))THEN
51                   ISL=I
52                   IDNUM=NUMBER(IL)
53                   IF(IL.EQ.NLEVEL.OR.IDNUM.NE.IDOLD)INEW=1
54                   GO TO 30
55                ENDIF
56   10        CONTINUE
57   20     CONTINUE
58   30     CONTINUE
59          IF(INWVOL.EQ.3.OR.ISL.NE.ISLOLD.OR.INEW.NE.0)THEN
60             CALL GSSCAN(ISLOLD,IDOLD)
61             IDOLD=IDNUM
62             ISLOLD=ISL
63          ENDIF
64       ENDIF
65 *
66       CALL GDEBUG
67 *
68       END