MVll.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 HEPfit Collaboration
3  * All rights reserved.
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 #include "Flavour.h"
9 #include "MVll.h"
10 #include <gslpp_complex.h>
11 #include <gsl/gsl_sf.h>
12 #include <boost/bind.hpp>
13 #include <limits>
14 #include <TFitResult.h>
15 
17 : mySM(SM_i),
18 N_cache(3, 0.),
19 V_cache(3, 0.),
20 A0_cache(3, 0.),
21 A1_cache(3, 0.),
22 T1_cache(3, 0.),
23 T2_cache(3, 0.),
24 k2_cache(2, 0.),
25 VL0_cache(3, 0.),
26 TL0_cache(3, 0.),
27 SL_cache(2, 0.),
28 Ycache(2, 0.),
29 H_V0cache(2, 0.),
30 H_V1cache(2, 0.),
31 H_V2cache(2, 0.),
32 H_Scache(2, 0.),
33 H_Pcache(4, 0.),
34 T_cache(5, 0.)
35 {
36 
37 
38  lep = lep_i;
39  meson = meson_i;
40  vectorM = vector_i;
41  I0_updated = 0;
42  I1_updated = 0;
43  I2_updated = 0;
44  I3_updated = 0;
45  I4_updated = 0;
46  I5_updated = 0;
47  I6_updated = 0;
48  I7_updated = 0;
49  I8_updated = 0;
50  I9_updated = 0;
51  I10_updated = 0;
52  I11_updated = 0;
53 
54  VL1_updated = 0;
55  VL2_updated = 0;
56  TL1_updated = 0;
57  TL2_updated = 0;
58  VR1_updated = 0;
59  VR2_updated = 0;
60  TR1_updated = 0;
61  TR2_updated = 0;
62  VL0_updated = 0;
63  TL0_updated = 0;
64  VR0_updated = 0;
65  TR0_updated = 0;
66  SL_updated = 0;
67  SR_updated = 0;
68 
72 
73  w_sigma = gsl_integration_cquad_workspace_alloc (100);
74  w_DTPPR = gsl_integration_cquad_workspace_alloc (100);
75  w_delta = gsl_integration_cquad_workspace_alloc (100);
76 
77 }
78 
80 {
81 }
82 
84 {
85  if (!mySM.getMyFlavour()->getUpdateFlag(meson, vectorM, lep)) return;
86 
87 
88  GF = mySM.getGF();
89  ale = mySM.getAle();
93  mu_b = mySM.getMub();
94  mu_h = sqrt(mu_b * .5); // From Beneke Neubert
95  Mb = mySM.getQuarks(QCD::BOTTOM).getMass(); // add the PS b mass
98  MW = mySM.Mw();
101 
102  switch (vectorM) {
104  a_0V = mySM.geta_0V();
105  a_1V = mySM.geta_1V();
106  a_2V = mySM.geta_2V();
107  MRV_2 = mySM.getMRV() * mySM.getMRV();
108 
109  a_0A0 = mySM.geta_0A0();
110  a_1A0 = mySM.geta_1A0();
111  a_2A0 = mySM.geta_2A0();
112  MRA0_2 = mySM.getMRA0() * mySM.getMRA0();
113 
114  a_0A1 = mySM.geta_0A1();
115  a_1A1 = mySM.geta_1A1();
116  a_2A1 = mySM.geta_2A1();
117  MRA1_2 = mySM.getMRA1() * mySM.getMRA1();
118 
119  a_0A12 = mySM.geta_0A12();
120  a_1A12 = mySM.geta_1A12();
121  a_2A12 = mySM.geta_2A12();
123 
124  a_0T1 = mySM.geta_0T1();
125  a_1T1 = mySM.geta_1T1();
126  a_2T1 = mySM.geta_2T1();
127  MRT1_2 = mySM.getMRT1() * mySM.getMRT1();
128 
129  a_0T2 = mySM.geta_0T2();
130  a_1T2 = mySM.geta_1T2();
131  a_2T2 = mySM.geta_2T2();
132  MRT2_2 = mySM.getMRT2() * mySM.getMRT2();
133 
134  a_0T23 = mySM.geta_0T23();
135  a_1T23 = mySM.geta_1T23();
136  a_2T23 = mySM.geta_2T23();
138 
139  b = 1;
140  break;
141  case StandardModel::PHI:
142  a_0V = mySM.geta_0Vphi();
143  a_1V = mySM.geta_1Vphi();
144  a_2V = mySM.geta_2Vphi();
146 
147  a_0A0 = mySM.geta_0A0phi();
148  a_1A0 = mySM.geta_1A0phi();
149  a_2A0 = mySM.geta_2A0phi();
151 
152  a_0A1 = mySM.geta_0A1phi();
153  a_1A1 = mySM.geta_1A1phi();
154  a_2A1 = mySM.geta_2A1phi();
156 
161 
162  a_0T1 = mySM.geta_0T1phi();
163  a_1T1 = mySM.geta_1T1phi();
164  a_2T1 = mySM.geta_2T1phi();
166 
167  a_0T2 = mySM.geta_0T2phi();
168  a_1T2 = mySM.geta_1T2phi();
169  a_2T2 = mySM.geta_2T2phi();
171 
176 
177  b = 0.489;
178  break;
179  default:
180  std::stringstream out;
181  out << vectorM;
182  throw std::runtime_error("MVll: vector " + out.str() + " not implemented");
183  }
184 
185 
186  h_0[0] = mySM.geth_0();
187  h_0[1] = mySM.geth_p();
188  h_0[2] = mySM.geth_m();
189 
190  h_1[0] = mySM.geth_0_1();
191  h_1[1] = mySM.geth_p_1();
192  h_1[2] = mySM.geth_m_1();
193 
194  h_2[0] = mySM.geth_0_2();
195  h_2[1] = mySM.geth_p_2();
196  h_2[2] = mySM.geth_m_2();
197 
198  allcoeff = mySM.getMyFlavour()->ComputeCoeffBMll(mu_b); //check the mass scale, scheme fixed to NDR
199  allcoeffprime = mySM.getMyFlavour()->ComputeCoeffprimeBMll(mu_b); //check the mass scale, scheme fixed to NDR
200 
201  C_1 = ((*(allcoeff[LO]))(0) + (*(allcoeff[NLO]))(0));
202  C_1L_bar = (*(allcoeff[LO]))(0)/2.;
203  C_2 = ((*(allcoeff[LO]))(1) + (*(allcoeff[NLO]))(1));
204  C_2L_bar = (*(allcoeff[LO]))(1) - (*(allcoeff[LO]))(0)/6.;
205  C_3 = ((*(allcoeff[LO]))(2) + (*(allcoeff[NLO]))(2));
206  C_4 = ((*(allcoeff[LO]))(3) + (*(allcoeff[NLO]))(3));
207  C_5 = ((*(allcoeff[LO]))(4) + (*(allcoeff[NLO]))(4));
208  C_6 = ((*(allcoeff[LO]))(5) + (*(allcoeff[NLO]))(5));
209  C_7 = ((*(allcoeff[LO]))(6) + (*(allcoeff[NLO]))(6));
210  C_8L = (*(allcoeff[LO]))(7);
211  C_9 = ((*(allcoeff[LO]))(8) + (*(allcoeff[NLO]))(8));
212  C_10 = ((*(allcoeff[LO]))(9) + (*(allcoeff[NLO]))(9));
213  C_S = ((*(allcoeff[LO]))(10) + (*(allcoeff[NLO]))(10));
214  C_P = ((*(allcoeff[LO]))(11) + (*(allcoeff[NLO]))(11));
215 
216  C_7p = (*(allcoeffprime[LO]))(6) + (*(allcoeffprime[NLO]))(6);
217  C_9p = (*(allcoeffprime[LO]))(8) + (*(allcoeffprime[NLO]))(8);
218  C_10p = (*(allcoeffprime[LO]))(9) + (*(allcoeffprime[NLO]))(9);
219  C_Sp = (*(allcoeffprime[LO]))(10) + (*(allcoeffprime[NLO]))(10);
220  C_Pp = (*(allcoeffprime[LO]))(11) + (*(allcoeffprime[NLO]))(11);
221 
222  allcoeffh = mySM.getMyFlavour()->ComputeCoeffBMll(mu_h); //check the mass scale, scheme fixed to NDR
223 
224  C_1Lh_bar = (*(allcoeffh[LO]))(0)/2.;
225  C_2Lh_bar = (*(allcoeffh[LO]))(1) - (*(allcoeff[LO]))(0)/6.;
226  C_8Lh = (*(allcoeffh[LO]))(7);
227 
228  checkCache();
229 
230  t_p = pow(MM + MV, 2.);
231  t_m = pow(MM - MV, 2.);
232  t_0 = t_p * (1. - sqrt(1. - t_m / t_p)); /*Modify it for Lattice*/
233  z_0 = (sqrt(t_p) - sqrt(t_p - t_0)) / (sqrt(t_p) + sqrt(t_p - t_0));
234  //else t_0 = 12.;
235  MMpMV = MM + MV;
236  MMpMV2 = MMpMV * MMpMV;
237  MMmMV = MM - MV;
238  MMmMV2 = MMmMV * MMmMV;
239  MM2 = MM*MM;
240  MM4 = MM2*MM2;
241  MV2 = MV*MV;
242  MV4 = MV2*MV2;
243  MMMV = MM*MV;
244  MM2mMV2 = MM2 - MV2;
245  fourMV = 4. * MV;
246  twoMM2 = 2. * MM2;
247  twoMV2 = 2. * MV2;
248  onepMMoMV = (1. + MV / MM);
249  MM_MMpMV = MM * MMpMV;
250  twoMM_mbpms = 2. * MM * (Mb + Ms);
251  fourMM2 = 4. * MM2;
252  Mlep2 = Mlep*Mlep;
253  twoMlepMb = 2. * Mlep*Mb;
254  MboMW = Mb / MW;
255  MsoMb = Ms / Mb;
256  ninetysixM_PI3MM3 = 96. * M_PI * M_PI * M_PI * MM * MM*MM;
257  sixteenM_PI2 = 16. * M_PI*M_PI;
259  twoMboMM = 2 * Mb / MM;
260  H_0_pre = 8. / 27. + 4. / 9. * gslpp::complex::i() * M_PI;
261  H_0_WC = (C_3 + 4. / 3. * C_4 + 16. * C_5 + 64. / 3. * C_6);
262  H_c_WC = (4. / 3. * C_1 + C_2 + 6. * C_3 + 60. * C_5);
263  H_b_WC = (7. * C_3 + 4. / 3. * C_4 + 76. * C_5 + 64. / 3. * C_6);
264  mu_b2 = mu_b*mu_b;
265  Mc2 = Mc*Mc;
266  Mb2 = Mb*Mb;
267  fourMc2 = 4. * Mc2;
268  fourMb2 = 4. * Mb2;
269  logMc = log(Mc2 / mu_b2);
270  logMb = log(Mb2 / mu_b2);
271  fournineth = 4. / 9.;
272  half = 1. / 2.;
273  twothird = 2. / 3.;
274  ihalfMPI = gslpp::complex::i() * M_PI / 2.;
275  twoMM3 = 2. * MM2 * MM;
276  C2_inv = 1. / (2. * C_2.real());
277  gtilde_1_pre = -16. * pow(MM, 3.)*(MM + MV) * pow(M_PI, 2.);
278  gtilde_2_pre = -16. * pow(MM, 3.) * pow(M_PI, 2.) / MMpMV;
279  gtilde_3_pre = 64. * pow(MM, 3.) * pow(M_PI, 2.) * MV*MMpMV;
280  S_L_pre = (-2. * MM * (Mb + Ms));
281 
282  M_PI2osix = M_PI * M_PI / 6.;
283  twoMM = 2.*MM;
287  twoMc2 = 2.*Mc2;
288 
289  sixMMoMb = 6. * MM / Mb;
290  CF =4./3.;
291 
292  deltaT_0 = mySM.Als(mu_b) * CF / 4. / M_PI;
293  deltaT_1par = mySM.Als(mu_h) * CF / 4. * M_PI / 3. * mySM.getMesons(meson).getDecayconst() *
295  deltaT_1perp = mySM.Als(mu_h) * CF / 4. * M_PI / 3. * mySM.getMesons(meson).getDecayconst() *
296  mySM.getFKstarp() / MM;
297 
298  F87_0=-32. / 9. * log(mu_b / Mb) + 8. / 27. * M_PI * M_PI - 44. / 9. - 8. / 9. * gslpp::complex::i() * M_PI;
299  F87_1 = (4. / 3. * M_PI * M_PI - 40. / 3.);
300  F87_2 = (32. / 9. * M_PI * M_PI - 316. / 9.);
301  F87_3 = (200. / 27. * M_PI * M_PI - 658. / 9.);
302 
303  F89_0 = 104. / 9. - 32. / 27. * M_PI * M_PI ;
304  F89_1 = 1184. / 27. - 40. / 9. * M_PI * M_PI;
305  F89_2 = (-32. / 3. * M_PI * M_PI + 14212. / 135.);
306  F89_3 = (-560. / 27. * M_PI * M_PI + 193444. / 945.);
307 
308  F29_0 = (256./243. - 32./81.*gslpp::complex::i()*M_PI - 128./9.*log(Mc/Mb))*log(mu_b/Mb) + 512./81.*log(mu_b/Mb)*log(mu_b/Mb) + 5.4082 - 1.0934 * gslpp::complex::i();
309  F29_L1 = 32./81.*log(mu_b/Mb) + (0.48576 + 0.31119 * gslpp::complex::i());
310  F29_1 = (-32./405. + 64./45./Mc2*Mb2)*log(mu_b/Mb) + (1.9061 + 0.80843 * gslpp::complex::i());
311  F29_2 = (-8./945. + 16./105./Mc2*Mb2/Mc2*Mb2)*log(mu_b/Mb) + (-1.8286 + 2.8428 * gslpp::complex::i());
312  F29_3 = (-32./25515. + 64./2835./Mc2*Mb2/Mc2*Mb2/Mc2*Mb2)*log(mu_b/Mb) + (-12.113 + 8.1251 * gslpp::complex::i());
313  F29_L1_1 = (0.21951 - 0.14852 * gslpp::complex::i());
314  F29_L1_2 = (0.13015 - 0.22155 * gslpp::complex::i());
315  F29_L1_3 = (-0.079692 - 0.31214 * gslpp::complex::i());
316 
317  F27_0 = 416./81. *log(mu_b/Mb) + 3.8367 + 0.3531 * gslpp::complex::i();
318  F27_1 = (1.3098 + 0.60185 * gslpp::complex::i());
319  F27_2 = (0.13507 + 0.89014 * gslpp::complex::i());
320  F27_3 = (-1.0271 + 0.77168 * gslpp::complex::i());
321  F27_L1_1 = (-0.031936 - 0.10981 * gslpp::complex::i());
322  F27_L1_2 = (-0.14169 - 0.035553 * gslpp::complex::i());
323  F27_L1_3 = (-0.13592 + 0.093 * gslpp::complex::i());
324 
325  a_0A12_LCSR = a_0A0 * (MM2mMV2) / (8. * MMMV);
326  a_0T2_LCSR = a_0T1;
327 
328  NN = ((4. * GF * MM * ale * lambda_t) / (sqrt(2.)*4. * M_PI)).abs2();
329 
331  switch (lep) {
332  case StandardModel::MU:
336  break;
341  break;
342  default:
343  std::stringstream out;
344  out << lep;
345  throw std::runtime_error("MVll: lepton " + out.str() + " not implemented");
346  }
347  }
348 
349  std::map<std::pair<double, double>, unsigned int >::iterator it;
350 
351  if (I0_updated == 0) for (it = sigma0Cached.begin(); it != sigma0Cached.end(); ++it) it->second = 0;
352  if (I1_updated == 0) for (it = sigma1Cached.begin(); it != sigma1Cached.end(); ++it) it->second = 0;
353  if (I2_updated == 0) for (it = sigma2Cached.begin(); it != sigma2Cached.end(); ++it) it->second = 0;
354  if (I3_updated == 0) for (it = sigma3Cached.begin(); it != sigma3Cached.end(); ++it) it->second = 0;
355  if (I4_updated == 0) for (it = sigma4Cached.begin(); it != sigma4Cached.end(); ++it) it->second = 0;
356  if (I5_updated == 0) for (it = sigma5Cached.begin(); it != sigma5Cached.end(); ++it) it->second = 0;
357  if (I6_updated == 0) for (it = sigma6Cached.begin(); it != sigma6Cached.end(); ++it) it->second = 0;
358  if (I7_updated == 0) for (it = sigma7Cached.begin(); it != sigma7Cached.end(); ++it) it->second = 0;
359  if (I9_updated == 0) for (it = sigma9Cached.begin(); it != sigma9Cached.end(); ++it) it->second = 0;
360  if (I10_updated == 0) for (it = sigma10Cached.begin(); it != sigma10Cached.end(); ++it) it->second = 0;
361  if (I11_updated == 0) for (it = sigma11Cached.begin(); it != sigma11Cached.end(); ++it) it->second = 0;
362 
363  if (I0_updated == 0) for (it = delta0Cached.begin(); it != delta0Cached.end(); ++it) it->second = 0;
364  if (I1_updated == 0) for (it = delta1Cached.begin(); it != delta1Cached.end(); ++it) it->second = 0;
365  if (I2_updated == 0) for (it = delta2Cached.begin(); it != delta2Cached.end(); ++it) it->second = 0;
366  if (I3_updated == 0) for (it = delta3Cached.begin(); it != delta3Cached.end(); ++it) it->second = 0;
367  if (I11_updated == 0) for (it = delta11Cached.begin(); it != delta11Cached.end(); ++it) it->second = 0;
368 
369  std::map<double, unsigned int >::iterator iti;
370  if (deltaTparpupdated == 0) for (iti = deltaTparpCached.begin(); iti != deltaTparpCached.end(); ++iti) iti->second = 0;
371  if (deltaTparmupdated == 0) for (iti = deltaTparmCached.begin(); iti != deltaTparmCached.end(); ++iti) iti->second = 0;
372  if (deltaTperpupdated == 0) for (iti = deltaTparpCached.begin(); iti != deltaTparpCached.end(); ++iti) iti->second = 0;
373 
374  if (deltaTparpupdated*deltaTparmupdated == 0) for (it = I1Cached.begin(); it != I1Cached.end(); ++it) it->second = 0;
375 
377 
378  return;
379 }
380 
382 {
383 
384  if (MM == k2_cache(0) && MV == k2_cache(1)) {
385  k2_updated = 1;
386  z_updated = 1;
387  } else {
388  k2_updated = 0;
389  z_updated = 0;
390  k2_cache(0) = MM;
391  k2_cache(1) = MV;
392  }
393 
394  if (Mlep == beta_cache) {
395  beta_updated = 1;
396  } else {
397  beta_updated = 0;
398  beta_cache = Mlep;
399  }
400 
403 
404  if (GF == N_cache(0) && ale == N_cache(1) && MM == N_cache(2) && lambda_t == Nc_cache) {
405  N_updated = 1;
406  } else {
407  N_updated = 0;
408  N_cache(0) = GF;
409  N_cache(1) = ale;
410  N_cache(2) = MM;
411  Nc_cache = lambda_t;
412  }
413 
414  if (a_0V == V_cache(0) && a_1V == V_cache(1) && a_2V == V_cache(2)) {
416  } else {
417  V_updated = 0;
418  V_cache(0) = a_0V;
419  V_cache(1) = a_1V;
420  V_cache(2) = a_2V;
421  }
422 
423  if (a_0A0 == A0_cache(0) && a_1A0 == A0_cache(1) && a_2A0 == A0_cache(2)) {
425  } else {
426  A0_updated = 0;
427  A0_cache(0) = a_0A0;
428  A0_cache(1) = a_1A0;
429  A0_cache(2) = a_2A0;
430  }
431 
432  if (a_0A1 == A1_cache(0) && a_1A1 == A1_cache(1) && a_2A1 == A1_cache(2)) {
434  } else {
435  A1_updated = 0;
436  A1_cache(0) = a_0A1;
437  A1_cache(1) = a_1A1;
438  A1_cache(2) = a_2A1;
439  }
440 
441  if (a_0T1 == T1_cache(0) && a_1T1 == T1_cache(1) && a_2T1 == T1_cache(2)) {
443  } else {
444  T1_updated = 0;
445  T1_cache(0) = a_0T1;
446  T1_cache(1) = a_1T1;
447  T1_cache(2) = a_2T1;
448  }
449 
450  if (a_0T2 == T2_cache(0) && a_1T2 == T2_cache(1) && a_2T2 == T2_cache(2)) {
452  } else {
453  T2_updated = 0;
454  T2_cache(0) = a_0T2;
455  T2_cache(1) = a_1T2;
456  T2_cache(2) = a_2T2;
457  }
458 
461 
464 
467 
470 
471  if (Mb == SL_cache(0) && Ms == SL_cache(1)) {
472  Mb_Ms_updated = 1;
475  } else {
476  Mb_Ms_updated = 0;
477  SL_updated = 0;
479  SL_cache(0) = Mb;
480  SL_cache(1) = Ms;
481  }
482 
483  if (a_0A12 == VL0_cache(0) && a_1A12 == VL0_cache(1) && a_2A12 == VL0_cache(2)) {
486  } else {
487  VL0_updated = 0;
489  VL0_cache(0) = a_0A12;
490  VL0_cache(1) = a_1A12;
491  VL0_cache(2) = a_2A12;
492  }
493 
494  if (a_0T23 == TL0_cache(0) && a_1T23 == TL0_cache(1) && a_2T23 == TL0_cache(2)) {
497  } else {
498  TL0_updated = 0;
500  TL0_cache(0) = a_0T23;
501  TL0_cache(1) = a_1T23;
502  TL0_cache(2) = a_2T23;
503  }
504 
505 
506  if (C_1 == C_1_cache) {
507  C_1_updated = 1;
508  } else {
509  C_1_updated = 0;
510  C_1_cache = C_1;
511  }
512 
513  if (C_2 == C_2_cache) {
514  C_2_updated = 1;
515  } else {
516  C_2_updated = 0;
517  C_2_cache = C_2;
518  }
519 
520  if (C_3 == C_3_cache) {
521  C_3_updated = 1;
522  } else {
523  C_3_updated = 0;
524  C_3_cache = C_3;
525  }
526 
527  if (C_4 == C_4_cache) {
528  C_4_updated = 1;
529  } else {
530  C_4_updated = 0;
531  C_4_cache = C_4;
532  }
533 
534  if (C_5 == C_5_cache) {
535  C_5_updated = 1;
536  } else {
537  C_5_updated = 0;
538  C_5_cache = C_5;
539  }
540 
541  if (C_6 == C_6_cache) {
542  C_6_updated = 1;
543  } else {
544  C_6_updated = 0;
545  C_6_cache = C_6;
546  }
547 
548  if (C_7 == C_7_cache) {
549  C_7_updated = 1;
550  } else {
551  C_7_updated = 0;
552  C_7_cache = C_7;
553  }
554 
555  if (C_9 == C_9_cache) {
556  C_9_updated = 1;
557  } else {
558  C_9_updated = 0;
559  C_9_cache = C_9;
560  }
561 
562  if (C_10 == C_10_cache) {
563  C_10_updated = 1;
564  } else {
565  C_10_updated = 0;
566  C_10_cache = C_10;
567  }
568 
569  if (C_S == C_S_cache) {
570  C_S_updated = 1;
571  } else {
572  C_S_updated = 0;
573  C_S_cache = C_S;
574  }
575 
576  if (C_P == C_P_cache) {
577  C_P_updated = 1;
578  } else {
579  C_P_updated = 0;
580  C_P_cache = C_P;
581  }
582 
583  if (C_7p == C_7p_cache) {
584  C_7p_updated = 1;
585  } else {
586  C_7p_updated = 0;
587  C_7p_cache = C_7p;
588  }
589 
590  if (C_9p == C_9p_cache) {
591  C_9p_updated = 1;
592  } else {
593  C_9p_updated = 0;
594  C_9p_cache = C_9p;
595  }
596 
597  if (C_10p == C_10p_cache) {
598  C_10p_updated = 1;
599  } else {
600  C_10p_updated = 0;
601  C_10p_cache = C_10p;
602  }
603 
604  if (C_Sp == C_Sp_cache) {
605  C_Sp_updated = 1;
606  } else {
607  C_Sp_updated = 0;
608  C_Sp_cache = C_Sp;
609  }
610 
611  if (C_Pp == C_Pp_cache) {
612  C_Pp_updated = 1;
613  } else {
614  C_Pp_updated = 0;
615  C_Pp_cache = C_Pp;
616  }
617 
618  if (C_2Lh_bar == C_2Lh_cache) {
619  C_2Lh_updated = 1;
620  } else {
621  C_2Lh_updated = 0;
623  }
624 
625  if (C_8Lh == C_8Lh_cache) {
626  C_8Lh_updated = 1;
627  } else {
628  C_8Lh_updated = 0;
629  C_8Lh_cache = C_8Lh;
630  }
631 
632  if (Mb == Ycache(0) && Mc == Ycache(1)) {
634  } else {
635  Yupdated = 0;
636  Ycache(0) = Mb;
637  Ycache(1) = Mc;
638  }
639 
640  if (h_0[0] == h0Ccache[0] && h_1[0] == h0Ccache[1] && h_2[0] == h0Ccache[2]) {
641  h0_updated = 1;
642  } else {
643  h0_updated = 0;
644  h0Ccache[0] = h_0[0];
645  h0Ccache[1] = h_1[0];
646  h0Ccache[2] = h_2[0];
647  }
648 
649  if (h_0[1] == h1Ccache[0] && h_1[1] == h1Ccache[1] && h_2[1] == h1Ccache[2]) {
650  h1_updated = 1;
651  } else {
652  h1_updated = 0;
653  h1Ccache[0] = h_0[1];
654  h1Ccache[1] = h_1[1];
655  h1Ccache[2] = h_2[1];
656  }
657 
658  if (h_0[2] == h2Ccache[0] && h_1[2] == h2Ccache[1] && h_2[2] == h2Ccache[2]) {
659  h2_updated = 1;
660  } else {
661  h2_updated = 0;
662  h2Ccache[0] = h_0[2];
663  h2Ccache[1] = h_1[2];
664  h2Ccache[2] = h_2[2];
665  }
666 
667  if (MM == H_V0cache(0) && Mb == H_V0cache(1)) {
669  } else {
670  H_V0updated = 0;
671  H_V0cache(0) = MM;
672  H_V0cache(1) = Mb;
673  }
674 
675  if (MM == H_V1cache(0) && Mb == H_V1cache(1)) {
677  } else {
678  H_V1updated = 0;
679  H_V1cache(0) = MM;
680  H_V1cache(1) = Mb;
681  }
682 
683  if (MM == H_V2cache(0) && Mb == H_V2cache(1)) {
685  } else {
686  H_V2updated = 0;
687  H_V2cache(0) = MM;
688  H_V2cache(1) = Mb;
689  }
690 
694 
695  if (Mb == H_Scache(0) && MW == H_Scache(1)) {
697  } else {
698  H_Supdated = 0;
699  H_Scache(0) = Mb;
700  H_Scache(1) = MW;
701  }
702 
703  if (Mb == H_Pcache(0) && MW == H_Pcache(1) && Mlep == H_Pcache(2) && Ms == H_Pcache(3)) {
705  } else {
706  H_Pupdated = 0;
707  H_Pcache(0) = Mb;
708  H_Pcache(1) = MW;
709  H_Pcache(2) = Mlep;
710  H_Pcache(3) = Ms;
711 
712  }
713 
714  if (MM == T_cache(0) && Mb == T_cache(1) && Mc == T_cache(2) &&
716  T_updated = 1;
717  } else {
718  T_updated = 0;
719  T_cache(0) = MM;
720  T_cache(1) = Mb;
721  T_cache(2) = Mc;
724  }
725 
729 
742 
743 }
744 
745 /*******************************************************************************
746  * Transverse Form Factors *
747  * ****************************************************************************/
748 
749 double MVll::FF_fit(double q2, double a_0, double a_1, double a_2, double MR_2)
750 {
751  return 1. / (1. - q2 / MR_2) * (a_0 + a_1 * (z(q2) - z_0) + a_2 * (z(q2) - z_0) * (z(q2) - z_0));
752 }
753 
754 double MVll::z(double q2)
755 {
756  return ( sqrt(t_p - q2) - sqrt(t_p - t_0)) / (sqrt(t_p - q2) + sqrt(t_p - t_0));
757 }
758 
759 double MVll::V(double q2)
760 {
761  return FF_fit(q2, a_0V, a_1V, a_2V, MRV_2);
762 }
763 
764 double MVll::A_0(double q2)
765 {
766  return FF_fit(q2, a_0A0, a_1A0, a_2A0, MRA0_2);
767 }
768 
769 double MVll::A_1(double q2)
770 {
771  return FF_fit(q2, a_0A1, a_1A1, a_2A1, MRA1_2);
772 }
773 
774 double MVll::A_2(double q2)
775 {
776  return (MMpMV2 * (MM2mMV2 - q2) * A_1(q2) - 16. * MM * MV2 * MMpMV * FF_fit(q2, a_0A12_LCSR, a_1A12, a_2A12, MRA12_2)) / lambda(q2);
777 }
778 
779 double MVll::T_1(double q2)
780 {
781  return FF_fit(q2, a_0T1, a_1T1, a_2T1, MRT1_2);
782 }
783 
784 double MVll::T_2(double q2)
785 {
786  return FF_fit(q2, a_0T2_LCSR, a_1T2, a_2T2, MRT2_2);
787 }
788 
789 double MVll::V_0t(double q2)
790 {
791  return fourMV / sqrt(q2) * FF_fit(q2, a_0A12_LCSR, a_1A12, a_2A12, MRA12_2);
792 }
793 
794 double MVll::V_p(double q2)
795 {
796  return half * (onepMMoMV * A_1(q2) - sqrt(lambda(q2)) / (MM_MMpMV) * V(q2));
797 }
798 
799 double MVll::V_m(double q2)
800 {
801  return half * (onepMMoMV * A_1(q2) + sqrt(lambda(q2)) / (MM_MMpMV) * V(q2));
802 }
803 
804 double MVll::T_0t(double q2)
805 {
806  return 2 * sqrt(q2) * MV / MM_MMpMV * FF_fit(q2, a_0T23, a_1T23, a_2T23, MRT23_2);
807 }
808 
809 double MVll::T_p(double q2)
810 {
811  return (MM2mMV2 * T_2(q2) - sqrt(lambda(q2)) * T_1(q2)) / twoMM2;
812 }
813 
814 double MVll::T_m(double q2)
815 {
816  return (MM2mMV2 * T_2(q2) + sqrt(lambda(q2)) * T_1(q2)) / twoMM2;
817 }
818 
819 double MVll::S_L(double q2)
820 {
821  return -sqrt(lambda(q2)) / twoMM_mbpms * A_0(q2);
822 }
823 
824 /*******************************************************************************
825  * QCD factorization perturbative corrections *
826  ******************************************************************************/
827 
828 gslpp::complex MVll::I1(double u, double q2)
829 {
830  std::pair<double, double > uq2 = std::make_pair(u,q2);
831 
832  if (I1Cached[uq2] == 0) {
833  ubar = 1. - u;
834  xp = .5 + sqrt(0.25 - (Mc2 - gslpp::complex::i()*1.e-10) / (ubar * MM2 + u * q2));
835  xm = .5 - sqrt(0.25 - (Mc2 - gslpp::complex::i()*1.e-10) / (ubar * MM2 + u * q2));
836  yp = .5 + sqrt(0.25 - (Mc2 - gslpp::complex::i()*1.e-10) / q2);
837  ym = .5 - sqrt(0.25 - (Mc2 - gslpp::complex::i()*1.e-10) / q2);
838  L1xp = log(1. - 1. / xp) * log(1. - xp) - M_PI2osix + dilog(xp / (xp - 1.));
839  L1xm = log(1. - 1. / xm) * log(1. - xm) - M_PI2osix + dilog(xm / (xm - 1.));
840  L1yp = log(1. - 1. / yp) * log(1. - yp) - M_PI2osix + dilog(yp / (yp - 1.));
841  L1ym = log(1. - 1. / ym) * log(1. - ym) - M_PI2osix + dilog(ym / (ym - 1.));
842 
843  cacheI1[uq2] = 1. + twoMc2 / ubar / (MM2 - q2)*(L1xp + L1xm - L1yp - L1ym);
844  I1Cached[uq2] = 1;
845  }
846 
847  return cacheI1[uq2];
848 }
849 
850 gslpp::complex MVll::Tperpplus(double u, double q2)
851 {
852  Ee = (MM2 - q2) / twoMM;
853  ubar = 1. - u;
854  arg1 = (fourMc2 - gslpp::complex::i()*1.e-10)/ (ubar * MM2 + u * q2) - 1.;
855  B01 = -2. * sqrt(arg1) * arctan(1. / sqrt(arg1));
856  arg1 = (fourMc2 - gslpp::complex::i()*1.e-10)/ q2 - 1.;
857  B00 = -2. * sqrt(arg1) * arctan(1. / sqrt(arg1));
858 
859  gslpp::complex tperp = twoMM / Ee / ubar * I1(u, q2) + q2 / Ee / Ee / ubar / ubar * (B01 - B00);
860  return m4downcharge * C_8Lh / (u + ubar * q2 / MM2) + MM / 2. / Mb *
862 }
863 
864 gslpp::complex MVll::Tparplus(double u, double q2)
865 {
866  Ee = (MM2 - q2) / twoMM;
867  ubar = 1. - u;
868  arg1 = (fourMc2 - gslpp::complex::i()*1.e-10)/ (ubar * MM2 + u * q2) - 1.;
869  B01 = -2. * sqrt(arg1) * arctan(1. / sqrt(arg1));
870  arg1 = (fourMc2 - gslpp::complex::i()*1.e-10)/ q2 - 1.;
871  B00 = -2. * sqrt(arg1) * arctan(1. / sqrt(arg1));
872 
873  gslpp::complex tpar = twoMM / Ee / ubar * I1(u, q2) + (ubar * MM2 + u * q2) / Ee / Ee / ubar / ubar * (B01 - B00);
874  return MM / Mb * mySM.getQuarks(QCD::UP).getCharge() * tpar*C_2Lh_bar;
875 }
876 
877 gslpp::complex MVll::Tparminus(double u, double q2)
878 {
879  double ubar = 1. - u;
880  return mySM.getQuarks(QCD::DOWN).getCharge()*(8. * C_8Lh / (ubar + u * q2 / MM2)
881  + sixMMoMb * H_c(ubar * MM2 + u * q2,mu_h*mu_h) * C_2Lh_bar);
882 }
884 double MVll::Integrand_ReTperpplus(double up)
885 {
886  double u = up;
887  return (Tperpplus(u, tmpq2)*6. * u * (1. - u)*
888  (1 + threeGegen0 * (2. * u - 1)
889  + threeGegen1otwo * ((10. * u - 5.)*(2. * u - 1.) - 1.))).real();
890 }
891 
892 double MVll::Integrand_ImTperpplus(double up)
893 {
894  double u = up;
895  return (Tperpplus(u, tmpq2)*6. * u * (1. - u)*
896  (1 + threeGegen0 * (2. * u - 1)
897  + threeGegen1otwo * ((10. * u - 5.)*(2. * u - 1.) - 1.))).imag();
898 }
899 
900 double MVll::Integrand_ReTparplus(double up)
901 {
902  double u = up;
903  return ((Tparplus(u, tmpq2)*6. * u * (1. - u)*
904  (1 + threeGegen0 * (2. * u - 1)
905  + threeGegen1otwo * ((10. * u - 5.)*(2. * u - 1.) - 1.)))/mySM.getMesons(meson).getLambdaM()).real();
906 }
907 
908 double MVll::Integrand_ImTparplus(double up)
909 {
910  double u = up;
911  return ((Tparplus(u, tmpq2)*6. * u * (1. - u)*
912  (1 + threeGegen0 * (2. * u - 1)
913  + threeGegen1otwo * ((10. * u - 5.)*(2. * u - 1.) - 1.)))/mySM.getMesons(meson).getLambdaM()).imag();
914 }
915 
916 double MVll::Integrand_ReTparminus(double up)
917 {
918  double Lambdaplus = mySM.getMesons(meson).getLambdaM();
919  gslpp::complex Lambdamin = exp(-tmpq2 / MM / Lambdaplus) / Lambdaplus * (-gsl_sf_expint_Ei(tmpq2 / MM / Lambdaplus) + gslpp::complex::i() * M_PI);
920 
921  double u = up;
922  return ((Tparminus(u, tmpq2)*6. * u * (1. - u)*
923  (1 + threeGegen0 * (2. * u - 1)
924  + threeGegen1otwo * ((10. * u - 5.)*(2. * u - 1.) - 1.)))/Lambdamin).real();
925 }
926 
927 double MVll::Integrand_ImTparminus(double up)
928 {
929  double Lambdaplus = mySM.getMesons(meson).getLambdaM();
930  gslpp::complex Lambdamin = exp(-tmpq2 / MM / Lambdaplus) / Lambdaplus * (-gsl_sf_expint_Ei(tmpq2 / MM / Lambdaplus) + gslpp::complex::i() * M_PI);
931 
932  double u = up;
933  return ((Tparminus(u, tmpq2)*6. * u * (1. - u)*
934  (1 + threeGegen0 * (2. * u - 1)
935  + threeGegen1otwo * ((10. * u - 5.)*(2. * u - 1.) - 1.)))/Lambdamin).imag();
936 }
937 
938 double MVll::Integrand_ImTpar_pm(double up){
940 }
941 
942 double MVll::Integrand_ReTpar_pm(double up){
944 }
945 
947 {
948  double s = q2 / Mb2;
949  double s2 = s*s;
950  double Ls = log(s);
951  double Lc = log(Mc/Mb);
952  double Lm = log(mu_b/Mb);
954  return (-1424./729. + 16./243.*i*M_PI + 64./27.*Lc)*Lm - 16./243.*Lm*Ls + (16./1215. - 32./135./Mc2*Mb2)*Lm*s
955  +(4./2835. - 8./315./Mc2*Mb2/Mc2*Mb2)*Lm*s2 + (16./76545. - 32./8505/Mc2*Mb2/Mc2*Mb2/Mc2*Mb2)*Lm*s*s2 - 256./243.*Lm*Lm
956  +(-11.65 + 0.18223*i + (-24.709 - 0.13474*i) * s + (-43.588 - 0.4738*i) *s2 + (-86.22 - 1.3542 * i) *s*s2
957  + (-0.080959 - 0.051864*i + (-0.036585 + 0.024753*i) * s + (-0.021692 + 0.036925*i) *s2 + (0.013282 + 0.052023 * i) *s*s2)*Ls );
958 }
959 
961 {
962  double s = q2 / Mb2;
963  double s2 = s*s;
964  double Ls = log(s);
966  return F27_0 + F27_1 * s + F27_2 * s2 + F27_3 * s * s2 + F27_L1_1 * Ls * s + F27_L1_2 * Ls * s2 + F27_L1_3 * Ls * s * s2;
967 }
968 
970 {
971  double s = q2 / Mb2;
972  double s2 = s*s;
973  double Ls = log(s);
975  return F29_0 + F29_L1 * Ls + F29_1 * s +F29_2 * s2 +F29_3 * s * s2 + F29_L1_1 * Ls * s + F29_L1_2 * Ls * s2 + F29_L1_3 * Ls * s2 *s;
976 }
977 
979 {
980  double s = q2 / Mb2;
981  double s2 = s*s;
982  return F87_0 + F87_1 * s + F87_2 * s2 + F87_3 * s * s2 - 0.888889 * log(s)*(1. + s + s2 + s * s2);
983 }
984 
985 double MVll::F89(double q2)
986 {
987  double s = q2 / Mb2;
988  double s2 = s*s;
989  return F89_0 + F89_1 * s + F89_2 * s2 + F89_3 * s * s2 + 1.77778 * log(s)*(1. + s + s2 + s * s2);
990 }
991 
993 {
994  return 1. / CF * (-C_2L_bar * F27(q2) - C_8L * F87(q2) - q2 / 2. / Mb / MM *
995  (C_2L_bar * F29(q2) + 2.*C_1L_bar*(F19(q2) + F29(q2)/6.) + C_8L * F89(q2)));
996 }
997 
999 {
1000  return 1. / CF * (C_2L_bar * F27(q2) + C_8L * F87(q2) + MM / 2. / Mb *
1001  (C_2L_bar * F29(q2) + 2.*C_1L_bar*(F19(q2) + F29(q2)/6.) + C_8L * F89(q2)));
1002 }
1003 
1005 {
1006  tmpq2 = q2;
1007  if (deltaTperpCached[q2] == 0) {
1008 
1009  DTPPR = convertToGslFunction(boost::bind(&MVll::Integrand_ReTperpplus, &(*this), _1));
1010  if (gsl_integration_cquad(&DTPPR, 0., 1., 1.e-2, 1.e-1, w_DTPPR, &avaDTPPR, &errDTPPR, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1011  double ReTppint = avaDTPPR;
1012 
1013  DTPPR = convertToGslFunction(boost::bind(&MVll::Integrand_ImTperpplus, &(*this), _1));
1014  if (gsl_integration_cquad(&DTPPR, 0., 1., 1.e-2, 1.e-1, w_DTPPR, &avaDTPPR, &errDTPPR, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1015  double ImTppint = avaDTPPR;
1016 
1017  cacheDeltaTperp[q2] = ReTppint + gslpp::complex::i() * ImTppint;
1018  deltaTperpCached[q2] = 1;
1019  }
1020 
1021  return deltaT_0 * Cperp(q2) + deltaT_1perp / T_1(q2) / mySM.getMesons(meson).getLambdaM() * cacheDeltaTperp[q2];
1022 }
1023 
1025 {
1026  double Lambdaplus = mySM.getMesons(meson).getLambdaM();
1027  gslpp::complex Lambdamin = exp(-q2 / MM / Lambdaplus) / Lambdaplus * (-gsl_sf_expint_Ei(q2 / MM / Lambdaplus) + gslpp::complex::i() * M_PI);
1028  double T3q2 = MM2mMV2/lambda(q2) * ( (MM2 + 3.*MV2 - q2) * T_2(q2) - 8.*MM*MV2/MMpMV * FF_fit(q2, a_0T23, a_1T23, a_2T23, MRT23_2) );
1029  tmpq2 = q2;
1030  Ee = (MM2 - tmpq2) / twoMM;
1031 
1032  if (deltaTparpCached[q2] == 0) {
1033 
1034  DTPPR = convertToGslFunction(boost::bind(&MVll::Integrand_ReTpar_pm, &(*this), _1));
1035  if (gsl_integration_cquad(&DTPPR, 0., 1., 1.e-2, 1.e-1, w_DTPPR, &avaDTPPR, &errDTPPR, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1036  double ReTppint = avaDTPPR;
1037 
1038  DTPPR = convertToGslFunction(boost::bind(&MVll::Integrand_ImTpar_pm, &(*this), _1));
1039  if (gsl_integration_cquad(&DTPPR, 0., 1., 1.e-2, 1.e-1, w_DTPPR, &avaDTPPR, &errDTPPR, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1040  double ImTppint = avaDTPPR;
1041 
1042  cacheDeltaTparp[q2] = (ReTppint + gslpp::complex::i() * ImTppint);
1043  deltaTparpCached[q2] = 1;
1044  }
1045 
1046  return deltaT_0 * Cpar(q2) + deltaT_1par * MV/Ee / (T_1(q2) - T3q2) * (cacheDeltaTparp[q2]);
1047 }
1048 
1049 
1050 
1052 {
1053  return 1./q2 * Mb/MM * (MM2mMV2 * (MM2 - q2)/MM2 -
1054  sqrt(lambda(q2))) * deltaTperp(q2);
1055 }
1056 
1058 {
1059  return 1./q2 * Mb/MM * (MM2mMV2 * (MM2 - q2)/MM2 +
1060  sqrt(lambda(q2))) * deltaTperp(q2);
1061 }
1062 
1063 
1065 {
1066  return 1. / 2. / MV / MM / sqrt(q2) * ((MM2mMV2 * (MM2mMV2 - q2) - lambda(q2))* (MM2 - q2) *
1067  Mb/MM2/q2 * deltaTperp(q2) - lambda(q2) * (deltaTpar(q2) + deltaTperp(q2))* Mb/MM2mMV2);
1068 }
1069 
1070 /*******************************************************************************
1071  * Fitting routines *
1072  * ****************************************************************************/
1073 
1074 double MVll::reDC9fit(double* x, double* p)
1075 {
1076  return p[0]/x[0] + p[1] + p[2]*x[0] + p[3]*x[0]*x[0] + p[4]*x[0]*x[0]*x[0] + p[5]*x[0]*x[0]*x[0]*x[0] + p[6]*x[0]*x[0]*x[0]*x[0]*x[0];
1077 }
1078 
1079 double MVll::imDC9fit(double* x, double* p)
1080 {
1081  return p[0]/x[0] + p[1] + p[2]*x[0] + p[3]*x[0]*x[0] + p[4]*x[0]*x[0]*x[0] + p[5]*x[0]*x[0]*x[0]*x[0] + p[6]*x[0]*x[0]*x[0]*x[0]*x[0] + p[7]*x[0]*x[0]*x[0]*x[0]*x[0]*x[0];
1082 
1083  //double thr = 4.*Mc2;
1084 }
1085 
1087 {
1088  int dim = 0;
1089  for (double i=0.1; i<SWITCH; i+=0.4) {
1090  double q2tmp = i;
1091  myq2.push_back(q2tmp);
1092  ReDeltaC9_p_mumu.push_back((1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 -
1093  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).real());
1094  ImDeltaC9_p_mumu.push_back((1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 -
1095  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).imag());
1096  dim++;
1097  }
1098  for (double i=SWITCH; i<8.2; i+=0.4) {
1099  double q2tmp = i;
1100  myq2.push_back(q2tmp);
1101  ReDeltaC9_p_mumu.push_back(q2tmp * (1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 -
1102  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).real());
1103  ImDeltaC9_p_mumu.push_back(q2tmp * (1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 -
1104  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).imag());
1105  dim++;
1106  }
1107  gr1 =TGraph(dim, myq2.data(), ReDeltaC9_p_mumu.data());
1108  gr2 =TGraph(dim, myq2.data(), ImDeltaC9_p_mumu.data());
1109 
1110  reffit = TF1("reffit",this,&MVll::reDC9fit,0.1,8.1,7,"MVll","reDC9fit");
1111  imffit = TF1("imffit",this,&MVll::imDC9fit,0.1,8.1,8,"MVll","imDC9fit");
1112 
1113  refres_p_mumu = gr1.Fit(&reffit, "SQN0+rob=0.99");
1114  imfres_p_mumu = gr2.Fit(&imffit, "SQN0+rob=0.99");
1115 
1116  ReDeltaC9_p_mumu.clear();
1117  ImDeltaC9_p_mumu.clear();
1118  myq2.clear();
1119 }
1120 
1122 {
1123  int dim = 0;
1124  for (double i=0.002; i<1.12; i+=0.05) {
1125  double q2tmp = i;
1126  myq2.push_back(q2tmp);
1127  ReDeltaC9_p_ee.push_back((1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 -
1128  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).real());
1129  ImDeltaC9_p_ee.push_back((1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 -
1130  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).imag());
1131  dim++;
1132  }
1133 
1134  gr1 =TGraph(dim, myq2.data(), ReDeltaC9_p_ee.data());
1135  gr2 =TGraph(dim, myq2.data(), ImDeltaC9_p_ee.data());
1136 
1137  reffit = TF1("reffit",this,&MVll::reDC9fit,0,8.1,7,"MVll","reDC9fit");
1138  imffit = TF1("imffit",this,&MVll::imDC9fit,0,8.1,8,"MVll","imDC9fit");
1139 
1140  refres_p_ee = gr1.Fit(&reffit, "SQN0+rob=0.99");
1141  imfres_p_ee = gr2.Fit(&imffit, "SQN0+rob=0.99");
1142 
1143  ReDeltaC9_p_ee.clear();
1144  ImDeltaC9_p_ee.clear();
1145  myq2.clear();
1146 }
1147 
1149 {
1150  int dim = 0;
1151  for (double i=0.1; i<SWITCH; i+=0.4) {
1152  double q2tmp = i;
1153  myq2.push_back(q2tmp);
1154  ReDeltaC9_m_mumu.push_back((1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 +
1155  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).real());
1156  ImDeltaC9_m_mumu.push_back((1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 +
1157  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).imag());
1158  dim++;
1159  }
1160  for (double i=SWITCH; i<8.2; i+=0.4) {
1161  double q2tmp = i;
1162  myq2.push_back(q2tmp);
1163  ReDeltaC9_m_mumu.push_back(q2tmp * (1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 +
1164  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).real());
1165  ImDeltaC9_m_mumu.push_back(q2tmp * (1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 +
1166  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).imag());
1167  dim++;
1168  }
1169 
1170  gr1 = TGraph(dim, myq2.data(), ReDeltaC9_m_mumu.data());
1171  gr2 = TGraph(dim, myq2.data(), ImDeltaC9_m_mumu.data());
1172 
1173  reffit = TF1("reffit",this,&MVll::reDC9fit,0,8.1,7,"MVll","reDC9fit");
1174  imffit = TF1("imffit",this,&MVll::imDC9fit,0,8.1,8,"MVll","imDC9fit");
1175 
1176  refres_m_mumu = gr1.Fit(&reffit, "SQN0+rob=0.99");
1177  imfres_m_mumu = gr2.Fit(&imffit, "SQN0+rob=0.99");
1178 
1179  ReDeltaC9_m_mumu.clear();
1180  ImDeltaC9_m_mumu.clear();
1181  myq2.clear();
1182 }
1183 
1185 {
1186  int dim = 0;
1187  for (double i=0.002; i<1.12; i+=0.05) {
1188  double q2tmp = i;
1189  myq2.push_back(q2tmp);
1190  ReDeltaC9_m_ee.push_back((1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 +
1191  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).real());
1192  ImDeltaC9_m_ee.push_back((1./q2tmp * Mb/MM * (MM2mMV2 * (MM2 - q2tmp)/MM2 +
1193  sqrt(lambda(q2tmp))) * deltaTperp(q2tmp)).imag());
1194  dim++;
1195  }
1196 
1197  gr1 = TGraph(dim, myq2.data(), ReDeltaC9_m_ee.data());
1198  gr2 = TGraph(dim, myq2.data(), ImDeltaC9_m_ee.data());
1199 
1200  reffit = TF1("reffit",this,&MVll::reDC9fit,0,8.1,7,"MVll","reDC9fit");
1201  imffit = TF1("imffit",this,&MVll::imDC9fit,0,8.1,8,"MVll","imDC9fit");
1202 
1203  refres_m_ee = gr1.Fit(&reffit, "SQN0+rob=0.99");
1204  imfres_m_ee = gr2.Fit(&imffit, "SQN0+rob=0.99");
1205 
1206  ReDeltaC9_m_ee.clear();
1207  ImDeltaC9_m_ee.clear();
1208  myq2.clear();
1209 }
1210 
1212 {
1213  int dim = 0;
1214  for (double i=0.1; i<SWITCH; i+=0.4) {
1215  double q2tmp = i;
1216  myq2.push_back(q2tmp);
1217  ReDeltaC9_0_mumu.push_back((1. / 2. / MV / MM / sqrt(q2tmp) * ((MM2mMV2 * (MM2mMV2 - q2tmp) - lambda(q2tmp))* (MM2 - q2tmp) *
1218  Mb/MM2/q2tmp * deltaTperp(q2tmp) - lambda(q2tmp) * (deltaTpar(q2tmp) + deltaTperp(q2tmp))* Mb/MM2mMV2)).real());
1219  ImDeltaC9_0_mumu.push_back((1. / 2. / MV / MM / sqrt(q2tmp) * ((MM2mMV2 * (MM2mMV2 - q2tmp) - lambda(q2tmp))* (MM2 - q2tmp) *
1220  Mb/MM2/q2tmp * deltaTperp(q2tmp) - lambda(q2tmp) * (deltaTpar(q2tmp) + deltaTperp(q2tmp))* Mb/MM2mMV2)).imag());
1221  dim++;
1222  }
1223  for (double i=SWITCH; i<8.2; i+=0.4) {
1224  double q2tmp = i;
1225  myq2.push_back(q2tmp);
1226  ReDeltaC9_0_mumu.push_back(q2tmp * (1. / 2. / MV / MM / sqrt(q2tmp) * ((MM2mMV2 * (MM2mMV2 - q2tmp) - lambda(q2tmp))* (MM2 - q2tmp) *
1227  Mb/MM2/q2tmp * deltaTperp(q2tmp) - lambda(q2tmp) * (deltaTpar(q2tmp) + deltaTperp(q2tmp))* Mb/MM2mMV2)).real());
1228  ImDeltaC9_0_mumu.push_back(q2tmp * (1. / 2. / MV / MM / sqrt(q2tmp) * ((MM2mMV2 * (MM2mMV2 - q2tmp) - lambda(q2tmp))* (MM2 - q2tmp) *
1229  Mb/MM2/q2tmp * deltaTperp(q2tmp) - lambda(q2tmp) * (deltaTpar(q2tmp) + deltaTperp(q2tmp))* Mb/MM2mMV2)).imag());
1230  dim++;
1231  }
1232 
1233  gr1 = TGraph(dim, myq2.data(), ReDeltaC9_0_mumu.data());
1234  gr2 = TGraph(dim, myq2.data(), ImDeltaC9_0_mumu.data());
1235 
1236  reffit = TF1("reffit",this,&MVll::reDC9fit,0,8.1,7,"MVll","reDC9fit");
1237  imffit = TF1("imffit",this,&MVll::imDC9fit,0,8.1,8,"MVll","imDC9fit");
1238 
1239  refres_0_mumu = gr1.Fit(&reffit, "SQN0+rob=0.99");
1240  imfres_0_mumu = gr2.Fit(&imffit, "SQN0+rob=0.99");
1241 
1242  ReDeltaC9_0_mumu.clear();
1243  ImDeltaC9_0_mumu.clear();
1244  myq2.clear();
1245 }
1246 
1248 {
1249  int dim = 0;
1250  for (double i=0.002; i<0.05; i+=0.005) {
1251  double q2tmp = i;
1252  myq2.push_back(q2tmp);
1253  ReDeltaC9_0_ee.push_back((1. / 2. / MV / MM / sqrt(q2tmp) * ((MM2mMV2 * (MM2mMV2 - q2tmp) - lambda(q2tmp))* (MM2 - q2tmp) *
1254  Mb/MM2/q2tmp * deltaTperp(q2tmp) - lambda(q2tmp) * (deltaTpar(q2tmp) + deltaTperp(q2tmp))* Mb/MM2mMV2)).real());
1255  ImDeltaC9_0_ee.push_back((1. / 2. / MV / MM / sqrt(q2tmp) * ((MM2mMV2 * (MM2mMV2 - q2tmp) - lambda(q2tmp))* (MM2 - q2tmp) *
1256  Mb/MM2/q2tmp * deltaTperp(q2tmp) - lambda(q2tmp) * (deltaTpar(q2tmp) + deltaTperp(q2tmp))* Mb/MM2mMV2)).imag());
1257  dim++;
1258  }
1259  for (double i=0.05; i<1.12; i+=0.05) {
1260  double q2tmp = i;
1261  myq2.push_back(q2tmp);
1262  ReDeltaC9_0_ee.push_back((1. / 2. / MV / MM / sqrt(q2tmp) * ((MM2mMV2 * (MM2mMV2 - q2tmp) - lambda(q2tmp))* (MM2 - q2tmp) *
1263  Mb/MM2/q2tmp * deltaTperp(q2tmp) - lambda(q2tmp) * (deltaTpar(q2tmp) + deltaTperp(q2tmp))* Mb/MM2mMV2)).real());
1264  ImDeltaC9_0_ee.push_back((1. / 2. / MV / MM / sqrt(q2tmp) * ((MM2mMV2 * (MM2mMV2 - q2tmp) - lambda(q2tmp))* (MM2 - q2tmp) *
1265  Mb/MM2/q2tmp * deltaTperp(q2tmp) - lambda(q2tmp) * (deltaTpar(q2tmp) + deltaTperp(q2tmp))* Mb/MM2mMV2)).imag());
1266  dim++;
1267  }
1268 
1269  gr1 = TGraph(dim, myq2.data(), ReDeltaC9_0_ee.data());
1270  gr2 = TGraph(dim, myq2.data(), ImDeltaC9_0_ee.data());
1271 
1272  reffit = TF1("reffit",this,&MVll::reDC9fit,0,8.1,7,"MVll","reDC9fit");
1273  imffit = TF1("imffit",this,&MVll::imDC9fit,0,8.1,8,"MVll","imDC9fit");
1274 
1275  refres_0_ee = gr1.Fit(&reffit, "SQN0+rob=0.99");
1276  imfres_0_ee = gr2.Fit(&imffit, "SQN0+rob=0.99");
1277 
1278  ReDeltaC9_0_ee.clear();
1279  ImDeltaC9_0_ee.clear();
1280  myq2.clear();
1281 }
1282 
1284 {
1285  switch (lep) {
1286 
1287  case StandardModel::MU:
1288  if (q2 < SWITCH) return (reDC9fit(&q2, const_cast<double *>(refres_p_mumu->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_p_mumu->GetParams())));
1289  else return (reDC9fit(&q2, const_cast<double *>(refres_p_mumu->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_p_mumu->GetParams())))/q2;
1290  break;
1292  return (reDC9fit(&q2, const_cast<double *>(refres_p_ee->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_p_ee->GetParams())));;
1293  break;
1294  default:
1295  std::stringstream out;
1296  out << lep;
1297  throw std::runtime_error("MVll::fDeltaC9_p : " + out.str() + " not implemented");
1298  }
1299 }
1300 
1302 {
1303  switch (lep) {
1304 
1305  case StandardModel::MU:
1306  if (q2 < SWITCH) return (reDC9fit(&q2, const_cast<double *>(refres_m_mumu->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_m_mumu->GetParams())));
1307  else return (reDC9fit(&q2, const_cast<double *>(refres_m_mumu->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_m_mumu->GetParams())))/q2;
1308  break;
1310  return (reDC9fit(&q2, const_cast<double *>(refres_m_ee->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_m_ee->GetParams())));
1311  break;
1312  default:
1313  std::stringstream out;
1314  out << lep;
1315  throw std::runtime_error("MVll::fDeltaC9_m : " + out.str() + " not implemented");
1316  }
1317 }
1318 
1319 
1321 {
1322  switch (lep) {
1323 
1324  case StandardModel::MU:
1325  if (q2 < SWITCH) return (reDC9fit(&q2, const_cast<double *>(refres_0_mumu->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_0_mumu->GetParams())));
1326  else return (reDC9fit(&q2, const_cast<double *>(refres_0_mumu->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_0_mumu->GetParams())))/q2;
1327  break;
1329  return (reDC9fit(&q2, const_cast<double *>(refres_0_ee->GetParams())) + gslpp::complex::i()*imDC9fit(&q2, const_cast<double *>(imfres_0_ee->GetParams())));
1330  break;
1331  default:
1332  std::stringstream out;
1333  out << lep;
1334  throw std::runtime_error("MVll::fDeltaC9_0 : " + out.str() + " not implemented");
1335  }
1336 }
1337 
1338 /*******************************************************************************
1339  * Helicity amplitudes *
1340  * ****************************************************************************/
1341 gslpp::complex MVll::H_c(double q2, double mu2)
1342 {
1343  double x = fourMc2 / q2;
1344  gslpp::complex par;
1345 
1346  if (x > 1.) par = sqrt(x - 1.) * atan(1. / sqrt(x - 1.));
1347  else par = sqrt(1. - x) * (log((1. + sqrt(1. - x)) / sqrt(x)) - ihalfMPI);
1348 
1349  return -fournineth * (log(Mc2 / mu2) - twothird - x) - fournineth * (2. + x) * par;
1350 }
1351 
1353 {
1354  double x = fourMb2 / q2;
1355  gslpp::complex par;
1356 
1357  if (x > 1.) par = sqrt(x - 1.) * atan(1. / sqrt(x - 1.));
1358  else par = sqrt(1. - x) * (log((1. + sqrt(1. - x)) / sqrt(x)) - ihalfMPI);
1359 
1360  return -fournineth * (logMb - twothird - x) - fournineth * (2. + x) * par;
1361 }
1362 
1364 {
1365  return (H_0_pre - fournineth * log(q2 / mu_b2));
1366 }
1367 
1369 {
1370  return -half * H_0(q2) * H_0_WC + H_c(q2,mu_b2) * H_c_WC - half * H_b(q2) * H_b_WC;
1371 }
1372 
1374 {
1375  return -(((C_9 + fDeltaC9_0(q2) + Y(q2)) - C_9p) * V_0t(q2) + MM2 / q2 * (twoMboMM * (C_7 - C_7p) * T_0t(q2) - sixteenM_PI2 * (h_0[0] + h_1[0] * q2 + h_2[0] * q2 * q2)));
1376 }
1377 
1379 {
1380  return -(((C_9 + fDeltaC9_p(q2) + Y(q2)) * V_p(q2) - C_9p * V_m(q2)) + MM2 / q2 * (twoMboMM * (C_7 * T_p(q2) - C_7p * T_m(q2)) - sixteenM_PI2 * (h_0[1] + h_1[1] * q2 + h_2[1] * q2 * q2)));
1381 }
1382 
1384 {
1385  return -(((C_9 + fDeltaC9_m(q2) + Y(q2)) * V_m(q2) - C_9p * V_p(q2)) + MM2 / q2 * (twoMboMM * (C_7 * T_m(q2) - C_7p * T_p(q2)) - sixteenM_PI2 * (h_0[2] + h_1[2] * q2 + h_2[2] * q2 * q2)));
1386 }
1387 
1389 {
1390  return ( -C_10 + C_10p) * V_0t(q2);
1391 }
1392 
1394 {
1395  return ( -C_10 * V_p(q2) + C_10p * V_m(q2));
1396 }
1397 
1399 {
1400  return ( -C_10 * V_m(q2) + C_10p * V_p(q2));
1401 }
1402 
1404 {
1405  return MboMW * (C_S - C_Sp) * S_L(q2);
1406 }
1407 
1409 {
1410  return ( MboMW * (C_P - C_Pp) + twoMlepMb / q2 * (C_10 - C_10p) * (1. + MsoMb)) * S_L(q2);
1411 }
1412 
1413 /*******************************************************************************
1414  * Angular coefficients *
1415  * ****************************************************************************/
1416 double MVll::k2(double q2)
1417 {
1418  return (MM4 + q2 * q2 + MV4 - twoMV2 * q2 - twoMM2 * (q2 + MV2)) / fourMM2;
1419 }
1420 
1421 double MVll::beta(double q2)
1422 {
1423  return sqrt(1. - 4. * Mlep2 / q2);
1424 }
1425 
1426 double MVll::beta2(double q2)
1427 {
1428  return 1. - 4. * Mlep2 / q2;
1429 }
1430 
1431 double MVll::lambda(double q2)
1432 {
1433  return (MM4 + q2 * q2 + MV4 - twoMV2 * q2 - twoMM2 * (q2 + MV2));
1434 }
1435 
1436 double MVll::F(double q2, double b_i)
1437 {
1438  return sqrt(lambda(q2)) * beta(q2) * q2 * b_i / (ninetysixM_PI3MM3);
1439 }
1440 
1441 double MVll::I_1c(double q2)
1442 {
1443  return F(q2, b)*((H_V_0(q2).abs2() + H_A_0(q2).abs2()) / 2. + H_P(q2).abs2() + 2. * Mlep2 / q2 * (H_V_0(q2).abs2()
1444  - H_A_0(q2).abs2()) + beta2(q2) * H_S(q2).abs2());
1445 }
1446 
1447 double MVll::I_1s(double q2)
1448 {
1449  return F(q2, b)*((beta2(q2) + 2.) / 8. * (H_V_p(q2).abs2() + H_V_m(q2).abs2() + H_A_p(q2).abs2() + H_A_m(q2).abs2()) +
1450  Mlep2 / q2 * (H_V_p(q2).abs2() + H_V_m(q2).abs2() - H_A_p(q2).abs2() - H_A_m(q2).abs2()));
1451 }
1452 
1453 double MVll::I_2c(double q2)
1454 {
1455  return -F(q2, b) * beta2(q2) / 2. * (H_V_0(q2).abs2() + H_A_0(q2).abs2());
1456 }
1457 
1458 double MVll::I_2s(double q2)
1459 {
1460  return F(q2, b) * beta2(q2) / 8. * (H_V_p(q2).abs2() + H_V_m(q2).abs2() + H_A_p(q2).abs2() + H_A_m(q2).abs2());
1461 }
1462 
1463 double MVll::I_3(double q2)
1464 {
1465  return -F(q2, b) / 2. * ((H_V_p(q2) * H_V_m(q2).conjugate()).real() + (H_A_p(q2) * H_A_m(q2).conjugate()).real());
1466 }
1467 
1468 double MVll::I_4(double q2)
1469 {
1470  return F(q2, b) * beta2(q2) / 4. * (((H_V_m(q2) + H_V_p(q2)) * H_V_0(q2).conjugate()).real() + ((H_A_m(q2) + H_A_p(q2)) * H_A_0(q2).conjugate()).real());
1471 }
1472 
1473 double MVll::I_5(double q2)
1474 {
1475  return F(q2, b)*(beta(q2) / 2. * (((H_V_m(q2) - H_V_p(q2)) * H_A_0(q2).conjugate()).real() + ((H_A_m(q2) - H_A_p(q2)) * H_V_0(q2).conjugate()).real()) -
1476  beta(q2) * Mlep / sqrt(q2)*(H_S(q2).conjugate()*(H_V_p(q2) + H_V_m(q2))).real());
1477 }
1478 
1479 double MVll::I_6s(double q2)
1480 {
1481  return F(q2, b) * beta(q2)*(H_V_m(q2)*(H_A_m(q2).conjugate()) - H_V_p(q2)*(H_A_p(q2).conjugate())).real();
1482 }
1483 
1484 double MVll::I_6c(double q2)
1485 {
1486  return 2. * F(q2, b) * beta(q2) * Mlep / sqrt(q2)*(H_S(q2).conjugate() * H_V_0(q2)).real();
1487 }
1488 
1489 double MVll::I_7(double q2)
1490 {
1491  return F(q2, b)*(beta(q2) / 2. * (((H_V_m(q2) + H_V_p(q2)) * H_A_0(q2).conjugate()).imag() + ((H_A_m(q2) + H_A_p(q2)) * H_V_0(q2).conjugate()).imag()) -
1492  beta(q2) * Mlep / sqrt(q2)*(H_S(q2).conjugate()*(H_V_m(q2) - H_V_p(q2))).imag());
1493 }
1494 
1495 double MVll::I_8(double q2)
1496 {
1497  return F(q2, b) * beta2(q2) / 4. * (((H_V_m(q2) - H_V_p(q2)) * H_V_0(q2).conjugate()).imag() + ((H_A_m(q2) - H_A_p(q2)) * H_A_0(q2).conjugate()).imag());
1498 }
1499 
1500 double MVll::I_9(double q2)
1501 {
1502  return F(q2, b) * beta2(q2) / 2. * ((H_V_p(q2) * H_V_m(q2).conjugate()).imag() + (H_A_p(q2) * H_A_m(q2).conjugate()).imag());
1503 }
1504 
1505 double MVll::Delta(int i, double q2)
1506 {
1507  return 0; /* FIX CPV */
1508  //return (I(i, q2,0) - I(i, q2,1))/2;
1509 }
1510 
1511 
1512 double MVll::integrateSigma(int i, double q_min, double q_max)
1513 {
1514  updateParameters();
1515 
1516  std::pair<double, double > qbin = std::make_pair(q_min, q_max);
1517 
1518  old_handler = gsl_set_error_handler_off();
1519 
1520  switch (i) {
1521  case 0:
1522  if (sigma0Cached[qbin] == 0) {
1523  FS = convertToGslFunction(boost::bind(&MVll::getSigma1c, &(*this), _1));
1524  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1525  cacheSigma0[qbin] = NN*avaSigma;
1526  sigma0Cached[qbin] = 1;
1527  }
1528  return cacheSigma0[qbin];
1529  break;
1530  case 1:
1531  if (sigma1Cached[qbin] == 0) {
1532  FS = convertToGslFunction(boost::bind(&MVll::getSigma1s, &(*this), _1));
1533  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1534  cacheSigma1[qbin] = NN*avaSigma;
1535  sigma1Cached[qbin] = 1;
1536  }
1537  return cacheSigma1[qbin];
1538  break;
1539  case 2:
1540  if (sigma2Cached[qbin] == 0) {
1541  FS = convertToGslFunction(boost::bind(&MVll::getSigma2c, &(*this), _1));
1542  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1543  cacheSigma2[qbin] = NN*avaSigma;
1544  sigma2Cached[qbin] = 1;
1545  }
1546  return cacheSigma2[qbin];
1547  break;
1548  case 3:
1549  if (sigma3Cached[qbin] == 0) {
1550  FS = convertToGslFunction(boost::bind(&MVll::getSigma2s, &(*this), _1));
1551  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1552  cacheSigma3[qbin] = NN*avaSigma;
1553  sigma3Cached[qbin] = 1;
1554  }
1555  return cacheSigma3[qbin];
1556  break;
1557  case 4:
1558  if (sigma4Cached[qbin] == 0) {
1559  FS = convertToGslFunction(boost::bind(&MVll::getSigma3, &(*this), _1));
1560  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1561  cacheSigma4[qbin] = NN*avaSigma;
1562  sigma4Cached[qbin] = 1;
1563  }
1564  return cacheSigma4[qbin];
1565  break;
1566  case 5:
1567  if (sigma5Cached[qbin] == 0) {
1568  FS = convertToGslFunction(boost::bind(&MVll::getSigma4, &(*this), _1));
1569  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1570  cacheSigma5[qbin] = NN*avaSigma;
1571  sigma5Cached[qbin] = 1;
1572  }
1573  return cacheSigma5[qbin];
1574  break;
1575  case 6:
1576  if (sigma6Cached[qbin] == 0) {
1577  FS = convertToGslFunction(boost::bind(&MVll::getSigma5, &(*this), _1));
1578  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1579  cacheSigma6[qbin] = NN*avaSigma;
1580  sigma6Cached[qbin] = 1;
1581  }
1582  return cacheSigma6[qbin];
1583  break;
1584  case 7:
1585  if (sigma7Cached[qbin] == 0) {
1586  FS = convertToGslFunction(boost::bind(&MVll::getSigma6s, &(*this), _1));
1587  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1588  cacheSigma7[qbin] = NN*avaSigma;
1589  sigma7Cached[qbin] = 1;
1590  }
1591  return cacheSigma7[qbin];
1592  break;
1593  case 9:
1594  if (sigma9Cached[qbin] == 0) {
1595  FS = convertToGslFunction(boost::bind(&MVll::getSigma7, &(*this), _1));
1596  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1597  cacheSigma9[qbin] = NN*avaSigma;
1598  sigma9Cached[qbin] = 1;
1599  }
1600  return cacheSigma9[qbin];
1601  break;
1602  case 10:
1603  if (sigma10Cached[qbin] == 0) {
1604  FS = convertToGslFunction(boost::bind(&MVll::getSigma8, &(*this), _1));
1605  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1606  cacheSigma10[qbin] = NN*avaSigma;
1607  sigma10Cached[qbin] = 1;
1608  }
1609  return cacheSigma10[qbin];
1610  break;
1611  case 11:
1612  if (sigma11Cached[qbin] == 0) {
1613  FS = convertToGslFunction(boost::bind(&MVll::getSigma9, &(*this), _1));
1614  if (gsl_integration_cquad(&FS, q_min, q_max, 1.e-2, 1.e-1, w_sigma, &avaSigma, &errSigma, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1615  cacheSigma11[qbin] = NN*avaSigma;
1616  sigma11Cached[qbin] = 1;
1617  }
1618  return cacheSigma11[qbin];
1619  break;
1620  default:
1621  std::stringstream out;
1622  out << i;
1623  throw std::runtime_error("MVll::integrateSigma: index " + out.str() + " not implemented");
1624  }
1625 
1626  gsl_set_error_handler(old_handler);
1627 
1628 }
1629 
1630 double MVll::getSigma(int i, double q_2)
1631 {
1632  updateParameters();
1633 
1634  switch (i) {
1635  case 0:
1636  return getSigma1c(q_2);
1637  break;
1638  case 1:
1639  return getSigma1s(q_2);
1640  break;
1641  case 2:
1642  return getSigma2c(q_2);
1643  break;
1644  case 3:
1645  return getSigma2s(q_2);
1646  break;
1647  case 4:
1648  return getSigma3(q_2);
1649  break;
1650  case 5:
1651  return getSigma4(q_2);
1652  break;
1653  case 6:
1654  return getSigma5(q_2);
1655  break;
1656  case 7:
1657  return getSigma6s(q_2);
1658  break;
1659  case 9:
1660  return getSigma7(q_2);
1661  break;
1662  case 10:
1663  return getSigma8(q_2);
1664  break;
1665  case 11:
1666  return getSigma9(q_2);
1667  break;
1668  default:
1669  std::stringstream out;
1670  out << i;
1671  throw std::runtime_error("MVll::integrateSigma: index " + out.str() + " not implemented");
1672  }
1673 }
1674 
1675 double MVll::integrateDelta(int i, double q_min, double q_max)
1676 {
1677  updateParameters();
1678 
1679  std::pair<double, double > qbin = std::make_pair(q_min, q_max);
1680 
1681  old_handler = gsl_set_error_handler_off();
1682 
1683  switch (i) {
1684  case 0:
1685  if (delta0Cached[qbin] == 0) {
1686  FD = convertToGslFunction(boost::bind(&MVll::getDelta0, &(*this), _1));
1687  if (gsl_integration_cquad(&FD, q_min, q_max, 1.e-2, 1.e-1, w_delta, &avaDelta, &errDelta, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1688  cacheDelta0[qbin] = avaDelta;
1689  delta0Cached[qbin] = 1;
1690  }
1691  return cacheDelta0[qbin];
1692  break;
1693  case 1:
1694  if (delta1Cached[qbin] == 0) {
1695  FD = convertToGslFunction(boost::bind(&MVll::getDelta1, &(*this), _1));
1696  if (gsl_integration_cquad(&FD, q_min, q_max, 1.e-2, 1.e-1, w_delta, &avaDelta, &errDelta, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1697  cacheDelta1[qbin] = avaDelta;
1698  delta1Cached[qbin] = 1;
1699  }
1700  return cacheDelta1[qbin];
1701  break;
1702  case 2:
1703  if (delta2Cached[qbin] == 0) {
1704  FD = convertToGslFunction(boost::bind(&MVll::getDelta2, &(*this), _1));
1705  if (gsl_integration_cquad(&FD, q_min, q_max, 1.e-2, 1.e-1, w_delta, &avaDelta, &errDelta, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1706  cacheDelta2[qbin] = avaDelta;
1707  delta2Cached[qbin] = 1;
1708  }
1709  return cacheDelta2[qbin];
1710  break;
1711  case 3:
1712  if (delta3Cached[qbin] == 0) {
1713  FD = convertToGslFunction(boost::bind(&MVll::getDelta3, &(*this), _1));
1714  if (gsl_integration_cquad(&FD, q_min, q_max, 1.e-2, 1.e-1, w_delta, &avaDelta, &errDelta, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1715  cacheDelta3[qbin] = avaDelta;
1716  delta3Cached[qbin] = 1;
1717  }
1718  return cacheDelta3[qbin];
1719  break;
1720  case 7:
1721  if (delta7Cached[qbin] == 0) {
1722  FD = convertToGslFunction(boost::bind(&MVll::getDelta7, &(*this), _1));
1723  if (gsl_integration_cquad(&FD, q_min, q_max, 1.e-2, 1.e-1, w_delta, &avaDelta, &errDelta, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1724  cacheDelta7[qbin] = avaDelta;
1725  delta7Cached[qbin] = 1;
1726  }
1727  return cacheDelta7[qbin];
1728  break;
1729  case 11:
1730  if (delta11Cached[qbin] == 0) {
1731  FD = convertToGslFunction(boost::bind(&MVll::getDelta11, &(*this), _1));
1732  if (gsl_integration_cquad(&FD, q_min, q_max, 1.e-2, 1.e-1, w_delta, &avaDelta, &errDelta, NULL) != 0) return std::numeric_limits<double>::quiet_NaN();
1733  cacheDelta11[qbin] = avaDelta;
1734  delta11Cached[qbin] = 1;
1735  }
1736  return cacheDelta11[qbin];
1737  break;
1738  default:
1739  std::stringstream out;
1740  out << i;
1741  throw std::runtime_error("integrateDelta: index " + out.str() + " not implemented");
1742  }
1743 
1744  gsl_set_error_handler(old_handler);
1745 
1746 }
double z(double q2)
The lattice parameter from arXiv:1310.3722v3.
Definition: MVll.cpp:754
double a_0A12_LCSR
Definition: MVll.h:561
std::map< std::pair< double, double >, double > cacheSigma10
Definition: MVll.h:686
double Integrand_ReTperpplus(double up)
The real part of the integral involving at fixed , according to .
Definition: MVll.cpp:884
double MboMW
Definition: MVll.h:484
double MM4
Definition: MVll.h:470
double MRA1_2
Definition: MVll.h:575
unsigned int A1_updated
Definition: MVll.h:706
double getMRT23phi() const
Definition: QCD.h:1608
gslpp::complex h2Ccache[3]
Definition: MVll.h:815
double Mlep
Definition: MVll.h:445
gslpp::complex L1yp
Definition: MVll.h:535
unsigned int I6_updated
Definition: MVll.h:846
double MRT23_2
Definition: MVll.h:591
double A_2(double q2)
The transverse form factor .
Definition: MVll.cpp:774
TFitResultPtr imfres_m_mumu
Definition: MVll.h:638
double twoMc2
Definition: MVll.h:491
double lambda(double q2)
The factor used in the angular coefficients .
Definition: MVll.cpp:1431
void setUpdateFlag(StandardModel::meson meson_i, StandardModel::meson meson_j, StandardModel::lepton lep_i, bool updated_i)
sets the update flag for the initial and final state dependent object for .
Definition: Flavour.h:228
TFitResultPtr imfres_p_mumu
Definition: MVll.h:636
gslpp::complex F87_3
Definition: MVll.h:540
double I_3(double q2)
The angular coefficient .
Definition: MVll.cpp:1463
double imDC9fit(double *x, double *p)
The fit function for the imaginary part of the QCDF correction .
Definition: MVll.cpp:1079
double geta_1A12phi() const
Definition: QCD.h:1496
gslpp::complex xm
Definition: MVll.h:530
double getMRT23() const
Definition: QCD.h:1384
double integrateSigma(int i, double q_min, double q_max)
The integral of from to .
Definition: MVll.cpp:1512
gslpp::complex yp
Definition: MVll.h:531
TGraph gr1
Definition: MVll.h:649
double F89_1
Definition: MVll.h:557
double Mb2
Definition: MVll.h:499
double getMRA12() const
Definition: QCD.h:1288
double abs2() const
gslpp::complex C_2L_bar
Definition: MVll.h:601
gslpp::complex L1ym
Definition: MVll.h:536
unsigned int I10_updated
Definition: MVll.h:850
unsigned int C_3_updated
Definition: MVll.h:762
gslpp::vector< gslpp::complex > ** ComputeCoeffBMll(double mu, schemes scheme=NDR)
Computes the Wilson coefficient for the process .
Definition: Flavour.h:176
gslpp::complex F87_0
Definition: MVll.h:537
unsigned int h1_updated
Definition: MVll.h:818
gsl_error_handler_t * old_handler
Definition: MVll.h:673
double Ms
Definition: MVll.h:452
double geta_2T23phi() const
Definition: QCD.h:1600
double getSigma1c(double q2)
The CP average .
Definition: MVll.h:1155
gslpp::complex C_6
Definition: MVll.h:606
std::map< std::pair< double, double >, double > cacheSigma0
Definition: MVll.h:677
gslpp::complex F29_L1_1
Definition: MVll.h:546
gslpp::complex C_Pp
Definition: MVll.h:619
std::map< double, unsigned int > deltaTparmCached
Definition: MVll.h:875
double errDelta
Definition: MVll.h:662
std::map< std::pair< double, double >, unsigned int > I1Cached
Definition: MVll.h:853
gslpp::vector< double > SL_cache
Definition: MVll.h:752
TF1 reffit
Definition: MVll.h:652
gslpp::complex h_1[3]
Definition: MVll.h:458
StandardModel::lepton lep
Definition: MVll.h:439
double geta_2V() const
Definition: QCD.h:1184
double getMRT1phi() const
Definition: QCD.h:1544
double getDelta1(double q2)
The CP asymmetry .
Definition: MVll.h:1285
unsigned int C_1_updated
Definition: MVll.h:756
double twoMM
Definition: MVll.h:487
double getSigma3(double q2)
The CP average .
Definition: MVll.h:1195
std::map< double, gslpp::complex > cacheDeltaTperp
Definition: MVll.h:880
std::map< double, unsigned int > deltaTparpCached
Definition: MVll.h:874
double fourMM2
Definition: MVll.h:481
void fit_DeltaC9_m_mumu()
The fitting routine for the QCDF correction in the muon channel.
Definition: MVll.cpp:1148
#define SWITCH
Definition: MVll.h:22
double Ee
Definition: MVll.h:523
gslpp::complex C_3_cache
Definition: MVll.h:763
gslpp::complex C_9p_cache
Definition: MVll.h:787
double deltaT_0
Definition: MVll.h:520
gslpp::complex Cperp(double q2)
The correction from .
Definition: MVll.cpp:992
gslpp::complex deltaTpar(double q2)
The total correction from .
Definition: MVll.cpp:1024
double V_p(double q2)
The helicity form factor .
Definition: MVll.cpp:794
double geta_1A1phi() const
Definition: QCD.h:1464
double MMmMV
Definition: MVll.h:467
double getMub() const
A get method to access the threshold between five- and four-flavour theory in GeV.
Definition: QCD.h:905
Particle getLeptons(const StandardModel::lepton p) const
A get method to retrieve the member object of a lepton.
double getSigma7(double q2)
The CP average .
Definition: MVll.h:1245
gslpp::complex F27_L1_1
Definition: MVll.h:553
gslpp::complex F29_L1
Definition: MVll.h:542
gslpp::complex C_1
Definition: MVll.h:597
unsigned int VL2_updated
Definition: MVll.h:728
double CF
Definition: MVll.h:519
double MMmMV2
Definition: MVll.h:468
std::map< std::pair< double, double >, unsigned int > sigma6Cached
Definition: MVll.h:861
double a_2T1
Definition: MVll.h:582
gslpp::vector< double > H_V2cache
Definition: MVll.h:828
double MRV_2
Definition: MVll.h:567
unsigned int z_updated
Definition: MVll.h:718
double FF_fit(double q2, double a_0, double a_1, double a_2, double MR2)
The fit function from , .
Definition: MVll.cpp:749
gslpp::complex C_5_cache
Definition: MVll.h:769
unsigned int C_P_updated
Definition: MVll.h:795
gslpp::complex H_A_m(double q2)
The helicity amplitude .
Definition: MVll.cpp:1398
std::map< std::pair< double, double >, unsigned int > delta1Cached
Definition: MVll.h:868
std::vector< double > ReDeltaC9_0_mumu
Definition: MVll.h:625
unsigned int I1_updated
Definition: MVll.h:841
gsl_integration_cquad_workspace * w_DTPPR
Definition: MVll.h:669
std::vector< double > ImDeltaC9_m_mumu
Definition: MVll.h:624
double getDelta0(double q2)
The CP asymmetry .
Definition: MVll.h:1275
gslpp::complex B01
Definition: MVll.h:527
double integrateDelta(int i, double q_min, double q_max)
The integral of from to .
Definition: MVll.cpp:1675
double MV2
Definition: MVll.h:471
double I_5(double q2)
The angular coefficient .
Definition: MVll.cpp:1473
gsl_function FD
Definition: MVll.h:666
unsigned int F_updated
Definition: MVll.h:725
gslpp::complex F29_0
Definition: MVll.h:541
double geta_2Vphi() const
Definition: QCD.h:1408
complex conjugate() const
unsigned int H_Pupdated
Definition: MVll.h:837
std::vector< double > ImDeltaC9_0_mumu
Definition: MVll.h:626
std::map< std::pair< double, double >, double > cacheSigma7
Definition: MVll.h:684
gslpp::complex F27_0
Definition: MVll.h:549
gslpp::complex C_9_cache
Definition: MVll.h:778
bool getUpdateFlag(StandardModel::meson meson_i, StandardModel::meson meson_j, StandardModel::lepton lep_i)
gets the update flag for the initial and final state dependent object for .
Definition: Flavour.h:245
unsigned int SR_updated
Definition: MVll.h:754
double F89_0
Definition: MVll.h:556
gslpp::complex C_P
Definition: MVll.h:613
unsigned int H_A1updated
Definition: MVll.h:831
double S_L_pre
Definition: MVll.h:516
double A_1(double q2)
The transverse form factor .
Definition: MVll.cpp:769
unsigned int h2_updated
Definition: MVll.h:819
gslpp::complex geth_0_1() const
Definition: QCD.h:1104
gslpp::complex ubar
Definition: MVll.h:525
complex pow(const complex &z1, const complex &z2)
std::map< std::pair< double, double >, unsigned int > sigma9Cached
Definition: MVll.h:863
double geta_2A0phi() const
Definition: QCD.h:1440
gslpp::complex H_0_pre
Definition: MVll.h:496
double geta_0T2phi() const
Definition: QCD.h:1552
std::map< std::pair< double, double >, double > cacheDelta0
Definition: MVll.h:689
double fourMc2
Definition: MVll.h:500
double a_0A0
Definition: MVll.h:568
gslpp::complex C_1_cache
Definition: MVll.h:757
unsigned int Mb_Ms_updated
Definition: MVll.h:749
double MMpMV2
Definition: MVll.h:466
double twoMboMM
Definition: MVll.h:495
unsigned int I3_updated
Definition: MVll.h:843
double twoMM3
Definition: MVll.h:511
gslpp::complex Tparminus(double u, double q2)
The function from .
Definition: MVll.cpp:877
TFitResultPtr refres_p_mumu
Definition: MVll.h:635
const double & real() const
double Als(const double mu, const orders order=FULLNLO) const
Computes the running strong coupling in the scheme. In the cases of LO, NLO and FULLNNLO...
Definition: QCD.cpp:1004
double MM2
Definition: MVll.h:469
gsl_function convertToGslFunction(const F &f)
Definition: MVll.h:38
double F(double q2, double b_i)
The factor used in the angular coefficients I_i.
Definition: MVll.cpp:1436
unsigned int I11_updated
Definition: MVll.h:851
gslpp::complex DeltaC9_0(double q2)
The total QCDF correction computed integrating over .
Definition: MVll.cpp:1064
gslpp::complex fDeltaC9_m(double q2)
The total QCDF correction computed fitting over .
Definition: MVll.cpp:1301
std::map< std::pair< double, double >, double > cacheSigma6
Definition: MVll.h:683
double geta_0A1() const
Definition: QCD.h:1232
double getSigma2c(double q2)
The CP average .
Definition: MVll.h:1175
gslpp::complex C_8Lh
Definition: MVll.h:609
meson
An enum type for mesons.
Definition: QCD.h:713
std::map< std::pair< double, double >, unsigned int > delta2Cached
Definition: MVll.h:869
unsigned int I2_updated
Definition: MVll.h:842
gslpp::complex F27_3
Definition: MVll.h:552
gslpp::complex B00
Definition: MVll.h:528
unsigned int h0_updated
Definition: MVll.h:817
std::map< std::pair< double, double >, unsigned int > sigma2Cached
Definition: MVll.h:857
TFitResultPtr imfres_0_mumu
Definition: MVll.h:640
double Mc
Definition: MVll.h:451
double getMRA1() const
Definition: QCD.h:1256
unsigned int V_updated
Definition: MVll.h:700
static const complex & i()
gslpp::complex C_5
Definition: MVll.h:605
double geta_0A0() const
Definition: QCD.h:1200
unsigned int H_Supdated
Definition: MVll.h:834
double geta_2T2phi() const
Definition: QCD.h:1568
double mu_b
Definition: MVll.h:449
std::map< std::pair< double, double >, double > cacheDelta7
Definition: MVll.h:693
gslpp::complex F27_2
Definition: MVll.h:551
unsigned int C_S_updated
Definition: MVll.h:792
std::vector< double > ImDeltaC9_p_ee
Definition: MVll.h:628
double getDelta11(double q2)
The CP asymmetry .
Definition: MVll.h:1325
double getSigma9(double q2)
The CP average .
Definition: MVll.h:1265
gslpp::complex F29_2
Definition: MVll.h:544
double geta_0A12phi() const
Definition: QCD.h:1488
Definition: QCD.h:731
double a_2T23
Definition: MVll.h:590
gslpp::complex F87_1
Definition: MVll.h:538
gslpp::complex F19(double q2)
The correction from .
Definition: MVll.cpp:946
unsigned int C_Sp_updated
Definition: MVll.h:798
double a_1T1
Definition: MVll.h:581
double MM2mMV2
Definition: MVll.h:474
gslpp::complex H_0(double q2)
The function involved into .
Definition: MVll.cpp:1363
const double & getDecayconst() const
A get method for the decay constant of the meson.
Definition: Meson.h:74
std::map< std::pair< double, double >, unsigned int > sigma7Cached
Definition: MVll.h:862
double a_0V
Definition: MVll.h:564
double twoMV2
Definition: MVll.h:479
double V_m(double q2)
The helicity form factor .
Definition: MVll.cpp:799
TFitResultPtr refres_p_ee
Definition: MVll.h:642
gslpp::complex xp
Definition: MVll.h:529
gslpp::vector< double > A0_cache
Definition: MVll.h:704
double t_m
Definition: MVll.h:462
std::vector< double > myq2
Definition: MVll.h:633
double m4downcharge
Definition: MVll.h:488
A model class for the Standard Model.
std::map< double, unsigned int > deltaTperpCached
Definition: MVll.h:876
std::map< std::pair< double, double >, gslpp::complex > cacheI1
Definition: MVll.h:675
gslpp::vector< double > H_V1cache
Definition: MVll.h:825
double geta_1A1() const
Definition: QCD.h:1240
gslpp::complex H_b_WC
Definition: MVll.h:506
std::vector< double > ReDeltaC9_p_ee
Definition: MVll.h:627
unsigned int C_2_updated
Definition: MVll.h:759
double tmpq2
Definition: MVll.h:655
gslpp::complex F29(double q2)
The correction from .
Definition: MVll.cpp:969
double T_p(double q2)
The helicity form factor .
Definition: MVll.cpp:809
StandardModel::meson meson
Definition: MVll.h:440
void fit_DeltaC9_m_ee()
The fitting routine for the QCDF correction in the electron channel.
Definition: MVll.cpp:1184
gslpp::complex H_b(double q2)
The function involved into .
Definition: MVll.cpp:1352
gslpp::complex C_8Lh_cache
Definition: MVll.h:808
double Integrand_ImTpar_pm(double up)
The sum of Integrand_ImTparplus() and Integrand_ImTparminus().
Definition: MVll.cpp:938
double MW
Definition: MVll.h:454
std::map< std::pair< double, double >, double > cacheSigma1
Definition: MVll.h:678
std::vector< double > ImDeltaC9_p_mumu
Definition: MVll.h:622
double Integrand_ImTperpplus(double up)
The imaginary part of the integral involving at fixed , according to .
Definition: MVll.cpp:892
double Mc2
Definition: MVll.h:498
double getMRA1phi() const
Definition: QCD.h:1480
gslpp::vector< double > V_cache
Definition: MVll.h:701
double NN
Definition: MVll.h:517
gslpp::vector< double > Ycache
Definition: MVll.h:811
const double & getLambdaM() const
Definition: Meson.h:110
double MsoMb
Definition: MVll.h:485
unsigned int N_updated
Definition: MVll.h:696
gslpp::complex C_Pp_cache
Definition: MVll.h:802
unsigned int TL2_updated
Definition: MVll.h:731
unsigned int C_Pp_updated
Definition: MVll.h:801
double getMRVphi() const
Definition: QCD.h:1416
double mu_b2
Definition: MVll.h:497
double geta_1V() const
Definition: QCD.h:1176
std::vector< double > ReDeltaC9_p_mumu
Definition: MVll.h:621
unsigned int A0_updated
Definition: MVll.h:703
double deltaT_1perp
Definition: MVll.h:522
std::vector< double > ImDeltaC9_0_ee
Definition: MVll.h:632
double beta_cache
Definition: MVll.h:723
Meson getMesons(const meson m) const
A get method to access a meson as an object of the type Meson.
Definition: QCD.h:859
double MM_MMpMV
Definition: MVll.h:477
gslpp::complex F29_L1_2
Definition: MVll.h:547
unsigned int T2_updated
Definition: MVll.h:712
double I_7(double q2)
The angular coefficient .
Definition: MVll.cpp:1489
gslpp::vector< double > H_V0cache
Definition: MVll.h:822
double a_2T2
Definition: MVll.h:586
double k2(double q2)
The square of the 3-momentum of the recoiling meson in the M rest frame, .
Definition: MVll.cpp:1416
double fourMV
Definition: MVll.h:475
unsigned int SL_updated
Definition: MVll.h:751
virtual double Mw() const
The SM prediction for the -boson mass in the on-shell scheme, .
double MV
Definition: MVll.h:447
gslpp::complex H_c_WC
Definition: MVll.h:505
double T_1(double q2)
The transverse form factor .
Definition: MVll.cpp:779
gslpp::vector< gslpp::complex > ** allcoeffprime
Definition: MVll.h:595
double beta2(double q2)
The factor used in the angular coefficients .
Definition: MVll.cpp:1426
gslpp::complex C_Sp_cache
Definition: MVll.h:799
std::map< std::pair< double, double >, double > cacheSigma5
Definition: MVll.h:682
unsigned int TR2_updated
Definition: MVll.h:737
gslpp::complex C_P_cache
Definition: MVll.h:796
double geta_0T23() const
Definition: QCD.h:1360
gslpp::complex DeltaC9_m(double q2)
The total QCDF correction computed integrating over .
Definition: MVll.cpp:1057
std::map< std::pair< double, double >, unsigned int > sigma10Cached
Definition: MVll.h:864
double fournineth
Definition: MVll.h:507
double MRA0_2
Definition: MVll.h:571
unsigned int TR0_updated
Definition: MVll.h:747
std::map< std::pair< double, double >, unsigned int > sigma3Cached
Definition: MVll.h:858
double a_1V
Definition: MVll.h:565
gslpp::complex C_4_cache
Definition: MVll.h:766
double a_0A12
Definition: MVll.h:576
double z_0
Definition: MVll.h:464
std::vector< double > ReDeltaC9_m_mumu
Definition: MVll.h:623
unsigned int Yupdated
Definition: MVll.h:810
double S_L(double q2)
The helicity form factor .
Definition: MVll.cpp:819
std::map< std::pair< double, double >, unsigned int > delta0Cached
Definition: MVll.h:867
double threeGegen0
Definition: MVll.h:489
gslpp::complex F27_L1_3
Definition: MVll.h:555
unsigned int H_V2updated
Definition: MVll.h:827
gslpp::complex C_3
Definition: MVll.h:603
double a_2V
Definition: MVll.h:566
TGraph gr2
Definition: MVll.h:650
unsigned int I0_updated
Definition: MVll.h:840
double A_0(double q2)
The transverse form factor .
Definition: MVll.cpp:764
double a_1A0
Definition: MVll.h:569
double I_1c(double q2)
The angular coefficient .
Definition: MVll.cpp:1441
double geta_1A0phi() const
Definition: QCD.h:1432
unsigned int VL1_updated
Definition: MVll.h:727
double computeWidth() const
A method to compute the width of the meson from its lifetime.
Definition: Meson.cpp:25
double a_0T23
Definition: MVll.h:588
std::map< std::pair< double, double >, double > cacheSigma11
Definition: MVll.h:687
std::map< double, gslpp::complex > cacheDeltaTparp
Definition: MVll.h:878
double geta_1T2() const
Definition: QCD.h:1336
gslpp::complex Cpar(double q2)
The correction from .
Definition: MVll.cpp:998
gslpp::vector< double > TL0_cache
Definition: MVll.h:743
double b
Definition: MVll.h:456
std::vector< double > ImDeltaC9_m_ee
Definition: MVll.h:630
double twoMM_mbpms
Definition: MVll.h:480
double gtilde_1_pre
Definition: MVll.h:512
gslpp::complex H_c(double q2, double mu)
The function involved into .
Definition: MVll.cpp:1341
gslpp::complex H_A_0(double q2)
The helicity amplitude .
Definition: MVll.cpp:1388
double a_1T23
Definition: MVll.h:589
double onepMMoMV
Definition: MVll.h:476
double width
Definition: MVll.h:453
gslpp::vector< double > A1_cache
Definition: MVll.h:707
void fit_DeltaC9_0_ee()
The fitting routine for the QCDF correction in the electron channel.
Definition: MVll.cpp:1247
double getGF() const
A get method to retrieve the Fermi constant .
double GF
Definition: MVll.h:443
gslpp::complex geth_0() const
Definition: QCD.h:1080
double geta_1T1phi() const
Definition: QCD.h:1528
double deltaT_1par
Definition: MVll.h:521
double geta_2T1() const
Definition: QCD.h:1312
double geta_1A12() const
Definition: QCD.h:1272
double logMc
Definition: MVll.h:502
double getCharge() const
A get method to access the particle charge.
Definition: Particle.h:97
double sixMMoMb
Definition: MVll.h:518
gslpp::complex H_V_p(double q2)
The helicity amplitude .
Definition: MVll.cpp:1378
gslpp::complex C_S_cache
Definition: MVll.h:793
double Integrand_ReTparplus(double up)
The real part of the integral involving at fixed , according to .
Definition: MVll.cpp:900
unsigned int beta_updated
Definition: MVll.h:722
gslpp::complex H_V_m(double q2)
The helicity amplitude .
Definition: MVll.cpp:1383
gslpp::vector< gslpp::complex > ** allcoeffh
Definition: MVll.h:594
double getMRT2() const
Definition: QCD.h:1352
gslpp::complex C_4
Definition: MVll.h:604
gslpp::complex H_S(double q2)
The helicity amplitude .
Definition: MVll.cpp:1403
gslpp::complex ihalfMPI
Definition: MVll.h:510
double beta(double q2)
The factor used in the angular coefficients .
Definition: MVll.cpp:1421
gslpp::complex C_2Lh_cache
Definition: MVll.h:805
Definition: OrderScheme.h:33
gslpp::complex geth_p_1() const
Definition: QCD.h:1112
double T_0t(double q2)
The helicity form factor .
Definition: MVll.cpp:804
unsigned int C_4_updated
Definition: MVll.h:765
gslpp::vector< double > VL0_cache
Definition: MVll.h:740
gslpp::complex F87(double q2)
The correction from .
Definition: MVll.cpp:978
double a_0T2_LCSR
Definition: MVll.h:562
double I_2c(double q2)
The angular coefficient .
Definition: MVll.cpp:1453
gslpp::vector< gslpp::complex > ** allcoeff
Definition: MVll.h:593
unsigned int C_7p_updated
Definition: MVll.h:783
gslpp::vector< double > T1_cache
Definition: MVll.h:710
TFitResultPtr refres_m_mumu
Definition: MVll.h:637
gslpp::vector< double > N_cache
Definition: MVll.h:697
gslpp::complex F27(double q2)
The correction from .
Definition: MVll.cpp:960
unsigned int TL1_updated
Definition: MVll.h:730
gslpp::complex C_Sp
Definition: MVll.h:618
gslpp::complex F29_3
Definition: MVll.h:545
double getDelta2(double q2)
The CP asymmetry .
Definition: MVll.h:1295
unsigned int H_A2updated
Definition: MVll.h:832
double reDC9fit(double *x, double *p)
The fit function for the real part of the QCDF correction .
Definition: MVll.cpp:1074
gslpp::complex C_2_cache
Definition: MVll.h:760
double t_0
Definition: MVll.h:463
unsigned int C_9p_updated
Definition: MVll.h:786
gslpp::complex C_9p
Definition: MVll.h:616
double a_1A12
Definition: MVll.h:577
Definition: QCD.h:732
double geta_2T2() const
Definition: QCD.h:1344
double geta_2A1phi() const
Definition: QCD.h:1472
unsigned int C_6_updated
Definition: MVll.h:771
double MMMV
Definition: MVll.h:473
double sixteenM_PI2MM2
Definition: MVll.h:494
double sixteenM_PI2
Definition: MVll.h:493
Flavour * getMyFlavour() const
double avaDelta
Definition: MVll.h:658
double I_2s(double q2)
The angular coefficient .
Definition: MVll.cpp:1458
unsigned int I7_updated
Definition: MVll.h:847
double T_2(double q2)
The transverse form factor .
Definition: MVll.cpp:784
std::map< std::pair< double, double >, double > cacheDelta1
Definition: MVll.h:690
double gtilde_2_pre
Definition: MVll.h:513
double fourMb2
Definition: MVll.h:501
gslpp::complex C_7_cache
Definition: MVll.h:775
unsigned int TR1_updated
Definition: MVll.h:736
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 F89(double q2)
The correction from .
Definition: MVll.cpp:985
const double & getGegenalpha(int i) const
Definition: Meson.h:94
double I_4(double q2)
The angular coefficient .
Definition: MVll.cpp:1468
gslpp::vector< gslpp::complex > ** ComputeCoeffprimeBMll(double mu, schemes scheme=NDR)
Computes the chirality flipped Wilson coefficient for the process .
Definition: Flavour.h:187
std::map< std::pair< double, double >, double > cacheSigma4
Definition: MVll.h:681
gslpp::complex F29_1
Definition: MVll.h:543
TFitResultPtr imfres_0_ee
Definition: MVll.h:647
unsigned int deltaTparpupdated
Definition: MVll.h:882
complex dilog(const complex &z)
double geta_0T1phi() const
Definition: QCD.h:1520
double Integrand_ImTparminus(double up)
The imaginary part of the integral involving at fixed , according to .
Definition: MVll.cpp:927
gslpp::complex L1xm
Definition: MVll.h:534
gslpp::complex computelamt_s() const
The product of the CKM elements .
double geta_1T23phi() const
Definition: QCD.h:1592
double Integrand_ImTparplus(double up)
The imaginary part of the integral involving at fixed , according to .
Definition: MVll.cpp:908
void fit_DeltaC9_0_mumu()
The fitting routine for the QCDF correction in the muon channel.
Definition: MVll.cpp:1211
gslpp::complex geth_m_2() const
Definition: QCD.h:1144
void fit_DeltaC9_p_mumu()
The fitting routine for the QCDF correction in the muon channel.
Definition: MVll.cpp:1086
gslpp::complex C_2
Definition: MVll.h:600
std::map< std::pair< double, double >, double > cacheDelta3
Definition: MVll.h:692
gslpp::complex h_2[3]
Definition: MVll.h:459
double getAle() const
A get method to retrieve the fine-structure constant .
double I_6s(double q2)
The angular coefficient .
Definition: MVll.cpp:1479
void fit_DeltaC9_p_ee()
The fitting routine for the QCDF correction in the electron channel.
Definition: MVll.cpp:1121
gslpp::complex C_7
Definition: MVll.h:607
gsl_integration_cquad_workspace * w_delta
Definition: MVll.h:671
gslpp::complex C_7p
Definition: MVll.h:615
std::map< std::pair< double, double >, unsigned int > sigma0Cached
Definition: MVll.h:855
TFitResultPtr refres_0_mumu
Definition: MVll.h:639
std::map< std::pair< double, double >, double > cacheSigma3
Definition: MVll.h:680
unsigned int C_5_updated
Definition: MVll.h:768
double avaDTPPR
Definition: MVll.h:659
unsigned int C_9_updated
Definition: MVll.h:777
unsigned int T_updated
Definition: MVll.h:886
double geta_0A0phi() const
Definition: QCD.h:1424
Definition: QCD.h:722
double twoMlepMb
Definition: MVll.h:483
double getSigma2s(double q2)
The CP average .
Definition: MVll.h:1185
double a_2A12
Definition: MVll.h:578
gslpp::complex F27_L1_2
Definition: MVll.h:554
double errDTPPR
Definition: MVll.h:663
unsigned int H_V0updated
Definition: MVll.h:821
double getSigma6s(double q2)
The CP average .
Definition: MVll.h:1225
gslpp::complex C_7p_cache
Definition: MVll.h:784
std::vector< double > ReDeltaC9_m_ee
Definition: MVll.h:629
gslpp::complex C_10p_cache
Definition: MVll.h:790
double geta_0T23phi() const
Definition: QCD.h:1584
double F89_3
Definition: MVll.h:559
double getMRA12phi() const
Definition: QCD.h:1512
double V(double q2)
The transverse form factor .
Definition: MVll.cpp:759
double t_p
Definition: MVll.h:461
gslpp::complex C_10
Definition: MVll.h:611
double C2_inv
Definition: MVll.h:515
const double & getMass() const
A get method to access the particle mass.
Definition: Particle.h:61
std::map< std::pair< double, double >, unsigned int > sigma5Cached
Definition: MVll.h:860
double geta_2T1phi() const
Definition: QCD.h:1536
gslpp::complex h1Ccache[3]
Definition: MVll.h:814
double a_0T1
Definition: MVll.h:580
double geta_2A0() const
Definition: QCD.h:1216
gslpp::complex ym
Definition: MVll.h:532
virtual ~MVll()
Destructor.
Definition: MVll.cpp:79
std::map< std::pair< double, double >, double > cacheSigma2
Definition: MVll.h:679
gslpp::complex Y(double q2)
The function involved into .
Definition: MVll.cpp:1368
double geta_2A12phi() const
Definition: QCD.h:1504
double gtilde_3_pre
Definition: MVll.h:514
gslpp::complex lambda_t
Definition: MVll.h:455
double twothird
Definition: MVll.h:509
gslpp::complex F87_2
Definition: MVll.h:539
TF1 imffit
Definition: MVll.h:653
gslpp::complex C_S
Definition: MVll.h:612
unsigned int I5_updated
Definition: MVll.h:845
unsigned int I9_updated
Definition: MVll.h:849
gslpp::complex H_0_WC
Definition: MVll.h:504
double Integrand_ReTparminus(double up)
The real part of the integral involving at fixed , according to .
Definition: MVll.cpp:916
std::map< std::pair< double, double >, double > cacheDelta11
Definition: MVll.h:694
unsigned int H_V1updated
Definition: MVll.h:824
gslpp::complex H_P(double q2)
The helicity amplitude .
Definition: MVll.cpp:1408
void checkCache()
The caching method for MVll.
Definition: MVll.cpp:381
std::map< std::pair< double, double >, double > cacheDelta2
Definition: MVll.h:691
double a_1A1
Definition: MVll.h:573
double avaSigma
Definition: MVll.h:657
gslpp::complex C_8L
Definition: MVll.h:608
gslpp::complex C_10p
Definition: MVll.h:617
double V_0t(double q2)
The helicity form factor .
Definition: MVll.cpp:789
gslpp::vector< double > T_cache
Definition: MVll.h:887
double geta_0V() const
Definition: QCD.h:1168
double mu_h
Definition: MVll.h:450
gslpp::complex H_V_0(double q2)
The helicity amplitude .
Definition: MVll.cpp:1373
gslpp::complex C_6_cache
Definition: MVll.h:772
unsigned int I8_updated
Definition: MVll.h:848
const double & imag() const
double I_6c(double q2)
The angular coefficient .
Definition: MVll.cpp:1484
gslpp::complex fDeltaC9_0(double q2)
The total QCDF correction computed fitting over .
Definition: MVll.cpp:1320
double getMRA0() const
Definition: QCD.h:1224
double MMpMV
Definition: MVll.h:465
gslpp::complex geth_p_2() const
Definition: QCD.h:1136
double a_0A1
Definition: MVll.h:572
double logMb
Definition: MVll.h:503
double geta_1T2phi() const
Definition: QCD.h:1560
std::vector< double > ReDeltaC9_0_ee
Definition: MVll.h:631
double geta_0A1phi() const
Definition: QCD.h:1456
TFitResultPtr refres_0_ee
Definition: MVll.h:646
double getMRA0phi() const
Definition: QCD.h:1448
double getSigma5(double q2)
The CP average .
Definition: MVll.h:1215
double getDelta3(double q2)
The CP asymmetry .
Definition: MVll.h:1305
double MRT2_2
Definition: MVll.h:587
double getMRT1() const
Definition: QCD.h:1320
double I_8(double q2)
The angular coefficient .
Definition: MVll.cpp:1495
unsigned int VR1_updated
Definition: MVll.h:733
complex log(const complex &z)
std::map< std::pair< double, double >, unsigned int > delta11Cached
Definition: MVll.h:872
std::map< std::pair< double, double >, unsigned int > sigma4Cached
Definition: MVll.h:859
unsigned int C_7_updated
Definition: MVll.h:774
StandardModel::meson vectorM
Definition: MVll.h:441
double twoMM2
Definition: MVll.h:478
double geta_2A12() const
Definition: QCD.h:1280
TFitResultPtr imfres_m_ee
Definition: MVll.h:645
double MV4
Definition: MVll.h:472
complex arctan(const complex &z)
MVll(const StandardModel &SM_i, StandardModel::meson meson_i, StandardModel::meson vector_i, StandardModel::lepton lep_i)
Constructor.
Definition: MVll.cpp:16
gslpp::complex deltaTperp(double q2)
The total correction from .
Definition: MVll.cpp:1004
double F89_2
Definition: MVll.h:558
double a_1T2
Definition: MVll.h:585
unsigned int lambda_updated
Definition: MVll.h:720
double getMRT2phi() const
Definition: QCD.h:1576
gslpp::complex C_2Lh_bar
Definition: MVll.h:602
double getSigma8(double q2)
The CP average .
Definition: MVll.h:1255
TFitResultPtr refres_m_ee
Definition: MVll.h:644
unsigned int VR2_updated
Definition: MVll.h:734
gslpp::vector< double > H_Pcache
Definition: MVll.h:838
gslpp::complex h0Ccache[3]
Definition: MVll.h:813
double T_m(double q2)
The helicity form factor .
Definition: MVll.cpp:814
gslpp::complex C_1Lh_bar
Definition: MVll.h:599
unsigned int H_A0updated
Definition: MVll.h:830
unsigned int C_10_updated
Definition: MVll.h:780
void updateParameters()
The update parameter method for MVll.
Definition: MVll.cpp:83
gslpp::complex F27_1
Definition: MVll.h:550
double geta_0Vphi() const
Definition: QCD.h:1392
std::map< std::pair< double, double >, unsigned int > delta3Cached
Definition: MVll.h:870
double Delta(int i, double q2)
The CP asymmetry .
Definition: MVll.cpp:1505
complex exp(const complex &z)
unsigned int VL0_updated
Definition: MVll.h:739
unsigned int deltaTperpupdated
Definition: MVll.h:884
unsigned int TL0_updated
Definition: MVll.h:742
gslpp::complex geth_p() const
Definition: QCD.h:1088
gslpp::complex I1(double u, double q2)
The function from .
Definition: MVll.cpp:828
gslpp::vector< double > H_Scache
Definition: MVll.h:835
unsigned int C_2Lh_updated
Definition: MVll.h:804
A class for the correction in .
double Mb
Definition: MVll.h:448
unsigned int deltaTparmupdated
Definition: MVll.h:883
double ninetysixM_PI3MM3
Definition: MVll.h:492
unsigned int k2_updated
Definition: MVll.h:715
double MRT1_2
Definition: MVll.h:583
gslpp::complex Tparplus(double u, double q2)
The function from .
Definition: MVll.cpp:864
gslpp::complex Nc_cache
Definition: MVll.h:698
double getDelta7(double q2)
The CP asymmetry .
Definition: MVll.h:1315
gslpp::complex fDeltaC9_p(double q2)
The total QCDF correction computed fitting over .
Definition: MVll.cpp:1283
double Mlep2
Definition: MVll.h:482
A class for defining operations on and functions of complex numbers.
Definition: gslpp_complex.h:35
gslpp::complex C_9
Definition: MVll.h:610
double geta_1T23() const
Definition: QCD.h:1368
unsigned int C_8Lh_updated
Definition: MVll.h:807
double getMRV() const
Definition: QCD.h:1192
gsl_integration_cquad_workspace * w_sigma
Definition: MVll.h:670
gslpp::vector< double > k2_cache
Definition: MVll.h:716
const StandardModel & mySM
Definition: MVll.h:438
std::map< std::pair< double, double >, double > cacheSigma9
Definition: MVll.h:685
double geta_0A12() const
Definition: QCD.h:1264
gslpp::complex geth_0_2() const
Definition: QCD.h:1128
double a_0T2
Definition: MVll.h:584
double MM
Definition: MVll.h:446
double a_2A1
Definition: MVll.h:574
gslpp::complex L1xp
Definition: MVll.h:533
TFitResultPtr imfres_p_ee
Definition: MVll.h:643
double getSigma(int i, double q_2)
The value of from to .
Definition: MVll.cpp:1630
gslpp::complex H_A_p(double q2)
The helicity amplitude .
Definition: MVll.cpp:1393
gslpp::complex geth_m() const
Definition: QCD.h:1096
double M_PI2osix
Definition: MVll.h:486
gslpp::vector< double > T2_cache
Definition: MVll.h:713
gslpp::complex geth_m_1() const
Definition: QCD.h:1120
double MRA12_2
Definition: MVll.h:579
gslpp::complex Tperpplus(double u, double q2)
The function from .
Definition: MVll.cpp:850
gslpp::complex F29_L1_3
Definition: MVll.h:548
double geta_1Vphi() const
Definition: QCD.h:1400
gsl_function FS
Definition: MVll.h:665
double I_1s(double q2)
The angular coefficient .
Definition: MVll.cpp:1447
double geta_0T2() const
Definition: QCD.h:1328
double geta_2A1() const
Definition: QCD.h:1248
lepton
An enum type for leptons.
double Integrand_ReTpar_pm(double up)
The sum of Integrand_ReTparplus() and Integrand_ReTparminus().
Definition: MVll.cpp:942
double ale
Definition: MVll.h:444
double geta_1T1() const
Definition: QCD.h:1304
double getSigma1s(double q2)
The CP average .
Definition: MVll.h:1165
gslpp::complex arg1
Definition: MVll.h:526
double threeGegen1otwo
Definition: MVll.h:490
double getSigma4(double q2)
The CP average .
Definition: MVll.h:1205
double geta_1A0() const
Definition: QCD.h:1208
unsigned int C_10p_updated
Definition: MVll.h:789
gsl_function DTPPR
Definition: MVll.h:667
double errSigma
Definition: MVll.h:661
double geta_0T1() const
Definition: QCD.h:1296
std::map< std::pair< double, double >, unsigned int > sigma1Cached
Definition: MVll.h:856
double a_2A0
Definition: MVll.h:570
double getFKstarp() const
Definition: QCD.h:1760
std::map< std::pair< double, double >, unsigned int > delta7Cached
Definition: MVll.h:871
gslpp::complex C_1L_bar
Definition: MVll.h:598
gslpp::complex DeltaC9_p(double q2)
The total QCDF correction computed integrating over .
Definition: MVll.cpp:1051
unsigned int I4_updated
Definition: MVll.h:844
double I_9(double q2)
The angular coefficient .
Definition: MVll.cpp:1500
std::map< std::pair< double, double >, unsigned int > sigma11Cached
Definition: MVll.h:865
unsigned int T1_updated
Definition: MVll.h:709
unsigned int VR0_updated
Definition: MVll.h:745
double geta_2T23() const
Definition: QCD.h:1376
double half
Definition: MVll.h:508
complex sqrt(const complex &z)
gslpp::complex C_10_cache
Definition: MVll.h:781