Usage#

Main interface#

Here are some quick examples of how to use qrules. For more fine-grained control, have a look at Advanced.

Investigate intermediate resonances#

import qrules

reaction = qrules.generate_transitions(
    initial_state="J/psi(1S)",
    final_state=["K0", "Sigma+", "p~"],
    allowed_interaction_types="strong",
    formalism="canonical-helicity",
)
from IPython.display import Markdown

source = qrules.io.asmermaid(reaction, collapse_graphs=True, markdown=True)
Markdown(source)
        flowchart LR
    T0_0["$$0: K^{0}$$"]
    T0_1["$$1: \Sigma^{+}$$"]
    T0_2["$$2: \overline{p}$$"]
    T0_N0["$$J/\psi(1S)$$"]
    T0_N1@{ shape: text, label: " " }
    T0_3("$$\begin{array}{ll} N(1440)^{+} & N(1675)^{+} \\\ N(1520)^{+} & N(1710)^{+} \\\ N(1535)^{+} & N(1720)^{+} \\\ N(1650)^{+} & N(1700)^{+} \end{array}$$")
    T0_N0 --- T0_3
    T0_3 --- T0_N1
    T0_N0 --- T0_2
    T0_N1 --- T0_0
    T0_N1 --- T0_1
    T1_0["$$0: K^{0}$$"]
    T1_1["$$1: \Sigma^{+}$$"]
    T1_2["$$2: \overline{p}$$"]
    T1_N0["$$J/\psi(1S)$$"]
    T1_N1@{ shape: text, label: " " }
    T1_3("$$\begin{gathered} \overline{\Sigma}(1385)^{-} \\\ \overline{\Sigma}(1660)^{-} \\\ \overline{\Sigma}(1670)^{-} \\\ \overline{\Sigma}(1750)^{-} \\\ \overline{\Sigma}(1775)^{-} \\\ \overline{\Sigma}(1940)^{-} \end{gathered}$$")
    T1_N0 --- T1_3
    T1_3 --- T1_N1
    T1_N0 --- T1_1
    T1_N1 --- T1_0
    T1_N1 --- T1_2
    T2_0["$$0: K^{0}$$"]
    T2_1["$$1: \Sigma^{+}$$"]
    T2_2["$$2: \overline{p}$$"]
    T2_N0["$$J/\psi(1S)$$"]
    T2_N1@{ shape: text, label: " " }
    T2_3("$$\begin{gathered} \overline{K}^{*}(1680)^{0} \\\ \overline{K}_{2}(1770)^{0} \\\ \overline{K}_{2}(1820)^{0} \\\ \overline{K}_{2}^{*}(1980)^{0} \end{gathered}$$")
    T2_N0 --- T2_3
    T2_3 --- T2_N1
    T2_N0 --- T2_0
    T2_N1 --- T2_1
    T2_N1 --- T2_2
    

Next, you use the ampform package to convert these transitions into a mathematical description that you can use to fit your data and perform partial-wave analysis!

Check allowed reactions#

qrules can be used to check whether a transition between an initial and final state is violated by any conservation rules:

qrules.check_reaction_violations(
    initial_state="pi0",
    final_state=["gamma", "gamma", "gamma"],
)
{frozenset({'c_parity_conservation'})}

Advanced#

Each of the qrules’s sub-modules offer functionality to handle more advanced reaction types. The following notebooks illustrate how use them.