.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/particle/electroweak/plot_01_qed_annihilation.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_particle_electroweak_plot_01_qed_annihilation.py: Tomonaga, Schwinger, Feynman, and Dyson: renormalized QED ================================================================ Renormalized QED's cleanest tree-level prediction is :math:`e^+e^-\to\mu^+\mu^-`, whose differential cross section in the massless-fermion limit is .. math:: \frac{d\sigma}{d\Omega} = \frac{\alpha^2}{4s}\left(1+\cos^2\theta\right), confirmed to good precision once electron-positron colliders reached sufficient energy, and used ever since to calibrate new machines' luminosity. This example plots :func:`~physicskit.particle.electroweak.qed_dsigma_domega_mumu`'s :math:`1+\cos^2\theta` angular shape, checks the total cross section :func:`~physicskit.particle.electroweak.qed_total_cross_section_mumu` against direct numerical integration of the differential form, and shows how the cross section falls as :math:`1/s` with increasing center-of-mass energy. .. GENERATED FROM PYTHON SOURCE LINES 25-31 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from physicskit.particle.electroweak import qed_dsigma_domega_mumu, qed_total_cross_section_mumu from physicskit.particle.visualizers import animate_qed_angular_distribution .. GENERATED FROM PYTHON SOURCE LINES 32-34 The angular shape: forward-backward symmetric, peaked at the poles ------------------------------------------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 34-49 .. code-block:: Python sqrt_s = 10.0 # GeV theta = np.linspace(0.0, np.pi, 300) dsigma = qed_dsigma_domega_mumu(np.cos(theta), sqrt_s) fig1, ax1 = plt.subplots(figsize=(6, 4.8), subplot_kw={"projection": "polar"}) ax1.plot(theta, dsigma, color="steelblue") ax1.plot(-theta, dsigma, color="steelblue") # mirror for the full 2D shape ax1.set_title(rf"$d\sigma/d\Omega \propto 1+\cos^2\theta$ at $\sqrt{{s}}$={sqrt_s} GeV") fig1.tight_layout() print(f"forward (theta=0): {qed_dsigma_domega_mumu(1.0, sqrt_s):.6e}") print(f"transverse (theta=90 deg): {qed_dsigma_domega_mumu(0.0, sqrt_s):.6e}") ratio_fwd_transverse = qed_dsigma_domega_mumu(1.0, sqrt_s) / qed_dsigma_domega_mumu(0.0, sqrt_s) print(f"ratio forward/transverse: {ratio_fwd_transverse:.4f} (should be exactly 2.0, from 1+cos^2(0)=2 vs 1+cos^2(90deg)=1)") .. image-sg:: /api/gallery/particle/electroweak/images/sphx_glr_plot_01_qed_annihilation_001.png :alt: $d\sigma/d\Omega \propto 1+\cos^2\theta$ at $\sqrt{s}$=10.0 GeV :srcset: /api/gallery/particle/electroweak/images/sphx_glr_plot_01_qed_annihilation_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none forward (theta=0): 2.662568e-07 transverse (theta=90 deg): 1.331284e-07 ratio forward/transverse: 2.0000 (should be exactly 2.0, from 1+cos^2(0)=2 vs 1+cos^2(90deg)=1) .. GENERATED FROM PYTHON SOURCE LINES 50-52 Checking the total cross section by direct integration -------------------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 52-61 .. code-block:: Python cos_theta_fine = np.linspace(-1.0, 1.0, 200001) dsigma_fine = qed_dsigma_domega_mumu(cos_theta_fine, sqrt_s) # integrate over the full solid angle: dOmega = dphi * d(cos theta), phi in [0, 2pi] sigma_numeric = 2.0 * np.pi * np.trapezoid(dsigma_fine, cos_theta_fine) sigma_formula = qed_total_cross_section_mumu(sqrt_s) print(f"\ntotal cross section, numerical integration: {sigma_numeric:.8e}") print(f"total cross section, closed-form 4*pi*alpha^2/(3s): {sigma_formula:.8e}") print(f"relative difference: {abs(sigma_numeric - sigma_formula) / sigma_formula:.2e}") .. rst-class:: sphx-glr-script-out .. code-block:: none total cross section, numerical integration: 2.23058752e-06 total cross section, closed-form 4*pi*alpha^2/(3s): 2.23058752e-06 relative difference: 1.25e-11 .. GENERATED FROM PYTHON SOURCE LINES 62-64 Falling as 1/s with center-of-mass energy ------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 64-74 .. code-block:: Python sqrt_s_values = np.linspace(3.0, 50.0, 200) sigma_values = np.array([qed_total_cross_section_mumu(s) for s in sqrt_s_values]) fig2, ax2 = plt.subplots(figsize=(6.5, 4.5)) ax2.loglog(sqrt_s_values, sigma_values, color="firebrick") ax2.set_xlabel(r"$\sqrt{s}$ (GeV)") ax2.set_ylabel(r"$\sigma$ (natural units)") ax2.set_title(r"$\sigma \propto 1/s$: falls steeply with energy") fig2.tight_layout() .. image-sg:: /api/gallery/particle/electroweak/images/sphx_glr_plot_01_qed_annihilation_002.png :alt: $\sigma \propto 1/s$: falls steeply with energy :srcset: /api/gallery/particle/electroweak/images/sphx_glr_plot_01_qed_annihilation_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 75-77 The angular shape's overall normalization, swept across sqrt(s) ------------------------------------------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 77-80 .. code-block:: Python anim = animate_qed_angular_distribution(np.linspace(5.0, 30.0, 20)) plt.show() .. container:: sphx-glr-animation .. raw:: html .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.318 seconds) .. _sphx_glr_download_api_gallery_particle_electroweak_plot_01_qed_annihilation.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_01_qed_annihilation.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_01_qed_annihilation.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_01_qed_annihilation.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_