1 jones 1.1 SUBROUTINE UGLAST
2
3 implicit none
4
5 include 'sane.inc'
6 include 'beta_geom.inc'
7 include 'sane_accp.inc'
8 include 'sane_misc.inc'
9 save
10
11 character*80 arg
12 CHARACTER*29 setupfile
13 C
14 C Termination routine to print histograms and statistics
15 C
16 integer*2 icycle
17 C
18 C write(*,*) 'Howdy uglast has run'
19 CALL GLAST
20 C
21 C Save histograms to file
22 jones 1.1 C
23 C
24
25 call hrout(10,icycle,' ')
26 call hrend('SANE')
27
28 CLOSE(20)
29 CLOSE(30)
30 call getarg(1,arg)
31 read(arg,'(i3)') iteration
32 call getarg(2,arg)
33 read(arg,'(i1)') particle
34
35 ! write(setupfile, '("history/a1p_geant.",i3,".",i1,".setup")')
36 write(setupfile, '("a1p_geant.",i3,".",i1,".setup")')
37 1 iteration,particle
38
39 open(unit=23,file=setupfile,status='unknown')
40 write(*,*) 'e beam = ',E_beam,'ebeam2 ',ebeam2
41 write(23,*) E_beam/1000.d0
42 write(23,*) theta_0
43 jones 1.1 write(23,*) theta_Bfield
44 write(23,*) theta_min
45 write(23,*) theta_max
46 write(23,*) phi_min
47 write(23,*) phi_max
48 write(23,*) p_min
49 write(23,*) p_max
50 write(23,*) cal_width
51 write(23,*) cal_height
52 write(23,*) cal_drift
53 write(23,*) numevts
54 write(23,*) 'mag hits = ',magcnt ! JDM - 5/07
|