Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
uglast.F
Go to the documentation of this file.
1 
2  SUBROUTINE uglast
3 *
4 * Termination routine to print histograms and statistics
5 *
6 #include "geant321/gcflag.inc"
7 #include "geant321/gckine.inc"
8 #include "geant321/gctrak.inc"
9 *
10 #include "detector.inc"
11 #include "process.inc"
12 #include "histo.inc"
13 *
14  character*20 material, particle
15  character*4 unit
16  real massmfp, massac
17 *
18 * *** run conditions
19  call gfmate(imat,material,dum,dum,density,dum,dum,dum,ndum)
20  call gfpart(ikine,particle,ndum,dum,dum,dum,dum,ndum)
21  call gevkev(pkine(1),energy,unit)
22  print 750, ievent,particle,energy,unit,boxsize,material,density
23 *
24 * *** frequency of processes call
25  CALL uctoh('MUNU',namec(12),4,4)
26  print 760,(namec(i),i=1,12)
27  print 761,(nbcall(i),i=1,12)
28 *
29 * *** compute mean free path and related quantities
30  avtrak = sumtrak /nbtot
31  avtrak2 = sumtrak2/nbtot
32  rms = sqrt(abs(avtrak2 - avtrak*avtrak))
33  attecoef = 1./avtrak
34 *
35  massmfp = avtrak*density
36  massac = 1./massmfp
37  print 770, avtrak,rms,massmfp,attecoef,massac
38 *
39 * *** geant termination
40  CALL glast
41 *
42 * *** close HIGZ file
43  CALL hplend
44 *
45 * *** histograms
46  CALL hrput(0,filename,'N')
47 *
48 * *** formats
49 *
50  750 FORMAT(/,1x,'The run consists of ',i7,1x,a8,' of ',f7.2,a4,
51  + ' throught',f10.2,' cm of ',a8,' (density: ',f7.3,' g/cm3)')
52 
53  760 FORMAT(/,1x,'Frequency of process calls: ',
54  + /,1x,12a8)
55  761 FORMAT( 1x,12i8,/)
56 
57  770 FORMAT(/,1x,'MeanFreePath:',f12.5,' cm +- ',f12.5,' cm',
58  + 5x,'massic:',f12.5,' g/cm2',
59  + /,1x,'CrossSection:',f12.5,' cm^-1 ',15x,
60  + 5x,'massic:',f12.5,' cm2/g',/)
61 *
62  END