Geant4_10
uginit.F
Go to the documentation of this file.
1 
2  SUBROUTINE uginit
3 *
4 #include "geomate.inc"
5 #include "runinfo.inc"
6 #include "histo.inc"
7 
8  CHARACTER*25 filnam
9  CHARACTER*4 key
10  CHARACTER*2 spaces
11 C
12 C INITIALIZE GEANT STRUCTURES
13 C
14  CALL ginit
15 *
16 * default values (materials,sizes,tracking parameters)
17 *
18  matabs = 23
19  xabsor = 1.
20  yzabso = 2.
21  fielda = 0.
22 *
23  matwld = 30
24  xworld = 0.
25  yzworl = 0.
26  fieldw = 0.
27 *
28  xposab = 0.
29 *
30  xvert = -1000.
31  yvert = 0.
32  zvert = 0.
33 *
34  deem = 0.2
35  stmi = 0.001
36  stma = 1.e+10
37  kill = .false.
38 *
39 * histograms
40  do ih = 1,maxhist
41  histo(ih) = .false.
42  enddo
43 *
44 * *** Define data cards
45 *
46 * geometry
47  CALL ffkey('WORLD',matwld,4,'mixed')
48  CALL ffkey('ABSOR',matabs,4,'mixed')
49  CALL ffkey('XPOS' ,xposab,1,'real')
50  CALL ffkey('VERT' ,xvert ,3,'real')
51 *
52 * histograms
53  CALL ffkey('HISTO',idhist,5,'MIXED')
54 *
55 * tracking parameters
56  CALL ffkey('DEEM',deem, 1,'REAL')
57  CALL ffkey('STMA',stma, 1,'REAL')
58  CALL ffkey('STMI',stmi, 1,'REAL')
59 *
60  CALL ffkey('KILL',kill, 1,'LOGICAL')
61 *
62 * *** read data cards
63  print *, 'G3 > gives the filename of the data cards to be read:'
64  READ (*,'(A)') filnam
65  IF (filnam.EQ.' ') filnam = 'testem5.dat'
66  OPEN (unit=5,file=filnam,status='unknown',form='formatted')
67 *
68 * filename should be 1st data card !
69  filename = 'testem5.paw'
70  READ(5,98)key,spaces,filename
71 98 FORMAT(a4,a2,a25)
72 *
73  CALL gffgo
74 *
75  write(6,99) filename
76 99 FORMAT(/,15x,'histogram file --> Name: ',a25)
77 C
78 C INITIALIZE ZEBRA STRUCTURES
79 C
80  CALL gzinit
81 C
82 C DEFINE STANDARD PARTICLES AND MATERIALS
83 C
84  CALL gpart
85  CALL gmate
86 *
87  CALL gdinit
88 C
89 C DEFINE GEOMETRY
90 C
91  CALL ugeom
92 C
93 C COMPUTE CROSS SECTIONS/ENERGY LOSSES
94 C
95  CALL gphysi
96 C
97 C PRINT MATERIALS,MEDIA,VOLUMES
98 C
99  CALL gprint('MATE',0)
100  CALL gprint('TMED',0)
101  CALL gprint('VOLU',0)
102 *
103 * global initialisation for the run
104 *
105 * energy
106  sedep = 0.
107  sedep2 = 0.
108 *
109 * number of steps
110  sstpch = 0.
111  sstpch2 = 0.
112  sstpne = 0.
113  sstpne2 = 0.
114 *
115 * track length
116  strkch = 0.
117  strkch2 = 0.
118  strkne = 0.
119  strkne2 = 0.
120 *
121 * number of secondaries
122  ngamma = 0
123  nelect = 0
124  nposit = 0
125 *
126 * transmission, reflection counters
127  nbtransm(1) = 0
128  nbtransm(2) = 0
129  nbreflec(1) = 0
130  nbreflec(2) = 0
131 *
132  if (xvert.le.-1000.) xvert = -0.5*xworld
133 *
134  END
BasicVector3D< T > unit() const
subroutine ugeom
Definition: ugeom.F:2
TFile * file
subroutine uginit
Definition: uginit.F:2
Double_t x
Definition: plot.C:279
int status
Definition: tracer.cxx:24
void print(const std::vector< T > &data)
Definition: DicomRun.hh:111