	function dew(epart,iac,tuse,tmhi,iopt)
c	calculates acceptance for particle of energy epart for trigger iac
c	tuse and tmhi are minus t for iopt=1 and pperp2 for iopt=2
c
	include '/u1/gcf/e350/crystal/cb/trigmc'
c
	include '/u1/gcf/e350/crystal/cb/parms'
c
	include '/u1/gcf/e350/crystal/cb/clouds'
c
	include '/u1/gcf/e350/crystal/cb/type'
c
	include '/u1/gcf/e350/crystal/cb/wgtscr'
c
c     integrate over t bin from tmlo to tmhi
	call wgtint(tuse,tmhi,8,pts,wts)
	wew=0.
	do 5 i=1,8
c     calculate pperp/e
	if (iopt.eq.1) then
	ppde=sqrt(1.-am2i/epart**2-((sqrt(pinc**2+am2j)+(-pts(i)-am2j
&	-am2i)*0.5/epart)/pinc)**2)
	else
	ppde=sqrt(pts(i))/epart
	end if
	tew=thundr(netr(iac),egtr(1,iac),nptr,petr,
&	acctr(1,1,iac),epart,ppde,61)
	if (nfs) goto 4
	call dblevl(ppde,epart,bew)
	tew=tew*bew
4	wew=wew+tew*wts(i)
5	continue
	dew=amax1(0.,wew*bratio(ipart))
	return
c
	end
