Custom topologies#
As illustrated in Generate transitions, the StateTransitionManager offers you a bit more flexibility than the façade function generate_transitions() used in the main Usage page. In this notebook, we go one step further, by specifying a custom Topology via StateTransitionManager.topologies.
2-to-2 topology#
As a simple example, we start with a 2-to-2 scattering topology. We define it as follows:
flowchart LR
n_0["$$0$$"]
n_1["$$1$$"]
B["$$-2$$"]
A["$$-1$$"]
N0(("$$(0)$$"))
N1(("$$(1)$$"))
n_2("$$2$$")
B --- N0
A --- N0
N1 --- n_0
N1 --- n_1
N0 --- n_2
n_2 --- N1
First, we construct a StateTransitionManager for the transition \(K^-K^+ \to \pi^+\pi^-\). The constructed Topology can then be inserted via its topologies attribute:
stm = StateTransitionManager(
initial_state=["K-", "K+"],
final_state=["pi-", "pi+"],
formalism="canonical",
)
stm.set_allowed_interaction_types([InteractionType.STRONG, InteractionType.EM])
stm.topologies = (topology,) # tuple is immutable
For the rest, the process is just the same as in Generate transitions:
problem_sets = stm.create_problem_sets()
reaction_kk = stm.find_solutions(problem_sets)
flowchart LR
T0_0["$$0: \pi^{-}$$"]
T0_1["$$1: \pi^{+}$$"]
T0_B["$$K^{-}$$"]
T0_A["$$K^{+}$$"]
T0_N0@{ shape: text, label: " " }
T0_N1@{ shape: text, label: " " }
T0_2("$$\begin{array}{ll} a_{0}(980)^{0} & \omega(782) \\\ a_{0}(1450)^{0} & \omega(1420) \\\ f_{0}(500) & \rho(770)^{0} \\\ f_{0}(980) & \rho(1450)^{0} \\\ f_{0}(1370) & \rho(1700)^{0} \\\ f_{0}(2020) & \end{array}$$")
T0_B --- T0_N0
T0_A --- T0_N0
T0_N1 --- T0_0
T0_N1 --- T0_1
T0_N0 --- T0_2
T0_2 --- T0_N1
Warning
It is not yet possible to give the initial state a certain energy. So some collider process like \(e^-e^+\to\pi^+\pi\) does not result in a large number of resonances.
stm.initial_state = ["e-", "e+"]
problem_sets = stm.create_problem_sets()
reaction_ep = stm.find_solutions(problem_sets)
flowchart LR
T0_0["$$0: \pi^{-}$$"]
T0_1["$$1: \pi^{+}$$"]
T0_B["$$e^{-}$$"]
T0_A["$$e^{+}$$"]
T0_N0@{ shape: text, label: " " }
T0_N1@{ shape: text, label: " " }
T0_2("$$f_{0}(500)$$")
T0_B --- T0_N0
T0_A --- T0_N0
T0_N1 --- T0_0
T0_N1 --- T0_1
T0_N0 --- T0_2
T0_2 --- T0_N1
What can do at most, is switch off MassConservation, either through the constructor of the StateTransitionManager, or by modifying ProblemSet.
stm = StateTransitionManager(
initial_state=["e-", "e+"],
final_state=["pi-", "pi+"],
formalism="canonical",
mass_conservation_factor=None,
)
stm.set_allowed_interaction_types([InteractionType.STRONG, InteractionType.EM])
stm.topologies = (topology,)
problem_sets = stm.create_problem_sets()
reaction_ep_no_mass = stm.find_solutions(problem_sets)
flowchart LR
T0_0["$$0: \pi^{-}$$"]
T0_1["$$1: \pi^{+}$$"]
T0_B["$$e^{-}$$"]
T0_A["$$e^{+}$$"]
T0_N0@{ shape: text, label: " " }
T0_N1@{ shape: text, label: " " }
T0_2("$$\begin{array}{llllll} a_{0}(980)^{0} & f_{0}(980) & \omega(782) & \psi(3770) & \rho(1700)^{0} & \Upsilon(11020) \\\ a_{0}(1450)^{0} & f_{0}(1370) & \omega(1420) & \psi(4040) & \Upsilon(1S) & \\\ \chi_{c0}(1P) & f_{0}(1500) & \omega(1650) & \psi(4160) & \Upsilon(2S) & \\\ \chi_{b0}(1P) & f_{0}(1710) & \phi(1020) & \psi(4415) & \Upsilon(3S) & \\\ \chi_{b0}(2P) & f_{0}(2020) & \phi(1680) & \rho(770)^{0} & \Upsilon(4S) & \\\ f_{0}(500) & J/\psi(1S) & \psi(2S) & \rho(1450)^{0} & \Upsilon(10860) & \end{array}$$")
T0_B --- T0_N0
T0_A --- T0_N0
T0_N1 --- T0_0
T0_N1 --- T0_1
T0_N0 --- T0_2
T0_2 --- T0_N1