source: trunk/examples/extended/electromagnetic/TestEm13/geant3/src/uginit.F @ 807

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

update

File size: 3.0 KB
Line 
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
3798    FORMAT(A4,A2,A25)                 
38*                                                                   
39* *** read data cards                                                           
40      CALL GFFGO
41*
42      write(6,99) fileName
4399    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                                                                       
Note: See TracBrowser for help on using the repository browser.