Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
uginit.F
Go to the documentation of this file.
1 
2  SUBROUTINE uginit
3 *
4 * To initialise GEANT/USER program and read data cards
5 *
6 #include "detector.inc"
7 #include "process.inc"
8 #include "histo.inc"
9 *
10  CHARACTER*20 filnam
11  CHARACTER*4 key
12  CHARACTER*2 spaces
13 *
14 * *** Define the GEANT parameters
15  CALL ginit
16 *
17 * histograms
18  do ih = 1,maxhist
19  histo(ih) = .false.
20  enddo
21 *
22 * *** Detector definition
23  CALL ffkey('DETECTOR',imat,2,'MIXED')
24 *
25 * histograms
26  CALL ffkey('HISTO',idhist,5,'MIXED')
27 *
28 * *** read data cards
29  print *, 'G3 > gives the filename of the data cards to be read:'
30  READ (*,'(A)') filnam
31  IF (filnam.EQ.' ') filnam = 'allprocesses.dat'
32  OPEN (unit=5,file=filnam,status='unknown',form='formatted')
33 *
34 * filename should be 1st data card !
35  filename = 'photonprocesses.paw'
36  READ(5,98)key,spaces,filename
37 98 FORMAT(a4,a2,a25)
38 *
39 * *** read data cards
40  CALL gffgo
41 *
42  write(6,99) filename
43 99 FORMAT(/,15x,'histogram file --> Name: ',a25)
44 *
45  CALL gzinit
46  CALL gpart
47 *
48  CALL gdinit
49 *
50 * *** Geometry and materials description
51  CALL ugeom
52 *
53 * *** Energy loss and cross-sections initialisations
54  CALL gphysi
55 *
56  CALL gprint('MATE',0)
57  CALL gprint('TMED',0)
58  CALL gprint('VOLU',0)
59 *
60 * *** initialisation of /process/
61 
62  CALL vzero(nbcall,12)
63  nbtot = 0
64  sumtrak = 0.
65  sumtrak2 = 0.
66 *
67  END