Usage¶
Warning
The PWA Expert System has been split up into QRules and AmpForm. Please use these packages instead!
Main interface¶
The expertsystem
consists of two main components: reaction
and amplitude
. Here’s a small example of how to use them!
Investigate intermediate resonances¶
import expertsystem as es
result = es.reaction.generate(
initial_state="J/psi(1S)",
final_state=["K0", "Sigma+", "p~"],
allowed_interaction_types="strong",
formalism_type="canonical-helicity",
)
import graphviz
dot = es.io.asdot(result, collapse_graphs=True)
graphviz.Source(dot)
Next, you use the amplitude
module to convert these transitions into a mathematical description that you can use to fit your data and perform Partial Wave Analysis!
See also
Quantum number search¶
The load_pdg()
function creates a ParticleCollection
containing the latest PDG info. Its find()
and filter()
methods allows you to quickly look up the quantum numbers of a particle and, vice versa, look up particle candidates based on a set of quantum numbers.
import expertsystem as es
pdg = es.reaction.load_pdg()
pdg.find(22)
delta = pdg.find("Delta(1920)++")
es.io.asdict(delta)
{'name': 'Delta(1920)++',
'pid': 22224,
'latex': '\\Delta(1920)^{++}',
'spin': 1.5,
'mass': 1.92,
'width': 0.3,
'charge': 2,
'isospin': {'magnitude': 1.5, 'projection': 1.5},
'baryon_number': 1,
'parity': {'value': 1}}
subset = pdg.filter(
lambda p: p.spin in [2.5, 3.5, 4.5] and p.name.startswith("N")
)
subset.names
{'N(1675)+',
'N(1675)0',
'N(1675)~-',
'N(1675)~0',
'N(1680)+',
'N(1680)0',
'N(1680)~-',
'N(1680)~0',
'N(2190)+',
'N(2190)0',
'N(2190)~-',
'N(2190)~0'}
Tip
Check allowed reactions¶
The expertsystem
can be used to check
whether a transition between an initial and final state is violated by any conservation rules:
es.check_reaction_violations(
initial_state="pi0",
final_state=["gamma", "gamma", "gamma"],
)
{frozenset({'c_parity_conservation'})}
Advanced¶
Each of the expertsystem
’s sub-modules offer functionality to handle more advanced reaction types. The following notebooks illustrate how use them.