DecayLanguage demo#
Henry Schreiner and Eduardo Rodrigues#
The demos assume you have run python -m pip install decaylanguage. You can also access them on binder or view them here.
DecayLanguage was designed to support manipulating decay structures in Python. It started with a specific focus, and is slowly generalizing. The current package has:
Amplitude Analysis decay language:
Input based on AmpGen generator
Current output formats:
GooFit C++
Decay file parsers:
Read DecFiles, such as the LHCb main DecFile
Manipulate and visualize them in Python
DecayLanguage: decay modelling#
This takes a file in the “AmpGen” format and converts it to a DecayChain. Currently one output converter is included: GooFit C++.
[1]:
from __future__ import annotations
with open("simple_model.txt") as f:
print(f.read())
EventType D0 K- pi+ pi+ pi-
D0[D]{K*(892)bar0{K-,pi+},rho(770)0{pi+,pi-}} 2 1 0 2 0 0
D0[D]{rho(1450)0{pi+,pi-},K*(892)bar0{K-,pi+}} 0 0.648936 0.0205762 0 -0.271637 0.0342107
D0[P]{K*(892)bar0{K-,pi+},rho(770)0{pi+,pi-}} 0 0.362058 0.00237314 0 -1.79607 0.00663691
D0[P]{rho(1450)0{pi+,pi-},K*(892)bar0{K-,pi+}} 0 0.642781 0.00570074 0 1.69828 0.00900026
D0_radius 2 0.0037559 0
[2]:
!python -m decaylanguage -G goofit simple_model.txt
/* Autogenerated file by AmpGen2GooFit
Generated on 2026-06-16 16:53:05.115597
DtoV1V2_V1toP1P2_V2toP3P4_D : SF_4Body.DtoV1V2_V1toP1P2_V2toP3P4_D SF_4Body.FF_12_34_L2
D0[D]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}
D0[D]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}
DtoV1V2_V1toP1P2_V2toP3P4_P : SF_4Body.DtoV1V2_V1toP1P2_V2toP3P4_P SF_4Body.FF_12_34_L1
D0[P]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}
D0[P]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}
Scalar:
PseudoScalar: pi+ pi- K- D0
Vector: rho(770)0 K*(892)~0 rho(1450)0
Axial:
Tensor:
PseudoTensor:
Unknown:
NonDefined:
0 D0[D]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}} spinfactors: 2 L: 2 [0-2.0]
1 D0[D]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}} spinfactors: 2 L: 2 [0-2.0]
2 D0[P]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}} spinfactors: 2 L: 1 [0-2.0]
3 D0[P]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}} spinfactors: 2 L: 1 [0-2.0]
All discovered spin configurations:
DtoV1V2_V1toP1P2_V2toP3P4_D
DtoV1V2_V1toP1P2_V2toP3P4_P
All known spin configurations:
DtoPP1_PtoSP2_StoP3P4
DtoPP1_PtoVP2_VtoP3P4
DtoV1V2_V1toP1P2_V2toP3P4_S
DtoV1V2_V1toP1P2_V2toP3P4_P
DtoV1V2_V1toP1P2_V2toP3P4_D
DtoAP1_AtoVP2_VtoP3P4
DtoAP1_AtoVP2Dwave_VtoP3P4
DtoVS_VtoP1P2_StoP3P4
DtoV1P1_V1toV2P2_V2toP3P4
DtoAP1_AtoSP2_StoP3P4
DtoTP1_TtoVP2_VtoP3P4
FF_12_34_L1
FF_12_34_L2
FF_123_4_L1
FF_123_4_L2
ONE
*/
// Intro
// Event type: D0 -> K- (0) pi+ (1) pi+ (2) pi- (3)
std::vector<std::vector<Lineshape*>> line_factor_list;
std::vector<std::vector<SpinFactor*>> spin_factor_list;
std::vector<Amplitude*> amplitudes_list;
constexpr fptype PI_PLUS { 139.57039 };
constexpr fptype PI_MINUS { 139.57039 };
constexpr fptype D_0 { 1864.84 };
constexpr fptype K_MINUS { 493.677 };
Variable rho_770_0_M { "rho_770_0_M" , 775.26 };
Variable rho_770_0_W { "rho_770_0_W" , 147.4 };
Variable rho_1450_0_M { "rho_1450_0_M" , 1465 };
Variable rho_1450_0_W { "rho_1450_0_W" , 400 };
Variable Kst_892_0_bar_M { "Kst_892_0_bar_M" , 895.55 };
Variable Kst_892_0_bar_W { "Kst_892_0_bar_W" , 47.3 };
DK3P_DI.meson_radius = 5;
DK3P_DI.particle_masses = {D_0, K_MINUS, PI_PLUS, PI_PLUS, PI_MINUS};
// Parameters
Variable D0_radius {"D0_radius", 0.0037559 };
// Lines
// Line 0
// D0[D]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}
spin_factor_list.push_back(std::vector<SpinFactor*>({
new SpinFactor("SF", SF_4Body::DtoV1V2_V1toP1P2_V2toP3P4_D , 0, 1, 2, 3),
new SpinFactor("SF", SF_4Body::FF_12_34_L2 , 0, 1, 2, 3),
new SpinFactor("SF", SF_4Body::DtoV1V2_V1toP1P2_V2toP3P4_D , 0, 2, 1, 3),
new SpinFactor("SF", SF_4Body::FF_12_34_L2 , 0, 2, 1, 3)
}));
line_factor_list.push_back(std::vector<Lineshape*>{
new Lineshapes::RBW("K*(892)bar0", Kst_892_0_bar_M, Kst_892_0_bar_W, 1.0, M_12, FF::BL2),
new Lineshapes::RBW("rho(770)0", rho_770_0_M, rho_770_0_W, 1.0, M_34, FF::BL2),
new Lineshapes::RBW("K*(892)bar0", Kst_892_0_bar_M, Kst_892_0_bar_W, 1.0, M_13, FF::BL2),
new Lineshapes::RBW("rho(770)0", rho_770_0_M, rho_770_0_W, 1.0, M_24, FF::BL2)
});
amplitudes_list.push_back(new Amplitude{
"D0[D]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}",
mkvar("D0[D]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}_r", true, 1.0, 0.0),
mkvar("D0[D]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}_i", true, 0.0, 0.0),
line_factor_list.back(),
spin_factor_list.back(),
2});
DK3P_DI.amplitudes_B.push_back(amplitudes_list.back());
// Line 1
// D0[D]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}
spin_factor_list.push_back(std::vector<SpinFactor*>({
new SpinFactor("SF", SF_4Body::DtoV1V2_V1toP1P2_V2toP3P4_D , 1, 3, 0, 2),
new SpinFactor("SF", SF_4Body::FF_12_34_L2 , 1, 3, 0, 2),
new SpinFactor("SF", SF_4Body::DtoV1V2_V1toP1P2_V2toP3P4_D , 2, 3, 0, 1),
new SpinFactor("SF", SF_4Body::FF_12_34_L2 , 2, 3, 0, 1)
}));
line_factor_list.push_back(std::vector<Lineshape*>{
new Lineshapes::RBW("rho(1450)0", rho_1450_0_M, rho_1450_0_W, 1.0, M_24, FF::BL2),
new Lineshapes::RBW("K*(892)bar0", Kst_892_0_bar_M, Kst_892_0_bar_W, 1.0, M_13, FF::BL2),
new Lineshapes::RBW("rho(1450)0", rho_1450_0_M, rho_1450_0_W, 1.0, M_34, FF::BL2),
new Lineshapes::RBW("K*(892)bar0", Kst_892_0_bar_M, Kst_892_0_bar_W, 1.0, M_12, FF::BL2)
});
amplitudes_list.push_back(new Amplitude{
"D0[D]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}",
mkvar("D0[D]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}_r", false, 0.625141, 0.0138651),
mkvar("D0[D]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}_i", false, -0.174115, 0.0158658),
line_factor_list.back(),
spin_factor_list.back(),
2});
DK3P_DI.amplitudes_B.push_back(amplitudes_list.back());
// Line 2
// D0[P]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}
spin_factor_list.push_back(std::vector<SpinFactor*>({
new SpinFactor("SF", SF_4Body::DtoV1V2_V1toP1P2_V2toP3P4_P , 0, 1, 2, 3),
new SpinFactor("SF", SF_4Body::FF_12_34_L1 , 0, 1, 2, 3),
new SpinFactor("SF", SF_4Body::DtoV1V2_V1toP1P2_V2toP3P4_P , 0, 2, 1, 3),
new SpinFactor("SF", SF_4Body::FF_12_34_L1 , 0, 2, 1, 3)
}));
line_factor_list.push_back(std::vector<Lineshape*>{
new Lineshapes::RBW("K*(892)bar0", Kst_892_0_bar_M, Kst_892_0_bar_W, 1.0, M_12, FF::BL2),
new Lineshapes::RBW("rho(770)0", rho_770_0_M, rho_770_0_W, 1.0, M_34, FF::BL2),
new Lineshapes::RBW("K*(892)bar0", Kst_892_0_bar_M, Kst_892_0_bar_W, 1.0, M_13, FF::BL2),
new Lineshapes::RBW("rho(770)0", rho_770_0_M, rho_770_0_W, 1.0, M_24, FF::BL2)
});
amplitudes_list.push_back(new Amplitude{
"D0[P]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}",
mkvar("D0[P]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}_r", false, -0.080874, -0.00287233),
mkvar("D0[P]{K*(892)~0{K-,pi+},rho(770)0{pi+,pi-}}_i", false, -0.35291, -0.00284993),
line_factor_list.back(),
spin_factor_list.back(),
2});
DK3P_DI.amplitudes_B.push_back(amplitudes_list.back());
// Line 3
// D0[P]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}
spin_factor_list.push_back(std::vector<SpinFactor*>({
new SpinFactor("SF", SF_4Body::DtoV1V2_V1toP1P2_V2toP3P4_P , 1, 3, 0, 2),
new SpinFactor("SF", SF_4Body::FF_12_34_L1 , 1, 3, 0, 2),
new SpinFactor("SF", SF_4Body::DtoV1V2_V1toP1P2_V2toP3P4_P , 2, 3, 0, 1),
new SpinFactor("SF", SF_4Body::FF_12_34_L1 , 2, 3, 0, 1)
}));
line_factor_list.push_back(std::vector<Lineshape*>{
new Lineshapes::RBW("rho(1450)0", rho_1450_0_M, rho_1450_0_W, 1.0, M_24, FF::BL2),
new Lineshapes::RBW("K*(892)bar0", Kst_892_0_bar_M, Kst_892_0_bar_W, 1.0, M_13, FF::BL2),
new Lineshapes::RBW("rho(1450)0", rho_1450_0_M, rho_1450_0_W, 1.0, M_34, FF::BL2),
new Lineshapes::RBW("K*(892)bar0", Kst_892_0_bar_M, Kst_892_0_bar_W, 1.0, M_12, FF::BL2)
});
amplitudes_list.push_back(new Amplitude{
"D0[P]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}",
mkvar("D0[P]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}_r", false, -0.0817223, 0.00501346),
mkvar("D0[P]{rho(1450)0{pi+,pi-},K*(892)~0{K-,pi+}}_i", false, 0.637565, 0.00491896),
line_factor_list.back(),
spin_factor_list.back(),
2});
DK3P_DI.amplitudes_B.push_back(amplitudes_list.back());
You can query this information from Python too:
[3]:
from decaylanguage.modeling.goofit import GooFitChain
[4]:
lines, all_states = GooFitChain.read_ampgen("simple_model.txt")
[5]:
lines[0]
[5]:
DecayLanguage: DecFile#
[6]:
from decaylanguage import DecFileParser
from decaylanguage.dec.dec import ChargeConjugateReplacement
[7]:
with open("../tests/data/test_example_Dst.dec") as f:
print(f.read())
# Example decay chain for testing purposes
# Considered by itself, this file in in fact incomplete,
# as there are no instructions on how to decay the anti-D0 and the D-!
Decay D*+
0.677 D0 pi+ VSS;
0.307 D+ pi0 VSS;
0.016 D+ gamma VSP_PWAVE;
Enddecay
Decay D*-
0.6770 anti-D0 pi- VSS;
0.3070 D- pi0 VSS;
0.0160 D- gamma VSP_PWAVE;
Enddecay
Decay D0
1.0 K- pi+ PHSP;
Enddecay
Decay D+
1.0 K- pi+ pi+ pi0 PHSP;
Enddecay
Decay pi0
0.988228297 gamma gamma PHSP;
0.011738247 e+ e- gamma PI0_DALITZ;
0.000033392 e+ e+ e- e- PHSP;
0.000000065 e+ e- PHSP;
Enddecay
[8]:
parser = DecFileParser("../tests/data/test_example_Dst.dec")
parser
[8]:
<DecFileParser: decfile(s)=['../tests/data/test_example_Dst.dec']>
[9]:
parser.parse()
parser
[9]:
<DecFileParser: decfile(s)=['../tests/data/test_example_Dst.dec'], n_decays=5>
[10]:
parser.print_decay_modes("D*+")
0.677 D0 pi+ VSS;
0.307 D+ pi0 VSS;
0.016 D+ gamma VSP_PWAVE;
[11]:
parser.list_decay_mother_names()
[11]:
['D*+', 'D*-', 'D0', 'D+', 'pi0']
[12]:
parser.list_decay_modes("D*+")
[12]:
[['D0', 'pi+'], ['D+', 'pi0'], ['D+', 'gamma']]
Viewing decay chains#
[13]:
from decaylanguage import DecayChainViewer
[14]:
d = parser.build_decay_chains("D+")
d
[14]:
{'D+': [{'bf': 1.0,
'fs': ['K-',
'pi+',
'pi+',
{'pi0': [{'bf': 0.988228297,
'fs': ['gamma', 'gamma'],
'model': 'PHSP',
'model_params': ''},
{'bf': 0.011738247,
'fs': ['e+', 'e-', 'gamma'],
'model': 'PI0_DALITZ',
'model_params': ''},
{'bf': 3.3392e-05,
'fs': ['e+', 'e+', 'e-', 'e-'],
'model': 'PHSP',
'model_params': ''},
{'bf': 6.5e-08,
'fs': ['e+', 'e-'],
'model': 'PHSP',
'model_params': ''}]}],
'model': 'PHSP',
'model_params': ''}]}
[15]:
DecayChainViewer(d)
[15]:
[16]:
d = parser.build_decay_chains("D*+")
DecayChainViewer(d)
[16]:
[17]:
d = parser.build_decay_chains("D*+", stable_particles=["D+"])
DecayChainViewer(d, show_effective_bf=True)
[17]:
[18]:
d = parser.build_decay_chains("D*+", stable_particles=["D+"], minimum_effective_bf=0.3)
DecayChainViewer(d, show_effective_bf=True)
[18]:
Charge conjugation#
[19]:
ChargeConjugateReplacement().visit(parser._parsed_dec_file.children[0])
[19]:
Tree(Token('RULE', 'decay'), [Tree(Token('RULE', 'particle'), [Token('LABEL', 'D*-')]), Tree(Token('RULE', 'decayline'), [Tree(Token('RULE', 'value'), [Token('SIGNED_NUMBER', '0.677')]), Tree(Token('RULE', 'particle'), [Token('LABEL', 'anti-D0')]), Tree(Token('RULE', 'particle'), [Token('LABEL', 'pi-')]), Tree(Token('RULE', 'model'), [Token('MODEL_NAME', 'VSS')])]), Tree(Token('RULE', 'decayline'), [Tree(Token('RULE', 'value'), [Token('SIGNED_NUMBER', '0.307')]), Tree(Token('RULE', 'particle'), [Token('LABEL', 'D-')]), Tree(Token('RULE', 'particle'), [Token('LABEL', 'pi0')]), Tree(Token('RULE', 'model'), [Token('MODEL_NAME', 'VSS')])]), Tree(Token('RULE', 'decayline'), [Tree(Token('RULE', 'value'), [Token('SIGNED_NUMBER', '0.016')]), Tree(Token('RULE', 'particle'), [Token('LABEL', 'D-')]), Tree(Token('RULE', 'particle'), [Token('LABEL', 'gamma')]), Tree(Token('RULE', 'model'), [Token('MODEL_NAME', 'VSP_PWAVE')])])])
[20]:
d = parser.build_decay_chains("D*-")
DecayChainViewer(d)
[20]:
Large DecFiles#
Now let’s read in a 11,000 line dec file - LHCb main file with generic decays.
[21]:
from decaylanguage import data
parser = DecFileParser(data.basepath / "DECAY_LHCB.DEC")
parser
[21]:
<DecFileParser: decfile(s)=[PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/decaylanguage/checkouts/latest/src/decaylanguage/data/DECAY_LHCB.DEC')]>
[22]:
%%time
parser.parse()
parser
CPU times: user 1.13 s, sys: 30.9 ms, total: 1.16 s
Wall time: 1.16 s
[22]:
<DecFileParser: decfile(s)=[PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/decaylanguage/checkouts/latest/src/decaylanguage/data/DECAY_LHCB.DEC')], n_decays=510>
[23]:
parser.dict_aliases()
[23]:
{'K*L': 'K*0',
'K*S': 'K*0',
'K*BL': 'anti-K*0',
'K*BS': 'anti-K*0',
'K*0T': 'K*0',
'anti-K*0T': 'anti-K*0',
'K*BR': 'anti-K*0',
'K*0R': 'K*0',
'anti-K_0*0N': 'anti-K_0*0',
'K_0*0N': 'K_0*0',
'B0sig': 'B0',
'anti-B0sig': 'anti-B0',
'B+sig': 'B+',
'B-sig': 'B-',
'B_s0sig': 'B_s0',
'anti-B_s0sig': 'anti-B_s0',
'B_c+sig': 'B_c+',
'B_c-sig': 'B_c-',
'B_c*+sig': 'B_c*+',
'B_c*-sig': 'B_c*-',
'B_c0*+sig': 'B_c0*+',
'B_c0*-sig': 'B_c0*-',
'B_c2*+sig': 'B_c2*+',
'B_c2*-sig': 'B_c2*-',
'B_c1+sig': 'B_c1+',
'B_c1-sig': 'B_c1-',
"B'_c1+sig": "B'_c1+",
"B'_c1-sig": "B'_c1-",
'B_c(2S)+sig': 'B_c(2S)+',
'B_c(2S)-sig': 'B_c(2S)-',
'B_c*(2S)+sig': 'B_c*(2S)+',
'B_c*(2S)-sig': 'B_c*(2S)-',
'eta_bsig': 'eta_b',
'h_bsig': 'h_b',
'Sigma_b-sig': 'Sigma_b-',
'anti-Sigma_b+sig': 'anti-Sigma_b+',
'Lambda_b0sig': 'Lambda_b0',
'anti-Lambda_b0sig': 'anti-Lambda_b0',
'Omega_b-sig': 'Omega_b-',
'anti-Omega_b+sig': 'anti-Omega_b+',
'Xi_b-sig': 'Xi_b-',
'anti-Xi_b+sig': 'anti-Xi_b+',
'Xi_b0sig': 'Xi_b0',
'anti-Xi_b0sig': 'anti-Xi_b0',
'eta_csig': 'eta_c',
'J/psisig': 'J/psi',
'chi_c0sig': 'chi_c0',
'chi_c1sig': 'chi_c1',
'chi_c2sig': 'chi_c2',
'psi(2S)sig': 'psi(2S)',
'psi(3770)sig': 'psi(3770)',
'D*+sig': 'D*+',
'D*-sig': 'D*-',
'D*0sig': 'D*0',
'anti-D*0sig': 'anti-D*0',
'D0sig': 'D0',
'anti-D0sig': 'anti-D0',
'D+sig': 'D+',
'D-sig': 'D-',
'D_s+sig': 'D_s+',
'D_s-sig': 'D_s-',
'Lambda_c+sig': 'Lambda_c+',
'anti-Lambda_c-sig': 'anti-Lambda_c-',
'tau+sig': 'tau+',
'tau-sig': 'tau-',
'Upsilonsig': 'Upsilon',
'Upsilon(2S)sig': 'Upsilon(2S)',
'Upsilon(3S)sig': 'Upsilon(3S)',
'Upsilon(4S)sig': 'Upsilon(4S)',
'Upsilon(5S)sig': 'Upsilon(5S)',
'X_1(3872)sig': 'X_1(3872)',
'h_csig': 'h_c',
'Sigma+sig': 'Sigma+',
'anti-Sigma-sig': 'anti-Sigma-',
'K+sig': 'K+',
'K-sig': 'K-',
'Lambda0sig': 'Lambda0',
'anti-Lambda0sig': 'anti-Lambda0',
'B_10sig': 'B_10',
'anti-B_10sig': 'anti-B_10',
'B_2*0sig': 'B_2*0',
'anti-B_2*0sig': 'anti-B_2*0',
'B_s10sig': 'B_s10',
'anti-B_s10sig': 'anti-B_s10',
'B_s2*0sig': 'B_s2*0',
'anti-B_s2*0sig': 'anti-B_s2*0',
'B_1+sig': 'B_1+',
'B_1-sig': 'B_1-',
'B_2*+sig': 'B_2*+',
'B_2*-sig': 'B_2*-',
'K_S0sig': 'K_S0',
'K_L0sig': 'K_L0',
'phisig': 'phi',
'Xi_cc+sig': 'Xi_cc+',
'anti-Xi_cc-sig': 'anti-Xi_cc-',
'D_s0*+sig': 'D_s0*+',
'D_s0*-sig': 'D_s0*-',
"D'_s1+sig": "D'_s1+",
"D'_s1-sig": "D'_s1-",
'D_s1+sig': 'D_s1+',
'D_s1-sig': 'D_s1-',
'chi_b0sig': 'chi_b0',
'chi_b1sig': 'chi_b1',
'chi_b2sig': 'chi_b2',
'Sigma_c0sig': 'Sigma_c0',
'anti-Sigma_c0sig': 'anti-Sigma_c0',
'Sigma_c+sig': 'Sigma_c+',
'anti-Sigma_c-sig': 'anti-Sigma_c-',
'Sigma_c++sig': 'Sigma_c++',
'anti-Sigma_c--sig': 'anti-Sigma_c--',
'Sigma_c*0sig': 'Sigma_c*0',
'anti-Sigma_c*0sig': 'anti-Sigma_c*0',
'Sigma_c*+sig': 'Sigma_c*+',
'anti-Sigma_c*-sig': 'anti-Sigma_c*-',
'Sigma_c*++sig': 'Sigma_c*++',
'anti-Sigma_c*--sig': 'anti-Sigma_c*--',
'Xi_c0sig': 'Xi_c0',
'anti-Xi_c0sig': 'anti-Xi_c0',
'Xi_c+sig': 'Xi_c+',
'anti-Xi_c-sig': 'anti-Xi_c-',
'D_2*0sig': 'D_2*0',
'anti-D_2*0sig': 'anti-D_2*0',
'D_2*-sig': 'D_2*-',
'D_2*+sig': 'D_2*+',
'D_s2*-sig': 'D_s2*-',
'D_s2*+sig': 'D_s2*+',
'D_s*-sig': 'D_s*-',
'D_s*+sig': 'D_s*+',
'Omega-sig': 'Omega-',
'anti-Omega+sig': 'anti-Omega+',
'Sigma_b0sig': 'Sigma_b0',
'anti-Sigma_b0sig': 'anti-Sigma_b0',
'Sigma_b+sig': 'Sigma_b+',
'anti-Sigma_b-sig': 'anti-Sigma_b-',
'Xi_bc0sig': 'Xi_bc0',
'anti-Xi_bc0sig': 'anti-Xi_bc0',
'Xi_bc+sig': 'Xi_bc+',
'anti-Xi_bc-sig': 'anti-Xi_bc-',
'Xi_cc++sig': 'Xi_cc++',
'anti-Xi_cc--sig': 'anti-Xi_cc--',
'Xi-sig': 'Xi-',
'anti-Xi+sig': 'anti-Xi+',
'Xi0sig': 'Xi0',
'anti-Xi0sig': 'anti-Xi0',
'Omega_cc+sig': 'Omega_cc+',
'anti-Omega_cc-sig': 'anti-Omega_cc-',
'etasig': 'eta',
'pi0sig': 'pi0'}
[24]:
parser.dict_charge_conjugates()
[24]:
{'K*L': 'K*BL',
'K*S': 'K*BS',
'K*0T': 'anti-K*0T',
'K_0*0N': 'anti-K_0*0N',
'K*0R': 'K*BR',
'B0sig': 'anti-B0sig',
'B+sig': 'B-sig',
'B_s0sig': 'anti-B_s0sig',
'B_c+sig': 'B_c-sig',
'B_c*+sig': 'B_c*-sig',
'B_c0*+sig': 'B_c0*-sig',
'B_c2*+sig': 'B_c2*-sig',
'B_c1+sig': 'B_c1-sig',
"B'_c1+sig": "B'_c1-sig",
'B_c(2S)+sig': 'B_c(2S)-sig',
'B_c*(2S)+sig': 'B_c*(2S)-sig',
'eta_bsig': 'eta_bsig',
'h_bsig': 'h_bsig',
'Sigma_b-sig': 'anti-Sigma_b+sig',
'Lambda_b0sig': 'anti-Lambda_b0sig',
'Omega_b-sig': 'anti-Omega_b+sig',
'Xi_b-sig': 'anti-Xi_b+sig',
'Xi_b0sig': 'anti-Xi_b0sig',
'eta_csig': 'eta_csig',
'J/psisig': 'J/psisig',
'chi_c0sig': 'chi_c0sig',
'chi_c1sig': 'chi_c1sig',
'chi_c2sig': 'chi_c2sig',
'psi(2S)sig': 'psi(2S)sig',
'psi(3770)sig': 'psi(3770)sig',
'D*+sig': 'D*-sig',
'D*0sig': 'anti-D*0sig',
'D0sig': 'anti-D0sig',
'D+sig': 'D-sig',
'D_s+sig': 'D_s-sig',
'Lambda_c+sig': 'anti-Lambda_c-sig',
'tau+sig': 'tau-sig',
'Upsilonsig': 'Upsilonsig',
'Upsilon(2S)sig': 'Upsilon(2S)sig',
'Upsilon(3S)sig': 'Upsilon(3S)sig',
'Upsilon(4S)sig': 'Upsilon(4S)sig',
'Upsilon(5S)sig': 'Upsilon(5S)sig',
'X_1(3872)sig': 'X_1(3872)sig',
'h_csig': 'h_csig',
'Sigma+sig': 'anti-Sigma-sig',
'K+sig': 'K-sig',
'Lambda0sig': 'anti-Lambda0sig',
'B_10sig': 'anti-B_10sig',
'B_2*0sig': 'anti-B_2*0sig',
'B_s10sig': 'anti-B_s10sig',
'B_s2*0sig': 'anti-B_s2*0sig',
'B_1+sig': 'B_1-sig',
'B_2*+sig': 'B_2*-sig',
'K_S0sig': 'K_S0sig',
'K_L0sig': 'K_L0sig',
'phisig': 'phisig',
'Xi_cc+sig': 'anti-Xi_cc-sig',
'D_s0*+sig': 'D_s0*-sig',
"D'_s1+sig": "D'_s1-sig",
'D_s1+sig': 'D_s1-sig',
'chi_b0sig': 'chi_b0sig',
'chi_b1sig': 'chi_b1sig',
'chi_b2sig': 'chi_b2sig',
'Sigma_c0sig': 'anti-Sigma_c0sig',
'Sigma_c+sig': 'anti-Sigma_c-sig',
'Sigma_c++sig': 'anti-Sigma_c--sig',
'Sigma_c*0sig': 'anti-Sigma_c*0sig',
'Sigma_c*+sig': 'anti-Sigma_c*-sig',
'Sigma_c*++sig': 'anti-Sigma_c*--sig',
'Xi_c0sig': 'anti-Xi_c0sig',
'Xi_c+sig': 'anti-Xi_c-sig',
'D_2*0sig': 'anti-D_2*0sig',
'D_2*+sig': 'D_2*-sig',
'D_s2*+sig': 'D_s2*-sig',
'D_s*+sig': 'D_s*-sig',
'Omega-sig': 'anti-Omega+sig',
'Sigma_b0sig': 'anti-Sigma_b0sig',
'Sigma_b+sig': 'anti-Sigma_b-sig',
'Xi_bc0sig': 'anti-Xi_bc0sig',
'Xi_bc+sig': 'anti-Xi_bc-sig',
'Xi_cc++sig': 'anti-Xi_cc--sig',
'Xi-sig': 'anti-Xi+sig',
'Xi0sig': 'anti-Xi0sig',
'Omega_cc+sig': 'anti-Omega_cc-sig',
'etasig': 'etasig',
'pi0sig': 'pi0sig'}
Stay tuned, follow the development and/or contribute!