5 extern void upup_(
int *L1,
int *L2,
int *L3,
int *L4,
double *s,
double *t,
double *u,
int *iz,
double *har,
double *hai);
6 extern void downdown_(
int *L1,
int *L2,
int *L3,
int *L4,
double *s,
double *t,
double *u,
int *iz,
double *har,
double *hai);
7 extern void flagset_(
int *iqedx,
int *iewx,
int *ibornx,
int *gfschemex,
int *ifggx,
double *ncx,
double *fcx,
double *tlmu2x);
8 extern void paraget_(
double *mtax,
double *conhcx,
double *pix);
9 extern void printconsts_(
int *pmg);
12 int iqed=0,iew=1,iborn=0,gfscheme=0,ifgg=1;
13 double nc=1.0,fc=3.0,tlmu2=1e-5;
17 double borndivv=123.456;
24 c.re=x.re*y.re-x.im*y.im;
25 c.im=x.re*y.im+x.im*y.re;
37 double abso(
struct compl x)
39 return sqrt(x.re*x.re+x.im*x.im);
43 void Rcalc(
int flav,
double sloop,
double costhetloop)
45 int L1,L2,L3,L4,iz,i,j,M3,M4;
47 double cosf,betaf,har,hai,MM,sinf,xnorm,xx;
51 double sum,sig[4][4][2], Bench[4][4]={0};
53 struct compl amp[2][2][2][2][2]={0}, sigma[4][2][2]={0}, c;
69 paraget_(&mta,&conhc,&pi);
70 betaf = sqrt(1e0-4e0*mta*mta/s);
71 t = mta*mta - s/2*(1e0-betaf*cosf);
72 u = mta*mta - s/2*(1e0+betaf*cosf);
83 if(flav==1) downdown_(&L1,&L2,&L3,&L4,&s,&t,&u,&iz,&har,&hai);
84 else upup_(&L1,&L2,&L3,&L4,&s,&t,&u,&iz,&har,&hai);
85 amp[L1-1][L2-1][L3-1][L4-1][iz].im=hai;
86 amp[L1-1][L2-1][L3-1][L4-1][iz].re=har;
107 c=mul(mul(mul(amp[L1-1][L2-1][L3-1][L4-1][iz],conju(amp[L1-1][L2-1][M3-1][M4-1][iz])),
108 sigma[i][L3-1][M3-1]),(sigma[j][M4-1][L4-1]));
119 (sig[i][j][1] - sig[i][j][0]) *
124 R[i][j]=R[i][j]/divv;
125 if(i!=0) R[i][j] =- R[i][j];
199 int main(
int argc,
char **argv){
201 double costhetloop=0.0;
203 int NS1=100, NS2=100, NS3=100, NCOS=21;
204 double smin1=log(6*6);
205 double smax1=log(17000*17000);
208 double smax2=110*110;
210 double smin3=160*160;
211 double smax3=220*220;
214 FILE *f=NULL,*d=NULL,*dd=NULL;
216 char ftime[255],path[255];
218 if (argc > 1) flav=atoi(argv[1]);
220 if (flav==1) f=fopen(
"table1-1.txt",
"w");
221 else f=fopen(
"table2-2.txt",
"w");
223 flagset_(&iqed,&iew,&iborn,&gfscheme,&ifgg,&nc,&fc,&tlmu2);
225 dd=fopen(
"SancLib_v1_02/lib.txt",
"r");
226 if(!dd) { printf(
"No info file on electrowek library SANC (file SancLib_v1_02/lib.txt missing), we better stop \n");
return -1; }
227 d=fopen(
"var.dump",
"r");
228 if(!d) { printf(
"No initialization variables of SANC (file var.dump missing), we better stop \n");
return -1; }
230 fprintf(f,
"Dimensions: %i %i %i %i\n",NS1,NS2,NS3,NCOS);
231 fprintf(f,
"Ranges: %.5f %.5f %.5f %.5f %.5f %.5f \n",smin1,smax1,smin2,smax2,smin3,smax3);
234 strftime(ftime,255,
"%d %b %Y, %H:%M:%S, GMT%z",localtime(&utime));
235 fprintf(f,
"Timestamp: %s\n",ftime);
236 fprintf(f,
"Path: %s\n\n",path);
253 fprintf(f,
"\nBeginRange1\n");
254 printf(
"\nBeginRange1\n");
256 step=(smax1-smin1)/(NS1-1);
259 sloop=exp(smin1+i*step);
260 printf(
"%.5f \n",sloop);
263 costhetloop=-1.+1.0/NCOS+j*2./(NCOS);
266 flagset_(&iqed,&iew,&iborn,&gfscheme,&ifgg,&nc,&fc,&tlmu2);
267 Rcalc(flav,sloop,costhetloop);
271 flagset_(&iqed,&iew,&iborn,&gfscheme,&ifgg,&nc,&fc,&tlmu2);
272 Rcalc(flav,sloop,costhetloop);
276 fprintf(f,
"%.5f ",R[k][l]);
277 fprintf(f,
"%.8f ",divv);
278 fprintf(f,
"%.8f\n",borndivv);
284 fprintf(f,
"\nBeginRange2\n");
285 printf(
"\nBeginRange2\n");
287 step=(smax2-smin2)/(NS2-1);
290 sloop=(smin2+i*step);
291 printf(
"%.5f \n",sloop);
294 costhetloop=-1.+1.0/NCOS+j*2./(NCOS);
297 flagset_(&iqed,&iew,&iborn,&gfscheme,&ifgg,&nc,&fc,&tlmu2);
298 Rcalc(flav,sloop,costhetloop);
302 flagset_(&iqed,&iew,&iborn,&gfscheme,&ifgg,&nc,&fc,&tlmu2);
303 Rcalc(flav,sloop,costhetloop);
307 fprintf(f,
"%.5f ",R[k][l]);
308 fprintf(f,
"%.5f ",divv);
309 fprintf(f,
"%.5f \n",borndivv);
314 fprintf(f,
"\nBeginRange3\n");
315 printf(
"\nBeginRange3\n");
317 step=(smax3-smin3)/(NS3-1);
320 sloop=(smin3+i*step);
321 printf(
"%.5f \n",sloop);
324 costhetloop=-1.+1.0/NCOS+j*2./(NCOS);
327 flagset_(&iqed,&iew,&iborn,&gfscheme,&ifgg,&nc,&fc,&tlmu2);
328 Rcalc(flav,sloop,costhetloop);
332 flagset_(&iqed,&iew,&iborn,&gfscheme,&ifgg,&nc,&fc,&tlmu2);
333 Rcalc(flav,sloop,costhetloop);
337 fprintf(f,
"%.5f ",R[k][l]);
338 fprintf(f,
"%.5f ",divv);
339 fprintf(f,
"%.5f \n",borndivv);