def test_J_non_mesons(PDGIDs): # TODO: test special particles, supersymmetric particles, R-hadrons, di-quarks, nuclei and pentaquarks _J_eq_0 = () _J_eq_1 = (PDGIDs.Gluon, PDGIDs.Photon, PDGIDs.Z0, PDGIDs.jpsi, PDGIDs.psi_2S, PDGIDs.Upsilon_1S, PDGIDs.Upsilon_4S, PDGIDs.K1_1270_0) _J_eq_1over2 = (PDGIDs.Electron, PDGIDs.Positron, PDGIDs.Muon, PDGIDs.AntiMuon, PDGIDs.Tau, PDGIDs.Nu_e, PDGIDs.NuBar_tau, PDGIDs.DQuark, PDGIDs.UQuark, PDGIDs.SQuark, PDGIDs.CQuark, PDGIDs.BQuark, PDGIDs.TQuark, PDGIDs.Proton, PDGIDs.AntiNeutron, PDGIDs.Lambda, PDGIDs.Sigma0, PDGIDs.SigmaPlus, PDGIDs.SigmaMinus, PDGIDs.Xi0, PDGIDs.AntiXiMinus, PDGIDs.LcPlus, PDGIDs.Lb, PDGIDs.LtPlus, PDGIDs.STildeL, PDGIDs.CTildeR) _J_eq_3over2 = (PDGIDs.OmegaMinus, ) _invalid_pdgids = (PDGIDs.Invalid1, PDGIDs.Invalid2) # cases not dealt with in the code, where None is returned _J_eq_None = (PDGIDs.TauPrime, PDGIDs.BPrimeQuark, PDGIDs.TPrimeQuark) for id in _J_eq_0: assert j_spin(id) == 1 for id in _J_eq_1: assert j_spin(id) == 3 for id in _J_eq_1over2: assert j_spin(id) == 2 for id in _J_eq_3over2: assert j_spin(id) == 4 for id in _invalid_pdgids: assert j_spin(id) == None for id in _J_eq_None: assert j_spin(id) == None
def test_JSL_badly_known_mesons(PDGIDs): assert j_spin(PDGIDs.f_4_2300) == 9 assert s_spin(PDGIDs.f_4_2300) == None assert l_spin(PDGIDs.f_4_2300) == None