Geant4_10
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 "geant321/gckine.inc"
8 #include "pvolum.inc"
9 #include "celoss.inc"
10 *
11 * *** drawing
12 *
13 #ifndef batch
14  IF (iswit(1).NE.0) THEN
15  CALL gdhead(110110,'testem2',0.)
16  CALL gdshow(1)
17  CALL gdxyz(0)
18  END IF
19 #endif
20 *
21 *
22 * *** statistic
23 *
24  dlc = 0.
25  drc = 0.
26 
27 * longitudinal profile
28 *
29  DO 2 i = 1,nltot
30  sel1(i) = sel1(i) + dedl(i)
31  sel2(i) = sel2(i) + dedl(i)**2
32  dlc = dlc + dedl(i)
33  sel1c(i) = sel1c(i) + dlc
34  sel2c(i) = sel2c(i) + dlc**2
35 
36  bin = (float(i)-0.5)*dlx0
37  CALL hfill(4,bin,100*dedl(i)/(dlx0*pkine(3)),1.)
38  bin = float(i)*dlx0
39  CALL hfill(6,bin,100*dlc /pkine(3),1.)
40  2 CONTINUE
41 
42 * radial profile
43 *
44  DO 3 i = 1,nrtot
45  ser1(i) = ser1(i) + dedr(i)
46  ser2(i) = ser2(i) + dedr(i)**2
47  drc = drc + dedr(i)
48  ser1c(i) = ser1c(i) + drc
49  ser2c(i) = ser2c(i) + drc**2
50 
51  bin = (float(i)-0.5)*drx0
52  CALL hfill(8,bin,100*dedr(i)/(drx0*pkine(3)),1.)
53  bin = float(i)*drx0
54  CALL hfill(10,bin,100*drc /pkine(3),1.)
55  3 CONTINUE
56 *
57 * energy deposited and track length
58 *
59  eseen = 100.*dlc/pkine(3)
60  CALL hfill(1, eseen,0.,1.)
61  CALL hfill(2,strch/x0,0.,1.)
62  CALL hfill(3,strne/x0,0.,1.)
63 *
64  strch1 = strch1 + strch
65  strch2 = strch2 + strch**2
66  strne1 = strne1 + strne
67  strne2 = strne2 + strne**2
68 *
69  END
float bin[41]
Definition: plottest35.C:14
subroutine guout
Definition: guout.F:2