void onepart_filter(int whichpart,double *p,int *ifilter){ /* This should NOT depend on phi! If identical particles, this is only called with whichpart==1, If not identical, this gets called with whichpart==1 for the first particle and whichpart==2 for the second. */ static double ptmax[20]={440.0,440.0,400.0,400.0,360.0,320.0,320.0,280.0,280.0,240.0,240.0,200.0,200.0,200.0,160.0,160.0,120.0,120.0,120.0,80.0}; static double ptmin[20]={320.0,280.0,240.0,240.0,200.0,160.0,160.0,120.0,120.0,80.0,80.0,80.0,80.0,40.0,40.0,40.0,0.0,0.0,0.0,0.0}; double rapidity,pt; int iy; *ifilter=1; rapidity=0.5*log((p[0]+p[3])/(p[0]-p[3])); rapidity=rapidity+2.92; if(rapidity<3.10 || rapidity>4.1){ *ifilter=0; goto END_FILTER1 ; } iy=(int)floor(20.0*(rapidity-3.10)); pt=sqrt(p[2]*p[2]+p[1]*p[1]); if(pt>ptmax[iy]||pt11){ *ifilter=0; goto END_FILTER2; } if(fabs(p1[2])>pycut[iy][ipt]){ *ifilter=0; goto END_FILTER2; } /* Check for second particle */ rapidity=2.92+0.5*log((p2[0]+p2[3])/(p2[0]-p2[3])); iy=(int)floor(20.0*(rapidity-3.10)); pt44=sqrt(p2[1]*p2[1]+p2[2]*p2[2]); if(p2[1]<0.0) pt44=-pt44; ipt=(int)floor((440.0-pt44)/40.0); if(ipt<0 || ipt>11){ *ifilter=0; goto END_FILTER2; } if(fabs(p2[2])>pycut[iy][ipt]){ *ifilter=0; goto END_FILTER2; } END_FILTER2:; }