Angular analysis of B+->K*+(K+pi0)mumu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.0 KiB

  1. import flavio
  2. from wilson import Wilson
  3. from uncertainties import ufloat
  4. angobs = ['FL', 'S3', 'S4', 'S5', 'AFB', 'S7', 'S8', 'S9']
  5. #angobs = ['P1', 'P2', 'P3', 'P4p', 'P5p', 'P6p', 'P8p']
  6. #q2bins = [[0.1, 0.98], [1.1, 2.5], [2.5, 4], [4, 6], [6, 8], [11, 12.5], [15, 17], [17, 19]]
  7. q2bins = [[0.1, 4.0],[4.0,5.0]]#, [4, 8], [11.0,12.5], [15.0,19.0]]
  8. SMpred, NPpred = {}, {} # to be filled
  9. # setting Wilson coefficients for NP
  10. w = Wilson({ 'C9_bsmumu': -1}, scale=160, eft='WET', basis='flavio')
  11. doNP = False
  12. doSM = True
  13. # getting predictions for both SM and NP
  14. for ibin, q2bin in enumerate(q2bins):
  15. print(f'Bin {q2bin}')
  16. SMpred[ibin], NPpred[ibin] = {}, {}
  17. if (doSM):
  18. for o in angobs:
  19. SMpred[ibin][o] = ufloat(flavio.sm_prediction(f'<{o}>(B+->K*mumu)',
  20. q2min=q2bin[0], q2max=q2bin[1]),
  21. flavio.sm_uncertainty(f'<{o}>(B+->K*mumu)',
  22. q2min=q2bin[0], q2max=q2bin[1], N=100)) #N=10k for the final plots, N=100 for the fitter
  23. if (doNP):
  24. for o in angobs:
  25. NPpred[ibin][o] = ufloat(flavio.np_prediction(f'<{o}>(B+->K*mumu)', w,
  26. q2min=q2bin[0], q2max=q2bin[1]),
  27. flavio.np_uncertainty(f'<{o}>(B+->K*mumu)', w,
  28. q2min=q2bin[0], q2max=q2bin[1]))
  29. # Just printing everything out in human-readable format here
  30. def printout(dic):
  31. for ibin, q2bin in enumerate(q2bins):
  32. print(f'Bin {q2bin}')
  33. for o in angobs:
  34. if o=='FL':
  35. print(f'\tS1s = {3/4*(1-dic[ibin][o])}')
  36. elif o=='AFB':
  37. print(f'\tS6s = {4/3*dic[ibin][o]}')
  38. else:
  39. print(f'\t{o} = {dic[ibin][o]}')
  40. def printoutCpp(dic):
  41. for o in angobs:
  42. if o=='FL':
  43. print('\tS1s[8] = {')
  44. elif o=='AFB':
  45. print('\tS6s[8] = {')
  46. else:
  47. print(f'\t{o}[8] = {{')
  48. for ibin, q2bin in enumerate(q2bins):
  49. if o=='FL':
  50. print(f'{3/4*(1-dic[ibin][o].n)},', end='')
  51. elif o=='AFB':
  52. print(f'{4/3*dic[ibin][o].n},', end='')
  53. else:
  54. print(f'{dic[ibin][o].n},', end='')
  55. print(f'}};')
  56. for o in angobs:
  57. if o=='FL':
  58. print('\tS1s_error[8] = {')
  59. elif o=='AFB':
  60. print('\tS6s_error[8] = {')
  61. else:
  62. print(f'\t{o}_error[8] = {{')
  63. for ibin, q2bin in enumerate(q2bins):
  64. if o=='FL':
  65. print(f'{3/4*(dic[ibin][o].s)},', end='')
  66. elif o=='AFB':
  67. print(f'{4/3*dic[ibin][o].s},', end='')
  68. else:
  69. print(f'{dic[ibin][o].s},', end='')
  70. print('};')
  71. if(doSM):
  72. print('############## SM predictions #################')
  73. printout(SMpred)
  74. printoutCpp(SMpred)
  75. print('\n\n\n')
  76. if(doNP):
  77. print('############## NP predictions #################')
  78. printout(NPpred)
  79. printoutCpp(NPpred)