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. */

  *ifilter = 0;
  //
  // Momentum cut
  //
  float mom = sqrt(p[0]*p[0] + p[1]*p[1] + p[2]*p[2]);
  if (mom > 2000.)
    return;

  //
  // Rapidity cut
  //
  double rapidity = 0.5*log((p[0] + p[3])/(p[0] - p[3]));
  if (fabs(rapidity) < 1.)
    *ifilter = 1;
}

/* ********************************************* */

void twopart_filter(double *p1,double *p2,int *ifilter){
  *ifilter=1;
}

/* ********************************************* */
