program TEST_XY c Author: Glen Cowan c Date: 9.11.98 implicit NONE c Needed for HBOOK routines integer hsize parameter (hsize = 100000) integer hmemor (hsize) common /pawc/ hmemor c Local variables character*80 outfile integer i integer icycle integer istat integer lun integer ntotin, nto2in integer seed real x1, x2, y1, y2 c Initialize HBOOK, open histogram file, book histograms call HLIMIT (hsize) lun = 20 outfile = 'test_xy.his' call HROPEN (lun, 'histog', outfile, 'N', 1024, istat) if (istat .ne. 0) write (*, *) 'HROPEN error, istat = ', istat call HBOOK2 (1, 'x,y -- type 1', 100, -4., 6., 100, -4., 6., 0.) call HBOOK2 (2, 'x,y -- type 2', 100, -4., 6., 100, -4., 6., 0.) call HBOOK2 (3, 'x,y -- type 1,2', 100, -4., 6., 100, -4., 6., 0.) seed = 12345 call RMARIN (seed, ntotin, nto2in) C Generate events, enter results in scatter plot do i = 1, 1000 call GENERATE_XY (1, x1, y1) call GENERATE_XY (2, x2, y2) call HF2 (1, x1, y1, 1.) call HF2 (2, x2, y2, 1.) call HF2 (3, x1, y1, 1.) call HF2 (3, x2, y2, 1.) end do c Store histogram and close call HROUT (0, icycle, ' ') call HREND ('histog') stop END