Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
extended
electromagnetic
TestEm2
geant3
src
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 "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
(/,5
x
,
'warning (uginit): NLTOT= '
,i3,
' truncated to '
,i3)
42
52
FORMAT
(/,5
x
,
'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
Generated on Sat May 25 2013 14:32:19 for Geant4 by
1.8.4