static double func_(double *x, double wgt) { double ret_val=0.; int err=0,nd,i; double factor_0; double xx0=x[0],xx1=x[1],x1,x2; double GG,qF,qR; nCall++; REAL pvectR[100]; double pvect[100]; /* get momenta */ mkmom(x, &factor_0,pvectR); if(sf_num[0]){x1=x[0]; x[0]=xx0;} if(sf_num[1]){x2=x[1]; x[1]=xx1;} if (!factor_0) goto exi; nd=4*(nin_int+nout_int); for(i=0;i<nd;i++) pvect[i]=pvectR[i]; factor_0 *= calcCutFactor(pvect)*usrFF(nin_int,nout_int,pvect,p_names,p_codes); if (!factor_0) goto exi; Scale(pvect,&qF,&qR); /* ** structure function multiplication */ if (nin_int == 2) { if(sf_num[0]) { factor_0 *= strfun_(1, x1,qF); if(factor_0==0.) {/*printf("|x1=%.2f|",x1);*/ goto exi;}} if(sf_num[1]) { factor_0 *= strfun_(2, x2,qF); if(factor_0==0.) {/*printf("|x2=%.2f|",x2);*/ goto exi;}} } if (!factor_0) { goto exi;} /* ** call for 'running strong coupling constant' */ GG=sqrt(4*M_PI*alpha_2(qR)); ret_val = factor_0 * sqme_int(Nsub,GG,pvectR,&err); if(err) badPoints+= (ret_val>0 ? ret_val*wgt : - ret_val*wgt); if(ret_val<0) negPoints+=ret_val*wgt; exi: if(hFill) fillHists(ret_val*wgt,pvect); return ret_val; } /* func_ */
static double func_(double *x, double wgt) { double ret_val=0.; int err=0,nd,i; double factor_0; double x1,x2; double GG,qF1,qF2,qR,qS; REAL pvectR[100]; double pvect[100]; /* get momenta */ mkmom(x, &factor_0,&x1,&x2,pvectR); if (!factor_0) goto exi; nd=4*(nin_int+nout_int); for(i=0;i<nd;i++) pvect[i]=pvectR[i]; factor_0 *= calcCutFactor(pvect)*usrFF(nin_int,nout_int,pvect,p_names,p_codes); if (!factor_0) goto exi; Scale(Nsub,pvect,&qR,&qF1,&qF2,&qS); /* ** structure function multiplication */ if (nin_int == 2) { if(sf_num[0]) { factor_0 *= strfun_(1, x1,qF1); if(factor_0==0.) goto exi;} if(sf_num[1]) { factor_0 *= strfun_(2, x2,qF2); if(factor_0==0.) goto exi;} } if (!factor_0) { goto exi;} /* ** call for 'running strong coupling constant' */ GG=sqrt(4*M_PI*alpha_2(qR)); ret_val = factor_0 * sqme_int(Nsub,GG,pvectR,NULL,&err); if(err) badPoints+= (ret_val>0 ? ret_val*wgt : - ret_val*wgt); if(ret_val<0) negPoints+=ret_val*wgt; exi: if(hFill) { if(nPROCSS) pthread_mutex_lock(&hist_key); fillHists(ret_val*wgt,pvect); if(nPROCSS) pthread_mutex_unlock(&hist_key); } return ret_val; } /* func_ */