3
c Example program for mcfio. Simple case. Read the file produced by t1
7
integer ostr_all, ostr_sel, istr_old, nopen, istr(10), length
9
integer numblocks, blkids(3)
10
integer i, irun, ievt, istore, itrig
12
PARAMETER (NUMTRIES = 50)
13
integer xdr_stdhep_multi
14
external xdr_stdhep_multi
17
c Initialization phase.
20
istr_old = mcfio_OpenReadDirect('test1.dat')
27
& mcfio_SpecificEvent(istr_old, ievt, istore, irun, itrig)
29
print *, ' Magic event not found, stop '
32
call mcfio_InfoEventInt(istr_old, MCFIO_EVENTNUMBER, inum)
33
print *, ' Event number for magic trigger ', inum
34
if (mcfio_block(istr_old, MCFIO_STDHEPM, xdr_stdhep_multi)
36
print *, ' Error reading STDHEP block '
43
& mcfio_NextSpecificEvent(istr_old, ievt, istore, irun, itrig)
45
print *, ' First event of magic spill not found, stop '
48
call mcfio_InfoEventInt(istr_old, MCFIO_EVENTNUMBER, inum)
49
print *, ' Event number for 1st evt from magic spill', inum
51
call mcfio_Close(istr_old)
54
subroutine study_stdhep
59
print *, ' Number of tracks ', nhep
61
if (nn .gt. 3 ) nn = 3
63
print *, ' Pz, Py, Pz, ', (phep(io,i), io = 1,3)
64
print *, ' Mass ', phep(5,i)
65
print *, ' Y position, Z position ', vhep(2,i), vhep(3,i)