atlas_fit_function.py 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. def partonLumi_uubar(x):
  4. p0 = 0.00703528
  5. p1 = -0.000174816
  6. p2 = 1.89616e-06
  7. p3 = -1.12038e-08
  8. p4 = 3.7537e-11
  9. p5 = -6.71198e-14
  10. p6 = 4.98316e-17
  11. return p0 + p1 * x + p2 * x * x + p3 * x * x * x + p4 * x * x * x * x + p5 * x * x * x * x * x + p6 * x * x * x * x * x * x
  12. def partonLumi_ddbar(x):
  13. p0 = 0.0052163
  14. p1 = -0.000130677
  15. p2 = 1.42682e-06
  16. p3 = -8.48218e-09
  17. p4 = 2.85847e-11
  18. p5 = -5.14001e-14
  19. p6 = 3.83665e-17
  20. return p0 + p1 * x + p2 * x * x + p3 * x * x * x + p4 * x * x * x * x + p5 * x * x * x * x * x + p6 * x * x * x * x * x * x
  21. def partonLumi_ssbar(x):
  22. p0 = 0.00227443
  23. p1 = -5.80923e-05
  24. p2 = 6.40022e-07
  25. p3 = -3.81913e-09
  26. p4 = 1.28814e-11
  27. p5 = -2.3144e-14
  28. p6 = 1.72444e-17
  29. return p0 + p1 * x + p2 * x * x + p3 * x * x * x + p4 * x * x * x * x + p5 * x * x * x * x * x + p6 * x * x * x * x * x * x
  30. def BW(s, ZMass, ZWidth):
  31. return 1. / ((s - ZMass * ZMass) * (s - ZMass * ZMass) + (ZMass * ZMass * ZWidth * ZWidth))
  32. def atlas_invMass_mumu_core(x):
  33. ZMass = 91.200000; ZWidth = 2.490000
  34. alphaEM = 7.297352e-3; Nc = 3; Qd = -1. / 3.; Qu = 2. / 3.; Qs = -1. / 3.; sin2W = 0.23126; GF = 1.1663787e-5
  35. gAmu = -0.5; gAu = 0.5; gAd = -0.5; gAs = -0.5; gVmu = -0.5 + 2 * sin2W; gVu = 0.5 - 4. / 3. * sin2W; gVd = -0.5 + 2. / 3. * sin2W; gVs = -0.5 + 2. / 3. * sin2W
  36. s = x * x
  37. alphaEM2 = alphaEM * alphaEM
  38. kappa = np.sqrt(2) * GF * ZMass * ZMass / (4 * np.pi * alphaEM)
  39. BWgam = BWz = BW(s, ZMass, ZWidth)
  40. S_Zgam = kappa * s * (s - ZMass * ZMass) * BWgam
  41. S_Z = kappa * kappa * s * s * BWz
  42. ME_ddbar = 4 * np.pi * alphaEM2 / (3 * Nc * s) * ((Qd * Qd) - 2 * Qd * gVmu * gVd * S_Zgam + (gAmu * gAmu + gVmu * gVmu) * (gAd * gAd + gVd * gVd) * S_Z)
  43. ME_uubar = 4 * np.pi * alphaEM2 / (3 * Nc * s) * ((Qu * Qu) - 2 * Qu * gVmu * gVu * S_Zgam + (gAmu * gAmu + gVmu * gVmu) * (gAu * gAu + gVu * gVu) * S_Z)
  44. ME_ssbar = 4 * np.pi * alphaEM2 / (3 * Nc * s) * ((Qs * Qs) - 2 * Qs * gVmu * gVs * S_Zgam + (gAmu * gAmu + gVmu * gVmu) * (gAs * gAs + gVs * gVs) * S_Z)
  45. return (ME_ddbar * partonLumi_ddbar(x) + ME_uubar * partonLumi_uubar(x) + ME_ssbar * partonLumi_ssbar(x)) * x
  46. def atlas_invMass_mumu(add, x):
  47. # add - ekstra correction to the function (polynomial, root, ... ? )
  48. return add * atlas_invMass_mumu_core(x)
  49. if __name__ == "__main__":
  50. # the custom add function - dodaj poljuben polinom ipd kot utez...
  51. def poly(x):
  52. return 1.
  53. plt.figure(figsize=(16, 8))
  54. x = np.linspace(110., 200., 100)
  55. plt.plot(x, atlas_invMass_mumu(poly(x), x))
  56. plt.yscale('log')
  57. plt.show()