def test_DecayMode_charge_conjugate(): dd = DaughtersDict('pi- pi0 nu_tau') dm = DecayMode(0.2551, dd, model='TAUHADNU', model_params=[-0.108, 0.775, 0.149, 1.364, 0.400]) dm_cc = dm.charge_conjugate() assert dm_cc.daughters == DaughtersDict('pi+ pi0 anti-nu_tau') assert 'BF: 0.2551' in dm.describe() assert 'Decay model: TAUHADNU [-0.108, 0.775, 0.149, 1.364, 0.4]' in dm.describe( ) dd = DaughtersDict('pi- pi0 nu(tau)') dd.charge_conjugate(pdg_name=True) == DaughtersDict('pi+ pi0 nu(tau)~')
def test_DecayMode_charge_conjugate(): dd = DaughtersDict("pi- pi0 nu_tau") dm = DecayMode(0.2551, dd, model="TAUHADNU", model_params=[-0.108, 0.775, 0.149, 1.364, 0.400]) dm_cc = dm.charge_conjugate() assert dm_cc.daughters == DaughtersDict("pi+ pi0 anti-nu_tau") assert "BF: 0.2551" in dm.describe() assert "Decay model: TAUHADNU [-0.108, 0.775, 0.149, 1.364, 0.4]" in dm.describe( ) dd = DaughtersDict("pi- pi0 nu(tau)") assert dd.charge_conjugate( pdg_name=True) == DaughtersDict("pi+ pi0 nu(tau)~")
def test_DaughtersDict_charge_conjugate_pdg_names(): dd = DaughtersDict({"K(S)0": 1, "pi+": 1}) # PDG names! assert dd == {"K(S)0": 1, "pi+": 1} # PDG names kept as-is assert dd.charge_conjugate() == {"ChargeConj(K(S)0)": 1, "pi-": 1} assert dd.charge_conjugate(pdg_name=True) == {"K(S)0": 1, "pi-": 1}
def test_DaughtersDict_charge_conjugate(): dd = DaughtersDict({"K+": 2, "pi0": 1}) assert dd.charge_conjugate() == {"K-": 2, "pi0": 1}