Skip to content
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

Allow filtering resonances per intermediate edge #269

Open
redeboer opened this issue Jun 4, 2024 · 0 comments
Open

Allow filtering resonances per intermediate edge #269

redeboer opened this issue Jun 4, 2024 · 0 comments
Labels
✨ Feature New feature added to the package

Comments

@redeboer
Copy link
Member

redeboer commented Jun 4, 2024

In four-body decays, it becomes relevant to filter particles per intermediate state. For instance, in $B_0 \to \left(J/\psi\to\mu^-\mu^+\right) \pi^+ K^-$, it finds $J/\psi$ in both subsystems:

from qrules.transition import StateTransitionManager

stm = StateTransitionManager(
    initial_state=["B0"],
    final_state=["K-", "pi+", "mu+", "mu-"],
    formalism="helicity",
)
stm.add_final_state_grouping([["K-", "pi+"], ["mu+", "mu-"]])
stm.set_allowed_intermediate_particles(r"^(J/psi\(1S\)|f\(0\).*)$", regex=True)
problem_sets = stm.create_problem_sets()
reaction4body_full = stm.find_solutions(problem_sets)
src = qrules.io.asdot(reaction4body_full, collapse_graphs=True)
graphviz.Source(src)

figure svg

For now, the only way to avoid this, is to construct a new ReactionInfo object from filtered transition objects, e.g.:

REACTION4BODY = qrules.ReactionInfo(
    transitions=tuple(
        transition
        for transition in reaction4body_full.transitions
        if transition.states[4].particle.name == "J/psi(1S)"
    ),
    formalism=reaction4body_full.formalism,
)
src = qrules.io.asdot(REACTION4BODY, collapse_graphs=True)
graphviz.Source(src)

@redeboer redeboer added the ✨ Feature New feature added to the package label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature New feature added to the package
Projects
None yet
Development

No branches or pull requests

1 participant