source: trunk/examples/extended/electromagnetic/TestEm11/geant3/src/uginit.F @ 1292

Last change on this file since 1292 was 807, checked in by garnier, 16 years ago

update

File size: 3.2 KB
Line 
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
3598    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
Note: See TracBrowser for help on using the repository browser.