c c Action routine for PRINTKINE command c c last modified on 16/11/99 by R.Holzmann c subroutine printkine character*32 chpatl integer iopt, ival common /kineopt/ iopt, ival call kupatl(chpatl,narg) ! get number of arguments... call kugeti(iopt) ! ... and read iopt and ival call kugeti(ival) c c this could be made much more elegant (see e.g. ntuple/project in PAW.F) c c call kugetc(chfunc,nlen) ! read in selection function c call pawfcu(0,chfunc,icodes,isel) ! compile ? c call cltou(chfunc) ! convert lower to upper case c call pprojn(...) or similar... return end c c c subroutine kineout ! print the actual KINE info for 1 event #include "kinetups.inc" integer iopt, ival common /kineopt/ iopt, ival if(iopt.lt.0 .or. iopt.gt.4) return write(6,'(/5(''=''),i8,1x,60(''=''))') eventid radius = float(ival) ! in mm nprot = 0 nneut = 0 npi0 = 0 npip = 0 npim = 0 ngam = 0 nelec = 0 nposi = 0 do i=1,ntrk ! loop over tracks in event if(partid(i).eq.1) ngam = ngam + 1 if(partid(i).eq.2) nposi = nposi + 1 if(partid(i).eq.3) nelec = nelec + 1 if(partid(i).eq.7) npi0 = npi0 + 1 if(partid(i).eq.8) npip = npip + 1 if(partid(i).eq.9) npim = npim + 1 if(partid(i).eq.13) nneut = nneut + 1 if(partid(i).eq.14) nprot = nprot + 1 dist = sqrt(tvert(1,i)**2 + tvert(2,i)**2 + tvert(3,i)**2) ! in mm medium = mechanism(i)/1000 mech = mechanism(i) - medium*1000 if(iopt.eq.1 .and. ival.ne.partid(i)) goto 10 ! test particle ID if(iopt.eq.2 .and. ival.ne.medium) goto 10 ! test medium number if(iopt.eq.3 .and. ival.ne.mech) goto 10 ! test prod. mechanism if(iopt.eq.4 .and. dist.gt.radius) goto 10 ! test dist. to target write(6,'(''ID='',i3,'' P=('',f7.1,1x,f7.1,1x,f7.1'')'',$)') + partid(i), pmom(1,i), pmom(2,i), pmom(3,i) write(6,'('' V=('',f7.1,1x,f7.1,1x,f7.1,'') Med='',i3,$)') + tvert(1,i), tvert(2,i), tvert(3,i), medium write(6,'('' Mec='',i3)') mech 10 continue end do write(6,'(/'' Nb. of photons, e+, e- = '',i5,1x,i5,1x,i5)') + ngam, nposi, nelec write(6,'('' Nb. of pi0, pi+, pi- = '',i3,1x,i3,1x,i3)') + npi0, npip, npim write(6,'('' Nb. of n, p = '',i4,1x,i4)') nneut, nprot return end