-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Illustrate 4- or even 5-body isobar decay in the visualization notebook #27
Comments
@sebastianJaeger Can you think of a realistic example? |
Just to summarise from the call/discussion: |
Here's an example (ran with 74cb828). Problem: it takes so long to compute I still didn't manage to complete the whole thing. (See also ComPWA/expertsystem#338.) @spflueger Ideas? import graphviz
from expertsystem import io
from expertsystem.reaction import InteractionTypes, StateTransitionManager
stm = StateTransitionManager(
initial_state=[("J/psi(1S)", [-1, +1])],
final_state=["K+", "K-", "pi+", "pi-"],
allowed_intermediate_particles=["phi(1020)", "rho(770)"],
formalism_type="canonical",
)
stm.set_allowed_interaction_types([InteractionTypes.Strong])
graph_interaction_settings_groups = stm.prepare_graphs()
result = stm.find_solutions(graph_interaction_settings_groups)
print(len(result.solutions))
print(result.violated_rules)
dot_source = io.convert_to_dot(result.solutions)
graphviz.Source(dot_source) |
The combinatorics quickly explode. What you can do is restrict the subsystems just like in the Y example |
Ok thank, that helps 👍 So let's put this one to the backlog while we work on #24. |
Another example: graph LR
0["Λb⁰"] --> N0[ ]
N0 --> N1["𝛬"]
N1 --> 1["𝑝"]
N1 --> 2["𝜋"]
N0 --> N2["𝐽/𝜓"]
N2 --> 3["𝜇⁻"]
N2 --> 4["𝜇⁺"]
N0 --> 5["𝐾"]
style N0 fill:#FFFFFF, stroke:#FFFFFF;
style N1 fill:#FFFFFF, stroke:#FFFFFF;
style N2 fill:#FFFFFF, stroke:#FFFFFF;
style 0 fill:#FFFFFF, stroke:#FFFFFF;
style 1 fill:#FFFFFF, stroke:#FFFFFF;
style 2 fill:#FFFFFF, stroke:#FFFFFF;
style 3 fill:#FFFFFF, stroke:#FFFFFF;
style 4 fill:#FFFFFF, stroke:#FFFFFF;
style 5 fill:#FFFFFF, stroke:#FFFFFF;
Following snippet should work, but I had to abort, because it takes ages... from qrules.transition import StateTransitionManager
stm = StateTransitionManager(
initial_state=["Lambda(b)0"],
final_state=["p", "pi0", "mu+", "mu-", "K-"],
)
stm.add_final_state_grouping([["p", "pi0"], ["mu+", "mu-"]])
problem_sets = stm.create_problem_sets()
reaction = stm.find_solutions(problem_sets)
len(reaction.transitions) To reduce the number of spin projection combinations: from qrules.transition import StateTransitionManager
stm = StateTransitionManager(
initial_state=[("Lambda(b)0", [+0.5])],
final_state=[("p", [+0.5]), "pi0", ("mu+", [+0.5]), ("mu-", [+0.5]), "K-"],
)
stm.add_final_state_grouping([["p", "pi0"], ["mu+", "mu-"]])
problem_sets = stm.create_problem_sets()
reaction = stm.find_solutions(problem_sets)
len(reaction.transitions) |
The "expertsystem" has to be actually turned into one to be able to speed up the solving process. Currently the solving is done using CSP which is a rather brute force way of finding a solution. In a simple example, for particle of zero electric charge which decays into two particles, the current code just creates all possible combinations and throws them away if they validate a rule. The real expertsystem way would be to assign all possible values to one of the child particles and the second one can be directly computes as the difference of the parent and other child. |
@Zeyna777 relevant snippet to reduce the number of combinations is at #27 (comment). But a better solution would be #219. |
It would be nice if we can illustrate n-body decay with more than 3 final state particles and render that in the visualization notebook. This notebook can then be referred to for instance when describing subsystems (e.g.
Subsystem
).Some additional thoughts:
expertsystem
too long to generate this decay, because the notebook has to be integrated into the CI for the documentation. Therefore best if the example only involves one interaction type (e.g. strong).The text was updated successfully, but these errors were encountered: