Quickstart#

DecayLanguage provides tools for describing, parsing, and visualizing particle decays. The three main areas are:

Parsing .dec decay files#

Use DecFileParser to parse EvtGen-format .dec files:

from decaylanguage import DecFileParser

parser = DecFileParser("my_decays.dec")
parser.parse()

# List all decay mother particles
parser.list_decay_mother_names()

# Get decay modes for a specific particle
parser.list_decay_modes("D+")

See Parsing .dec files for more details.

Building and visualizing decay chains#

Use DecayMode and DecayChain to construct and visualize decay chains:

from decaylanguage import DecayMode, DecayChain, DecayChainViewer

dm1 = DecayMode(0.5, "K- pi+ pi+ pi0")
dm2 = DecayMode(0.5, "K+ pi- pi- pi0")
dm3 = DecayMode(1.0, "D+ D-")
dc = DecayChain("B0", {"D+": dm1, "D-": dm2, "B0": dm3})

# Visualize the chain
dcv = DecayChainViewer(dc)
dcv  # renders in Jupyter

See Decay chains for more details.

Amplitude models#

The modeling module supports parsing AmpGen amplitude model files and converting them to GooFit format:

python -m decaylanguage.goofit models/DtoKpipipi_v2.txt

See Amplitude models for more details.