示例#1
0
TSIL_COMPLEX SUMO_dBds (TSIL_REAL x,
			TSIL_REAL y,
			TSIL_COMPLEX s,
			TSIL_REAL qq,
			int interp)
{
  TSIL_COMPLEX snew, dBdsplus, dBdsminus;
  TSIL_REAL delta;

  if (interp == NO) return TSIL_dBds (x,y,s,qq);

  delta = TSIL_CABS(s)/TSIL_POW(TSIL_SQRT(x)+TSIL_SQRT(y), 2) - 1.0L;

  if (TSIL_FABS(delta) > THRESH_TOL)
    return TSIL_dBds (x,y,s,qq);

  /* If we get here we interpolate: */
  snew = (1.0L + THRESH_TOL)*s;
  dBdsplus = TSIL_dBds (x,y,snew,qq);

  snew = (1.0L - THRESH_TOL)*s;
  dBdsminus = TSIL_dBds (x,y,snew,qq);

  return 0.5L*(1.0L + delta/THRESH_TOL)*dBdsplus + 
         0.5L*(1.0L - delta/THRESH_TOL)*dBdsminus;
}
示例#2
0
文件: analyticAB.c 项目: apik/mr
TSIL_COMPLEX TSIL_BprimeAtZero (TSIL_REAL x, TSIL_REAL y, TSIL_REAL qq)
{
  TSIL_REAL xoy, onemxoy, onemxoy2, onemxoy3, onemxoy4, temp;
              
  if (x < y) {temp = y; y = x; x = temp;}

  xoy = x/y;
  onemxoy = 1.0L - xoy;
 
  if (TSIL_FABS(onemxoy) > 0.005) 
    return (x*x - 2.L*TSIL_A(x,qq)*y - y*y + 2.L*x*TSIL_A(y,qq))/(2.L*TSIL_POW(x - y,3));
  else {
    onemxoy2 = onemxoy * onemxoy;
    onemxoy3 = onemxoy2 * onemxoy;
    onemxoy4 = onemxoy3 * onemxoy;

    return (1.0L - onemxoy/2.0L - onemxoy2/5.0L - onemxoy3/10.0L
              - 2.0L*onemxoy4/35.0L - onemxoy2*onemxoy3/28.0L
              - onemxoy3*onemxoy3/42.0L - onemxoy4*onemxoy3/60.0L
              - 2.0L*onemxoy4*onemxoy4/165.0L
              - onemxoy3*onemxoy3*onemxoy3/110.0L
              - onemxoy3*onemxoy3*onemxoy4/143.0L
              - onemxoy3*onemxoy4*onemxoy4/182.0L
              - 2.0L*onemxoy4*onemxoy4*onemxoy4/455.0L)/(6.0L * x);
  }
}
示例#3
0
TSIL_COMPLEX SUMO_GetFunction (TSIL_DATA *foo, const char *which, 
			       int interp)
{
  TSIL_REAL arg1, arg2, delta, snew;
  TSIL_COMPLEX Vplus, Vminus;
  TSIL_DATA gaak;

  /* This is cut and pasted from tsil_names.h: */
  const char *vname[4][2] = {{"Vzxyv","Vzxvy"},
			     {"Vuyxv","Vuyvx"},
			     {"Vxzuv","Vxzvu"},
			     {"Vyuzv","Vyuvz"}};

  /* If no interp requested, or not a V function, just return the
     usual thing: */
  if (interp == NO || strncmp (which, "V", 1) != 0)
    return TSIL_GetFunction (foo, which);

  /* Check for a threshold case: */
  if (   !strcmp(which, vname[0][0]) || !strcmp(which, vname[0][1])
      || !strcmp(which, vname[2][0]) || !strcmp(which, vname[2][1])) {
    arg1 = foo->z; arg2 = foo->x;
  }
  else if (   !strcmp(which, vname[1][0]) || !strcmp(which, vname[1][1])
           || !strcmp(which, vname[3][0]) || !strcmp(which, vname[3][1])) {
    arg1 = foo->u; arg2 = foo->y;
  }
  else {
    printf("This can never happen!!!\n"); exit(234);
  }

  delta = foo->s/TSIL_POW(TSIL_SQRT(arg1)+TSIL_SQRT(arg2),2) - 1.0L;

  if (TSIL_FABS(delta) > THRESH_TOL)
    return TSIL_GetFunction (foo, which);

  /* If we get here we interpolate: */
  TSIL_SetParameters (&gaak, foo->x, foo->y, foo->z, foo->u, foo->v, foo->qq);
  snew = (1.0L + THRESH_TOL)*(foo->s);

  TSIL_Evaluate (&gaak, snew);
  Vplus = TSIL_GetFunction (&gaak, which);

  snew = (1.0L - THRESH_TOL)*(foo->s);
  TSIL_Evaluate (&gaak, snew);
  Vminus = TSIL_GetFunction (&gaak, which);

  return 0.5L*(1.0L + delta/THRESH_TOL)*Vplus + 
         0.5L*(1.0L - delta/THRESH_TOL)*Vminus;
}
示例#4
0
int main (int argc, char *argv[])
{
  TSIL_DATA    result; /* Top-level TSIL data object */
  TSIL_REAL    qq;     /* Ensures correct basic type; see also TSIL_COMPLEX */ 
  TSIL_REAL    x, g, lambda;
  TSIL_COMPLEX pi1, pi1prime, pi2, s1, s2;
  TSIL_REAL    factor = 1.0L/(16.0L*PI*PI);

  /* If incorrect number of args, print message on stderr and exit: */
  if (argc != 5)
    TSIL_Error("main", "Expected 4 arguments: m^2, g, lambda, and Q^2", 1);

  /* Note cast to appropriate floating-point type for safety */
  x      = (TSIL_REAL) strtold(argv[1], (char **) NULL); 
  g      = (TSIL_REAL) strtold(argv[2], (char **) NULL);
  lambda = (TSIL_REAL) strtold(argv[3], (char **) NULL); 
  qq     = (TSIL_REAL) strtold(argv[4], (char **) NULL); 

  /* All loop integrals have a common squared-mass argument x: */
  TSIL_SetParameters (&result, x, x, x, x, x, qq); 

  /* For the pole mass calculation, evaluate two-loop integrals at s = x: */
  TSIL_Evaluate (&result, x);

  /* Assemble one- and two-loop mass squared results: */
  pi1 = 0.5L*lambda*TSIL_A(x,qq) - 0.5L*g*g*TSIL_B(x,x,x,qq);

  pi1prime = -0.5L*g*g*TSIL_dBds(x, x, x, qq); 

  pi2 = - 0.5L*g*g*g*g*TSIL_GetFunction(&result, "M")
        - 0.5L*g*g*g*g*TSIL_GetFunction(&result, "Vzxyv")
               + g*g*g*TSIL_GetFunction(&result, "Uzxyv")
    - (1.0L/6.0L)*lambda*lambda*TSIL_GetFunction(&result, "Svyz")
    + 0.25L*lambda*g*g*TSIL_POW(TSIL_GetFunction(&result, "Bxz"), 2)
    + 0.25L*lambda*lambda*TSIL_A(x,qq)*(TSIL_A(x,qq)/x + 1.0L)   
    - 0.5L*lambda*g*g*TSIL_A(x,qq)*TSIL_Bp(x, x, x, qq)      
    - 0.25L*lambda*g*g*TSIL_I2p(x,x,x,qq);               

  s1 = x + factor*pi1;
  s2 = x + factor*pi1 + factor*factor*(pi2 + pi1*pi1prime);

  printf("Tree-level squared mass:    %lf\n", (double) x); 
  printf("One-loop pole squared mass: %lf\n", (double) s1); 
  printf("Two-loop pole squared mass: %lf\n", (double) s2); 

  return 0;
}
示例#5
0
文件: analyticAB.c 项目: apik/mr
TSIL_COMPLEX TSIL_dBds (TSIL_REAL x,
			TSIL_REAL y,
			TSIL_COMPLEX s,
			TSIL_REAL qq)
{
  TSIL_REAL thxy, psxy, sqrtx, sqrty, alphax, alphay, temp;
  TSIL_COMPLEX Btemp, result;

  if (x < y) {temp = y; y = x; x = temp;}

  if (x + TSIL_CABS(s) < TSIL_TOL) {
    TSIL_Warn("TSIL_dBds", "dBds(0,0) is undefined when s=0.");
    return TSIL_Infinity;
  }

  if (TSIL_CABS(s/x) < TSIL_TOL) return TSIL_BprimeAtZero (x, y, qq);

  thxy = TSIL_Th2 (x, y);
  psxy = TSIL_Ps2 (x, y);
  sqrtx = TSIL_SQRT(x);
  sqrty = TSIL_SQRT(y);
  alphax = TSIL_Alpha(x,qq);
  alphay = TSIL_Alpha(y,qq);
  
  if (TSIL_CABS(1.0L - s/thxy) < TSIL_TOL) {
    TSIL_Warn("TSIL_dBds", "dBds(x,y) is undefined at threshold.");
    return TSIL_Infinity;
  }

  if (TSIL_CABS(1.0L - s/psxy) < TSIL_TOL) {
    return (0.5L * alphax * (1.0L + sqrty/sqrtx) 
	    - 0.5L * alphay * (1.0L + sqrtx/sqrty)
	    + 2.0L * (sqrty - sqrtx) )/TSIL_POW(sqrtx - sqrty,3);
  }

  Btemp = TSIL_B (x, y, s, qq);

  result = (0.5L/s) * (
           (thxy * Btemp - s + (sqrtx + sqrty)*(alphax + alphay))/(s - thxy)
         + (psxy * Btemp - s + (sqrtx - sqrty)*(alphax - alphay))/(s - psxy));
 
  return result;
}
示例#6
0
SUMO_COMPLEX SUMO_V2_strong (void)
{ 
  int i,j;
  TSIL_REAL g3sq = g3*g3;
  TSIL_REAL qq = Q2;
  TSIL_COMPLEX V2_strong_sqsq = 0.0L;
  TSIL_COMPLEX V2_strong_qgluinosq = 0.0L;
  TSIL_COMPLEX V2_strong_sqsqg = 0.0L;
  TSIL_COMPLEX V2_strong_qqg;
  
  /* ------------------------------------------------------------------- */
  /* hep-ph/0206136 eq. (3.14) */

  for (i=0; i<2; i++) {
    V2_strong_sqsq += SUMO_Fvac_SS (m2_suL[i], m2_suL[i], qq);
    V2_strong_sqsq += SUMO_Fvac_SS (m2_sdL[i], m2_sdL[i], qq);
    V2_strong_sqsq += SUMO_Fvac_SS (m2_suR[i], m2_suR[i], qq);
    V2_strong_sqsq += SUMO_Fvac_SS (m2_sdR[i], m2_sdR[i], qq);
  }

  for (i=0; i<2; i++) {
    for (j=0; j<2; j++) {
      V2_strong_sqsq +=
	SUMO_Fvac_SS (m2_stop[i], m2_stop[j], qq) *
	TSIL_POW(TSIL_CABS((Lstop[i]) * (Lstopc[j])
			   -(Rstop[i]) * (Rstopc[j])),2);

      V2_strong_sqsq +=
	SUMO_Fvac_SS (m2_sbot[i], m2_sbot[j], qq) *
	TSIL_POW(TSIL_CABS((Lsbot[i]) * (Lsbotc[j])
			   -(Rsbot[i]) * (Rsbotc[j])),2);
    }}

  V2_strong_sqsq *= 2.0L * g3sq;

  /* ------------------------------------------------------------------- */
  /* equation (3.25) */

  for (i=0; i<2; i++) {
    V2_strong_qgluinosq +=
      SUMO_Fvac_FFS (0.L, m2_gluino, m2_suL[i], qq);
    V2_strong_qgluinosq +=
      SUMO_Fvac_FFS (0.L, m2_gluino, m2_sdL[i], qq);
    V2_strong_qgluinosq +=
      SUMO_Fvac_FFS (0.L, m2_gluino, m2_suR[i], qq);
    V2_strong_qgluinosq +=
      SUMO_Fvac_FFS (0.L, m2_gluino, m2_sdR[i], qq);
    V2_strong_qgluinosq +=
      SUMO_Fvac_FFS (m2_bot, m2_gluino, m2_sbot[i], qq);
    V2_strong_qgluinosq +=
      SUMO_Fvac_FFS (m2_top, m2_gluino, m2_stop[i], qq);
    V2_strong_qgluinosq +=
      - 2.0L * TSIL_CREAL((Lsbot[i]) * (Rsbotc[i])) *
      SUMO_Fvac_ffS (m2_bot, m2_gluino, m2_sbot[i], qq);
    V2_strong_qgluinosq +=
      - 2.0L * TSIL_CREAL((Lstop[i]) * (Rstopc[i])) *
      SUMO_Fvac_ffS (m2_top, m2_gluino, m2_stop[i], qq);
  }

  V2_strong_qgluinosq *= 8.0L*g3sq;

  /* ------------------------------------------------------------------- */
  /* equation (3.48) */

  for (i=0; i<2; i++) {
    V2_strong_sqsqg +=
      SUMO_Fvac_SSV (m2_suL[i], m2_suL[i], 0.0L, qq);
    V2_strong_sqsqg +=
      SUMO_Fvac_SSV (m2_sdL[i], m2_sdL[i], 0.0L, qq);
    V2_strong_sqsqg +=
      SUMO_Fvac_SSV (m2_suR[i], m2_suR[i], 0.0L, qq);
    V2_strong_sqsqg +=
      SUMO_Fvac_SSV (m2_sdR[i], m2_sdR[i], 0.0L, qq);
    V2_strong_sqsqg +=
      SUMO_Fvac_SSV (m2_stop[i], m2_stop[i], 0.0L, qq);
    V2_strong_sqsqg +=
      SUMO_Fvac_SSV (m2_sbot[i], m2_sbot[i], 0.0L, qq);
  }

  V2_strong_sqsqg *= 2.0L*g3sq;

  /* ------------------------------------------------------------------- */
  /* equation (3.61) */

  V2_strong_qqg = 4.0L*g3sq*(
      SUMO_Fvac_FFV (m2_top, m2_top, 0.0L, qq)
    + SUMO_Fvac_FFV (m2_bot, m2_bot, 0.0L, qq)
    - SUMO_Fvac_ffV (m2_top, m2_top, 0.0L, qq)
    - SUMO_Fvac_ffV (m2_bot, m2_bot, 0.0L, qq)
      );

  /* ------------------------------------------------------------------- */

  return (SUMO_twoloopfactor * 
    (V2_strong_sqsq + V2_strong_qgluinosq + V2_strong_sqsqg + V2_strong_qqg));
}
示例#7
0
void PowellMin (TSIL_REAL p[],
		TSIL_REAL **xi,
		int n,
		TSIL_REAL ftol,
		int *iter,
		TSIL_REAL *fret,
		TSIL_REAL (*func)(TSIL_REAL []))
{
  int i, ibig, j;
  TSIL_REAL del, fp, fptt, t, *pt, *ptt, *xit;

  pt  = (TSIL_REAL *) calloc (n, sizeof(TSIL_REAL));
  ptt = (TSIL_REAL *) calloc (n, sizeof(TSIL_REAL));
  xit = (TSIL_REAL *) calloc (n, sizeof(TSIL_REAL));

  *fret = (*func)(p);
/*   printf("Initial fret = %Lf\n", *fret); */

  for (j=0; j<n; j++) pt[j] = p[j];

  for (*iter=1; ; ++(*iter)) {

    fp = *fret;
    ibig = 0;
    del = 0.0;
    for (i=0; i<n; i++) {
      for (j=0; j<n; j++) xit[j] = xi[j][i];
      fptt = *fret;
      linmin (p, xit, n, fret, func);
      if (fptt - *fret > del) {
	del = fptt - *fret;
	ibig = i;
      }
    }
    if (2.0L*(fp-(*fret)) <= ftol*(TSIL_FABS(fp)+TSIL_FABS(*fret))+TINY) {

/*       printf("Powell exiting...\n"); */
/*       printf("fp   = %Lf\n", fp); */
/*       printf("fret = %Lf\n", *fret); */

      free (xit);
      free (ptt);
      free (pt);
      return;
    }
    if (*iter == ITMAX)
      TSIL_Error ("PowellMin", "Max iterations exceeded", 42);

    for (j=0; j<n; j++) {
      ptt[j] = 2.0L*p[j] - pt[j];
      xit[j] = p[j] - pt[j];
      pt[j] = p[j];
    }
    fptt = (*func)(ptt);
    if (fptt < fp) {
      t = 2.0L*(fp - 2.0L*(*fret) + fptt)*TSIL_POW(fp - (*fret) - del, 2)
	- del*TSIL_POW(fp - fptt, 2);
      if (t < 0.0) {
	linmin (p, xit, n, fret, func);
	for (j=0; j<n; j++) {
	  xi[j][ibig] = xi[j][n-1];
	  xi[j][n-1] = xit[j];
	}
      }
    }
  }
}