source: trunk/examples/extended/electromagnetic/TestEm13/geant3/src/uglast.F@ 1036

Last change on this file since 1036 was 807, checked in by garnier, 17 years ago

update

File size: 2.3 KB
Line 
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
Note: See TracBrowser for help on using the repository browser.