1 | |
---|
2 | SUBROUTINE UGINIT |
---|
3 | * |
---|
4 | * To initialise GEANT/USER program and read data cards |
---|
5 | * |
---|
6 | #include "pvolum.inc" |
---|
7 | #include "celoss.inc" |
---|
8 | * |
---|
9 | CHARACTER*20 filnam |
---|
10 | * |
---|
11 | * *** Define the GEANT parameters |
---|
12 | CALL GINIT |
---|
13 | |
---|
14 | * *** read data cards |
---|
15 | PRINT *, 'G3 > gives the filename of the data cards to be read:' |
---|
16 | READ (*,'(A)') filnam |
---|
17 | IF (filnam.EQ.' ') filnam = 'run01.dat' |
---|
18 | OPEN (unit=5,file=filnam,status='unknown',form='formatted') |
---|
19 | * |
---|
20 | * *** material definition |
---|
21 | CALL FFKEY('MATE',IMAT,1,'INTEGER') |
---|
22 | * |
---|
23 | * *** volumes and bins definition |
---|
24 | CALL FFKEY('BINS',NLTOT,4,'MIXED') |
---|
25 | * |
---|
26 | * *** max allowed step size |
---|
27 | CALL FFKEY('STEPMX',stepmax,1,'REAL') |
---|
28 | * |
---|
29 | * *** read data cards |
---|
30 | CALL GFFGO |
---|
31 | * |
---|
32 | * *** check size of arrays |
---|
33 | if (NLTOT.gt.NBIN) then |
---|
34 | write (6,51) NLTOT, NBIN |
---|
35 | NLTOT = NBIN |
---|
36 | endif |
---|
37 | if (NRTOT.gt.NBIN) then |
---|
38 | write (6,52) NRTOT, NBIN |
---|
39 | NRTOT = NBIN |
---|
40 | endif |
---|
41 | 51 FORMAT (/,5x,'warning (uginit): NLTOT= ',I3,' truncated to ',I3) |
---|
42 | 52 FORMAT (/,5x,'warning (uginit): NRTOT= ',I3,' truncated to ',I3) |
---|
43 | * |
---|
44 | * *** achieve initialization |
---|
45 | CALL VZERO(SEL1,10*NBIN+8) |
---|
46 | * |
---|
47 | CALL GZINIT |
---|
48 | CALL GPART |
---|
49 | * |
---|
50 | CALL GDINIT |
---|
51 | * |
---|
52 | * *** Geometry and materials description |
---|
53 | CALL UGEOM |
---|
54 | * |
---|
55 | * *** Energy loss and cross-sections initialisations |
---|
56 | CALL GPHYSI |
---|
57 | * |
---|
58 | CALL GPRINT('MATE',0) |
---|
59 | CALL GPRINT('TMED',0) |
---|
60 | CALL GPRINT('VOLU',0) |
---|
61 | * |
---|
62 | * *** Define user histograms |
---|
63 | CALL UHINIT |
---|
64 | * |
---|
65 | END |
---|