Geant4_10
gustep.F
Go to the documentation of this file.
1 
2  SUBROUTINE gustep
3 *
4 * User routine called at the end of each tracking step
5 *
6 #include "geant321/gcflag.inc"
7 #include "geant321/gckine.inc"
8 #include "geant321/gcking.inc"
9 #include "geant321/gctrak.inc"
10 #include "celoss.inc"
11 *
12 *
13 * *** Debug event and store tracks for drawing
14  IF (idebug.NE.0) CALL gpcxyz
15  IF (idebug.NE.0) CALL gpgkin
16  IF ((iswit(1).EQ.1).AND.(charge.NE.0.)) CALL gsxyz
17  IF (iswit(1).EQ.2) CALL gsxyz
18 *
19 * *** Something generated ?
20  IF(ngkine.GT.0) CALL gsking(0)
21 *
22 * *** Energy deposited
23  etot = etot + destep
24 *
25 * *** count number of steps
26  IF (charge.NE.0.) THEN
27  nstep1 = nstep1 + 1
28  nstrk1 = nstrk1 + 1
29  ELSE
30  nstep0 = nstep0 + 1
31  nstrk0 = nstrk0 + 1
32  ENDIF
33 *
34 * *** count nb of invoked processes
35  IF (nmec.GT.0) THEN
36  DO im = 1,nmec
37  iproc = lmec(im)
38  IF (iproc.EQ.21) iproc = 12
39  IF (iproc.LE.12) nbcall(iproc) = nbcall(iproc)+1
40  ENDDO
41  ENDIF
42 *
43 * *** step size of primary particle
44  IF ((itra.EQ.1).AND.(istak.EQ.0)) CALL hfill(3,step*10,0.,1.)
45 *
46  END
subroutine gustep
Definition: gustep.F:2