Closed as not planned
Description
openedon Aug 27, 2024
As noted by/with @MartinTum, setting allowed_interaction_types
in generate_transitions()
does not work as expected when using a tuple
(setting the interaction type per node).
Imports and particle database definition
import graphviz
import qrules
from qrules.particle import Particle, Spin
from qrules.settings import InteractionType
from qrules.transition import StateTransitionManager
Tcc1_4430 = Particle(
name="Tcc̅1(4430)⁺",
pid=99999999999,
latex=R"\mathit{T}_{c\overline{\mathit c}1}(4430)^+",
spin=1,
mass=4.478,
width=0.181,
charge=+1,
isospin=Spin(1, +1),
parity=+1,
c_parity=-1,
g_parity=+1,
)
particle_database = qrules.load_pdg()
particle_database += Tcc1_4430
reaction = qrules.generate_transitions(
initial_state="B0",
final_state=["J/psi(1S)", "pi+", "K-"],
allowed_intermediate_particles=["K(0)", "K*", "Tc", "f(0)"],
allowed_interaction_types=("weak", "strong"), # <-- problem here
particle_db=particle_database,
)
Using the STM directly does result in the correct behaviour:
stm = StateTransitionManager(
initial_state=["B0"],
final_state=["J/psi(1S)", "pi+", "K-"],
particle_db=particle_database,
)
stm.set_allowed_interaction_types([InteractionType.WEAK], node_id=0)
stm.set_allowed_interaction_types([InteractionType.STRONG], node_id=1)
problem_sets = stm.create_problem_sets()
reaction = stm.find_solutions(problem_sets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment