Geant4_10
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 "calor.inc"
7 #include "celoss.inc"
8 #include "histo.inc"
9 *
10  CHARACTER*20 filnam
11 *
12 * *** Define the GEANT parameters
13  CALL ginit
14 *
15 * *** default values for histo
16  do ih = 1,maxhist
17  histo(ih) = .false.
18  enddo
19 *
20 * *** Calor definition
21  CALL ffkey('CALOR', imat, 4,'MIXED')
22  CALL ffkey('FIELD', field, 1,'REAL')
23  CALL ffkey('STEPMX',stepmax,1,'REAL')
24  CALL ffkey('HISTO', idhist, 5,'MIXED')
25 *
26 * *** read data cards
27  print *, 'G3 > gives the filename of the data cards to be read:'
28  READ (*,'(A)') filnam
29  IF (filnam.EQ.' ') filnam = 'run01.dat'
30  OPEN (unit=5,file=filnam,status='unknown',form='formatted')
31 *
32 * fileName for histograms, must be 1st data card !
33  filename = 'testem11.paw'
34  READ(5,98)key,spaces,filename
35 98 FORMAT(a4,a2,a25)
36 *
37  CALL gffgo
38 *
39  CALL gzinit
40  CALL gpart
41 *
42  CALL gdinit
43 *
44 * *** Geometry and materials description
45  CALL ugeom
46 *
47 * *** Energy loss and cross-sections initialisations
48  CALL gphysi
49 *
50  CALL gprint('MATE',0)
51  CALL gprint('TMED',0)
52  CALL gprint('VOLU',0)
53 *
54 * *** Define user histograms
55  CALL uhinit
56 *
57 * *** per run initialisations
58  etot = 0.
59  etot2 = 0.
60  trlen = 0.
61  trlen2 = 0.
62  xtrlen = 0.
63  xtrlen2 = 0.
64  steplen = 0.
65  steplen2 = 0.
66  nbstep = 0
67  nbstep2 = 0
68  kcoef(1) = 0
69  kcoef(2) = 0
70  kcoef(3) = 0
71 *
72  END
BasicVector3D< T > unit() const
subroutine ugeom
Definition: ugeom.F:2
TFile * file
subroutine uginit
Definition: uginit.F:2
int status
Definition: tracer.cxx:24
void print(const std::vector< T > &data)
Definition: DicomRun.hh:111
subroutine uhinit
Definition: uhinit.F:2