From 04ad54d8f66bb7eef4a4a98f8a2493a25037c9a6 Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Thu, 26 Sep 2024 10:54:03 +0300 Subject: [PATCH] Iterate Python advanced nb --- pineappl_py/docs/source/advanced.ipynb | 34 ++++++++++++-------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/pineappl_py/docs/source/advanced.ipynb b/pineappl_py/docs/source/advanced.ipynb index 514b1133..b499b128 100644 --- a/pineappl_py/docs/source/advanced.ipynb +++ b/pineappl_py/docs/source/advanced.ipynb @@ -29,15 +29,15 @@ "## Computing an observable\n", "\n", "A physical observable that involves two hadrons in the initial states is computed as:\n", - "$$ \\left\\langle \\frac{\\sigma^{hh \\to F}}{\\mathrm{d} \\mathcal{O}} \\right\\rangle = \\sum_{a,b} \\int \\mathrm{d} x_1 \\mathrm{d} x_2 f_a^h (x_1) f_b^h (x_2) \\frac{\\sigma_{ab \\to F} (x_1, x_2)}{\\mathrm{d} \\mathcal{O}} $$\n", + "$$ \\left\\langle \\frac{d\\sigma^{hh \\to F}}{\\mathrm{d} \\mathcal{O}} \\right\\rangle = \\sum_{a,b} \\int \\mathrm{d} x_1 \\mathrm{d} x_2 f_a^h (x_1) f_b^h (x_2) \\frac{d\\sigma_{ab \\to F} (x_1, x_2)}{\\mathrm{d} \\mathcal{O}} $$\n", "where the partonic cross section is a perturbative series in the two couplings (strong coupling: $\\alpha_s (M_\\mathrm{Z}^2) = 0.118$ and electromagnetic coupling $\\alpha(0) \\approx 1/137 \\approx 0.0073$):\n", - "$$ \\frac{\\sigma_{ab} (x_1, x_2)}{\\mathrm{d} \\mathcal{O}} = \\sum_{n,m} \\alpha_\\mathrm{s}^n \\alpha^m \\frac{\\sigma_{ab}^{n,m} (x_1, x_2)}{\\mathrm{d} \\mathcal{O}} $$\n", + "$$ \\frac{d\\sigma_{ab} (x_1, x_2)}{\\mathrm{d} \\mathcal{O}} = \\sum_{n,m} \\alpha_\\mathrm{s}^n \\alpha^m \\frac{d\\sigma_{ab}^{n,m} (x_1, x_2)}{\\mathrm{d} \\mathcal{O}} $$\n", "Since $\\alpha_s \\gg \\alpha$ we usually look only at the lowest order $m$ and calculate corrections in $n$: this is what we refer as QCD corrections. However, this isn't always reliable, sometimes electroweak (EW) corrections are needed.\n", "\n", "Inserting the perturbative expansion into the main formula:\n", - "$$ \\left\\langle \\frac{\\sigma^{hh \\to F}}{\\mathrm{d} \\mathcal{O}} \\right\\rangle = \\sum_{a,b} \\sum_{n,m} \\int \\mathrm{d} x_1 \\mathrm{d} x_2 f_a^h (x_1) f_b^h (x_2) \\alpha_\\mathrm{s}^n \\alpha^m \\frac{\\sigma_{ab \\to F}^{n,m} (x_1, x_2)}{\\mathrm{d} \\mathcal{O}} $$\n", + "$$ \\left\\langle \\frac{d\\sigma^{hh \\to F}}{\\mathrm{d} \\mathcal{O}} \\right\\rangle = \\sum_{a,b} \\sum_{n,m} \\int \\mathrm{d} x_1 \\mathrm{d} x_2 f_a^h (x_1) f_b^h (x_2) \\alpha_\\mathrm{s}^n \\alpha^m \\frac{d\\sigma_{ab \\to F}^{n,m} (x_1, x_2)}{\\mathrm{d} \\mathcal{O}} $$\n", "\n", - "We can construct $\\sigma_{ab \\to F}^{n,m} (x_1, x_2) / \\mathrm{d} \\mathcal{O}$ and call that **interpolation grid**. They have the advantage that one can very quickly (less than a second) perform the integrals above with any PDF set, very important especially for PDF sets." + "We call $d\\sigma_{ab \\to F}^{n,m} (x_1, x_2) / \\mathrm{d} \\mathcal{O}$ the **interpolation grid**. It has the advantage that one can very quickly (less than a second) perform the integrals above with any PDF set, which is very important for PDF extraction." ] }, { @@ -47,7 +47,7 @@ "source": [ "## Compute matrix elements\n", "\n", - "The first step in computing theory predictions is the computation of the matrix elements (amplitudes). The next step is to sum all the amplitudes and take the modulus squared. It is common practice to also account for the flux factor and the spin and color sums together with their eventual average. Recall to average on the input and to sum on the output. In our example we find:\n", + "The first step in computing theory predictions is the computation of the (partonic) matrix elements (amplitudes). The next step is to sum all the amplitudes and take the modulus squared. It is common practice to also account for the flux factor and the spin and color sums together with their eventual average. Recall to average on the input and to sum on the output. In our example we find:\n", "$$ \\frac {1}{2 s} |\\mathcal M_t + \\mathcal M_u |^2 = \\frac{\\alpha^2}{2s} \\left(\\frac t u + \\frac u t\\right) $$" ] }, @@ -72,7 +72,7 @@ "source": [ "## Determine phase space decomposition\n", "\n", - "Given the initial states with momenta $k_1$ and $k_2$ we need to integrate the squared matrix elements over all possible momenta, that is all momenta which fulfill momentum conservation and which are on-shell: $ p_i^2 = m_i^2 $. In general this integral (Lorentz invariant phase-space (LIPS)) is:\n", + "Given the initial states with momenta $k_1$ and $k_2$ we need to integrate the squared matrix elements over all possible momenta, that is all momenta which fulfill momentum conservation and which are on-shell: $ p_i^2 = m_i^2 $. In general the Lorentz invariant phase-space (LIPS) for $n$ particles is\n", "\n", "$$ \\int \\mathrm{d} \\mathrm{LIPS} = \\int \\left( \\prod_{i=1}^n \\mathrm{d}^4 p_i \\right) \\, \\delta^{(4)} \\left( k_1 + k_2 - \\sum_{i=1}^n p_i \\right) \\prod_{i = 1}^n \\delta \\left( p_i^2 - m_i^2 \\right) $$\n", "\n", @@ -340,7 +340,7 @@ "id": "6823abe6", "metadata": {}, "source": [ - "We have play a bit with the Monte Carlo statistics, to produce smooth results. To generate a full theory predictions, we must also use our master formula and convolute the interpolation grid with the two photon PDFs. Finally, let's plot the result:" + "We have to play a bit with the Monte Carlo statistics, to produce smooth results. To generate the full theory predictions, we must also use our master formula and convolute the interpolation grid with the two photon PDFs. Finally, let's plot the result:" ] }, { @@ -378,15 +378,11 @@ "id": "8d665de1-ac23-40df-b219-a30e3e6f8475", "metadata": {}, "source": [ - "**NOTE:** If you do not have `NNPDF31_nnlo_as_0118_luxqed` installed, you can do so with the following command:" - ] - }, - { - "cell_type": "raw", - "id": "969e697d-ec35-4905-bd76-7c57dc3230ef", - "metadata": {}, - "source": [ - "!lhapdf install NNPDF31_nnlo_as_0118_luxqed" + "**NOTE:** If you do not have `NNPDF31_nnlo_as_0118_luxqed` installed, you can do so with the following command:\n", + "\n", + "```\n", + " !lhapdf install NNPDF31_nnlo_as_0118_luxqed\n", + "```" ] }, { @@ -429,9 +425,9 @@ ], "metadata": { "kernelspec": { - "display_name": "nnpdf", + "display_name": "PineAPPL", "language": "python", - "name": "nnpdf" + "name": "pineappl" }, "language_info": { "codemirror_mode": { @@ -443,7 +439,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.12.6" } }, "nbformat": 4,