Subroutine MFWTKS c ==================== c c Implicit None c #include "partap.inc" #include "vcatcal.inc" #include "vctrhl.inc" #include "fwtrk.inc" #include "mfcuts.inc" #include "mfflg.inc" c integer i,endsw real p real twopi save twopi c logical first/.true./ save first c if(first) then twopi=2.*acos(-1.) first=.false. endif c nctd(1)=0 nctd(2)=0 nctd(3)=0 c do 10 i=1,coutab(vcatcal) call fettab(vcatcal,ID,i) endsw=mod(vcatcal_kodswm,10) c if(endsw.lt.1.or.endsw.gt.3) goto 10 call fettab(vctrhl,ID,i) if(abs(vctrhl_pgevc).lt.pgevcmin) goto 10 if(abs(vctrhl_zh).gt.zhmax) goto 10 if(abs(vctrhl_qxdh).gt.dhmax) goto 10 if(vctrhl_chi2/vctrhl_ndf.gt.chi2max) goto 10 if(endsw.eq.2) then endsw=3 elseif(endsw.eq.3) then endsw=2 endif if(nctd(endsw).lt.maxtp) then nctd(endsw)=nctd(endsw)+1 idctd(nctd(endsw),endsw)=vcatcal_ID xctd(nctd(endsw),endsw)=vcatcal_x yctd(nctd(endsw),endsw)=vcatcal_y zctd(nctd(endsw),endsw)=vcatcal_z p=sqrt(vcatcal_px**2+vcatcal_py**2+vcatcal_pz**2) thctd(nctd(endsw),endsw)=acos(vcatcal_pz/p) pctd(nctd(endsw),endsw)=sign(1.,vcatcal_q)*p pctdh(nctd(endsw),endsw)=abs(vctrhl_pgevc) psctd(nctd(endsw),endsw)= & mod(atan2(vcatcal_py,vcatcal_px)+twopi,twopi) ndfctd(nctd(endsw),endsw)=vctrhl_ndf ictdused(nctd(endsw),endsw)=0 endif 10 enddo c 9900 Continue End C