Geant4_10
gutrak.F
Go to the documentation of this file.
1 
2  SUBROUTINE gutrak
3 *
4 * User routine to control tracking of one track
5 * Called by GTREVE
6 *
7 #include "geant321/gckine.inc"
8 #include "geant321/gctrak.inc"
9 #include "celoss.inc"
10 #include "histo.inc"
11 *
12 * *** per track initialisations
13 *
14 * *** process a track
15  CALL gtrack
16 *
17 * *** count track length of primary particle
18  if (istak.eq.0) then
19  trlen = trlen + sleng
20  trlen2 = trlen2 + sleng*sleng
21 *
22  xlen = vect(1) - vert(1)
23  xtrlen = xtrlen + xlen
24  xtrlen2 = xtrlen2 + xlen*xlen
25 *
26  nbstep = nbstep + nstep
27  nbstep2 = nbstep2 + nstep*nstep
28 *
29  stepsize = sleng/nstep
30  steplen = steplen + stepsize
31  steplen2 = steplen2 + stepsize*stepsize
32  endif
33 *
34 * *** absorbed, transmited, reflected ?
35  if (istak.eq.0) then
36  i = 1
37  if (inwvol.eq.3) then
38  i = 2
39  if (vect(4).le.0.) i = 3
40  endif
41  kcoef(i) = kcoef(i) + 1
42  endif
43 *
44 * *** histo track length
45  ih = 0
46  if (istak.eq.0) ih = 3
47  if (istak*charge.ne.0.) ih = 6
48  if ((ih.gt.0).and.(histo(ih)))
49  & call hfill(ih,sleng/histunit(ih),0.,1.)
50 *
51 * *** histo projected range of primary
52  if (istak.eq.0) then
53  ih = 5
54  if (histo(ih)) call hfill(ih,xlen/histunit(ih),0.,1.)
55  endif
56 *
57  END
Hep3Vector vect() const
subroutine gutrak
Definition: gutrak.F:3