Flavour/src/bsgamma.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 HEPfit Collaboration
3  * All rights reserved.
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 #include "Flavour.h"
9 #include "bsgamma.h"
10 #include <gslpp_complex.h>
11 #include <gsl/gsl_sf_dilog.h>
12 #include <gsl/gsl_sf_zeta.h>
13 #include <gsl/gsl_sf_clausen.h>
14 #include <boost/bind.hpp>
15 
16 Bsgamma::Bsgamma(const StandardModel& SM_i, int obsFlag)
17 : ThObservable(SM_i),
18 Intbc_cache(2, 0.)
19 {
20  if (SM.ModelName().compare("StandardModel") != 0 && SM.ModelName().compare("FlavourWilsonCoefficient") != 0) std::cout << "\nWARNING: b to s gamma not implemented in: " + SM.ModelName() + " model, returning Standard Model value.\n" << std::endl;
21 
22  if (obsFlag > 0 and obsFlag < 3) obs = obsFlag;
23  else throw std::runtime_error("obsFlag in bsgamma can only be 1 (BR) or 2 (BR_CPodd)");
24 
25  Intb1Cached = 0;
26  Intb2Cached = 0;
27  Intb3Cached = 0;
28  Intb4Cached = 0;
29  Intbb1Cached = 0;
30  Intbb2Cached = 0;
31  Intbb4Cached = 0;
32  Intbc1Cached = 0;
33  Intbc2Cached = 0;
34  Intc1Cached = 0;
35  Intc2Cached = 0;
36  Intc3Cached = 0;
37  Intcc1Cached = 0;
38 
39  w_INT = gsl_integration_cquad_workspace_alloc (100);
40 }
41 
43 {
44  if (Mb_kin == Intb_cache)
45  Intb_updated = 1;
46  else {
48  Intb_updated = 0;
49  }
50 
51  if (Mb_kin == Intbc_cache(0) && Mc == Intbc_cache(1))
52  Intbc_updated = 1;
53  else {
54  Intbc_cache(0) = Mb_kin;
55  Intbc_cache(1) = Mc;
56  Intbc_updated = 0;
57  }
58 }
59 
60 double Bsgamma::delta(double E0)
61 {
62  return 1. - 2.*E0/Mb_kin;
63 }
64 
65 double Bsgamma::rho(double E0)
66 {
67  double d=delta(E0);
68  double d4=d*d*d*d;
69 
70  return d + d4/6. + log(1. - d);
71 }
72 
73 double Bsgamma::omega(double E0)
74 {
75  double d=delta(E0);
76  double d2=d*d;
77  double d3=d2*d;
78  double d4=d3*d;
79 
80  return 3./2. * d2 - 2. * d3 + d4;
81 }
82 
83 double Bsgamma::T1(double E0,double t)
84 {
85  double d=delta(E0);
86  double d2=d*d;
87  double d3=d2*d;
88  double d4=d3*d;
89 
90  double Li2 = gsl_sf_dilog(d);
91 
92  return 109./18. * d + 17./18. * d2 - 191./108. * d3 + 23./16. * d4
93  + 79./18. * log(1. - d) - 5./3. * Li2
94  - (5./3. * rho(E0) + 2./9. * omega(E0)) * log(t*d)
95  /* + rho(E0)/9.*log(ms^5/(mu^4*md)) */;
96 }
97 
98 double Bsgamma::T2(double E0,double t)
99 {
100  double d=delta(E0);
101  double d2=d*d;
102  double d3=d2*d;
103  double d4=d3*d;
104 
105  double Li2 = gsl_sf_dilog(d);
106 
107  return 187./108. * d + 7./18. * d2 - 395./648. * d3 + 1181./2592. * d4
108  + 133./108. * log(1. - d) - Li2/2.
109  - (rho(E0)/2. + 2./27. * omega(E0)) * log(t*d)
110  /* + rho(E0)/9.*log(ms/mu) */;
111 }
112 
113 double Bsgamma::T3(double E0,double t)
114 {
115  double d=delta(E0);
116  double d2=d*d;
117  double d3=d2*d;
118  double d4=d3*d;
119 
120  double Li2 = gsl_sf_dilog(d);
121 
122  return 35./162. * d + 1./72. * d2 - 89./1944. * d3 + 341./7776. * d4
123  + 13./81. * log(1. - d) - Li2/18.
124  - (rho(E0)/18. + omega(E0)/162.) * log(t*d);
125 }
126 
127 double Bsgamma::P0_4body(double E0, double t)
128 {
129  gslpp::complex A1 =-C1_0*CKMu;
130  gslpp::complex A2 =-C2_0*CKMu;
131 
132  return (C3_0.abs2() + 20. * (C3_0*C5_0).real() + 2./9. * C4_0.abs2()
133  + 40./9. * (C4_0*C6_0).real() + 136. * C5_0.abs2()
134  + 272./9. * C6_0.abs2()) * T1(E0,t)
135  + (2./9. * A1.abs2() + A2.abs2()
136  + (8./9. * C3_0.real()
137  - 4./27. * C4_0.real() + 128./9. * C5_0.real()
138  - 64./27. * C6_0.real()) * A1.real()
139  +(2./3. * C3_0.real() + 8./9. * C4_0.real() + 32./3. * C5_0.real()
140  + 128./9. * C6_0.real()) * A2.real()) * T2(E0,t)
141  + (C3_0.abs2() + 8./3. * (C3_0*C4_0).real() + 32. * (C3_0*C5_0).real()
142  + 128./3. * (C3_0*C6_0).real() - 2./9. * C4_0.abs2()
143  + 128./3. * (C4_0*C5_0).real() - 64./9. * (C4_0*C6_0).real()
144  + 256. * C5_0.abs2() + 2048./3 * (C5_0*C6_0).real()
145  - 512./9. * C6_0.abs2()) * T3(E0,t);
146 }
147 
149 {
150  return Mc*Mc/Mb_kin/Mb_kin;
151 }
152 
154 {
155  double zeta3 = gsl_sf_zeta_int(3);
156 
157  double z2=z*z;
158  double z3=z2*z;
159  double z4=z3*z;
160  double z5=z4*z;
161  double z6=z5*z;
162 
163  double L=log(z);
164  double L2=L*L;
165  double L3=L2*L;
166 
167  double pi2=M_PI*M_PI;
168 
169  if (z == 1.) return 4.0859 + 4./9. * M_PI * gslpp::complex::i();
170  else return 16./9. * ( ( 5./2. - pi2/3. - 3.*zeta3
171  + ( 5./2. - 3./4.*pi2 )*L + L2/4. + L3/12. )*z
172  + ( 7./4. + 2./3.*pi2 - pi2*L/2. - L2/4. + L3/12. )*z2
173  + ( -7./6. - pi2/4. + 2*L - 3./4.*L2 )*z3
174  + ( 457./216. - 5./18*pi2 - L/72. - 5./6.*L2 )*z4
175  + ( 35101./8640. - 35./72.*pi2 - 185./144.*L - 35./24.*L2 )*z5
176  + ( 67801./8000. - 21./20.*pi2 - 3303./800.*L - 63./20.*L2 )*z6 +
177  gslpp::complex::i()*M_PI*( ( 2. - pi2/6. + L/2. + L2/2. )*z
178  + ( 1./2. - pi2/6. - L + L2/2. )*z2
179  + z3 + 5./9.*z4 + 49./72.*z5 + 231./200.*z6) );
180 }
181 
183 {
184  double z2=z*z;
185  double z3=z2*z;
186  double z4=z3*z;
187  double z5=z4*z;
188  double z6=z5*z;
189 
190  double L=log(z);
191  double L2=L*L;
192 
193  double pi2=M_PI*M_PI;
194 
195  if (z == 1.) return 0.0316 + 4./81. * M_PI * gslpp::complex::i();
196  else return -8./9. * ( ( -3. + pi2/6. - L )*z - 2./3.*pi2*pow(z,3./2.)
197  + ( 1./2. + pi2 -2.*L - L2/2. )*z2
198  + ( -25./12. - pi2/9. - 19./18.*L + 2.*L2 )*z3
199  + ( -1376./225. + 137./30.*L + 2.*L2 + 2./3.*pi2 )*z4
200  + ( -131317./11760. + 887./84.*L + 5.*L2 + 5./3.*pi2 )*z5
201  + ( -2807617./97200. + 16597./540.*L + 14.*L2 + 14./3.*pi2 )*z6 +
202  gslpp::complex::i()*M_PI*( -z + ( 1 - 2.*L )*z2
203  + ( -10./9. + 4./3.*L )*z3 + z4 + 2./3.*z5 + 7./9.*z6) );
204 }
205 
206 gslpp::complex Bsgamma::r1(int i, double z)
207 {
208  double Xb = -0.16844083981858157;
209 
210  switch(i){
211  case 1:
212  return 833./729. - (a(z) + b(z))/3. + 40./243.*gslpp::complex::i()*M_PI;
213  case 2:
214  return - 1666./243. + 2.*(a(z) + b(z)) - 80./81.*gslpp::complex::i()*M_PI;
215  case 3:
216  return 2392./243. + 8.*M_PI/3./sqrt(3.) + 32./9.*Xb - a(1.) + 2.*b(1.) + 56./81.*gslpp::complex::i()*M_PI;
217  case 4:
218  return -761./729. - 4.*M_PI/9./sqrt(3.) - 16./27.*Xb + a(1.)/6. + 5.*b(1.)/3. + 2.*b(z) - 148./243.*gslpp::complex::i()*M_PI;
219  case 5:
220  return 56680./243. + 32.*M_PI/3./sqrt(3.) + 128./9.*Xb - 16.*a(1.) + 32.*b(1.) + 896./81.*gslpp::complex::i()*M_PI;
221  case 6:
222  return 5710./729. - 16.*M_PI/9./sqrt(3.) - 64./27.*Xb - 10./3.*a(1.) + 44./3.*b(1.) + 12.*a(z) + 20.*b(z)
223  - 2296./243.*gslpp::complex::i()*M_PI;
224  case 8:
225  return 44./9. - 8./27.*M_PI*M_PI + 8./9.*gslpp::complex::i()*M_PI;
226  default:
227  std::stringstream out;
228  out << i;
229  throw std::runtime_error("Bsgamma::r1(): index " + out.str() + " not implemented");
230  }
231 }
232 
234 {
235  if (t<4) return -2. * atan( sqrt(t/(4.-t)) ) * atan( sqrt(t/(4.-t)) );
236  else return -M_PI*M_PI/2. + 2.*log( ( sqrt(t) + sqrt(t-4.) ) / 2. )*log( ( sqrt(t) + sqrt(t-4.) ) / 2. )
237  - 2.*gslpp::complex::i()*M_PI*log( ( sqrt(t) + sqrt(t-4.) ) / 2. );
238 }
239 
240 
241 gslpp::complex Bsgamma::kappa(double Mq,double t)
242 {
243  double s = t * Mb_kin*Mb_kin/Mq/Mq;
244  return 1./2. + Gamma_t(s)/s;
245 }
246 
247 double Bsgamma::Int_b1(double E0)
248 {
249  if (Intb1Cached == 0) {
250  double t1 = (1. - delta(E0));
251 
252  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_re_1mt, &(*this), _1));
253  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
254  double mt = avaINT;
255 
256  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_re_1mt2, &(*this), _1));
257  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
258  double mt2 = avaINT;
259 
260  CacheIntb1 = delta(E0)*mt + mt2;
261  Intb1Cached = 1;
262  }
263 
264  return CacheIntb1;
265 }
266 
267 double Bsgamma::Int_b2(double E0)
268 {
269  if (Intb2Cached == 0) {
270  double t1 = (1. - delta(E0));
271 
272  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_re_t_1mt, &(*this), _1));
273  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
274  double mt = avaINT;
275 
276  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_re_t_1mt2, &(*this), _1));
277  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
278  double mt2 = avaINT;
279 
280  CacheIntb2 = delta(E0)*mt + mt2;
281  Intb2Cached = 1;
282  }
283 
284  return CacheIntb2;
285 }
286 
287 double Bsgamma::Int_b3(double E0)
288 {
289  if (Intb3Cached == 0) {
290  double t1 = (1. - delta(E0));
291 
292  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_re_t, &(*this), _1));
293  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
294  double t = avaINT;
295 
296  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_re_t_1mt, &(*this), _1));
297  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
298  double mt = avaINT;
299 
300  CacheIntb3 = delta(E0)*t + mt;
301  Intb3Cached = 1;
302  }
303 
304  return CacheIntb3;
305 }
306 
307 double Bsgamma::Int_b4(double E0)
308 {
309  if (Intb4Cached == 0) {
310  double t1 = (1. - delta(E0));
311 
312  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_re_t2_1mt, &(*this), _1));
313  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
314  double mt = avaINT;
315 
316  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_re_t2_1mt2, &(*this), _1));
317  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
318  double mt2 = avaINT;
319 
320  CacheIntb4 = delta(E0)*mt + mt2;
321  Intb4Cached = 1;
322  }
323 
324  return CacheIntb4;
325 }
326 
327 double Bsgamma::Int_bb1(double E0)
328 {
329  if (Intbb1Cached == 0) {
330  double t1 = (1. - delta(E0));
331 
332  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_abs2_1mt, &(*this), _1));
333  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
334  double mt = avaINT;
335 
336  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_abs2_1mt2, &(*this), _1));
337  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
338  double mt2 = avaINT;
339 
340  CacheIntbb1 = delta(E0)*mt + mt2;
341  Intbb1Cached = 1;
342  }
343 
344  return CacheIntbb1;
345 }
346 
347 double Bsgamma::Int_bb2(double E0)
348 {
349  if (Intbb2Cached == 0) {
350  double t1 = (1. - delta(E0));
351 
352  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_abs2_t_1mt, &(*this), _1));
353  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
354  double mt = avaINT;
355 
356  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_abs2_t_1mt2, &(*this), _1));
357  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
358  double mt2 = avaINT;
359 
360  CacheIntbb2 = delta(E0)*mt + mt2;
361  Intbb2Cached = 1;
362  }
363 
364  return CacheIntbb2;
365 }
366 
367 double Bsgamma::Int_bb4(double E0)
368 {
369  if (Intbb4Cached == 0) {
370  double t1 = (1. - delta(E0));
371 
372  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_abs2_t2_1mt, &(*this), _1));
373  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
374  double mt = avaINT;
375 
376  INT = convertToGslFunction(boost::bind(&Bsgamma::getKb_abs2_t2_1mt2, &(*this), _1));
377  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
378  double mt2 = avaINT;
379 
380  CacheIntbb4 = delta(E0)*mt + mt2;
381  Intbb4Cached = 1;
382  }
383 
384  return CacheIntbb4;
385 }
386 
387 double Bsgamma::Int_bc1(double E0)
388 {
389  if (Intbc1Cached == 0) {
390  double t1 = (1. - delta(E0));
391 
392  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_Kb_1mt, &(*this), _1));
393  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
394  double mt = avaINT;
395 
396  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_Kb_1mt2, &(*this), _1));
397  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
398  double mt2 = avaINT;
399 
400  CacheIntbc1 = delta(E0)*mt + mt2;
401  Intbc1Cached = 1;
402  }
403 
404  return CacheIntbc1;
405 }
406 
407 double Bsgamma::Int_bc2(double E0)
408 {
409  if (Intbc2Cached == 0) {
410  double t1 = (1. - delta(E0));
411 
412  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_Kb_t_1mt, &(*this), _1));
413  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
414  double mt = avaINT;
415 
416  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_Kb_t_1mt2, &(*this), _1));
417  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
418  double mt2 = avaINT;
419 
420  CacheIntbc2 = delta(E0)*mt + mt2;
421  Intbc2Cached = 1;
422  }
423 
424  return CacheIntbc2;
425 }
426 
427 double Bsgamma::Int_c1(double E0)
428 {
429  if (Intc1Cached == 0) {
430  double t1 = (1. - delta(E0));
431 
432  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_1mt, &(*this), _1));
433  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
434  double mt = avaINT;
435 
436  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_1mt2, &(*this), _1));
437  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
438  double mt2 = avaINT;
439 
440  CacheIntc1 = delta(E0)*mt + mt2;
441  Intc1Cached = 1;
442  }
443 
444  return CacheIntc1;
445 }
446 
447 double Bsgamma::Int_c1_im(double E0)
448 {
449  if (Intc1imCached == 0) {
450  double t1 = (1. - delta(E0));
451 
452  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_im_1mt, &(*this), _1));
453  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
454  double mt = avaINT;
455 
456  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_im_1mt2, &(*this), _1));
457  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
458  double mt2 = avaINT;
459 
460  CacheIntc1im = delta(E0)*mt + mt2;
461  Intc1imCached = 1;
462  }
463 
464  return CacheIntc1im;
465 }
466 
467 double Bsgamma::Int_c2(double E0)
468 {
469  if (Intc2Cached == 0) {
470  double t1 = (1. - delta(E0));
471 
472  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_t_1mt, &(*this), _1));
473  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
474  double mt = avaINT;
475 
476  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_t_1mt2, &(*this), _1));
477  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
478  double mt2 = avaINT;
479 
480  CacheIntc2 = delta(E0)*mt + mt2;
481  Intc2Cached = 1;
482  }
483 
484  return CacheIntc2;
485 }
486 
487 double Bsgamma::Int_c3(double E0)
488 {
489  if (Intc3Cached == 0) {
490  double t1 = (1. - delta(E0));
491 
492  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_t, &(*this), _1));
493  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
494  double t = avaINT;
495 
496  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_re_t_1mt, &(*this), _1));
497  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
498  double mt = avaINT;
499 
500  CacheIntc3 = delta(E0)*t + mt;
501  Intc3Cached = 1;
502  }
503 
504  return CacheIntc3;
505 }
506 
507 double Bsgamma::Int_cc(double E0)
508 {
509  if (IntccCached == 0) {
510  double t1 = (1. - delta(E0));
511 
512  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_abs2_t, &(*this), _1));
513  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
514  double mt = avaINT;
515 
516  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_abs2_t_1mt, &(*this), _1));
517  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
518  double mt2 = avaINT;
519 
520  CacheIntcc = delta(E0)*mt + 2. * mt2;
521  IntccCached = 1;
522  }
523 
524  return CacheIntcc;
525 }
526 
527 double Bsgamma::Int_cc1(double E0)
528 {
529  if (Intcc1Cached == 0) {
530  double t1 = (1. - delta(E0));
531 
532  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_abs2_1mt, &(*this), _1));
533  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
534  double mt = avaINT;
535 
536  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_abs2_1mt2, &(*this), _1));
537  if (gsl_integration_cquad(&INT, t1, 1., 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
538  double mt2 = avaINT;
539 
540  CacheIntcc1 = delta(E0)*mt + mt2;
541  Intcc1Cached = 1;
542  }
543 
544  return CacheIntcc1;
545 }
546 
547 double Bsgamma::Int_cc1_part1(double E0)
548 {
549  if (Intcc1p1Cached == 0) {
550  double t1 = (1. - delta(E0));
551 
552  INT = convertToGslFunction(boost::bind(&Bsgamma::getKc_abs2_1mt, &(*this), _1));
553  if (gsl_integration_cquad(&INT, 0., t1, 1.e-2, 1.e-1, w_INT, &avaINT, &errINT, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
554 
555  CacheIntcc1p1 = delta(E0)*avaINT;
556  Intcc1p1Cached = 1;
557  }
558 
559  return CacheIntcc1p1;
560 }
561 
562 double Bsgamma::ff7_dMP(double E0)
563 {
564  if (FOUR_BODY){
565  double d=delta(E0);
566  double d2=d*d;
567  double d3=d2*d;
568 
569  return 4. * d * (18. - 33.*d + 2.*d2 + 13.*d3 - 6.* d2 * (2. + d) * log(d))
570  / (81. * (d - 1.));
571  }
572  else
573  return 0.;
574 }
575 
576 double Bsgamma::ff7_sMP(double E0)
577 {
578  if (FOUR_BODY){
579  double d=delta(E0);
580  double d2=d*d;
581  double d3=d2*d;
582 
583  return (-2. * d * (72. + 39.*d - 76.*d2 - 35.*d3
584  + 6.*d*(18. + 13.*d + 2.*d2)*log(d))) / (243.*(d - 1.));
585  }
586  else
587  return 0.;
588 }
589 
590 double Bsgamma::ff8_dMP(double E0)
591 {
592  if (FOUR_BODY){
593  double d=delta(E0);
594  double d2=d*d;
595  double d3=d2*d;
596  double ld = log(d);
597  double l1d = log(1. - d);
598  double Li2 = gsl_sf_dilog(d);
599 
600  return -136./27. * d - 724./81. * d2 + 20./27. * d3
601  + (-8./9. + 16./9. * d - 8./9. * d2) * l1d* l1d
602  + (32./27. * d + 76./27. * d2 - 16./81. * d3) * ld
603  + (-104./27. - 80./9. * d + 40./9. * d2 + (32./27.
604  + 32./9. * d - 16./9. * d2) * ld) * l1d
605  + (-64./27. * d - 152./27. * d2 + 32./81. * d3
606  + (-64./27. - 64./9. * d + 32./9. * d2) * l1d) * log(Ms/Mb_kin)
607  + (32./27. + 32./9. * d - 16./9. * d2) * Li2;
608  }
609  else
610  return 0.;
611 }
612 
613 double Bsgamma::ff8_sMP(double E0)
614 {
615  if (FOUR_BODY){
616  double d=delta(E0);
617  double d2=d*d;
618  double d3=d2*d;
619  double ld = log(d);
620  double l1d = log(1. - d);
621  double Li2 = gsl_sf_dilog(d);
622 
623  return -340./243. * d - 104./81. * d2 + 16./729. * d3
624  + (-4./27. + 8./27. * d - 4./27. * d2) * l1d* l1d
625  + (8./27. * d + 4./9. * d2) * ld
626  + (-16./27. * d - 8./9. * d2) * log(Ms/Mb_kin)
627  + (-268./243. - 40./27. * d + 20./27. * d2 + (8./27.
628  + 16./27. * d - 8./27. * d2) * ld
629  + (-16./27. - 32./27. * d + 16./27. * d2) * log(Ms/Mb_kin)) * l1d
630  + (8./27. + 16./27. * d - 8./27. * d2) * Li2;
631  }
632  else
633  return 0.;
634 }
635 
636 double Bsgamma::Phi11_1(double E0)
637 {
638  return Phi22_1(E0)/36.;
639 }
640 
641 double Bsgamma::Phi12_1(double E0)
642 {
643  return -Phi22_1(E0)/3.;
644 }
645 
646 double Bsgamma::Phi13_1(double E0)
647 {
648  return -Phi23_1(E0)/6.;
649 }
650 
651 double Bsgamma::Phi14_1(double E0)
652 {
653  return -Phi24_1(E0)/6.;
654 }
655 
656 double Bsgamma::Phi15_1(double E0)
657 {
658  return -Phi25_1(E0)/6.;
659 }
660 
661 double Bsgamma::Phi16_1(double E0)
662 {
663  return -Phi26_1(E0)/6.;
664 }
665 
666 double Bsgamma::Phi17_1(double E0, double z)
667 {
668  return -Phi27_1(E0,z)/6.;
669 }
670 
671 double Bsgamma::Phi18_1(double E0, double z)
672 {
673  return Phi27_1(E0,z)/18.;
674 }
675 
676 double Bsgamma::Phi22_1(double E0)
677 {
678  return 16./27. * Int_cc1(E0);
679 }
680 
681 double Bsgamma::Phi23_1_4body(double E0)
682 {
683  if (FOUR_BODY)
684  return 0.0039849625073434735;
685  else
686  return 0.;
687 }
688 
689 double Bsgamma::Phi23_1(double E0)
690 {
691  return -8./27. * (Int_c1(E0) + Int_c2(E0) + 2.*Int_bc1(E0) - 2.*Int_bc2(E0))
692  - Phi23_1_4body(E0);
693 }
694 
695 double Bsgamma::Phi24_1_4body(double E0)
696 {
697  if (FOUR_BODY)
698  return 0.012330977673588935;
699  else
700  return 0.;
701 }
702 
703 double Bsgamma::Phi24_1(double E0)
704 {
705  return -1./6. * (Phi23_1(E0) + Phi23_1_4body(E0))
706  - Phi24_1_4body(E0);
707 }
708 
709 double Bsgamma::Phi25_1_4body(double E0)
710 {
711  if (FOUR_BODY)
712  return 0.06375940011749558;
713  else
714  return 0.;
715 }
716 
717 double Bsgamma::Phi25_1(double E0)
718 {
719  return -32./27. * (4.*Int_c1(E0) + Int_c2(E0) + 8.*Int_bc1(E0) - 2.*Int_bc2(E0))
720  - Phi25_1_4body(E0);
721 }
722 
723 double Bsgamma::Phi26_1_4body(double E0)
724 {
725  if (FOUR_BODY)
726  return 0.11932481422855279;
727  else
728  return 0.;
729 }
730 
731 double Bsgamma::Phi26_1(double E0)
732 {
733  return 16./81. * (4.*Int_c1(E0) + Int_c2(E0) - 10.*Int_bc1(E0) - 2.*Int_bc2(E0) + 36.*Int_cc1(E0))
734  - Phi26_1_4body(E0);
735 }
736 
737 double Bsgamma::Phi27_1(double E0, double z)
738 {
739  double d = delta(E0);
740  double d2 = d*d;
741  double Pi2 = M_PI*M_PI;
742  double st0 = sqrt(1. - 4.*z);
743  double std = sqrt( (1. - d - 4.*z) * (1. - d) );
744  double L0 = log( ( 1. + st0 ) / ( 2.*sqrt(z) ) );
745  double Ld = log( ( sqrt(1. - d) + sqrt(1. - d - 4.*z) ) / ( 2.*sqrt(z) ) );
746 
747  if (d == 1) {
748  return -2./27. + (2.*Pi2 - 7.)/9. * z + 4.*(3. - 2.*Pi2)/9. * z * z
749  + 4./3. * z * (1. - 2.*z) * st0 * L0
750  - 8./9. * z * (6.*z*z - 4.*z + 1.) * L0*L0 + 4./3. * Pi2 * z * z *z;
751  } else return -2./27. * d * (3. - 3.*d + d2) + (2.*Pi2 - 7.)/9. * z * d * (2. - d)
752  + 4.*(3. - 2.*Pi2)/9. * z * z * d
753  + 4./3. * z * (1. - 2.*z) * ( st0 * L0 - std * Ld )
754  + 4./3. * z * d * std * Ld
755  - 8./9. * z * (6.*z*z - 4.*z + 1.) * ( L0*L0 - Ld*Ld )
756  - 8./9. * z * d * (2. - d - 4.*z) * Ld * Ld;
757 }
758 
759 double Bsgamma::Phi27_1_im(double E0, double z)
760 {
761  if (z >= 1./4.)
762  throw std::runtime_error("Bsgamma::Phi27_1_im(): z can not be greater than 1/4");
763 
764  double d = delta(E0);
765  double z2 = z*z;
766  double st0 = sqrt(1. - 4.*z);
767  double std = sqrt( (1. - d - 4.*z) * (1. - d) );
768  double L0 = log( ( 1. + st0 ) / ( 2.*sqrt(z) ) );
769  double Ld = log( ( sqrt(1. - d) + sqrt(1. - d - 4.*z) ) / ( 2.*sqrt(z) ) );
770 
771  if (z < (1. - d)/4.)
772  return 8./9. * M_PI * z * ( (1. - 4. * z + 6. * z2)* (L0-Ld) - 3./4. * (1. - 2. * z) * (st0-std)
773  + d * (2. - d - 4. * z) * Ld - 3./4. * d * std );
774  else
775  return 8./9. * M_PI * z * ( (1. - 4. * z + 6. * z2) * L0 - 3./4. * (1. - 2. * z) * st0 );
776 }
777 
778 double Bsgamma::Phi28_1(double E0, double z)
779 {
780  return -Phi27_1(E0, z)/3.;
781 }
782 
783 double Bsgamma::Phi33_1(double E0)
784 {
785  double d=delta(E0);
786  double d2=d*d;
787  double d3=d2*d;
788  double d4=d3*d;
789 
790  return 2./27. * (Int_b1(E0) + 8.*Int_b2(E0) - 4.*Int_b4(E0)
791  + 33.*Int_bb1(E0) - 20.*Int_bb2(E0) + 4.*Int_bb4(E0))
792  + 1./18. * d * ( 1./2. - 1./2.*d2 + 1./3.*d3 - 1./15.*d4 );
793 }
794 
795 double Bsgamma::Phi34_1(double E0)
796 {
797  return -1./3.*Phi33_1(E0);
798 }
799 
800 double Bsgamma::Phi35_1(double E0)
801 {
802  double d=delta(E0);
803  double d2=d*d;
804  double d3=d2*d;
805  double d4=d3*d;
806 
807  return 32./27. * (2.*Int_b1(E0) + 4.*Int_b2(E0) - 2.*Int_b4(E0)
808  + 18.*Int_bb1(E0) - 13.*Int_bb2(E0) + 2.*Int_bb4(E0))
809  + 4./9. * d * ( 4./3. - d2 + 1./2.*d3 - 1./15.*d4 );
810 }
811 
812 double Bsgamma::Phi36_1(double E0)
813 {
814  double d=delta(E0);
815  double d2=d*d;
816  double d3=d2*d;
817  double d4=d3*d;
818 
819  return 8./81. * (5.*Int_b1(E0) + Int_b2(E0) + 4.*Int_b4(E0)
820  - 18.*Int_bb1(E0) + 8.*Int_bb2(E0) - 4.*Int_bb4(E0))
821  + 6. * (Phi23_1(E0) + Phi23_1_4body(E0))
822  - 2./27. * d * ( 4./3. - d2 + 1./2.*d3 - 1./15.*d4 );
823 }
824 
825 double Bsgamma::Phi37_1(double E0)
826 {
827  double d=delta(E0);
828  double d2=d*d;
829 
830  return -4./3. * Int_b3(E0) + 1./9. * d * (1. - d + 1./3.*d2) + 1./4.*ff7_sMP(E0);
831 }
832 
833 double Bsgamma::Phi38_1(double E0)
834 {
835  return -1./3. * ( Phi37_1(E0) - 1./4.*ff7_sMP(E0) ) + 1./4.*ff8_sMP(E0);
836 }
837 
838 double Bsgamma::Phi44_1(double E0)
839 {
840  return 1./36. * Phi33_1(E0);
841 }
842 
843 double Bsgamma::Phi45_1(double E0)
844 {
845  return -1./6. * Phi35_1(E0);
846 }
847 
848 double Bsgamma::Phi46_1(double E0)
849 {
850  return -1./6. * Phi36_1(E0);
851 }
852 
853 double Bsgamma::Phi47_1(double E0)
854 {
855  return -1./6. * ( Phi37_1(E0) - 1./4.*ff7_sMP(E0) )
856  + 1./4. * (-1./6. * ff7_sMP(E0) + ff7_dMP(E0));
857 }
858 
859 double Bsgamma::Phi48_1(double E0)
860 {
861  return -1./3. * (Phi47_1(E0) - 1./4. * (-1./6. * ff7_sMP(E0) + ff7_dMP(E0)) )
862  + 1./4. * (-1./6. * ff8_sMP(E0) + ff8_dMP(E0));
863 }
864 
865 double Bsgamma::Phi55_1(double E0)
866 {
867  double d=delta(E0);
868  double d2=d*d;
869  double d3=d2*d;
870  double d4=d3*d;
871 
872  return 128./27. * (4.*Int_b1(E0) + 2.*Int_b2(E0) - Int_b4(E0)
873  + 12.*Int_bb1(E0) - 8.*Int_bb2(E0) + Int_bb4(E0))
874  + 8./9. * d * ( 11./3. - 2.*d2 + 2./3.*d3 - 1./15.*d4 );
875 }
876 
877 double Bsgamma::Phi56_1(double E0)
878 {
879  double d=delta(E0);
880  double d2=d*d;
881  double d3=d2*d;
882  double d4=d3*d;
883 
884  return 32./81. * (20.*Int_b1(E0) + Int_b2(E0) + 4.*Int_b4(E0)
885  + 24.*Int_bb1(E0) + 14.*Int_bb2(E0) - 4.*Int_bb4(E0))
886  + 6. * (Phi25_1(E0) + Phi25_1_4body(E0))
887  - 8./27. * d * ( 11./3. - 2.*d2 + 2./3.*d3 - 1./15.*d4 );
888 }
889 
890 double Bsgamma::Phi57_1(double E0)
891 {
892  double d=delta(E0);
893  double d2=d*d;
894 
895  return 16./9. * d * ( 1. - d + 1./3.*d2) + 4. * ff7_sMP(E0);
896 }
897 
898 double Bsgamma::Phi58_1(double E0)
899 {
900  return -1./3. * (Phi57_1(E0) - 4. * ff7_sMP(E0))
901  + 4. * ff8_sMP(E0);
902 }
903 
904 double Bsgamma::Phi66_1(double E0)
905 {
906  double d=delta(E0);
907  double d2=d*d;
908  double d3=d2*d;
909  double d4=d3*d;
910 
911  return -8./243. * (56.*Int_b1(E0) + 10.*Int_b2(E0) + 4.*Int_b4(E0)
912  + 15.*Int_bb1(E0) - 4.*Int_bb2(E0) - 4.*Int_bb4(E0))
913  + 32./27. * (4.*Int_c1(E0) + Int_c2(E0) - Int_bc1(E0)
914  - 2.*Int_bc2(E0) + 9.*Int_cc1(E0))
915  + 2./81. * d * ( 11./3. - 2.*d2 + 2./3.*d3 - 1./15.*d4 );
916 }
917 
918 double Bsgamma::Phi67_1(double E0)
919 {
920  double d=delta(E0);
921  double d2=d*d;
922 
923  return 8./3. * (Int_b3(E0) - 2.*Int_c3(E0)) - 8./27. * d * ( 1. - d + 1./3.*d2)
924  + 1./4. * (-8./3. * ff7_sMP(E0) + 10. * ff7_dMP(E0));
925 }
926 
927 double Bsgamma::Phi68_1(double E0)
928 {
929  return -1./3. * (Phi67_1(E0) - 1./4. * (-8./3. * ff7_sMP(E0) + 10. * ff7_dMP(E0)) )
930  + 1./4. * (-8./3. * ff8_sMP(E0) + 10. * ff8_dMP(E0));
931 }
932 
933 double Bsgamma::Phi77_1(double E0)
934 {
935  double d=delta(E0);
936  double d2=d*d;
937  double d3=d2*d;
938 
939  return -2./3.*pow(log(d),2.) - 7./3.*log(d) - 31./9. + 10./3.*d + d2/3. - 2./9.*d3 + d*(d - 4.)*log(d)/3.;
940 }
941 
942 double Bsgamma::Phi78_1(double E0)
943 {
944  double d=delta(E0);
945  double d2=d*d;
946  double d3=d2*d;
947 
948  double Li2 = gsl_sf_dilog(1. - d);
949 
950  double pi2=M_PI*M_PI;
951 
952  return 8./9.*( Li2 - pi2/6. - d*log(d) + 9./4.*d - d2/4. + d3/12.);
953 }
954 
955 double Bsgamma::Phi88_1(double E0)
956 {
957  double d=delta(E0);
958  double d2=d*d;
959  double d3=d2*d;
960 
961  double Li2 = gsl_sf_dilog(1. - d);
962 
963  double pi2=M_PI*M_PI;
964 
965  return 1./27.*( -2.*log(Mb_kin/Ms)*( d2 + 2.*d + 4.*log(1. - d) ) + 4.*Li2 - 2./3.*pi2 - d*(2. + d)*log(d)
966  + 8.*log(1. - d) - 2./3.*d3 + 3.*d2 +7*d);
967 }
968 
969 double Bsgamma::Kij_1(int i, int j, double E0, double mu)
970 {
971  if (i > 8 || j>8 || i<1 || j<1) throw std::runtime_error("Bsgamma::Kij_1(): indexes (i,j) must be included in (1,..,8)");
972 
973  int temp;
974 
975  if (i > j) {temp=i; i=j; j=temp;}
976 
977  double gamma_i7[8] = {-208./243., 416./81., -176./81., -152./243., -6272./81., 4624./243., 32./3., -32./9.};
978  double K_ij[8][8];
979  double Lb = log(mu/Mb_kin);
980 
981  K_ij[0][0] = 4.*Phi11_1(E0);
982  K_ij[0][1] = 2.*Phi12_1(E0);
983  K_ij[0][2] = 2.*Phi13_1(E0);
984  K_ij[0][3] = 2.*Phi14_1(E0);
985  K_ij[0][4] = 2.*Phi15_1(E0);
986  K_ij[0][5] = 2.*Phi16_1(E0);
987  K_ij[0][6] = r1(1,zeta()).real() - gamma_i7[0]*Lb + 2.*Phi17_1(E0, zeta());
988  K_ij[0][7] = 2.*Phi18_1(E0, zeta());
989 
990  K_ij[1][1] = 4.*Phi22_1(E0);
991  K_ij[1][2] = 2.*Phi23_1(E0);
992  K_ij[1][3] = 2.*Phi24_1(E0);
993  K_ij[1][4] = 2.*Phi25_1(E0);
994  K_ij[1][5] = 2.*Phi26_1(E0);
995  K_ij[1][6] = r1(2,zeta()).real() - gamma_i7[1]*Lb + 2.*Phi27_1(E0, zeta());
996  K_ij[1][7] = 2.*Phi28_1(E0, zeta());
997 
998  K_ij[2][2] = 4.*Phi33_1(E0);
999  K_ij[2][3] = 2.*Phi34_1(E0);
1000  K_ij[2][4] = 2.*Phi35_1(E0);
1001  K_ij[2][5] = 2.*Phi36_1(E0);
1002  K_ij[2][6] = r1(3,zeta()).real() - gamma_i7[2]*Lb + 2.*Phi37_1(E0);
1003  K_ij[2][7] = 2.*Phi38_1(E0);
1004 
1005  K_ij[3][3] = 4.*Phi44_1(E0);
1006  K_ij[3][4] = 2.*Phi45_1(E0);
1007  K_ij[3][5] = 2.*Phi46_1(E0);
1008  K_ij[3][6] = r1(4,zeta()).real() - gamma_i7[3]*Lb + 2.*Phi47_1(E0);
1009  K_ij[3][7] = 2.*Phi48_1(E0);
1010 
1011  K_ij[4][4] = 4.*Phi55_1(E0);
1012  K_ij[4][5] = 2.*Phi56_1(E0);
1013  K_ij[4][6] = r1(5,zeta()).real() - gamma_i7[4]*Lb + 2.*Phi57_1(E0);
1014  K_ij[4][7] = 2.*Phi58_1(E0);
1015 
1016  K_ij[5][5] = 4.*Phi66_1(E0);
1017  K_ij[5][6] = r1(6,zeta()).real() - gamma_i7[5]*Lb + 2.*Phi67_1(E0);
1018  K_ij[5][7] = 2.*Phi68_1(E0);
1019 
1020  K_ij[6][6] = -182./9. + 8./9.*M_PI*M_PI - gamma_i7[6]*2.*Lb + 4.*Phi77_1(E0);
1021  K_ij[6][7] = r1(8,zeta()).real() - gamma_i7[7]*Lb + 2.*Phi78_1(E0);
1022 
1023  K_ij[7][7] = 4.*Phi88_1(E0);
1024 
1025  return K_ij[i-1][j-1];
1026 }
1027 
1028 void Bsgamma::computeCoeff(double mu)
1029 {
1032 
1033  C1_0 = (*(allcoeff[LO]))(0);
1034  C2_0 = (*(allcoeff[LO]))(1);
1035  C3_0 = (*(allcoeff[LO]))(2);
1036  C4_0 = (*(allcoeff[LO]))(3);
1037  C5_0 = (*(allcoeff[LO]))(4);
1038  C6_0 = (*(allcoeff[LO]))(5);
1039  C7_0 = (*(allcoeff[LO]))(6);
1040  C8_0 = (*(allcoeff[LO]))(7);
1041 
1042  C1_1 = (*(allcoeff[NLO]))(0)/Alstilde;
1043  C2_1 = (*(allcoeff[NLO]))(1)/Alstilde;
1044  C3_1 = (*(allcoeff[NLO]))(2)/Alstilde;
1045  C4_1 = (*(allcoeff[NLO]))(3)/Alstilde;
1046  C5_1 = (*(allcoeff[NLO]))(4)/Alstilde;
1047  C6_1 = (*(allcoeff[NLO]))(5)/Alstilde;
1048  C7_1 = (*(allcoeff[NLO]))(6)/Alstilde;
1049  C8_1 = (*(allcoeff[NLO]))(7)/Alstilde;
1050 
1051  C7p_0 = (*(allcoeffprime[LO]))(6);
1052  C7p_1 = (*(allcoeffprime[NLO]))(6)/Alstilde;
1053 
1054 }
1055 
1056 double Bsgamma::P0(double E0)
1057 {
1058  return C7_0.abs2() + C7p_0.abs2() + P0_4body(E0,Mb_kin*Mb_kin/Ms/Ms);
1059 }
1060 
1062 {
1063  return 2.*((C7_0*C7_1).real() + (C7p_0*C7p_1).real()); /*CHECK SIGN*/
1064 }
1065 
1066 double Bsgamma::P21(double E0, double mu)
1067 {
1068  int i,j;
1070  gslpp::complex C0p[8]={C7p_0}; /*IMPLEMENT OTHER WC*/
1071  double p21=0.;
1072 
1073  for(i=0;i<8;i++)
1074  {
1075  for(j=0;j<8;j++)
1076  {
1077  p21 += (C0[i]*C0[j]).real() * Kij_1(i+1,j+1,E0,mu);
1078  }
1079  }
1080 
1081  for(i=6;i<7;i++) /*CHECK ALGORITHM*/
1082  {
1083  for(j=6;j<7;j++)
1084  {
1085  p21 += (C0p[i]*C0p[j]).real() * Kij_1(i+1,j+1,E0,mu);
1086  }
1087  }
1088 
1089  return p21;
1090 }
1091 
1092 double Bsgamma::Vub_NLO_2body(bool CPodd)
1093 {
1094  double z = zeta();
1095 
1096  return 4. * Alstilde * (C7_0 * ( C2_0 - C1_0/6. )).real() *
1097  (CKMu.real()*( a(z) + b(z) ).real() - CPodd * CKMu.imag()*( a(z) + b(z) ).imag());
1098 }
1099 
1100 double Bsgamma::Vub_NLO_3body(double E0,bool CPodd)
1101 {
1102  double d = delta(E0);
1103 
1104  return 64./27. * Alstilde * ( C2_0 - C1_0/6. ).abs2() *
1105  ( CKMu.real() * ( 2. * Int_cc1(E0) - Int_c1(E0) )
1106  + CKMu.abs2() * ( Int_cc1(E0) - Int_c1(E0) + 1./8. * d * ( 1. - 1./3. * d*d ) )
1107  - CPodd * CKMu.imag() * Int_c1_im(E0) )
1108  + 4. * Alstilde * (( C7_0 - C8_0/3. ) * ( C2_0 - C1_0/6. )).real() *
1109  ( CKMu.real() * ( Phi27_1(E0,zeta()) + 2./9. * d * ( 1. - d + 1./3. * d*d ) )
1110  - CPodd * CKMu.imag() * Phi27_1_im(E0,zeta()) );
1111 }
1112 
1113 double Bsgamma::Vub_NLO_4body(double E0, bool CPodd)
1114 {
1115  if (FOUR_BODY) {
1116  double d = delta(E0);
1117  double d2 = d*d;
1118  double d3 = d2*d;
1119  double Ld = log(d);
1120  double Lumd = log(1. - d);
1121  double Lq = log(Ms/Mb_kin);
1122 
1123  double uphib427 = ( 2. * d * (-63. + 30. * d + 35. * d2 - 2. * d3
1124  + 3. * d * (-18. - 7. * d + d2) * Ld) ) / ( 243. * (d - 1.) );
1125  double uphib428 = ( 108. * (d - 1.) * (d - 1.) * Lumd*Lumd
1126  - 12. * Lumd * (- 25. - 18. * Lq - 18. * d * (5. + 4. * Lq)
1127  + 9. * d2 * (5. + 4. * Lq) + (9. + 36. * d - 18. * d2) * Ld)
1128  + d * (24. * (17. + 9. * Lq) + 27. * d * (43. + 26. * Lq)
1129  - d2 * (127. + 72. * Lq) + 9. * (-12. - 39. * d + 4. * d2) * Ld)
1130  + 108. * (-1. - 4. * d + 2. * d2) * gsl_sf_dilog(d) ) / 729.;
1131 
1132  return 4. * Alstilde * ( ( C2_0 - C1_0/6. ).abs2() *
1133  ( CKMu.real() * 0.005025213076791178 + CPodd * CKMu.imag() * 0.013978889449487913)
1134  + ( C2_0 - C1_0/6. ).real() * CKMu.real() * (C7_0.real() * uphib427 + C8_0.real() * uphib428) );
1135  }
1136 
1137  else return 0.;
1138 }
1139 
1140 double Bsgamma::Vub_NLO(double E0, bool CPodd)
1141 {
1142  return Vub_NLO_2body(CPodd) + Vub_NLO_3body(E0,CPodd) + Vub_NLO_4body(E0,CPodd);
1143 }
1144 
1145 double Bsgamma::P(double E0, double mu_b, double mu_c, orders order, bool CPodd)
1146 {
1147  switch(order) {
1148  case NLO:
1149  return P0(E0) + Alstilde * (P11() + P21(E0,mu_b)) + Vub_NLO(E0, CPodd);
1150  break;
1151  case LO:
1152  return P0(E0);
1153  break;
1154  default:
1155  std::stringstream out;
1156  out << order;
1157  throw std::runtime_error("Bsgamma::P(): order " + out.str() + " not implemented");
1158  }
1159 }
1160 
1162 {
1163  double mcnorm = 1.131; // value fixed according to arXiv:1003.5012, in order to employ the remaining corrections given in that work
1164  double lambda2 = mu_G2/3.;
1165 
1166  return -1./18. * (C7_0 * ( 2.*C2_0 - C1_0/3. )).real() * lambda2/mcnorm/mcnorm;
1167 }
1168 
1169 double Bsgamma::N_77(double E0, double mu)
1170 {
1171  double z = 1. - delta(E0);
1172  double z2 = z*z;
1173  double z3 = z2*z;
1174  double z4 = z3*z;
1175  double umz2 = (1.-z)*(1.-z);
1176  double Lz = log(1. - z);
1177  double Lz2 = Lz*Lz;
1178  double Lb = 2. * log(mu/Mb_kin);
1179 
1180  double corrLambda2_rad;
1181  double corrLambda2_sem;
1182  double corrLambda2_mix;
1183  double corrLambda2;
1184  double corrLambda3;
1185 
1186  double alsb = SM.Alstilde5(Mb_kin);
1187  double Lambda_pert = 64./9. * alsb * mu_kin *
1188  (1. + 4. * alsb * (9./2. * (log(Mb_kin/2./mu_kin) + 8./3.)
1189  - 3. * (M_PI*M_PI/6. - 13./12.)) );
1190  double mu_pi2_pert = 3./4. * mu_kin * Lambda_pert - 48. * alsb*alsb * mu_kin*mu_kin;
1191  double rho_D3_pert = 1./2. * mu_kin*mu_kin * Lambda_pert - 128./3. * alsb*alsb * mu_kin*mu_kin*mu_kin;
1192 
1193  double lambda1 = -mu_pi2 + mu_pi2_pert;
1194  double lambda2 = mu_G2/3.;
1195  double rho1 = rho_D3 - rho_D3_pert;
1196 
1197  double f1EGN = 16./9. * ( 4. - M_PI*M_PI) - 8./3. * Lz2 -
1198  ( 4. * z * ( 30. - 63. * z + 31. * z2 + 5. * z3))/(9. * umz2) -
1199  ( 4. * (30. - 72. * z + 51. * z2 - 2. * z3 - 3. * z4))/(9. * umz2) * Lz;
1200  double f2EGN = -2./9. * ( 87. + 32. * M_PI*M_PI) - 32./3. * Lz2 +
1201  2. * ( 162. - 244. * z + 113. * z2 - 7. * z3)/(3. * (1. - z)) * Lz +
1202  2. * z * ( 54 - 49. * z + 15. * z2)/(1. - z);
1203 
1204  corrLambda2_rad = lambda1 * ( f1EGN/8. - 4./3. * (Lb + 1.) )
1205  + lambda2 * (f2EGN/8. + 12. * (Lb + 1.) );
1206  corrLambda2_sem = -3. * 4.98 * lambda2 + (25. - 4. * M_PI*M_PI)/12.*lambda1;
1207  corrLambda2_mix = 1./8. * (9. * lambda2 - lambda1) * Kij_1(7,7,E0,mu);
1208 
1209  corrLambda2 = corrLambda2_rad - corrLambda2_sem + corrLambda2_mix;
1210 
1211  corrLambda3 = (-88./6. + 16.*log(2.))* rho1 /Mb_kin/Mb_kin/Mb_kin;
1212 
1213  return (C7_0.abs2() + C7p_0.abs2()) * (4. * Alstilde / Mb_kin / Mb_kin * corrLambda2 + corrLambda3);
1214 }
1215 
1216 double Bsgamma::N(double E0, double mu)
1217 {
1218  return N_27() + N_77(E0,mu) + BLNPcorr * P0(E0);
1219 }
1220 
1222 {
1223  double z=zeta();
1224  return (1. - 8. * z + 8. * z*z*z - z*z*z*z - 12. * z*z * log(z)) * ( 0.903
1225  - 0.588 * (SM.Alstilde5(4.6)*4*M_PI - 0.22) + 0.0650 * (Mb_kin - 4.55)
1226  - 0.1080 * (Mc - 1.05) - 0.0122 * mu_G2 - 0.199 * rho_D3 + 0.004 * rho_LS3);
1227 }
1228 
1230 {
1232  BRsl=SM.getGambino_BRsem()/100.;
1239  C=C_sem();
1240 
1241  ale=SM.getAle();
1242  E0=SM.getbsgamma_E0();
1243  mu_b=SM.getMub();
1244  mu_c=SM.getMuc();
1245  alsUps=8./M_PI * mu_kin/Mb_kin * ( 1. + 3./8. * mu_kin/Mb_kin );
1246  Alstilde = SM.Alstilde5(mu_b);
1249  V_cb=SM.getCKM().getVcb();
1251 
1253 
1254  checkCache();
1255 
1256  if (Intb_updated == 0) {
1257  Intb1Cached = 0;
1258  Intb2Cached = 0;
1259  Intb3Cached = 0;
1260  Intb4Cached = 0;
1261  Intbb1Cached = 0;
1262  Intbb2Cached = 0;
1263  Intbb4Cached = 0;
1264  }
1265  if (Intbc_updated == 0) {
1266  Intbc1Cached = 0;
1267  Intbc2Cached = 0;
1268  Intc1Cached = 0;
1269  Intc1imCached = 0;
1270  Intc2Cached = 0;
1271  Intc3Cached = 0;
1272  IntccCached = 0;
1273  Intcc1Cached = 0;
1274  Intcc1p1Cached = 0;
1275  }
1276 
1277  computeCoeff(mu_b);
1278 
1279  overall = BRsl * (lambda_t/V_cb).abs2() * 6. * ale / (M_PI * C);
1280 }
1281 
1283 {
1284  updateParameters();
1285 
1286  if (obs == 1)
1287  return overall * ( P(E0, mu_b, mu_c, NLO, false) + N(E0,mu_b) );
1288  if (obs == 2)
1289  return overall * ( P(E0, mu_b, mu_c, NLO, true) + N(E0,mu_b) );
1290 
1291  throw std::runtime_error("Bsgamma::computeThValue(): Observable type not defined. Can be only 1 or 2");
1292 }
double Phi33_1(double E0)
The function obtained using the prescription of .
double Phi14_1(double E0)
The function obtained using the prescription of .
double Phi28_1(double E0, double z)
The function from .
double Phi34_1(double E0)
The function obtained using the prescription of .
gslpp::vector< double > Intbc_cache
double Vub_NLO_2body(bool CPodd)
The 2 body NLO Vub part of the as defined in , .
gslpp::complex C1_0
double Phi78_1(double E0)
The function from .
void computeCoeff(double mu)
Compute the Wilson Coefficient.
double getKc_im_1mt2(double t)
The function .
double abs2() const
double getKb_re_1mt(double t)
The function .
double getKc_re_Kb_1mt(double t)
The function .
double getKb_abs2_t_1mt2(double t)
The function .
double getKc_abs2_t_1mt(double t)
The function .
double getKb_re_t(double t)
The function .
gslpp::complex C4_1
double Phi26_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
double Vub_NLO_3body(double E0, bool CPodd)
The 3 body NLO Vub part of the , .
double Phi58_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
CKM getCKM() const
A get method to retrieve the member object of type CKM.
double getKb_abs2_1mt(double t)
The function .
double P0_4body(double E0, double t)
The 4-body LO contribution as defined in .
An observable class for the quartic Higgs potential coupling .
gslpp::complex V_cb
unsigned int Intbb4Cached
double getKc_re_1mt(double t)
The function .
gslpp::complex C6_1
unsigned int Intbc1Cached
double getKc_re_Kb_t_1mt(double t)
The function .
double getKb_re_t_1mt(double t)
The function .
double omega(double E0)
The cutoff energy function as defined in .
gslpp::complex b(double z)
The funcion as defined in .
gslpp::vector< gslpp::complex > ** allcoeff
double getMub() const
A get method to access the threshold between five- and four-flavour theory in GeV.
Definition: QCD.h:905
double N_27()
The non perturbative part of the due to interference as defined in , .
gslpp::complex C1_1
Bsgamma(const StandardModel &SM_i, int obsFlag)
Constructor.
double Phi17_1(double E0, double z)
The function from .
gslpp::complex r1(int i, double z)
The funcion as defined in .
gslpp::complex CKMu
double Int_bb2(double E0)
Integral of the functions getKb_abs2_t_1mt() and getKb_abs2_t_1mt2().
gslpp::complex lambda_t
unsigned int Intbc_updated
gslpp::complex C2_1
complex conjugate() const
gslpp::complex Gamma_t(double t)
The function as defined in .
void updateParameters()
The update parameter method for bsgamma.
double getKb_re_t2_1mt2(double t)
The function .
orders
An enum type for orders in QCD.
Definition: OrderScheme.h:31
double Vub_NLO(double E0, bool CPodd)
The total NLO Vub part of the , .
double Phi23_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
double P0(double E0)
The perturbative part of the BR as defined in .
double Phi22_1(double E0)
The function from .
double getKc_abs2_1mt2(double t)
The function .
complex pow(const complex &z1, const complex &z2)
gsl_function INT
double Phi48_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
double Int_b4(double E0)
Integral of the functions getKb_re_t2_1mt() and getKb_re_t2_1mt2().
double Phi44_1(double E0)
The function obtained using the prescription of .
#define FOUR_BODY
const double & real() const
gslpp::vector< gslpp::complex > ** ComputeCoeffprimesgamma(double mu, schemes scheme=NDR)
Computes the chirality flipped Wilson coefficient for the process .
Definition: Flavour.h:165
double Phi46_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
double getVcb()
Definition: CKM.cpp:247
gsl_function convertToGslFunction(const F &f)
Definition: MVll.h:38
gslpp::complex a(double z)
The funcion as defined in .
double getKb_abs2_1mt2(double t)
The function .
double getKb_abs2_t2_1mt(double t)
The function .
double Int_c3(double E0)
Integral of the functions getKc_re_t() and getKc_re_t_1mt().
double T2(double E0, double t)
The cutoff energy function as defined in .
double Int_cc1_part1(double E0)
Integral of the functions getKc_abs2_1mt().
gslpp::complex kappa(double Mq, double t)
The function as defined in .
double Phi16_1(double E0)
The function obtained using the prescription of .
double getKb_re_1mt2(double t)
The function .
unsigned int Intcc1p1Cached
gslpp::vector< gslpp::complex > ** allcoeffprime
A class for a model prediction of an observable.
Definition: ThObservable.h:22
double T1(double E0, double t)
The cutoff energy function as defined in .
static const complex & i()
double getGambino_Mbkin() const
Definition: QCD.h:1712
gslpp::complex C8_1
double getGambino_Mcatmuc() const
Definition: QCD.h:1720
unsigned int Intc2Cached
double Phi25_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
gslpp::complex C6_0
double P21(double E0, double mu)
The perturbative part of the BR as defined in .
double Int_cc(double E0)
Integral of the functions getKc_abs2_t() and getKc_abs2_t_1mt().
double Int_c2(double E0)
Integral of the functions getKc_re_t_1mt() and getKc_re_t_1mt2().
A model class for the Standard Model.
double Phi88_1(double E0)
The function from .
double delta(double E0)
The cutoff energy function .
double Phi26_1_4body(double E0)
The function obtained from .
gsl_integration_cquad_workspace * w_INT
double Int_c1_im(double E0)
Integral of the functions getKc_im_1mt() and getKc_im_1mt2().
double Phi77_1(double E0)
The function from .
double Phi24_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
gslpp::complex C5_1
double Int_bc1(double E0)
Integral of the functions getKc_re_Kb_1mt() and getKc_re_Kb_1mt2().
double getGambino_BRsem() const
Definition: QCD.h:1704
gslpp::complex C5_0
double Phi45_1(double E0)
The function obtained using the prescription of .
unsigned int Intc3Cached
double ff7_dMP(double E0)
The 4-body NLO correction due to and d, , from .
gslpp::complex C7_0
double ff7_sMP(double E0)
The 4-body NLO correction due to and s, , from .
double getKb_abs2_t2_1mt2(double t)
The function .
double T3(double E0, double t)
The cutoff energy function as defined in .
double Phi15_1(double E0)
The function obtained using the prescription of .
double getGambino_muG2() const
Definition: QCD.h:1744
unsigned int Intb3Cached
gslpp::complex C2_0
double Int_bb4(double E0)
Integral of the functions getKb_abs2_t2_1mt() and getKb_abs2_t2_1mt2().
double Phi66_1(double E0)
The function obtained using the prescription of .
gslpp::complex C3_0
double Phi55_1(double E0)
The function obtained using the prescription of .
unsigned int Intb4Cached
Definition: OrderScheme.h:33
double C_sem()
The ratio as defined in , but with coefficients slightly modified due to different imput parameters...
double getbsgamma_E0() const
Definition: QCD.h:1680
gslpp::complex C7_1
unsigned int Intbc2Cached
unsigned int Intbb2Cached
double getKb_re_t2_1mt(double t)
The function .
double getKb_abs2_t_1mt(double t)
The function .
double rho(double E0)
The cutoff energy function as defined in .
Flavour * getMyFlavour() const
double getKc_abs2_t(double t)
The function .
double Phi38_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
double zeta()
The squared ratio between and , .
unsigned int IntccCached
Particle getQuarks(const quark q) const
A get method to access a quark as an object of the type Particle.
Definition: QCD.h:869
double P11()
The perturbative part of the BR as defined in .
double Int_bc2(double E0)
Integral of the functions getKc_re_Kb_t_1mt() and getKc_re_Kb_t_1mt2().
double Phi47_1(double E0)
The function from and adding the 4-body contribution from .
gslpp::vector< gslpp::complex > ** ComputeCoeffsgamma(double mu, schemes scheme=NDR)
Computes the Wilson coefficient for the process .
Definition: Flavour.h:154
double Int_cc1(double E0)
Integral of the functions getKc_abs2_1mt() and getKc_abs2_1mt^().
double computeThValue()
Computes the Branching Ratio for the decay.
gslpp::complex computelamt_s() const
The product of the CKM elements .
double Phi13_1(double E0)
The function obtained using the prescription of .
double getAle() const
A get method to retrieve the fine-structure constant .
double Int_c1(double E0)
Integral of the functions getKc_re_1mt() and getKc_re_1mt2().
double getGambino_mupi2() const
Definition: QCD.h:1728
double Phi18_1(double E0, double z)
The function from .
double Kij_1(int i, int j, double E0, double mu)
The function from .
const double & getMass() const
A get method to access the particle mass.
Definition: Particle.h:61
unsigned int Intc1imCached
double Phi56_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
const StandardModel & SM
A reference to an object of StandardMode class.
Definition: ThObservable.h:99
gslpp::complex C8_0
double getKc_abs2_1mt(double t)
The function .
unsigned int Intc1Cached
double getMuc() const
A get method to access the threshold between four- and three-flavour theory in GeV.
Definition: QCD.h:914
double getKc_re_Kb_1mt2(double t)
The function .
double getKc_re_t(double t)
The function .
const double & imag() const
gslpp::complex C7p_1
double getKb_re_t_1mt2(double t)
The function .
double getKc_re_t_1mt2(double t)
The function .
double Phi35_1(double E0)
The function obtained using the prescription of .
unsigned int Intbb1Cached
double Phi12_1(double E0)
The function from .
complex log(const complex &z)
double Phi23_1_4body(double E0)
The function obtained from .
unsigned int Intb_updated
void checkCache()
The caching method for bsgamma.
double getKc_re_t_1mt(double t)
The function .
double ff8_dMP(double E0)
The 4-body NLO correction due to and d, , from .
double getKc_re_1mt2(double t)
The function .
double Vub_NLO_4body(double E0, bool CPodd)
The 4 body NLO Vub part of the obtained from , .
double N_77(double E0, double mu)
The non perturbative part of the due to interference as defined in , .
double N(double E0, double mu)
The non perturbative part of the as defined in , .
unsigned int Intb2Cached
double P(double E0, double mu_b, double mu_c, orders order, bool CPodd)
The perturbative part of the as defined in , .
An observable class for the quartic Higgs potential coupling .
double getKc_re_Kb_t_1mt2(double t)
The function .
double Int_b2(double E0)
Integral of the functions getKb_re_t_1mt() and getKb_re_t_1mt2().
gslpp::complex computelamu_s() const
The product of the CKM elements .
double Phi24_1_4body(double E0)
The function obtained from .
double Phi68_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
unsigned int Intcc1Cached
A class for defining operations on and functions of complex numbers.
Definition: gslpp_complex.h:35
double Int_b1(double E0)
Integral of the functions getKb_re_1mt() and getKb_re_1mt2().
double Phi36_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
unsigned int Intb1Cached
std::string ModelName() const
A method to fetch the name of the model.
Definition: Model.h:56
double Phi25_1_4body(double E0)
The function obtained from .
double getBLNPcorr() const
Definition: QCD.h:1688
gslpp::complex C4_0
gslpp::complex C3_1
double Phi11_1(double E0)
The function from .
double Phi27_1_im(double E0, double z)
The function from .
double Phi57_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
double Phi27_1(double E0, double z)
The function from .
double Int_b3(double E0)
Integral of the functions getKb_re_t() and getKb_re_t_1mt().
double ff8_sMP(double E0)
The 4-body NLO correction due to and s, , from .
double getGambino_mukin() const
Definition: QCD.h:1696
double Phi37_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
gslpp::complex C7p_0
double getGambino_rhoD3() const
Definition: QCD.h:1736
double getGambino_rhoLS3() const
Definition: QCD.h:1752
double Phi67_1(double E0)
The function obtained using the prescription of and adding the 4-body contribution from ...
double CacheIntcc1p1
double getKc_im_1mt(double t)
The function .
double Int_bb1(double E0)
Integral of the functions getKb_abs2_1mt() and getKb_abs2_1mt2().
complex sqrt(const complex &z)