real function pg_filt(xdummy) implicit none include 'ghib$data:cwn.inc' include 'c$inc:pivalu.inc' integer xdummy integer i,j,k integer nphotight,phoindex(10) real coriso pg_filt = 0.0 nphotight = 0 do i = 1,10 phoindex(i) = 0 enddo do i = 1,npho if (pchi(i).lt.20.0) then if (petc(i).gt.25.0) then if (abs(pcesz(i)).gt.14.0.and.abs(pcesz(i)).lt.217.0) then if (abs(pcesx(i)).lt.21.0) then if (pcesflg(i)) then if (pn3d(i).le.1.and.abs(ppt(i)).lt.1.0) then if (phadem(i).lt.(0.055+0.00045*pe(i))) then coriso = pco4(i)-pvcor(i)-plcor(i)*petc(i) if ((petc(i).ge.55.0.and. & coriso.lt.2.0.and.btest(trigbits,17)) & .or.(petc(i).lt.55.0.and. & pboxiso(i).lt.4.0.and.coriso.lt.2.0.and. & btest(trigbits,15))) then if (psumpt4(i).lt.5.00) then nphotight = nphotight + 1 phoindex(nphotight) = i endif endif endif endif endif endif endif endif endif enddo C final event cuts if (brcode.eq.15.or.brcode.eq.31) then if (vclassev.ge.12) then if (etout.eq.0.0) then if (nphotight.gt.0) then if (abs(pzv(phoindex(1))).le.60.0) then pg_filt = 1.0 endif endif endif endif endif return end