Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
guout.F
Go to the documentation of this file.
1 
2  SUBROUTINE guout
3 *
4 * User routine called at the end of each event
5 *
6 #include "geant321/gcflag.inc"
7 #include "calor.inc"
8 #include "celoss.inc"
9 #include "histo.inc"
10 *
11  CHARACTER*4 unit
12 
13 *
14 * histo: energy deposit per tracking medium
15  do k=1,nbabsor
16  if (histo(k)) call hfill(k,edepabs(k)/histunit(k),0.,1.)
17  enddo
18 *
19 * cumul energy deposited, charged track length and energy leakage
20  do k=1,nbabsor
21  sumedep(k) = sumedep(k) + edepabs(k)
22  sumtrck(k) = sumtrck(k) + trckabs(k)
23 *
24  su2edep(k) = su2edep(k) + edepabs(k)**2
25  su2trck(k) = su2trck(k) + trckabs(k)**2
26  enddo
27 *
28 * *** print
29  IF (iswit(1).NE.0) THEN
30  do k=1,nbabsor
31  CALL gevkev(edepabs(k),eunit,unit)
32  print 751,k,eunit,unit,trckabs(k)
33  enddo
34  print 749
35  ENDIF
36 *
37 #ifndef batch
38 *
39 * *** drawing
40 *
41  IF (iswit(1).NE.0) THEN
42  CALL gdhead(110110,'TestEm3',0.)
43  CALL gdshow(3)
44  CALL gdxyz(0)
45  END IF
46 #endif
47  749 FORMAT(/)
48  751 FORMAT(1x,'Absorber',i2,' : Energy deposit: ',f8.3,a4,
49  & ' Track length: ' ,f8.3,' cm')
50 *
51  END