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 "calor.inc"
11 #include "celoss.inc"
12 #include "histo.inc"
13 *
14  common/local1/ fnorm
15 *
16  data amm, amev /1.e-1, 1.e-3/
17 *
18  if (ievent.eq.1) fnorm = amm/(nevent*amev*binwidth(1)*histunit(1))
19 *
20 * *** Debug event and store tracks for drawing
21  IF (idebug.NE.0) CALL gpcxyz
22  IF (idebug.NE.0) CALL gpgkin
23  IF ((iswit(1).EQ.1).AND.(charge.NE.0.)) CALL gsxyz
24  IF (iswit(1).EQ.2) CALL gsxyz
25 *
26 * *** Something generated ?
27  IF(ngkine.GT.0) CALL gsking(0)
28 *
29  if (destep.le.0.) return
30 *
31 * *** Energy deposited per event
32  eevent = eevent + destep
33 *
34 * *** histo edep longitudinal profile
35  xlen = 0.5*sizex + vect(1)
36  ih = 1
37  if (histo(ih))
38  & call hfill(ih,xlen/histunit(ih),0.,fnorm*destep)
39 *
40 * *** histo step size
41  ih = 0
42  if (istak.eq.0) ih = 4
43  if (istak*charge.ne.0.) ih = 7
44  if ((ih.gt.0).and.(histo(ih)))
45  & call hfill(ih,step/histunit(ih),0.,1.)
46 *
47  END
subroutine gustep
Definition: gustep.F:2
Hep3Vector vect() const
Int_t nevent
Definition: macro.C:10